UNPKG

22.6 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.16.0
5 * @homepage https://bootstrap-table.com
6 * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
7 * @license MIT
8 */
9
10!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e((t=t||self).jQuery)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t,e){return t(e={exports:{}},e.exports),e.exports}var n=function(t){return t&&t.Math==Math&&t},o=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")(),i=function(t){try{return!!t()}catch(t){return!0}},c=!i((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),u={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,l={f:a&&!u.call({1:2},1)?function(t){var e=a(this,t);return!!e&&e.enumerable}:u},f=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},s={}.toString,p=function(t){return s.call(t).slice(8,-1)},h="".split,d=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==p(t)?h.call(t,""):Object(t)}:Object,y=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},g=function(t){return d(y(t))},v=function(t){return"object"==typeof t?null!==t:"function"==typeof t},b=function(t,e){if(!v(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!v(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!v(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!v(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},m={}.hasOwnProperty,S=function(t,e){return m.call(t,e)},x=o.document,O=v(x)&&v(x.createElement),w=function(t){return O?x.createElement(t):{}},j=!c&&!i((function(){return 7!=Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a})),E=Object.getOwnPropertyDescriptor,A={f:c?E:function(t,e){if(t=g(t),e=b(e,!0),j)try{return E(t,e)}catch(t){}if(S(t,e))return f(!l.f.call(t,e),t[e])}},T=function(t){if(!v(t))throw TypeError(String(t)+" is not an object");return t},k=Object.defineProperty,P={f:c?k:function(t,e,r){if(T(t),e=b(e,!0),T(r),j)try{return k(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},_=c?function(t,e,r){return P.f(t,e,f(1,r))}:function(t,e,r){return t[e]=r,t},L=function(t,e){try{_(o,t,e)}catch(r){o[t]=e}return e},B=o["__core-js_shared__"]||L("__core-js_shared__",{}),G=Function.toString;"function"!=typeof B.inspectSource&&(B.inspectSource=function(t){return G.call(t)});var R,I,$,F=B.inspectSource,C=o.WeakMap,M="function"==typeof C&&/native code/.test(F(C)),N=r((function(t){(t.exports=function(t,e){return B[t]||(B[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.0",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),V=0,D=Math.random(),q=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++V+D).toString(36)},H=N("keys"),K=function(t){return H[t]||(H[t]=q(t))},U={},W=o.WeakMap;if(M){var z=new W,Y=z.get,Q=z.has,X=z.set;R=function(t,e){return X.call(z,t,e),e},I=function(t){return Y.call(z,t)||{}},$=function(t){return Q.call(z,t)}}else{var J=K("state");U[J]=!0,R=function(t,e){return _(t,J,e),e},I=function(t){return S(t,J)?t[J]:{}},$=function(t){return S(t,J)}}var Z,tt,et={set:R,get:I,has:$,enforce:function(t){return $(t)?I(t):R(t,{})},getterFor:function(t){return function(e){var r;if(!v(e)||(r=I(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},rt=r((function(t){var e=et.get,r=et.enforce,n=String(String).split("String");(t.exports=function(t,e,i,c){var u=!!c&&!!c.unsafe,a=!!c&&!!c.enumerable,l=!!c&&!!c.noTargetGet;"function"==typeof i&&("string"!=typeof e||S(i,"name")||_(i,"name",e),r(i).source=n.join("string"==typeof e?e:"")),t!==o?(u?!l&&t[e]&&(a=!0):delete t[e],a?t[e]=i:_(t,e,i)):a?t[e]=i:L(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||F(this)}))})),nt=o,ot=function(t){return"function"==typeof t?t:void 0},it=function(t,e){return arguments.length<2?ot(nt[t])||ot(o[t]):nt[t]&&nt[t][e]||o[t]&&o[t][e]},ct=Math.ceil,ut=Math.floor,at=function(t){return isNaN(t=+t)?0:(t>0?ut:ct)(t)},lt=Math.min,ft=function(t){return t>0?lt(at(t),9007199254740991):0},st=Math.max,pt=Math.min,ht=function(t,e){var r=at(t);return r<0?st(r+e,0):pt(r,e)},dt=function(t){return function(e,r,n){var o,i=g(e),c=ft(i.length),u=ht(n,c);if(t&&r!=r){for(;c>u;)if((o=i[u++])!=o)return!0}else for(;c>u;u++)if((t||u in i)&&i[u]===r)return t||u||0;return!t&&-1}},yt={includes:dt(!0),indexOf:dt(!1)}.indexOf,gt=function(t,e){var r,n=g(t),o=0,i=[];for(r in n)!S(U,r)&&S(n,r)&&i.push(r);for(;e.length>o;)S(n,r=e[o++])&&(~yt(i,r)||i.push(r));return i},vt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bt=vt.concat("length","prototype"),mt={f:Object.getOwnPropertyNames||function(t){return gt(t,bt)}},St={f:Object.getOwnPropertySymbols},xt=it("Reflect","ownKeys")||function(t){var e=mt.f(T(t)),r=St.f;return r?e.concat(r(t)):e},Ot=function(t,e){for(var r=xt(e),n=P.f,o=A.f,i=0;i<r.length;i++){var c=r[i];S(t,c)||n(t,c,o(e,c))}},wt=/#|\.prototype\./,jt=function(t,e){var r=At[Et(t)];return r==kt||r!=Tt&&("function"==typeof e?i(e):!!e)},Et=jt.normalize=function(t){return String(t).replace(wt,".").toLowerCase()},At=jt.data={},Tt=jt.NATIVE="N",kt=jt.POLYFILL="P",Pt=jt,_t=A.f,Lt=function(t,e){var r,n,i,c,u,a=t.target,l=t.global,f=t.stat;if(r=l?o:f?o[a]||L(a,{}):(o[a]||{}).prototype)for(n in e){if(c=e[n],i=t.noTargetGet?(u=_t(r,n))&&u.value:r[n],!Pt(l?n:a+(f?".":"#")+n,t.forced)&&void 0!==i){if(typeof c==typeof i)continue;Ot(c,i)}(t.sham||i&&i.sham)&&_(c,"sham",!0),rt(r,n,c,t)}},Bt=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Gt=function(t){return Object(y(t))},Rt=Array.isArray||function(t){return"Array"==p(t)},It=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),$t=It&&!Symbol.sham&&"symbol"==typeof Symbol(),Ft=N("wks"),Ct=o.Symbol,Mt=$t?Ct:q,Nt=function(t){return S(Ft,t)||(It&&S(Ct,t)?Ft[t]=Ct[t]:Ft[t]=Mt("Symbol."+t)),Ft[t]},Vt=Nt("species"),Dt=function(t,e){var r;return Rt(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Rt(r.prototype)?v(r)&&null===(r=r[Vt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},qt=[].push,Ht=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,c=5==t||i;return function(u,a,l,f){for(var s,p,h=Gt(u),y=d(h),g=function(t,e,r){if(Bt(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}(a,l,3),v=ft(y.length),b=0,m=f||Dt,S=e?m(u,v):r?m(u,0):void 0;v>b;b++)if((c||b in y)&&(p=g(s=y[b],b,h),t))if(e)S[b]=p;else if(p)switch(t){case 3:return!0;case 5:return s;case 6:return b;case 2:qt.call(S,s)}else if(o)return!1;return i?-1:n||o?o:S}},Kt={forEach:Ht(0),map:Ht(1),filter:Ht(2),some:Ht(3),every:Ht(4),find:Ht(5),findIndex:Ht(6)},Ut=it("navigator","userAgent")||"",Wt=o.process,zt=Wt&&Wt.versions,Yt=zt&&zt.v8;Yt?tt=(Z=Yt.split("."))[0]+Z[1]:Ut&&(!(Z=Ut.match(/Edge\/(\d+)/))||Z[1]>=74)&&(Z=Ut.match(/Chrome\/(\d+)/))&&(tt=Z[1]);var Qt=tt&&+tt,Xt=Nt("species"),Jt=function(t){return Qt>=51||!i((function(){var e=[];return(e.constructor={})[Xt]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Zt=Kt.filter,te=Jt("filter"),ee=te&&!i((function(){[].filter.call({length:-1,0:1},(function(t){throw t}))}));Lt({target:"Array",proto:!0,forced:!te||!ee},{filter:function(t){return Zt(this,t,arguments.length>1?arguments[1]:void 0)}});var re,ne=Object.keys||function(t){return gt(t,vt)},oe=c?Object.defineProperties:function(t,e){T(t);for(var r,n=ne(e),o=n.length,i=0;o>i;)P.f(t,r=n[i++],e[r]);return t},ie=it("document","documentElement"),ce=K("IE_PROTO"),ue=function(){},ae=function(t){return"<script>"+t+"<\/script>"},le=function(){try{re=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;le=re?function(t){t.write(ae("")),t.close();var e=t.parentWindow.Object;return t=null,e}(re):((e=w("iframe")).style.display="none",ie.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(ae("document.F=Object")),t.close(),t.F);for(var r=vt.length;r--;)delete le.prototype[vt[r]];return le()};U[ce]=!0;var fe=Object.create||function(t,e){var r;return null!==t?(ue.prototype=T(t),r=new ue,ue.prototype=null,r[ce]=t):r=le(),void 0===e?r:oe(r,e)},se=Nt("unscopables"),pe=Array.prototype;null==pe[se]&&P.f(pe,se,{configurable:!0,value:fe(null)});var he,de=Kt.find,ye=!0;"find"in[]&&Array(1).find((function(){ye=!1})),Lt({target:"Array",proto:!0,forced:ye},{find:function(t){return de(this,t,arguments.length>1?arguments[1]:void 0)}}),he="find",pe[se][he]=!0;var ge=function(t,e){var r=[][t];return!r||!i((function(){r.call(null,e||function(){throw 1},1)}))},ve=[].join,be=d!=Object,me=ge("join",",");Lt({target:"Array",proto:!0,forced:be||me},{join:function(t){return ve.call(g(this),void 0===t?",":t)}});var Se=function(t,e,r){var n=b(e);n in t?P.f(t,n,f(0,r)):t[n]=r},xe=Nt("species"),Oe=[].slice,we=Math.max;Lt({target:"Array",proto:!0,forced:!Jt("slice")},{slice:function(t,e){var r,n,o,i=g(this),c=ft(i.length),u=ht(t,c),a=ht(void 0===e?c:e,c);if(Rt(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!Rt(r.prototype)?v(r)&&null===(r=r[xe])&&(r=void 0):r=void 0,r===Array||void 0===r))return Oe.call(i,u,a);for(n=new(void 0===r?Array:r)(we(a-u,0)),o=0;u<a;u++,o++)u in i&&Se(n,o,i[u]);return n.length=o,n}});var je=[],Ee=je.sort,Ae=i((function(){je.sort(void 0)})),Te=i((function(){je.sort(null)})),ke=ge("sort");Lt({target:"Array",proto:!0,forced:Ae||!Te||ke},{sort:function(t){return void 0===t?Ee.call(Gt(this)):Ee.call(Gt(this),Bt(t))}});var Pe=P.f,_e=Function.prototype,Le=_e.toString,Be=/^\s*function ([^ (]*)/;!c||"name"in _e||Pe(_e,"name",{configurable:!0,get:function(){try{return Le.call(this).match(Be)[1]}catch(t){return""}}});var Ge=Object.assign,Re=Object.defineProperty,Ie=!Ge||i((function(){if(c&&1!==Ge({b:1},Ge(Re({},"a",{enumerable:!0,get:function(){Re(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=Ge({},t)[r]||"abcdefghijklmnopqrst"!=ne(Ge({},e)).join("")}))?function(t,e){for(var r=Gt(t),n=arguments.length,o=1,i=St.f,u=l.f;n>o;)for(var a,f=d(arguments[o++]),s=i?ne(f).concat(i(f)):ne(f),p=s.length,h=0;p>h;)a=s[h++],c&&!u.call(f,a)||(r[a]=f[a]);return r}:Ge;Lt({target:"Object",stat:!0,forced:Object.assign!==Ie},{assign:Ie});var $e=function(){var t=T(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};function Fe(t,e){return RegExp(t,e)}var Ce,Me,Ne={UNSUPPORTED_Y:i((function(){var t=Fe("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:i((function(){var t=Fe("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},Ve=RegExp.prototype.exec,De=String.prototype.replace,qe=Ve,He=(Ce=/a/,Me=/b*/g,Ve.call(Ce,"a"),Ve.call(Me,"a"),0!==Ce.lastIndex||0!==Me.lastIndex),Ke=Ne.UNSUPPORTED_Y||Ne.BROKEN_CARET,Ue=void 0!==/()??/.exec("")[1];(He||Ue||Ke)&&(qe=function(t){var e,r,n,o,i=this,c=Ke&&i.sticky,u=$e.call(i),a=i.source,l=0,f=t;return c&&(-1===(u=u.replace("y","")).indexOf("g")&&(u+="g"),f=String(t).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(a="(?: "+a+")",f=" "+f,l++),r=new RegExp("^(?:"+a+")",u)),Ue&&(r=new RegExp("^"+a+"$(?!\\s)",u)),He&&(e=i.lastIndex),n=Ve.call(c?r:i,f),c?n?(n.input=n.input.slice(l),n[0]=n[0].slice(l),n.index=i.lastIndex,i.lastIndex+=n[0].length):i.lastIndex=0:He&&n&&(i.lastIndex=i.global?n.index+n[0].length:e),Ue&&n&&n.length>1&&De.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n});var We=qe;Lt({target:"RegExp",proto:!0,forced:/./.exec!==We},{exec:We});var ze=Nt("species"),Ye=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Qe="$0"==="a".replace(/./,"$0"),Xe=!i((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),Je=function(t){return function(e,r){var n,o,i=String(y(e)),c=at(r),u=i.length;return c<0||c>=u?t?"":void 0:(n=i.charCodeAt(c))<55296||n>56319||c+1===u||(o=i.charCodeAt(c+1))<56320||o>57343?t?i.charAt(c):n:t?i.slice(c,c+2):o-56320+(n-55296<<10)+65536}},Ze={codeAt:Je(!1),charAt:Je(!0)}.charAt,tr=function(t,e,r){return e+(r?Ze(t,e).length:1)},er=function(t,e){var r=t.exec;if("function"==typeof r){var n=r.call(t,e);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==p(t))throw TypeError("RegExp#exec called on incompatible receiver");return We.call(t,e)},rr=Math.max,nr=Math.min,or=Math.floor,ir=/\$([$&'`]|\d\d?|<[^>]*>)/g,cr=/\$([$&'`]|\d\d?)/g;!function(t,e,r,n){var o=Nt(t),c=!i((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),u=c&&!i((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[ze]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!c||!u||"replace"===t&&(!Ye||!Qe)||"split"===t&&!Xe){var a=/./[o],l=r(o,""[t],(function(t,e,r,n,o){return e.exec===We?c&&!o?{done:!0,value:a.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:Qe}),f=l[0],s=l[1];rt(String.prototype,t,f),rt(RegExp.prototype,o,2==e?function(t,e){return s.call(t,this,e)}:function(t){return s.call(t,this)})}n&&_(RegExp.prototype[o],"sham",!0)}("replace",2,(function(t,e,r,n){return[function(r,n){var o=y(this),i=null==r?void 0:r[t];return void 0!==i?i.call(r,o,n):e.call(String(o),r,n)},function(t,i){if(n.REPLACE_KEEPS_$0||"string"==typeof i&&-1===i.indexOf("$0")){var c=r(e,t,this,i);if(c.done)return c.value}var u=T(t),a=String(this),l="function"==typeof i;l||(i=String(i));var f=u.global;if(f){var s=u.unicode;u.lastIndex=0}for(var p=[];;){var h=er(u,a);if(null===h)break;if(p.push(h),!f)break;""===String(h[0])&&(u.lastIndex=tr(a,ft(u.lastIndex),s))}for(var d,y="",g=0,v=0;v<p.length;v++){h=p[v];for(var b=String(h[0]),m=rr(nr(at(h.index),a.length),0),S=[],x=1;x<h.length;x++)S.push(void 0===(d=h[x])?d:String(d));var O=h.groups;if(l){var w=[b].concat(S,m,a);void 0!==O&&w.push(O);var j=String(i.apply(void 0,w))}else j=o(b,a,m,S,O,i);m>=g&&(y+=a.slice(g,m)+j,g=m+b.length)}return y+a.slice(g)}];function o(t,r,n,o,i,c){var u=n+t.length,a=o.length,l=cr;return void 0!==i&&(i=Gt(i),l=ir),e.call(c,l,(function(e,c){var l;switch(c.charAt(0)){case"$":return"$";case"&":return t;case"`":return r.slice(0,n);case"'":return r.slice(u);case"<":l=i[c.slice(1,-1)];break;default:var f=+c;if(0===f)return e;if(f>a){var s=or(f/10);return 0===s?e:s<=a?void 0===o[s-1]?c.charAt(1):o[s-1]+c.charAt(1):e}l=o[f-1]}return void 0===l?"":l}))}}));var ur,ar=Kt.forEach,lr=ge("forEach")?function(t){return ar(this,t,arguments.length>1?arguments[1]:void 0)}:[].forEach;for(var fr in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var sr=o[fr],pr=sr&&sr.prototype;if(pr&&pr.forEach!==lr)try{_(pr,"forEach",lr)}catch(t){pr.forEach=lr}}function hr(t){return(hr="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)}function dr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function yr(t){return(yr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function gr(t,e){return(gr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function vr(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function br(t,e,r){return(br="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=yr(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}var mr=function(t){var e=arguments,r=!0,n=1;return t=t.replace(/%s/g,(function(){var t=e[n++];return void 0===t?(r=!1,""):t})),r?t:""},Sr=function(t,e){var r={};return t.forEach((function(t){var n=e(t);r[n]=r[n]||[],r[n].push(t)})),r};t.extend(t.fn.bootstrapTable.defaults,{groupBy:!1,groupByField:"",groupByFormatter:void 0});var xr=t.fn.bootstrapTable.utils,Or=t.fn.bootstrapTable.Constructor,wr=Or.prototype.initSort,jr=Or.prototype.initBody,Er=Or.prototype.updateSelected;Or.prototype.initSort=function(){for(var e=this,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];wr.apply(this,Array.prototype.slice.apply(n));var i=this;if(this.tableGroups=[],this.options.groupBy&&""!==this.options.groupByField){this.options.sortName!==this.options.groupByField&&(this.options.customSort?xr.calculateObjectValue(this.options,this.options.customSort,[this.options.sortName,this.options.sortOrder,this.data]):this.data.sort((function(r,n){var o=e.getGroupByFields(),i=[],c=[];return t.each(o,(function(t,e){i.push(r[e]),c.push(n[e])})),r=i.join(),n=c.join(),r.localeCompare(n,void 0,{numeric:!0})})));var c=Sr(i.data,(function(r){var n=e.getGroupByFields(),o=[];return t.each(n,(function(t,e){o.push(r[e])})),o.join(", ")})),u=0;t.each(c,(function(t,r){e.tableGroups.push({id:u,name:t,data:r}),r.forEach((function(t){t._data||(t._data={}),t._data["parent-index"]=u})),u++}))}},Or.prototype.initBody=function(){ur=!0;for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(jr.apply(this,Array.prototype.slice.apply(r)),this.options.groupBy&&""!==this.options.groupByField){var o=this,i=!1,c=0;this.columns.forEach((function(t){t.checkbox?i=!0:t.visible&&(c+=1)})),this.options.detailView&&!this.options.cardView&&(c+=1),this.tableGroups.forEach((function(e){var r=[];r.push(mr('<tr class="info groupBy expanded" data-group-index="%s">',e.id)),o.options.detailView&&!o.options.cardView&&r.push('<td class="detail"></td>'),i&&r.push('<td class="bs-checkbox">','<input name="btSelectGroup" type="checkbox" />',"</td>");var n=e.name;"function"==typeof o.options.groupByFormatter&&(n=o.options.groupByFormatter(e.name,e.id,e.data)),r.push("<td",mr(' colspan="%s"',c),">",n,"</td>"),r.push("</tr>"),o.$body.find("tr[data-parent-index=".concat(e.id,"]:first")).before(t(r.join("")))})),this.$selectGroup=[],this.$body.find('[name="btSelectGroup"]').each((function(){var e=t(this);o.$selectGroup.push({group:e,item:o.$selectItem.filter((function(){return t(this).closest("tr").data("parent-index")===e.closest("tr").data("group-index")}))})})),this.$container.off("click",".groupBy").on("click",".groupBy",(function(){t(this).toggleClass("expanded"),o.$body.find("tr[data-parent-index=".concat(t(this).closest("tr").data("group-index"),"]")).toggleClass("hidden")})),this.$container.off("click",'[name="btSelectGroup"]').on("click",'[name="btSelectGroup"]',(function(e){e.stopImmediatePropagation();var r=t(this).prop("checked");o[r?"checkGroup":"uncheckGroup"](t(this).closest("tr").data("group-index"))}))}ur=!1,this.updateSelected()},Or.prototype.updateSelected=function(){if(!ur){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Er.apply(this,Array.prototype.slice.apply(e)),this.options.groupBy&&""!==this.options.groupByField&&this.$selectGroup.forEach((function(t){var e=t.item.filter(":enabled").length===t.item.filter(":enabled").filter(":checked").length;t.group.prop("checked",e)}))}},Or.prototype.getGroupSelections=function(t){var e=this;return this.data.filter((function(r){return r[e.header.stateField]&&r._data["parent-index"]===t}))},Or.prototype.checkGroup=function(t){this.checkGroup_(t,!0)},Or.prototype.uncheckGroup=function(t){this.checkGroup_(t,!1)},Or.prototype.checkGroup_=function(e,r){var n;r||(n=this.getGroupSelections(e)),this.$selectItem.filter((function(){return t(this).closest("tr").data("parent-index")===e})).prop("checked",r),this.updateRows(),this.updateSelected(),r&&(n=this.getGroupSelections(e)),this.trigger(r?"check-all":"uncheck-all",n)},Or.prototype.getGroupByFields=function(){var e=this.options.groupByField;return t.isArray(this.options.groupByField)||(e=[this.options.groupByField]),e},t.BootstrapTable=function(e){function r(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),vr(this,yr(r).apply(this,arguments))}var n,o,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&gr(t,e)}(r,e),n=r,(o=[{key:"scrollTo",value:function(e){if(this.options.groupBy){var n={unit:"px",value:0};if("object"===hr(e)&&(n=Object.assign(n,e)),"rows"===n.unit){var o=0;return this.$body.find("> tr:lt(".concat(n.value,")")).each((function(e,r){o+=t(r).outerHeight(!0)})),this.$body.find("> tr:not(.groupBy):eq(".concat(n.value,")")).prevAll(".groupBy").each((function(e,r){o+=t(r).outerHeight(!0)})),void this.$tableBody.scrollTop(o)}}br(yr(r.prototype),"scrollTo",this).call(this,e)}}])&&dr(n.prototype,o),i&&dr(n,i),r}(t.BootstrapTable)}));