farallon/dist/js/ias.js

12 lines
21 KiB
JavaScript
Raw Normal View History

2024-05-17 15:47:27 +08:00
/**
* Infinite Ajax Scroll v3.1.0
* Turn your existing pagination into infinite scrolling pages with ease
*
* Commercial use requires one-time purchase of a commercial license
* https://infiniteajaxscroll.com/docs/license.html
*
* Copyright 2014-2023 Webcreate (Jeroen Fiege)
* https://infiniteajaxscroll.com
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).InfiniteAjaxScroll=e()}(this,(function(){"use strict";function t(t){return"object"==typeof window.Node?t instanceof window.Node:null!==t&&"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName}function e(e,n){if(void 0===n&&(n=document),e instanceof Array)return e.filter(t);if(t(e))return[e];if(o=Object.prototype.toString.call(i=e),"object"==typeof window.NodeList?i instanceof window.NodeList:null!==i&&"object"==typeof i&&"number"==typeof i.length&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(o)&&(0===i.length||t(i[0])))return Array.prototype.slice.call(e);var i,o;if("string"==typeof e)try{var r=n.querySelectorAll(e);return Array.prototype.slice.call(r)}catch(t){return[]}return[]}var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===i.call(t)},l=function(t){if(!t||"[object Object]"!==i.call(t))return!1;var e,o=n.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!o&&!r)return!1;for(e in t);return void 0===e||n.call(t,e)},a=function(t,e){o&&"__proto__"===e.name?o(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},h=function(t,e){if("__proto__"===e){if(!n.call(t,e))return;if(r)return r(t,e).value}return t[e]},c=function t(){var e,n,i,o,r,c,p=arguments,u=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof u&&(m=u,u=arguments[1]||{},d=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});f>d;++d)if(null!=(e=p[d]))for(n in e)i=h(u,n),u!==(o=h(e,n))&&(m&&o&&(l(o)||(r=s(o)))?(r?(r=!1,c=i&&s(i)?i:[]):c=i&&l(i)?i:{},a(u,{name:n,newValue:t(m,c,o)})):void 0!==o&&a(u,{name:n,newValue:o}));return u},p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},u="Expected a function",d=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,g=/^0o[0-7]+$/i,v=parseInt,y="object"==typeof self&&self&&self.Object===Object&&self,b="object"==typeof p&&p&&p.Object===Object&&p||y||Function("return this")(),x=Object.prototype.toString,w=Math.max,O=Math.min,I=function(){return b.Date.now()};function E(t,e,n){var i,o,r,s,l,a,h=0,c=!1,p=!1,d=!0;if("function"!=typeof t)throw new TypeError(u);function f(e){var n=i,r=o;return i=o=void 0,h=e,s=t.apply(r,n)}function m(t){return h=t,l=setTimeout(v,e),c?f(t):s}function g(t){var n=t-a;return void 0===a||n>=e||0>n||p&&t-h>=r}function v(){var t=I();if(g(t))return y(t);l=setTimeout(v,function(t){var n=e-(t-a);return p?O(n,r-(t-h)):n}(t))}function y(t){return l=void 0,d&&i?f(t):(i=o=void 0,s)}function b(){var t=I(),n=g(t);if(i=arguments,o=this,a=t,n){if(void 0===l)return m(a);if(p)return l=setTimeout(v,e),f(a)}return void 0===l&&(l=setTimeout(v,e)),s}return e=T(e)||0,S(n)&&(c=!!n.leading,r=(p="maxWait"in n)?w(T(n.maxWait)||0,e):r,d="trailing"in n?!!n.trailing:d),b.cancel=function(){void 0!==l&&clearTimeout(l),h=0,i=a=o=l=void 0},b.flush=function(){return void 0===l?s:y(I())},b}function S(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function T(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==x.call(t)}(t))return NaN;if(S(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=S(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(d,"");var n=m.test(t);return n||g.test(t)?v(t.slice(2),n?2:8):f.test(t)?NaN:+t}var L=function(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(u);return S(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),E(t,e,{leading:i,maxWait:e,trailing:o})},C={item:void 0,next:void 0,prev:void 0,pagination:void 0,responseType:"document",bind:!0,scrollContainer:win