bootstrap-table-reorder-columns.min.js 20 KB

12345678910
  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. !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";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=e(t);function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}function a(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)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 c(t){var e=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 r,n=i(t);if(e){var o=i(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return a(this,r)}}function f(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=i(t)););return t}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=f(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},l.apply(this,arguments)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function y(t,e){return t(e={exports:{}},e.exports),e.exports}var h,b,v=function(t){return t&&t.Math==Math&&t},g=v("object"==typeof globalThis&&globalThis)||v("object"==typeof window&&window)||v("object"==typeof self&&self)||v("object"==typeof d&&d)||function(){return this}()||Function("return this")(),m=function(t){try{return!!t()}catch(t){return!0}},w=!m((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),O=!m((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),j=Function.prototype.call,S=O?j.bind(j):function(){return j.apply(j,arguments)},T={}.propertyIsEnumerable,R=Object.getOwnPropertyDescriptor,E={f:R&&!T.call({1:2},1)?function(t){var e=R(this,t);return!!e&&e.enumerable}:T},P=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},x=Function.prototype,A=x.bind,C=x.call,k=O&&A.bind(C,C),I=O?function(t){return t&&k(t)}:function(t){return t&&function(){return C.apply(t,arguments)}},_=I({}.toString),F=I("".slice),M=function(t){return F(_(t),8,-1)},D=g.Object,z=I("".split),B=m((function(){return!D("z").propertyIsEnumerable(0)}))?function(t){return"String"==M(t)?z(t,""):D(t)}:D,L=g.TypeError,N=function(t){if(null==t)throw L("Can't call method on "+t);return t},V=function(t){return B(N(t))},G=function(t){return"function"==typeof t},$=function(t){return"object"==typeof t?null!==t:G(t)},q=function(t){return G(t)?t:void 0},H=function(t,e){return arguments.length<2?q(g[t]):g[t]&&g[t][e]},U=I({}.isPrototypeOf),W=H("navigator","userAgent")||"",X=g.process,K=g.Deno,Q=X&&X.versions||K&&K.version,Y=Q&&Q.v8;Y&&(b=(h=Y.split("."))[0]>0&&h[0]<4?1:+(h[0]+h[1])),!b&&W&&(!(h=W.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=W.match(/Chrome\/(\d+)/))&&(b=+h[1]);var J=b,Z=!!Object.getOwnPropertySymbols&&!m((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&J&&J<41})),tt=Z&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,et=g.Object,rt=tt?function(t){return"symbol"==typeof t}:function(t){var e=H("Symbol");return G(e)&&U(e.prototype,et(t))},nt=g.String,ot=g.TypeError,it=function(t){if(G(t))return t;throw ot(function(t){try{return nt(t)}catch(t){return"Object"}}(t)+" is not a function")},ut=g.TypeError,at=Object.defineProperty,ct=function(t,e){try{at(g,t,{value:e,configurable:!0,writable:!0})}catch(r){g[t]=e}return e},ft="__core-js_shared__",lt=g[ft]||ct(ft,{}),st=y((function(t){(t.exports=function(t,e){return lt[t]||(lt[t]=void 0!==e?e:{})})("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"})})),pt=g.Object,dt=function(t){return pt(N(t))},yt=I({}.hasOwnProperty),ht=Object.hasOwn||function(t,e){return yt(dt(t),e)},bt=0,vt=Math.random(),gt=I(1..toString),mt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+gt(++bt+vt,36)},wt=st("wks"),Ot=g.Symbol,jt=Ot&&Ot.for,St=tt?Ot:Ot&&Ot.withoutSetter||mt,Tt=function(t){if(!ht(wt,t)||!Z&&"string"!=typeof wt[t]){var e="Symbol."+t;Z&&ht(Ot,t)?wt[t]=Ot[t]:wt[t]=tt&&jt?jt(e):St(e)}return wt[t]},Rt=g.TypeError,Et=Tt("toPrimitive"),Pt=function(t,e){if(!$(t)||rt(t))return t;var r,n,o=null==(r=t[Et])?void 0:it(r);if(o){if(void 0===e&&(e="default"),n=S(o,t,e),!$(n)||rt(n))return n;throw Rt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&G(r=t.toString)&&!$(n=S(r,t)))return n;if(G(r=t.valueOf)&&!$(n=S(r,t)))return n;if("string"!==e&&G(r=t.toString)&&!$(n=S(r,t)))return n;throw ut("Can't convert object to primitive value")}(t,e)},xt=function(t){var e=Pt(t,"string");return rt(e)?e:e+""},At=g.document,Ct=$(At)&&$(At.createElement),kt=function(t){return Ct?At.createElement(t):{}},It=!w&&!m((function(){return 7!=Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),_t=Object.getOwnPropertyDescriptor,Ft={f:w?_t:function(t,e){if(t=V(t),e=xt(e),It)try{return _t(t,e)}catch(t){}if(ht(t,e))return P(!S(E.f,t,e),t[e])}},Mt=w&&m((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Dt=g.String,zt=g.TypeError,Bt=function(t){if($(t))return t;throw zt(Dt(t)+" is not an object")},Lt=g.TypeError,Nt=Object.defineProperty,Vt=Object.getOwnPropertyDescriptor,Gt="enumerable",$t="configurable",qt="writable",Ht={f:w?Mt?function(t,e,r){if(Bt(t),e=xt(e),Bt(r),"function"==typeof t&&"prototype"===e&&"value"in r&&qt in r&&!r.writable){var n=Vt(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:$t in r?r.configurable:n.configurable,enumerable:Gt in r?r.enumerable:n.enumerable,writable:!1})}return Nt(t,e,r)}:Nt:function(t,e,r){if(Bt(t),e=xt(e),Bt(r),It)try{return Nt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Lt("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},Ut=w?function(t,e,r){return Ht.f(t,e,P(1,r))}:function(t,e,r){return t[e]=r,t},Wt=Function.prototype,Xt=w&&Object.getOwnPropertyDescriptor,Kt=ht(Wt,"name"),Qt={EXISTS:Kt,PROPER:Kt&&"something"===function(){}.name,CONFIGURABLE:Kt&&(!w||w&&Xt(Wt,"name").configurable)},Yt=I(Function.toString);G(lt.inspectSource)||(lt.inspectSource=function(t){return Yt(t)});var Jt,Zt,te,ee=lt.inspectSource,re=g.WeakMap,ne=G(re)&&/native code/.test(ee(re)),oe=st("keys"),ie=function(t){return oe[t]||(oe[t]=mt(t))},ue={},ae="Object already initialized",ce=g.TypeError,fe=g.WeakMap;if(ne||lt.state){var le=lt.state||(lt.state=new fe),se=I(le.get),pe=I(le.has),de=I(le.set);Jt=function(t,e){if(pe(le,t))throw new ce(ae);return e.facade=t,de(le,t,e),e},Zt=function(t){return se(le,t)||{}},te=function(t){return pe(le,t)}}else{var ye=ie("state");ue[ye]=!0,Jt=function(t,e){if(ht(t,ye))throw new ce(ae);return e.facade=t,Ut(t,ye,e),e},Zt=function(t){return ht(t,ye)?t[ye]:{}},te=function(t){return ht(t,ye)}}var he={set:Jt,get:Zt,has:te,enforce:function(t){return te(t)?Zt(t):Jt(t,{})},getterFor:function(t){return function(e){var r;if(!$(e)||(r=Zt(e)).type!==t)throw ce("Incompatible receiver, "+t+" required");return r}}},be=y((function(t){var e=Ht.f,r=Qt.CONFIGURABLE,n=he.enforce,o=he.get,i=!m((function(){return 8!==e((function(){}),"length",{value:8}).length})),u=String(String).split("String"),a=t.exports=function(t,o,a){"Symbol("===String(o).slice(0,7)&&(o="["+String(o).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(o="get "+o),a&&a.setter&&(o="set "+o),(!ht(t,"name")||r&&t.name!==o)&&e(t,"name",{value:o,configurable:!0}),i&&a&&ht(a,"arity")&&t.length!==a.arity&&e(t,"length",{value:a.arity});var c=n(t);return ht(c,"source")||(c.source=u.join("string"==typeof o?o:"")),t};Function.prototype.toString=a((function(){return G(this)&&o(this).source||ee(this)}),"toString")})),ve=function(t,e,r,n){var o=!!n&&!!n.unsafe,i=!!n&&!!n.enumerable,u=!!n&&!!n.noTargetGet,a=n&&void 0!==n.name?n.name:e;return G(r)&&be(r,a,n),t===g?(i?t[e]=r:ct(e,r),t):(o?!u&&t[e]&&(i=!0):delete t[e],i?t[e]=r:Ut(t,e,r),t)},ge=Math.ceil,me=Math.floor,we=function(t){var e=+t;return e!=e||0===e?0:(e>0?me:ge)(e)},Oe=Math.max,je=Math.min,Se=Math.min,Te=function(t){return(e=t.length)>0?Se(we(e),9007199254740991):0;var e},Re=function(t){return function(e,r,n){var o,i=V(e),u=Te(i),a=function(t,e){var r=we(t);return r<0?Oe(r+e,0):je(r,e)}(n,u);if(t&&r!=r){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},Ee={includes:Re(!0),indexOf:Re(!1)}.indexOf,Pe=I([].push),xe=function(t,e){var r,n=V(t),o=0,i=[];for(r in n)!ht(ue,r)&&ht(n,r)&&Pe(i,r);for(;e.length>o;)ht(n,r=e[o++])&&(~Ee(i,r)||Pe(i,r));return i},Ae=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ce=Ae.concat("length","prototype"),ke={f:Object.getOwnPropertyNames||function(t){return xe(t,Ce)}},Ie={f:Object.getOwnPropertySymbols},_e=I([].concat),Fe=H("Reflect","ownKeys")||function(t){var e=ke.f(Bt(t)),r=Ie.f;return r?_e(e,r(t)):e},Me=function(t,e,r){for(var n=Fe(e),o=Ht.f,i=Ft.f,u=0;u<n.length;u++){var a=n[u];ht(t,a)||r&&ht(r,a)||o(t,a,i(e,a))}},De=/#|\.prototype\./,ze=function(t,e){var r=Le[Be(t)];return r==Ve||r!=Ne&&(G(e)?m(e):!!e)},Be=ze.normalize=function(t){return String(t).replace(De,".").toLowerCase()},Le=ze.data={},Ne=ze.NATIVE="N",Ve=ze.POLYFILL="P",Ge=ze,$e=Ft.f,qe=function(t,e){var r,n,o,i,u,a=t.target,c=t.global,f=t.stat;if(r=c?g:f?g[a]||ct(a,{}):(g[a]||{}).prototype)for(n in e){if(i=e[n],o=t.noTargetGet?(u=$e(r,n))&&u.value:r[n],!Ge(c?n:a+(f?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Me(i,o)}(t.sham||o&&o.sham)&&Ut(i,"sham",!0),ve(r,n,i,t)}},He=Object.keys||function(t){return xe(t,Ae)},Ue=I(E.f),We=I([].push),Xe=function(t){return function(e){for(var r,n=V(e),o=He(n),i=o.length,u=0,a=[];i>u;)r=o[u++],w&&!Ue(n,r)||We(a,t?[r,n[r]]:n[r]);return a}},Ke={entries:Xe(!0),values:Xe(!1)}.entries;qe({target:"Object",stat:!0},{entries:function(t){return Ke(t)}});var Qe=I(I.bind),Ye=Array.isArray||function(t){return"Array"==M(t)},Je={};Je[Tt("toStringTag")]="z";var Ze="[object z]"===String(Je),tr=Tt("toStringTag"),er=g.Object,rr="Arguments"==M(function(){return arguments}()),nr=Ze?M:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=er(t),tr))?r:rr?M(e):"Object"==(n=M(e))&&G(e.callee)?"Arguments":n},or=function(){},ir=[],ur=H("Reflect","construct"),ar=/^\s*(?:class|function)\b/,cr=I(ar.exec),fr=!ar.exec(or),lr=function(t){if(!G(t))return!1;try{return ur(or,ir,t),!0}catch(t){return!1}},sr=function(t){if(!G(t))return!1;switch(nr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fr||!!cr(ar,ee(t))}catch(t){return!0}};sr.sham=!0;var pr,dr=!ur||m((function(){var t;return lr(lr.call)||!lr(Object)||!lr((function(){t=!0}))||t}))?sr:lr,yr=Tt("species"),hr=g.Array,br=function(t,e){return new(function(t){var e;return Ye(t)&&(e=t.constructor,(dr(e)&&(e===hr||Ye(e.prototype))||$(e)&&null===(e=e[yr]))&&(e=void 0)),void 0===e?hr:e}(t))(0===e?0:e)},vr=I([].push),gr=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,f,l,s){for(var p,d,y=dt(c),h=B(y),b=function(t,e){return it(t),void 0===e?t:O?Qe(t,e):function(){return t.apply(e,arguments)}}(f,l),v=Te(h),g=0,m=s||br,w=e?m(c,v):r||u?m(c,0):void 0;v>g;g++)if((a||g in h)&&(d=b(p=h[g],g,y),t))if(e)w[g]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return g;case 2:vr(w,p)}else switch(t){case 4:return!1;case 7:vr(w,p)}return i?-1:n||o?o:w}},mr={forEach:gr(0),map:gr(1),filter:gr(2),some:gr(3),every:gr(4),find:gr(5),findIndex:gr(6),filterReject:gr(7)},wr=w&&!Mt?Object.defineProperties:function(t,e){Bt(t);for(var r,n=V(e),o=He(e),i=o.length,u=0;i>u;)Ht.f(t,r=o[u++],n[r]);return t},Or={f:wr},jr=H("document","documentElement"),Sr=ie("IE_PROTO"),Tr=function(){},Rr=function(t){return"<script>"+t+"</"+"script>"},Er=function(t){t.write(Rr("")),t.close();var e=t.parentWindow.Object;return t=null,e},Pr=function(){try{pr=new ActiveXObject("htmlfile")}catch(t){}var t,e;Pr="undefined"!=typeof document?document.domain&&pr?Er(pr):((e=kt("iframe")).style.display="none",jr.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Rr("document.F=Object")),t.close(),t.F):Er(pr);for(var r=Ae.length;r--;)delete Pr.prototype[Ae[r]];return Pr()};ue[Sr]=!0;var xr=Object.create||function(t,e){var r;return null!==t?(Tr.prototype=Bt(t),r=new Tr,Tr.prototype=null,r[Sr]=t):r=Pr(),void 0===e?r:Or.f(r,e)},Ar=Tt("unscopables"),Cr=Array.prototype;null==Cr[Ar]&&Ht.f(Cr,Ar,{configurable:!0,value:xr(null)});var kr,Ir=mr.find,_r="find",Fr=!0;_r in[]&&Array(1).find((function(){Fr=!1})),qe({target:"Array",proto:!0,forced:Fr},{find:function(t){return Ir(this,t,arguments.length>1?arguments[1]:void 0)}}),kr=_r,Cr[Ar][kr]=!0;var Mr=Ze?{}.toString:function(){return"[object "+nr(this)+"]"};Ze||ve(Object.prototype,"toString",Mr,{unsafe:!0});var Dr=g.String,zr=function(t){if("Symbol"===nr(t))throw TypeError("Cannot convert a Symbol value to a string");return Dr(t)},Br="\t\n\v\f\r                 \u2028\u2029\ufeff",Lr=I("".replace),Nr="["+Br+"]",Vr=RegExp("^"+Nr+Nr+"*"),Gr=RegExp(Nr+Nr+"*$"),$r=function(t){return function(e){var r=zr(N(e));return 1&t&&(r=Lr(r,Vr,"")),2&t&&(r=Lr(r,Gr,"")),r}},qr={start:$r(1),end:$r(2),trim:$r(3)}.trim,Hr=g.parseInt,Ur=g.Symbol,Wr=Ur&&Ur.iterator,Xr=/^[+-]?0x/i,Kr=I(Xr.exec),Qr=8!==Hr(Br+"08")||22!==Hr(Br+"0x16")||Wr&&!m((function(){Hr(Object(Wr))}))?function(t,e){var r=qr(zr(t));return Hr(r,e>>>0||(Kr(Xr,r)?16:10))}:Hr;qe({global:!0,forced:parseInt!=Qr},{parseInt:Qr});var Yr=Tt("species"),Jr=function(t){return J>=51||!m((function(){var e=[];return(e.constructor={})[Yr]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Zr=mr.filter;qe({target:"Array",proto:!0,forced:!Jr("filter")},{filter:function(t){return Zr(this,t,arguments.length>1?arguments[1]:void 0)}});var tn=function(t,e,r){var n=xt(e);n in t?Ht.f(t,n,P(0,r)):t[n]=r},en=Tt("isConcatSpreadable"),rn=9007199254740991,nn="Maximum allowed index exceeded",on=g.TypeError,un=J>=51||!m((function(){var t=[];return t[en]=!1,t.concat()[0]!==t})),an=Jr("concat"),cn=function(t){if(!$(t))return!1;var e=t[en];return void 0!==e?!!e:Ye(t)};qe({target:"Array",proto:!0,arity:1,forced:!un||!an},{concat:function(t){var e,r,n,o,i,u=dt(this),a=br(u,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(cn(i=-1===e?u:arguments[e])){if(c+(o=Te(i))>rn)throw on(nn);for(r=0;r<o;r++,c++)r in i&&tn(a,c,i[r])}else{if(c>=rn)throw on(nn);tn(a,c++,i)}return a.length=c,a}}),r.default.akottr.dragtable.prototype._restoreState=function(t){for(var e=0,r=0,n=Object.entries(t);r<n.length;r++){var o=s(n[r],2),i=o[0],u=o[1],a=this.originalTable.el.find('th[data-field="'.concat(i,'"]'));a.length?(this.originalTable.startIndex=a.prevAll().length+1,this.originalTable.endIndex=parseInt(u,10)+1-e,this._bubbleCols()):e++}};var fn=function(){Array.prototype.filter||(Array.prototype.filter=function(t){if(null==this)throw new TypeError;var e=Object(this),r=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var n=[],o=arguments.length>=2?arguments[1]:void 0,i=0;i<r;i++)if(i in e){var u=e[i];t.call(o,u,i,e)&&n.push(u)}return n})};r.default.extend(r.default.fn.bootstrapTable.defaults,{reorderableColumns:!1,maxMovingRows:10,onReorderColumn:function(t){return!1},dragaccept:null}),r.default.extend(r.default.fn.bootstrapTable.Constructor.EVENTS,{"reorder-column.bs.table":"onReorderColumn"}),r.default.fn.bootstrapTable.methods.push("orderColumns"),r.default.BootstrapTable=function(t){!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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(p,t);var e,a,f,s=c(p);function p(){return n(this,p),s.apply(this,arguments)}return e=p,a=[{key:"initHeader",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];(t=l(i(p.prototype),"initHeader",this)).call.apply(t,[this].concat(r)),this.options.reorderableColumns&&this.makeRowsReorderable()}},{key:"_toggleColumn",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];(t=l(i(p.prototype),"_toggleColumn",this)).call.apply(t,[this].concat(r)),this.options.reorderableColumns&&this.makeRowsReorderable()}},{key:"toggleView",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];(t=l(i(p.prototype),"toggleView",this)).call.apply(t,[this].concat(r)),this.options.reorderableColumns&&(this.options.cardView||this.makeRowsReorderable())}},{key:"resetView",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];(t=l(i(p.prototype),"resetView",this)).call.apply(t,[this].concat(r)),this.options.reorderableColumns&&this.makeRowsReorderable()}},{key:"makeRowsReorderable",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{r.default(this.$el).dragtable("destroy")}catch(t){}r.default(this.$el).dragtable({maxMovingRows:this.options.maxMovingRows,dragaccept:this.options.dragaccept,clickDelay:200,dragHandle:".th-inner",restoreState:e||this.columnsSortOrder,beforeStop:function(e){var n={};e.el.find("th").each((function(t,e){n[r.default(e).data("field")]=t})),t.columnsSortOrder=n,t.options.cookie&&t.persistReorderColumnsState(t);var o=[],i=[],u=[],a=[],c=-1,f=[];if(t.$header.find("th:not(.detail)").each((function(t,e){o.push(r.default(e).data("field")),i.push(r.default(e).data("formatter"))})),o.length<t.columns.length){a=t.columns.filter((function(t){return!t.visible}));for(var l=0;l<a.length;l++)o.push(a[l].field),i.push(a[l].formatter)}for(var s=0;s<o.length;s++)-1!==(c=t.fieldsColumnsIndex[o[s]])&&(t.fieldsColumnsIndex[o[s]]=s,t.columns[c].fieldIndex=s,u.push(t.columns[c]));t.columns=u,fn(),r.default.each(t.columns,(function(e,r){var n=!1,o=r.field;t.options.columns[0].filter((function(t){return!(!n&&t.field===o&&(f.push(t),n=!0,1))}))})),t.options.columns[0]=f,t.header.fields=o,t.header.formatters=i,t.initHeader(),t.initToolbar(),t.initSearchText(),t.initBody(),t.resetView(),t.trigger("reorder-column",o)}})}},{key:"orderColumns",value:function(t){this.columnsSortOrder=t,this.makeRowsReorderable()}}],a&&o(e.prototype,a),f&&o(e,f),Object.defineProperty(e,"prototype",{writable:!1}),p}(r.default.BootstrapTable)}));