/*! StateRestore 1.1.0 2019-2022 SpryMedia Ltd - datatables.net/license */ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.owns=function(h,r){return Object.prototype.hasOwnProperty.call(h,r)};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(h,r,g){if(h==Array.prototype||h==Object.prototype)return h;h[r]=g.value;return h}; $jscomp.getGlobal=function(h){h=["object"==typeof globalThis&&globalThis,h,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var r=0;rg&&(g=Math.max(g+u,0));g'),closeButton:g('
x
'),confirmation:g('
'),confirmationTitleRow:g('
'),dtContainer:g(this.s.dt.table().container()),duplicateError:g(''+this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError)+""),emptyError:g(''+this.s.dt.i18n("stateRestore.emptyError",this.c.i18n.emptyError)+""),removeContents:g('
'+this.s.dt.i18n("stateRestore.removeConfirm",this.c.i18n.removeConfirm).replace(/%s/g,this.s.identifier)+"
"),removeError:g(''+this.s.dt.i18n("stateRestore.removeError",this.c.i18n.removeError)+""),removeTitle:g('

'+this.s.dt.i18n("stateRestore.removeTitle", this.c.i18n.removeTitle)+"

"),renameContents:g('
"),renameInput:g(''),renameTitle:g('

'+this.s.dt.i18n("stateRestore.renameTitle",this.c.i18n.renameTitle)+ "

")};this.save(f,b)}q.prototype.remove=function(a){var c,d=this;void 0===a&&(a=!1);if(!this.c.remove)return!1;var f,k={action:"remove",stateRestore:(c={},c[this.s.identifier]=this.s.savedState,c)},b=function(){d.dom.confirmation.trigger("dtsr-remove");g(d.s.dt.table().node()).trigger("stateRestore-change")};this.c.ajax?"string"===typeof this.c.ajax&&this.s.dt.settings()[0]._bInitComplete?f=function(){g.ajax({data:k,success:b,type:"POST",url:d.c.ajax});return!0}:"function"===typeof this.c.ajax&& (f=function(){"function"===typeof d.c.ajax&&d.c.ajax.call(d.s.dt,k,b);return!0}):f=function(){try{localStorage.removeItem("DataTables_stateRestore_"+d.s.identifier+"_"+location.pathname),b()}catch(e){return"remove"}return!0};a?(this.dom.confirmation.appendTo(this.dom.dtContainer),g(this.s.dt.table().node()).trigger("dtsr-modal-inserted"),f(),this.dom.confirmation.remove()):this._newModal(this.dom.removeTitle,this.s.dt.i18n("stateRestore.removeSubmit",this.c.i18n.removeSubmit),f,this.dom.removeContents); return!0};q.prototype.compare=function(a){this.c.saveState.order||(a.order=void 0);this.c.saveState.search||(a.search=void 0);if(this.c.saveState.columns&&a.columns)for(var c=0,d=a.columns.length;c'+d.s.dt.i18n("stateRestore.removeConfirm",d.c.i18n.removeConfirm).replace(/%s/g,d.s.identifier)+"
");d.dom.confirmation.trigger("dtsr-rename")}; if(d.c.ajax)"string"===typeof d.c.ajax&&d.s.dt.settings()[0]._bInitComplete?g.ajax({data:b,success:k,type:"POST",url:d.c.ajax}):"function"===typeof d.c.ajax&&d.c.ajax.call(d.s.dt,b,k);else try{localStorage.removeItem("DataTables_stateRestore_"+d.s.identifier+"_"+location.pathname),k()}catch(e){return!1}return!0};if(null!==a){if(c.includes(a))throw Error(this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError));if(0===a.length)throw Error(this.s.dt.i18n("stateRestore.emptyError",this.c.i18n.emptyError)); this.dom.confirmation.appendTo(this.dom.dtContainer);g(this.s.dt.table().node()).trigger("dtsr-modal-inserted");f();this.dom.confirmation.remove()}else this.dom.renameInput.val(this.s.identifier),this.dom.renameContents.append(this.dom.renameInput),this._newModal(this.dom.renameTitle,this.s.dt.i18n("stateRestore.renameButton",this.c.i18n.renameButton),f,this.dom.renameContents)}};q.prototype.save=function(a,c,d){var f,k=this;void 0===d&&(d=!0);if(this.c.save){this.s.dt.state.save();if(void 0===a)a= this.s.dt.state();else if("object"!==typeof a)return;a.stateRestore?(a.stateRestore.isPreDefined=this.s.isPreDefined,a.stateRestore.state=this.s.identifier):a.stateRestore={isPreDefined:this.s.isPreDefined,state:this.s.identifier};this.s.savedState=a;this.c.saveState.order||(this.s.savedState.order=void 0);this.c.saveState.search||(this.s.savedState.search=void 0);if(this.c.saveState.columns&&this.s.savedState.columns){a=0;for(var b=this.s.savedState.columns.length;aa[1].length?0:1;for(c=0;c'+c+"");this.dom.confirmation.empty().append(this.dom.confirmationTitleRow).append(f).append(g('
').append(b)).appendTo(this.dom.dtContainer);g(this.s.dt.table().node()).trigger("dtsr-modal-inserted");a=f.children("input");0'),closeButton:m('
x
'),colReorderToggle:m('
"),columnsSearchToggle:m('
"),columnsVisibleToggle:m('
"),confirmation:m('
'),confirmationTitleRow:m('
'),createButtonRow:m('
"),creation:m('
'),creationForm:m('
'),creationTitle:m('

'+this.s.dt.i18n("stateRestore.creationModal.title",this.c.i18n.creationModal.title)+"

"),dtContainer:m(this.s.dt.table().container()),duplicateError:m(''+this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError)+ ""),emptyError:m(''+this.s.dt.i18n("stateRestore.emptyError",this.c.i18n.emptyError)+""),nameInputRow:m('
'),orderToggle:m('
"),pagingToggle:m('
"),removeContents:m('
'),removeTitle:m('

'+this.s.dt.i18n("stateRestore.removeTitle",this.c.i18n.removeTitle)+"

"),scrollerToggle:m('
"),searchBuilderToggle:m('
"),searchPanesToggle:m('
"),searchToggle:m('
"),selectToggle:m('
"),toggleLabel:m('")};a.settings()[0]._stateRestore=this;this._searchForStates();this._addPreDefined(this.c.preDefined);var f,k={action:"load"};"function"===typeof this.c.ajax?f=function(){"function"===typeof d.c.ajax&&d.c.ajax.call(d.s.dt,k,function(b){return d._addPreDefined(b)})}:"string"===typeof this.c.ajax&&(f=function(){m.ajax({data:k,success:function(b){d._addPreDefined(b)},type:"POST",url:d.c.ajax})}); if("function"===typeof f)if(this.s.dt.settings()[0]._bInitComplete)f();else this.s.dt.one("preInit.dtsr",function(){f()});this.s.dt.on("destroy.dtsr",function(){d.destroy()});this.s.dt.on("draw.dtsr buttons-action.dtsr",function(){return d.findActive()});return this}}q.prototype.addState=function(a,c,d){var f=this;if(this.c.create&&this.c.save){var k=function(b,e){if(0===b.length)return"empty";if(c.includes(b))return"duplicate";f.s.dt.state.save();var l=f.s.dt.state();l.stateRestore={isPredefined:!1, state:b,tableId:f.s.dt.table().node().id};var p=new u(f.s.dt.settings()[0],m.extend(!0,{},f.c,e,d),b,l,!1,function(){f.s.states.push(this);f._collectionRebuild()});m(f.s.dt.table().node()).on("dtsr-modal-inserted",function(){p.dom.confirmation.one("dtsr-remove",function(){return f._removeCallback(p.s.identifier)});p.dom.confirmation.one("dtsr-rename",function(){return f._collectionRebuild()});p.dom.confirmation.one("dtsr-save",function(){return f._collectionRebuild()})});return!0};if(null===this.getState(a))if(this.c.creationModal|| void 0!==d&&d.creationModal)this._creationModal(k,a,d);else{a=k(a,{});if("empty"===a)throw Error(this.s.dt.i18n("stateRestore.emptyError",this.c.i18n.emptyError));if("duplicate"===a)throw Error(this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError));}else throw Error(this.s.dt.i18n("stateRestore.duplicateError",this.c.i18n.duplicateError));}};q.prototype.removeAll=function(a){if(0!==this.s.states.length){var c=this.s.states.map(function(f){return f.s.identifier}),d=c[0];1l?1:e'+this.s.dt.i18n("stateRestore.emptyStates", this.c.i18n.emptyStates)+"");else{this.s.states=this.s.states.sort(function(b,e){b=b.s.identifier;e=e.s.identifier;return b>e?1:b"+f.s.identifier+"")&&k.unshift("

"+f.s.identifier+"

");a.push({_stateRestore:f,attr:{title:f.s.identifier},config:{split:k},extend:"stateRestore",text:f.s.identifier})}}this.s.dt.button("SaveStateRestore:name").collectionRebuild(a)};q.prototype._creationModal=function(a,c,d){var f=this;this.dom.creation.empty();this.dom.creationForm.empty();this.dom.nameInputRow.children("input").val(c);this.dom.creationForm.append(this.dom.nameInputRow); var k=this.s.dt.settings()[0].oInit;c=[];var b=void 0!==d&&void 0!==d.toggle;((!b||void 0===d.toggle.order)&&this.c.toggle.order||b&&d.toggle.order)&&this.c.saveState.order&&(void 0===k.ordering||k.ordering)&&c.push(this.dom.orderToggle);((!b||void 0===d.toggle.search)&&this.c.toggle.search||b&&d.toggle.search)&&this.c.saveState.search&&(void 0===k.searching||k.searching)&&c.push(this.dom.searchToggle);((!b||void 0===d.toggle.paging)&&this.c.toggle.paging||b&&d.toggle.paging)&&this.c.saveState.paging&& (void 0===k.paging||k.paging)&&c.push(this.dom.pagingToggle);this.s.hasColReorder&&((!b||void 0===d.toggle.colReorder)&&this.c.toggle.colReorder||b&&d.toggle.colReorder)&&this.c.saveState.colReorder&&c.push(this.dom.colReorderToggle);this.s.hasScroller&&((!b||void 0===d.toggle.scroller)&&this.c.toggle.scroller||b&&d.toggle.scroller)&&this.c.saveState.scroller&&c.push(this.dom.scrollerToggle);this.s.hasSearchBuilder&&((!b||void 0===d.toggle.searchBuilder)&&this.c.toggle.searchBuilder||b&&d.toggle.searchBuilder)&& this.c.saveState.searchBuilder&&c.push(this.dom.searchBuilderToggle);this.s.hasSearchPanes&&((!b||void 0===d.toggle.searchPanes)&&this.c.toggle.searchPanes||b&&d.toggle.searchPanes)&&this.c.saveState.searchPanes&&c.push(this.dom.searchPanesToggle);this.s.hasSelect&&((!b||void 0===d.toggle.select)&&this.c.toggle.select||b&&d.toggle.select)&&this.c.saveState.select&&c.push(this.dom.selectToggle);"boolean"===typeof this.c.toggle.columns&&((!b||void 0===d.toggle.order)&&this.c.toggle.columns||b&&d.toggle.order)&& this.c.saveState.columns?(c.push(this.dom.columnsSearchToggle),c.push(this.dom.columnsVisibleToggle)):(b&&void 0!==d.toggle.columns||"boolean"===typeof this.c.toggle.columns)&&"boolean"===typeof d.toggle.order||("boolean"!==typeof this.c.saveState.columns&&this.c.saveState.columns?((b&&void 0!==d.toggle.columns&&"boolean"!==typeof d.toggle.columns&&d.toggle.columns.search||(!b||void 0===d.toggle.columns||"boolean"!==typeof d.toggle.columns&&void 0===d.toggle.columns.search)&&"boolean"!==typeof this.c.toggle.columns&& this.c.toggle.columns.search)&&this.c.saveState.columns.search&&c.push(this.dom.columnsSearchToggle),(b&&void 0!==d.toggle.columns&&"boolean"!==typeof d.toggle.columns&&d.toggle.columns.visible||(!b||void 0===d.toggle.columns||"boolean"!==typeof d.toggle.columns&&void 0===d.toggle.columns.visible)&&"boolean"!==typeof this.c.toggle.columns&&this.c.toggle.columns.visible)&&this.c.saveState.columns.visible&&c.push(this.dom.columnsVisibleToggle)):this.c.saveState.columns&&(c.push(this.dom.columnsSearchToggle), c.push(this.dom.columnsVisibleToggle)));c.sort(function(n,v){n=n.children("label.dtsr-check-label")[0].innerHTML;v=v.children("label.dtsr-check-label")[0].innerHTML;return nv?1:0});for(k=0;k'+c+"");this.dom.confirmation.empty().append(this.dom.confirmationTitleRow).append(f).append(m('
').append(b)).appendTo(this.dom.dtContainer);m(this.s.dt.table().node()).trigger("dtsr-modal-inserted");a=f.children("input");0'+b.i18n("stateRestore.emptyStates",e.c.i18n.emptyStates)+"");else for(e=0;e"+v.s.identifier+"")&&w.unshift("

"+v.s.identifier+"

");p.push({_stateRestore:v,attr:{title:v.s.identifier},config:{split:w},extend:"stateRestore",text:v.s.identifier})}b.button("SaveStateRestore:name").collectionRebuild(p)}h(q);r(q);var k=q.fn.dataTable;q.fn.dataTable.StateRestore=u;q.fn.DataTable.StateRestore= u;q.fn.dataTable.StateRestoreCollection=C;q.fn.DataTable.StateRestoreCollection=C;a=q.fn.dataTable.Api.register;a("stateRestore()",function(){return this});a("stateRestore.state()",function(b){var e=this.context[0];if(!e._stateRestore){var l=q.fn.DataTable.Api(e),p=new q.fn.dataTable.StateRestoreCollection(l,{});f(l,p)}this[0]=e._stateRestore.getState(b);return this});a("stateRestore.state.add()",function(b,e){var l=this.context[0];if(!l._stateRestore){var p=q.fn.DataTable.Api(l),n=new q.fn.dataTable.StateRestoreCollection(p, {});f(p,n)}if(!l._stateRestore.c.create)return this;if(l._stateRestore.addState){p=[];n=0;for(var v=l._stateRestore.s.states;n+y?-1:0})[0];e.stateRestore.state.add(e.i18n("buttons.stateRestore","State %d",void 0!==n?n+1:1),p.config);p=e.stateRestore.states().sort(function(z,y){z=+E(z.s.identifier); y=+E(y.s.identifier);return z>y?1:z"+A.s.identifier+"")&&n.unshift("

"+A.s.identifier+"

"),v.push({_stateRestore:A, attr:{title:A.s.identifier},config:{split:n},extend:"stateRestore",text:A.s.identifier});e.button("SaveStateRestore:name").collectionRebuild(v);l.blur()}},init:function(b,e,l){void 0===b.settings()[0]._stateRestore&&1