UNPKG

41 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.18.2
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 o=n(t),e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t,n){return t(n={exports:{}},n.exports),n.exports}var i=function(t){return t&&t.Math==Math&&t},a=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||Function("return this")(),s=function(t){try{return!!t()}catch(t){return!0}},l=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),d={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,c={f:u&&!d.call({1:2},1)?function(t){var n=u(this,t);return!!n&&n.enumerable}:d},f=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},b={}.toString,p=function(t){return b.call(t).slice(8,-1)},v="".split,h=s((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==p(t)?v.call(t,""):Object(t)}:Object,m=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},y=function(t){return h(m(t))},g=function(t){return"object"==typeof t?null!==t:"function"==typeof t},S=function(t,n){if(!g(t))return t;var o,e;if(n&&"function"==typeof(o=t.toString)&&!g(e=o.call(t)))return e;if("function"==typeof(o=t.valueOf)&&!g(e=o.call(t)))return e;if(!n&&"function"==typeof(o=t.toString)&&!g(e=o.call(t)))return e;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,M=function(t,n){return w.call(t,n)},O=a.document,x=g(O)&&g(O.createElement),P=function(t){return x?O.createElement(t):{}},j=!l&&!s((function(){return 7!=Object.defineProperty(P("div"),"a",{get:function(){return 7}}).a})),T=Object.getOwnPropertyDescriptor,A={f:l?T:function(t,n){if(t=y(t),n=S(n,!0),j)try{return T(t,n)}catch(t){}if(M(t,n))return f(!c.f.call(t,n),t[n])}},C=function(t){if(!g(t))throw TypeError(String(t)+" is not an object");return t},$=Object.defineProperty,L={f:l?$:function(t,n,o){if(C(t),n=S(n,!0),C(o),j)try{return $(t,n,o)}catch(t){}if("get"in o||"set"in o)throw TypeError("Accessors not supported");return"value"in o&&(t[n]=o.value),t}},E=l?function(t,n,o){return L.f(t,n,f(1,o))}:function(t,n,o){return t[n]=o,t},k=function(t,n){try{E(a,t,n)}catch(o){a[t]=n}return n},B="__core-js_shared__",N=a[B]||k(B,{}),D=Function.toString;"function"!=typeof N.inspectSource&&(N.inspectSource=function(t){return D.call(t)});var F,R,z,I=N.inspectSource,q=a.WeakMap,_="function"==typeof q&&/native code/.test(I(q)),V=r((function(t){(t.exports=function(t,n){return N[t]||(N[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.8.1",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),W=0,G=Math.random(),K=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++W+G).toString(36)},Q=V("keys"),U=function(t){return Q[t]||(Q[t]=K(t))},X={},Y=a.WeakMap;if(_){var H=N.state||(N.state=new Y),J=H.get,Z=H.has,tt=H.set;F=function(t,n){return n.facade=t,tt.call(H,t,n),n},R=function(t){return J.call(H,t)||{}},z=function(t){return Z.call(H,t)}}else{var nt=U("state");X[nt]=!0,F=function(t,n){return n.facade=t,E(t,nt,n),n},R=function(t){return M(t,nt)?t[nt]:{}},z=function(t){return M(t,nt)}}var ot,et,rt={set:F,get:R,has:z,enforce:function(t){return z(t)?R(t):F(t,{})},getterFor:function(t){return function(n){var o;if(!g(n)||(o=R(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return o}}},it=r((function(t){var n=rt.get,o=rt.enforce,e=String(String).split("String");(t.exports=function(t,n,r,i){var s,l=!!i&&!!i.unsafe,d=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof r&&("string"!=typeof n||M(r,"name")||E(r,"name",n),(s=o(r)).source||(s.source=e.join("string"==typeof n?n:""))),t!==a?(l?!u&&t[n]&&(d=!0):delete t[n],d?t[n]=r:E(t,n,r)):d?t[n]=r:k(n,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&n(this).source||I(this)}))})),at=a,st=function(t){return"function"==typeof t?t:void 0},lt=function(t,n){return arguments.length<2?st(at[t])||st(a[t]):at[t]&&at[t][n]||a[t]&&a[t][n]},dt=Math.ceil,ut=Math.floor,ct=function(t){return isNaN(t=+t)?0:(t>0?ut:dt)(t)},ft=Math.min,bt=function(t){return t>0?ft(ct(t),9007199254740991):0},pt=Math.max,vt=Math.min,ht=function(t,n){var o=ct(t);return o<0?pt(o+n,0):vt(o,n)},mt=function(t){return function(n,o,e){var r,i=y(n),a=bt(i.length),s=ht(e,a);if(t&&o!=o){for(;a>s;)if((r=i[s++])!=r)return!0}else for(;a>s;s++)if((t||s in i)&&i[s]===o)return t||s||0;return!t&&-1}},yt={includes:mt(!0),indexOf:mt(!1)},gt=yt.indexOf,St=function(t,n){var o,e=y(t),r=0,i=[];for(o in e)!M(X,o)&&M(e,o)&&i.push(o);for(;n.length>r;)M(e,o=n[r++])&&(~gt(i,o)||i.push(o));return i},wt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Mt=wt.concat("length","prototype"),Ot={f:Object.getOwnPropertyNames||function(t){return St(t,Mt)}},xt={f:Object.getOwnPropertySymbols},Pt=lt("Reflect","ownKeys")||function(t){var n=Ot.f(C(t)),o=xt.f;return o?n.concat(o(t)):n},jt=function(t,n){for(var o=Pt(n),e=L.f,r=A.f,i=0;i<o.length;i++){var a=o[i];M(t,a)||e(t,a,r(n,a))}},Tt=/#|\.prototype\./,At=function(t,n){var o=$t[Ct(t)];return o==Et||o!=Lt&&("function"==typeof n?s(n):!!n)},Ct=At.normalize=function(t){return String(t).replace(Tt,".").toLowerCase()},$t=At.data={},Lt=At.NATIVE="N",Et=At.POLYFILL="P",kt=At,Bt=A.f,Nt=function(t,n){var o,e,r,i,s,l=t.target,d=t.global,u=t.stat;if(o=d?a:u?a[l]||k(l,{}):(a[l]||{}).prototype)for(e in n){if(i=n[e],r=t.noTargetGet?(s=Bt(o,e))&&s.value:o[e],!kt(d?e:l+(u?".":"#")+e,t.forced)&&void 0!==r){if(typeof i==typeof r)continue;jt(i,r)}(t.sham||r&&r.sham)&&E(i,"sham",!0),it(o,e,i,t)}},Dt=Array.isArray||function(t){return"Array"==p(t)},Ft=function(t){return Object(m(t))},Rt=function(t,n,o){var e=S(n);e in t?L.f(t,e,f(0,o)):t[e]=o},zt=!!Object.getOwnPropertySymbols&&!s((function(){return!String(Symbol())})),It=zt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,qt=V("wks"),_t=a.Symbol,Vt=It?_t:_t&&_t.withoutSetter||K,Wt=function(t){return M(qt,t)||(zt&&M(_t,t)?qt[t]=_t[t]:qt[t]=Vt("Symbol."+t)),qt[t]},Gt=Wt("species"),Kt=function(t,n){var o;return Dt(t)&&("function"!=typeof(o=t.constructor)||o!==Array&&!Dt(o.prototype)?g(o)&&null===(o=o[Gt])&&(o=void 0):o=void 0),new(void 0===o?Array:o)(0===n?0:n)},Qt=lt("navigator","userAgent")||"",Ut=a.process,Xt=Ut&&Ut.versions,Yt=Xt&&Xt.v8;Yt?et=(ot=Yt.split("."))[0]+ot[1]:Qt&&(!(ot=Qt.match(/Edge\/(\d+)/))||ot[1]>=74)&&(ot=Qt.match(/Chrome\/(\d+)/))&&(et=ot[1]);var Ht=et&&+et,Jt=Wt("species"),Zt=function(t){return Ht>=51||!s((function(){var n=[];return(n.constructor={})[Jt]=function(){return{foo:1}},1!==n[t](Boolean).foo}))},tn=Wt("isConcatSpreadable"),nn=9007199254740991,on="Maximum allowed index exceeded",en=Ht>=51||!s((function(){var t=[];return t[tn]=!1,t.concat()[0]!==t})),rn=Zt("concat"),an=function(t){if(!g(t))return!1;var n=t[tn];return void 0!==n?!!n:Dt(t)};Nt({target:"Array",proto:!0,forced:!en||!rn},{concat:function(t){var n,o,e,r,i,a=Ft(this),s=Kt(a,0),l=0;for(n=-1,e=arguments.length;n<e;n++)if(an(i=-1===n?a:arguments[n])){if(l+(r=bt(i.length))>nn)throw TypeError(on);for(o=0;o<r;o++,l++)o in i&&Rt(s,l,i[o])}else{if(l>=nn)throw TypeError(on);Rt(s,l++,i)}return s.length=l,s}});var sn,ln=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},dn=[].push,un=function(t){var n=1==t,o=2==t,e=3==t,r=4==t,i=6==t,a=7==t,s=5==t||i;return function(l,d,u,c){for(var f,b,p=Ft(l),v=h(p),m=function(t,n,o){if(ln(t),void 0===n)return t;switch(o){case 0:return function(){return t.call(n)};case 1:return function(o){return t.call(n,o)};case 2:return function(o,e){return t.call(n,o,e)};case 3:return function(o,e,r){return t.call(n,o,e,r)}}return function(){return t.apply(n,arguments)}}(d,u,3),y=bt(v.length),g=0,S=c||Kt,w=n?S(l,y):o||a?S(l,0):void 0;y>g;g++)if((s||g in v)&&(b=m(f=v[g],g,p),t))if(n)w[g]=b;else if(b)switch(t){case 3:return!0;case 5:return f;case 6:return g;case 2:dn.call(w,f)}else switch(t){case 4:return!1;case 7:dn.call(w,f)}return i?-1:e||r?r:w}},cn={forEach:un(0),map:un(1),filter:un(2),some:un(3),every:un(4),find:un(5),findIndex:un(6),filterOut:un(7)},fn=Object.keys||function(t){return St(t,wt)},bn=l?Object.defineProperties:function(t,n){C(t);for(var o,e=fn(n),r=e.length,i=0;r>i;)L.f(t,o=e[i++],n[o]);return t},pn=lt("document","documentElement"),vn=U("IE_PROTO"),hn=function(){},mn=function(t){return"<script>"+t+"</"+"script>"},yn=function(){try{sn=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,n;yn=sn?function(t){t.write(mn("")),t.close();var n=t.parentWindow.Object;return t=null,n}(sn):((n=P("iframe")).style.display="none",pn.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write(mn("document.F=Object")),t.close(),t.F);for(var o=wt.length;o--;)delete yn.prototype[wt[o]];return yn()};X[vn]=!0;var gn=Object.create||function(t,n){var o;return null!==t?(hn.prototype=C(t),o=new hn,hn.prototype=null,o[vn]=t):o=yn(),void 0===n?o:bn(o,n)},Sn=Wt("unscopables"),wn=Array.prototype;null==wn[Sn]&&L.f(wn,Sn,{configurable:!0,value:gn(null)});var Mn,On=Object.defineProperty,xn={},Pn=function(t){throw t},jn=function(t,n){if(M(xn,t))return xn[t];n||(n={});var o=[][t],e=!!M(n,"ACCESSORS")&&n.ACCESSORS,r=M(n,0)?n[0]:Pn,i=M(n,1)?n[1]:void 0;return xn[t]=!!o&&!s((function(){if(e&&!l)return!0;var t={length:-1};e?On(t,1,{enumerable:!0,get:Pn}):t[1]=1,o.call(t,r,i)}))},Tn=cn.find,An="find",Cn=!0,$n=jn(An);An in[]&&Array(1).find((function(){Cn=!1})),Nt({target:"Array",proto:!0,forced:Cn||!$n},{find:function(t){return Tn(this,t,arguments.length>1?arguments[1]:void 0)}}),Mn=An,wn[Sn][Mn]=!0;var Ln=function(t,n){var o=[][t];return!!o&&s((function(){o.call(null,n||function(){throw 1},1)}))},En=yt.indexOf,kn=[].indexOf,Bn=!!kn&&1/[1].indexOf(1,-0)<0,Nn=Ln("indexOf"),Dn=jn("indexOf",{ACCESSORS:!0,1:0});Nt({target:"Array",proto:!0,forced:Bn||!Nn||!Dn},{indexOf:function(t){return Bn?kn.apply(this,arguments)||0:En(this,t,arguments.length>1?arguments[1]:void 0)}});var Fn=cn.map,Rn=Zt("map"),zn=jn("map");Nt({target:"Array",proto:!0,forced:!Rn||!zn},{map:function(t){return Fn(this,t,arguments.length>1?arguments[1]:void 0)}});var In=Zt("slice"),qn=jn("slice",{ACCESSORS:!0,0:0,1:2}),_n=Wt("species"),Vn=[].slice,Wn=Math.max;Nt({target:"Array",proto:!0,forced:!In||!qn},{slice:function(t,n){var o,e,r,i=y(this),a=bt(i.length),s=ht(t,a),l=ht(void 0===n?a:n,a);if(Dt(i)&&("function"!=typeof(o=i.constructor)||o!==Array&&!Dt(o.prototype)?g(o)&&null===(o=o[_n])&&(o=void 0):o=void 0,o===Array||void 0===o))return Vn.call(i,s,l);for(e=new(void 0===o?Array:o)(Wn(l-s,0)),r=0;s<l;s++,r++)s in i&&Rt(e,r,i[s]);return e.length=r,e}});var Gn=[],Kn=Gn.sort,Qn=s((function(){Gn.sort(void 0)})),Un=s((function(){Gn.sort(null)})),Xn=Ln("sort");Nt({target:"Array",proto:!0,forced:Qn||!Un||!Xn},{sort:function(t){return void 0===t?Kn.call(Ft(this)):Kn.call(Ft(this),ln(t))}});var Yn=Zt("splice"),Hn=jn("splice",{ACCESSORS:!0,0:0,1:2}),Jn=Math.max,Zn=Math.min,to=9007199254740991,no="Maximum allowed length exceeded";Nt({target:"Array",proto:!0,forced:!Yn||!Hn},{splice:function(t,n){var o,e,r,i,a,s,l=Ft(this),d=bt(l.length),u=ht(t,d),c=arguments.length;if(0===c?o=e=0:1===c?(o=0,e=d-u):(o=c-2,e=Zn(Jn(ct(n),0),d-u)),d+o-e>to)throw TypeError(no);for(r=Kt(l,e),i=0;i<e;i++)(a=u+i)in l&&Rt(r,i,l[a]);if(r.length=e,o<e){for(i=u;i<d-e;i++)s=i+o,(a=i+e)in l?l[s]=l[a]:delete l[s];for(i=d;i>d-e+o;i--)delete l[i-1]}else if(o>e)for(i=d-e;i>u;i--)s=i+o-1,(a=i+e-1)in l?l[s]=l[a]:delete l[s];for(i=0;i<o;i++)l[i+u]=arguments[i+2];return l.length=d-e+o,r}});var oo=Object.assign,eo=Object.defineProperty,ro=!oo||s((function(){if(l&&1!==oo({b:1},oo(eo({},"a",{enumerable:!0,get:function(){eo(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},n={},o=Symbol(),e="abcdefghijklmnopqrst";return t[o]=7,e.split("").forEach((function(t){n[t]=t})),7!=oo({},t)[o]||fn(oo({},n)).join("")!=e}))?function(t,n){for(var o=Ft(t),e=arguments.length,r=1,i=xt.f,a=c.f;e>r;)for(var s,d=h(arguments[r++]),u=i?fn(d).concat(i(d)):fn(d),f=u.length,b=0;f>b;)s=u[b++],l&&!a.call(d,s)||(o[s]=d[s]);return o}:oo;Nt({target:"Object",stat:!0,forced:Object.assign!==ro},{assign:ro});var io={};io[Wt("toStringTag")]="z";var ao="[object z]"===String(io),so=Wt("toStringTag"),lo="Arguments"==p(function(){return arguments}()),uo=ao?p:function(t){var n,o,e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(o=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),so))?o:lo?p(n):"Object"==(e=p(n))&&"function"==typeof n.callee?"Arguments":e},co=ao?{}.toString:function(){return"[object "+uo(this)+"]"};ao||it(Object.prototype,"toString",co,{unsafe:!0});var fo="\t\n\v\f\r                 \u2028\u2029\ufeff",bo="["+fo+"]",po=RegExp("^"+bo+bo+"*"),vo=RegExp(bo+bo+"*$"),ho=function(t){return function(n){var o=String(m(n));return 1&t&&(o=o.replace(po,"")),2&t&&(o=o.replace(vo,"")),o}},mo={start:ho(1),end:ho(2),trim:ho(3)}.trim,yo=a.parseFloat,go=1/yo(fo+"-0")!=-1/0?function(t){var n=mo(String(t)),o=yo(n);return 0===o&&"-"==n.charAt(0)?-0:o}:yo;Nt({global:!0,forced:parseFloat!=go},{parseFloat:go});var So=function(){var t=C(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n},wo="toString",Mo=RegExp.prototype,Oo=Mo.toString,xo=s((function(){return"/a/b"!=Oo.call({source:"a",flags:"b"})})),Po=Oo.name!=wo;function jo(t){return(jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}(xo||Po)&&it(RegExp.prototype,wo,(function(){var t=C(this),n=String(t.source),o=t.flags;return"/"+n+"/"+String(void 0===o&&t instanceof RegExp&&!("flags"in Mo)?So.call(t):o)}),{unsafe:!0});var To=!1,Ao=o.default.fn.bootstrapTable.utils;o.default.extend(o.default.fn.bootstrapTable.defaults.icons,{plus:{bootstrap3:"glyphicon-plus",bootstrap4:"fa-plus",bootstrap5:"fa-plus",semantic:"fa-plus",materialize:"plus",foundation:"fa-plus",bulma:"fa-plus","bootstrap-table":"icon-plus"}[o.default.fn.bootstrapTable.theme]||"fa-clock",minus:{bootstrap3:"glyphicon-minus",bootstrap4:"fa-minus",bootstrap5:"fa-minus",semantic:"fa-minus",materialize:"minus",foundation:"fa-minus",bulma:"fa-minus","bootstrap-table":"icon-minus"}[o.default.fn.bootstrapTable.theme]||"fa-clock",sort:{bootstrap3:"glyphicon-sort",bootstrap4:"fa-sort",bootstrap5:"fa-sort",semantic:"fa-sort",materialize:"sort",foundation:"fa-sort",bulma:"fa-sort","bootstrap-table":"icon-sort-amount-asc"}[o.default.fn.bootstrapTable.theme]||"fa-clock"});var Co={bootstrap3:{html:{multipleSortModal:'\n <div class="modal fade" id="%s" tabindex="-1" role="dialog" aria-labelledby="%sLabel" aria-hidden="true">\n <div class="modal-dialog">\n <div class="modal-content">\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>\n <h4 class="modal-title" id="%sLabel">%s</h4>\n </div>\n <div class="modal-body">\n <div class="bootstrap-table">\n <div class="fixed-table-toolbar">\n <div class="bars">\n <div id="toolbar">\n <button id="add" type="button" class="btn btn-default">%s %s</button>\n <button id="delete" type="button" class="btn btn-default" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class="fixed-table-container">\n <table id="multi-sort" class="table">\n <thead>\n <tr>\n <th></th>\n <th><div class="th-inner">%s</div></th>\n <th><div class="th-inner">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class="modal-footer">\n <button type="button" class="btn btn-default" data-dismiss="modal">%s</button>\n <button type="button" class="btn btn-primary multi-sort-order-button">%s</button>\n </div>\n </div>\n </div>\n </div>\n ',multipleSortButton:'<button class="multi-sort btn btn-default" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',multipleSortSelect:'<select class="%s %s form-control">'}},bootstrap4:{html:{multipleSortModal:'\n <div class="modal fade" id="%s" tabindex="-1" role="dialog" aria-labelledby="%sLabel" aria-hidden="true">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-header">\n <h5 class="modal-title" id="%sLabel">%s</h5>\n <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n <span aria-hidden="true">&times;</span>\n </button>\n </div>\n <div class="modal-body">\n <div class="bootstrap-table">\n <div class="fixed-table-toolbar">\n <div class="bars">\n <div id="toolbar" class="pb-3">\n <button id="add" type="button" class="btn btn-secondary">%s %s</button>\n <button id="delete" type="button" class="btn btn-secondary" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class="fixed-table-container">\n <table id="multi-sort" class="table">\n <thead>\n <tr>\n <th></th>\n <th><div class="th-inner">%s</div></th>\n <th><div class="th-inner">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class="modal-footer">\n <button type="button" class="btn btn-secondary" data-dismiss="modal">%s</button>\n <button type="button" class="btn btn-primary multi-sort-order-button">%s</button>\n </div>\n </div>\n </div>\n </div>\n ',multipleSortButton:'<button class="multi-sort btn btn-secondary" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',multipleSortSelect:'<select class="%s %s form-control">'}},bootstrap5:{html:{multipleSortModal:'\n <div class="modal fade" id="%s" tabindex="-1" role="dialog" aria-labelledby="%sLabel" aria-hidden="true">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-header">\n <h5 class="modal-title" id="%sLabel">%s</h5>\n <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>\n </div>\n <div class="modal-body">\n <div class="bootstrap-table">\n <div class="fixed-table-toolbar">\n <div class="bars">\n <div id="toolbar" class="pb-3">\n <button id="add" type="button" class="btn btn-secondary">%s %s</button>\n <button id="delete" type="button" class="btn btn-secondary" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class="fixed-table-container">\n <table id="multi-sort" class="table">\n <thead>\n <tr>\n <th></th>\n <th><div class="th-inner">%s</div></th>\n <th><div class="th-inner">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class="modal-footer">\n <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">%s</button>\n <button type="button" class="btn btn-primary multi-sort-order-button">%s</button>\n </div>\n </div>\n </div>\n </div>\n ',multipleSortButton:'<button class="multi-sort btn btn-secondary" type="button" data-bs-toggle="modal" data-target="#%s" title="%s">%s</button>',multipleSortSelect:'<select class="%s %s form-control">'}},semantic:{html:{multipleSortModal:'\n <div class="ui modal tiny" id="%s" aria-labelledby="%sLabel" aria-hidden="true">\n <i class="close icon"></i>\n <div class="header" id="%sLabel">\n %s\n </div>\n <div class="image content">\n <div class="bootstrap-table">\n <div class="fixed-table-toolbar">\n <div class="bars">\n <div id="toolbar" class="pb-3">\n <button id="add" type="button" class="ui button">%s %s</button>\n <button id="delete" type="button" class="ui button" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class="fixed-table-container">\n <table id="multi-sort" class="table">\n <thead>\n <tr>\n <th></th>\n <th><div class="th-inner">%s</div></th>\n <th><div class="th-inner">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class="actions">\n <div class="ui button deny">%s</div>\n <div class="ui button approve multi-sort-order-button">%s</div>\n </div>\n </div>\n ',multipleSortButton:'<button class="multi-sort ui button" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',multipleSortSelect:'<select class="%s %s">'}},materialize:{html:{multipleSortModal:'\n <div id="%s" class="modal" aria-labelledby="%sLabel" aria-hidden="true">\n <div class="modal-content" id="%sLabel">\n <h4>%s</h4>\n <div class="bootstrap-table">\n <div class="fixed-table-toolbar">\n <div class="bars">\n <div id="toolbar" class="pb-3">\n <button id="add" type="button" class="waves-effect waves-light btn">%s %s</button>\n <button id="delete" type="button" class="waves-effect waves-light btn" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class="fixed-table-container">\n <table id="multi-sort" class="table">\n <thead>\n <tr>\n <th></th>\n <th><div class="th-inner">%s</div></th>\n <th><div class="th-inner">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class="modal-footer">\n <a href="javascript:void(0)" class="modal-close waves-effect waves-light btn">%s</a>\n <a href="javascript:void(0)" class="modal-close waves-effect waves-light btn multi-sort-order-button">%s</a>\n </div>\n </div>\n </div>\n ',multipleSortButton:'<a href="#%s" class="multi-sort waves-effect waves-light btn modal-trigger" type="button" data-toggle="modal" title="%s">%s</a>',multipleSortSelect:'<select class="%s %s browser-default">'}},foundation:{html:{multipleSortModal:'\n <div class="reveal" id="%s" data-reveal aria-labelledby="%sLabel" aria-hidden="true">\n <div id="%sLabel">\n <h1>%s</h1>\n <div class="bootstrap-table">\n <div class="fixed-table-toolbar">\n <div class="bars">\n <div id="toolbar" class="padding-bottom-2">\n <button id="add" type="button" class="waves-effect waves-light button">%s %s</button>\n <button id="delete" type="button" class="waves-effect waves-light button" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class="fixed-table-container">\n <table id="multi-sort" class="table">\n <thead>\n <tr>\n <th></th>\n <th><div class="th-inner">%s</div></th>\n <th><div class="th-inner">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n\n <button class="waves-effect waves-light button" data-close aria-label="Close modal" type="button">\n <span aria-hidden="true">%s</span>\n </button>\n <button class="waves-effect waves-light button multi-sort-order-button" data-close aria-label="Order" type="button">\n <span aria-hidden="true">%s</span>\n </button>\n </div>\n </div>\n ',multipleSortButton:'<button class="button multi-sort" data-open="%s" title="%s">%s</button>',multipleSortSelect:'<select class="%s %s browser-default">'}},bulma:{html:{multipleSortModal:'\n <div class="modal" id="%s" aria-labelledby="%sLabel" aria-hidden="true">\n <div class="modal-background"></div>\n <div class="modal-content" id="%sLabel">\n <div class="box">\n <h2>%s</h2>\n <div class="bootstrap-table">\n <div class="fixed-table-toolbar">\n <div class="bars">\n <div id="toolbar" class="padding-bottom-2">\n <button id="add" type="button" class="waves-effect waves-light button">%s %s</button>\n <button id="delete" type="button" class="waves-effect waves-light button" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class="fixed-table-container">\n <table id="multi-sort" class="table">\n <thead>\n <tr>\n <th></th>\n <th><div class="th-inner">%s</div></th>\n <th><div class="th-inner">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <button type="button" class="waves-effect waves-light button" data-close>%s</button>\n <button type="button" class="waves-effect waves-light button multi-sort-order-button" data-close>%s</button>\n </div>\n </div>\n </div>\n ',multipleSortButton:'<button class="button multi-sort" data-target="%s" title="%s">%s</button>',multipleSortSelect:'<select class="%s %s browser-default">'}},"bootstrap-table":{html:{multipleSortModal:'\n <div class="modal" id="%s" aria-labelledby="%sLabel" aria-hidden="true">\n <div class="modal-background"></div>\n <div class="modal-content" id="%sLabel">\n <div class="box">\n <h2>%s</h2>\n <div class="bootstrap-table">\n <div class="fixed-table-toolbar">\n <div class="bars">\n <div id="toolbar" class="padding-bottom-2">\n <button id="add" type="button" class="btn">%s %s</button>\n <button id="delete" type="button" class="btn" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class="fixed-table-container">\n <table id="multi-sort" class="table">\n <thead>\n <tr>\n <th></th>\n <th><div class="th-inner">%s</div></th>\n <th><div class="th-inner">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class="mt-30">\n <button type="button" class="btn" data-close>%s</button>\n <button type="button" class="btn multi-sort-order-button" data-close>%s</button>\n </div>\n </div>\n </div>\n </div>\n ',multipleSortButton:'<button class="btn multi-sort" data-target="%s" title="%s">%s</button>',multipleSortSelect:'<select class="%s %s browser-default">'}}}[o.default.fn.bootstrapTable.theme],$o=function(t){var n=t.sortModalSelector,e="#".concat(n),r=t.options;if(!o.default(e).hasClass("modal")){var i=Ao.sprintf(Co.html.multipleSortModal,n,n,n,t.options.formatMultipleSort(),Ao.sprintf(t.constants.html.icon,r.iconsPrefix,r.icons.plus),t.options.formatAddLevel(),Ao.sprintf(t.constants.html.icon,r.iconsPrefix,r.icons.minus),t.options.formatDeleteLevel(),t.options.formatColumn(),t.options.formatOrder(),t.options.formatCancel(),t.options.formatSort());o.default("body").append(o.default(i)),t.$sortModal=o.default(e);var a=t.$sortModal.find("tbody > tr");if(t.$sortModal.off("click","#add").on("click","#add",(function(){var n=t.$sortModal.find(".multi-sort-name:first option").length,o=t.$sortModal.find("tbody tr").length;o<n&&(o++,t.addLevel(),t.setButtonStates())})),t.$sortModal.off("click","#delete").on("click","#delete",(function(){var n=t.$sortModal.find(".multi-sort-name:first option").length,o=t.$sortModal.find("tbody tr").length;o>1&&o<=n&&(o--,t.$sortModal.find("tbody tr:last").remove(),t.setButtonStates())})),t.$sortModal.off("click",".multi-sort-order-button").on("click",".multi-sort-order-button",(function(){for(var n=t.$sortModal.find("tbody > tr"),e=t.$sortModal.find("div.alert"),r=[],i=[],a=o.default.map(n,(function(t){var n=o.default(t),e=n.find(".multi-sort-name").val(),i=n.find(".multi-sort-order").val();return r.push(e),{sortName:e,sortOrder:i}})),s=r.sort(),l=0;l<r.length-1;l++)s[l+1]===s[l]&&i.push(s[l]);i.length>0?0===e.length&&(e='<div class="alert alert-danger" role="alert"><strong>'.concat(t.options.formatDuplicateAlertTitle(),"</strong> ").concat(t.options.formatDuplicateAlertDescription(),"</div>"),o.default(e).insertBefore(t.$sortModal.find(".bars"))):(1===e.length&&o.default(e).remove(),-1!==o.default.inArray(o.default.fn.bootstrapTable.theme,["bootstrap3","bootstrap4"])&&t.$sortModal.modal("hide"),t.multiSort(a))})),null!==t.options.sortPriority&&0!==t.options.sortPriority.length||t.options.sortName&&(t.options.sortPriority=[{sortName:t.options.sortName,sortOrder:t.options.sortOrder}]),null!==t.options.sortPriority&&t.options.sortPriority.length>0){if(a.length<t.options.sortPriority.length&&"object"===jo(t.options.sortPriority))for(var s=0;s<t.options.sortPriority.length;s++)t.addLevel(s,t.options.sortPriority[s])}else t.addLevel(0);t.setButtonStates()}};o.default.fn.bootstrapTable.methods.push("multipleSort"),o.default.fn.bootstrapTable.methods.push("multiSort"),o.default.extend(o.default.fn.bootstrapTable.defaults,{showMultiSort:!1,showMultiSortButton:!0,multiSortStrictSort:!1,sortPriority:null,onMultipleSort:function(){return!1}}),o.default.extend(o.default.fn.bootstrapTable.Constructor.EVENTS,{"multiple-sort.bs.table":"onMultipleSort"}),o.default.extend(o.default.fn.bootstrapTable.locales,{formatMultipleSort:function(){return"Multiple Sort"},formatAddLevel:function(){return"Add Level"},formatDeleteLevel:function(){return"Delete Level"},formatColumn:function(){return"Column"},formatOrder:function(){return"Order"},formatSortBy:function(){return"Sort by"},formatThenBy:function(){return"Then by"},formatSort:function(){return"Sort"},formatCancel:function(){return"Cancel"},formatDuplicateAlertTitle:function(){return"Duplicate(s) detected!"},formatDuplicateAlertDescription:function(){return"Please remove or change any duplicate column."},formatSortOrders:function(){return{asc:"Ascending",desc:"Descending"}}}),o.default.extend(o.default.fn.bootstrapTable.defaults,o.default.fn.bootstrapTable.locales);var Lo=o.default.fn.bootstrapTable.Constructor,Eo=Lo.prototype.initToolbar,ko=Lo.prototype.destroy;Lo.prototype.initToolbar=function(){var t=this;this.showToolbar=this.showToolbar||this.options.showMultiSort;var n=this,e="sortModal_".concat(this.$el.attr("id")),r="#".concat(e),i=this.$toolbar.find("div.multi-sort"),a=this.options;this.$sortModal=o.default(r),this.sortModalSelector=e,null!==n.options.sortPriority&&n.onMultipleSort(),this.options.showMultiSortButton&&(this.buttons=Object.assign(this.buttons,{multipleSort:{html:Ao.sprintf(Co.html.multipleSortButton,n.sortModalSelector,this.options.formatMultipleSort(),Ao.sprintf(n.constants.html.icon,a.iconsPrefix,a.icons.sort))}}));for(var s=arguments.length,l=new Array(s),d=0;d<s;d++)l[d]=arguments[d];if(Eo.apply(this,Array.prototype.slice.apply(l)),"server"===n.options.sidePagination&&!To&&null!==n.options.sortPriority){var u=n.options.queryParams;n.options.queryParams=function(t){return t.multiSort=n.options.sortPriority,u(t)}}this.options.showMultiSort&&(!i.length&&this.options.showMultiSortButton&&("semantic"===o.default.fn.bootstrapTable.theme?this.$toolbar.find(".multi-sort").on("click",(function(){o.default(r).modal("show")})):"materialize"===o.default.fn.bootstrapTable.theme?this.$toolbar.find(".multi-sort").on("click",(function(){o.default(r).modal()})):"bootstrap-table"===o.default.fn.bootstrapTable.theme?this.$toolbar.find(".multi-sort").on("click",(function(){o.default(r).addClass("show")})):"foundation"===o.default.fn.bootstrapTable.theme?this.$toolbar.find(".multi-sort").on("click",(function(){t.foundationModal||(t.foundationModal=new Foundation.Reveal(o.default(r))),t.foundationModal.open()})):"bulma"===o.default.fn.bootstrapTable.theme&&this.$toolbar.find(".multi-sort").on("click",(function(){o.default("html").toggleClass("is-clipped"),o.default(r).toggleClass("is-active"),o.default("button[data-close]").one("click",(function(){o.default("html").toggleClass("is-clipped"),o.default(r).toggleClass("is-active")}))})),$o(n)),this.$el.on("sort.bs.table",(function(){To=!0})),this.$el.on("multiple-sort.bs.table",(function(){To=!1})),this.$el.on("load-success.bs.table",(function(){To||null===n.options.sortPriority||"object"!==jo(n.options.sortPriority)||"server"===n.options.sidePagination||n.onMultipleSort()})),this.$el.on("column-switch.bs.table",(function(t,o){for(var e=0;e<n.options.sortPriority.length;e++)n.options.sortPriority[e].sortName===o&&n.options.sortPriority.splice(e,1);n.assignSortableArrows(),n.$sortModal.remove(),$o(n)})),this.$el.on("reset-view.bs.table",(function(){To||null===n.options.sortPriority||"object"!==jo(n.options.sortPriority)||n.assignSortableArrows()})))},Lo.prototype.destroy=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];ko.apply(this,Array.prototype.slice.apply(n)),this.options.showMultiSort&&(this.enableCustomSort=!1,this.$sortModal.remove())},Lo.prototype.multipleSort=function(){var t=this;To||null===t.options.sortPriority||"object"!==jo(t.options.sortPriority)||"server"===t.options.sidePagination||t.onMultipleSort()},Lo.prototype.onMultipleSort=function(){var t=this,n=function(t,n){return t>n?1:t<n?-1:0};this.enableCustomSort=!0,this.data.sort((function(e,r){return function(e,r){for(var i=[],a=[],s=0;s<t.options.sortPriority.length;s++){var l=t.options.sortPriority[s].sortName,d=t.header.fields.indexOf(l),u=t.header.sorters[t.header.fields.indexOf(l)];t.header.sortNames[d]&&(l=t.header.sortNames[d]);var c="desc"===t.options.sortPriority[s].sortOrder?-1:1,f=Ao.getItemField(e,l),b=Ao.getItemField(r,l),p=o.default.fn.bootstrapTable.utils.calculateObjectValue(t.header,u,[f,b]),v=o.default.fn.bootstrapTable.utils.calculateObjectValue(t.header,u,[b,f]);void 0===p||void 0===v?(null==f&&(f=""),null==b&&(b=""),o.default.isNumeric(f)&&o.default.isNumeric(b)?(f=parseFloat(f),b=parseFloat(b)):(f=f.toString(),b=b.toString(),t.options.multiSortStrictSort&&(f=f.toLowerCase(),b=b.toLowerCase())),i.push(c*n(f,b)),a.push(c*n(b,f))):(i.push(c*p),a.push(c*v))}return n(i,a)}(e,r)})),this.initBody(),this.assignSortableArrows(),this.trigger("multiple-sort")},Lo.prototype.addLevel=function(t,n){var e=0===t?this.options.formatSortBy():this.options.formatThenBy();this.$sortModal.find("tbody").append(o.default("<tr>").append(o.default("<td>").text(e)).append(o.default("<td>").append(o.default(Ao.sprintf(Co.html.multipleSortSelect,this.constants.classes.paginationDropdown,"multi-sort-name")))).append(o.default("<td>").append(o.default(Ao.sprintf(Co.html.multipleSortSelect,this.constants.classes.paginationDropdown,"multi-sort-order")))));var r=this.$sortModal.find(".multi-sort-name").last(),i=this.$sortModal.find(".multi-sort-order").last();o.default.each(this.columns,(function(t,n){if(!1===n.sortable||!1===n.visible)return!0;r.append('<option value="'.concat(n.field,'">').concat(n.title,"</option>"))})),o.default.each(this.options.formatSortOrders(),(function(t,n){i.append('<option value="'.concat(t,'">').concat(n,"</option>"))})),void 0!==n&&(r.find('option[value="'.concat(n.sortName,'"]')).attr("selected",!0),i.find('option[value="'.concat(n.sortOrder,'"]')).attr("selected",!0))},Lo.prototype.assignSortableArrows=function(){for(var t=this,n=t.$header.find("th"),e=0;e<n.length;e++)for(var r=0;r<t.options.sortPriority.length;r++)o.default(n[e]).data("field")===t.options.sortPriority[r].sortName&&o.default(n[e]).find(".sortable").removeClass("desc asc").addClass(t.options.sortPriority[r].sortOrder)},Lo.prototype.setButtonStates=function(){var t=this.$sortModal.find(".multi-sort-name:first option").length,n=this.$sortModal.find("tbody tr").length;n===t&&this.$sortModal.find("#add").attr("disabled","disabled"),n>1&&this.$sortModal.find("#delete").removeAttr("disabled"),n<t&&this.$sortModal.find("#add").removeAttr("disabled"),1===n&&this.$sortModal.find("#delete").attr("disabled","disabled")},Lo.prototype.multiSort=function(t){var n=this;if(this.options.sortPriority=t,this.options.sortName=void 0,"server"===this.options.sidePagination){var e=this.options.queryParams;return this.options.queryParams=function(t){return t.multiSort=n.options.sortPriority,o.default.fn.bootstrapTable.utils.calculateObjectValue(n.options,e,[t])},To=!1,void this.initServer(this.options.silentSort)}this.onMultipleSort()}}));