bootstrap-table
Version:
An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
11 lines (9 loc) • 20.2 kB
JavaScript
/**
* bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
*
* @version v1.22.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
* @license MIT
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=function(t){return t&&t.Math===Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")(),o={},i=function(t){try{return!!t()}catch(t){return!0}},a=!i((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),s=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),c=s,u=Function.prototype.call,f=c?u.bind(u):function(){return u.apply(u,arguments)},p={},l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,d=h&&!l.call({1:2},1);p.f=d?function(t){var e=h(this,t);return!!e&&e.enumerable}:l;var y,b,g=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v=s,m=Function.prototype,w=m.call,S=v&&m.bind.bind(w,w),O=v?S:function(t){return function(){return w.apply(t,arguments)}},j=O,P=j({}.toString),x=j("".slice),T=function(t){return x(P(t),8,-1)},C=i,A=T,E=Object,z=O("".split),W=C((function(){return!E("z").propertyIsEnumerable(0)}))?function(t){return"String"===A(t)?z(t,""):E(t)}:E,N=function(t){return null==t},R=N,F=TypeError,I=function(t){if(R(t))throw new F("Can't call method on "+t);return t},L=W,D=I,M=function(t){return L(D(t))},_="object"==typeof document&&document.all,k={all:_,IS_HTMLDDA:void 0===_&&void 0!==_},q=k.all,H=k.IS_HTMLDDA?function(t){return"function"==typeof t||t===q}:function(t){return"function"==typeof t},G=H,J=k.all,V=k.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:G(t)||t===J}:function(t){return"object"==typeof t?null!==t:G(t)},$=r,B=H,U=function(t){return B(t)?t:void 0},K=function(t,e){return arguments.length<2?U($[t]):$[t]&&$[t][e]},Q=O({}.isPrototypeOf),X=r,Y="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Z=X.process,tt=X.Deno,et=Z&&Z.versions||tt&&tt.version,nt=et&&et.v8;nt&&(b=(y=nt.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!b&&Y&&(!(y=Y.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=Y.match(/Chrome\/(\d+)/))&&(b=+y[1]);var rt=b,ot=rt,it=i,at=r.String,st=!!Object.getOwnPropertySymbols&&!it((function(){var t=Symbol("symbol detection");return!at(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ot&&ot<41})),ct=st&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ut=K,ft=H,pt=Q,lt=Object,ht=ct?function(t){return"symbol"==typeof t}:function(t){var e=ut("Symbol");return ft(e)&&pt(e.prototype,lt(t))},dt=String,yt=H,bt=function(t){try{return dt(t)}catch(t){return"Object"}},gt=TypeError,vt=function(t){if(yt(t))return t;throw new gt(bt(t)+" is not a function")},mt=vt,wt=N,St=f,Ot=H,jt=V,Pt=TypeError,xt={exports:{}},Tt=r,Ct=Object.defineProperty,At=function(t,e){try{Ct(Tt,t,{value:e,configurable:!0,writable:!0})}catch(n){Tt[t]=e}return e},Et=At,zt="__core-js_shared__",Wt=r[zt]||Et(zt,{}),Nt=Wt;(xt.exports=function(t,e){return Nt[t]||(Nt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.34.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Rt=xt.exports,Ft=I,It=Object,Lt=function(t){return It(Ft(t))},Dt=Lt,Mt=O({}.hasOwnProperty),_t=Object.hasOwn||function(t,e){return Mt(Dt(t),e)},kt=O,qt=0,Ht=Math.random(),Gt=kt(1..toString),Jt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Gt(++qt+Ht,36)},Vt=Rt,$t=_t,Bt=Jt,Ut=st,Kt=ct,Qt=r.Symbol,Xt=Vt("wks"),Yt=Kt?Qt.for||Qt:Qt&&Qt.withoutSetter||Bt,Zt=function(t){return $t(Xt,t)||(Xt[t]=Ut&&$t(Qt,t)?Qt[t]:Yt("Symbol."+t)),Xt[t]},te=f,ee=V,ne=ht,re=function(t,e){var n=t[e];return wt(n)?void 0:mt(n)},oe=function(t,e){var n,r;if("string"===e&&Ot(n=t.toString)&&!jt(r=St(n,t)))return r;if(Ot(n=t.valueOf)&&!jt(r=St(n,t)))return r;if("string"!==e&&Ot(n=t.toString)&&!jt(r=St(n,t)))return r;throw new Pt("Can't convert object to primitive value")},ie=TypeError,ae=Zt("toPrimitive"),se=function(t,e){if(!ee(t)||ne(t))return t;var n,r=re(t,ae);if(r){if(void 0===e&&(e="default"),n=te(r,t,e),!ee(n)||ne(n))return n;throw new ie("Can't convert object to primitive value")}return void 0===e&&(e="number"),oe(t,e)},ce=ht,ue=function(t){var e=se(t,"string");return ce(e)?e:e+""},fe=V,pe=r.document,le=fe(pe)&&fe(pe.createElement),he=function(t){return le?pe.createElement(t):{}},de=!a&&!i((function(){return 7!==Object.defineProperty(he("div"),"a",{get:function(){return 7}}).a})),ye=a,be=f,ge=p,ve=g,me=M,we=ue,Se=_t,Oe=de,je=Object.getOwnPropertyDescriptor;o.f=ye?je:function(t,e){if(t=me(t),e=we(e),Oe)try{return je(t,e)}catch(t){}if(Se(t,e))return ve(!be(ge.f,t,e),t[e])};var Pe={},xe=a&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Te=V,Ce=String,Ae=TypeError,Ee=function(t){if(Te(t))return t;throw new Ae(Ce(t)+" is not an object")},ze=a,We=de,Ne=xe,Re=Ee,Fe=ue,Ie=TypeError,Le=Object.defineProperty,De=Object.getOwnPropertyDescriptor,Me="enumerable",_e="configurable",ke="writable";Pe.f=ze?Ne?function(t,e,n){if(Re(t),e=Fe(e),Re(n),"function"==typeof t&&"prototype"===e&&"value"in n&&ke in n&&!n.writable){var r=De(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:_e in n?n.configurable:r.configurable,enumerable:Me in n?n.enumerable:r.enumerable,writable:!1})}return Le(t,e,n)}:Le:function(t,e,n){if(Re(t),e=Fe(e),Re(n),We)try{return Le(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new Ie("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var qe=Pe,He=g,Ge=a?function(t,e,n){return qe.f(t,e,He(1,n))}:function(t,e,n){return t[e]=n,t},Je={exports:{}},Ve=a,$e=_t,Be=Function.prototype,Ue=Ve&&Object.getOwnPropertyDescriptor,Ke=$e(Be,"name"),Qe={EXISTS:Ke,PROPER:Ke&&"something"===function(){}.name,CONFIGURABLE:Ke&&(!Ve||Ve&&Ue(Be,"name").configurable)},Xe=H,Ye=Wt,Ze=O(Function.toString);Xe(Ye.inspectSource)||(Ye.inspectSource=function(t){return Ze(t)});var tn,en,nn,rn=Ye.inspectSource,on=H,an=r.WeakMap,sn=on(an)&&/native code/.test(String(an)),cn=Jt,un=Rt("keys"),fn={},pn=sn,ln=r,hn=V,dn=Ge,yn=_t,bn=Wt,gn=function(t){return un[t]||(un[t]=cn(t))},vn=fn,mn="Object already initialized",wn=ln.TypeError,Sn=ln.WeakMap;if(pn||bn.state){var On=bn.state||(bn.state=new Sn);On.get=On.get,On.has=On.has,On.set=On.set,tn=function(t,e){if(On.has(t))throw new wn(mn);return e.facade=t,On.set(t,e),e},en=function(t){return On.get(t)||{}},nn=function(t){return On.has(t)}}else{var jn=gn("state");vn[jn]=!0,tn=function(t,e){if(yn(t,jn))throw new wn(mn);return e.facade=t,dn(t,jn,e),e},en=function(t){return yn(t,jn)?t[jn]:{}},nn=function(t){return yn(t,jn)}}var Pn={set:tn,get:en,has:nn,enforce:function(t){return nn(t)?en(t):tn(t,{})},getterFor:function(t){return function(e){var n;if(!hn(e)||(n=en(e)).type!==t)throw new wn("Incompatible receiver, "+t+" required");return n}}},xn=O,Tn=i,Cn=H,An=_t,En=a,zn=Qe.CONFIGURABLE,Wn=rn,Nn=Pn.enforce,Rn=Pn.get,Fn=String,In=Object.defineProperty,Ln=xn("".slice),Dn=xn("".replace),Mn=xn([].join),_n=En&&!Tn((function(){return 8!==In((function(){}),"length",{value:8}).length})),kn=String(String).split("String"),qn=Je.exports=function(t,e,n){"Symbol("===Ln(Fn(e),0,7)&&(e="["+Dn(Fn(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!An(t,"name")||zn&&t.name!==e)&&(En?In(t,"name",{value:e,configurable:!0}):t.name=e),_n&&n&&An(n,"arity")&&t.length!==n.arity&&In(t,"length",{value:n.arity});try{n&&An(n,"constructor")&&n.constructor?En&&In(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=Nn(t);return An(r,"source")||(r.source=Mn(kn,"string"==typeof e?e:"")),t};Function.prototype.toString=qn((function(){return Cn(this)&&Rn(this).source||Wn(this)}),"toString");var Hn=Je.exports,Gn=H,Jn=Pe,Vn=Hn,$n=At,Bn=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(Gn(n)&&Vn(n,i,r),r.global)o?t[e]=n:$n(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:Jn.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},Un={},Kn=Math.ceil,Qn=Math.floor,Xn=Math.trunc||function(t){var e=+t;return(e>0?Qn:Kn)(e)},Yn=function(t){var e=+t;return e!=e||0===e?0:Xn(e)},Zn=Yn,tr=Math.max,er=Math.min,nr=function(t,e){var n=Zn(t);return n<0?tr(n+e,0):er(n,e)},rr=Yn,or=Math.min,ir=function(t){return t>0?or(rr(t),9007199254740991):0},ar=function(t){return ir(t.length)},sr=M,cr=nr,ur=ar,fr=function(t){return function(e,n,r){var o,i=sr(e),a=ur(i),s=cr(r,a);if(t&&n!=n){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((t||s in i)&&i[s]===n)return t||s||0;return!t&&-1}},pr={includes:fr(!0),indexOf:fr(!1)},lr=_t,hr=M,dr=pr.indexOf,yr=fn,br=O([].push),gr=function(t,e){var n,r=hr(t),o=0,i=[];for(n in r)!lr(yr,n)&&lr(r,n)&&br(i,n);for(;e.length>o;)lr(r,n=e[o++])&&(~dr(i,n)||br(i,n));return i},vr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mr=gr,wr=vr.concat("length","prototype");Un.f=Object.getOwnPropertyNames||function(t){return mr(t,wr)};var Sr={};Sr.f=Object.getOwnPropertySymbols;var Or=K,jr=Un,Pr=Sr,xr=Ee,Tr=O([].concat),Cr=Or("Reflect","ownKeys")||function(t){var e=jr.f(xr(t)),n=Pr.f;return n?Tr(e,n(t)):e},Ar=_t,Er=Cr,zr=o,Wr=Pe,Nr=i,Rr=H,Fr=/#|\.prototype\./,Ir=function(t,e){var n=Dr[Lr(t)];return n===_r||n!==Mr&&(Rr(e)?Nr(e):!!e)},Lr=Ir.normalize=function(t){return String(t).replace(Fr,".").toLowerCase()},Dr=Ir.data={},Mr=Ir.NATIVE="N",_r=Ir.POLYFILL="P",kr=Ir,qr=r,Hr=o.f,Gr=Ge,Jr=Bn,Vr=At,$r=function(t,e,n){for(var r=Er(e),o=Wr.f,i=zr.f,a=0;a<r.length;a++){var s=r[a];Ar(t,s)||n&&Ar(n,s)||o(t,s,i(e,s))}},Br=kr,Ur=function(t,e){var n,r,o,i,a,s=t.target,c=t.global,u=t.stat;if(n=c?qr:u?qr[s]||Vr(s,{}):(qr[s]||{}).prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(a=Hr(n,r))&&a.value:n[r],!Br(c?r:s+(u?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;$r(i,o)}(t.sham||o&&o.sham)&&Gr(i,"sham",!0),Jr(n,r,i,t)}},Kr=gr,Qr=vr,Xr=Object.keys||function(t){return Kr(t,Qr)},Yr=a,Zr=O,to=f,eo=i,no=Xr,ro=Sr,oo=p,io=Lt,ao=W,so=Object.assign,co=Object.defineProperty,uo=Zr([].concat),fo=!so||eo((function(){if(Yr&&1!==so({b:1},so(co({},"a",{enumerable:!0,get:function(){co(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!==so({},t)[n]||no(so({},e)).join("")!==r}))?function(t,e){for(var n=io(t),r=arguments.length,o=1,i=ro.f,a=oo.f;r>o;)for(var s,c=ao(arguments[o++]),u=i?uo(no(c),i(c)):no(c),f=u.length,p=0;f>p;)s=u[p++],Yr&&!to(a,c,s)||(n[s]=c[s]);return n}:so,po=fo;Ur({target:"Object",stat:!0,arity:2,forced:Object.assign!==po},{assign:po});var lo=T,ho=Array.isArray||function(t){return"Array"===lo(t)},yo={};yo[Zt("toStringTag")]="z";var bo="[object z]"===String(yo),go=bo,vo=H,mo=T,wo=Zt("toStringTag"),So=Object,Oo="Arguments"===mo(function(){return arguments}()),jo=go?mo:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=So(t),wo))?n:Oo?mo(e):"Object"===(r=mo(e))&&vo(e.callee)?"Arguments":r},Po=O,xo=i,To=H,Co=jo,Ao=rn,Eo=function(){},zo=[],Wo=K("Reflect","construct"),No=/^\s*(?:class|function)\b/,Ro=Po(No.exec),Fo=!No.test(Eo),Io=function(t){if(!To(t))return!1;try{return Wo(Eo,zo,t),!0}catch(t){return!1}},Lo=function(t){if(!To(t))return!1;switch(Co(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Fo||!!Ro(No,Ao(t))}catch(t){return!0}};Lo.sham=!0;var Do=!Wo||xo((function(){var t;return Io(Io.call)||!Io(Object)||!Io((function(){t=!0}))||t}))?Lo:Io,Mo=ue,_o=Pe,ko=g,qo=i,Ho=rt,Go=Zt("species"),Jo=function(t){return Ho>=51||!qo((function(){var e=[];return(e.constructor={})[Go]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Vo=O([].slice),$o=Ur,Bo=ho,Uo=Do,Ko=V,Qo=nr,Xo=ar,Yo=M,Zo=function(t,e,n){var r=Mo(e);r in t?_o.f(t,r,ko(0,n)):t[r]=n},ti=Zt,ei=Vo,ni=Jo("slice"),ri=ti("species"),oi=Array,ii=Math.max;$o({target:"Array",proto:!0,forced:!ni},{slice:function(t,e){var n,r,o,i=Yo(this),a=Xo(i),s=Qo(t,a),c=Qo(void 0===e?a:e,a);if(Bo(i)&&(n=i.constructor,(Uo(n)&&(n===oi||Bo(n.prototype))||Ko(n)&&null===(n=n[ri]))&&(n=void 0),n===oi||void 0===n))return ei(i,s,c);for(r=new(void 0===n?oi:n)(ii(c-s,0)),o=0;s<c;s++,o++)s in i&&Zo(r,o,i[s]);return r.length=o,r}});var ai=jo,si=String,ci=function(t){if("Symbol"===ai(t))throw new TypeError("Cannot convert a Symbol value to a string");return si(t)},ui="\t\n\v\f\r \u2028\u2029\ufeff",fi=I,pi=ci,li=ui,hi=O("".replace),di=RegExp("^["+li+"]+"),yi=RegExp("(^|[^"+li+"])["+li+"]+$"),bi=function(t){return function(e){var n=pi(fi(e));return 1&t&&(n=hi(n,di,"")),2&t&&(n=hi(n,yi,"$1")),n}},gi={start:bi(1),end:bi(2),trim:bi(3)},vi=r,mi=i,wi=O,Si=ci,Oi=gi.trim,ji=ui,Pi=vi.parseInt,xi=vi.Symbol,Ti=xi&&xi.iterator,Ci=/^[+-]?0x/i,Ai=wi(Ci.exec),Ei=8!==Pi(ji+"08")||22!==Pi(ji+"0x16")||Ti&&!mi((function(){Pi(Object(Ti))}))?function(t,e){var n=Oi(Si(t));return Pi(n,e>>>0||(Ai(Ci,n)?16:10))}:Pi;Ur({global:!0,forced:parseInt!==Ei},{parseInt:Ei});var zi=T,Wi=O,Ni=function(t){if("Function"===zi(t))return Wi(t)},Ri=i,Fi=Ur,Ii=pr.indexOf,Li=function(t,e){var n=[][t];return!!n&&Ri((function(){n.call(null,e||function(){return 1},1)}))},Di=Ni([].indexOf),Mi=!!Di&&1/Di([1],1,-0)<0;Fi({target:"Array",proto:!0,forced:Mi||!Li("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Mi?Di(this,t,e)||0:Ii(this,t,e)}});var _i=vt,ki=s,qi=Ni(Ni.bind),Hi=ho,Gi=Do,Ji=V,Vi=Zt("species"),$i=Array,Bi=function(t){var e;return Hi(t)&&(e=t.constructor,(Gi(e)&&(e===$i||Hi(e.prototype))||Ji(e)&&null===(e=e[Vi]))&&(e=void 0)),void 0===e?$i:e},Ui=function(t,e){return _i(t),void 0===e?t:ki?qi(t,e):function(){return t.apply(e,arguments)}},Ki=W,Qi=Lt,Xi=ar,Yi=function(t,e){return new(Bi(t))(0===e?0:e)},Zi=O([].push),ta=function(t){var e=1===t,n=2===t,r=3===t,o=4===t,i=6===t,a=7===t,s=5===t||i;return function(c,u,f,p){for(var l,h,d=Qi(c),y=Ki(d),b=Xi(y),g=Ui(u,f),v=0,m=p||Yi,w=e?m(c,b):n||a?m(c,0):void 0;b>v;v++)if((s||v in y)&&(h=g(l=y[v],v,d),t))if(e)w[v]=h;else if(h)switch(t){case 3:return!0;case 5:return l;case 6:return v;case 2:Zi(w,l)}else switch(t){case 4:return!1;case 7:Zi(w,l)}return i?-1:r||o?o:w}},ea={forEach:ta(0),map:ta(1),filter:ta(2),some:ta(3),every:ta(4),find:ta(5),findIndex:ta(6),filterReject:ta(7)}.filter;Ur({target:"Array",proto:!0,forced:!Jo("filter")},{filter:function(t){return ea(this,t,arguments.length>1?arguments[1]:void 0)}});var na=jo,ra=bo?{}.toString:function(){return"[object "+na(this)+"]"};bo||Bn(Object.prototype,"toString",ra,{unsafe:!0});var oa=t.fn.bootstrapTable.utils;Object.assign(t.fn.bootstrapTable.defaults,{usePipeline:!1,pipelineSize:1e3,onCachedDataHit:function(t){return!1},onCachedDataReset:function(t){return!1}}),Object.assign(t.fn.bootstrapTable.events,{"cached-data-hit.bs.table":"onCachedDataHit","cached-data-reset.bs.table":"onCachedDataReset"});var ia=t.fn.bootstrapTable.Constructor,aa=ia.prototype.init,sa=ia.prototype.onSearch,ca=ia.prototype.onSort,ua=ia.prototype.onPageListChange;ia.prototype.init=function(){this.initPipeline();for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];aa.apply(this,Array.prototype.slice.apply(e))},ia.prototype.initPipeline=function(){this.cacheRequestJSON={},this.cacheWindows=[],this.currWindow=0,this.resetCache=!0},ia.prototype.onSearch=function(){this.options.usePipeline&&(this.resetCache=!0),sa.apply(this,Array.prototype.slice.apply(arguments))},ia.prototype.onSort=function(){this.options.usePipeline&&(this.resetCache=!0),ca.apply(this,Array.prototype.slice.apply(arguments))},ia.prototype.onPageListChange=function(e){var n=t(e.currentTarget),r=parseInt(n.text(),10);this.options.pipelineSize=this.calculatePipelineSize(this.options.pipelineSize,r),this.resetCache=!0,ua.apply(this,Array.prototype.slice.apply(arguments))},ia.prototype.calculatePipelineSize=function(t,e){return 0===e?0:Math.ceil(t/e)*e},ia.prototype.setCacheWindows=function(){this.cacheWindows=[];for(var t=this.options.totalRows/this.options.pipelineSize,e=0;e<=t;e++){var n=e*this.options.pipelineSize;this.cacheWindows[e]={lower:n,upper:n+this.options.pipelineSize-1}}},ia.prototype.setCurrWindow=function(t){this.currWindow=0;for(var e=0;e<this.cacheWindows.length;e++)if(this.cacheWindows[e].lower<=t&&t<=this.cacheWindows[e].upper){this.currWindow=e;break}},ia.prototype.drawFromCache=function(t,e){var n=oa.extend(!0,{},this.cacheRequestJSON),r=t-this.cacheWindows[this.currWindow].lower,o=r+e;return n.rows=n.rows.slice(r,o),n},ia.prototype.initServer=function(e,n,r){var o,i={},a=this.header.fields.indexOf(this.options.sortName),s={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};if(this.header.sortNames[a]&&(s.sortName=this.header.sortNames[a]),this.options.pagination&&"server"===this.options.sidePagination&&(s.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,s.pageNumber=this.options.pageNumber),r||this.options.url||this.options.ajax){var c=!0;if("limit"===this.options.queryParamsType&&(s={searchText:s.searchText,sortName:s.sortName,sortOrder:s.sortOrder},this.options.pagination&&"server"===this.options.sidePagination))if(s.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,s.offset=(this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize)*(this.options.pageNumber-1),this.options.usePipeline)if(this.cacheWindows.length){var u=this.cacheWindows[this.currWindow];this.resetCache||s.offset<u.lower||s.offset>u.upper?(c=!0,this.setCurrWindow(s.offset),s.drawOffset=s.offset,s.offset=this.cacheWindows[this.currWindow].lower):c=!1}else c=!0,s.drawOffset=s.offset;else 0===s.limit&&delete s.limit;if(this.resetCache&&(c=!0,this.resetCache=!1),this.options.usePipeline&&c&&(s.drawLimit=s.limit,s.limit=this.options.pipelineSize),!c){var f=this.drawFromCache(s.offset,s.limit);return this.load(f),this.trigger("load-success",f),void this.trigger("cached-data-hit",f)}if(t.isEmptyObject(this.filterColumnsPartial)||(s.filter=JSON.stringify(this.filterColumnsPartial,null)),i=oa.calculateObjectValue(this.options,this.options.queryParams,[s],i),oa.extend(i,n||{}),!1!==i){e||this.$tableLoading.show();var p=this;o=oa.extend({},oa.calculateObjectValue(null,this.options.ajaxOptions),{type:this.options.method,url:r||this.options.url,data:"application/json"===this.options.contentType&&"post"===this.options.method?JSON.stringify(i):i,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(t){t=oa.calculateObjectValue(p.options,p.options.responseHandler,[t],t),p.options.usePipeline&&(p.cacheRequestJSON=oa.extend(!0,{},t),p.options.totalRows=t[p.options.totalField],p.setCacheWindows(),p.setCurrWindow(s.drawOffset),t=p.drawFromCache(s.drawOffset,s.drawLimit),p.trigger("cached-data-reset",t)),p.load(t),p.trigger("load-success",t),e||p.hideLoading()},error:function(t){var n=[];"server"===p.options.sidePagination&&((n={})[p.options.totalField]=0,n[p.options.dataField]=[]),p.load(n),p.trigger("load-error",t.status,t),e||p.hideLoading()}}),this.options.ajax?oa.calculateObjectValue(this,this.options.ajax,[o],null):(this._xhr&&4!==this._xhr.readyState&&this._xhr.abort(),this._xhr=t.ajax(o))}}}}));