UNPKG

16.8 kBJavaScriptView Raw
1/**
2 * bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
3 *
4 * @version v1.20.1
5 * @homepage https://bootstrap-table.com
6 * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
7 * @license MIT
8 */
9
10!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var e=n(t);function r(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function o(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function u(t,n){return u=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t},u(t,n)}function c(t,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function a(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=i(t);if(n){var o=i(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return c(this,e)}}function f(t,n){for(;!Object.prototype.hasOwnProperty.call(t,n)&&null!==(t=i(t)););return t}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,n,e){var r=f(t,n);if(r){var o=Object.getOwnPropertyDescriptor(r,n);return o.get?o.get.call(arguments.length<3?t:e):o.value}},l.apply(this,arguments)}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t,n){return t(n={exports:{}},n.exports),n.exports}var y,b,d=function(t){return t&&t.Math==Math&&t},h=d("object"==typeof globalThis&&globalThis)||d("object"==typeof window&&window)||d("object"==typeof self&&self)||d("object"==typeof s&&s)||function(){return this}()||Function("return this")(),v=function(t){try{return!!t()}catch(t){return!0}},g=!v((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),m=!v((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),w=Function.prototype.call,O=m?w.bind(w):function(){return w.apply(w,arguments)},j={}.propertyIsEnumerable,S=Object.getOwnPropertyDescriptor,P={f:S&&!j.call({1:2},1)?function(t){var n=S(this,t);return!!n&&n.enumerable}:j},T=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},E=Function.prototype,x=E.bind,A=E.call,R=m&&x.bind(A,A),F=m?function(t){return t&&R(t)}:function(t){return t&&function(){return A.apply(t,arguments)}},_=F({}.toString),k=F("".slice),C=function(t){return k(_(t),8,-1)},I=h.Object,M=F("".split),z=v((function(){return!I("z").propertyIsEnumerable(0)}))?function(t){return"String"==C(t)?M(t,""):I(t)}:I,B=h.TypeError,N=function(t){if(null==t)throw B("Can't call method on "+t);return t},D=function(t){return z(N(t))},G=function(t){return"function"==typeof t},L=function(t){return"object"==typeof t?null!==t:G(t)},J=function(t){return G(t)?t:void 0},q=function(t,n){return arguments.length<2?J(h[t]):h[t]&&h[t][n]},W=F({}.isPrototypeOf),U=q("navigator","userAgent")||"",X=h.process,$=h.Deno,K=X&&X.versions||$&&$.version,Q=K&&K.v8;Q&&(b=(y=Q.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!b&&U&&(!(y=U.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=U.match(/Chrome\/(\d+)/))&&(b=+y[1]);var V=b,Y=!!Object.getOwnPropertySymbols&&!v((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&V&&V<41})),H=Y&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Z=h.Object,tt=H?function(t){return"symbol"==typeof t}:function(t){var n=q("Symbol");return G(n)&&W(n.prototype,Z(t))},nt=h.String,et=h.TypeError,rt=function(t){if(G(t))return t;throw et(function(t){try{return nt(t)}catch(t){return"Object"}}(t)+" is not a function")},ot=h.TypeError,it=Object.defineProperty,ut=function(t,n){try{it(h,t,{value:n,configurable:!0,writable:!0})}catch(e){h[t]=n}return n},ct="__core-js_shared__",at=h[ct]||ut(ct,{}),ft=p((function(t){(t.exports=function(t,n){return at[t]||(at[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.22.4",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE",source:"https://github.com/zloirock/core-js"})})),lt=h.Object,st=function(t){return lt(N(t))},pt=F({}.hasOwnProperty),yt=Object.hasOwn||function(t,n){return pt(st(t),n)},bt=0,dt=Math.random(),ht=F(1..toString),vt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ht(++bt+dt,36)},gt=ft("wks"),mt=h.Symbol,wt=mt&&mt.for,Ot=H?mt:mt&&mt.withoutSetter||vt,jt=function(t){if(!yt(gt,t)||!Y&&"string"!=typeof gt[t]){var n="Symbol."+t;Y&&yt(mt,t)?gt[t]=mt[t]:gt[t]=H&&wt?wt(n):Ot(n)}return gt[t]},St=h.TypeError,Pt=jt("toPrimitive"),Tt=function(t,n){if(!L(t)||tt(t))return t;var e,r,o=null==(e=t[Pt])?void 0:rt(e);if(o){if(void 0===n&&(n="default"),r=O(o,t,n),!L(r)||tt(r))return r;throw St("Can't convert object to primitive value")}return void 0===n&&(n="number"),function(t,n){var e,r;if("string"===n&&G(e=t.toString)&&!L(r=O(e,t)))return r;if(G(e=t.valueOf)&&!L(r=O(e,t)))return r;if("string"!==n&&G(e=t.toString)&&!L(r=O(e,t)))return r;throw ot("Can't convert object to primitive value")}(t,n)},Et=function(t){var n=Tt(t,"string");return tt(n)?n:n+""},xt=h.document,At=L(xt)&&L(xt.createElement),Rt=function(t){return At?xt.createElement(t):{}},Ft=!g&&!v((function(){return 7!=Object.defineProperty(Rt("div"),"a",{get:function(){return 7}}).a})),_t=Object.getOwnPropertyDescriptor,kt={f:g?_t:function(t,n){if(t=D(t),n=Et(n),Ft)try{return _t(t,n)}catch(t){}if(yt(t,n))return T(!O(P.f,t,n),t[n])}},Ct=g&&v((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),It=h.String,Mt=h.TypeError,zt=function(t){if(L(t))return t;throw Mt(It(t)+" is not an object")},Bt=h.TypeError,Nt=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,Gt="enumerable",Lt="configurable",Jt="writable",qt={f:g?Ct?function(t,n,e){if(zt(t),n=Et(n),zt(e),"function"==typeof t&&"prototype"===n&&"value"in e&&Jt in e&&!e.writable){var r=Dt(t,n);r&&r.writable&&(t[n]=e.value,e={configurable:Lt in e?e.configurable:r.configurable,enumerable:Gt in e?e.enumerable:r.enumerable,writable:!1})}return Nt(t,n,e)}:Nt:function(t,n,e){if(zt(t),n=Et(n),zt(e),Ft)try{return Nt(t,n,e)}catch(t){}if("get"in e||"set"in e)throw Bt("Accessors not supported");return"value"in e&&(t[n]=e.value),t}},Wt=g?function(t,n,e){return qt.f(t,n,T(1,e))}:function(t,n,e){return t[n]=e,t},Ut=Function.prototype,Xt=g&&Object.getOwnPropertyDescriptor,$t=yt(Ut,"name"),Kt={EXISTS:$t,PROPER:$t&&"something"===function(){}.name,CONFIGURABLE:$t&&(!g||g&&Xt(Ut,"name").configurable)},Qt=F(Function.toString);G(at.inspectSource)||(at.inspectSource=function(t){return Qt(t)});var Vt,Yt,Ht,Zt=at.inspectSource,tn=h.WeakMap,nn=G(tn)&&/native code/.test(Zt(tn)),en=ft("keys"),rn=function(t){return en[t]||(en[t]=vt(t))},on={},un="Object already initialized",cn=h.TypeError,an=h.WeakMap;if(nn||at.state){var fn=at.state||(at.state=new an),ln=F(fn.get),sn=F(fn.has),pn=F(fn.set);Vt=function(t,n){if(sn(fn,t))throw new cn(un);return n.facade=t,pn(fn,t,n),n},Yt=function(t){return ln(fn,t)||{}},Ht=function(t){return sn(fn,t)}}else{var yn=rn("state");on[yn]=!0,Vt=function(t,n){if(yt(t,yn))throw new cn(un);return n.facade=t,Wt(t,yn,n),n},Yt=function(t){return yt(t,yn)?t[yn]:{}},Ht=function(t){return yt(t,yn)}}var bn={set:Vt,get:Yt,has:Ht,enforce:function(t){return Ht(t)?Yt(t):Vt(t,{})},getterFor:function(t){return function(n){var e;if(!L(n)||(e=Yt(n)).type!==t)throw cn("Incompatible receiver, "+t+" required");return e}}},dn=p((function(t){var n=qt.f,e=Kt.CONFIGURABLE,r=bn.enforce,o=bn.get,i=!v((function(){return 8!==n((function(){}),"length",{value:8}).length})),u=String(String).split("String"),c=t.exports=function(t,o,c){"Symbol("===String(o).slice(0,7)&&(o="["+String(o).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),c&&c.getter&&(o="get "+o),c&&c.setter&&(o="set "+o),(!yt(t,"name")||e&&t.name!==o)&&n(t,"name",{value:o,configurable:!0}),i&&c&&yt(c,"arity")&&t.length!==c.arity&&n(t,"length",{value:c.arity});var a=r(t);return yt(a,"source")||(a.source=u.join("string"==typeof o?o:"")),t};Function.prototype.toString=c((function(){return G(this)&&o(this).source||Zt(this)}),"toString")})),hn=function(t,n,e,r){var o=!!r&&!!r.unsafe,i=!!r&&!!r.enumerable,u=!!r&&!!r.noTargetGet,c=r&&void 0!==r.name?r.name:n;return G(e)&&dn(e,c,r),t===h?(i?t[n]=e:ut(n,e),t):(o?!u&&t[n]&&(i=!0):delete t[n],i?t[n]=e:Wt(t,n,e),t)},vn=Math.ceil,gn=Math.floor,mn=function(t){var n=+t;return n!=n||0===n?0:(n>0?gn:vn)(n)},wn=Math.max,On=Math.min,jn=Math.min,Sn=function(t){return(n=t.length)>0?jn(mn(n),9007199254740991):0;var n},Pn=function(t){return function(n,e,r){var o,i=D(n),u=Sn(i),c=function(t,n){var e=mn(t);return e<0?wn(e+n,0):On(e,n)}(r,u);if(t&&e!=e){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===e)return t||c||0;return!t&&-1}},Tn={includes:Pn(!0),indexOf:Pn(!1)}.indexOf,En=F([].push),xn=function(t,n){var e,r=D(t),o=0,i=[];for(e in r)!yt(on,e)&&yt(r,e)&&En(i,e);for(;n.length>o;)yt(r,e=n[o++])&&(~Tn(i,e)||En(i,e));return i},An=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Rn=An.concat("length","prototype"),Fn={f:Object.getOwnPropertyNames||function(t){return xn(t,Rn)}},_n={f:Object.getOwnPropertySymbols},kn=F([].concat),Cn=q("Reflect","ownKeys")||function(t){var n=Fn.f(zt(t)),e=_n.f;return e?kn(n,e(t)):n},In=function(t,n,e){for(var r=Cn(n),o=qt.f,i=kt.f,u=0;u<r.length;u++){var c=r[u];yt(t,c)||e&&yt(e,c)||o(t,c,i(n,c))}},Mn=/#|\.prototype\./,zn=function(t,n){var e=Nn[Bn(t)];return e==Gn||e!=Dn&&(G(n)?v(n):!!n)},Bn=zn.normalize=function(t){return String(t).replace(Mn,".").toLowerCase()},Nn=zn.data={},Dn=zn.NATIVE="N",Gn=zn.POLYFILL="P",Ln=zn,Jn=kt.f,qn=function(t,n){var e,r,o,i,u,c=t.target,a=t.global,f=t.stat;if(e=a?h:f?h[c]||ut(c,{}):(h[c]||{}).prototype)for(r in n){if(i=n[r],o=t.noTargetGet?(u=Jn(e,r))&&u.value:e[r],!Ln(a?r:c+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;In(i,o)}(t.sham||o&&o.sham)&&Wt(i,"sham",!0),hn(e,r,i,t)}},Wn=Array.isArray||function(t){return"Array"==C(t)},Un=function(t,n,e){var r=Et(n);r in t?qt.f(t,r,T(0,e)):t[r]=e},Xn={};Xn[jt("toStringTag")]="z";var $n="[object z]"===String(Xn),Kn=jt("toStringTag"),Qn=h.Object,Vn="Arguments"==C(function(){return arguments}()),Yn=$n?C:function(t){var n,e,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=Qn(t),Kn))?e:Vn?C(n):"Object"==(r=C(n))&&G(n.callee)?"Arguments":r},Hn=function(){},Zn=[],te=q("Reflect","construct"),ne=/^\s*(?:class|function)\b/,ee=F(ne.exec),re=!ne.exec(Hn),oe=function(t){if(!G(t))return!1;try{return te(Hn,Zn,t),!0}catch(t){return!1}},ie=function(t){if(!G(t))return!1;switch(Yn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return re||!!ee(ne,Zt(t))}catch(t){return!0}};ie.sham=!0;var ue,ce=!te||v((function(){var t;return oe(oe.call)||!oe(Object)||!oe((function(){t=!0}))||t}))?ie:oe,ae=jt("species"),fe=h.Array,le=function(t,n){return new(function(t){var n;return Wn(t)&&(n=t.constructor,(ce(n)&&(n===fe||Wn(n.prototype))||L(n)&&null===(n=n[ae]))&&(n=void 0)),void 0===n?fe:n}(t))(0===n?0:n)},se=jt("species"),pe=jt("isConcatSpreadable"),ye=9007199254740991,be="Maximum allowed index exceeded",de=h.TypeError,he=V>=51||!v((function(){var t=[];return t[pe]=!1,t.concat()[0]!==t})),ve=(ue="concat",V>=51||!v((function(){var t=[];return(t.constructor={})[se]=function(){return{foo:1}},1!==t[ue](Boolean).foo}))),ge=function(t){if(!L(t))return!1;var n=t[pe];return void 0!==n?!!n:Wn(t)};qn({target:"Array",proto:!0,arity:1,forced:!he||!ve},{concat:function(t){var n,e,r,o,i,u=st(this),c=le(u,0),a=0;for(n=-1,r=arguments.length;n<r;n++)if(ge(i=-1===n?u:arguments[n])){if(a+(o=Sn(i))>ye)throw de(be);for(e=0;e<o;e++,a++)e in i&&Un(c,a,i[e])}else{if(a>=ye)throw de(be);Un(c,a++,i)}return c.length=a,c}});var me,we=F(F.bind),Oe=F([].push),je=function(t){var n=1==t,e=2==t,r=3==t,o=4==t,i=6==t,u=7==t,c=5==t||i;return function(a,f,l,s){for(var p,y,b=st(a),d=z(b),h=function(t,n){return rt(t),void 0===n?t:m?we(t,n):function(){return t.apply(n,arguments)}}(f,l),v=Sn(d),g=0,w=s||le,O=n?w(a,v):e||u?w(a,0):void 0;v>g;g++)if((c||g in d)&&(y=h(p=d[g],g,b),t))if(n)O[g]=y;else if(y)switch(t){case 3:return!0;case 5:return p;case 6:return g;case 2:Oe(O,p)}else switch(t){case 4:return!1;case 7:Oe(O,p)}return i?-1:r||o?o:O}},Se={forEach:je(0),map:je(1),filter:je(2),some:je(3),every:je(4),find:je(5),findIndex:je(6),filterReject:je(7)},Pe=Object.keys||function(t){return xn(t,An)},Te=g&&!Ct?Object.defineProperties:function(t,n){zt(t);for(var e,r=D(n),o=Pe(n),i=o.length,u=0;i>u;)qt.f(t,e=o[u++],r[e]);return t},Ee={f:Te},xe=q("document","documentElement"),Ae=rn("IE_PROTO"),Re=function(){},Fe=function(t){return"<script>"+t+"</"+"script>"},_e=function(t){t.write(Fe("")),t.close();var n=t.parentWindow.Object;return t=null,n},ke=function(){try{me=new ActiveXObject("htmlfile")}catch(t){}var t,n;ke="undefined"!=typeof document?document.domain&&me?_e(me):((n=Rt("iframe")).style.display="none",xe.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write(Fe("document.F=Object")),t.close(),t.F):_e(me);for(var e=An.length;e--;)delete ke.prototype[An[e]];return ke()};on[Ae]=!0;var Ce=Object.create||function(t,n){var e;return null!==t?(Re.prototype=zt(t),e=new Re,Re.prototype=null,e[Ae]=t):e=ke(),void 0===n?e:Ee.f(e,n)},Ie=jt("unscopables"),Me=Array.prototype;null==Me[Ie]&&qt.f(Me,Ie,{configurable:!0,value:Ce(null)});var ze,Be=Se.find,Ne="find",De=!0;Ne in[]&&Array(1).find((function(){De=!1})),qn({target:"Array",proto:!0,forced:De},{find:function(t){return Be(this,t,arguments.length>1?arguments[1]:void 0)}}),ze=Ne,Me[Ie][ze]=!0;var Ge=$n?{}.toString:function(){return"[object "+Yn(this)+"]"};$n||hn(Object.prototype,"toString",Ge,{unsafe:!0});var Le=e.default.fn.bootstrapTable.utils;e.default.extend(e.default.fn.bootstrapTable.defaults,{showJumpTo:!1,showJumpToByPages:0}),e.default.extend(e.default.fn.bootstrapTable.locales,{formatJumpTo:function(){return"GO"}}),e.default.extend(e.default.fn.bootstrapTable.defaults,e.default.fn.bootstrapTable.locales),e.default.BootstrapTable=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&u(t,n)}(p,t);var n,c,f,s=a(p);function p(){return r(this,p),s.apply(this,arguments)}return n=p,c=[{key:"initPagination",value:function(){for(var t,n=this,r=arguments.length,o=new Array(r),u=0;u<r;u++)o[u]=arguments[u];if((t=l(i(p.prototype),"initPagination",this)).call.apply(t,[this].concat(o)),this.options.showJumpTo&&this.totalPages>=this.options.showJumpToByPages){var c=this.$pagination.find("> .pagination"),a=c.find(".page-jump-to");if(!a.length){var f=(a=e.default(Le.sprintf(this.constants.html.inputGroup,'<input type="number"\n class="'.concat(this.constants.classes.input).concat(Le.sprintf(" %s%s",this.constants.classes.inputPrefix,this.options.iconSize),'"\n value="').concat(this.options.pageNumber,'"\n min="1"\n max="').concat(this.totalPages,'">'),'<button class="'.concat(this.constants.buttonsClass,'" type="button">\n ').concat(this.options.formatJumpTo(),"\n </button>"))).addClass("page-jump-to").appendTo(c)).find("input");a.find("button").click((function(){n.selectPage(+f.val())})),f.keyup((function(t){""!==f.val()&&(13!==t.keyCode?+f.val()<+f.attr("min")?f.val(f.attr("min")):+f.val()>+f.attr("max")&&f.val(f.attr("max")):n.selectPage(+f.val()))})),f.blur((function(){""===f.val()&&f.val(n.options.pageNumber)}))}}}}],c&&o(n.prototype,c),f&&o(n,f),Object.defineProperty(n,"prototype",{writable:!1}),p}(e.default.BootstrapTable)}));