PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 All 140 releases
← All changes | assets/dist/js/admin/admin-tools.min.js +1 -1 4.4.8 → 4.4.9 View file →
@@ -1 +1 @@
1 -(()=>{var e={6979(e,t,s){"use strict";const o="lp-hidden",n="loading",i=(e,t={},s={})=>{"function"==typeof s.before&&s.before(),fetch(e,{method:"GET",...t}).then(e=>e.json()).then(e=>{"function"==typeof s.success&&s.success(e)}).catch(e=>{"function"==typeof s.error&&s.error(e)}).finally(()=>{"function"==typeof s.completed&&s.completed()})},r=(e,t=0)=>{e&&(t?e.classList.remove(o):e.classList.add(o))},a=(e,t)=>{e&&(t?e.classList.add(n):e.classList.remove(n))},l=e=>{const t={},s=new FormData(e);for(const e of s.entries()){const o=e[0],n=s.getAll(o);t.hasOwnProperty(o)||(t[o]=n.join(","))}return t},c=(e,t)=>{const s=l(e);return(e=>{const t=[],s=e.elements;for(let e=0;e<s.length;e++){const o=s[e].name;o&&!t.includes(o)&&t.push(o)}return t})(e).forEach(e=>{s.hasOwnProperty(e)?""===s[e][0]&&(delete s[e],delete t[e]):delete t[e]}),t={...t,...s}},d=(e,t)=>{document.addEventListener(e,s=>{const o=s.target;let n={e:s,target:o};t.forEach(t=>{n={...n,...t},t.conditionBeforeCallBack&&!0!==t.conditionBeforeCallBack(n)||"keydown"===e&&t.checkIsEventEnter&&"Enter"!==s.key||o.closest(t.selector)&&(t.class?t.class[t.callBack](n):t.callBack(n))})})},u=(e,t=500)=>{let s;return o=>{clearTimeout(s),s=setTimeout(()=>e(o),t)}};function p(e,t){e.split(/\s+/).forEach(e=>{t(e)})}window.lpToggleEnableInit=0,window.lpFullScreenViewInit=0;class h{constructor(){this._events={}}on(e,t){p(e,e=>{const s=this._events[e]||[];s.push(t),this._events[e]=s})}off(e,t){var s=arguments.length;0!==s?p(e,e=>{if(1===s)return void delete this._events[e];const o=this._events[e];void 0!==o&&(o.splice(o.indexOf(t),1),this._events[e]=o)}):this._events={}}trigger(e,...t){var s=this;p(e,e=>{const o=s._events[e];void 0!==o&&o.forEach(e=>{e.apply(s,t)})})}}const m=e=>(e=e.filter(Boolean)).length<2?e[0]||"":1==b(e)?"["+e.join("")+"]":"(?:"+e.join("|")+")",w=e=>{if(!f(e))return e.join("");let t="",s=0;const o=()=>{s>1&&(t+="{"+s+"}")};return e.forEach((n,i)=>{n!==e[i-1]?(o(),t+=n,s=1):s++}),o(),t},g=e=>{let t=Array.from(e);return m(t)},f=e=>new Set(e).size!==e.length,v=e=>(e+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),b=e=>e.reduce((e,t)=>Math.max(e,y(t)),0),y=e=>Array.from(e).length,k=e=>{if(1===e.length)return[[e]];let t=[];const s=e.substring(1);return k(s).forEach(function(s){let o=s.slice(0);o[0]=e.charAt(0)+o[0],t.push(o),o=s.slice(0),o.unshift(e.charAt(0)),t.push(o)}),t},x=[[0,65535]];let C,A;const S={},O={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let e in O){let t=O[e]||"";for(let s=0;s<t.length;s++){let o=t.substring(s,s+1);S[o]=e}}const I=new RegExp(Object.keys(S).join("|")+"|[̀-ͯ·ʾʼ]","gu"),L=(e,t="NFKD")=>e.normalize(t),E=e=>Array.from(e).reduce((e,t)=>e+T(t),""),T=e=>(e=L(e).toLowerCase().replace(I,e=>S[e]||""),L(e,"NFC")),P=e=>{const t=(e=>{const t={},s=(e,s)=>{const o=t[e]||new Set,n=new RegExp("^"+g(o)+"$","iu");s.match(n)||(o.add(v(s)),t[e]=o)};for(let t of function*(e){for(const[t,s]of e)for(let e=t;e<=s;e++){let t=String.fromCharCode(e),s=E(t);s!=t.toLowerCase()&&(s.length>3||0!=s.length&&(yield{folded:s,composed:t,code_point:e}))}}(e))s(t.folded,t.folded),s(t.folded,t.composed);return t})(e),s={};let o=[];for(let e in t){let n=t[e];n&&(s[e]=g(n)),e.length>1&&o.push(v(e))}o.sort((e,t)=>t.length-e.length);const n=m(o);return A=new RegExp("^"+n,"u"),s},_=(e,t=1)=>(t=Math.max(t,e.length-1),m(k(e).map(e=>((e,t=1)=>{let s=0;return e=e.map(e=>(C[e]&&(s+=e.length),C[e]||e)),s>=t?w(e):""})(e,t)))),B=(e,t=!0)=>{let s=e.length>1?1:0;return m(e.map(e=>{let o=[];const n=t?e.length():e.length()-1;for(let t=0;t<n;t++)o.push(_(e.substrs[t]||"",s));return w(o)}))},$=(e,t)=>{for(const s of t){if(s.start!=e.start||s.end!=e.end)continue;if(s.substrs.join("")!==e.substrs.join(""))continue;let t=e.parts;const o=e=>{for(const s of t){if(s.start===e.start&&s.substr===e.substr)return!1;if(1!=e.length&&1!=s.length){if(e.start<s.start&&e.end>s.start)return!0;if(s.start<e.start&&s.end>e.start)return!0}}return!1};if(!(s.parts.filter(o).length>0))return!0}return!1};class F{parts;substrs;start;end;constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(e){e&&(this.parts.push(e),this.substrs.push(e.substr),this.start=Math.min(e.start,this.start),this.end=Math.max(e.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(e,t){let s=new F,o=JSON.parse(JSON.stringify(this.parts)),n=o.pop();for(const e of o)s.add(e);let i=t.substr.substring(0,e-n.start),r=i.length;return s.add({start:n.start,end:n.start+r,length:r,substr:i}),s}}const q=(e,t)=>{if(e)return e[t]},M=(e,t)=>{if(e){for(var s,o=t.split(".");(s=o.shift())&&(e=e[s]););return e}},H=(e,t,s)=>{var o,n;return e?(e+="",null==t.regex||-1===(n=e.search(t.regex))?0:(o=t.string.length/e.length,0===n&&(o+=.5),o*s)):0},j=(e,t)=>{var s=e[t];if("function"==typeof s)return s;s&&!Array.isArray(s)&&(e[t]=[s])},D=(e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var s in e)e.hasOwnProperty(s)&&t(e[s],s)},N=(e,t)=>"number"==typeof e&&"number"==typeof t?e>t?1:e<t?-1:0:(e=E(e+"").toLowerCase())>(t=E(t+"").toLowerCase())?1:t>e?-1:0;class V{items;settings;constructor(e,t){this.items=e,this.settings=t||{diacritics:!0}}tokenize(e,t,s){if(!e||!e.length)return[];const o=[],n=e.split(/\s+/);var i;return s&&(i=new RegExp("^("+Object.keys(s).map(v).join("|")+"):(.*)$")),n.forEach(e=>{let s,n=null,r=null;i&&(s=e.match(i))&&(n=s[1],e=s[2]),e.length>0&&(r=this.settings.diacritics?(e=>{void 0===C&&(C=P(x)),e=E(e);let t="",s=[new F];for(let o=0;o<e.length;o++){let n=e.substring(o).match(A);const i=e.substring(o,o+1),r=n?n[0]:null;let a=[],l=new Set;for(const e of s){const t=e.last();if(!t||1==t.length||t.end<=o)if(r){const t=r.length;e.add({start:o,end:o+t,length:t,substr:r}),l.add("1")}else e.add({start:o,end:o+1,length:1,substr:i}),l.add("2");else if(r){let s=e.clone(o,t);const n=r.length;s.add({start:o,end:o+n,length:n,substr:r}),a.push(s)}else l.add("3")}if(a.length>0){a=a.sort((e,t)=>e.length()-t.length());for(let e of a)$(e,s)||s.push(e)}else if(o>0&&1==l.size&&!l.has("3")){t+=B(s,!1);let e=new F;const o=s[0];o&&e.add(o.last()),s=[e]}}return t+=B(s,!0),t})(e)||null:v(e),r&&t&&(r="\\b"+r)),o.push({string:e,regex:r?new RegExp(r,"iu"):null,field:n})}),o}getScoreFunction(e,t){var s=this.prepareSearch(e,t);return this._getScoreFunction(s)}_getScoreFunction(e){const t=e.tokens,s=t.length;if(!s)return function(){return 0};const o=e.options.fields,n=e.weights,i=o.length,r=e.getAttrFn;if(!i)return function(){return 1};const a=1===i?function(e,t){const s=o[0].field;return H(r(t,s),e,n[s]||1)}:function(e,t){var s=0;if(e.field){const o=r(t,e.field);!e.regex&&o?s+=1/i:s+=H(o,e,1)}else D(n,(o,n)=>{s+=H(r(t,n),e,o)});return s/i};return 1===s?function(e){return a(t[0],e)}:"and"===e.options.conjunction?function(e){var o,n=0;for(let s of t){if((o=a(s,e))<=0)return 0;n+=o}return n/s}:function(e){var o=0;return D(t,t=>{o+=a(t,e)}),o/s}}getSortFunction(e,t){var s=this.prepareSearch(e,t);return this._getSortFunction(s)}_getSortFunction(e){var t,s=[];const o=this,n=e.options,i=!e.query&&n.sort_empty?n.sort_empty:n.sort;if("function"==typeof i)return i.bind(this);const r=function(t,s){return"$score"===t?s.score:e.getAttrFn(o.items[s.id],t)};if(i)for(let t of i)(e.query||"$score"!==t.field)&&s.push(t);if(e.query){t=!0;for(let e of s)if("$score"===e.field){t=!1;break}t&&s.unshift({field:"$score",direction:"desc"})}else s=s.filter(e=>"$score"!==e.field);return s.length?function(e,t){var o,n;for(let i of s)if(n=i.field,o=("desc"===i.direction?-1:1)*N(r(n,e),r(n,t)))return o;return 0}:null}prepareSearch(e,t){const s={};var o=Object.assign({},t);if(j(o,"sort"),j(o,"sort_empty"),o.fields){j(o,"fields");const e=[];o.fields.forEach(t=>{"string"==typeof t&&(t={field:t,weight:1}),e.push(t),s[t.field]="weight"in t?t.weight:1}),o.fields=e}return{options:o,query:e.toLowerCase().trim(),tokens:this.tokenize(e,o.respect_word_boundaries,s),total:0,items:[],weights:s,getAttrFn:o.nesting?M:q}}search(e,t){var s,o,n=this;o=this.prepareSearch(e,t),t=o.options,e=o.query;const i=t.score||n._getScoreFunction(o);e.length?D(n.items,(e,n)=>{s=i(e),(!1===t.filter||s>0)&&o.items.push({score:s,id:n})}):D(n.items,(e,t)=>{o.items.push({score:1,id:t})});const r=n._getSortFunction(o);return r&&o.items.sort(r),o.total=o.items.length,"number"==typeof t.limit&&(o.items=o.items.slice(0,t.limit)),o}}const z=e=>null==e?null:R(e),R=e=>"boolean"==typeof e?e?"1":"0":e+"",X=e=>(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),J=(e,t)=>{var s;return function(o,n){var i=this;s&&(i.loading=Math.max(i.loading-1,0),clearTimeout(s)),s=setTimeout(function(){s=null,i.loadedSearches[o]=!0,e.call(i,o,n)},t)}},G=(e,t,s)=>{var o,n=e.trigger,i={};for(o of(e.trigger=function(){var s=arguments[0];if(-1===t.indexOf(s))return n.apply(e,arguments);i[s]=arguments},s.apply(e,[]),e.trigger=n,t))o in i&&n.apply(e,i[o])},U=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},W=(e,t,s,o)=>{e.addEventListener(t,s,o)},K=(e,t)=>!!t&&!!t[e]&&1==(t.altKey?1:0)+(t.ctrlKey?1:0)+(t.shiftKey?1:0)+(t.metaKey?1:0),Y=(e,t)=>e.getAttribute("id")||(e.setAttribute("id",t),t),Z=e=>e.replace(/[\\"']/g,"\\$&"),Q=(e,t)=>{t&&e.append(t)},ee=(e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var s in e)e.hasOwnProperty(s)&&t(e[s],s)},te=e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(se(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)},se=e=>"string"==typeof e&&e.indexOf("<")>-1,oe=(e,t)=>{var s=document.createEvent("HTMLEvents");s.initEvent(t,!0,!1),e.dispatchEvent(s)},ne=(e,t)=>{Object.assign(e.style,t)},ie=(e,...t)=>{var s=ae(t);(e=le(e)).map(e=>{s.map(t=>{e.classList.add(t)})})},re=(e,...t)=>{var s=ae(t);(e=le(e)).map(e=>{s.map(t=>{e.classList.remove(t)})})},ae=e=>{var t=[];return ee(e,e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(t=t.concat(e))}),t.filter(Boolean)},le=e=>(Array.isArray(e)||(e=[e]),e),ce=(e,t,s)=>{if(!s||s.contains(e))for(;e&&e.matches;){if(e.matches(t))return e;e=e.parentNode}},de=(e,t=0)=>t>0?e[e.length-1]:e[0],ue=(e,t)=>{if(!e)return-1;t=t||e.nodeName;for(var s=0;e=e.previousElementSibling;)e.matches(t)&&s++;return s},pe=(e,t)=>{ee(t,(t,s)=>{null==t?e.removeAttribute(s):e.setAttribute(s,""+t)})},he=(e,t)=>{e.parentNode&&e.parentNode.replaceChild(t,e)},me="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey",we={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,clearAfterSelect:!1,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'<input type="text" autocomplete="off" size="1" />',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(e){return e.length>0},render:{}};function ge(e,t){var s=Object.assign({},we,t),o=s.dataAttr,n=s.labelField,i=s.valueField,r=s.disabledField,a=s.optgroupField,l=s.optgroupLabelField,c=s.optgroupValueField,d=e.tagName.toLowerCase(),u=e.getAttribute("placeholder")||e.getAttribute("data-placeholder");if(!u&&!s.allowEmptyOption){let t=e.querySelector('option[value=""]');t&&(u=t.textContent)}var p={placeholder:u,options:[],optgroups:[],items:[],maxItems:null};return"select"===d?(()=>{var t,d=p.options,u={},h=1;let m=0;var w=e=>{var t=Object.assign({},e.dataset),s=o&&t[o];return"string"==typeof s&&s.length&&(t=Object.assign(t,JSON.parse(s))),t},g=(e,t)=>{var o=z(e.value);if(null!=o&&(o||s.allowEmptyOption)){if(u.hasOwnProperty(o)){if(t){var l=u[o][a];l?Array.isArray(l)?l.push(t):u[o][a]=[l,t]:u[o][a]=t}}else{var c=w(e);c[n]=c[n]||e.textContent,c[i]=c[i]||o,c[r]=c[r]||e.disabled,c[a]=c[a]||t,c.$option=e,c.$order=c.$order||++m,u[o]=c,d.push(c)}e.selected&&p.items.push(o)}};p.maxItems=e.hasAttribute("multiple")?null:1,ee(e.children,e=>{var s,o,n;"optgroup"===(t=e.tagName.toLowerCase())?((n=w(s=e))[l]=n[l]||s.getAttribute("label")||"",n[c]=n[c]||h++,n[r]=n[r]||s.disabled,n.$order=n.$order||++m,p.optgroups.push(n),o=n[c],ee(s.children,e=>{g(e,o)})):"option"===t&&g(e)})})():(()=>{var t,r;const a=e.getAttribute(o);if(a)p.options=JSON.parse(a),ee(p.options,e=>{p.items.push(e[i])});else{var l=null!==(r=null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.trim())&&void 0!==r?r:"";if(!s.allowEmptyOption&&!l.length)return;const o=l.split(s.delimiter);ee(o,e=>{const t={};t[n]=e,t[i]=e,p.options.push(t)}),p.items=o}})(),Object.assign({},we,p,t)}var fe=0;class ve extends(function(e){return e.plugins={},class extends e{constructor(){super(...arguments),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(t,s){e.plugins[t]={name:t,fn:s}}initializePlugins(e){var t,s;const o=this,n=[];if(Array.isArray(e))e.forEach(e=>{"string"==typeof e?n.push(e):(o.plugins.settings[e.name]=e.options,n.push(e.name))});else if(e)for(t in e)e.hasOwnProperty(t)&&(o.plugins.settings[t]=e[t],n.push(t));for(;s=n.shift();)o.require(s)}loadPlugin(t){var s=this,o=s.plugins,n=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');o.requested[t]=!0,o.loaded[t]=n.fn.apply(s,[s.plugins.settings[t]||{}]),o.names.push(t)}require(e){var t=this,s=t.plugins;if(!t.plugins.loaded.hasOwnProperty(e)){if(s.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")');t.loadPlugin(e)}return s.loaded[e]}}}(h)){constructor(e,t){var s;super(),this.order=0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.isDropdownContentStale=!0,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,fe++;var o=te(e);if(o.tomselect)throw new Error("Tom Select already initialized on this element");o.tomselect=this,s=(window.getComputedStyle&&window.getComputedStyle(o,null)).getPropertyValue("direction");const n=ge(o,t);this.settings=n,this.input=o,this.tabIndex=o.tabIndex||0,this.is_select_tag="select"===o.tagName.toLowerCase(),this.rtl=/rtl/i.test(s),this.inputId=Y(o,"tomselect-"+fe),this.isRequired=o.required,this.sifter=new V(this.options,{diacritics:n.diacritics}),n.mode=n.mode||(1===n.maxItems?"single":"multi"),"boolean"!=typeof n.hideSelected&&(n.hideSelected="multi"===n.mode),"boolean"!=typeof n.hidePlaceholder&&(n.hidePlaceholder="multi"!==n.mode);var i=n.createFilter;"function"!=typeof i&&("string"==typeof i&&(i=new RegExp(i)),i instanceof RegExp?n.createFilter=e=>i.test(e):n.createFilter=e=>this.settings.duplicates||!this.options[e]),this.initializePlugins(n.plugins),this.setupCallbacks(),this.setupTemplates();const r=te("<div>"),a=te("<div>"),l=this._render("dropdown"),c=te('<div role="listbox" tabindex="-1">'),d=this.input.getAttribute("class")||"",u=n.mode;var p;ie(r,n.wrapperClass,d,u),ie(a,n.controlClass),Q(r,a),ie(l,n.dropdownClass,u),n.copyClassesToDropdown&&ie(l,d),ie(c,n.dropdownContentClass),Q(l,c),te(n.dropdownParent||r).appendChild(l),se(n.controlInput)?(p=te(n.controlInput),ee(["autocorrect","autocapitalize","autocomplete","spellcheck","aria-label"],e=>{o.getAttribute(e)&&pe(p,{[e]:o.getAttribute(e)})}),p.tabIndex=-1,a.appendChild(p),this.focus_node=p):n.controlInput?(p=te(n.controlInput),this.focus_node=p):(p=te("<input/>"),this.focus_node=a),this.wrapper=r,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=p,this.setup()}setup(){const e=this,t=e.settings,s=e.control_input,o=e.dropdown,n=e.dropdown_content,i=e.wrapper,r=e.control,a=e.input,l=e.focus_node,c={passive:!0},d=e.inputId+"-ts-dropdown";pe(n,{id:d}),pe(l,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":d});const u=Y(l,e.inputId+"-ts-control"),p="label[for='"+(e=>e.replace(/['"\\]/g,"\\$&"))(e.inputId)+"']",h=document.querySelector(p),m=e.focus.bind(e);if(h){W(h,"click",m),pe(h,{for:u});const t=Y(h,e.inputId+"-ts-label");pe(l,{"aria-labelledby":t}),pe(n,{"aria-labelledby":t})}if(i.style.width=a.style.width,i.style.minWidth=a.style.minWidth,i.style.maxWidth=a.style.maxWidth,e.plugins.names.length){const t="plugin-"+e.plugins.names.join(" plugin-");ie([i,o],t)}(null===t.maxItems||t.maxItems>1)&&e.is_select_tag&&pe(a,{multiple:"multiple"}),t.placeholder&&pe(s,{placeholder:t.placeholder}),!t.splitOn&&t.delimiter&&(t.splitOn=new RegExp("\\s*"+v(t.delimiter)+"+\\s*")),t.load&&t.loadThrottle&&(t.load=J(t.load,t.loadThrottle)),W(o,"mousemove",()=>{e.ignoreHover=!1}),W(o,"mouseenter",t=>{var s=ce(t.target,"[data-selectable]",o);s&&e.onOptionHover(t,s)},{capture:!0}),W(o,"click",t=>{const s=ce(t.target,"[data-selectable]");s&&(e.onOptionSelect(t,s),U(t,!0))}),W(r,"click",t=>{var o=ce(t.target,"[data-ts-item]",r);o&&e.onItemSelect(t,o)?U(t,!0):""==s.value&&(e.onClick(),U(t,!0))}),W(l,"keydown",t=>e.onKeyDown(t)),W(s,"keypress",t=>e.onKeyPress(t)),W(s,"input",t=>e.onInput(t)),W(l,"blur",t=>e.onBlur(t)),W(l,"focus",t=>e.onFocus(t)),W(s,"paste",t=>e.onPaste(t));const w=t=>{const n=t.composedPath()[0];if(!i.contains(n)&&!o.contains(n))return e.isFocused&&e.blur(),void e.inputState();n==s&&e.isOpen?t.stopPropagation():U(t,!0)},g=()=>{e.isOpen&&e.positionDropdown()},f=()=>{e.isValid&&(e.isValid=!1,e.isInvalid=!0,e.refreshState())};W(a,"invalid",f),W(document,"mousedown",w),W(window,"scroll",g,c),W(window,"resize",g,c),this._destroy=()=>{a.removeEventListener("invalid",f),document.removeEventListener("mousedown",w),window.removeEventListener("scroll",g),window.removeEventListener("resize",g),h&&h.removeEventListener("click",m)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",e.wrapper),e.sync(!1),t.items=[],delete t.optgroups,delete t.options,e.refreshItems(),e.close(!1),e.inputState(),e.isSetup=!0,e.on("change",this.onChange),ie(a,"tomselected","ts-hidden-accessible"),e.trigger("initialize"),!0===t.preload&&e.preload()}setupOptions(e=[],t=[]){this.addOptions(e),ee(t,e=>{this.registerOptionGroup(e)})}setupTemplates(){var e=this,t=e.settings.labelField,s=e.settings.optgroupLabelField,o={optgroup:e=>{let t=document.createElement("div");return t.className="optgroup",t.appendChild(e.options),t},optgroup_header:(e,t)=>'<div class="optgroup-header">'+t(e[s])+"</div>",option:(e,s)=>"<div>"+s(e[t])+"</div>",item:(e,s)=>"<div>"+s(e[t])+"</div>",option_create:(e,t)=>'<div class="create">Add <strong>'+t(e.input)+"</strong>&hellip;</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"};e.settings.render=Object.assign({},o,e.settings.render)}setupCallbacks(){var e,t,s={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(e in s)(t=this.settings[s[e]])&&this.on(e,t)}sync(e=!0){const t=this,s=e?ge(t.input,{delimiter:t.settings.delimiter,allowEmptyOption:t.settings.allowEmptyOption}):t.settings;t.setupOptions(s.options,s.optgroups),t.setValue(s.items||[],!0),t.input.disabled?t.disable():t.input.readOnly?t.setReadOnly(!0):t.enable(),t.lastQuery=null}onClick(){var e=this;if(e.activeItems.length>0)return e.clearActiveItems(),void e.focus();e.isFocused&&e.isOpen?e.blur():e.focus()}onMouseDown(){}onChange(){oe(this.input,"input"),oe(this.input,"change")}onPaste(e){var t=this;t.isInputHidden||t.isLocked?U(e):t.settings.splitOn&&setTimeout(()=>{var e=t.inputValue();if(e.match(t.settings.splitOn)){var s=e.trim().split(t.settings.splitOn);ee(s,e=>{z(e)&&(this.options[e]?t.addItem(e):t.createItem(e))})}},0)}onKeyPress(e){var t=this;if(!t.isLocked){var s=String.fromCharCode(e.keyCode||e.which);return t.settings.create&&"multi"===t.settings.mode&&s===t.settings.delimiter?(t.createItem(),void U(e)):void 0}U(e)}onKeyDown(e){var t=this;if(t.ignoreHover=!0,t.isLocked)9!==e.keyCode&&U(e);else{switch(e.keyCode){case 65:if(K(me,e)&&""==t.control_input.value)return U(e),void t.selectAll();break;case 27:return t.isOpen&&(U(e,!0),t.close()),void t.clearActiveItems();case 40:if(!t.isOpen&&t.hasOptions)t.open();else if(t.activeOption){let e=t.getAdjacent(t.activeOption,1);e&&t.setActiveOption(e)}return void U(e);case 38:if(t.activeOption){let e=t.getAdjacent(t.activeOption,-1);e&&t.setActiveOption(e)}return void U(e);case 13:return void(t.canSelect(t.activeOption)?(t.onOptionSelect(e,t.activeOption),U(e)):(t.settings.create&&t.createItem()||document.activeElement==t.control_input&&t.isOpen)&&U(e));case 37:return void t.advanceSelection(-1,e);case 39:return void t.advanceSelection(1,e);case 9:return void(t.settings.selectOnTab&&(t.canSelect(t.activeOption)?(t.onOptionSelect(e,t.activeOption),U(e)):t.settings.create&&t.createItem()&&U(e)));case 8:case 46:return void t.deleteSelection(e)}t.isInputHidden&&!K(me,e)&&U(e)}}onInput(e){if(this.isLocked)return;const t=this.inputValue();var s,o;this.lastValue!==t&&(this.lastValue=t,""!=t?(this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=(s=()=>{this.refreshTimeout=null,this._onInput()},(o=this.settings.refreshThrottle)>0?window.setTimeout(s,o):(s.call(null),null))):this._onInput())}_onInput(){const e=this.lastValue;this.settings.shouldLoad.call(this,e)&&this.load(e),this.refreshOptions(),this.trigger("type",e)}onOptionHover(e,t){this.ignoreHover||this.setActiveOption(t,!1)}onFocus(e){var t=this,s=t.isFocused;if(t.isDisabled||t.isReadOnly)return t.blur(),void U(e);t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.preload(),s||t.trigger("focus"),t.activeItems.length||(t.inputState(),t.refreshOptions(!!t.settings.openOnFocus)),t.refreshState())}onBlur(e){if(!1!==document.hasFocus()){var t=this;if(t.isFocused){t.isFocused=!1,t.ignoreFocus=!1;var s=()=>{t.close(),t.setActiveItem(),t.setCaret(t.items.length),t.trigger("blur")};t.settings.create&&t.settings.createOnBlur?t.createItem(null,s):s()}}}onOptionSelect(e,t){var s,o=this;t.parentElement&&t.parentElement.matches("[data-disabled]")||(t.classList.contains("create")?o.createItem(null,()=>{o.settings.closeAfterSelect?o.close():o.settings.clearAfterSelect&&o.setTextboxValue()}):void 0!==(s=t.dataset.value)&&(o.isDropdownContentStale=o.settings.hideSelected,o.addItem(s),o.settings.closeAfterSelect?o.close():o.settings.clearAfterSelect&&o.setTextboxValue(),!o.settings.hideSelected&&e.type&&/click/.test(e.type)&&o.setActiveOption(t)))}canSelect(e){return!!(this.isOpen&&e&&this.dropdown_content.contains(e))}onItemSelect(e,t){var s=this;return!s.isLocked&&"multi"===s.settings.mode&&(U(e),s.setActiveItem(t,e),!0)}canLoad(e){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(e)}load(e){const t=this;if(!t.canLoad(e))return;ie(t.wrapper,t.settings.loadingClass),t.loading++;const s=t.loadCallback.bind(t);t.settings.load.call(t,e,s)}loadCallback(e,t){const s=this;s.loading=Math.max(s.loading-1,0),s.isDropdownContentStale=!0,s.clearActiveOption(),s.setupOptions(e,t),s.refreshOptions(s.isFocused&&!s.isInputHidden),s.loading||re(s.wrapper,s.settings.loadingClass),s.trigger("load",e,t)}preload(){var e=this.wrapper.classList;e.contains("preloaded")||(e.add("preloaded"),this.load(""))}setTextboxValue(e=""){var t=this.control_input;t.value!==e&&(t.value=e,oe(t,"update"),this.lastValue=e)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(e,t){G(this,t?[]:["change"],()=>{this.clear(t),this.addItems(e,t)})}setMaxItems(e){0===e&&(e=null),this.settings.maxItems=e,this.refreshState()}setActiveItem(e,t){var s,o,n,i,r,a,l=this;if("single"!==l.settings.mode){if(!e)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(s=t&&t.type.toLowerCase())&&K("shiftKey",t)&&l.activeItems.length){for(a=l.getLastActive(),(n=Array.prototype.indexOf.call(l.control.children,a))>(i=Array.prototype.indexOf.call(l.control.children,e))&&(r=n,n=i,i=r),o=n;o<=i;o++)e=l.control.children[o],-1===l.activeItems.indexOf(e)&&l.setActiveItemClass(e);U(t)}else"click"===s&&K(me,t)||"keydown"===s&&K("shiftKey",t)?e.classList.contains("active")?l.removeActiveItem(e):l.setActiveItemClass(e):(l.clearActiveItems(),l.setActiveItemClass(e));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(e){const t=this,s=t.control.querySelector(".last-active");s&&re(s,"last-active"),ie(e,"active last-active"),t.trigger("item_select",e),-1==t.activeItems.indexOf(e)&&t.activeItems.push(e)}removeActiveItem(e){var t=this.activeItems.indexOf(e);this.activeItems.splice(t,1),re(e,"active")}clearActiveItems(){re(this.activeItems,"active"),this.activeItems=[]}setActiveOption(e,t=!0){e!==this.activeOption&&(this.clearActiveOption(),e&&(this.activeOption=e,pe(this.focus_node,{"aria-activedescendant":e.getAttribute("id")}),pe(e,{"aria-selected":"true"}),ie(e,"active"),t&&this.scrollToOption(e)))}scrollToOption(e,t){if(!e)return;const s=this.dropdown_content,o=s.clientHeight,n=s.scrollTop||0,i=e.offsetHeight,r=e.getBoundingClientRect().top-s.getBoundingClientRect().top+n;r+i>o+n?this.scroll(r-o+i,t):r<n&&this.scroll(r,t)}scroll(e,t){const s=this.dropdown_content;t&&(s.style.scrollBehavior=t),s.scrollTop=e,s.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(re(this.activeOption,"active"),pe(this.activeOption,{"aria-selected":null})),this.activeOption=null,pe(this.focus_node,{"aria-activedescendant":null})}selectAll(){const e=this;if("single"===e.settings.mode)return;const t=e.controlChildren();t.length&&(e.inputState(),e.close(),e.activeItems=t,ee(t,t=>{e.setActiveItemClass(t)}))}inputState(){var e=this;e.control.contains(e.control_input)&&(pe(e.control_input,{placeholder:e.settings.placeholder}),e.activeItems.length>0||!e.isFocused&&e.settings.hidePlaceholder&&e.items.length>0?(e.setTextboxValue(),e.isInputHidden=!0):(e.settings.hidePlaceholder&&e.items.length>0&&pe(e.control_input,{placeholder:""}),e.isInputHidden=!1),e.wrapper.classList.toggle("input-hidden",e.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var e=this;if(e.isDisabled||e.isReadOnly)return;e.ignoreFocus=!0;const t=this.control_input.offsetWidth?this.control_input:this.focus_node;t.focus(),setTimeout(()=>{e.ignoreFocus=!1,t.getRootNode().activeElement===t&&this.onFocus()},0)}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())}getSearchOptions(){var e=this.settings,t=e.sortField;return"string"==typeof e.sortField&&(t=[{field:e.sortField}]),{fields:e.searchField,conjunction:e.searchConjunction,sort:t,nesting:e.nesting}}search(e){var t,s,o=this,n=this.getSearchOptions();if(o.settings.score&&"function"!=typeof(s=o.settings.score.call(o,e)))throw new Error('Tom Select "score" setting must be a function that returns a function');return o.isDropdownContentStale||e!==o.lastQuery?(o.lastQuery=e,/(.)\1{15,}/.test(e)&&(e=""),t=o.sifter.search(e,Object.assign(n,{score:s})),o.currentResults=t):t=Object.assign({},o.currentResults),o.settings.hideSelected&&(t.items=t.items.filter(e=>{let t=z(e.id);return!(null!==t&&-1!==o.items.indexOf(t))})),t}refreshOptions(e=!0){var t,s,o,n,i,r,a,l,c,d;const u={},p=[];var h=this,m=h.inputValue();const w=m===h.lastQuery||""==m&&null==h.lastQuery;var g=h.search(m),f=null,v=h.settings.shouldOpen||!1,b=h.dropdown_content;w&&(f=h.activeOption)&&(c=f.closest("[data-group]")),n=g.items.length,"number"==typeof h.settings.maxOptions&&(n=Math.min(n,h.settings.maxOptions)),n>0&&(v=!0);const y=(e,t)=>{let s=u[e];if(void 0!==s){let e=p[s];if(void 0!==e)return[s,e.fragment]}let o=document.createDocumentFragment();return s=p.length,p.push({fragment:o,order:t,optgroup:e}),[s,o]};for(t=0;t<n;t++){let e=g.items[t];if(!e)continue;let n=e.id,a=h.options[n];if(void 0===a)continue;let l=R(n),d=h.getOption(l,!0);for(h.settings.hideSelected||d.classList.toggle("selected",h.items.includes(l)),i=a[h.settings.optgroupField]||"",s=0,o=(r=Array.isArray(i)?i:[i])&&r.length;s<o;s++){i=r[s];let e=a.$order,t=h.optgroups[i];var k;void 0===t&&"function"==typeof h.settings.optionGroupRegister&&(k=h.settings.optionGroupRegister.apply(h,[i]))&&h.registerOptionGroup(k),t=h.optgroups[i],void 0===t?i="":e=t.$order;const[o,l]=y(i,e);s>0&&(d=d.cloneNode(!0),pe(d,{id:a.$id+"-clone-"+s,"aria-selected":null}),d.classList.add("ts-cloned"),re(d,"active"),h.activeOption&&h.activeOption.dataset.value==n&&c&&c.dataset.group===i.toString()&&(f=d)),l.appendChild(d),""!=i&&(u[i]=o)}}var x;h.settings.lockOptgroupOrder&&p.sort((e,t)=>e.order-t.order),a=document.createDocumentFragment(),ee(p,e=>{let t=e.fragment,s=e.optgroup;if(!t||!t.children.length)return;let o=h.optgroups[s];if(void 0!==o){let e=document.createDocumentFragment(),s=h.render("optgroup_header",o);Q(e,s),Q(e,t);let n=h.render("optgroup",{group:o,options:e});Q(a,n)}else Q(a,t)}),b.innerHTML="",Q(b,a),h.isDropdownContentStale=!1,h.settings.highlight&&(x=b.querySelectorAll("span.highlight"),Array.prototype.forEach.call(x,function(e){var t=e.parentNode;t.replaceChild(e.firstChild,e),t.normalize()}),g.query.length&&g.tokens.length&&ee(g.tokens,e=>{((e,t)=>{if(null===t)return;if("string"==typeof t){if(!t.length)return;t=new RegExp(t,"i")}const s=e=>3===e.nodeType?(e=>{var s=e.data.match(t);if(s&&e.data.length>0){var o=document.createElement("span");o.className="highlight";var n=e.splitText(s.index);n.splitText(s[0].length);var i=n.cloneNode(!0);return o.appendChild(i),he(n,o),1}return 0})(e):((e=>{1!==e.nodeType||!e.childNodes||/(script|style)/i.test(e.tagName)||"highlight"===e.className&&"SPAN"===e.tagName||Array.from(e.childNodes).forEach(e=>{s(e)})})(e),0);s(e)})(b,e.regex)}));var C=e=>{let t=h.render(e,{input:m});return t&&(v=!0,b.insertBefore(t,b.firstChild)),t};if(h.loading?C("loading"):h.settings.shouldLoad.call(h,m)?0===g.items.length&&C("no_results"):C("not_loading"),(l=h.canCreate(m))&&(d=C("option_create")),h.hasOptions=g.items.length>0||l,v){if(g.items.length>0){if(f||"single"!==h.settings.mode||null==h.items[0]||(f=h.getOption(h.items[0])),!b.contains(f)){let e=0;d&&!h.settings.addPrecedence&&(e=1),f=h.selectable()[e]}}else d&&(f=d);e&&!h.isOpen&&(h.open(),h.scrollToOption(f,"auto")),h.setActiveOption(f)}else h.clearActiveOption(),e&&h.isOpen&&h.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(e,t=!1){const s=this;if(Array.isArray(e))return s.addOptions(e,t),!1;const o=z(e[s.settings.valueField]);return null===o||s.options.hasOwnProperty(o)?(s.updateOption(e[s.settings.valueField],e),!1):(e.$order=e.$order||++s.order,e.$id=s.inputId+"-opt-"+e.$order,s.options[o]=e,s.isDropdownContentStale=!0,t&&(s.userOptions[o]=t,s.trigger("option_add",o,e)),o)}addOptions(e,t=!1){ee(e,e=>{this.addOption(e,t)})}registerOption(e){return this.addOption(e)}registerOptionGroup(e){var t=z(e[this.settings.optgroupValueField]);return null!==t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)}addOptionGroup(e,t){var s;t[this.settings.optgroupValueField]=e,(s=this.registerOptionGroup(t))&&this.trigger("optgroup_add",s,t)}removeOptionGroup(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],this.clearCache(),this.trigger("optgroup_remove",e))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(e,t){const s=this;var o,n;const i=z(e),r=z(t[s.settings.valueField]);if(null===i)return;const a=s.options[i];if(null==a)return;if("string"!=typeof r)throw new Error("Value must be set in option data");const l=s.getOption(i),c=s.getItem(i);if(t.$order=t.$order||a.$order,delete s.options[i],s.uncacheValue(r),s.options[r]=t,l){if(s.dropdown_content.contains(l)){const e=s._render("option",t);he(l,e),s.activeOption===l&&s.setActiveOption(e)}l.remove()}c&&(-1!==(n=s.items.indexOf(i))&&s.items.splice(n,1,r),o=s._render("item",t),c.classList.contains("active")&&ie(o,"active"),he(c,o)),s.isDropdownContentStale=!0}removeOption(e,t){const s=this;e=R(e),s.uncacheValue(e),delete s.userOptions[e],delete s.options[e],s.isDropdownContentStale=!0,s.trigger("option_remove",e),s.removeItem(e,t)}clearOptions(e){const t=(e||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const s={};ee(this.options,(e,o)=>{t(e,o)&&(s[o]=e)}),this.options=this.sifter.items=s,this.isDropdownContentStale=!0,this.trigger("option_clear")}clearFilter(e,t){return this.items.indexOf(t)>=0}getOption(e,t=!1){const s=z(e);if(null===s)return null;const o=this.options[s];if(null!=o){if(o.$div)return o.$div;if(t)return this._render("option",o)}return null}getAdjacent(e,t,s="option"){var o;if(!e)return null;o="item"==s?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let s=0;s<o.length;s++)if(o[s]==e)return t>0?o[s+1]:o[s-1];return null}getItem(e){if("object"==typeof e)return e;var t=z(e);return null!==t?this.control.querySelector(`[data-value="${Z(t)}"]`):null}addItems(e,t){var s=this,o=Array.isArray(e)?e:[e];const n=(o=o.filter(e=>-1===s.items.indexOf(e)))[o.length-1];o.forEach(e=>{s.isPending=e!==n,s.addItem(e,t)})}addItem(e,t){G(this,t?[]:["change","dropdown_close"],()=>{var s,o;const n=this,i=n.settings.mode,r=z(e);if((!r||-1===n.items.indexOf(r)||("single"===i&&n.close(),"single"!==i&&n.settings.duplicates))&&null!==r&&n.options.hasOwnProperty(r)&&("single"===i&&n.clear(t),"multi"!==i||!n.isFull())){if(s=n._render("item",n.options[r]),n.control.contains(s)&&(s=s.cloneNode(!0)),o=n.isFull(),n.items.splice(n.caretPos,0,r),n.insertAtCaret(s),n.isSetup){if(!n.isPending&&n.settings.hideSelected){let e=n.getOption(r),t=n.getAdjacent(e,1);t&&n.setActiveOption(t)}n.settings.clearAfterSelect&&n.setTextboxValue(),n.isPending||n.settings.closeAfterSelect||n.refreshOptions(n.isFocused&&"single"!==i),0!=n.settings.closeAfterSelect&&n.isFull()?n.close():n.isPending||n.positionDropdown(),n.trigger("item_add",r,s),n.isPending||n.updateOriginalInput({silent:t})}(!n.isPending||!o&&n.isFull())&&(n.inputState(),n.refreshState())}})}removeItem(e=null,t){const s=this;if(!(e=s.getItem(e)))return;var o,n;const i=e.dataset.value;o=ue(e),e.remove(),e.classList.contains("active")&&(n=s.activeItems.indexOf(e),s.activeItems.splice(n,1),re(e,"active")),s.items.splice(o,1),s.isDropdownContentStale=!0,!s.settings.persist&&s.userOptions.hasOwnProperty(i)&&s.removeOption(i,t),o<s.caretPos&&s.setCaret(s.caretPos-1),s.updateOriginalInput({silent:t}),s.refreshState(),s.positionDropdown(),s.trigger("item_remove",i,e)}createItem(e=null,t=()=>{}){3===arguments.length&&(t=arguments[2]),"function"!=typeof t&&(t=()=>{});var s,o=this,n=o.caretPos;if(e=e||o.inputValue(),!o.canCreate(e))return z(e)&&this.options[e]&&o.addItem(e),t(),!1;o.lock();var i=!1,r=e=>{if(o.unlock(),!e||"object"!=typeof e)return t();var s=z(e[o.settings.valueField]);if("string"!=typeof s)return t();o.setTextboxValue(),o.addOption(e,!0),o.setCaret(n),o.addItem(s),t(e),i=!0};return s="function"==typeof o.settings.create?o.settings.create.call(this,e,r):{[o.settings.labelField]:e,[o.settings.valueField]:e},i||r(s),!0}refreshItems(){var e=this;e.isDropdownContentStale=!0,e.isSetup&&e.addItems(e.items),e.updateOriginalInput(),e.refreshState()}refreshState(){const e=this;e.refreshValidityState();const t=e.isFull(),s=e.isLocked;e.wrapper.classList.toggle("rtl",e.rtl);const o=e.wrapper.classList;var n;o.toggle("focus",e.isFocused),o.toggle("disabled",e.isDisabled),o.toggle("readonly",e.isReadOnly),o.toggle("required",e.isRequired),o.toggle("invalid",!e.isValid),o.toggle("locked",s),o.toggle("full",t),o.toggle("input-active",e.isFocused&&!e.isInputHidden),o.toggle("dropdown-active",e.isOpen),o.toggle("has-options",(n=e.options,0===Object.keys(n).length)),o.toggle("has-items",e.items.length>0)}refreshValidityState(){var e=this;e.input.validity&&(e.isValid=e.input.validity.valid,e.isInvalid=!e.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(e={}){const t=this;var s,o;const n=t.input.querySelector('option[value=""]');if(t.is_select_tag){const i=[],r=t.input.querySelectorAll("option:checked").length;function a(e,s,o){return e||(e=te('<option value="'+X(s)+'">'+X(o)+"</option>")),e!=n&&t.input.append(e),i.push(e),(e!=n||r>0||"multi"==t.settings.mode)&&(e.selected=!0),e}t.input.querySelectorAll("option:checked").forEach(e=>{e.selected=!1}),0==t.items.length&&"single"==t.settings.mode?a(n,"",""):t.items.forEach(e=>{s=t.options[e],o=s[t.settings.labelField]||"",i.includes(s.$option)?a(t.input.querySelector(`option[value="${Z(e)}"]:not(:checked)`),e,o):s.$option=a(s.$option,e,o)})}else t.input.value=t.getValue();t.isSetup&&(e.silent||t.trigger("change",t.getValue()))}open(){var e=this;e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.isOpen=!0,pe(e.focus_node,{"aria-expanded":"true"}),e.refreshState(),ne(e.dropdown,{visibility:"hidden",display:"block"}),e.positionDropdown(),ne(e.dropdown,{visibility:"visible",display:"block"}),e.focus(),e.trigger("dropdown_open",e.dropdown))}close(e=!0){var t=this,s=t.isOpen;e&&(t.setTextboxValue(),"single"===t.settings.mode&&t.items.length&&t.inputState()),t.isOpen=!1,pe(t.focus_node,{"aria-expanded":"false"}),ne(t.dropdown,{display:"none"}),t.settings.hideSelected&&t.clearActiveOption(),t.refreshState(),s&&t.trigger("dropdown_close",t.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var e=this.control,t=e.getBoundingClientRect(),s=e.offsetHeight+t.top+window.scrollY,o=t.left+window.scrollX;ne(this.dropdown,{width:t.width+"px",top:s+"px",left:o+"px"})}}clear(e){var t=this;if(t.items.length){var s=t.controlChildren();ee(s,e=>{t.removeItem(e,!0)}),t.inputState(),e||t.updateOriginalInput(),t.trigger("clear")}}insertAtCaret(e){const t=this,s=t.caretPos,o=t.control;o.insertBefore(e,o.children[s]||null),t.setCaret(s+1)}deleteSelection(e){var t,s,o,n,i,r=this;t=e&&8===e.keyCode?-1:1,s={start:(i=r.control_input).selectionStart||0,length:(i.selectionEnd||0)-(i.selectionStart||0)};const a=[];if(r.activeItems.length)n=de(r.activeItems,t),o=ue(n),t>0&&o++,ee(r.activeItems,e=>a.push(e));else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const e=r.controlChildren();let o;t<0&&0===s.start&&0===s.length?o=e[r.caretPos-1]:t>0&&s.start===r.inputValue().length&&(o=e[r.caretPos]),void 0!==o&&a.push(o)}if(!r.shouldDelete(a,e))return!1;for(U(e,!0),void 0!==o&&r.setCaret(o);a.length;)r.removeItem(a.pop());return r.inputState(),r.positionDropdown(),r.refreshOptions(!1),!0}shouldDelete(e,t){const s=e.map(e=>e.dataset.value);return!(!s.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete.call(this,s,t))}advanceSelection(e,t){var s,o,n=this;n.rtl&&(e*=-1),n.inputValue().length||(K(me,t)||K("shiftKey",t)?(o=(s=n.getLastActive(e))?s.classList.contains("active")?n.getAdjacent(s,e,"item"):s:e>0?n.control_input.nextElementSibling:n.control_input.previousElementSibling)&&(o.classList.contains("active")&&n.removeActiveItem(s),n.setActiveItemClass(o)):n.moveCaret(e))}moveCaret(e){}getLastActive(e){let t=this.control.querySelector(".last-active");if(t)return t;var s=this.control.querySelectorAll(".active");return s?de(s,e):void 0}setCaret(e){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(e=this.isReadOnly||this.isDisabled){this.isLocked=e,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(e){this.focus_node.tabIndex=e?-1:this.tabIndex,this.isDisabled=e,this.input.disabled=e,this.control_input.disabled=e,this.setLocked()}setReadOnly(e){this.isReadOnly=e,this.input.readOnly=e,this.control_input.readOnly=e,this.setLocked()}destroy(){var e=this,t=e.revertSettings;e.trigger("destroy"),e.off(),e.wrapper.remove(),e.dropdown.remove(),e.input.innerHTML=t.innerHTML,e.input.tabIndex=t.tabIndex,re(e.input,"tomselected","ts-hidden-accessible"),e._destroy(),delete e.input.tomselect}render(e,t){var s,o;const n=this;if("function"!=typeof this.settings.render[e])return null;if(!(o=n.settings.render[e].call(this,t,X)))return null;if(o=te(o),"option"===e||"option_create"===e?t[n.settings.disabledField]?pe(o,{"aria-disabled":"true"}):pe(o,{"data-selectable":""}):"optgroup"===e&&(s=t.group[n.settings.optgroupValueField],pe(o,{"data-group":s}),t.group[n.settings.disabledField]&&pe(o,{"data-disabled":""})),"option"===e||"item"===e){const s=R(t[n.settings.valueField]);pe(o,{"data-value":s}),"item"===e?(ie(o,n.settings.itemClass),pe(o,{"data-ts-item":""})):(ie(o,n.settings.optionClass),pe(o,{role:"option",id:t.$id}),t.$div=o,n.options[s]=t)}return o}_render(e,t){const s=this.render(e,t);if(null==s)throw"HTMLElement expected";return s}clearCache(){ee(this.options,e=>{e.$div&&(e.$div.remove(),delete e.$div)})}uncacheValue(e){const t=this.getOption(e);t&&t.remove()}canCreate(e){return this.settings.create&&e.length>0&&this.settings.createFilter.call(this,e)}hook(e,t,s){var o=this,n=o[t];o[t]=function(){var t,i;return"after"===e&&(t=n.apply(o,arguments)),i=s.apply(o,arguments),"instead"===e?i:("before"===e&&(t=n.apply(o,arguments)),t)}}}const be=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},ye=(e,t,s,o)=>{e.addEventListener(t,s,o)},ke=e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(xe(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)},xe=e=>"string"==typeof e&&e.indexOf("<")>-1,Ce=(e,t,s,o)=>{e.addEventListener(t,s,o)},Ae=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},Se=(e,t,s,o)=>{e.addEventListener(t,s,o)},Oe=e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(Ie(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)},Ie=e=>"string"==typeof e&&e.indexOf("<")>-1;ve.define("change_listener",function(){((e,t,s)=>{this.input.addEventListener("change",s,void 0)})(0,0,()=>{this.sync()})}),ve.define("checkbox_options",function(e){var t=this,s=t.onOptionSelect;t.settings.hideSelected=!1;const o=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},e);var n=function(e,t){t?(e.checked=!0,o.uncheckedClassNames&&e.classList.remove(...o.uncheckedClassNames),o.checkedClassNames&&e.classList.add(...o.checkedClassNames)):(e.checked=!1,o.checkedClassNames&&e.classList.remove(...o.checkedClassNames),o.uncheckedClassNames&&e.classList.add(...o.uncheckedClassNames))},i=function(e){setTimeout(()=>{var t=e.querySelector("input."+o.className);t instanceof HTMLInputElement&&n(t,e.classList.contains("selected"))},1)};t.hook("after","setupTemplates",()=>{var e=t.settings.render.option;t.settings.render.option=(s,i)=>{var r=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if("string"==typeof(s=e)&&s.indexOf("<")>-1){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}var s;return document.querySelector(e)})(e.call(t,s,i)),a=document.createElement("input");o.className&&a.classList.add(o.className),a.addEventListener("click",function(e){be(e)}),a.type="checkbox";const l=null==(c=s[t.settings.valueField])?null:(e=>"boolean"==typeof e?e?"1":"0":e+"")(c);var c;return n(a,!!(l&&t.items.indexOf(l)>-1)),r.prepend(a),r}}),t.on("item_remove",e=>{var s=t.getOption(e);s&&(s.classList.remove("selected"),i(s))}),t.on("item_add",e=>{var s=t.getOption(e);s&&i(s)}),t.hook("instead","onOptionSelect",(e,o)=>{if(o.classList.contains("selected"))return o.classList.remove("selected"),t.removeItem(o.dataset.value),t.refreshOptions(),void be(e,!0);s.call(t,e,o),i(o)})}),ve.define("clear_button",function(e){const t=this,s=Object.assign({className:"clear-button",title:"Clear All",role:"button",tabindex:0,html:e=>`<div class="${e.className}" title="${e.title}" role="${e.role}" tabindex="${e.tabindex}">&times;</div>`},e);t.on("initialize",()=>{var e=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if("string"==typeof(s=e)&&s.indexOf("<")>-1){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}var s;return document.querySelector(e)})(s.html(s));e.addEventListener("click",e=>{t.isLocked||(t.clear(),"single"===t.settings.mode&&t.settings.allowEmptyOption&&t.addItem(""),t.refreshOptions(!1),e.preventDefault(),e.stopPropagation())}),t.control.appendChild(e)})}),ve.define("drag_drop",function(){var e=this;if("multi"!==e.settings.mode)return;var t=e.lock,s=e.unlock;let o,n=!0;e.hook("after","setupTemplates",()=>{var t=e.settings.render.item;e.settings.render.item=(s,i)=>{const r=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if("string"==typeof(s=e)&&s.indexOf("<")>-1){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}var s;return document.querySelector(e)})(t.call(e,s,i));var a;a=r,((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var s in e)e.hasOwnProperty(s)&&t(e[s],s)})({draggable:"true"},(e,t)=>{null==e?a.removeAttribute(t):a.setAttribute(t,""+e)});const l=e=>{e.preventDefault(),r.classList.add("ts-drag-over"),c(r,o)},c=(e,t)=>{var s,o,n;void 0!==t&&(((e,t)=>{do{var s;if(e==(t=null==(s=t)?void 0:s.previousElementSibling))return!0}while(t&&t.previousElementSibling);return!1})(t,r)?(o=t,null==(n=(s=e).parentNode)||n.insertBefore(o,s.nextSibling)):((e,t)=>{var s;null==(s=e.parentNode)||s.insertBefore(t,e)})(e,t))};return ye(r,"mousedown",e=>{n||((e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())})(e),e.stopPropagation()}),ye(r,"dragstart",e=>{o=r,setTimeout(()=>{r.classList.add("ts-dragging")},0)}),ye(r,"dragenter",l),ye(r,"dragover",l),ye(r,"dragleave",()=>{r.classList.remove("ts-drag-over")}),ye(r,"dragend",()=>{var t;document.querySelectorAll(".ts-drag-over").forEach(e=>e.classList.remove("ts-drag-over")),null==(t=o)||t.classList.remove("ts-dragging"),o=void 0;var s=[];e.control.querySelectorAll("[data-value]").forEach(e=>{if(e.dataset.value){let t=e.dataset.value;t&&s.push(t)}}),e.setValue(s)}),r}}),e.hook("instead","lock",()=>(n=!1,t.call(e))),e.hook("instead","unlock",()=>(n=!0,s.call(e)))}),ve.define("dropdown_header",function(e){const t=this,s=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:e=>'<div class="'+e.headerClass+'"><div class="'+e.titleRowClass+'"><span class="'+e.labelClass+'">'+e.title+'</span><a class="'+e.closeClass+'">&times;</a></div></div>'},e);t.on("initialize",()=>{var e=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if("string"==typeof(s=e)&&s.indexOf("<")>-1){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}var s;return document.querySelector(e)})(s.html(s)),o=e.querySelector("."+s.closeClass);o&&o.addEventListener("click",e=>{((e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())})(e,!0),t.close()}),t.dropdown.insertBefore(e,t.dropdown.firstChild)})}),ve.define("caret_position",function(){var e=this;e.hook("instead","setCaret",t=>{"single"!==e.settings.mode&&e.control.contains(e.control_input)?(t=Math.max(0,Math.min(e.items.length,t)))==e.caretPos||e.isPending||e.controlChildren().forEach((s,o)=>{o<t?e.control_input.insertAdjacentElement("beforebegin",s):e.control.appendChild(s)}):t=e.items.length,e.caretPos=t}),e.hook("instead","moveCaret",t=>{if(!e.isFocused)return;const s=e.getLastActive(t);if(s){const a=((e,t)=>{if(!e)return-1;t=t||e.nodeName;for(var s=0;e=e.previousElementSibling;)e.matches(t)&&s++;return s})(s);e.setCaret(t>0?a+1:a),e.setActiveItem(),n=s,o=[],((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var s in e)e.hasOwnProperty(s)&&t(e[s])})(["last-active"],e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(o=o.concat(e))}),r=o.filter(Boolean),(i=n,Array.isArray(i)||(i=[i]),n=i).map(e=>{r.map(t=>{e.classList.remove(t)})})}else e.setCaret(e.caretPos+t);var o,n,i,r})}),ve.define("dropdown_input",function(){const e=this;e.settings.shouldOpen=!0,e.hook("before","setup",()=>{var t;e.focus_node=e.control,((e,...t)=>{var s,o=(e=>{var t=[];return((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var s in e)e.hasOwnProperty(s)&&t(e[s])})(e,e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(t=t.concat(e))}),t.filter(Boolean)})(t);(s=e,Array.isArray(s)||(s=[s]),e=s).map(e=>{o.map(t=>{e.classList.add(t)})})})(e.control_input,"dropdown-input");const s=ke('<div class="dropdown-input-wrap">');s.append(e.control_input),e.dropdown.insertBefore(s,e.dropdown.firstChild);const o=ke('<input class="items-placeholder" tabindex="-1" />');o.placeholder=e.settings.placeholder||"",e.control.append(o);const n=null==(t=e.input)?void 0:t.getAttribute("aria-label");n&&o.setAttribute("aria-label",n)}),e.on("initialize",()=>{e.control_input.addEventListener("keydown",t=>{switch(t.keyCode){case 27:return e.isOpen&&(((e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())})(t,!0),e.close()),void e.clearActiveItems();case 9:e.focus_node.tabIndex=-1}return e.onKeyDown.call(e,t)}),e.on("blur",()=>{e.focus_node.tabIndex=e.isDisabled?-1:e.tabIndex}),e.on("dropdown_open",()=>{e.control_input.focus()});const t=e.onBlur;e.hook("instead","onBlur",s=>{if(!s||s.relatedTarget!=e.control_input)return t.call(e)}),e.control_input.addEventListener("blur",()=>e.onBlur(),void 0),e.hook("before","close",()=>{e.isOpen&&e.focus_node.focus({preventScroll:!0})})})}),ve.define("input_autogrow",function(){var e=this;e.on("initialize",()=>{var t=document.createElement("span"),s=e.control_input;t.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",e.wrapper.appendChild(t);for(const e of["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"])t.style[e]=s.style[e];var o=()=>{t.textContent=s.value,s.style.width=t.clientWidth+"px"};o(),e.on("update item_add item_remove",o),Ce(s,"input",o),Ce(s,"keyup",o),Ce(s,"blur",o),Ce(s,"update",o)})}),ve.define("no_backspace_delete",function(){var e=this,t=e.deleteSelection;this.hook("instead","deleteSelection",s=>!!e.activeItems.length&&t.call(e,s))}),ve.define("no_active_items",function(){this.hook("instead","setActiveItem",()=>{}),this.hook("instead","selectAll",()=>{})}),ve.define("optgroup_columns",function(){var e=this,t=e.onKeyDown;e.hook("instead","onKeyDown",s=>{var o,n,i,r;if(!e.isOpen||37!==s.keyCode&&39!==s.keyCode)return t.call(e,s);e.ignoreHover=!0,r=(e=>{for(;e&&e.matches;){if(e.matches("[data-group]"))return e;e=e.parentNode}})(e.activeOption),o=((e,t)=>{if(!e)return-1;t=t||e.nodeName;for(var s=0;e=e.previousElementSibling;)e.matches(t)&&s++;return s})(e.activeOption,"[data-selectable]"),r&&(r=37===s.keyCode?r.previousSibling:r.nextSibling)&&(n=(i=r.querySelectorAll("[data-selectable]"))[Math.min(i.length-1,o)])&&e.setActiveOption(n)})}),ve.define("remove_button",function(e){const t=this,s=Object.assign({label:"×",title:"Remove",className:"remove",tabindex:-1,role:"button",html:e=>{var t;const s=document.createElement("div");return s.className=e.className||"",s.title=e.title||"",s.setAttribute("role",e.role||"button"),s.tabIndex=null!=(t=e.tabindex)?t:-1,s.textContent=e.label||"",s}},e);t.hook("after","setupTemplates",()=>{var e=t.settings.render.item;t.settings.render.item=(o,n)=>{var i=Oe(e.call(t,o,n)),r=Oe(s.html(s));return i.appendChild(r),Se(r,"mousedown",e=>{Ae(e,!0)}),Se(r,"click",e=>{t.isLocked||(Ae(e,!0),t.isLocked||t.shouldDelete([i],e)&&(t.removeItem(i),t.refreshOptions(!1),t.inputState()))}),i}})}),ve.define("restore_on_backspace",function(e){const t=this,s=Object.assign({text:e=>e[t.settings.labelField]},e);t.on("item_remove",function(e){if(t.isFocused&&""===t.control_input.value.trim()){var o=t.options[e];o&&t.setTextboxValue(s.text.call(t,o))}})}),ve.define("virtual_scroll",function(){const e=this,t=e.canLoad,s=e.clearActiveOption,o=e.loadCallback;var n,i,r,a={},l=!1,c=[],d=!1,u=[],p=[];if(e.settings.shouldLoadMore||(e.settings.shouldLoadMore=()=>{if(n.clientHeight/(n.scrollHeight-n.scrollTop)>.9)return!0;if(e.activeOption){var t=e.selectable();if(Array.from(t).indexOf(e.activeOption)>=t.length-2)return!0}return!1}),!e.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";e.settings.sortField=[{field:"$order"},{field:"$score"}];const h=t=>!(null!==e.settings.maxOptions&&"number"==typeof e.settings.maxOptions&&n.children.length>=e.settings.maxOptions||!(t in a)||!a[t]),m=(t,s)=>e.items.indexOf(s)>=0||c.indexOf(s)>=0;e.setNextUrl=(e,t)=>{a[e]=t},e.getUrl=t=>{if(t in a){const e=a[t];return a[t]=!1,e}return e.clearPagination(),e.settings.firstUrl.call(e,t)},e.clearPagination=()=>{a={}},e.hook("instead","clearActiveOption",()=>{if(!l)return s.call(e)}),e.hook("instead","canLoad",s=>s in a?h(s):t.call(e,s)),e.hook("instead","loadCallback",(t,s)=>{if(l){if(i){const s=t[0];void 0!==s&&(i.dataset.value=s[e.settings.valueField])}}else{const t=""!==e.lastValue?(t,s)=>e.items.indexOf(s)>=0||p.indexOf(s)>=0:m;e.clearOptions(t)}o.call(e,t,s),l||d||(d=!0,""===e.lastValue&&(c=Object.keys(e.options),r=a[""],u=Object.values(e.options))),l=!1}),e.hook("before","refreshOptions",()=>{e.activeOption&&"option"!==e.activeOption.getAttribute("role")&&e.setActiveOption(e.activeOption.previousElementSibling)}),e.hook("after","refreshOptions",()=>{const t=e.lastValue;var s;h(t)?(s=e.render("loading_more",{query:t}))&&(s.setAttribute("data-selectable",""),i=s):t in a&&!n.querySelector(".no-results")&&(s=e.render("no_more_results",{query:t})),s&&(((e,...t)=>{var s,o=(e=>{var t=[];return((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var s in e)e.hasOwnProperty(s)&&t(e[s])})(e,e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(t=t.concat(e))}),t.filter(Boolean)})(t);(s=e,Array.isArray(s)||(s=[s]),e=s).map(e=>{o.map(t=>{e.classList.add(t)})})})(s,e.settings.optionClass),n.append(s))});const w=()=>{d&&(e.addOptions(u),e.clearOptions(m),r&&(a[""]=r))};e.on("type",t=>{""===t&&(w(),e.refreshOptions(!1))}),e.on("dropdown_close",w),e.on("initialize",()=>{p=Object.keys(e.options),c=Object.keys(e.options),n=e.dropdown_content,e.settings.render=Object.assign({},{loading_more:()=>'<div class="loading-more-results">Loading more results ... </div>',no_more_results:()=>'<div class="no-more-results">No more results</div>'},e.settings.render),n.addEventListener("scroll",()=>{e.settings.shouldLoadMore.call(e)&&h(e.lastValue)&&(l||(l=!0,e.load.call(e,e.lastValue)))})})});const Le={};let Ee;"undefined"!=typeof lpDataAdmin&&(Ee=lpDataAdmin.lp_rest_url,Le.admin={apiAdminNotice:Ee+"lp/v1/admin/tools/admin-notices",apiAddons:Ee+"lp/v1/addon/all",apiAddonAction:Ee+"lp/v1/addon/action-n",apiAddonsPurchase:Ee+"lp/v1/addon/info-addons-purchase",apiSearchCourses:Ee+"lp/v1/admin/tools/search-course",apiSearchUsers:Ee+"lp/v1/admin/tools/search-user",apiAssignUserCourse:Ee+"lp/v1/admin/tools/assign-user-course",apiUnAssignUserCourse:Ee+"lp/v1/admin/tools/unassign-user-course"}),"undefined"!=typeof lpData&&(Ee=lpData.lp_rest_url,Le.frontend={apiWidgets:Ee+"lp/v1/widgets/api",apiCourses:Ee+"lp/v1/courses/archive-course",apiAJAX:Ee+"lp/v1/load_content_via_ajax/",apiProfileCoverImage:Ee+"lp/v1/profile/cover-image"}),Ee&&(Le.apiCourses=Ee+"lp/v1/courses/",Le.apiEditCoursesArchiveBlock=Ee+"lp/v1/courses/edit-archive-block",Le.apiCoursesSuggest=Ee+"lp/v1/courses/courses-suggest");const Te=Le;var Pe=s(7736),_e=s.n(Pe),Be=s.cjs(function(e,t){var s=[];function o(e){for(var t=-1,o=0;o<s.length;o++)if(s[o].identifier===e){t=o;break}return t}function n(e,t){for(var n={},r=[],a=0;a<e.length;a++){var l=e[a],c=t.base?l[0]+t.base:l[0],d=n[c]||0,u="".concat(c," ").concat(d);n[c]=d+1;var p=o(u),h={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)s[p].references++,s[p].updater(h);else{var m=i(h,t);t.byIndex=a,s.splice(a,0,{identifier:u,updater:m,references:1})}r.push(u)}return r}function i(e,t){var s=t.domAPI(t);return s.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;s.update(e=t)}else s.remove()}}e.exports=function(e,t){var i=n(e=e||[],t=t||{});return function(e){e=e||[];for(var r=0;r<i.length;r++){var a=o(i[r]);s[a].references--}for(var l=n(e,t),c=0;c<i.length;c++){var d=o(i[c]);0===s[d].references&&(s[d].updater(),s.splice(d,1))}i=l}}}),$e=s.n(Be),Fe=s.cjs(function(e,t){e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(s){!function(e,t,s){var o="";s.supports&&(o+="@supports (".concat(s.supports,") {")),s.media&&(o+="@media ".concat(s.media," {"));var n=void 0!==s.layer;n&&(o+="@layer".concat(s.layer.length>0?" ".concat(s.layer):""," {")),o+=s.css,n&&(o+="}"),s.media&&(o+="}"),s.supports&&(o+="}");var i=s.sourceMap;i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,s)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}}),qe=s.n(Fe),Me=s.cjs(function(e,t){var s={};e.exports=function(e,t){var o=function(e){if(void 0===s[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}s[e]=t}return s[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}}),He=s.n(Me),je=s.cjs(function(e,t){e.exports=function(e){var t=s.nc;t&&e.setAttribute("nonce",t)}}),De=s.n(je),Ne=s.cjs(function(e,t){e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}}),Ve=s.n(Ne),ze=s.cjs(function(e,t){e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}),Re=s.n(ze),Xe=s(9455),Je={};Je.styleTagTransform=Re(),Je.setAttributes=De(),Je.insert=He().bind(null,"head"),Je.domAPI=qe(),Je.insertStyleElement=Ve(),$e()(Xe.A,Je),Xe.A&&Xe.A.locals&&Xe.A.locals;const Ge={text:"",gravity:lpData.toast.gravity,position:lpData.toast.position,className:`${lpData.toast.classPrefix}`,close:1==lpData.toast.close,stopOnFocus:1==lpData.toast.stopOnFocus,duration:lpData.toast.duration},Ue=(e,t="success",s)=>{let o=Ge;s&&(o={...o,...s}),new(_e())({...o,text:e,className:`${lpData.toast.classPrefix} ${t}`}).showToast()};class We{static selectors={wrapper:".lp-install-sample",form:".lp-form-handle-sample-data",elBtnHandleSampleData:".lp-btn-install-sample-handle",elTriggerToggle:".lp-install-sample__toggle-options",elMessage:".lp-install-sample-message"};constructor(){this.wrapper=null}init(){this.wrapper=document.querySelector(We.selectors.wrapper),this.wrapper&&(this.preventFormSubmit(),this.events())}preventFormSubmit(){const e=this.wrapper.querySelector(We.selectors.form);e&&e.addEventListener("submit",e=>{e.preventDefault()})}events(){We._loadedEvents||(We._loadedEvents=this,d("click",[{selector:We.selectors.elBtnHandleSampleData,class:this,callBack:this.handleAction.name},{selector:We.selectors.elTriggerToggle,callBack:e=>{const{e:t,target:s}=e,o=this.wrapper.querySelector(We.selectors.form);if(o){o.classList.toggle("lp-hidden");const e=s.dataset.showText,t=s.dataset.hideText;s.textContent=o.classList.contains("lp-hidden")?e:t}}}]))}handleAction(e){const{e:t,target:s}=e,o=s.closest(We.selectors.elBtnHandleSampleData);t.preventDefault();const n=this.wrapper.querySelector(We.selectors.elMessage),i=o.dataset.message;if(!i||!confirm(i))return;n.innerHTML="",a(o,!0);const r=o.closest(We.selectors.wrapper).querySelector(We.selectors.form);let c=l(r);c.action=o.dataset.action,c.id_url="handle-sample-data";const d={success:e=>{const{status:t,message:s,data:o}=e;if("success"!==t)throw new Error(s);this.wrapper.querySelector(We.selectors.elMessage).innerHTML=o.html},error:e=>{Ue(e,"error")},completed:()=>{a(o,!1),setTimeout(()=>{n.innerHTML=""},3e3)}};window.lpAJAXG.fetchAJAX(c,d)}}var Ke=s(8465),Ye=s.n(Ke);let Ze,Qe,et=[];class tt{constructor(){this.init()}static selectors={elBtnShowPopupItemsToSelect:".lp-btn-show-popup-items-to-select",elBtnAddItemsSelected:".lp-btn-add-items-selected",elBtnCountItemsSelected:".lp-btn-count-items-selected",elHeaderCountItemSelected:".header-count-items-selected",elSelectItem:".lp-select-item",elListItems:".list-items",elPopupItemsToSelect:".lp-popup-items-to-select",elSearchTitleItem:".lp-search-title-item",elBtnBackListItems:".lp-btn-back-to-select-items",elListItemsWrap:".list-items-wrap",elListItemsSelected:".list-items-selected",elItemSelectedClone:".li-item-selected.clone",elItemSelected:".li-item-selected",LPTarget:".lp-target"};init(){this.events()}events=()=>{tt._loadedEvents||(tt._loadedEvents=!0,d("click",[{selector:tt.selectors.elBtnShowPopupItemsToSelect,callBack:this.showPopupItemsToSelect.name,class:this},{selector:tt.selectors.elSelectItem,callBack:this.selectItemsFromList.name,class:this},{selector:tt.selectors.elBtnCountItemsSelected,callBack:this.showItemsSelected.name,class:this},{selector:tt.selectors.elBtnBackListItems,callBack:this.backToSelectItems.name,class:this},{selector:tt.selectors.elItemSelected,callBack:this.removeItemSelected.name,class:this},{selector:".tabs .tab",callBack:this.chooseTabItemsType.name,class:this}]),d("keyup",[{selector:tt.selectors.elSearchTitleItem,callBack:this.searchTitleItemToSelect.name,class:this}]))};showPopupItemsToSelect=e=>{const{e:t,target:s=!1,callBack:o}=e;if(!s.closest(`${tt.selectors.elBtnShowPopupItemsToSelect}`))return;et=[];const n=s.dataset.template||"",i=document.querySelector(n);Ye().fire({html:i.innerHTML,showConfirmButton:!1,showCloseButton:!0,width:"max(350px, 65vw)",customClass:{popup:"lp-select-items-popup",htmlContainer:"lp-select-items-html-container",container:"lp-select-items-container"},willOpen:()=>{Ze=Ye().getPopup();const e=Ze.querySelector(`${tt.selectors.LPTarget}`);setTimeout(()=>{if(e.closest(".lp-load-ajax-element:not(.loaded)")&&e){const t=window.lpAJAXG.getDataSetCurrent(e);t.args.paged=1,t.args.item_selecting=et||[],window.lpAJAXG.setDataSetCurrent(e,t),window.lpAJAXG.fetchAJAX(t,{success:t=>{const{data:s}=t;Ze.querySelector(".lp-skeleton-animation").remove(),e.innerHTML=s.content||"",this.watchItemsSelectedDataChange()}})}},1)}}).then(e=>{e.isDismissed})};chooseTabItemsType=e=>{const{e:t,target:s,callBack:o}=e,n=s.closest(".tab");if(!n)return;t.preventDefault();const i=n.closest(".tabs");if(!i)return;const r=i.closest(`${tt.selectors.elPopupItemsToSelect}`),a=r.querySelector(`${tt.selectors.elSearchTitleItem}`),l=n.dataset.type;i.querySelectorAll(".tab").forEach(e=>{e.classList.contains("active")&&e.classList.remove("active")}),n.classList.add("active"),a.value="";const c=r.querySelector(`${tt.selectors.LPTarget}`),d=window.lpAJAXG.getDataSetCurrent(c);d.args.item_type=l,d.args.paged=1,d.args.item_selecting=et||[],window.lpAJAXG.setDataSetCurrent(c,d),window.lpAJAXG.showHideLoading(c,1),window.lpAJAXG.fetchAJAX(d,{success:e=>{const{data:t}=e;c.innerHTML=t.content||""},error:e=>{Ue(e,"error")},completed:()=>{window.lpAJAXG.showHideLoading(c,0),this.watchItemsSelectedDataChange()}})};selectItemsFromList=e=>{const{e:t,target:s}=e,o=s.closest(`${tt.selectors.elSelectItem}`);if(!o)return;const n=o.querySelector('input[type="checkbox"]');if("INPUT"!==s.tagName)return void n.click();if(!o.closest(`${tt.selectors.elListItems}`))return;const i={...n.dataset};if(n.checked)et.some(e=>e.id===i.id)||et.push(i);else{const e=et.findIndex(e=>e.id===i.id);-1!==e&&et.splice(e,1)}this.watchItemsSelectedDataChange()};searchTitleItemToSelect=e=>{const{e:t,target:s}=e,o=s.closest(tt.selectors.elSearchTitleItem);if(!o)return;const n=Ze.querySelector(`${tt.selectors.LPTarget}`);clearTimeout(Qe),Qe=setTimeout(()=>{const e=window.lpAJAXG.getDataSetCurrent(n);e.args.search_title=o.value.trim(),e.args.item_selecting=et,e.args.paged=1,window.lpAJAXG.setDataSetCurrent(n,e),window.lpAJAXG.showHideLoading(n,1),window.lpAJAXG.fetchAJAX(e,{success:e=>{const{data:t}=e;n.innerHTML=t.content||""},error:e=>{Ue(e,"error")},completed:()=>{window.lpAJAXG.showHideLoading(n,0)}})},800)};showItemsSelected=e=>{const{e:t,target:s}=e,o=s.closest(`${tt.selectors.elBtnCountItemsSelected}`);if(!o)return;const n=Ze.querySelector(`${tt.selectors.elBtnBackListItems}`),i=Ze.querySelector(".tabs"),a=Ze.querySelector(`${tt.selectors.elListItemsWrap}`),l=Ze.querySelector(`${tt.selectors.elHeaderCountItemSelected}`),c=Ze.querySelector(`${tt.selectors.elListItemsSelected}`),d=c.querySelector(`${tt.selectors.elItemSelectedClone}`);l.innerHTML=o.innerHTML,r(a,0),r(o,0),r(i,0),r(n,1),r(l,1),r(c,1),c.querySelectorAll(`${tt.selectors.elItemSelected}:not(.clone)`).forEach(e=>{e.remove()}),et.forEach(e=>{const t=d.cloneNode(!0);t.classList.remove("clone"),Object.entries(e).forEach(([e,s])=>{t.dataset[e]=s}),t.querySelector(".title-display").innerHTML=e.title,r(t,1),d.insertAdjacentElement("beforebegin",t)})};backToSelectItems=e=>{const{e:t,target:s}=e,o=s.closest(`${tt.selectors.elBtnBackListItems}`);if(!o)return;const n=Ze.querySelector(`${tt.selectors.elBtnCountItemsSelected}`),i=Ze.querySelector(".tabs"),a=Ze.querySelector(`${tt.selectors.elListItemsWrap}`),l=Ze.querySelector(`${tt.selectors.elHeaderCountItemSelected}`),c=Ze.querySelector(`${tt.selectors.elListItemsSelected}`);r(n,1),r(a,1),r(i,1),r(o,0),r(l,0),r(c,0)};removeItemSelected=e=>{const{e:t,target:s}=e,o=s.closest(`${tt.selectors.elItemSelected}`);if(!o)return;const n=o.dataset,i=et.findIndex(e=>e.id===n.id);-1!==i&&et.splice(i,1),o.remove(),this.watchItemsSelectedDataChange()};watchItemsSelectedDataChange=()=>{const e=Ze.querySelector(`${tt.selectors.elBtnAddItemsSelected}`),t=Ze.querySelector(`${tt.selectors.elBtnCountItemsSelected}`),s=t.querySelector("span"),o=Ze.querySelector(`${tt.selectors.elHeaderCountItemSelected}`),n=Ze.querySelector(`${tt.selectors.LPTarget}`);0!==et.length?(t.disabled=!1,e.disabled=!1,e.classList.add("active"),s.textContent=`(${et.length})`,o.innerHTML=t.innerHTML):(t.disabled=!0,e.disabled=!0,e.classList.remove("active"),s.textContent="",o.textContent=""),Ze.querySelector(`${tt.selectors.elListItems}`).querySelectorAll('input[type="checkbox"]').forEach(e=>{const t=e.dataset,s=et.some(e=>e.id===t.id);e.checked=s});const i=window.lpAJAXG.getDataSetCurrent(n);i.args.item_selecting=et,window.lpAJAXG.setDataSetCurrent(n,i)};addItemsSelectedToSection=e=>{const{e:t,target:s,callBackHandle:o}=e;Ze&&(Ye().close(),"function"==typeof o&&(o(et),et=[]))}}const st=new tt;class ot{static selectors={elPopupTemplate:"#lp-tmpl-select-courses-to-reset-progress",elFilterField:".lp-filter-field",elFormFilter:".lp-form-filter-reset-course-progress",elPopupItemsToSelect:".lp-popup-select-courses-to-reset-progress",elBtnResetAll:".lp-btn-reset-all-courses-progress"};constructor(){this.btnChooseCourses=null,this.elFormFilter=null,this.elPopupItemsToSelect=null,this.elBtnResetAll=null,this.elBtnAddItemsSelected=null,this.debouncedSearchUsers=u(e=>{this.fetchCourses(e)},800)}init(){this.events()}events(){ot._loadedEvents||(ot._loadedEvents=this,d("click",[{selector:tt.selectors.elBtnShowPopupItemsToSelect,class:this,callBack:this.handleShowPopupItemsToSelect.name},{selector:tt.selectors.elBtnAddItemsSelected,class:st,callBack:st.addItemsSelectedToSection.name,callBackHandle:this.addItemsSelectedToSection.bind(this),conditionBeforeCallBack:e=>!!e.target.closest(ot.selectors.elPopupItemsToSelect)},{selector:ot.selectors.elBtnResetAll,class:this,callBack:this.resetAllCoursesProgress.name}]),d("keyup",[{selector:ot.selectors.elFilterField,class:this,callBack:this.filterCourses.name}]))}handleShowPopupItemsToSelect(e){const{e:t,target:s}=e;this.btnChooseCourses=s.closest(".lp-btn-choose-courses-to-reset-progress"),this.btnChooseCourses&&(this.elPopupItemsToSelect=Ye().getPopup().querySelector(ot.selectors.elPopupItemsToSelect),this.elPopupItemsToSelect&&(this.elBtnAddItemsSelected=this.elPopupItemsToSelect.querySelector(tt.selectors.elBtnAddItemsSelected),this.elBtnAddItemsSelected&&(this.elBtnResetAll=this.elPopupItemsToSelect.querySelector(ot.selectors.elBtnResetAll))))}addItemsSelectedToSection(e){if(!this.btnChooseCourses)return;const t=this.elBtnAddItemsSelected.dataset.messageConfirm;if(!t||!1===confirm(t))return;this.btnChooseCourses.textContent=this.btnChooseCourses.dataset.messageResetting,a(this.btnChooseCourses,1);const s=e.map(e=>parseInt(e.id,10)).filter(e=>!isNaN(e)&&e>0),o=this.elFormFilter?.querySelector(".lp-search-user"),n=o?.value||"";window.lpAJAXG.fetchAJAX({id_url:"course-reset-progress-tool",action:"reset_progress_courses",user_item_ids:s,search_user:n},{success:e=>{const{status:t,message:s}=e;Ue(s,t)},error:e=>{Ue(e.message,"error")},completed:()=>{this.btnChooseCourses.textContent=this.btnChooseCourses.dataset.messageChoose,a(this.btnChooseCourses,0)}})}resetAllCoursesProgress(e){const{e:t,target:s}=e,o=s.closest(ot.selectors.elPopupItemsToSelect);if(!o)return;const n=o.querySelector(ot.selectors.elFormFilter);if(!n)return;const i=this.elBtnResetAll.dataset.messageConfirm;if(!i||!1===confirm(i))return;a(this.btnChooseCourses,1),Ye().close();const r=l(n);window.lpAJAXG.fetchAJAX({id_url:"course-reset-progress-tool",action:"reset_progress_courses",reset_all:1,...r},{success:e=>{const{status:t,message:s}=e;Ue(s,t)},error:e=>{Ue(e.message,"error")},completed:()=>{this.btnChooseCourses.textContent=this.btnChooseCourses.dataset.messageChoose,a(this.btnChooseCourses,0)}})}fetchCourses(e){this.elFormFilter=e;const t=e.closest(ot.selectors.elPopupItemsToSelect).querySelector(".lp-target");let s=window.lpAJAXG.getDataSetCurrent(t);s.args=c(e,s.args),s.args.paged=1,window.lpAJAXG.setDataSetCurrent(t,s),window.lpAJAXG.showHideLoading(t,1),window.lpAJAXG.fetchAJAX(s,{success:e=>{const{data:s}=e;t.innerHTML=s.content||""},error:e=>{Ue(e,"error")},completed:()=>{window.lpAJAXG.showHideLoading(t,0)}})}filterCourses(e){const{target:t}=e,s=t.closest(ot.selectors.elFilterField);if(!s)return;const o=s.closest(ot.selectors.elFormFilter);o&&this.debouncedSearchUsers(o)}}const nt=new tt({openButtonSelector:".lp-btn-choose-item-to-reset-progress"});class it{static selectors={elPopupTemplate:"#lp-tmpl-select-items-to-reset-progress",elFilterField:".lp-filter-field",elFormFilter:".lp-form-filter-reset-item-progress",elPopupItemsToSelect:".lp-popup-select-items-to-reset-progress",elBtnResetAll:".lp-btn-reset-all-items-progress"};constructor(){this.btnChooseItems=null,this.elFormFilter=null,this.elPopupItemsToSelect=null,this.elBtnResetAll=null,this.elBtnAddItemsSelected=null,this.debouncedSearchItems=u(e=>{this.fetchItems(e)},800)}init(){this.events()}events(){it._loadedEvents||(it._loadedEvents=this,d("click",[{selector:tt.selectors.elBtnShowPopupItemsToSelect,class:this,callBack:this.handleShowPopupItemsToSelect.name},{selector:tt.selectors.elBtnAddItemsSelected,class:nt,callBack:nt.addItemsSelectedToSection.name,callBackHandle:this.addItemsSelectedToSection.bind(this),conditionBeforeCallBack:e=>!!e.target.closest(it.selectors.elPopupItemsToSelect)},{selector:it.selectors.elBtnResetAll,class:this,callBack:this.resetAllItemsProgress.name}]),d("keyup",[{selector:it.selectors.elFilterField,class:this,callBack:this.filterItems.name}]),d("change",[{selector:it.selectors.elFilterField,class:this,callBack:this.filterItems.name}]))}handleShowPopupItemsToSelect(e){const{e:t,target:s}=e;this.btnChooseItems=s.closest(".lp-btn-choose-item-to-reset-progress"),this.btnChooseItems&&(this.elPopupItemsToSelect=Ye().getPopup().querySelector(it.selectors.elPopupItemsToSelect),this.elBtnAddItemsSelected=this.elPopupItemsToSelect.querySelector(tt.selectors.elBtnAddItemsSelected),this.elBtnResetAll=this.elPopupItemsToSelect.querySelector(it.selectors.elBtnResetAll))}addItemsSelectedToSection(e){if(!this.btnChooseItems)return;const t=this.elBtnAddItemsSelected.dataset.messageConfirm;if(!t||!1===confirm(t))return;this.btnChooseItems.textContent=this.btnChooseItems.dataset.messageResetting,a(this.btnChooseItems,1);const s=e.map(e=>parseInt(e.id,10)).filter(e=>!isNaN(e)&&e>0);window.lpAJAXG.fetchAJAX({id_url:"item-reset-progress-tool",action:"reset_progress_items_course",user_item_ids:s},{success:e=>{const{status:t,message:s}=e;Ue(s,t)},error:e=>{Ue(e.message,"error")},completed:()=>{this.btnChooseItems.textContent=this.btnChooseItems.dataset.messageChoose,a(this.btnChooseItems,0)}})}resetAllItemsProgress(e){const{e:t,target:s}=e,o=s.closest(it.selectors.elPopupItemsToSelect);if(!o)return;const n=o.querySelector(it.selectors.elFormFilter);if(!n)return;const i=this.elBtnResetAll.dataset.messageConfirm;if(!i||!1===confirm(i))return;a(this.btnChooseItems,1),Ye().close();const r=l(n);window.lpAJAXG.fetchAJAX({id_url:"item-reset-progress-tool",action:"reset_progress_items_course",reset_all:1,...r},{success:e=>{const{status:t,message:s}=e;Ue(s,t)},error:e=>{Ue(e.message,"error")},completed:()=>{this.btnChooseItems.textContent=this.btnChooseItems.dataset.messageChoose,a(this.btnChooseItems,0)}})}fetchItems(e){this.elFormFilter=e;const t=e.closest(it.selectors.elPopupItemsToSelect).querySelector(".lp-target");let s=window.lpAJAXG.getDataSetCurrent(t);s.args=c(e,s.args),s.args.paged=1,window.lpAJAXG.setDataSetCurrent(t,s),window.lpAJAXG.showHideLoading(t,1),window.lpAJAXG.fetchAJAX(s,{success:e=>{const{data:s}=e;t.innerHTML=s.content||""},error:e=>{Ue(e,"error")},completed:()=>{window.lpAJAXG.showHideLoading(t,0)}})}filterItems(e){const{target:t}=e,s=t.closest(it.selectors.elFilterField);if(!s)return;const o=s.closest(it.selectors.elFormFilter);o&&this.debouncedSearchItems(o)}}!function(){let e,t,s,o,n,r;const a=e=>{let t=[],s=[];"string"==typeof e.course_ids?t.push(e.course_ids):"object"==typeof e.course_ids&&(t=e.course_ids),"string"==typeof e.user_ids?s.push(e.user_ids):"object"==typeof e.user_ids&&(s=e.user_ids);const o=[];t.map((e,t)=>{const n={};n.course_id=e,s.map((e,t)=>{const s={...n,user_id:e};o.push(s)})});const n=o.slice(0,5),i=Math.ceil(o.length/5);return{packages:o,data:n,totalPage:i}},l=(t,s,o,a)=>{const c=Te.admin.apiAssignUserCourse,d={headers:{"Content-Type":"application/json","X-WP-Nonce":lpDataAdmin.nonce},method:"POST",body:JSON.stringify({data:s,page:o,totalPage:a})},u=e.querySelector(".percent"),p=e.querySelector(".lp-button-assign-course"),h=e.querySelector(".message");p.disabled=!0,i(c,d,{success:e=>{const{status:o,message:i}=e;if("success"===o){let o=parseInt(e.data.page);const n=5*o,i=n+5;s=t.slice(n,i),u.innerHTML=e.data.percent,l(t,s,++o,a)}else if("finished"===o){if(u.innerHTML="",h.style.color="green",h.innerHTML=i,setTimeout(()=>{h.innerHTML=""},2e3),p.disabled=!1,!n.tomselect||!r.tomselect)return;n.tomselect.clear(),r.tomselect.clear()}else"error"===o&&(p.disabled=!1,h.style.color="red",h.innerHTML=i,setTimeout(()=>{h.innerHTML=""},2e3))},error:e=>{p.disabled=!1,h.innerHTML=e.message},completed:()=>{}})},c=(e,n,r,a)=>{const l=Te.admin.apiUnAssignUserCourse,d={headers:{"Content-Type":"application/json","X-WP-Nonce":lpDataAdmin.nonce},method:"POST",body:JSON.stringify({data:n,page:r,totalPage:a})},u=t.querySelector(".percent"),p=t.querySelector(".lp-button-unassign-course"),h=t.querySelector(".message");p.disabled=!0,i(l,d,{success:t=>{const{status:i,message:r}=t;if("success"===i){let s=parseInt(t.data.page);const o=5*s,i=o+5;n=e.slice(o,i),u.innerHTML=t.data.percent,c(e,n,++s,a)}else if("finished"===i){if(u.innerHTML="",h.style.color="green",h.innerHTML=r,setTimeout(()=>{h.innerHTML=""},2e3),p.disabled=!1,!s.tomselect||!o.tomselect)return;s.tomselect.clear(),o.tomselect.clear()}else"error"===i&&(p.disabled=!1,h.style.color="red",h.innerHTML=r,setTimeout(()=>{h.innerHTML=""},2e3))},error:e=>{p.disabled=!1,h.innerHTML=e.message},completed:()=>{}})};document.addEventListener("DOMContentLoaded",()=>{e=document.querySelector("#lp-assign-user-course-form"),t=document.querySelector("#lp-unassign-user-course-form"),e&&(s=t.querySelector("[name=user_ids]"),o=t.querySelector("[name=course_ids]")),t&&(n=e.querySelector("[name=user_ids]"),r=e.querySelector("[name=course_ids]")),e&&document.querySelector("form")&&document.addEventListener("submit",e=>{const t=e.target,s=new FormData(e.target),o=Object.fromEntries(Array.from(s.keys(),e=>{const t=s.getAll(e);return[e,t.length>1?t:t.pop()]}));if("lp-assign-user-course-form"===t.id){if(e.preventDefault(),!confirm("Are you sure you want to Assign?"))return;const{packages:t,data:s,totalPage:n}=a(o);l(t,s,1,n)}else if("lp-unassign-user-course-form"===t.id){if(e.preventDefault(),!confirm("Are you sure you want to Unassign?"))return;const{packages:t,data:s,totalPage:n}=a(o);c(t,s,1,n)}})})}(),(new We).init(),(new ot).init(),(new it).init()},9455(e,t,s){"use strict";var o=s(1601),n=s.n(o),i=s(6314),r=s.n(i)()(n());r.push([e.id,"/*!\n * Toastify js 1.12.0\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */\n\n.toastify {\n padding: 12px 20px;\n color: #ffffff;\n display: inline-block;\n box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3);\n background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5);\n background: linear-gradient(135deg, #73a5ff, #5477f5);\n position: fixed;\n opacity: 0;\n transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);\n border-radius: 2px;\n cursor: pointer;\n text-decoration: none;\n max-width: calc(50% - 20px);\n z-index: 2147483647;\n}\n\n.toastify.on {\n opacity: 1;\n}\n\n.toast-close {\n background: transparent;\n border: 0;\n color: white;\n cursor: pointer;\n font-family: inherit;\n font-size: 1em;\n opacity: 0.4;\n padding: 0 5px;\n}\n\n.toastify-right {\n right: 15px;\n}\n\n.toastify-left {\n left: 15px;\n}\n\n.toastify-top {\n top: -150px;\n}\n\n.toastify-bottom {\n bottom: -150px;\n}\n\n.toastify-rounded {\n border-radius: 25px;\n}\n\n.toastify-avatar {\n width: 1.5em;\n height: 1.5em;\n margin: -7px 5px;\n border-radius: 2px;\n}\n\n.toastify-center {\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n max-width: fit-content;\n max-width: -moz-fit-content;\n}\n\n@media only screen and (max-width: 360px) {\n .toastify-right, .toastify-left {\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n max-width: fit-content;\n }\n}\n",""]);const a=r;s.d(t,["A",0,a])},6314(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var s="",o=void 0!==t[5];return t[4]&&(s+="@supports (".concat(t[4],") {")),t[2]&&(s+="@media ".concat(t[2]," {")),o&&(s+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),s+=e(t),o&&(s+="}"),t[2]&&(s+="}"),t[4]&&(s+="}"),s}).join("")},t.i=function(e,s,o,n,i){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(o)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(r[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);o&&r[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),s&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=s):d[2]=s),n&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=n):d[4]="".concat(n)),t.push(d))}},t}},1601(e){"use strict";e.exports=function(e){return e[1]}},8465(e){e.exports=function(){"use strict";function e(e,t,s){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:s;throw new TypeError("Private element is not present on this object")}function t(t,s){return t.get(e(t,s))}function s(e,t,s){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,s)}const o={},n=e=>new Promise(t=>{if(!e)return t();const s=window.scrollX,n=window.scrollY;o.restoreFocusTimeout=setTimeout(()=>{o.previousActiveElement instanceof HTMLElement?(o.previousActiveElement.focus(),o.previousActiveElement=null):document.body&&document.body.focus(),t()},100),window.scrollTo(s,n)}),i="swal2-",r=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"].reduce((e,t)=>(e[t]=i+t,e),{}),a=["success","warning","info","question","error"].reduce((e,t)=>(e[t]=i+t,e),{}),l="SweetAlert2:",c=e=>e.charAt(0).toUpperCase()+e.slice(1),d=e=>{console.warn(`${l} ${"object"==typeof e?e.join(" "):e}`)},u=e=>{console.error(`${l} ${e}`)},p=[],h=(e,t=null)=>{var s;s=`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`,p.includes(s)||(p.push(s),d(s))},m=e=>"function"==typeof e?e():e,w=e=>e&&"function"==typeof e.toPromise,g=e=>w(e)?e.toPromise():Promise.resolve(e),f=e=>e&&Promise.resolve(e)===e,v=()=>document.body.querySelector(`.${r.container}`),b=e=>{const t=v();return t?t.querySelector(e):null},y=e=>b(`.${e}`),k=()=>y(r.popup),x=()=>y(r.icon),C=()=>y(r.title),A=()=>y(r["html-container"]),S=()=>y(r.image),O=()=>y(r["progress-steps"]),I=()=>y(r["validation-message"]),L=()=>b(`.${r.actions} .${r.confirm}`),E=()=>b(`.${r.actions} .${r.cancel}`),T=()=>b(`.${r.actions} .${r.deny}`),P=()=>b(`.${r.loader}`),_=()=>y(r.actions),B=()=>y(r.footer),$=()=>y(r["timer-progress-bar"]),F=()=>y(r.close),q=()=>{const e=k();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),s=Array.from(t).sort((e,t)=>{const s=parseInt(e.getAttribute("tabindex")||"0"),o=parseInt(t.getAttribute("tabindex")||"0");return s>o?1:s<o?-1:0}),o=e.querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n'),n=Array.from(o).filter(e=>"-1"!==e.getAttribute("tabindex"));return[...new Set(s.concat(n))].filter(e=>ee(e))},M=()=>D(document.body,r.shown)&&!D(document.body,r["toast-shown"])&&!D(document.body,r["no-backdrop"]),H=()=>{const e=k();return!!e&&D(e,r.toast)},j=(e,t)=>{if(e.textContent="",t){const s=(new DOMParser).parseFromString(t,"text/html"),o=s.querySelector("head");o&&Array.from(o.childNodes).forEach(t=>{e.appendChild(t)});const n=s.querySelector("body");n&&Array.from(n.childNodes).forEach(t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)})}},D=(e,t)=>!!t&&t.split(/\s+/).every(t=>e.classList.contains(t)),N=(e,t,s)=>{if(((e,t)=>{Array.from(e.classList).forEach(s=>{Object.values(r).includes(s)||Object.values(a).includes(s)||Object.values(t.showClass||{}).includes(s)||e.classList.remove(s)})})(e,t),!t.customClass)return;const o=t.customClass[s];o&&("string"==typeof o||o.forEach?X(e,o):d(`Invalid type of customClass.${s}! Expected string or iterable object, got "${typeof o}"`))},V=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${r.popup} > .${r[t]}`);case"checkbox":return e.querySelector(`.${r.popup} > .${r.checkbox} input`);case"radio":return e.querySelector(`.${r.popup} > .${r.radio} input:checked`)||e.querySelector(`.${r.popup} > .${r.radio} input:first-child`);case"range":return e.querySelector(`.${r.popup} > .${r.range} input`);default:return e.querySelector(`.${r.popup} > .${r.input}`)}},z=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},R=(e,t,s)=>{if(!e||!t)return;const o="string"==typeof t?t.split(/\s+/).filter(Boolean):t;(Array.isArray(e)?e:[e]).forEach(e=>{o.forEach(t=>{s?e.classList.add(t):e.classList.remove(t)})})},X=(e,t)=>{R(e,t,!0)},J=(e,t)=>{R(e,t,!1)},G=(e,t)=>Array.from(e.children).find(e=>e instanceof HTMLElement&&D(e,t)),U=(e,t,s)=>{s===`${parseInt(`${s}`)}`&&(s=parseInt(s)),s||0===s?e.style.setProperty(t,"number"==typeof s?`${s}px`:s):e.style.removeProperty(t)},W=(e,t="flex")=>{e&&(e.style.display=t)},K=e=>{e&&(e.style.display="none")},Y=(e,t="block")=>{e&&new MutationObserver(()=>{Q(e,e.innerHTML,t)}).observe(e,{childList:!0,subtree:!0})},Z=(e,t,s,o)=>{const n=e.querySelector(t);n&&n.style.setProperty(s,o)},Q=(e,t,s="flex")=>{t?W(e,s):K(e)},ee=e=>Boolean(e&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),te=e=>Boolean(e.scrollHeight>e.clientHeight),se=e=>{const t=window.getComputedStyle(e),s=parseFloat(t.getPropertyValue("animation-duration")||"0"),o=parseFloat(t.getPropertyValue("transition-duration")||"0");return s>0||o>0},oe=(e,t=!1)=>{const s=$();s&&ee(s)&&(t&&(s.style.transition="none",s.style.width="100%"),setTimeout(()=>{s.style.transition=`width ${e/1e3}s linear`,s.style.width="0%"},10))},ne=`\n <div aria-labelledby="${r.title}" aria-describedby="${r["html-container"]}" class="${r.popup}" tabindex="-1">\n <button type="button" class="${r.close}"></button>\n <ul class="${r["progress-steps"]}"></ul>\n <div class="${r.icon}"></div>\n <img class="${r.image}" />\n <h2 class="${r.title}" id="${r.title}"></h2>\n <div class="${r["html-container"]}" id="${r["html-container"]}"></div>\n <input class="${r.input}" id="${r.input}" />\n <input type="file" class="${r.file}" />\n <div class="${r.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${r.select}" id="${r.select}"></select>\n <div class="${r.radio}"></div>\n <label class="${r.checkbox}">\n <input type="checkbox" id="${r.checkbox}" />\n <span class="${r.label}"></span>\n </label>\n <textarea class="${r.textarea}" id="${r.textarea}"></textarea>\n <div class="${r["validation-message"]}" id="${r["validation-message"]}"></div>\n <div class="${r.actions}">\n <div class="${r.loader}"></div>\n <button type="button" class="${r.confirm}"></button>\n <button type="button" class="${r.deny}"></button>\n <button type="button" class="${r.cancel}"></button>\n </div>\n <div class="${r.footer}"></div>\n <div class="${r["timer-progress-bar-container"]}">\n <div class="${r["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),ie=()=>{o.currentInstance&&o.currentInstance.resetValidationMessage()},re=e=>{const t=(()=>{const e=v();return!!e&&(e.remove(),J([document.documentElement,document.body],[r["no-backdrop"],r["toast-shown"],r["has-column"]]),!0)})();if("undefined"==typeof window||"undefined"==typeof document)return void u("SweetAlert2 requires document to initialize");const s=document.createElement("div");s.className=r.container,t&&X(s,r["no-transition"]),j(s,ne),s.dataset.swal2Theme=e.theme;const n=(e=>{if("string"==typeof e){const t=document.querySelector(e);if(!t)throw new Error(`Target element "${e}" not found`);return t}return e})(e.target||"body");n.appendChild(s),e.topLayer&&(s.setAttribute("popover",""),s.showPopover()),(e=>{const t=k();t&&(t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true"))})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&(X(v(),r.rtl),o.isRTL=!0)})(n),(()=>{const e=k();if(!e)return;const t=G(e,r.input),s=G(e,r.file),o=e.querySelector(`.${r.range} input`),n=e.querySelector(`.${r.range} output`),i=G(e,r.select),a=e.querySelector(`.${r.checkbox} input`),l=G(e,r.textarea);t&&(t.oninput=ie),s&&(s.onchange=ie),i&&(i.onchange=ie),a&&(a.onchange=ie),l&&(l.oninput=ie),o&&n&&(o.oninput=()=>{ie(),n.value=o.value},o.onchange=()=>{ie(),n.value=o.value})})()},ae=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?le(e,t):e&&j(t,e)},le=(e,t)=>{"jquery"in e?ce(t,e):j(t,e.toString())},ce=(e,t)=>{if(e.textContent="",0 in t)for(let s=0;s in t;s++)e.appendChild(t[s].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},de=(e,t)=>{const s=_(),o=P();s&&o&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?W(s):K(s),N(s,t,"actions"),function(e,t,s){const o=L(),n=T(),i=E();o&&n&&i&&(ue(o,"confirm",s),ue(n,"deny",s),ue(i,"cancel",s),function(e,t,s,o){o.buttonsStyling?(X([e,t,s],r.styled),[[e,"confirm",o.confirmButtonColor],[t,"deny",o.denyButtonColor],[s,"cancel",o.cancelButtonColor]].forEach(([e,t,s])=>{s&&e.style.setProperty(`--swal2-${t}-button-background-color`,s),function(e){const t=window.getComputedStyle(e);if(t.getPropertyValue("--swal2-action-button-focus-box-shadow"))return;const s=t.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/,"rgba($1, $2, $3, 0.5)");e.style.setProperty("--swal2-action-button-focus-box-shadow",t.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/,` ${s}`))}(e)})):J([e,t,s],r.styled)}(o,n,i,s),s.reverseButtons&&(s.toast?(e.insertBefore(i,o),e.insertBefore(n,o)):(e.insertBefore(i,t),e.insertBefore(n,t),e.insertBefore(o,t))))}(s,o,t),j(o,t.loaderHtml||""),N(o,t,"loader"))};function ue(e,t,s){const o=c(t);Q(e,s[`show${o}Button`],"inline-block"),j(e,s[`${t}ButtonText`]||""),e.setAttribute("aria-label",s[`${t}ButtonAriaLabel`]||""),e.className=r[t],N(e,s,`${t}Button`)}const pe=(e,t)=>{const s=v();s&&(function(e,t){"string"==typeof t?e.style.background=t:t||X([document.documentElement,document.body],r["no-backdrop"])}(s,t.backdrop),function(e,t){t&&(t in r?X(e,r[t]):(d('The "position" parameter is not valid, defaulting to "center"'),X(e,r.center)))}(s,t.position),function(e,t){t&&X(e,r[`grow-${t}`])}(s,t.grow),N(s,t,"container"))};var he={innerParams:new WeakMap,domCache:new WeakMap,focusedElement:new WeakMap};const me=["input","file","range","select","radio","checkbox","textarea"],we=e=>{if(!e.input)return;if(!xe[e.input])return void u(`Unexpected type of input! Expected ${Object.keys(xe).join(" | ")}, got "${e.input}"`);const t=ye(e.input);if(!t)return;const s=xe[e.input](t,e);W(t),e.inputAutoFocus&&setTimeout(()=>{z(s)})},ge=(e,t)=>{const s=k();if(!s)return;const o=V(s,e);if(o){(e=>{for(const{name:t}of Array.from(e.attributes))["id","type","value","style"].includes(t)||e.removeAttribute(t)})(o);for(const e in t)o.setAttribute(e,t[e])}},fe=e=>{if(!e.input)return;const t=ye(e.input);t&&N(t,e,"input")},ve=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},be=(e,t,s)=>{if(s.inputLabel){const o=document.createElement("label"),n=r["input-label"];o.setAttribute("for",e.id),o.className=n,"object"==typeof s.customClass&&X(o,s.customClass.inputLabel),o.innerText=s.inputLabel,t.insertAdjacentElement("beforebegin",o)}},ye=e=>{const t=k();if(t)return G(t,r[e]||r.input)},ke=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:f(t)||d(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},xe={};xe.text=xe.email=xe.password=xe.number=xe.tel=xe.url=xe.search=xe.date=xe["datetime-local"]=xe.time=xe.week=xe.month=(e,t)=>{const s=e;return ke(s,t.inputValue),be(s,s,t),ve(s,t),s.type=t.input,s},xe.file=(e,t)=>{const s=e;return be(s,s,t),ve(s,t),s},xe.range=(e,t)=>{const s=e,o=s.querySelector("input"),n=s.querySelector("output");return o&&(ke(o,t.inputValue),o.type=t.input,be(o,e,t)),n&&ke(n,t.inputValue),e},xe.select=(e,t)=>{const s=e;if(s.textContent="",t.inputPlaceholder){const e=document.createElement("option");j(e,t.inputPlaceholder),e.value="",e.disabled=!0,e.selected=!0,s.appendChild(e)}return be(s,s,t),s},xe.radio=e=>(e.textContent="",e),xe.checkbox=(e,t)=>{const s=k();if(!s)throw new Error("Popup not found");const o=V(s,"checkbox");if(!o)throw new Error("Checkbox input not found");o.value="1",o.checked=Boolean(t.inputValue);const n=e.querySelector("span");if(n){const e=t.inputPlaceholder||t.inputLabel;e&&j(n,e)}return o},xe.textarea=(e,t)=>{const s=e;ke(s,t.inputValue),ve(s,t),be(s,s,t);return setTimeout(()=>{if("MutationObserver"in window){const e=k();if(!e)return;const o=parseInt(window.getComputedStyle(e).width);new MutationObserver(()=>{if(!document.body.contains(s))return;const e=s.offsetWidth+(i=s,parseInt(window.getComputedStyle(i).marginLeft)+parseInt(window.getComputedStyle(i).marginRight)),n=k();var i;n&&(e>o?n.style.width=`${e}px`:U(n,"width",t.width))}).observe(s,{attributes:!0,attributeFilter:["style"]})}}),s};const Ce=(e,t)=>{const s=A();s&&(Y(s),N(s,t,"htmlContainer"),t.html?(ae(t.html,s),W(s,"block")):t.text?(s.textContent=t.text,W(s,"block")):K(s),((e,t)=>{const s=k();if(!s)return;const o=he.innerParams.get(e),n=!o||t.input!==o.input;me.forEach(e=>{const o=G(s,r[e]);o&&(ge(e,t.inputAttributes),o.className=r[e],n&&K(o))}),t.input&&(n&&we(t),fe(t))})(e,t))},Ae=(e,t)=>{for(const[s,o]of Object.entries(a))t.icon!==s&&J(e,o);X(e,t.icon&&a[t.icon]),Ie(e,t),Se(),N(e,t,"icon")},Se=()=>{const e=k();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color");e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix").forEach(e=>{e.style.backgroundColor=t})},Oe=(e,t)=>{if(!t.icon&&!t.iconHtml)return;let s=e.innerHTML,o="";t.iconHtml?o=Le(t.iconHtml):"success"===t.icon?(o=(e=>`\n ${e.animation?'<div class="swal2-success-circular-line-left"></div>':""}\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div>\n ${e.animation?'<div class="swal2-success-fix"></div>':""}\n ${e.animation?'<div class="swal2-success-circular-line-right"></div>':""}\n`)(t),s=s.replace(/ style=".*?"/g,"")):"error"===t.icon?o='\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n':t.icon&&(o=Le({question:"?",warning:"!",info:"i"}[t.icon])),s.trim()!==o.trim()&&j(e,o)},Ie=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const s of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])Z(e,s,"background-color",t.iconColor);Z(e,".swal2-success-ring","border-color",t.iconColor)}},Le=e=>`<div class="${r["icon-content"]}">${e}</div>`;let Ee=!1,Te=0,Pe=0,_e=0,Be=0;const $e=e=>{const t=k();if(!t)return;const s=x();if(e.target===t||s&&s.contains(e.target)){Ee=!0;const s=Me(e);Te=s.clientX,Pe=s.clientY,_e=parseInt(t.style.insetInlineStart)||0,Be=parseInt(t.style.insetBlockStart)||0,X(t,"swal2-dragging")}},Fe=e=>{const t=k();if(t&&Ee){let{clientX:s,clientY:n}=Me(e);const i=s-Te;t.style.insetInlineStart=`${_e+(o.isRTL?-i:i)}px`,t.style.insetBlockStart=`${Be+(n-Pe)}px`}},qe=()=>{const e=k();Ee=!1,J(e,"swal2-dragging")},Me=e=>{const t=e.type.startsWith("touch")?e.touches[0]:e;return{clientX:t.clientX,clientY:t.clientY}},He=(e,t)=>{const s=v(),o=k();if(s&&o){if(t.toast){U(s,"width",t.width),o.style.width="100%";const e=P();e&&o.insertBefore(e,x())}else U(o,"width",t.width);U(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),K(I()),je(o,t),t.draggable&&!t.toast?(X(o,r.draggable),(e=>{e.addEventListener("mousedown",$e),document.body.addEventListener("mousemove",Fe),e.addEventListener("mouseup",qe),e.addEventListener("touchstart",$e),document.body.addEventListener("touchmove",Fe),e.addEventListener("touchend",qe)})(o)):(J(o,r.draggable),(e=>{e.removeEventListener("mousedown",$e),document.body.removeEventListener("mousemove",Fe),e.removeEventListener("mouseup",qe),e.removeEventListener("touchstart",$e),document.body.removeEventListener("touchmove",Fe),e.removeEventListener("touchend",qe)})(o))}},je=(e,t)=>{const s=t.showClass||{};e.className=`${r.popup} ${ee(e)?s.popup:""}`,t.toast?(X([document.documentElement,document.body],r["toast-shown"]),X(e,r.toast)):X(e,r.modal),N(e,t,"popup"),"string"==typeof t.customClass&&X(e,t.customClass),t.icon&&X(e,r[`icon-${t.icon}`])},De=e=>{const t=document.createElement("li");return X(t,r["progress-step"]),j(t,e),t},Ne=e=>{const t=document.createElement("li");return X(t,r["progress-step-line"]),e.progressStepsDistance&&U(t,"width",e.progressStepsDistance),t},Ve=(e,t)=>{var s;He(0,t),pe(0,t),((e,t)=>{const s=O();if(!s)return;const{progressSteps:o,currentProgressStep:n}=t;o&&0!==o.length&&void 0!==n?(W(s),s.textContent="",n>=o.length&&d("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.forEach((e,i)=>{const a=De(e);if(s.appendChild(a),i===n&&X(a,r["active-progress-step"]),i!==o.length-1){const e=Ne(t);s.appendChild(e)}})):K(s)})(0,t),((e,t)=>{const s=he.innerParams.get(e),o=x();if(o){if(s&&t.icon===s.icon)return Oe(o,t),void Ae(o,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(a).indexOf(t.icon))return u(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void K(o);W(o),Oe(o,t),Ae(o,t),X(o,t.showClass&&t.showClass.icon),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",Se)}else K(o)}})(e,t),((e,t)=>{const s=S();s&&(t.imageUrl?(W(s,""),s.setAttribute("src",t.imageUrl),s.setAttribute("alt",t.imageAlt||""),U(s,"width",t.imageWidth),U(s,"height",t.imageHeight),s.className=r.image,N(s,t,"image")):K(s))})(0,t),((e,t)=>{const s=C();s&&(Y(s),Q(s,Boolean(t.title||t.titleText),"block"),t.title&&ae(t.title,s),t.titleText&&(s.innerText=t.titleText),N(s,t,"title"))})(0,t),((e,t)=>{const s=F();s&&(j(s,t.closeButtonHtml||""),N(s,t,"closeButton"),Q(s,t.showCloseButton),s.setAttribute("aria-label",t.closeButtonAriaLabel||""))})(0,t),Ce(e,t),de(0,t),((e,t)=>{const s=B();s&&(Y(s),Q(s,Boolean(t.footer),"block"),t.footer&&ae(t.footer,s),N(s,t,"footer"))})(0,t);const n=k();"function"==typeof t.didRender&&n&&t.didRender(n),null===(s=o.eventEmitter)||void 0===s||s.emit("didRender",n)},ze=()=>{var e;return null===(e=L())||void 0===e?void 0:e.click()},Re=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Xe=e=>{if(e.keydownTarget&&e.keydownHandlerAdded&&e.keydownHandler){const t=e.keydownHandler;e.keydownTarget.removeEventListener("keydown",t,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1}},Je=(e,t)=>{var s;const o=q();return o.length?(-2===(e+=t)&&(e=o.length-1),e===o.length?e=0:-1===e&&(e=o.length-1),o[e].focus(),!(navigator.userAgent.includes("Firefox")&&o[e]instanceof HTMLIFrameElement)):(null===(s=k())||void 0===s||s.focus(),!0)},Ge=["ArrowRight","ArrowDown"],Ue=["ArrowLeft","ArrowUp"],We=(e,t,s)=>{e&&(t.isComposing||229===t.keyCode||(e.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Ke(t,e):"Tab"===t.key?Ye(t):[...Ge,...Ue].includes(t.key)?Ze(t.key):"Escape"===t.key&&Qe(t,e,s)))},Ke=(e,t)=>{if(!m(t.allowEnterKey))return;const s=k();if(!s||!t.input)return;const o=V(s,t.input);if(e.target&&o&&e.target instanceof HTMLElement&&e.target.outerHTML===o.outerHTML){if(["textarea","file"].includes(t.input))return;ze(),e.preventDefault()}},Ye=e=>{const t=e.target,s=q().findIndex(e=>e===t);let o=!0;o=e.shiftKey?Je(s,-1):Je(s,1),e.stopPropagation(),o&&e.preventDefault()},Ze=e=>{const t=_(),s=L(),o=T(),n=E();if(!(t&&s&&o&&n))return;const i=[s,o,n];if(document.activeElement instanceof HTMLElement&&!i.includes(document.activeElement))return;const r=Ge.includes(e)?"nextElementSibling":"previousElementSibling";let a=document.activeElement;if(a){for(let e=0;e<t.children.length;e++){if(a=a[r],!a)return;if(a instanceof HTMLButtonElement&&ee(a))break}a instanceof HTMLButtonElement&&a.focus()}},Qe=(e,t,s)=>{e.preventDefault(),m(t.allowEscapeKey)&&s(Re.esc)};var et={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const tt=()=>{Array.from(document.body.children).forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})},st="undefined"!=typeof window&&Boolean(window.GestureEvent),ot=st&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,nt=()=>{const e=v();if(!e)return;let t;e.ontouchstart=e=>{t=it(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},it=e=>{const t=e.target,s=v(),o=A();return!(!s||!o||rt(e)||at(e)||t!==s&&(te(s)||!(t instanceof HTMLElement)||((e,t)=>{let s=e;for(;s&&s!==t;){if(te(s))return!0;s=s.parentElement}return!1})(t,o)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||te(o)&&o.contains(t)))},rt=e=>Boolean(e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType),at=e=>e.touches&&e.touches.length>1;let lt=null;const ct=e=>{null===lt&&(document.body.scrollHeight>window.innerHeight||"scroll"===e)&&(lt=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${lt+(()=>{const e=document.createElement("div");e.className=r["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function dt(e,t,s,i){H()?vt(e,i):(n(s).then(()=>vt(e,i)),Xe(o)),st?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==lt&&(document.body.style.paddingRight=`${lt}px`,lt=null),(()=>{if(D(document.body,r.iosfix)){const e=parseInt(document.body.style.top,10);J(document.body,r.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),tt()),J([document.documentElement,document.body],[r.shown,r["height-auto"],r["no-backdrop"],r["toast-shown"]])}function ut(e){e=wt(e);const t=et.swalPromiseResolve.get(this),s=pt(this);this.isAwaitingPromise?e.isDismissed||(mt(this),t(e)):s&&t(e)}const pt=e=>{const t=k();if(!t)return!1;const s=he.innerParams.get(e);if(!s||D(t,s.hideClass.popup))return!1;J(t,s.showClass.popup),X(t,s.hideClass.popup);const o=v();return J(o,s.showClass.backdrop),X(o,s.hideClass.backdrop),gt(e,t,s),!0};function ht(e){const t=et.swalPromiseReject.get(this);mt(this),t&&t(e)}const mt=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,he.innerParams.get(e)||e._destroy())},wt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),gt=(e,t,s)=>{var n;const i=v(),r=se(t);"function"==typeof s.willClose&&s.willClose(t),null===(n=o.eventEmitter)||void 0===n||n.emit("willClose",t),r&&i?ft(e,t,i,Boolean(s.returnFocus),s.didClose):i&&dt(e,i,Boolean(s.returnFocus),s.didClose)},ft=(e,t,s,n,i)=>{o.swalCloseEventFinishedCallback=dt.bind(null,e,s,n,i);const r=function(e){var s;e.target===t&&(null===(s=o.swalCloseEventFinishedCallback)||void 0===s||s.call(o),delete o.swalCloseEventFinishedCallback,t.removeEventListener("animationend",r),t.removeEventListener("transitionend",r))};t.addEventListener("animationend",r),t.addEventListener("transitionend",r)},vt=(e,t)=>{setTimeout(()=>{var s;"function"==typeof t&&t.bind(e.params)(),null===(s=o.eventEmitter)||void 0===s||s.emit("didClose"),e._destroy&&e._destroy()})},bt=e=>{let t=k();if(t||new Ys,t=k(),!t)return;const s=P();H()?K(x()):yt(t,e),W(s),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},yt=(e,t)=>{const s=_(),o=P();s&&o&&(!t&&ee(L())&&(t=L()),W(s),t&&(K(t),o.setAttribute("data-button-to-replace",t.className),s.insertBefore(o,t)),X([e,s],r.loading))},kt=e=>e.checked?1:0,xt=e=>e.checked?e.value:null,Ct=e=>e.files&&e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,At=(e,t)=>{const s=k();if(!s)return;const o=e=>{"select"===t.input?function(e,t,s){const o=G(e,r.select);if(!o)return;const n=(e,t,o)=>{const n=document.createElement("option");n.value=o,j(n,t),n.selected=It(o,s.inputValue),e.appendChild(n)};t.forEach(e=>{const t=e[0],s=e[1];if(Array.isArray(s)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,o.appendChild(e),s.forEach(t=>n(e,t[1],t[0]))}else n(o,s,t)}),o.focus()}(s,Ot(e),t):"radio"===t.input&&function(e,t,s){const o=G(e,r.radio);if(!o)return;t.forEach(e=>{const t=e[0],n=e[1],i=document.createElement("input"),a=document.createElement("label");i.type="radio",i.name=r.radio,i.value=t,It(t,s.inputValue)&&(i.checked=!0);const l=document.createElement("span");j(l,n),l.className=r.label,a.appendChild(i),a.appendChild(l),o.appendChild(a)});const n=o.querySelectorAll("input");n.length&&n[0].focus()}(s,Ot(e),t)};w(t.inputOptions)||f(t.inputOptions)?(bt(L()),g(t.inputOptions).then(t=>{e.hideLoading(),o(t)})):"object"==typeof t.inputOptions?o(t.inputOptions):u("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},St=(e,t)=>{const s=e.getInput();s&&(K(s),g(t.inputValue).then(o=>{s.value="number"===t.input?`${parseFloat(o)||0}`:`${o}`,W(s),s.focus(),e.hideLoading()}).catch(t=>{u(`Error in inputValue promise: ${t}`),s.value="",W(s),s.focus(),e.hideLoading()}))};const Ot=e=>(e instanceof Map?Array.from(e):Object.entries(e)).map(([e,t])=>[e,"object"==typeof t?Ot(t):t]),It=(e,t)=>Boolean(t)&&null!=t&&t.toString()===e.toString(),Lt=(e,t)=>{const s=he.innerParams.get(e);if(!s.input)return void u(`The "input" parameter is needed to be set when using returnInputValueOn${c(t)}`);const o=e.getInput(),n=((e,t)=>{const s=e.getInput();if(!s)return null;switch(t.input){case"checkbox":return kt(s);case"radio":return xt(s);case"file":return Ct(s);default:return t.inputAutoTrim?s.value.trim():s.value}})(e,s);s.inputValidator?Et(e,n,t):o&&!o.checkValidity()?(e.enableButtons(),e.showValidationMessage(s.validationMessage||o.validationMessage)):"deny"===t?Tt(e,n):Bt(e,n)},Et=(e,t,s)=>{const o=he.innerParams.get(e);e.disableInput(),Promise.resolve().then(()=>g(o.inputValidator(t,o.validationMessage))).then(o=>{e.enableButtons(),e.enableInput(),o?e.showValidationMessage(o):"deny"===s?Tt(e,t):Bt(e,t)})},Tt=(e,t)=>{const s=he.innerParams.get(e);s.showLoaderOnDeny&&bt(T()),s.preDeny?(e.isAwaitingPromise=!0,Promise.resolve().then(()=>g(s.preDeny(t,s.validationMessage))).then(s=>{!1===s?(e.hideLoading(),mt(e)):e.close({isDenied:!0,value:void 0===s?t:s})}).catch(t=>_t(e,t))):e.close({isDenied:!0,value:t})},Pt=(e,t)=>{e.close({isConfirmed:!0,value:t})},_t=(e,t)=>{e.rejectPromise(t)},Bt=(e,t)=>{const s=he.innerParams.get(e);s.showLoaderOnConfirm&&bt(),s.preConfirm?(e.resetValidationMessage(),e.isAwaitingPromise=!0,Promise.resolve().then(()=>g(s.preConfirm(t,s.validationMessage))).then(s=>{ee(I())||!1===s?(e.hideLoading(),mt(e)):Pt(e,void 0===s?t:s)}).catch(t=>_t(e,t))):Pt(e,t)};function $t(){const e=he.innerParams.get(this);if(!e)return;const t=he.domCache.get(this);K(t.loader),H()?e.icon&&W(x()):Ft(t),J([t.popup,t.actions],r.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),this.enableButtons()}const Ft=e=>{const t=e.loader.getAttribute("data-button-to-replace"),s=t?e.popup.getElementsByClassName(t):[];s.length?W(s[0],"inline-block"):!ee(L())&&!ee(T())&&!ee(E())&&K(e.actions)};function qt(){const e=he.innerParams.get(this),t=he.domCache.get(this);return t?V(t.popup,e.input):null}function Mt(e,t,s){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=s})}function Ht(e,t){const s=k();s&&e&&("radio"===e.type?s.querySelectorAll(`[name="${r.radio}"]`).forEach(e=>{e.disabled=t}):e.disabled=t)}function jt(){Mt(this,["confirmButton","denyButton","cancelButton"],!1);const e=he.focusedElement.get(this);e instanceof HTMLElement&&document.activeElement===document.body&&e.focus(),he.focusedElement.delete(this)}function Dt(){he.focusedElement.set(this,document.activeElement),Mt(this,["confirmButton","denyButton","cancelButton"],!0)}function Nt(){Ht(this.getInput(),!1)}function Vt(){Ht(this.getInput(),!0)}function zt(e){const t=he.domCache.get(this),s=he.innerParams.get(this);j(t.validationMessage,e),t.validationMessage.className=r["validation-message"],s.customClass&&s.customClass.validationMessage&&X(t.validationMessage,s.customClass.validationMessage),W(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid","true"),o.setAttribute("aria-describedby",r["validation-message"]),z(o),X(o,r.inputerror))}function Rt(){const e=he.domCache.get(this);e.validationMessage&&K(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),J(t,r.inputerror))}const Xt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,theme:"light",showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0,topLayer:!1},Jt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","theme","willClose"],Gt={allowEnterKey:void 0},Ut=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Wt=e=>Object.prototype.hasOwnProperty.call(Xt,e),Kt=e=>-1!==Jt.indexOf(e),Yt=e=>Gt[e],Zt=e=>{Wt(e)||d(`Unknown parameter "${e}"`)},Qt=e=>{Ut.includes(e)&&d(`The parameter "${e}" is incompatible with toasts`)},es=e=>{const t=Yt(e);t&&h(e,t)},ts=e=>{!1===e.backdrop&&e.allowOutsideClick&&d('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),e.theme&&!["light","dark","auto","minimal","borderless","bootstrap-4","bootstrap-4-light","bootstrap-4-dark","bootstrap-5","bootstrap-5-light","bootstrap-5-dark","material-ui","material-ui-light","material-ui-dark","embed-iframe","bulma","bulma-light","bulma-dark"].includes(e.theme)&&d(`Invalid theme "${e.theme}"`);for(const t in e)Zt(t),e.toast&&Qt(t),es(t)};function ss(e){const t=v(),s=k(),o=he.innerParams.get(this);if(!s||D(s,o.hideClass.popup))return void d("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const n=os(e),i=Object.assign({},o,n);ts(i),t&&(t.dataset.swal2Theme=i.theme),Ve(this,i),he.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const os=e=>{const t={};return Object.keys(e).forEach(s=>{if(Kt(s)){const o=e;t[s]=o[s]}else d(`Invalid parameter to update: ${s}`)}),t};function ns(){var e;const t=he.domCache.get(this),s=he.innerParams.get(this);s?(t.popup&&o.swalCloseEventFinishedCallback&&(o.swalCloseEventFinishedCallback(),delete o.swalCloseEventFinishedCallback),"function"==typeof s.didDestroy&&s.didDestroy(),null===(e=o.eventEmitter)||void 0===e||e.emit("didDestroy"),is(this)):rs(this)}const is=e=>{rs(e),delete e.params,delete o.keydownHandler,delete o.keydownTarget,delete o.currentInstance},rs=e=>{e.isAwaitingPromise?(as(he,e),e.isAwaitingPromise=!0):(as(et,e),as(he,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},as=(e,t)=>{for(const s in e)e[s].delete(t)};var ls=Object.freeze({__proto__:null,_destroy:ns,close:ut,closeModal:ut,closePopup:ut,closeToast:ut,disableButtons:Dt,disableInput:Vt,disableLoading:$t,enableButtons:jt,enableInput:Nt,getInput:qt,handleAwaitingPromise:mt,hideLoading:$t,rejectPromise:ht,resetValidationMessage:Rt,showValidationMessage:zt,update:ss});const cs=(e,t,s)=>{t.popup.onclick=()=>{e&&(ds(e)||e.timer||e.input)||s(Re.close)}},ds=e=>Boolean(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton);let us=!1;const ps=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(us=!0)}}},hs=e=>{e.container.onmousedown=t=>{t.target===e.container&&t.preventDefault(),e.popup.onmouseup=function(t){e.popup.onmouseup=()=>{},(t.target===e.popup||t.target instanceof HTMLElement&&e.popup.contains(t.target))&&(us=!0)}}},ms=(e,t,s)=>{t.container.onclick=o=>{us?us=!1:o.target===t.container&&m(e.allowOutsideClick)&&s(Re.backdrop)}},ws=e=>e instanceof Element||(e=>"object"==typeof e&&null!==e&&"jquery"in e)(e);const gs=()=>{if(o.timeout)return(()=>{const e=$();if(!e)return;const t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const s=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${s}%`})(),o.timeout.stop()},fs=()=>{if(o.timeout){const e=o.timeout.start();return oe(e),e}};let vs=!1;const bs={};const ys=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in bs){const s=t.getAttribute&&t.getAttribute(e);if(s)return void bs[e].fire({template:s})}};o.eventEmitter=new class{constructor(){this.events={}}_getHandlersByEventName(e){return void 0===this.events[e]&&(this.events[e]=[]),this.events[e]}on(e,t){const s=this._getHandlersByEventName(e);s.includes(t)||s.push(t)}once(e,t){const s=(...o)=>{this.removeListener(e,s),t.apply(this,o)};this.on(e,s)}emit(e,...t){this._getHandlersByEventName(e).forEach(e=>{try{e.apply(this,t)}catch(e){console.error(e)}})}removeListener(e,t){const s=this._getHandlersByEventName(e),o=s.indexOf(t);o>-1&&s.splice(o,1)}removeAllListeners(e){void 0!==this.events[e]&&(this.events[e].length=0)}reset(){this.events={}}};var ks=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||ws(e[0])?["title","html","icon"].forEach((s,o)=>{const n=e[o];"string"==typeof n||ws(n)?t[s]=n:void 0!==n&&u(`Unexpected type of ${s}! Expected "string" or "Element", got ${typeof n}`)}):Object.assign(t,e[0]),t},bindClickHandler:function(e="data-swal-template"){bs[e]=this,vs||(document.body.addEventListener("click",ys),vs=!0)},clickCancel:()=>{var e;return null===(e=E())||void 0===e?void 0:e.click()},clickConfirm:ze,clickDeny:()=>{var e;return null===(e=T())||void 0===e?void 0:e.click()},enableLoading:bt,fire:function(...e){return new this(...e)},getActions:_,getCancelButton:E,getCloseButton:F,getConfirmButton:L,getContainer:v,getDenyButton:T,getFocusableElements:q,getFooter:B,getHtmlContainer:A,getIcon:x,getIconContent:()=>y(r["icon-content"]),getImage:S,getInputLabel:()=>y(r["input-label"]),getLoader:P,getPopup:k,getProgressSteps:O,getTimerLeft:()=>o.timeout&&o.timeout.getTimerLeft(),getTimerProgressBar:$,getTitle:C,getValidationMessage:I,increaseTimer:e=>{if(o.timeout){const t=o.timeout.increase(e);return oe(t,!0),t}},isDeprecatedParameter:Yt,isLoading:()=>{const e=k();return!!e&&e.hasAttribute("data-loading")},isTimerRunning:()=>Boolean(o.timeout&&o.timeout.isRunning()),isUpdatableParameter:Kt,isValidParameter:Wt,isVisible:()=>ee(k()),mixin:function(e){return class extends(this){_main(t,s){return super._main(t,Object.assign({},e,s))}}},off:(e,t)=>{o.eventEmitter&&(e?t?o.eventEmitter.removeListener(e,t):o.eventEmitter.removeAllListeners(e):o.eventEmitter.reset())},on:(e,t)=>{o.eventEmitter&&o.eventEmitter.on(e,t)},once:(e,t)=>{o.eventEmitter&&o.eventEmitter.once(e,t)},resumeTimer:fs,showLoading:bt,stopTimer:gs,toggleTimer:()=>{const e=o.timeout;return e&&(e.running?gs():fs())}});class xs{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const Cs=["swal-title","swal-html","swal-footer"],As=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach(e=>{_s(e,["name","value"]);const s=e.getAttribute("name"),o=e.getAttribute("value");s&&o&&(t[s]=s in Xt&&"boolean"==typeof Xt[s]?"false"!==o:s in Xt&&"object"==typeof Xt[s]?JSON.parse(o):o)}),t},Ss=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach(e=>{const s=e.getAttribute("name"),o=e.getAttribute("value");s&&o&&(t[s]=new Function(`return ${o}`)())}),t},Os=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach(e=>{_s(e,["type","color","aria-label"]);const s=e.getAttribute("type");if(!s||!["confirm","cancel","deny"].includes(s))return;t[`${s}ButtonText`]=e.innerHTML,t[`show${c(s)}Button`]=!0;const o=e.getAttribute("color");null!==o&&(t[`${s}ButtonColor`]=o);const n=e.getAttribute("aria-label");null!==n&&(t[`${s}ButtonAriaLabel`]=n)}),t},Is=e=>{const t={},s=e.querySelector("swal-image");if(s){_s(s,["src","width","height","alt"]);const e=s.getAttribute("src");null!==e&&(t.imageUrl=e||void 0);const o=s.getAttribute("width");null!==o&&(t.imageWidth=o||void 0);const n=s.getAttribute("height");null!==n&&(t.imageHeight=n||void 0);const i=s.getAttribute("alt");null!==i&&(t.imageAlt=i||void 0)}return t},Ls=e=>{const t={},s=e.querySelector("swal-icon");return s&&(_s(s,["type","color"]),s.hasAttribute("type")&&(t.icon=s.getAttribute("type")),s.hasAttribute("color")&&(t.iconColor=s.getAttribute("color")),t.iconHtml=s.innerHTML),t},Es=e=>{const t={},s=e.querySelector("swal-input");s&&(_s(s,["type","label","placeholder","value"]),t.input=s.getAttribute("type")||"text",s.hasAttribute("label")&&(t.inputLabel=s.getAttribute("label")),s.hasAttribute("placeholder")&&(t.inputPlaceholder=s.getAttribute("placeholder")),s.hasAttribute("value")&&(t.inputValue=s.getAttribute("value")));const o=Array.from(e.querySelectorAll("swal-input-option"));return o.length&&(t.inputOptions={},o.forEach(e=>{_s(e,["value"]);const s=e.getAttribute("value");if(!s)return;const o=e.innerHTML;t.inputOptions[s]=o})),t},Ts=(e,t)=>{const s={};for(const o in t){const n=t[o],i=e.querySelector(n);i&&(_s(i,[]),s[n.replace(/^swal-/,"")]=i.innerHTML.trim())}return s},Ps=e=>{const t=Cs.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach(e=>{const s=e.tagName.toLowerCase();t.includes(s)||d(`Unrecognized element <${s}>`)})},_s=(e,t)=>{Array.from(e.attributes).forEach(s=>{-1===t.indexOf(s.name)&&d([`Unrecognized attribute "${s.name}" on <${e.tagName.toLowerCase()}>.`,t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element."])})},Bs=e=>{var t,s;const n=v(),i=k();if(!n||!i)return;"function"==typeof e.willOpen&&e.willOpen(i),null===(t=o.eventEmitter)||void 0===t||t.emit("willOpen",i);const r=window.getComputedStyle(document.body).overflowY;if(Ms(n,i,e),setTimeout(()=>{Fs(n,i)},10),M()&&(qs(n,void 0!==e.scrollbarPadding&&e.scrollbarPadding,r),(()=>{const e=v();Array.from(document.body.children).forEach(t=>{t.contains(e)||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")||""),t.setAttribute("aria-hidden","true"))})})()),ot&&!1===e.backdrop&&i.scrollHeight>n.clientHeight&&(n.style.pointerEvents="auto"),H()||o.previousActiveElement||(o.previousActiveElement=document.activeElement),"function"==typeof e.didOpen){const t=e.didOpen;setTimeout(()=>t(i))}null===(s=o.eventEmitter)||void 0===s||s.emit("didOpen",i)},$s=e=>{const t=k();if(!t||e.target!==t)return;const s=v();s&&(t.removeEventListener("animationend",$s),t.removeEventListener("transitionend",$s),s.style.overflowY="auto",J(s,r["no-transition"]))},Fs=(e,t)=>{se(t)?(e.style.overflowY="hidden",t.addEventListener("animationend",$s),t.addEventListener("transitionend",$s)):e.style.overflowY="auto"},qs=(e,t,s)=>{(()=>{if(st&&!D(document.body,r.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",X(document.body,r.iosfix),nt()}})(),t&&"hidden"!==s&&ct(s),setTimeout(()=>{e.scrollTop=0})},Ms=(e,t,s)=>{var o;null!==(o=s.showClass)&&void 0!==o&&o.backdrop&&X(e,s.showClass.backdrop),s.animation?(t.style.setProperty("opacity","0","important"),W(t,"grid"),setTimeout(()=>{var e;null!==(e=s.showClass)&&void 0!==e&&e.popup&&X(t,s.showClass.popup),t.style.removeProperty("opacity")},10)):W(t,"grid"),X([document.documentElement,document.body],r.shown),s.heightAuto&&s.backdrop&&!s.toast&&X([document.documentElement,document.body],r["height-auto"])};var Hs=(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),js=(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL");function Ds(e){(function(e){e.inputValidator||("email"===e.input&&(e.inputValidator=Hs),"url"===e.input&&(e.inputValidator=js))})(e),e.showLoaderOnConfirm&&!e.preConfirm&&d("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(d('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),re(e)}let Ns;var Vs=new WeakMap;class zs{constructor(...t){if(s(this,Vs,Promise.resolve({isConfirmed:!1,isDenied:!1,isDismissed:!0})),"undefined"==typeof window)return;Ns=this;const o=Object.freeze(this.constructor.argsToParams(t));var n,i,r;this.params=o,this.isAwaitingPromise=!1,n=Vs,i=this,r=this._main(Ns.params),n.set(e(n,i),r)}_main(e,t={}){if(ts(Object.assign({},t,e)),o.currentInstance){const e=et.swalPromiseResolve.get(o.currentInstance),{isAwaitingPromise:t}=o.currentInstance;o.currentInstance._destroy(),t||e({isDismissed:!0}),M()&&tt()}o.currentInstance=Ns;const s=Xs(e,t);Ds(s),Object.freeze(s),o.timeout&&(o.timeout.stop(),delete o.timeout),clearTimeout(o.restoreFocusTimeout);const n=Js(Ns);return Ve(Ns,s),he.innerParams.set(Ns,s),Rs(Ns,n,s)}then(e){return t(Vs,this).then(e)}finally(e){return t(Vs,this).finally(e)}}const Rs=(e,t,s)=>new Promise((n,i)=>{const r=t=>{e.close({isDismissed:!0,dismiss:t,isConfirmed:!1,isDenied:!1})};et.swalPromiseResolve.set(e,n),et.swalPromiseReject.set(e,i),t.confirmButton.onclick=()=>{(e=>{const t=he.innerParams.get(e);e.disableButtons(),t.input?Lt(e,"confirm"):Bt(e,!0)})(e)},t.denyButton.onclick=()=>{(e=>{const t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?Lt(e,"deny"):Tt(e,!1)})(e)},t.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Re.cancel)})(e,r)},t.closeButton.onclick=()=>{r(Re.close)},((e,t,s)=>{e.toast?cs(e,t,s):(ps(t),hs(t),ms(e,t,s))})(s,t,r),((e,t,s)=>{if(Xe(e),!t.toast){const o=e=>We(t,e,s);e.keydownHandler=o;const n=t.keydownListenerCapture?window:k();if(n){e.keydownTarget=n,e.keydownListenerCapture=t.keydownListenerCapture;const s=o;e.keydownTarget.addEventListener("keydown",s,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0}}})(o,s,r),((e,t)=>{"select"===t.input||"radio"===t.input?At(e,t):["text","email","number","tel","textarea"].some(e=>e===t.input)&&(w(t.inputValue)||f(t.inputValue))&&(bt(L()),St(e,t))})(e,s),Bs(s),Gs(o,s,r),Us(t,s),setTimeout(()=>{t.container.scrollTop=0})}),Xs=(e,t)=>{const s=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const s=t.content;return Ps(s),Object.assign(As(s),Ss(s),Os(s),Is(s),Ls(s),Es(s),Ts(s,Cs))})(e),o=Object.assign({},Xt,t,s,e);return o.showClass=Object.assign({},Xt.showClass,o.showClass),o.hideClass=Object.assign({},Xt.hideClass,o.hideClass),!1===o.animation&&(o.showClass={backdrop:"swal2-noanimation"},o.hideClass={}),o},Js=e=>{const t={popup:k(),container:v(),actions:_(),confirmButton:L(),denyButton:T(),cancelButton:E(),loader:P(),closeButton:F(),validationMessage:I(),progressSteps:O()};return he.domCache.set(e,t),t},Gs=(e,t,s)=>{const o=$();K(o),t.timer&&(e.timeout=new xs(()=>{s("timer"),delete e.timeout},t.timer),t.timerProgressBar&&o&&(W(o),N(o,t,"timerProgressBar"),setTimeout(()=>{e.timeout&&e.timeout.running&&oe(t.timer)})))},Us=(e,t)=>{if(!t.toast)return m(t.allowEnterKey)?void(Ws(e)||Ks(e,t)||Je(-1,1)):(h("allowEnterKey","preConfirm: () => false"),void e.popup.focus())},Ws=e=>{const t=Array.from(e.popup.querySelectorAll("[autofocus]"));for(const e of t)if(e instanceof HTMLElement&&ee(e))return e.focus(),!0;return!1},Ks=(e,t)=>t.focusDeny&&ee(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&ee(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!ee(e.confirmButton)||(e.confirmButton.focus(),0));zs.prototype.disableButtons=Dt,zs.prototype.enableButtons=jt,zs.prototype.getInput=qt,zs.prototype.disableInput=Vt,zs.prototype.enableInput=Nt,zs.prototype.hideLoading=$t,zs.prototype.disableLoading=$t,zs.prototype.showValidationMessage=zt,zs.prototype.resetValidationMessage=Rt,zs.prototype.close=ut,zs.prototype.closePopup=ut,zs.prototype.closeModal=ut,zs.prototype.closeToast=ut,zs.prototype.rejectPromise=ht,zs.prototype.update=ss,zs.prototype._destroy=ns,Object.assign(zs,ks),Object.keys(ls).forEach(e=>{zs[e]=function(...t){if(Ns&&Ns[e])return Ns[e](...t)}}),zs.DismissReason=Re,zs.version="11.26.25";const Ys=zs;return Ys.default=Ys,Ys}(),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2),"undefined"!=typeof document&&function(e,t){var s=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(s),s.styleSheet)s.styleSheet.disabled||(s.styleSheet.cssText=t);else try{s.innerHTML=t}catch(e){s.innerText=t}}(document,':root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:auto}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:auto}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}')},7736(e){var t;t=function(e){var t=function(e){return new t.lib.init(e)};function s(e,t){return t.offset[e]?isNaN(t.offset[e])?t.offset[e]:t.offset[e]+"px":"0px"}function o(e,t){return!(!e||"string"!=typeof t||!(e.className&&e.className.trim().split(/\s+/gi).indexOf(t)>-1))}return t.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},t.lib=t.prototype={toastify:"1.12.0",constructor:t,init:function(e){return e||(e={}),this.options={},this.toastElement=null,this.options.text=e.text||t.defaults.text,this.options.node=e.node||t.defaults.node,this.options.duration=0===e.duration?0:e.duration||t.defaults.duration,this.options.selector=e.selector||t.defaults.selector,this.options.callback=e.callback||t.defaults.callback,this.options.destination=e.destination||t.defaults.destination,this.options.newWindow=e.newWindow||t.defaults.newWindow,this.options.close=e.close||t.defaults.close,this.options.gravity="bottom"===e.gravity?"toastify-bottom":t.defaults.gravity,this.options.positionLeft=e.positionLeft||t.defaults.positionLeft,this.options.position=e.position||t.defaults.position,this.options.backgroundColor=e.backgroundColor||t.defaults.backgroundColor,this.options.avatar=e.avatar||t.defaults.avatar,this.options.className=e.className||t.defaults.className,this.options.stopOnFocus=void 0===e.stopOnFocus?t.defaults.stopOnFocus:e.stopOnFocus,this.options.onClick=e.onClick||t.defaults.onClick,this.options.offset=e.offset||t.defaults.offset,this.options.escapeMarkup=void 0!==e.escapeMarkup?e.escapeMarkup:t.defaults.escapeMarkup,this.options.ariaLive=e.ariaLive||t.defaults.ariaLive,this.options.style=e.style||t.defaults.style,e.backgroundColor&&(this.options.style.background=e.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var e=document.createElement("div");for(var t in e.className="toastify on "+this.options.className,this.options.position?e.className+=" toastify-"+this.options.position:!0===this.options.positionLeft?(e.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):e.className+=" toastify-right",e.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.'),this.options.style)e.style[t]=this.options.style[t];if(this.options.ariaLive&&e.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(this.options.escapeMarkup?e.innerText=this.options.text:e.innerHTML=this.options.text,""!==this.options.avatar){var o=document.createElement("img");o.src=this.options.avatar,o.className="toastify-avatar","left"==this.options.position||!0===this.options.positionLeft?e.appendChild(o):e.insertAdjacentElement("afterbegin",o)}if(!0===this.options.close){var n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="&#10006;",n.addEventListener("click",function(e){e.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}.bind(this));var i=window.innerWidth>0?window.innerWidth:screen.width;("left"==this.options.position||!0===this.options.positionLeft)&&i>360?e.insertAdjacentElement("afterbegin",n):e.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0){var r=this;e.addEventListener("mouseover",function(t){window.clearTimeout(e.timeOutValue)}),e.addEventListener("mouseleave",function(){e.timeOutValue=window.setTimeout(function(){r.removeElement(e)},r.options.duration)})}if(void 0!==this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}.bind(this)),"function"==typeof this.options.onClick&&void 0===this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),this.options.onClick()}.bind(this)),"object"==typeof this.options.offset){var a=s("x",this.options),l=s("y",this.options),c="left"==this.options.position?a:"-"+a,d="toastify-top"==this.options.gravity?l:"-"+l;e.style.transform="translate("+c+","+d+")"}return e},showToast:function(){var e;if(this.toastElement=this.buildToast(),!(e="string"==typeof this.options.selector?document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||"undefined"!=typeof ShadowRoot&&this.options.selector instanceof ShadowRoot?this.options.selector:document.body))throw"Root element is not defined";var s=t.defaults.oldestFirst?e.firstChild:e.lastChild;return e.insertBefore(this.toastElement,s),t.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(e){e.className=e.className.replace(" on",""),window.setTimeout(function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),t.reposition()}.bind(this),400)}},t.reposition=function(){for(var e,t={top:15,bottom:15},s={top:15,bottom:15},n={top:15,bottom:15},i=document.getElementsByClassName("toastify"),r=0;r<i.length;r++){e=!0===o(i[r],"toastify-top")?"toastify-top":"toastify-bottom";var a=i[r].offsetHeight;e=e.substr(9,e.length-1),(window.innerWidth>0?window.innerWidth:screen.width)<=360?(i[r].style[e]=n[e]+"px",n[e]+=a+15):!0===o(i[r],"toastify-left")?(i[r].style[e]=t[e]+"px",t[e]+=a+15):(i[r].style[e]=s[e]+"px",s[e]+=a+15)}return this},t.lib.init.prototype=t.lib,t},e.exports?e.exports=t():this.Toastify=t()}};const t={};function s(o){const n=t[o];if(void 0!==n)return n.exports;const i=t[o]={id:o,exports:{}};return e[o].call(i.exports,i,i.exports,s),i.exports}s.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{if(Array.isArray(t))for(var o=0;o<t.length;){var n=t[o++],i=t[o++];s.o(e,n)?0===i&&o++:0===i?Object.defineProperty(e,n,{enumerable:!0,value:t[o++]}):Object.defineProperty(e,n,{enumerable:!0,get:i})}else for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.hasOwn(e,t),s.cjs=e=>{const t={exports:{}};return e.call(t.exports,t,t.exports),t.exports},s.nc=void 0,s(6979)})();
1 +(()=>{var e={9455(e,t,s){"use strict";s.d(t,{A:()=>a});var o=s(1601),n=s.n(o),i=s(6314),r=s.n(i)()(n());r.push([e.id,"/*!\n * Toastify js 1.12.0\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */\n\n.toastify {\n padding: 12px 20px;\n color: #ffffff;\n display: inline-block;\n box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3);\n background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5);\n background: linear-gradient(135deg, #73a5ff, #5477f5);\n position: fixed;\n opacity: 0;\n transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);\n border-radius: 2px;\n cursor: pointer;\n text-decoration: none;\n max-width: calc(50% - 20px);\n z-index: 2147483647;\n}\n\n.toastify.on {\n opacity: 1;\n}\n\n.toast-close {\n background: transparent;\n border: 0;\n color: white;\n cursor: pointer;\n font-family: inherit;\n font-size: 1em;\n opacity: 0.4;\n padding: 0 5px;\n}\n\n.toastify-right {\n right: 15px;\n}\n\n.toastify-left {\n left: 15px;\n}\n\n.toastify-top {\n top: -150px;\n}\n\n.toastify-bottom {\n bottom: -150px;\n}\n\n.toastify-rounded {\n border-radius: 25px;\n}\n\n.toastify-avatar {\n width: 1.5em;\n height: 1.5em;\n margin: -7px 5px;\n border-radius: 2px;\n}\n\n.toastify-center {\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n max-width: fit-content;\n max-width: -moz-fit-content;\n}\n\n@media only screen and (max-width: 360px) {\n .toastify-right, .toastify-left {\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n max-width: fit-content;\n }\n}\n",""]);const a=r},6314(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var s="",o=void 0!==t[5];return t[4]&&(s+="@supports (".concat(t[4],") {")),t[2]&&(s+="@media ".concat(t[2]," {")),o&&(s+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),s+=e(t),o&&(s+="}"),t[2]&&(s+="}"),t[4]&&(s+="}"),s}).join("")},t.i=function(e,s,o,n,i){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(o)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(r[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);o&&r[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),s&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=s):d[2]=s),n&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=n):d[4]="".concat(n)),t.push(d))}},t}},1601(e){"use strict";e.exports=function(e){return e[1]}},5072(e){"use strict";var t=[];function s(e){for(var s=-1,o=0;o<t.length;o++)if(t[o].identifier===e){s=o;break}return s}function o(e,o){for(var i={},r=[],a=0;a<e.length;a++){var l=e[a],c=o.base?l[0]+o.base:l[0],d=i[c]||0,u="".concat(c," ").concat(d);i[c]=d+1;var p=s(u),h={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(h);else{var m=n(h,o);o.byIndex=a,t.splice(a,0,{identifier:u,updater:m,references:1})}r.push(u)}return r}function n(e,t){var s=t.domAPI(t);return s.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;s.update(e=t)}else s.remove()}}e.exports=function(e,n){var i=o(e=e||[],n=n||{});return function(e){e=e||[];for(var r=0;r<i.length;r++){var a=s(i[r]);t[a].references--}for(var l=o(e,n),c=0;c<i.length;c++){var d=s(i[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}i=l}}},7659(e){"use strict";var t={};e.exports=function(e,s){var o=function(e){if(void 0===t[e]){var s=document.querySelector(e);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(e){s=null}t[e]=s}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(s)}},540(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056(e,t,s){"use strict";e.exports=function(e){var t=s.nc;t&&e.setAttribute("nonce",t)}},7825(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(s){!function(e,t,s){var o="";s.supports&&(o+="@supports (".concat(s.supports,") {")),s.media&&(o+="@media ".concat(s.media," {"));var n=void 0!==s.layer;n&&(o+="@layer".concat(s.layer.length>0?" ".concat(s.layer):""," {")),o+=s.css,n&&(o+="}"),s.media&&(o+="}"),s.supports&&(o+="}");var i=s.sourceMap;i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,s)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},8465(e){e.exports=function(){"use strict";function e(e,t,s){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:s;throw new TypeError("Private element is not present on this object")}function t(t,s){return t.get(e(t,s))}function s(e,t,s){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,s)}const o={},n=e=>new Promise(t=>{if(!e)return t();const s=window.scrollX,n=window.scrollY;o.restoreFocusTimeout=setTimeout(()=>{o.previousActiveElement instanceof HTMLElement?(o.previousActiveElement.focus(),o.previousActiveElement=null):document.body&&document.body.focus(),t()},100),window.scrollTo(s,n)}),i="swal2-",r=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"].reduce((e,t)=>(e[t]=i+t,e),{}),a=["success","warning","info","question","error"].reduce((e,t)=>(e[t]=i+t,e),{}),l="SweetAlert2:",c=e=>e.charAt(0).toUpperCase()+e.slice(1),d=e=>{console.warn(`${l} ${"object"==typeof e?e.join(" "):e}`)},u=e=>{console.error(`${l} ${e}`)},p=[],h=(e,t=null)=>{var s;s=`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`,p.includes(s)||(p.push(s),d(s))},m=e=>"function"==typeof e?e():e,w=e=>e&&"function"==typeof e.toPromise,g=e=>w(e)?e.toPromise():Promise.resolve(e),f=e=>e&&Promise.resolve(e)===e,v=()=>document.body.querySelector(`.${r.container}`),b=e=>{const t=v();return t?t.querySelector(e):null},y=e=>b(`.${e}`),k=()=>y(r.popup),C=()=>y(r.icon),x=()=>y(r.title),A=()=>y(r["html-container"]),S=()=>y(r.image),O=()=>y(r["progress-steps"]),I=()=>y(r["validation-message"]),L=()=>b(`.${r.actions} .${r.confirm}`),T=()=>b(`.${r.actions} .${r.cancel}`),E=()=>b(`.${r.actions} .${r.deny}`),P=()=>b(`.${r.loader}`),B=()=>y(r.actions),_=()=>y(r.footer),$=()=>y(r["timer-progress-bar"]),F=()=>y(r.close),q=()=>{const e=k();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),s=Array.from(t).sort((e,t)=>{const s=parseInt(e.getAttribute("tabindex")||"0"),o=parseInt(t.getAttribute("tabindex")||"0");return s>o?1:s<o?-1:0}),o=e.querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n'),n=Array.from(o).filter(e=>"-1"!==e.getAttribute("tabindex"));return[...new Set(s.concat(n))].filter(e=>ee(e))},M=()=>D(document.body,r.shown)&&!D(document.body,r["toast-shown"])&&!D(document.body,r["no-backdrop"]),H=()=>{const e=k();return!!e&&D(e,r.toast)},j=(e,t)=>{if(e.textContent="",t){const s=(new DOMParser).parseFromString(t,"text/html"),o=s.querySelector("head");o&&Array.from(o.childNodes).forEach(t=>{e.appendChild(t)});const n=s.querySelector("body");n&&Array.from(n.childNodes).forEach(t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)})}},D=(e,t)=>{if(!t)return!1;const s=t.split(/\s+/);for(let t=0;t<s.length;t++)if(!e.classList.contains(s[t]))return!1;return!0},N=(e,t,s)=>{if(((e,t)=>{Array.from(e.classList).forEach(s=>{Object.values(r).includes(s)||Object.values(a).includes(s)||Object.values(t.showClass||{}).includes(s)||e.classList.remove(s)})})(e,t),!t.customClass)return;const o=t.customClass[s];o&&("string"==typeof o||o.forEach?X(e,o):d(`Invalid type of customClass.${s}! Expected string or iterable object, got "${typeof o}"`))},V=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${r.popup} > .${r[t]}`);case"checkbox":return e.querySelector(`.${r.popup} > .${r.checkbox} input`);case"radio":return e.querySelector(`.${r.popup} > .${r.radio} input:checked`)||e.querySelector(`.${r.popup} > .${r.radio} input:first-child`);case"range":return e.querySelector(`.${r.popup} > .${r.range} input`);default:return e.querySelector(`.${r.popup} > .${r.input}`)}},z=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},R=(e,t,s)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach(t=>{Array.isArray(e)?e.forEach(e=>{s?e.classList.add(t):e.classList.remove(t)}):s?e.classList.add(t):e.classList.remove(t)}))},X=(e,t)=>{R(e,t,!0)},J=(e,t)=>{R(e,t,!1)},G=(e,t)=>{const s=Array.from(e.children);for(let e=0;e<s.length;e++){const o=s[e];if(o instanceof HTMLElement&&D(o,t))return o}},U=(e,t,s)=>{s===`${parseInt(`${s}`)}`&&(s=parseInt(s)),s||0===parseInt(`${s}`)?e.style.setProperty(t,"number"==typeof s?`${s}px`:s):e.style.removeProperty(t)},W=(e,t="flex")=>{e&&(e.style.display=t)},K=e=>{e&&(e.style.display="none")},Y=(e,t="block")=>{e&&new MutationObserver(()=>{Q(e,e.innerHTML,t)}).observe(e,{childList:!0,subtree:!0})},Z=(e,t,s,o)=>{const n=e.querySelector(t);n&&n.style.setProperty(s,o)},Q=(e,t,s="flex")=>{t?W(e,s):K(e)},ee=e=>Boolean(e&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),te=e=>Boolean(e.scrollHeight>e.clientHeight),se=e=>{const t=window.getComputedStyle(e),s=parseFloat(t.getPropertyValue("animation-duration")||"0"),o=parseFloat(t.getPropertyValue("transition-duration")||"0");return s>0||o>0},oe=(e,t=!1)=>{const s=$();s&&ee(s)&&(t&&(s.style.transition="none",s.style.width="100%"),setTimeout(()=>{s.style.transition=`width ${e/1e3}s linear`,s.style.width="0%"},10))},ne=`\n <div aria-labelledby="${r.title}" aria-describedby="${r["html-container"]}" class="${r.popup}" tabindex="-1">\n <button type="button" class="${r.close}"></button>\n <ul class="${r["progress-steps"]}"></ul>\n <div class="${r.icon}"></div>\n <img class="${r.image}" />\n <h2 class="${r.title}" id="${r.title}"></h2>\n <div class="${r["html-container"]}" id="${r["html-container"]}"></div>\n <input class="${r.input}" id="${r.input}" />\n <input type="file" class="${r.file}" />\n <div class="${r.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${r.select}" id="${r.select}"></select>\n <div class="${r.radio}"></div>\n <label class="${r.checkbox}">\n <input type="checkbox" id="${r.checkbox}" />\n <span class="${r.label}"></span>\n </label>\n <textarea class="${r.textarea}" id="${r.textarea}"></textarea>\n <div class="${r["validation-message"]}" id="${r["validation-message"]}"></div>\n <div class="${r.actions}">\n <div class="${r.loader}"></div>\n <button type="button" class="${r.confirm}"></button>\n <button type="button" class="${r.deny}"></button>\n <button type="button" class="${r.cancel}"></button>\n </div>\n <div class="${r.footer}"></div>\n <div class="${r["timer-progress-bar-container"]}">\n <div class="${r["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),ie=()=>{o.currentInstance&&o.currentInstance.resetValidationMessage()},re=e=>{const t=(()=>{const e=v();return!!e&&(e.remove(),J([document.documentElement,document.body],[r["no-backdrop"],r["toast-shown"],r["has-column"]]),!0)})();if("undefined"==typeof window||"undefined"==typeof document)return void u("SweetAlert2 requires document to initialize");const s=document.createElement("div");s.className=r.container,t&&X(s,r["no-transition"]),j(s,ne),s.dataset.swal2Theme=e.theme;const n=(e=>{if("string"==typeof e){const t=document.querySelector(e);if(!t)throw new Error(`Target element "${e}" not found`);return t}return e})(e.target||"body");n.appendChild(s),e.topLayer&&(s.setAttribute("popover",""),s.showPopover()),(e=>{const t=k();t&&(t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true"))})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&(X(v(),r.rtl),o.isRTL=!0)})(n),(()=>{const e=k();if(!e)return;const t=G(e,r.input),s=G(e,r.file),o=e.querySelector(`.${r.range} input`),n=e.querySelector(`.${r.range} output`),i=G(e,r.select),a=e.querySelector(`.${r.checkbox} input`),l=G(e,r.textarea);t&&(t.oninput=ie),s&&(s.onchange=ie),i&&(i.onchange=ie),a&&(a.onchange=ie),l&&(l.oninput=ie),o&&n&&(o.oninput=()=>{ie(),n.value=o.value},o.onchange=()=>{ie(),n.value=o.value})})()},ae=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?le(e,t):e&&j(t,e)},le=(e,t)=>{"jquery"in e?ce(t,e):j(t,e.toString())},ce=(e,t)=>{if(e.textContent="",0 in t)for(let s=0;s in t;s++)e.appendChild(t[s].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},de=(e,t)=>{const s=B(),o=P();s&&o&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?W(s):K(s),N(s,t,"actions"),function(e,t,s){const o=L(),n=E(),i=T();o&&n&&i&&(pe(o,"confirm",s),pe(n,"deny",s),pe(i,"cancel",s),function(e,t,s,o){o.buttonsStyling?(X([e,t,s],r.styled),o.confirmButtonColor&&e.style.setProperty("--swal2-confirm-button-background-color",o.confirmButtonColor),o.denyButtonColor&&t.style.setProperty("--swal2-deny-button-background-color",o.denyButtonColor),o.cancelButtonColor&&s.style.setProperty("--swal2-cancel-button-background-color",o.cancelButtonColor),ue(e),ue(t),ue(s)):J([e,t,s],r.styled)}(o,n,i,s),s.reverseButtons&&(s.toast?(e.insertBefore(i,o),e.insertBefore(n,o)):(e.insertBefore(i,t),e.insertBefore(n,t),e.insertBefore(o,t))))}(s,o,t),j(o,t.loaderHtml||""),N(o,t,"loader"))};function ue(e){const t=window.getComputedStyle(e);if(t.getPropertyValue("--swal2-action-button-focus-box-shadow"))return;const s=t.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/,"rgba($1, $2, $3, 0.5)");e.style.setProperty("--swal2-action-button-focus-box-shadow",t.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/,` ${s}`))}function pe(e,t,s){const o=c(t);Q(e,s[`show${o}Button`],"inline-block"),j(e,s[`${t}ButtonText`]||""),e.setAttribute("aria-label",s[`${t}ButtonAriaLabel`]||""),e.className=r[t],N(e,s,`${t}Button`)}const he=(e,t)=>{const s=v();s&&(function(e,t){"string"==typeof t?e.style.background=t:t||X([document.documentElement,document.body],r["no-backdrop"])}(s,t.backdrop),function(e,t){t&&(t in r?X(e,r[t]):(d('The "position" parameter is not valid, defaulting to "center"'),X(e,r.center)))}(s,t.position),function(e,t){t&&X(e,r[`grow-${t}`])}(s,t.grow),N(s,t,"container"))};var me={innerParams:new WeakMap,domCache:new WeakMap};const we=["input","file","range","select","radio","checkbox","textarea"],ge=e=>{if(!e.input)return;if(!xe[e.input])return void u(`Unexpected type of input! Expected ${Object.keys(xe).join(" | ")}, got "${e.input}"`);const t=ke(e.input);if(!t)return;const s=xe[e.input](t,e);W(t),e.inputAutoFocus&&setTimeout(()=>{z(s)})},fe=(e,t)=>{const s=k();if(!s)return;const o=V(s,e);if(o){(e=>{for(let t=0;t<e.attributes.length;t++){const s=e.attributes[t].name;["id","type","value","style"].includes(s)||e.removeAttribute(s)}})(o);for(const e in t)o.setAttribute(e,t[e])}},ve=e=>{if(!e.input)return;const t=ke(e.input);t&&N(t,e,"input")},be=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},ye=(e,t,s)=>{if(s.inputLabel){const o=document.createElement("label"),n=r["input-label"];o.setAttribute("for",e.id),o.className=n,"object"==typeof s.customClass&&X(o,s.customClass.inputLabel),o.innerText=s.inputLabel,t.insertAdjacentElement("beforebegin",o)}},ke=e=>{const t=k();if(t)return G(t,r[e]||r.input)},Ce=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:f(t)||d(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},xe={};xe.text=xe.email=xe.password=xe.number=xe.tel=xe.url=xe.search=xe.date=xe["datetime-local"]=xe.time=xe.week=xe.month=(e,t)=>{const s=e;return Ce(s,t.inputValue),ye(s,s,t),be(s,t),s.type=t.input,s},xe.file=(e,t)=>{const s=e;return ye(s,s,t),be(s,t),s},xe.range=(e,t)=>{const s=e,o=s.querySelector("input"),n=s.querySelector("output");return o&&(Ce(o,t.inputValue),o.type=t.input,ye(o,e,t)),n&&Ce(n,t.inputValue),e},xe.select=(e,t)=>{const s=e;if(s.textContent="",t.inputPlaceholder){const e=document.createElement("option");j(e,t.inputPlaceholder),e.value="",e.disabled=!0,e.selected=!0,s.appendChild(e)}return ye(s,s,t),s},xe.radio=e=>(e.textContent="",e),xe.checkbox=(e,t)=>{const s=k();if(!s)throw new Error("Popup not found");const o=V(s,"checkbox");if(!o)throw new Error("Checkbox input not found");o.value="1",o.checked=Boolean(t.inputValue);const n=e.querySelector("span");if(n){const e=t.inputPlaceholder||t.inputLabel;e&&j(n,e)}return o},xe.textarea=(e,t)=>{const s=e;Ce(s,t.inputValue),be(s,t),ye(s,s,t);return setTimeout(()=>{if("MutationObserver"in window){const e=k();if(!e)return;const o=parseInt(window.getComputedStyle(e).width);new MutationObserver(()=>{if(!document.body.contains(s))return;const e=s.offsetWidth+(i=s,parseInt(window.getComputedStyle(i).marginLeft)+parseInt(window.getComputedStyle(i).marginRight)),n=k();var i;n&&(e>o?n.style.width=`${e}px`:U(n,"width",t.width))}).observe(s,{attributes:!0,attributeFilter:["style"]})}}),s};const Ae=(e,t)=>{const s=A();s&&(Y(s),N(s,t,"htmlContainer"),t.html?(ae(t.html,s),W(s,"block")):t.text?(s.textContent=t.text,W(s,"block")):K(s),((e,t)=>{const s=k();if(!s)return;const o=me.innerParams.get(e),n=!o||t.input!==o.input;we.forEach(e=>{const o=G(s,r[e]);o&&(fe(e,t.inputAttributes),o.className=r[e],n&&K(o))}),t.input&&(n&&ge(t),ve(t))})(e,t))},Se=(e,t)=>{for(const[s,o]of Object.entries(a))t.icon!==s&&J(e,o);X(e,t.icon&&a[t.icon]),Le(e,t),Oe(),N(e,t,"icon")},Oe=()=>{const e=k();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color"),s=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<s.length;e++)s[e].style.backgroundColor=t},Ie=(e,t)=>{if(!t.icon&&!t.iconHtml)return;let s=e.innerHTML,o="";t.iconHtml?o=Te(t.iconHtml):"success"===t.icon?(o=(e=>`\n ${e.animation?'<div class="swal2-success-circular-line-left"></div>':""}\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div>\n ${e.animation?'<div class="swal2-success-fix"></div>':""}\n ${e.animation?'<div class="swal2-success-circular-line-right"></div>':""}\n`)(t),s=s.replace(/ style=".*?"/g,"")):"error"===t.icon?o='\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n':t.icon&&(o=Te({question:"?",warning:"!",info:"i"}[t.icon])),s.trim()!==o.trim()&&j(e,o)},Le=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const s of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])Z(e,s,"background-color",t.iconColor);Z(e,".swal2-success-ring","border-color",t.iconColor)}},Te=e=>`<div class="${r["icon-content"]}">${e}</div>`;let Ee=!1,Pe=0,Be=0,_e=0,$e=0;const Fe=e=>{const t=k();if(!t)return;const s=C();if(e.target===t||s&&s.contains(e.target)){Ee=!0;const s=He(e);Pe=s.clientX,Be=s.clientY,_e=parseInt(t.style.insetInlineStart)||0,$e=parseInt(t.style.insetBlockStart)||0,X(t,"swal2-dragging")}},qe=e=>{const t=k();if(t&&Ee){let{clientX:s,clientY:n}=He(e);const i=s-Pe;t.style.insetInlineStart=`${_e+(o.isRTL?-i:i)}px`,t.style.insetBlockStart=`${$e+(n-Be)}px`}},Me=()=>{const e=k();Ee=!1,J(e,"swal2-dragging")},He=e=>{let t=0,s=0;return e.type.startsWith("mouse")?(t=e.clientX,s=e.clientY):e.type.startsWith("touch")&&(t=e.touches[0].clientX,s=e.touches[0].clientY),{clientX:t,clientY:s}},je=(e,t)=>{const s=v(),o=k();if(s&&o){if(t.toast){U(s,"width",t.width),o.style.width="100%";const e=P();e&&o.insertBefore(e,C())}else U(o,"width",t.width);U(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),K(I()),De(o,t),t.draggable&&!t.toast?(X(o,r.draggable),(e=>{e.addEventListener("mousedown",Fe),document.body.addEventListener("mousemove",qe),e.addEventListener("mouseup",Me),e.addEventListener("touchstart",Fe),document.body.addEventListener("touchmove",qe),e.addEventListener("touchend",Me)})(o)):(J(o,r.draggable),(e=>{e.removeEventListener("mousedown",Fe),document.body.removeEventListener("mousemove",qe),e.removeEventListener("mouseup",Me),e.removeEventListener("touchstart",Fe),document.body.removeEventListener("touchmove",qe),e.removeEventListener("touchend",Me)})(o))}},De=(e,t)=>{const s=t.showClass||{};e.className=`${r.popup} ${ee(e)?s.popup:""}`,t.toast?(X([document.documentElement,document.body],r["toast-shown"]),X(e,r.toast)):X(e,r.modal),N(e,t,"popup"),"string"==typeof t.customClass&&X(e,t.customClass),t.icon&&X(e,r[`icon-${t.icon}`])},Ne=e=>{const t=document.createElement("li");return X(t,r["progress-step"]),j(t,e),t},Ve=e=>{const t=document.createElement("li");return X(t,r["progress-step-line"]),e.progressStepsDistance&&U(t,"width",e.progressStepsDistance),t},ze=(e,t)=>{var s;je(0,t),he(0,t),((e,t)=>{const s=O();if(!s)return;const{progressSteps:o,currentProgressStep:n}=t;o&&0!==o.length&&void 0!==n?(W(s),s.textContent="",n>=o.length&&d("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.forEach((e,i)=>{const a=Ne(e);if(s.appendChild(a),i===n&&X(a,r["active-progress-step"]),i!==o.length-1){const e=Ve(t);s.appendChild(e)}})):K(s)})(0,t),((e,t)=>{const s=me.innerParams.get(e),o=C();if(o){if(s&&t.icon===s.icon)return Ie(o,t),void Se(o,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(a).indexOf(t.icon))return u(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void K(o);W(o),Ie(o,t),Se(o,t),X(o,t.showClass&&t.showClass.icon),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",Oe)}else K(o)}})(e,t),((e,t)=>{const s=S();s&&(t.imageUrl?(W(s,""),s.setAttribute("src",t.imageUrl),s.setAttribute("alt",t.imageAlt||""),U(s,"width",t.imageWidth),U(s,"height",t.imageHeight),s.className=r.image,N(s,t,"image")):K(s))})(0,t),((e,t)=>{const s=x();s&&(Y(s),Q(s,Boolean(t.title||t.titleText),"block"),t.title&&ae(t.title,s),t.titleText&&(s.innerText=t.titleText),N(s,t,"title"))})(0,t),((e,t)=>{const s=F();s&&(j(s,t.closeButtonHtml||""),N(s,t,"closeButton"),Q(s,t.showCloseButton),s.setAttribute("aria-label",t.closeButtonAriaLabel||""))})(0,t),Ae(e,t),de(0,t),((e,t)=>{const s=_();s&&(Y(s),Q(s,Boolean(t.footer),"block"),t.footer&&ae(t.footer,s),N(s,t,"footer"))})(0,t);const n=k();"function"==typeof t.didRender&&n&&t.didRender(n),null===(s=o.eventEmitter)||void 0===s||s.emit("didRender",n)},Re=()=>{var e;return null===(e=L())||void 0===e?void 0:e.click()},Xe=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Je=e=>{if(e.keydownTarget&&e.keydownHandlerAdded&&e.keydownHandler){const t=e.keydownHandler;e.keydownTarget.removeEventListener("keydown",t,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1}},Ge=(e,t)=>{var s;const o=q();if(o.length)return-2===(e+=t)&&(e=o.length-1),e===o.length?e=0:-1===e&&(e=o.length-1),void o[e].focus();null===(s=k())||void 0===s||s.focus()},Ue=["ArrowRight","ArrowDown"],We=["ArrowLeft","ArrowUp"],Ke=(e,t,s)=>{e&&(t.isComposing||229===t.keyCode||(e.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Ye(t,e):"Tab"===t.key?Ze(t):[...Ue,...We].includes(t.key)?Qe(t.key):"Escape"===t.key&&et(t,e,s)))},Ye=(e,t)=>{if(!m(t.allowEnterKey))return;const s=k();if(!s||!t.input)return;const o=V(s,t.input);if(e.target&&o&&e.target instanceof HTMLElement&&e.target.outerHTML===o.outerHTML){if(["textarea","file"].includes(t.input))return;Re(),e.preventDefault()}},Ze=e=>{const t=e.target,s=q();let o=-1;for(let e=0;e<s.length;e++)if(t===s[e]){o=e;break}e.shiftKey?Ge(o,-1):Ge(o,1),e.stopPropagation(),e.preventDefault()},Qe=e=>{const t=B(),s=L(),o=E(),n=T();if(!(t&&s&&o&&n))return;const i=[s,o,n];if(document.activeElement instanceof HTMLElement&&!i.includes(document.activeElement))return;const r=Ue.includes(e)?"nextElementSibling":"previousElementSibling";let a=document.activeElement;if(a){for(let e=0;e<t.children.length;e++){if(a=a[r],!a)return;if(a instanceof HTMLButtonElement&&ee(a))break}a instanceof HTMLButtonElement&&a.focus()}},et=(e,t,s)=>{e.preventDefault(),m(t.allowEscapeKey)&&s(Xe.esc)};var tt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const st=()=>{Array.from(document.body.children).forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})},ot="undefined"!=typeof window&&Boolean(window.GestureEvent),nt=()=>{const e=v();if(!e)return;let t;e.ontouchstart=e=>{t=it(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},it=e=>{const t=e.target,s=v(),o=A();return!(!s||!o||rt(e)||at(e)||t!==s&&(te(s)||!(t instanceof HTMLElement)||((e,t)=>{let s=e;for(;s&&s!==t;){if(te(s))return!0;s=s.parentElement}return!1})(t,o)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||te(o)&&o.contains(t)))},rt=e=>Boolean(e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType),at=e=>e.touches&&e.touches.length>1;let lt=null;const ct=e=>{null===lt&&(document.body.scrollHeight>window.innerHeight||"scroll"===e)&&(lt=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${lt+(()=>{const e=document.createElement("div");e.className=r["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function dt(e,t,s,i){H()?vt(e,i):(n(s).then(()=>vt(e,i)),Je(o)),ot?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==lt&&(document.body.style.paddingRight=`${lt}px`,lt=null),(()=>{if(D(document.body,r.iosfix)){const e=parseInt(document.body.style.top,10);J(document.body,r.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),st()),J([document.documentElement,document.body],[r.shown,r["height-auto"],r["no-backdrop"],r["toast-shown"]])}function ut(e){e=wt(e);const t=tt.swalPromiseResolve.get(this),s=pt(this);this.isAwaitingPromise?e.isDismissed||(mt(this),t(e)):s&&t(e)}const pt=e=>{const t=k();if(!t)return!1;const s=me.innerParams.get(e);if(!s||D(t,s.hideClass.popup))return!1;J(t,s.showClass.popup),X(t,s.hideClass.popup);const o=v();return J(o,s.showClass.backdrop),X(o,s.hideClass.backdrop),gt(e,t,s),!0};function ht(e){const t=tt.swalPromiseReject.get(this);mt(this),t&&t(e)}const mt=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,me.innerParams.get(e)||e._destroy())},wt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),gt=(e,t,s)=>{var n;const i=v(),r=se(t);"function"==typeof s.willClose&&s.willClose(t),null===(n=o.eventEmitter)||void 0===n||n.emit("willClose",t),r&&i?ft(e,t,i,Boolean(s.returnFocus),s.didClose):i&&dt(e,i,Boolean(s.returnFocus),s.didClose)},ft=(e,t,s,n,i)=>{o.swalCloseEventFinishedCallback=dt.bind(null,e,s,n,i);const r=function(e){var s;e.target===t&&(null===(s=o.swalCloseEventFinishedCallback)||void 0===s||s.call(o),delete o.swalCloseEventFinishedCallback,t.removeEventListener("animationend",r),t.removeEventListener("transitionend",r))};t.addEventListener("animationend",r),t.addEventListener("transitionend",r)},vt=(e,t)=>{setTimeout(()=>{var s;"function"==typeof t&&t.bind(e.params)(),null===(s=o.eventEmitter)||void 0===s||s.emit("didClose"),e._destroy&&e._destroy()})},bt=e=>{let t=k();if(t||new Zs,t=k(),!t)return;const s=P();H()?K(C()):yt(t,e),W(s),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},yt=(e,t)=>{const s=B(),o=P();s&&o&&(!t&&ee(L())&&(t=L()),W(s),t&&(K(t),o.setAttribute("data-button-to-replace",t.className),s.insertBefore(o,t)),X([e,s],r.loading))},kt=e=>e.checked?1:0,Ct=e=>e.checked?e.value:null,xt=e=>e.files&&e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,At=(e,t)=>{const s=k();if(!s)return;const o=e=>{"select"===t.input?function(e,t,s){const o=G(e,r.select);if(!o)return;const n=(e,t,o)=>{const n=document.createElement("option");n.value=o,j(n,t),n.selected=It(o,s.inputValue),e.appendChild(n)};t.forEach(e=>{const t=e[0],s=e[1];if(Array.isArray(s)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,o.appendChild(e),s.forEach(t=>n(e,t[1],t[0]))}else n(o,s,t)}),o.focus()}(s,Ot(e),t):"radio"===t.input&&function(e,t,s){const o=G(e,r.radio);if(!o)return;t.forEach(e=>{const t=e[0],n=e[1],i=document.createElement("input"),a=document.createElement("label");i.type="radio",i.name=r.radio,i.value=t,It(t,s.inputValue)&&(i.checked=!0);const l=document.createElement("span");j(l,n),l.className=r.label,a.appendChild(i),a.appendChild(l),o.appendChild(a)});const n=o.querySelectorAll("input");n.length&&n[0].focus()}(s,Ot(e),t)};w(t.inputOptions)||f(t.inputOptions)?(bt(L()),g(t.inputOptions).then(t=>{e.hideLoading(),o(t)})):"object"==typeof t.inputOptions?o(t.inputOptions):u("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},St=(e,t)=>{const s=e.getInput();s&&(K(s),g(t.inputValue).then(o=>{s.value="number"===t.input?`${parseFloat(o)||0}`:`${o}`,W(s),s.focus(),e.hideLoading()}).catch(t=>{u(`Error in inputValue promise: ${t}`),s.value="",W(s),s.focus(),e.hideLoading()}))};const Ot=e=>{const t=[];return e instanceof Map?e.forEach((e,s)=>{let o=e;"object"==typeof o&&(o=Ot(o)),t.push([s,o])}):Object.keys(e).forEach(s=>{let o=e[s];"object"==typeof o&&(o=Ot(o)),t.push([s,o])}),t},It=(e,t)=>Boolean(t)&&null!=t&&t.toString()===e.toString(),Lt=(e,t)=>{const s=me.innerParams.get(e);if(!s.input)return void u(`The "input" parameter is needed to be set when using returnInputValueOn${c(t)}`);const o=e.getInput(),n=((e,t)=>{const s=e.getInput();if(!s)return null;switch(t.input){case"checkbox":return kt(s);case"radio":return Ct(s);case"file":return xt(s);default:return t.inputAutoTrim?s.value.trim():s.value}})(e,s);s.inputValidator?Tt(e,n,t):o&&!o.checkValidity()?(e.enableButtons(),e.showValidationMessage(s.validationMessage||o.validationMessage)):"deny"===t?Et(e,n):_t(e,n)},Tt=(e,t,s)=>{const o=me.innerParams.get(e);e.disableInput(),Promise.resolve().then(()=>g(o.inputValidator(t,o.validationMessage))).then(o=>{e.enableButtons(),e.enableInput(),o?e.showValidationMessage(o):"deny"===s?Et(e,t):_t(e,t)})},Et=(e,t)=>{const s=me.innerParams.get(e);s.showLoaderOnDeny&&bt(E()),s.preDeny?(e.isAwaitingPromise=!0,Promise.resolve().then(()=>g(s.preDeny(t,s.validationMessage))).then(s=>{!1===s?(e.hideLoading(),mt(e)):e.close({isDenied:!0,value:void 0===s?t:s})}).catch(t=>Bt(e,t))):e.close({isDenied:!0,value:t})},Pt=(e,t)=>{e.close({isConfirmed:!0,value:t})},Bt=(e,t)=>{e.rejectPromise(t)},_t=(e,t)=>{const s=me.innerParams.get(e);s.showLoaderOnConfirm&&bt(),s.preConfirm?(e.resetValidationMessage(),e.isAwaitingPromise=!0,Promise.resolve().then(()=>g(s.preConfirm(t,s.validationMessage))).then(s=>{ee(I())||!1===s?(e.hideLoading(),mt(e)):Pt(e,void 0===s?t:s)}).catch(t=>Bt(e,t))):Pt(e,t)};function $t(){const e=me.innerParams.get(this);if(!e)return;const t=me.domCache.get(this);K(t.loader),H()?e.icon&&W(C()):Ft(t),J([t.popup,t.actions],r.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const Ft=e=>{const t=e.loader.getAttribute("data-button-to-replace"),s=t?e.popup.getElementsByClassName(t):[];s.length?W(s[0],"inline-block"):!ee(L())&&!ee(E())&&!ee(T())&&K(e.actions)};function qt(){const e=me.innerParams.get(this),t=me.domCache.get(this);return t?V(t.popup,e.input):null}function Mt(e,t,s){const o=me.domCache.get(e);t.forEach(e=>{o[e].disabled=s})}function Ht(e,t){const s=k();if(s&&e)if("radio"===e.type){const e=s.querySelectorAll(`[name="${r.radio}"]`);for(let s=0;s<e.length;s++)e[s].disabled=t}else e.disabled=t}function jt(){Mt(this,["confirmButton","denyButton","cancelButton"],!1)}function Dt(){Mt(this,["confirmButton","denyButton","cancelButton"],!0)}function Nt(){Ht(this.getInput(),!1)}function Vt(){Ht(this.getInput(),!0)}function zt(e){const t=me.domCache.get(this),s=me.innerParams.get(this);j(t.validationMessage,e),t.validationMessage.className=r["validation-message"],s.customClass&&s.customClass.validationMessage&&X(t.validationMessage,s.customClass.validationMessage),W(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid","true"),o.setAttribute("aria-describedby",r["validation-message"]),z(o),X(o,r.inputerror))}function Rt(){const e=me.domCache.get(this);e.validationMessage&&K(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),J(t,r.inputerror))}const Xt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,theme:"light",showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0,topLayer:!1},Jt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","theme","willClose"],Gt={allowEnterKey:void 0},Ut=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Wt=e=>Object.prototype.hasOwnProperty.call(Xt,e),Kt=e=>-1!==Jt.indexOf(e),Yt=e=>Gt[e],Zt=e=>{Wt(e)||d(`Unknown parameter "${e}"`)},Qt=e=>{Ut.includes(e)&&d(`The parameter "${e}" is incompatible with toasts`)},es=e=>{const t=Yt(e);t&&h(e,t)},ts=e=>{!1===e.backdrop&&e.allowOutsideClick&&d('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),e.theme&&!["light","dark","auto","minimal","borderless","bootstrap-4","bootstrap-4-light","bootstrap-4-dark","bootstrap-5","bootstrap-5-light","bootstrap-5-dark","material-ui","material-ui-light","material-ui-dark","embed-iframe","bulma","bulma-light","bulma-dark"].includes(e.theme)&&d(`Invalid theme "${e.theme}"`);for(const t in e)Zt(t),e.toast&&Qt(t),es(t)};function ss(e){const t=v(),s=k(),o=me.innerParams.get(this);if(!s||D(s,o.hideClass.popup))return void d("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const n=os(e),i=Object.assign({},o,n);ts(i),t&&(t.dataset.swal2Theme=i.theme),ze(this,i),me.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const os=e=>{const t={};return Object.keys(e).forEach(s=>{if(Kt(s)){const o=e;t[s]=o[s]}else d(`Invalid parameter to update: ${s}`)}),t};function ns(){var e;const t=me.domCache.get(this),s=me.innerParams.get(this);s?(t.popup&&o.swalCloseEventFinishedCallback&&(o.swalCloseEventFinishedCallback(),delete o.swalCloseEventFinishedCallback),"function"==typeof s.didDestroy&&s.didDestroy(),null===(e=o.eventEmitter)||void 0===e||e.emit("didDestroy"),is(this)):rs(this)}const is=e=>{rs(e),delete e.params,delete o.keydownHandler,delete o.keydownTarget,delete o.currentInstance},rs=e=>{e.isAwaitingPromise?(as(me,e),e.isAwaitingPromise=!0):(as(tt,e),as(me,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},as=(e,t)=>{for(const s in e)e[s].delete(t)};var ls=Object.freeze({__proto__:null,_destroy:ns,close:ut,closeModal:ut,closePopup:ut,closeToast:ut,disableButtons:Dt,disableInput:Vt,disableLoading:$t,enableButtons:jt,enableInput:Nt,getInput:qt,handleAwaitingPromise:mt,hideLoading:$t,rejectPromise:ht,resetValidationMessage:Rt,showValidationMessage:zt,update:ss});const cs=(e,t,s)=>{t.popup.onclick=()=>{e&&(ds(e)||e.timer||e.input)||s(Xe.close)}},ds=e=>Boolean(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton);let us=!1;const ps=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(us=!0)}}},hs=e=>{e.container.onmousedown=t=>{t.target===e.container&&t.preventDefault(),e.popup.onmouseup=function(t){e.popup.onmouseup=()=>{},(t.target===e.popup||t.target instanceof HTMLElement&&e.popup.contains(t.target))&&(us=!0)}}},ms=(e,t,s)=>{t.container.onclick=o=>{us?us=!1:o.target===t.container&&m(e.allowOutsideClick)&&s(Xe.backdrop)}},ws=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const gs=()=>{if(o.timeout)return(()=>{const e=$();if(!e)return;const t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const s=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${s}%`})(),o.timeout.stop()},fs=()=>{if(o.timeout){const e=o.timeout.start();return oe(e),e}};let vs=!1;const bs={};const ys=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in bs){const s=t.getAttribute&&t.getAttribute(e);if(s)return void bs[e].fire({template:s})}};o.eventEmitter=new class{constructor(){this.events={}}_getHandlersByEventName(e){return void 0===this.events[e]&&(this.events[e]=[]),this.events[e]}on(e,t){const s=this._getHandlersByEventName(e);s.includes(t)||s.push(t)}once(e,t){const s=(...o)=>{this.removeListener(e,s),t.apply(this,o)};this.on(e,s)}emit(e,...t){this._getHandlersByEventName(e).forEach(e=>{try{e.apply(this,t)}catch(e){console.error(e)}})}removeListener(e,t){const s=this._getHandlersByEventName(e),o=s.indexOf(t);o>-1&&s.splice(o,1)}removeAllListeners(e){void 0!==this.events[e]&&(this.events[e].length=0)}reset(){this.events={}}};var ks=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||ws(e[0])?["title","html","icon"].forEach((s,o)=>{const n=e[o];"string"==typeof n||ws(n)?t[s]=n:void 0!==n&&u(`Unexpected type of ${s}! Expected "string" or "Element", got ${typeof n}`)}):Object.assign(t,e[0]),t},bindClickHandler:function(e="data-swal-template"){bs[e]=this,vs||(document.body.addEventListener("click",ys),vs=!0)},clickCancel:()=>{var e;return null===(e=T())||void 0===e?void 0:e.click()},clickConfirm:Re,clickDeny:()=>{var e;return null===(e=E())||void 0===e?void 0:e.click()},enableLoading:bt,fire:function(...e){return new this(...e)},getActions:B,getCancelButton:T,getCloseButton:F,getConfirmButton:L,getContainer:v,getDenyButton:E,getFocusableElements:q,getFooter:_,getHtmlContainer:A,getIcon:C,getIconContent:()=>y(r["icon-content"]),getImage:S,getInputLabel:()=>y(r["input-label"]),getLoader:P,getPopup:k,getProgressSteps:O,getTimerLeft:()=>o.timeout&&o.timeout.getTimerLeft(),getTimerProgressBar:$,getTitle:x,getValidationMessage:I,increaseTimer:e=>{if(o.timeout){const t=o.timeout.increase(e);return oe(t,!0),t}},isDeprecatedParameter:Yt,isLoading:()=>{const e=k();return!!e&&e.hasAttribute("data-loading")},isTimerRunning:()=>Boolean(o.timeout&&o.timeout.isRunning()),isUpdatableParameter:Kt,isValidParameter:Wt,isVisible:()=>ee(k()),mixin:function(e){return class extends(this){_main(t,s){return super._main(t,Object.assign({},e,s))}}},off:(e,t)=>{o.eventEmitter&&(e?t?o.eventEmitter.removeListener(e,t):o.eventEmitter.removeAllListeners(e):o.eventEmitter.reset())},on:(e,t)=>{o.eventEmitter&&o.eventEmitter.on(e,t)},once:(e,t)=>{o.eventEmitter&&o.eventEmitter.once(e,t)},resumeTimer:fs,showLoading:bt,stopTimer:gs,toggleTimer:()=>{const e=o.timeout;return e&&(e.running?gs():fs())}});class Cs{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const xs=["swal-title","swal-html","swal-footer"],As=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach(e=>{Bs(e,["name","value"]);const s=e.getAttribute("name"),o=e.getAttribute("value");s&&o&&(t[s]=s in Xt&&"boolean"==typeof Xt[s]?"false"!==o:s in Xt&&"object"==typeof Xt[s]?JSON.parse(o):o)}),t},Ss=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach(e=>{const s=e.getAttribute("name"),o=e.getAttribute("value");s&&o&&(t[s]=new Function(`return ${o}`)())}),t},Os=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach(e=>{Bs(e,["type","color","aria-label"]);const s=e.getAttribute("type");if(s&&["confirm","cancel","deny"].includes(s)){if(t[`${s}ButtonText`]=e.innerHTML,t[`show${c(s)}Button`]=!0,e.hasAttribute("color")){const o=e.getAttribute("color");null!==o&&(t[`${s}ButtonColor`]=o)}if(e.hasAttribute("aria-label")){const o=e.getAttribute("aria-label");null!==o&&(t[`${s}ButtonAriaLabel`]=o)}}}),t},Is=e=>{const t={},s=e.querySelector("swal-image");return s&&(Bs(s,["src","width","height","alt"]),s.hasAttribute("src")&&(t.imageUrl=s.getAttribute("src")||void 0),s.hasAttribute("width")&&(t.imageWidth=s.getAttribute("width")||void 0),s.hasAttribute("height")&&(t.imageHeight=s.getAttribute("height")||void 0),s.hasAttribute("alt")&&(t.imageAlt=s.getAttribute("alt")||void 0)),t},Ls=e=>{const t={},s=e.querySelector("swal-icon");return s&&(Bs(s,["type","color"]),s.hasAttribute("type")&&(t.icon=s.getAttribute("type")),s.hasAttribute("color")&&(t.iconColor=s.getAttribute("color")),t.iconHtml=s.innerHTML),t},Ts=e=>{const t={},s=e.querySelector("swal-input");s&&(Bs(s,["type","label","placeholder","value"]),t.input=s.getAttribute("type")||"text",s.hasAttribute("label")&&(t.inputLabel=s.getAttribute("label")),s.hasAttribute("placeholder")&&(t.inputPlaceholder=s.getAttribute("placeholder")),s.hasAttribute("value")&&(t.inputValue=s.getAttribute("value")));const o=Array.from(e.querySelectorAll("swal-input-option"));return o.length&&(t.inputOptions={},o.forEach(e=>{Bs(e,["value"]);const s=e.getAttribute("value");if(!s)return;const o=e.innerHTML;t.inputOptions[s]=o})),t},Es=(e,t)=>{const s={};for(const o in t){const n=t[o],i=e.querySelector(n);i&&(Bs(i,[]),s[n.replace(/^swal-/,"")]=i.innerHTML.trim())}return s},Ps=e=>{const t=xs.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach(e=>{const s=e.tagName.toLowerCase();t.includes(s)||d(`Unrecognized element <${s}>`)})},Bs=(e,t)=>{Array.from(e.attributes).forEach(s=>{-1===t.indexOf(s.name)&&d([`Unrecognized attribute "${s.name}" on <${e.tagName.toLowerCase()}>.`,t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element."])})},_s=e=>{var t,s;const n=v(),i=k();if(!n||!i)return;"function"==typeof e.willOpen&&e.willOpen(i),null===(t=o.eventEmitter)||void 0===t||t.emit("willOpen",i);const r=window.getComputedStyle(document.body).overflowY;if(Ms(n,i,e),setTimeout(()=>{Fs(n,i)},10),M()&&(qs(n,void 0!==e.scrollbarPadding&&e.scrollbarPadding,r),(()=>{const e=v();Array.from(document.body.children).forEach(t=>{t.contains(e)||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")||""),t.setAttribute("aria-hidden","true"))})})()),H()||o.previousActiveElement||(o.previousActiveElement=document.activeElement),"function"==typeof e.didOpen){const t=e.didOpen;setTimeout(()=>t(i))}null===(s=o.eventEmitter)||void 0===s||s.emit("didOpen",i)},$s=e=>{const t=k();if(!t||e.target!==t)return;const s=v();s&&(t.removeEventListener("animationend",$s),t.removeEventListener("transitionend",$s),s.style.overflowY="auto",J(s,r["no-transition"]))},Fs=(e,t)=>{se(t)?(e.style.overflowY="hidden",t.addEventListener("animationend",$s),t.addEventListener("transitionend",$s)):e.style.overflowY="auto"},qs=(e,t,s)=>{(()=>{if(ot&&!D(document.body,r.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",X(document.body,r.iosfix),nt()}})(),t&&"hidden"!==s&&ct(s),setTimeout(()=>{e.scrollTop=0})},Ms=(e,t,s)=>{var o;null!==(o=s.showClass)&&void 0!==o&&o.backdrop&&X(e,s.showClass.backdrop),s.animation?(t.style.setProperty("opacity","0","important"),W(t,"grid"),setTimeout(()=>{var e;null!==(e=s.showClass)&&void 0!==e&&e.popup&&X(t,s.showClass.popup),t.style.removeProperty("opacity")},10)):W(t,"grid"),X([document.documentElement,document.body],r.shown),s.heightAuto&&s.backdrop&&!s.toast&&X([document.documentElement,document.body],r["height-auto"])};var Hs=(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),js=(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL");function Ds(e){(function(e){e.inputValidator||("email"===e.input&&(e.inputValidator=Hs),"url"===e.input&&(e.inputValidator=js))})(e),e.showLoaderOnConfirm&&!e.preConfirm&&d("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(d('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),re(e)}let Ns;var Vs=new WeakMap;class zs{constructor(...t){if(s(this,Vs,Promise.resolve({isConfirmed:!1,isDenied:!1,isDismissed:!0})),"undefined"==typeof window)return;Ns=this;const o=Object.freeze(this.constructor.argsToParams(t));var n,i,r;this.params=o,this.isAwaitingPromise=!1,n=Vs,i=this,r=this._main(Ns.params),n.set(e(n,i),r)}_main(e,t={}){if(ts(Object.assign({},t,e)),o.currentInstance){const e=tt.swalPromiseResolve.get(o.currentInstance),{isAwaitingPromise:t}=o.currentInstance;o.currentInstance._destroy(),t||e({isDismissed:!0}),M()&&st()}o.currentInstance=Ns;const s=Xs(e,t);Ds(s),Object.freeze(s),o.timeout&&(o.timeout.stop(),delete o.timeout),clearTimeout(o.restoreFocusTimeout);const n=Js(Ns);return ze(Ns,s),me.innerParams.set(Ns,s),Rs(Ns,n,s)}then(e){return t(Vs,this).then(e)}finally(e){return t(Vs,this).finally(e)}}const Rs=(e,t,s)=>new Promise((n,i)=>{const r=t=>{e.close({isDismissed:!0,dismiss:t,isConfirmed:!1,isDenied:!1})};tt.swalPromiseResolve.set(e,n),tt.swalPromiseReject.set(e,i),t.confirmButton.onclick=()=>{(e=>{const t=me.innerParams.get(e);e.disableButtons(),t.input?Lt(e,"confirm"):_t(e,!0)})(e)},t.denyButton.onclick=()=>{(e=>{const t=me.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?Lt(e,"deny"):Et(e,!1)})(e)},t.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Xe.cancel)})(e,r)},t.closeButton.onclick=()=>{r(Xe.close)},((e,t,s)=>{e.toast?cs(e,t,s):(ps(t),hs(t),ms(e,t,s))})(s,t,r),((e,t,s)=>{if(Je(e),!t.toast){const o=e=>Ke(t,e,s);e.keydownHandler=o;const n=t.keydownListenerCapture?window:k();if(n){e.keydownTarget=n,e.keydownListenerCapture=t.keydownListenerCapture;const s=o;e.keydownTarget.addEventListener("keydown",s,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0}}})(o,s,r),((e,t)=>{"select"===t.input||"radio"===t.input?At(e,t):["text","email","number","tel","textarea"].some(e=>e===t.input)&&(w(t.inputValue)||f(t.inputValue))&&(bt(L()),St(e,t))})(e,s),_s(s),Gs(o,s,r),Us(t,s),setTimeout(()=>{t.container.scrollTop=0})}),Xs=(e,t)=>{const s=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const s=t.content;return Ps(s),Object.assign(As(s),Ss(s),Os(s),Is(s),Ls(s),Ts(s),Es(s,xs))})(e),o=Object.assign({},Xt,t,s,e);return o.showClass=Object.assign({},Xt.showClass,o.showClass),o.hideClass=Object.assign({},Xt.hideClass,o.hideClass),!1===o.animation&&(o.showClass={backdrop:"swal2-noanimation"},o.hideClass={}),o},Js=e=>{const t={popup:k(),container:v(),actions:B(),confirmButton:L(),denyButton:E(),cancelButton:T(),loader:P(),closeButton:F(),validationMessage:I(),progressSteps:O()};return me.domCache.set(e,t),t},Gs=(e,t,s)=>{const o=$();K(o),t.timer&&(e.timeout=new Cs(()=>{s("timer"),delete e.timeout},t.timer),t.timerProgressBar&&o&&(W(o),N(o,t,"timerProgressBar"),setTimeout(()=>{e.timeout&&e.timeout.running&&oe(t.timer)})))},Us=(e,t)=>{if(!t.toast)return m(t.allowEnterKey)?void(Ws(e)||Ks(e,t)||Ge(-1,1)):(h("allowEnterKey"),void Ys())},Ws=e=>{const t=Array.from(e.popup.querySelectorAll("[autofocus]"));for(const e of t)if(e instanceof HTMLElement&&ee(e))return e.focus(),!0;return!1},Ks=(e,t)=>t.focusDeny&&ee(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&ee(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!ee(e.confirmButton)||(e.confirmButton.focus(),0)),Ys=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};zs.prototype.disableButtons=Dt,zs.prototype.enableButtons=jt,zs.prototype.getInput=qt,zs.prototype.disableInput=Vt,zs.prototype.enableInput=Nt,zs.prototype.hideLoading=$t,zs.prototype.disableLoading=$t,zs.prototype.showValidationMessage=zt,zs.prototype.resetValidationMessage=Rt,zs.prototype.close=ut,zs.prototype.closePopup=ut,zs.prototype.closeModal=ut,zs.prototype.closeToast=ut,zs.prototype.rejectPromise=ht,zs.prototype.update=ss,zs.prototype._destroy=ns,Object.assign(zs,ks),Object.keys(ls).forEach(e=>{zs[e]=function(...t){if(Ns&&Ns[e])return Ns[e](...t)}}),zs.DismissReason=Xe,zs.version="11.26.17";const Zs=zs;return Zs.default=Zs,Zs}(),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2),"undefined"!=typeof document&&function(e,t){var s=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(s),s.styleSheet)s.styleSheet.disabled||(s.styleSheet.cssText=t);else try{s.innerHTML=t}catch(e){s.innerText=t}}(document,':root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-icon-animations: true;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem;container-name:swal2-popup}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:all}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}@container swal2-popup style(--swal2-icon-animations:true){.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}')},7736(e){var t;t=function(e){var t=function(e){return new t.lib.init(e)};function s(e,t){return t.offset[e]?isNaN(t.offset[e])?t.offset[e]:t.offset[e]+"px":"0px"}function o(e,t){return!(!e||"string"!=typeof t||!(e.className&&e.className.trim().split(/\s+/gi).indexOf(t)>-1))}return t.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},t.lib=t.prototype={toastify:"1.12.0",constructor:t,init:function(e){return e||(e={}),this.options={},this.toastElement=null,this.options.text=e.text||t.defaults.text,this.options.node=e.node||t.defaults.node,this.options.duration=0===e.duration?0:e.duration||t.defaults.duration,this.options.selector=e.selector||t.defaults.selector,this.options.callback=e.callback||t.defaults.callback,this.options.destination=e.destination||t.defaults.destination,this.options.newWindow=e.newWindow||t.defaults.newWindow,this.options.close=e.close||t.defaults.close,this.options.gravity="bottom"===e.gravity?"toastify-bottom":t.defaults.gravity,this.options.positionLeft=e.positionLeft||t.defaults.positionLeft,this.options.position=e.position||t.defaults.position,this.options.backgroundColor=e.backgroundColor||t.defaults.backgroundColor,this.options.avatar=e.avatar||t.defaults.avatar,this.options.className=e.className||t.defaults.className,this.options.stopOnFocus=void 0===e.stopOnFocus?t.defaults.stopOnFocus:e.stopOnFocus,this.options.onClick=e.onClick||t.defaults.onClick,this.options.offset=e.offset||t.defaults.offset,this.options.escapeMarkup=void 0!==e.escapeMarkup?e.escapeMarkup:t.defaults.escapeMarkup,this.options.ariaLive=e.ariaLive||t.defaults.ariaLive,this.options.style=e.style||t.defaults.style,e.backgroundColor&&(this.options.style.background=e.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var e=document.createElement("div");for(var t in e.className="toastify on "+this.options.className,this.options.position?e.className+=" toastify-"+this.options.position:!0===this.options.positionLeft?(e.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):e.className+=" toastify-right",e.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.'),this.options.style)e.style[t]=this.options.style[t];if(this.options.ariaLive&&e.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(this.options.escapeMarkup?e.innerText=this.options.text:e.innerHTML=this.options.text,""!==this.options.avatar){var o=document.createElement("img");o.src=this.options.avatar,o.className="toastify-avatar","left"==this.options.position||!0===this.options.positionLeft?e.appendChild(o):e.insertAdjacentElement("afterbegin",o)}if(!0===this.options.close){var n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="&#10006;",n.addEventListener("click",function(e){e.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}.bind(this));var i=window.innerWidth>0?window.innerWidth:screen.width;("left"==this.options.position||!0===this.options.positionLeft)&&i>360?e.insertAdjacentElement("afterbegin",n):e.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0){var r=this;e.addEventListener("mouseover",function(t){window.clearTimeout(e.timeOutValue)}),e.addEventListener("mouseleave",function(){e.timeOutValue=window.setTimeout(function(){r.removeElement(e)},r.options.duration)})}if(void 0!==this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}.bind(this)),"function"==typeof this.options.onClick&&void 0===this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),this.options.onClick()}.bind(this)),"object"==typeof this.options.offset){var a=s("x",this.options),l=s("y",this.options),c="left"==this.options.position?a:"-"+a,d="toastify-top"==this.options.gravity?l:"-"+l;e.style.transform="translate("+c+","+d+")"}return e},showToast:function(){var e;if(this.toastElement=this.buildToast(),!(e="string"==typeof this.options.selector?document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||"undefined"!=typeof ShadowRoot&&this.options.selector instanceof ShadowRoot?this.options.selector:document.body))throw"Root element is not defined";var s=t.defaults.oldestFirst?e.firstChild:e.lastChild;return e.insertBefore(this.toastElement,s),t.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(e){e.className=e.className.replace(" on",""),window.setTimeout(function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),t.reposition()}.bind(this),400)}},t.reposition=function(){for(var e,t={top:15,bottom:15},s={top:15,bottom:15},n={top:15,bottom:15},i=document.getElementsByClassName("toastify"),r=0;r<i.length;r++){e=!0===o(i[r],"toastify-top")?"toastify-top":"toastify-bottom";var a=i[r].offsetHeight;e=e.substr(9,e.length-1),(window.innerWidth>0?window.innerWidth:screen.width)<=360?(i[r].style[e]=n[e]+"px",n[e]+=a+15):!0===o(i[r],"toastify-left")?(i[r].style[e]=t[e]+"px",t[e]+=a+15):(i[r].style[e]=s[e]+"px",s[e]+=a+15)}return this},t.lib.init.prototype=t.lib,t},e.exports?e.exports=t():this.Toastify=t()}},t={};function s(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={id:o,exports:{}};return e[o].call(i.exports,i,i.exports,s),i.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var o in t)s.o(t,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.nc=void 0,(()=>{"use strict";const e="lp-hidden",t="loading",o=(e,t={},s={})=>{"function"==typeof s.before&&s.before(),fetch(e,{method:"GET",...t}).then(e=>e.json()).then(e=>{"function"==typeof s.success&&s.success(e)}).catch(e=>{"function"==typeof s.error&&s.error(e)}).finally(()=>{"function"==typeof s.completed&&s.completed()})},n=(t,s=0)=>{t&&(s?t.classList.remove(e):t.classList.add(e))},i=(e,s)=>{e&&(s?e.classList.add(t):e.classList.remove(t))},r=e=>{const t={},s=new FormData(e);for(const e of s.entries()){const o=e[0],n=s.getAll(o);t.hasOwnProperty(o)||(t[o]=n.join(","))}return t},a=(e,t)=>{const s=r(e);return(e=>{const t=[],s=e.elements;for(let e=0;e<s.length;e++){const o=s[e].name;o&&!t.includes(o)&&t.push(o)}return t})(e).forEach(e=>{s.hasOwnProperty(e)?""===s[e][0]&&(delete s[e],delete t[e]):delete t[e]}),t={...t,...s}},l=(e,t)=>{document.addEventListener(e,s=>{const o=s.target;let n={e:s,target:o};t.forEach(t=>{n={...n,...t},t.conditionBeforeCallBack&&!0!==t.conditionBeforeCallBack(n)||"keydown"===e&&t.checkIsEventEnter&&"Enter"!==s.key||o.closest(t.selector)&&(t.class?t.class[t.callBack](n):t.callBack(n))})})},c=(e,t=500)=>{let s;return o=>{clearTimeout(s),s=setTimeout(()=>e(o),t)}};function d(e,t){e.split(/\s+/).forEach(e=>{t(e)})}window.lpToggleEnableInit=0,window.lpFullScreenViewInit=0;class u{constructor(){this._events={}}on(e,t){d(e,e=>{const s=this._events[e]||[];s.push(t),this._events[e]=s})}off(e,t){var s=arguments.length;0!==s?d(e,e=>{if(1===s)return void delete this._events[e];const o=this._events[e];void 0!==o&&(o.splice(o.indexOf(t),1),this._events[e]=o)}):this._events={}}trigger(e,...t){var s=this;d(e,e=>{const o=s._events[e];void 0!==o&&o.forEach(e=>{e.apply(s,t)})})}}const p=e=>(e=e.filter(Boolean)).length<2?e[0]||"":1==f(e)?"["+e.join("")+"]":"(?:"+e.join("|")+")",h=e=>{if(!w(e))return e.join("");let t="",s=0;const o=()=>{s>1&&(t+="{"+s+"}")};return e.forEach((n,i)=>{n!==e[i-1]?(o(),t+=n,s=1):s++}),o(),t},m=e=>{let t=Array.from(e);return p(t)},w=e=>new Set(e).size!==e.length,g=e=>(e+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),f=e=>e.reduce((e,t)=>Math.max(e,v(t)),0),v=e=>Array.from(e).length,b=e=>{if(1===e.length)return[[e]];let t=[];const s=e.substring(1);return b(s).forEach(function(s){let o=s.slice(0);o[0]=e.charAt(0)+o[0],t.push(o),o=s.slice(0),o.unshift(e.charAt(0)),t.push(o)}),t},y=[[0,65535]];let k,C;const x={},A={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let e in A){let t=A[e]||"";for(let s=0;s<t.length;s++){let o=t.substring(s,s+1);x[o]=e}}const S=new RegExp(Object.keys(x).join("|")+"|[̀-ͯ·ʾʼ]","gu"),O=(e,t="NFKD")=>e.normalize(t),I=e=>Array.from(e).reduce((e,t)=>e+L(t),""),L=e=>(e=O(e).toLowerCase().replace(S,e=>x[e]||""),O(e,"NFC")),T=e=>{const t=(e=>{const t={},s=(e,s)=>{const o=t[e]||new Set,n=new RegExp("^"+m(o)+"$","iu");s.match(n)||(o.add(g(s)),t[e]=o)};for(let t of function*(e){for(const[t,s]of e)for(let e=t;e<=s;e++){let t=String.fromCharCode(e),s=I(t);s!=t.toLowerCase()&&(s.length>3||0!=s.length&&(yield{folded:s,composed:t,code_point:e}))}}(e))s(t.folded,t.folded),s(t.folded,t.composed);return t})(e),s={};let o=[];for(let e in t){let n=t[e];n&&(s[e]=m(n)),e.length>1&&o.push(g(e))}o.sort((e,t)=>t.length-e.length);const n=p(o);return C=new RegExp("^"+n,"u"),s},E=(e,t=1)=>(t=Math.max(t,e.length-1),p(b(e).map(e=>((e,t=1)=>{let s=0;return e=e.map(e=>(k[e]&&(s+=e.length),k[e]||e)),s>=t?h(e):""})(e,t)))),P=(e,t=!0)=>{let s=e.length>1?1:0;return p(e.map(e=>{let o=[];const n=t?e.length():e.length()-1;for(let t=0;t<n;t++)o.push(E(e.substrs[t]||"",s));return h(o)}))},B=(e,t)=>{for(const s of t){if(s.start!=e.start||s.end!=e.end)continue;if(s.substrs.join("")!==e.substrs.join(""))continue;let t=e.parts;const o=e=>{for(const s of t){if(s.start===e.start&&s.substr===e.substr)return!1;if(1!=e.length&&1!=s.length){if(e.start<s.start&&e.end>s.start)return!0;if(s.start<e.start&&s.end>e.start)return!0}}return!1};if(!(s.parts.filter(o).length>0))return!0}return!1};class _{parts;substrs;start;end;constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(e){e&&(this.parts.push(e),this.substrs.push(e.substr),this.start=Math.min(e.start,this.start),this.end=Math.max(e.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(e,t){let s=new _,o=JSON.parse(JSON.stringify(this.parts)),n=o.pop();for(const e of o)s.add(e);let i=t.substr.substring(0,e-n.start),r=i.length;return s.add({start:n.start,end:n.start+r,length:r,substr:i}),s}}const $=(e,t)=>{if(e)return e[t]},F=(e,t)=>{if(e){for(var s,o=t.split(".");(s=o.shift())&&(e=e[s]););return e}},q=(e,t,s)=>{var o,n;return e?(e+="",null==t.regex||-1===(n=e.search(t.regex))?0:(o=t.string.length/e.length,0===n&&(o+=.5),o*s)):0},M=(e,t)=>{var s=e[t];if("function"==typeof s)return s;s&&!Array.isArray(s)&&(e[t]=[s])},H=(e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var s in e)e.hasOwnProperty(s)&&t(e[s],s)},j=(e,t)=>"number"==typeof e&&"number"==typeof t?e>t?1:e<t?-1:0:(e=I(e+"").toLowerCase())>(t=I(t+"").toLowerCase())?1:t>e?-1:0;class D{items;settings;constructor(e,t){this.items=e,this.settings=t||{diacritics:!0}}tokenize(e,t,s){if(!e||!e.length)return[];const o=[],n=e.split(/\s+/);var i;return s&&(i=new RegExp("^("+Object.keys(s).map(g).join("|")+"):(.*)$")),n.forEach(e=>{let s,n=null,r=null;i&&(s=e.match(i))&&(n=s[1],e=s[2]),e.length>0&&(r=this.settings.diacritics?(e=>{void 0===k&&(k=T(y)),e=I(e);let t="",s=[new _];for(let o=0;o<e.length;o++){let n=e.substring(o).match(C);const i=e.substring(o,o+1),r=n?n[0]:null;let a=[],l=new Set;for(const e of s){const t=e.last();if(!t||1==t.length||t.end<=o)if(r){const t=r.length;e.add({start:o,end:o+t,length:t,substr:r}),l.add("1")}else e.add({start:o,end:o+1,length:1,substr:i}),l.add("2");else if(r){let s=e.clone(o,t);const n=r.length;s.add({start:o,end:o+n,length:n,substr:r}),a.push(s)}else l.add("3")}if(a.length>0){a=a.sort((e,t)=>e.length()-t.length());for(let e of a)B(e,s)||s.push(e)}else if(o>0&&1==l.size&&!l.has("3")){t+=P(s,!1);let e=new _;const o=s[0];o&&e.add(o.last()),s=[e]}}return t+=P(s,!0),t})(e)||null:g(e),r&&t&&(r="\\b"+r)),o.push({string:e,regex:r?new RegExp(r,"iu"):null,field:n})}),o}getScoreFunction(e,t){var s=this.prepareSearch(e,t);return this._getScoreFunction(s)}_getScoreFunction(e){const t=e.tokens,s=t.length;if(!s)return function(){return 0};const o=e.options.fields,n=e.weights,i=o.length,r=e.getAttrFn;if(!i)return function(){return 1};const a=1===i?function(e,t){const s=o[0].field;return q(r(t,s),e,n[s]||1)}:function(e,t){var s=0;if(e.field){const o=r(t,e.field);!e.regex&&o?s+=1/i:s+=q(o,e,1)}else H(n,(o,n)=>{s+=q(r(t,n),e,o)});return s/i};return 1===s?function(e){return a(t[0],e)}:"and"===e.options.conjunction?function(e){var o,n=0;for(let s of t){if((o=a(s,e))<=0)return 0;n+=o}return n/s}:function(e){var o=0;return H(t,t=>{o+=a(t,e)}),o/s}}getSortFunction(e,t){var s=this.prepareSearch(e,t);return this._getSortFunction(s)}_getSortFunction(e){var t,s=[];const o=this,n=e.options,i=!e.query&&n.sort_empty?n.sort_empty:n.sort;if("function"==typeof i)return i.bind(this);const r=function(t,s){return"$score"===t?s.score:e.getAttrFn(o.items[s.id],t)};if(i)for(let t of i)(e.query||"$score"!==t.field)&&s.push(t);if(e.query){t=!0;for(let e of s)if("$score"===e.field){t=!1;break}t&&s.unshift({field:"$score",direction:"desc"})}else s=s.filter(e=>"$score"!==e.field);return s.length?function(e,t){var o,n;for(let i of s)if(n=i.field,o=("desc"===i.direction?-1:1)*j(r(n,e),r(n,t)))return o;return 0}:null}prepareSearch(e,t){const s={};var o=Object.assign({},t);if(M(o,"sort"),M(o,"sort_empty"),o.fields){M(o,"fields");const e=[];o.fields.forEach(t=>{"string"==typeof t&&(t={field:t,weight:1}),e.push(t),s[t.field]="weight"in t?t.weight:1}),o.fields=e}return{options:o,query:e.toLowerCase().trim(),tokens:this.tokenize(e,o.respect_word_boundaries,s),total:0,items:[],weights:s,getAttrFn:o.nesting?F:$}}search(e,t){var s,o,n=this;o=this.prepareSearch(e,t),t=o.options,e=o.query;const i=t.score||n._getScoreFunction(o);e.length?H(n.items,(e,n)=>{s=i(e),(!1===t.filter||s>0)&&o.items.push({score:s,id:n})}):H(n.items,(e,t)=>{o.items.push({score:1,id:t})});const r=n._getSortFunction(o);return r&&o.items.sort(r),o.total=o.items.length,"number"==typeof t.limit&&(o.items=o.items.slice(0,t.limit)),o}}const N=e=>null==e?null:V(e),V=e=>"boolean"==typeof e?e?"1":"0":e+"",z=e=>(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),R=(e,t)=>{var s;return function(o,n){var i=this;s&&(i.loading=Math.max(i.loading-1,0),clearTimeout(s)),s=setTimeout(function(){s=null,i.loadedSearches[o]=!0,e.call(i,o,n)},t)}},X=(e,t,s)=>{var o,n=e.trigger,i={};for(o of(e.trigger=function(){var s=arguments[0];if(-1===t.indexOf(s))return n.apply(e,arguments);i[s]=arguments},s.apply(e,[]),e.trigger=n,t))o in i&&n.apply(e,i[o])},J=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},G=(e,t,s,o)=>{e.addEventListener(t,s,o)},U=(e,t)=>!!t&&!!t[e]&&1==(t.altKey?1:0)+(t.ctrlKey?1:0)+(t.shiftKey?1:0)+(t.metaKey?1:0),W=(e,t)=>e.getAttribute("id")||(e.setAttribute("id",t),t),K=e=>e.replace(/[\\"']/g,"\\$&"),Y=(e,t)=>{t&&e.append(t)},Z=(e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var s in e)e.hasOwnProperty(s)&&t(e[s],s)},Q=e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(ee(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)},ee=e=>"string"==typeof e&&e.indexOf("<")>-1,te=(e,t)=>{var s=document.createEvent("HTMLEvents");s.initEvent(t,!0,!1),e.dispatchEvent(s)},se=(e,t)=>{Object.assign(e.style,t)},oe=(e,...t)=>{var s=ie(t);(e=re(e)).map(e=>{s.map(t=>{e.classList.add(t)})})},ne=(e,...t)=>{var s=ie(t);(e=re(e)).map(e=>{s.map(t=>{e.classList.remove(t)})})},ie=e=>{var t=[];return Z(e,e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(t=t.concat(e))}),t.filter(Boolean)},re=e=>(Array.isArray(e)||(e=[e]),e),ae=(e,t,s)=>{if(!s||s.contains(e))for(;e&&e.matches;){if(e.matches(t))return e;e=e.parentNode}},le=(e,t=0)=>t>0?e[e.length-1]:e[0],ce=(e,t)=>{if(!e)return-1;t=t||e.nodeName;for(var s=0;e=e.previousElementSibling;)e.matches(t)&&s++;return s},de=(e,t)=>{Z(t,(t,s)=>{null==t?e.removeAttribute(s):e.setAttribute(s,""+t)})},ue=(e,t)=>{e.parentNode&&e.parentNode.replaceChild(t,e)},pe="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey",he={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'<input type="text" autocomplete="off" size="1" />',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(e){return e.length>0},render:{}};function me(e,t){var s=Object.assign({},he,t),o=s.dataAttr,n=s.labelField,i=s.valueField,r=s.disabledField,a=s.optgroupField,l=s.optgroupLabelField,c=s.optgroupValueField,d=e.tagName.toLowerCase(),u=e.getAttribute("placeholder")||e.getAttribute("data-placeholder");if(!u&&!s.allowEmptyOption){let t=e.querySelector('option[value=""]');t&&(u=t.textContent)}var p={placeholder:u,options:[],optgroups:[],items:[],maxItems:null};return"select"===d?(()=>{var t,d=p.options,u={},h=1;let m=0;var w=e=>{var t=Object.assign({},e.dataset),s=o&&t[o];return"string"==typeof s&&s.length&&(t=Object.assign(t,JSON.parse(s))),t},g=(e,t)=>{var o=N(e.value);if(null!=o&&(o||s.allowEmptyOption)){if(u.hasOwnProperty(o)){if(t){var l=u[o][a];l?Array.isArray(l)?l.push(t):u[o][a]=[l,t]:u[o][a]=t}}else{var c=w(e);c[n]=c[n]||e.textContent,c[i]=c[i]||o,c[r]=c[r]||e.disabled,c[a]=c[a]||t,c.$option=e,c.$order=c.$order||++m,u[o]=c,d.push(c)}e.selected&&p.items.push(o)}};p.maxItems=e.hasAttribute("multiple")?null:1,Z(e.children,e=>{var s,o,n;"optgroup"===(t=e.tagName.toLowerCase())?((n=w(s=e))[l]=n[l]||s.getAttribute("label")||"",n[c]=n[c]||h++,n[r]=n[r]||s.disabled,n.$order=n.$order||++m,p.optgroups.push(n),o=n[c],Z(s.children,e=>{g(e,o)})):"option"===t&&g(e)})})():(()=>{const t=e.getAttribute(o);if(t)p.options=JSON.parse(t),Z(p.options,e=>{p.items.push(e[i])});else{var r=e.value.trim()||"";if(!s.allowEmptyOption&&!r.length)return;const t=r.split(s.delimiter);Z(t,e=>{const t={};t[n]=e,t[i]=e,p.options.push(t)}),p.items=t}})(),Object.assign({},he,p,t)}var we=0;class ge extends(function(e){return e.plugins={},class extends e{constructor(){super(...arguments),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(t,s){e.plugins[t]={name:t,fn:s}}initializePlugins(e){var t,s;const o=this,n=[];if(Array.isArray(e))e.forEach(e=>{"string"==typeof e?n.push(e):(o.plugins.settings[e.name]=e.options,n.push(e.name))});else if(e)for(t in e)e.hasOwnProperty(t)&&(o.plugins.settings[t]=e[t],n.push(t));for(;s=n.shift();)o.require(s)}loadPlugin(t){var s=this,o=s.plugins,n=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');o.requested[t]=!0,o.loaded[t]=n.fn.apply(s,[s.plugins.settings[t]||{}]),o.names.push(t)}require(e){var t=this,s=t.plugins;if(!t.plugins.loaded.hasOwnProperty(e)){if(s.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")');t.loadPlugin(e)}return s.loaded[e]}}}(u)){constructor(e,t){var s;super(),this.order=0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,we++;var o=Q(e);if(o.tomselect)throw new Error("Tom Select already initialized on this element");o.tomselect=this,s=(window.getComputedStyle&&window.getComputedStyle(o,null)).getPropertyValue("direction");const n=me(o,t);this.settings=n,this.input=o,this.tabIndex=o.tabIndex||0,this.is_select_tag="select"===o.tagName.toLowerCase(),this.rtl=/rtl/i.test(s),this.inputId=W(o,"tomselect-"+we),this.isRequired=o.required,this.sifter=new D(this.options,{diacritics:n.diacritics}),n.mode=n.mode||(1===n.maxItems?"single":"multi"),"boolean"!=typeof n.hideSelected&&(n.hideSelected="multi"===n.mode),"boolean"!=typeof n.hidePlaceholder&&(n.hidePlaceholder="multi"!==n.mode);var i=n.createFilter;"function"!=typeof i&&("string"==typeof i&&(i=new RegExp(i)),i instanceof RegExp?n.createFilter=e=>i.test(e):n.createFilter=e=>this.settings.duplicates||!this.options[e]),this.initializePlugins(n.plugins),this.setupCallbacks(),this.setupTemplates();const r=Q("<div>"),a=Q("<div>"),l=this._render("dropdown"),c=Q('<div role="listbox" tabindex="-1">'),d=this.input.getAttribute("class")||"",u=n.mode;var p;oe(r,n.wrapperClass,d,u),oe(a,n.controlClass),Y(r,a),oe(l,n.dropdownClass,u),n.copyClassesToDropdown&&oe(l,d),oe(c,n.dropdownContentClass),Y(l,c),Q(n.dropdownParent||r).appendChild(l),ee(n.controlInput)?(p=Q(n.controlInput),Z(["autocorrect","autocapitalize","autocomplete","spellcheck"],e=>{o.getAttribute(e)&&de(p,{[e]:o.getAttribute(e)})}),p.tabIndex=-1,a.appendChild(p),this.focus_node=p):n.controlInput?(p=Q(n.controlInput),this.focus_node=p):(p=Q("<input/>"),this.focus_node=a),this.wrapper=r,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=p,this.setup()}setup(){const e=this,t=e.settings,s=e.control_input,o=e.dropdown,n=e.dropdown_content,i=e.wrapper,r=e.control,a=e.input,l=e.focus_node,c={passive:!0},d=e.inputId+"-ts-dropdown";de(n,{id:d}),de(l,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":d});const u=W(l,e.inputId+"-ts-control"),p="label[for='"+(e=>e.replace(/['"\\]/g,"\\$&"))(e.inputId)+"']",h=document.querySelector(p),m=e.focus.bind(e);if(h){G(h,"click",m),de(h,{for:u});const t=W(h,e.inputId+"-ts-label");de(l,{"aria-labelledby":t}),de(n,{"aria-labelledby":t})}if(i.style.width=a.style.width,e.plugins.names.length){const t="plugin-"+e.plugins.names.join(" plugin-");oe([i,o],t)}(null===t.maxItems||t.maxItems>1)&&e.is_select_tag&&de(a,{multiple:"multiple"}),t.placeholder&&de(s,{placeholder:t.placeholder}),!t.splitOn&&t.delimiter&&(t.splitOn=new RegExp("\\s*"+g(t.delimiter)+"+\\s*")),t.load&&t.loadThrottle&&(t.load=R(t.load,t.loadThrottle)),G(o,"mousemove",()=>{e.ignoreHover=!1}),G(o,"mouseenter",t=>{var s=ae(t.target,"[data-selectable]",o);s&&e.onOptionHover(t,s)},{capture:!0}),G(o,"click",t=>{const s=ae(t.target,"[data-selectable]");s&&(e.onOptionSelect(t,s),J(t,!0))}),G(r,"click",t=>{var o=ae(t.target,"[data-ts-item]",r);o&&e.onItemSelect(t,o)?J(t,!0):""==s.value&&(e.onClick(),J(t,!0))}),G(l,"keydown",t=>e.onKeyDown(t)),G(s,"keypress",t=>e.onKeyPress(t)),G(s,"input",t=>e.onInput(t)),G(l,"blur",t=>e.onBlur(t)),G(l,"focus",t=>e.onFocus(t)),G(s,"paste",t=>e.onPaste(t));const w=t=>{const n=t.composedPath()[0];if(!i.contains(n)&&!o.contains(n))return e.isFocused&&e.blur(),void e.inputState();n==s&&e.isOpen?t.stopPropagation():J(t,!0)},f=()=>{e.isOpen&&e.positionDropdown()};G(document,"mousedown",w),G(window,"scroll",f,c),G(window,"resize",f,c),this._destroy=()=>{document.removeEventListener("mousedown",w),window.removeEventListener("scroll",f),window.removeEventListener("resize",f),h&&h.removeEventListener("click",m)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",e.wrapper),e.sync(!1),t.items=[],delete t.optgroups,delete t.options,G(a,"invalid",()=>{e.isValid&&(e.isValid=!1,e.isInvalid=!0,e.refreshState())}),e.updateOriginalInput(),e.refreshItems(),e.close(!1),e.inputState(),e.isSetup=!0,a.disabled?e.disable():a.readOnly?e.setReadOnly(!0):e.enable(),e.on("change",this.onChange),oe(a,"tomselected","ts-hidden-accessible"),e.trigger("initialize"),!0===t.preload&&e.preload()}setupOptions(e=[],t=[]){this.addOptions(e),Z(t,e=>{this.registerOptionGroup(e)})}setupTemplates(){var e=this,t=e.settings.labelField,s=e.settings.optgroupLabelField,o={optgroup:e=>{let t=document.createElement("div");return t.className="optgroup",t.appendChild(e.options),t},optgroup_header:(e,t)=>'<div class="optgroup-header">'+t(e[s])+"</div>",option:(e,s)=>"<div>"+s(e[t])+"</div>",item:(e,s)=>"<div>"+s(e[t])+"</div>",option_create:(e,t)=>'<div class="create">Add <strong>'+t(e.input)+"</strong>&hellip;</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"};e.settings.render=Object.assign({},o,e.settings.render)}setupCallbacks(){var e,t,s={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(e in s)(t=this.settings[s[e]])&&this.on(e,t)}sync(e=!0){const t=this,s=e?me(t.input,{delimiter:t.settings.delimiter}):t.settings;t.setupOptions(s.options,s.optgroups),t.setValue(s.items||[],!0),t.lastQuery=null}onClick(){var e=this;if(e.activeItems.length>0)return e.clearActiveItems(),void e.focus();e.isFocused&&e.isOpen?e.blur():e.focus()}onMouseDown(){}onChange(){te(this.input,"input"),te(this.input,"change")}onPaste(e){var t=this;t.isInputHidden||t.isLocked?J(e):t.settings.splitOn&&setTimeout(()=>{var e=t.inputValue();if(e.match(t.settings.splitOn)){var s=e.trim().split(t.settings.splitOn);Z(s,e=>{N(e)&&(this.options[e]?t.addItem(e):t.createItem(e))})}},0)}onKeyPress(e){var t=this;if(!t.isLocked){var s=String.fromCharCode(e.keyCode||e.which);return t.settings.create&&"multi"===t.settings.mode&&s===t.settings.delimiter?(t.createItem(),void J(e)):void 0}J(e)}onKeyDown(e){var t=this;if(t.ignoreHover=!0,t.isLocked)9!==e.keyCode&&J(e);else{switch(e.keyCode){case 65:if(U(pe,e)&&""==t.control_input.value)return J(e),void t.selectAll();break;case 27:return t.isOpen&&(J(e,!0),t.close()),void t.clearActiveItems();case 40:if(!t.isOpen&&t.hasOptions)t.open();else if(t.activeOption){let e=t.getAdjacent(t.activeOption,1);e&&t.setActiveOption(e)}return void J(e);case 38:if(t.activeOption){let e=t.getAdjacent(t.activeOption,-1);e&&t.setActiveOption(e)}return void J(e);case 13:return void(t.canSelect(t.activeOption)?(t.onOptionSelect(e,t.activeOption),J(e)):(t.settings.create&&t.createItem()||document.activeElement==t.control_input&&t.isOpen)&&J(e));case 37:return void t.advanceSelection(-1,e);case 39:return void t.advanceSelection(1,e);case 9:return void(t.settings.selectOnTab&&(t.canSelect(t.activeOption)&&(t.onOptionSelect(e,t.activeOption),J(e)),t.settings.create&&t.createItem()&&J(e)));case 8:case 46:return void t.deleteSelection(e)}t.isInputHidden&&!U(pe,e)&&J(e)}}onInput(e){if(this.isLocked)return;const t=this.inputValue();var s,o;this.lastValue!==t&&(this.lastValue=t,""!=t?(this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=(s=()=>{this.refreshTimeout=null,this._onInput()},(o=this.settings.refreshThrottle)>0?window.setTimeout(s,o):(s.call(null),null))):this._onInput())}_onInput(){const e=this.lastValue;this.settings.shouldLoad.call(this,e)&&this.load(e),this.refreshOptions(),this.trigger("type",e)}onOptionHover(e,t){this.ignoreHover||this.setActiveOption(t,!1)}onFocus(e){var t=this,s=t.isFocused;if(t.isDisabled||t.isReadOnly)return t.blur(),void J(e);t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.preload(),s||t.trigger("focus"),t.activeItems.length||(t.inputState(),t.refreshOptions(!!t.settings.openOnFocus)),t.refreshState())}onBlur(e){if(!1!==document.hasFocus()){var t=this;if(t.isFocused){t.isFocused=!1,t.ignoreFocus=!1;var s=()=>{t.close(),t.setActiveItem(),t.setCaret(t.items.length),t.trigger("blur")};t.settings.create&&t.settings.createOnBlur?t.createItem(null,s):s()}}}onOptionSelect(e,t){var s,o=this;t.parentElement&&t.parentElement.matches("[data-disabled]")||(t.classList.contains("create")?o.createItem(null,()=>{o.settings.closeAfterSelect&&o.close()}):void 0!==(s=t.dataset.value)&&(o.lastQuery=null,o.addItem(s),o.settings.closeAfterSelect&&o.close(),!o.settings.hideSelected&&e.type&&/click/.test(e.type)&&o.setActiveOption(t)))}canSelect(e){return!!(this.isOpen&&e&&this.dropdown_content.contains(e))}onItemSelect(e,t){var s=this;return!s.isLocked&&"multi"===s.settings.mode&&(J(e),s.setActiveItem(t,e),!0)}canLoad(e){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(e)}load(e){const t=this;if(!t.canLoad(e))return;oe(t.wrapper,t.settings.loadingClass),t.loading++;const s=t.loadCallback.bind(t);t.settings.load.call(t,e,s)}loadCallback(e,t){const s=this;s.loading=Math.max(s.loading-1,0),s.lastQuery=null,s.clearActiveOption(),s.setupOptions(e,t),s.refreshOptions(s.isFocused&&!s.isInputHidden),s.loading||ne(s.wrapper,s.settings.loadingClass),s.trigger("load",e,t)}preload(){var e=this.wrapper.classList;e.contains("preloaded")||(e.add("preloaded"),this.load(""))}setTextboxValue(e=""){var t=this.control_input;t.value!==e&&(t.value=e,te(t,"update"),this.lastValue=e)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(e,t){X(this,t?[]:["change"],()=>{this.clear(t),this.addItems(e,t)})}setMaxItems(e){0===e&&(e=null),this.settings.maxItems=e,this.refreshState()}setActiveItem(e,t){var s,o,n,i,r,a,l=this;if("single"!==l.settings.mode){if(!e)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(s=t&&t.type.toLowerCase())&&U("shiftKey",t)&&l.activeItems.length){for(a=l.getLastActive(),(n=Array.prototype.indexOf.call(l.control.children,a))>(i=Array.prototype.indexOf.call(l.control.children,e))&&(r=n,n=i,i=r),o=n;o<=i;o++)e=l.control.children[o],-1===l.activeItems.indexOf(e)&&l.setActiveItemClass(e);J(t)}else"click"===s&&U(pe,t)||"keydown"===s&&U("shiftKey",t)?e.classList.contains("active")?l.removeActiveItem(e):l.setActiveItemClass(e):(l.clearActiveItems(),l.setActiveItemClass(e));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(e){const t=this,s=t.control.querySelector(".last-active");s&&ne(s,"last-active"),oe(e,"active last-active"),t.trigger("item_select",e),-1==t.activeItems.indexOf(e)&&t.activeItems.push(e)}removeActiveItem(e){var t=this.activeItems.indexOf(e);this.activeItems.splice(t,1),ne(e,"active")}clearActiveItems(){ne(this.activeItems,"active"),this.activeItems=[]}setActiveOption(e,t=!0){e!==this.activeOption&&(this.clearActiveOption(),e&&(this.activeOption=e,de(this.focus_node,{"aria-activedescendant":e.getAttribute("id")}),de(e,{"aria-selected":"true"}),oe(e,"active"),t&&this.scrollToOption(e)))}scrollToOption(e,t){if(!e)return;const s=this.dropdown_content,o=s.clientHeight,n=s.scrollTop||0,i=e.offsetHeight,r=e.getBoundingClientRect().top-s.getBoundingClientRect().top+n;r+i>o+n?this.scroll(r-o+i,t):r<n&&this.scroll(r,t)}scroll(e,t){const s=this.dropdown_content;t&&(s.style.scrollBehavior=t),s.scrollTop=e,s.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(ne(this.activeOption,"active"),de(this.activeOption,{"aria-selected":null})),this.activeOption=null,de(this.focus_node,{"aria-activedescendant":null})}selectAll(){const e=this;if("single"===e.settings.mode)return;const t=e.controlChildren();t.length&&(e.inputState(),e.close(),e.activeItems=t,Z(t,t=>{e.setActiveItemClass(t)}))}inputState(){var e=this;e.control.contains(e.control_input)&&(de(e.control_input,{placeholder:e.settings.placeholder}),e.activeItems.length>0||!e.isFocused&&e.settings.hidePlaceholder&&e.items.length>0?(e.setTextboxValue(),e.isInputHidden=!0):(e.settings.hidePlaceholder&&e.items.length>0&&de(e.control_input,{placeholder:""}),e.isInputHidden=!1),e.wrapper.classList.toggle("input-hidden",e.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var e=this;e.isDisabled||e.isReadOnly||(e.ignoreFocus=!0,e.control_input.offsetWidth?e.control_input.focus():e.focus_node.focus(),setTimeout(()=>{e.ignoreFocus=!1,e.onFocus()},0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())}getSearchOptions(){var e=this.settings,t=e.sortField;return"string"==typeof e.sortField&&(t=[{field:e.sortField}]),{fields:e.searchField,conjunction:e.searchConjunction,sort:t,nesting:e.nesting}}search(e){var t,s,o=this,n=this.getSearchOptions();if(o.settings.score&&"function"!=typeof(s=o.settings.score.call(o,e)))throw new Error('Tom Select "score" setting must be a function that returns a function');return e!==o.lastQuery?(o.lastQuery=e,t=o.sifter.search(e,Object.assign(n,{score:s})),o.currentResults=t):t=Object.assign({},o.currentResults),o.settings.hideSelected&&(t.items=t.items.filter(e=>{let t=N(e.id);return!(t&&-1!==o.items.indexOf(t))})),t}refreshOptions(e=!0){var t,s,o,n,i,r,a,l,c,d;const u={},p=[];var h=this,m=h.inputValue();const w=m===h.lastQuery||""==m&&null==h.lastQuery;var g=h.search(m),f=null,v=h.settings.shouldOpen||!1,b=h.dropdown_content;w&&(f=h.activeOption)&&(c=f.closest("[data-group]")),n=g.items.length,"number"==typeof h.settings.maxOptions&&(n=Math.min(n,h.settings.maxOptions)),n>0&&(v=!0);const y=(e,t)=>{let s=u[e];if(void 0!==s){let e=p[s];if(void 0!==e)return[s,e.fragment]}let o=document.createDocumentFragment();return s=p.length,p.push({fragment:o,order:t,optgroup:e}),[s,o]};for(t=0;t<n;t++){let e=g.items[t];if(!e)continue;let n=e.id,a=h.options[n];if(void 0===a)continue;let l=V(n),d=h.getOption(l,!0);for(h.settings.hideSelected||d.classList.toggle("selected",h.items.includes(l)),i=a[h.settings.optgroupField]||"",s=0,o=(r=Array.isArray(i)?i:[i])&&r.length;s<o;s++){i=r[s];let e=a.$order,t=h.optgroups[i];void 0===t?i="":e=t.$order;const[o,l]=y(i,e);s>0&&(d=d.cloneNode(!0),de(d,{id:a.$id+"-clone-"+s,"aria-selected":null}),d.classList.add("ts-cloned"),ne(d,"active"),h.activeOption&&h.activeOption.dataset.value==n&&c&&c.dataset.group===i.toString()&&(f=d)),l.appendChild(d),""!=i&&(u[i]=o)}}var k;h.settings.lockOptgroupOrder&&p.sort((e,t)=>e.order-t.order),a=document.createDocumentFragment(),Z(p,e=>{let t=e.fragment,s=e.optgroup;if(!t||!t.children.length)return;let o=h.optgroups[s];if(void 0!==o){let e=document.createDocumentFragment(),s=h.render("optgroup_header",o);Y(e,s),Y(e,t);let n=h.render("optgroup",{group:o,options:e});Y(a,n)}else Y(a,t)}),b.innerHTML="",Y(b,a),h.settings.highlight&&(k=b.querySelectorAll("span.highlight"),Array.prototype.forEach.call(k,function(e){var t=e.parentNode;t.replaceChild(e.firstChild,e),t.normalize()}),g.query.length&&g.tokens.length&&Z(g.tokens,e=>{((e,t)=>{if(null===t)return;if("string"==typeof t){if(!t.length)return;t=new RegExp(t,"i")}const s=e=>3===e.nodeType?(e=>{var s=e.data.match(t);if(s&&e.data.length>0){var o=document.createElement("span");o.className="highlight";var n=e.splitText(s.index);n.splitText(s[0].length);var i=n.cloneNode(!0);return o.appendChild(i),ue(n,o),1}return 0})(e):((e=>{1!==e.nodeType||!e.childNodes||/(script|style)/i.test(e.tagName)||"highlight"===e.className&&"SPAN"===e.tagName||Array.from(e.childNodes).forEach(e=>{s(e)})})(e),0);s(e)})(b,e.regex)}));var C=e=>{let t=h.render(e,{input:m});return t&&(v=!0,b.insertBefore(t,b.firstChild)),t};if(h.loading?C("loading"):h.settings.shouldLoad.call(h,m)?0===g.items.length&&C("no_results"):C("not_loading"),(l=h.canCreate(m))&&(d=C("option_create")),h.hasOptions=g.items.length>0||l,v){if(g.items.length>0){if(f||"single"!==h.settings.mode||null==h.items[0]||(f=h.getOption(h.items[0])),!b.contains(f)){let e=0;d&&!h.settings.addPrecedence&&(e=1),f=h.selectable()[e]}}else d&&(f=d);e&&!h.isOpen&&(h.open(),h.scrollToOption(f,"auto")),h.setActiveOption(f)}else h.clearActiveOption(),e&&h.isOpen&&h.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(e,t=!1){const s=this;if(Array.isArray(e))return s.addOptions(e,t),!1;const o=N(e[s.settings.valueField]);return null!==o&&!s.options.hasOwnProperty(o)&&(e.$order=e.$order||++s.order,e.$id=s.inputId+"-opt-"+e.$order,s.options[o]=e,s.lastQuery=null,t&&(s.userOptions[o]=t,s.trigger("option_add",o,e)),o)}addOptions(e,t=!1){Z(e,e=>{this.addOption(e,t)})}registerOption(e){return this.addOption(e)}registerOptionGroup(e){var t=N(e[this.settings.optgroupValueField]);return null!==t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)}addOptionGroup(e,t){var s;t[this.settings.optgroupValueField]=e,(s=this.registerOptionGroup(t))&&this.trigger("optgroup_add",s,t)}removeOptionGroup(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],this.clearCache(),this.trigger("optgroup_remove",e))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(e,t){const s=this;var o,n;const i=N(e),r=N(t[s.settings.valueField]);if(null===i)return;const a=s.options[i];if(null==a)return;if("string"!=typeof r)throw new Error("Value must be set in option data");const l=s.getOption(i),c=s.getItem(i);if(t.$order=t.$order||a.$order,delete s.options[i],s.uncacheValue(r),s.options[r]=t,l){if(s.dropdown_content.contains(l)){const e=s._render("option",t);ue(l,e),s.activeOption===l&&s.setActiveOption(e)}l.remove()}c&&(-1!==(n=s.items.indexOf(i))&&s.items.splice(n,1,r),o=s._render("item",t),c.classList.contains("active")&&oe(o,"active"),ue(c,o)),s.lastQuery=null}removeOption(e,t){const s=this;e=V(e),s.uncacheValue(e),delete s.userOptions[e],delete s.options[e],s.lastQuery=null,s.trigger("option_remove",e),s.removeItem(e,t)}clearOptions(e){const t=(e||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const s={};Z(this.options,(e,o)=>{t(e,o)&&(s[o]=e)}),this.options=this.sifter.items=s,this.lastQuery=null,this.trigger("option_clear")}clearFilter(e,t){return this.items.indexOf(t)>=0}getOption(e,t=!1){const s=N(e);if(null===s)return null;const o=this.options[s];if(null!=o){if(o.$div)return o.$div;if(t)return this._render("option",o)}return null}getAdjacent(e,t,s="option"){var o;if(!e)return null;o="item"==s?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let s=0;s<o.length;s++)if(o[s]==e)return t>0?o[s+1]:o[s-1];return null}getItem(e){if("object"==typeof e)return e;var t=N(e);return null!==t?this.control.querySelector(`[data-value="${K(t)}"]`):null}addItems(e,t){var s=this,o=Array.isArray(e)?e:[e];const n=(o=o.filter(e=>-1===s.items.indexOf(e)))[o.length-1];o.forEach(e=>{s.isPending=e!==n,s.addItem(e,t)})}addItem(e,t){X(this,t?[]:["change","dropdown_close"],()=>{var s,o;const n=this,i=n.settings.mode,r=N(e);if((!r||-1===n.items.indexOf(r)||("single"===i&&n.close(),"single"!==i&&n.settings.duplicates))&&null!==r&&n.options.hasOwnProperty(r)&&("single"===i&&n.clear(t),"multi"!==i||!n.isFull())){if(s=n._render("item",n.options[r]),n.control.contains(s)&&(s=s.cloneNode(!0)),o=n.isFull(),n.items.splice(n.caretPos,0,r),n.insertAtCaret(s),n.isSetup){if(!n.isPending&&n.settings.hideSelected){let e=n.getOption(r),t=n.getAdjacent(e,1);t&&n.setActiveOption(t)}n.isPending||n.settings.closeAfterSelect||n.refreshOptions(n.isFocused&&"single"!==i),0!=n.settings.closeAfterSelect&&n.isFull()?n.close():n.isPending||n.positionDropdown(),n.trigger("item_add",r,s),n.isPending||n.updateOriginalInput({silent:t})}(!n.isPending||!o&&n.isFull())&&(n.inputState(),n.refreshState())}})}removeItem(e=null,t){const s=this;if(!(e=s.getItem(e)))return;var o,n;const i=e.dataset.value;o=ce(e),e.remove(),e.classList.contains("active")&&(n=s.activeItems.indexOf(e),s.activeItems.splice(n,1),ne(e,"active")),s.items.splice(o,1),s.lastQuery=null,!s.settings.persist&&s.userOptions.hasOwnProperty(i)&&s.removeOption(i,t),o<s.caretPos&&s.setCaret(s.caretPos-1),s.updateOriginalInput({silent:t}),s.refreshState(),s.positionDropdown(),s.trigger("item_remove",i,e)}createItem(e=null,t=()=>{}){3===arguments.length&&(t=arguments[2]),"function"!=typeof t&&(t=()=>{});var s,o=this,n=o.caretPos;if(e=e||o.inputValue(),!o.canCreate(e))return t(),!1;o.lock();var i=!1,r=e=>{if(o.unlock(),!e||"object"!=typeof e)return t();var s=N(e[o.settings.valueField]);if("string"!=typeof s)return t();o.setTextboxValue(),o.addOption(e,!0),o.setCaret(n),o.addItem(s),t(e),i=!0};return s="function"==typeof o.settings.create?o.settings.create.call(this,e,r):{[o.settings.labelField]:e,[o.settings.valueField]:e},i||r(s),!0}refreshItems(){var e=this;e.lastQuery=null,e.isSetup&&e.addItems(e.items),e.updateOriginalInput(),e.refreshState()}refreshState(){const e=this;e.refreshValidityState();const t=e.isFull(),s=e.isLocked;e.wrapper.classList.toggle("rtl",e.rtl);const o=e.wrapper.classList;var n;o.toggle("focus",e.isFocused),o.toggle("disabled",e.isDisabled),o.toggle("readonly",e.isReadOnly),o.toggle("required",e.isRequired),o.toggle("invalid",!e.isValid),o.toggle("locked",s),o.toggle("full",t),o.toggle("input-active",e.isFocused&&!e.isInputHidden),o.toggle("dropdown-active",e.isOpen),o.toggle("has-options",(n=e.options,0===Object.keys(n).length)),o.toggle("has-items",e.items.length>0)}refreshValidityState(){var e=this;e.input.validity&&(e.isValid=e.input.validity.valid,e.isInvalid=!e.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(e={}){const t=this;var s,o;const n=t.input.querySelector('option[value=""]');if(t.is_select_tag){const i=[],r=t.input.querySelectorAll("option:checked").length;function a(e,s,o){return e||(e=Q('<option value="'+z(s)+'">'+z(o)+"</option>")),e!=n&&t.input.append(e),i.push(e),(e!=n||r>0)&&(e.selected=!0),e}t.input.querySelectorAll("option:checked").forEach(e=>{e.selected=!1}),0==t.items.length&&"single"==t.settings.mode?a(n,"",""):t.items.forEach(e=>{s=t.options[e],o=s[t.settings.labelField]||"",i.includes(s.$option)?a(t.input.querySelector(`option[value="${K(e)}"]:not(:checked)`),e,o):s.$option=a(s.$option,e,o)})}else t.input.value=t.getValue();t.isSetup&&(e.silent||t.trigger("change",t.getValue()))}open(){var e=this;e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.isOpen=!0,de(e.focus_node,{"aria-expanded":"true"}),e.refreshState(),se(e.dropdown,{visibility:"hidden",display:"block"}),e.positionDropdown(),se(e.dropdown,{visibility:"visible",display:"block"}),e.focus(),e.trigger("dropdown_open",e.dropdown))}close(e=!0){var t=this,s=t.isOpen;e&&(t.setTextboxValue(),"single"===t.settings.mode&&t.items.length&&t.inputState()),t.isOpen=!1,de(t.focus_node,{"aria-expanded":"false"}),se(t.dropdown,{display:"none"}),t.settings.hideSelected&&t.clearActiveOption(),t.refreshState(),s&&t.trigger("dropdown_close",t.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var e=this.control,t=e.getBoundingClientRect(),s=e.offsetHeight+t.top+window.scrollY,o=t.left+window.scrollX;se(this.dropdown,{width:t.width+"px",top:s+"px",left:o+"px"})}}clear(e){var t=this;if(t.items.length){var s=t.controlChildren();Z(s,e=>{t.removeItem(e,!0)}),t.inputState(),e||t.updateOriginalInput(),t.trigger("clear")}}insertAtCaret(e){const t=this,s=t.caretPos,o=t.control;o.insertBefore(e,o.children[s]||null),t.setCaret(s+1)}deleteSelection(e){var t,s,o,n,i,r=this;t=e&&8===e.keyCode?-1:1,s={start:(i=r.control_input).selectionStart||0,length:(i.selectionEnd||0)-(i.selectionStart||0)};const a=[];if(r.activeItems.length)n=le(r.activeItems,t),o=ce(n),t>0&&o++,Z(r.activeItems,e=>a.push(e));else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const e=r.controlChildren();let o;t<0&&0===s.start&&0===s.length?o=e[r.caretPos-1]:t>0&&s.start===r.inputValue().length&&(o=e[r.caretPos]),void 0!==o&&a.push(o)}if(!r.shouldDelete(a,e))return!1;for(J(e,!0),void 0!==o&&r.setCaret(o);a.length;)r.removeItem(a.pop());return r.inputState(),r.positionDropdown(),r.refreshOptions(!1),!0}shouldDelete(e,t){const s=e.map(e=>e.dataset.value);return!(!s.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(s,t))}advanceSelection(e,t){var s,o,n=this;n.rtl&&(e*=-1),n.inputValue().length||(U(pe,t)||U("shiftKey",t)?(o=(s=n.getLastActive(e))?s.classList.contains("active")?n.getAdjacent(s,e,"item"):s:e>0?n.control_input.nextElementSibling:n.control_input.previousElementSibling)&&(o.classList.contains("active")&&n.removeActiveItem(s),n.setActiveItemClass(o)):n.moveCaret(e))}moveCaret(e){}getLastActive(e){let t=this.control.querySelector(".last-active");if(t)return t;var s=this.control.querySelectorAll(".active");return s?le(s,e):void 0}setCaret(e){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(e=this.isReadOnly||this.isDisabled){this.isLocked=e,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(e){this.focus_node.tabIndex=e?-1:this.tabIndex,this.isDisabled=e,this.input.disabled=e,this.control_input.disabled=e,this.setLocked()}setReadOnly(e){this.isReadOnly=e,this.input.readOnly=e,this.control_input.readOnly=e,this.setLocked()}destroy(){var e=this,t=e.revertSettings;e.trigger("destroy"),e.off(),e.wrapper.remove(),e.dropdown.remove(),e.input.innerHTML=t.innerHTML,e.input.tabIndex=t.tabIndex,ne(e.input,"tomselected","ts-hidden-accessible"),e._destroy(),delete e.input.tomselect}render(e,t){var s,o;const n=this;if("function"!=typeof this.settings.render[e])return null;if(!(o=n.settings.render[e].call(this,t,z)))return null;if(o=Q(o),"option"===e||"option_create"===e?t[n.settings.disabledField]?de(o,{"aria-disabled":"true"}):de(o,{"data-selectable":""}):"optgroup"===e&&(s=t.group[n.settings.optgroupValueField],de(o,{"data-group":s}),t.group[n.settings.disabledField]&&de(o,{"data-disabled":""})),"option"===e||"item"===e){const s=V(t[n.settings.valueField]);de(o,{"data-value":s}),"item"===e?(oe(o,n.settings.itemClass),de(o,{"data-ts-item":""})):(oe(o,n.settings.optionClass),de(o,{role:"option",id:t.$id}),t.$div=o,n.options[s]=t)}return o}_render(e,t){const s=this.render(e,t);if(null==s)throw"HTMLElement expected";return s}clearCache(){Z(this.options,e=>{e.$div&&(e.$div.remove(),delete e.$div)})}uncacheValue(e){const t=this.getOption(e);t&&t.remove()}canCreate(e){return this.settings.create&&e.length>0&&this.settings.createFilter.call(this,e)}hook(e,t,s){var o=this,n=o[t];o[t]=function(){var t,i;return"after"===e&&(t=n.apply(o,arguments)),i=s.apply(o,arguments),"instead"===e?i:("before"===e&&(t=n.apply(o,arguments)),t)}}}const fe=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},ve=(e,t,s,o)=>{e.addEventListener(t,s,o)},be=e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(ye(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)},ye=e=>"string"==typeof e&&e.indexOf("<")>-1,ke=(e,t,s,o)=>{e.addEventListener(t,s,o)},Ce=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},xe=(e,t,s,o)=>{e.addEventListener(t,s,o)},Ae=e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(Se(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)},Se=e=>"string"==typeof e&&e.indexOf("<")>-1;ge.define("change_listener",function(){((e,t,s)=>{this.input.addEventListener("change",s,void 0)})(0,0,()=>{this.sync()})}),ge.define("checkbox_options",function(e){var t=this,s=t.onOptionSelect;t.settings.hideSelected=!1;const o=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},e);var n=function(e,t){t?(e.checked=!0,o.uncheckedClassNames&&e.classList.remove(...o.uncheckedClassNames),o.checkedClassNames&&e.classList.add(...o.checkedClassNames)):(e.checked=!1,o.checkedClassNames&&e.classList.remove(...o.checkedClassNames),o.uncheckedClassNames&&e.classList.add(...o.uncheckedClassNames))},i=function(e){setTimeout(()=>{var t=e.querySelector("input."+o.className);t instanceof HTMLInputElement&&n(t,e.classList.contains("selected"))},1)};t.hook("after","setupTemplates",()=>{var e=t.settings.render.option;t.settings.render.option=(s,i)=>{var r=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if("string"==typeof(s=e)&&s.indexOf("<")>-1){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}var s;return document.querySelector(e)})(e.call(t,s,i)),a=document.createElement("input");o.className&&a.classList.add(o.className),a.addEventListener("click",function(e){fe(e)}),a.type="checkbox";const l=null==(c=s[t.settings.valueField])?null:(e=>"boolean"==typeof e?e?"1":"0":e+"")(c);var c;return n(a,!!(l&&t.items.indexOf(l)>-1)),r.prepend(a),r}}),t.on("item_remove",e=>{var s=t.getOption(e);s&&(s.classList.remove("selected"),i(s))}),t.on("item_add",e=>{var s=t.getOption(e);s&&i(s)}),t.hook("instead","onOptionSelect",(e,o)=>{if(o.classList.contains("selected"))return o.classList.remove("selected"),t.removeItem(o.dataset.value),t.refreshOptions(),void fe(e,!0);s.call(t,e,o),i(o)})}),ge.define("clear_button",function(e){const t=this,s=Object.assign({className:"clear-button",title:"Clear All",html:e=>`<div class="${e.className}" title="${e.title}">&#10799;</div>`},e);t.on("initialize",()=>{var e=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if("string"==typeof(s=e)&&s.indexOf("<")>-1){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}var s;return document.querySelector(e)})(s.html(s));e.addEventListener("click",e=>{t.isLocked||(t.clear(),"single"===t.settings.mode&&t.settings.allowEmptyOption&&t.addItem(""),e.preventDefault(),e.stopPropagation())}),t.control.appendChild(e)})}),ge.define("drag_drop",function(){var e=this;if("multi"!==e.settings.mode)return;var t=e.lock,s=e.unlock;let o,n=!0;e.hook("after","setupTemplates",()=>{var t=e.settings.render.item;e.settings.render.item=(s,i)=>{const r=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if("string"==typeof(s=e)&&s.indexOf("<")>-1){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}var s;return document.querySelector(e)})(t.call(e,s,i));var a;a=r,((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var s in e)e.hasOwnProperty(s)&&t(e[s],s)})({draggable:"true"},(e,t)=>{null==e?a.removeAttribute(t):a.setAttribute(t,""+e)});const l=e=>{e.preventDefault(),r.classList.add("ts-drag-over"),c(r,o)},c=(e,t)=>{var s,o,n;void 0!==t&&(((e,t)=>{do{var s;if(e==(t=null==(s=t)?void 0:s.previousElementSibling))return!0}while(t&&t.previousElementSibling);return!1})(t,r)?(o=t,null==(n=(s=e).parentNode)||n.insertBefore(o,s.nextSibling)):((e,t)=>{var s;null==(s=e.parentNode)||s.insertBefore(t,e)})(e,t))};return ve(r,"mousedown",e=>{n||((e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())})(e),e.stopPropagation()}),ve(r,"dragstart",e=>{o=r,setTimeout(()=>{r.classList.add("ts-dragging")},0)}),ve(r,"dragenter",l),ve(r,"dragover",l),ve(r,"dragleave",()=>{r.classList.remove("ts-drag-over")}),ve(r,"dragend",()=>{var t;document.querySelectorAll(".ts-drag-over").forEach(e=>e.classList.remove("ts-drag-over")),null==(t=o)||t.classList.remove("ts-dragging"),o=void 0;var s=[];e.control.querySelectorAll("[data-value]").forEach(e=>{if(e.dataset.value){let t=e.dataset.value;t&&s.push(t)}}),e.setValue(s)}),r}}),e.hook("instead","lock",()=>(n=!1,t.call(e))),e.hook("instead","unlock",()=>(n=!0,s.call(e)))}),ge.define("dropdown_header",function(e){const t=this,s=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:e=>'<div class="'+e.headerClass+'"><div class="'+e.titleRowClass+'"><span class="'+e.labelClass+'">'+e.title+'</span><a class="'+e.closeClass+'">&times;</a></div></div>'},e);t.on("initialize",()=>{var e=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if("string"==typeof(s=e)&&s.indexOf("<")>-1){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}var s;return document.querySelector(e)})(s.html(s)),o=e.querySelector("."+s.closeClass);o&&o.addEventListener("click",e=>{((e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())})(e,!0),t.close()}),t.dropdown.insertBefore(e,t.dropdown.firstChild)})}),ge.define("caret_position",function(){var e=this;e.hook("instead","setCaret",t=>{"single"!==e.settings.mode&&e.control.contains(e.control_input)?(t=Math.max(0,Math.min(e.items.length,t)))==e.caretPos||e.isPending||e.controlChildren().forEach((s,o)=>{o<t?e.control_input.insertAdjacentElement("beforebegin",s):e.control.appendChild(s)}):t=e.items.length,e.caretPos=t}),e.hook("instead","moveCaret",t=>{if(!e.isFocused)return;const s=e.getLastActive(t);if(s){const a=((e,t)=>{if(!e)return-1;t=t||e.nodeName;for(var s=0;e=e.previousElementSibling;)e.matches(t)&&s++;return s})(s);e.setCaret(t>0?a+1:a),e.setActiveItem(),n=s,o=[],((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var s in e)e.hasOwnProperty(s)&&t(e[s])})(["last-active"],e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(o=o.concat(e))}),r=o.filter(Boolean),(i=n,Array.isArray(i)||(i=[i]),n=i).map(e=>{r.map(t=>{e.classList.remove(t)})})}else e.setCaret(e.caretPos+t);var o,n,i,r})}),ge.define("dropdown_input",function(){const e=this;e.settings.shouldOpen=!0,e.hook("before","setup",()=>{e.focus_node=e.control,((e,...t)=>{var s,o=(e=>{var t=[];return((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var s in e)e.hasOwnProperty(s)&&t(e[s])})(e,e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(t=t.concat(e))}),t.filter(Boolean)})(t);(s=e,Array.isArray(s)||(s=[s]),e=s).map(e=>{o.map(t=>{e.classList.add(t)})})})(e.control_input,"dropdown-input");const t=be('<div class="dropdown-input-wrap">');t.append(e.control_input),e.dropdown.insertBefore(t,e.dropdown.firstChild);const s=be('<input class="items-placeholder" tabindex="-1" />');s.placeholder=e.settings.placeholder||"",e.control.append(s)}),e.on("initialize",()=>{e.control_input.addEventListener("keydown",t=>{switch(t.keyCode){case 27:return e.isOpen&&(((e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())})(t,!0),e.close()),void e.clearActiveItems();case 9:e.focus_node.tabIndex=-1}return e.onKeyDown.call(e,t)}),e.on("blur",()=>{e.focus_node.tabIndex=e.isDisabled?-1:e.tabIndex}),e.on("dropdown_open",()=>{e.control_input.focus()});const t=e.onBlur;e.hook("instead","onBlur",s=>{if(!s||s.relatedTarget!=e.control_input)return t.call(e)}),e.control_input.addEventListener("blur",()=>e.onBlur(),void 0),e.hook("before","close",()=>{e.isOpen&&e.focus_node.focus({preventScroll:!0})})})}),ge.define("input_autogrow",function(){var e=this;e.on("initialize",()=>{var t=document.createElement("span"),s=e.control_input;t.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",e.wrapper.appendChild(t);for(const e of["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"])t.style[e]=s.style[e];var o=()=>{t.textContent=s.value,s.style.width=t.clientWidth+"px"};o(),e.on("update item_add item_remove",o),ke(s,"input",o),ke(s,"keyup",o),ke(s,"blur",o),ke(s,"update",o)})}),ge.define("no_backspace_delete",function(){var e=this,t=e.deleteSelection;this.hook("instead","deleteSelection",s=>!!e.activeItems.length&&t.call(e,s))}),ge.define("no_active_items",function(){this.hook("instead","setActiveItem",()=>{}),this.hook("instead","selectAll",()=>{})}),ge.define("optgroup_columns",function(){var e=this,t=e.onKeyDown;e.hook("instead","onKeyDown",s=>{var o,n,i,r;if(!e.isOpen||37!==s.keyCode&&39!==s.keyCode)return t.call(e,s);e.ignoreHover=!0,r=(e=>{for(;e&&e.matches;){if(e.matches("[data-group]"))return e;e=e.parentNode}})(e.activeOption),o=((e,t)=>{if(!e)return-1;t=t||e.nodeName;for(var s=0;e=e.previousElementSibling;)e.matches(t)&&s++;return s})(e.activeOption,"[data-selectable]"),r&&(r=37===s.keyCode?r.previousSibling:r.nextSibling)&&(n=(i=r.querySelectorAll("[data-selectable]"))[Math.min(i.length-1,o)])&&e.setActiveOption(n)})}),ge.define("remove_button",function(e){const t=Object.assign({label:"&times;",title:"Remove",className:"remove",append:!0},e);var s=this;if(t.append){var o='<a href="javascript:void(0)" class="'+t.className+'" tabindex="-1" title="'+(t.title+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")+'">'+t.label+"</a>";s.hook("after","setupTemplates",()=>{var e=s.settings.render.item;s.settings.render.item=(t,n)=>{var i=Ae(e.call(s,t,n)),r=Ae(o);return i.appendChild(r),xe(r,"mousedown",e=>{Ce(e,!0)}),xe(r,"click",e=>{s.isLocked||(Ce(e,!0),s.isLocked||s.shouldDelete([i],e)&&(s.removeItem(i),s.refreshOptions(!1),s.inputState()))}),i}})}}),ge.define("restore_on_backspace",function(e){const t=this,s=Object.assign({text:e=>e[t.settings.labelField]},e);t.on("item_remove",function(e){if(t.isFocused&&""===t.control_input.value.trim()){var o=t.options[e];o&&t.setTextboxValue(s.text.call(t,o))}})}),ge.define("virtual_scroll",function(){const e=this,t=e.canLoad,s=e.clearActiveOption,o=e.loadCallback;var n,i,r={},a=!1,l=[];if(e.settings.shouldLoadMore||(e.settings.shouldLoadMore=()=>{if(n.clientHeight/(n.scrollHeight-n.scrollTop)>.9)return!0;if(e.activeOption){var t=e.selectable();if(Array.from(t).indexOf(e.activeOption)>=t.length-2)return!0}return!1}),!e.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";e.settings.sortField=[{field:"$order"},{field:"$score"}];const c=t=>!("number"==typeof e.settings.maxOptions&&n.children.length>=e.settings.maxOptions||!(t in r)||!r[t]),d=(t,s)=>e.items.indexOf(s)>=0||l.indexOf(s)>=0;e.setNextUrl=(e,t)=>{r[e]=t},e.getUrl=t=>{if(t in r){const e=r[t];return r[t]=!1,e}return e.clearPagination(),e.settings.firstUrl.call(e,t)},e.clearPagination=()=>{r={}},e.hook("instead","clearActiveOption",()=>{if(!a)return s.call(e)}),e.hook("instead","canLoad",s=>s in r?c(s):t.call(e,s)),e.hook("instead","loadCallback",(t,s)=>{if(a){if(i){const s=t[0];void 0!==s&&(i.dataset.value=s[e.settings.valueField])}}else e.clearOptions(d);o.call(e,t,s),a=!1}),e.hook("after","refreshOptions",()=>{const t=e.lastValue;var s;c(t)?(s=e.render("loading_more",{query:t}))&&(s.setAttribute("data-selectable",""),i=s):t in r&&!n.querySelector(".no-results")&&(s=e.render("no_more_results",{query:t})),s&&(((e,...t)=>{var s,o=(e=>{var t=[];return((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var s in e)e.hasOwnProperty(s)&&t(e[s])})(e,e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(t=t.concat(e))}),t.filter(Boolean)})(t);(s=e,Array.isArray(s)||(s=[s]),e=s).map(e=>{o.map(t=>{e.classList.add(t)})})})(s,e.settings.optionClass),n.append(s))}),e.on("initialize",()=>{l=Object.keys(e.options),n=e.dropdown_content,e.settings.render=Object.assign({},{loading_more:()=>'<div class="loading-more-results">Loading more results ... </div>',no_more_results:()=>'<div class="no-more-results">No more results</div>'},e.settings.render),n.addEventListener("scroll",()=>{e.settings.shouldLoadMore.call(e)&&c(e.lastValue)&&(a||(a=!0,e.load.call(e,e.lastValue)))})})});const Oe={};let Ie;"undefined"!=typeof lpDataAdmin&&(Ie=lpDataAdmin.lp_rest_url,Oe.admin={apiSearchCourses:Ie+"lp/v1/admin/tools/search-course",apiSearchUsers:Ie+"lp/v1/admin/tools/search-user",apiAssignUserCourse:Ie+"lp/v1/admin/tools/assign-user-course",apiUnAssignUserCourse:Ie+"lp/v1/admin/tools/unassign-user-course"}),"undefined"!=typeof lpData&&(Ie=lpData.lp_rest_url,Oe.frontend={apiWidgets:Ie+"lp/v1/widgets/api",apiCourses:Ie+"lp/v1/courses/archive-course",apiAJAX:Ie+"lp/v1/load_content_via_ajax/",apiProfileCoverImage:Ie+"lp/v1/profile/cover-image"}),Ie&&(Oe.apiCourses=Ie+"lp/v1/courses/",Oe.apiEditCoursesArchiveBlock=Ie+"lp/v1/courses/edit-archive-block",Oe.apiCoursesSuggest=Ie+"lp/v1/courses/courses-suggest");const Le=Oe;var Te=s(7736),Ee=s.n(Te),Pe=s(5072),Be=s.n(Pe),_e=s(7825),$e=s.n(_e),Fe=s(7659),qe=s.n(Fe),Me=s(5056),He=s.n(Me),je=s(540),De=s.n(je),Ne=s(1113),Ve=s.n(Ne),ze=s(9455),Re={};Re.styleTagTransform=Ve(),Re.setAttributes=He(),Re.insert=qe().bind(null,"head"),Re.domAPI=$e(),Re.insertStyleElement=De(),Be()(ze.A,Re),ze.A&&ze.A.locals&&ze.A.locals;const Xe={text:"",gravity:lpData.toast.gravity,position:lpData.toast.position,className:`${lpData.toast.classPrefix}`,close:1==lpData.toast.close,stopOnFocus:1==lpData.toast.stopOnFocus,duration:lpData.toast.duration},Je=(e,t="success",s)=>{let o=Xe;s&&(o={...o,...s}),new(Ee())({...o,text:e,className:`${lpData.toast.classPrefix} ${t}`}).showToast()};class Ge{static selectors={wrapper:".lp-install-sample",form:".lp-form-handle-sample-data",elBtnHandleSampleData:".lp-btn-install-sample-handle",elTriggerToggle:".lp-install-sample__toggle-options",elMessage:".lp-install-sample-message"};constructor(){this.wrapper=null}init(){this.wrapper=document.querySelector(Ge.selectors.wrapper),this.wrapper&&(this.preventFormSubmit(),this.events())}preventFormSubmit(){const e=this.wrapper.querySelector(Ge.selectors.form);e&&e.addEventListener("submit",e=>{e.preventDefault()})}events(){Ge._loadedEvents||(Ge._loadedEvents=this,l("click",[{selector:Ge.selectors.elBtnHandleSampleData,class:this,callBack:this.handleAction.name},{selector:Ge.selectors.elTriggerToggle,callBack:e=>{const{e:t,target:s}=e,o=this.wrapper.querySelector(Ge.selectors.form);if(o){o.classList.toggle("lp-hidden");const e=s.dataset.showText,t=s.dataset.hideText;s.textContent=o.classList.contains("lp-hidden")?e:t}}}]))}handleAction(e){const{e:t,target:s}=e,o=s.closest(Ge.selectors.elBtnHandleSampleData);t.preventDefault();const n=this.wrapper.querySelector(Ge.selectors.elMessage),a=o.dataset.message;if(!a||!confirm(a))return;n.innerHTML="",i(o,!0);const l=o.closest(Ge.selectors.wrapper).querySelector(Ge.selectors.form);let c=r(l);c.action=o.dataset.action,c.id_url="handle-sample-data";const d={success:e=>{const{status:t,message:s,data:o}=e;if("success"!==t)throw new Error(s);this.wrapper.querySelector(Ge.selectors.elMessage).innerHTML=o.html},error:e=>{Je(e,"error")},completed:()=>{i(o,!1),setTimeout(()=>{n.innerHTML=""},3e3)}};window.lpAJAXG.fetchAJAX(c,d)}}var Ue=s(8465),We=s.n(Ue);let Ke,Ye,Ze=[];class Qe{constructor(){this.init()}static selectors={elBtnShowPopupItemsToSelect:".lp-btn-show-popup-items-to-select",elBtnAddItemsSelected:".lp-btn-add-items-selected",elBtnCountItemsSelected:".lp-btn-count-items-selected",elHeaderCountItemSelected:".header-count-items-selected",elSelectItem:".lp-select-item",elListItems:".list-items",elPopupItemsToSelect:".lp-popup-items-to-select",elSearchTitleItem:".lp-search-title-item",elBtnBackListItems:".lp-btn-back-to-select-items",elListItemsWrap:".list-items-wrap",elListItemsSelected:".list-items-selected",elItemSelectedClone:".li-item-selected.clone",elItemSelected:".li-item-selected",LPTarget:".lp-target"};init(){this.events()}events=()=>{Qe._loadedEvents||(Qe._loadedEvents=!0,l("click",[{selector:Qe.selectors.elBtnShowPopupItemsToSelect,callBack:this.showPopupItemsToSelect.name,class:this},{selector:Qe.selectors.elSelectItem,callBack:this.selectItemsFromList.name,class:this},{selector:Qe.selectors.elBtnCountItemsSelected,callBack:this.showItemsSelected.name,class:this},{selector:Qe.selectors.elBtnBackListItems,callBack:this.backToSelectItems.name,class:this},{selector:Qe.selectors.elItemSelected,callBack:this.removeItemSelected.name,class:this},{selector:".tabs .tab",callBack:this.chooseTabItemsType.name,class:this}]),l("keyup",[{selector:Qe.selectors.elSearchTitleItem,callBack:this.searchTitleItemToSelect.name,class:this}]))};showPopupItemsToSelect=e=>{const{e:t,target:s=!1,callBack:o}=e;if(!s.closest(`${Qe.selectors.elBtnShowPopupItemsToSelect}`))return;Ze=[];const n=s.dataset.template||"",i=document.querySelector(n);We().fire({html:i.innerHTML,showConfirmButton:!1,showCloseButton:!0,width:"max(350px, 65vw)",customClass:{popup:"lp-select-items-popup",htmlContainer:"lp-select-items-html-container",container:"lp-select-items-container"},willOpen:()=>{Ke=We().getPopup();const e=Ke.querySelector(`${Qe.selectors.LPTarget}`);setTimeout(()=>{if(e.closest(".lp-load-ajax-element:not(.loaded)")&&e){const t=window.lpAJAXG.getDataSetCurrent(e);t.args.paged=1,t.args.item_selecting=Ze||[],window.lpAJAXG.setDataSetCurrent(e,t),window.lpAJAXG.fetchAJAX(t,{success:t=>{const{data:s}=t;Ke.querySelector(".lp-skeleton-animation").remove(),e.innerHTML=s.content||"",this.watchItemsSelectedDataChange()}})}},1)}}).then(e=>{e.isDismissed})};chooseTabItemsType=e=>{const{e:t,target:s,callBack:o}=e,n=s.closest(".tab");if(!n)return;t.preventDefault();const i=n.closest(".tabs");if(!i)return;const r=i.closest(`${Qe.selectors.elPopupItemsToSelect}`),a=r.querySelector(`${Qe.selectors.elSearchTitleItem}`),l=n.dataset.type;i.querySelectorAll(".tab").forEach(e=>{e.classList.contains("active")&&e.classList.remove("active")}),n.classList.add("active"),a.value="";const c=r.querySelector(`${Qe.selectors.LPTarget}`),d=window.lpAJAXG.getDataSetCurrent(c);d.args.item_type=l,d.args.paged=1,d.args.item_selecting=Ze||[],window.lpAJAXG.setDataSetCurrent(c,d),window.lpAJAXG.showHideLoading(c,1),window.lpAJAXG.fetchAJAX(d,{success:e=>{const{data:t}=e;c.innerHTML=t.content||""},error:e=>{Je(e,"error")},completed:()=>{window.lpAJAXG.showHideLoading(c,0),this.watchItemsSelectedDataChange()}})};selectItemsFromList=e=>{const{e:t,target:s}=e,o=s.closest(`${Qe.selectors.elSelectItem}`);if(!o)return;const n=o.querySelector('input[type="checkbox"]');if("INPUT"!==s.tagName)return void n.click();if(!o.closest(`${Qe.selectors.elListItems}`))return;const i={...n.dataset};if(n.checked)Ze.some(e=>e.id===i.id)||Ze.push(i);else{const e=Ze.findIndex(e=>e.id===i.id);-1!==e&&Ze.splice(e,1)}this.watchItemsSelectedDataChange()};searchTitleItemToSelect=e=>{const{e:t,target:s}=e,o=s.closest(Qe.selectors.elSearchTitleItem);if(!o)return;const n=Ke.querySelector(`${Qe.selectors.LPTarget}`);clearTimeout(Ye),Ye=setTimeout(()=>{const e=window.lpAJAXG.getDataSetCurrent(n);e.args.search_title=o.value.trim(),e.args.item_selecting=Ze,e.args.paged=1,window.lpAJAXG.setDataSetCurrent(n,e),window.lpAJAXG.showHideLoading(n,1),window.lpAJAXG.fetchAJAX(e,{success:e=>{const{data:t}=e;n.innerHTML=t.content||""},error:e=>{Je(e,"error")},completed:()=>{window.lpAJAXG.showHideLoading(n,0)}})},800)};showItemsSelected=e=>{const{e:t,target:s}=e,o=s.closest(`${Qe.selectors.elBtnCountItemsSelected}`);if(!o)return;const i=Ke.querySelector(`${Qe.selectors.elBtnBackListItems}`),r=Ke.querySelector(".tabs"),a=Ke.querySelector(`${Qe.selectors.elListItemsWrap}`),l=Ke.querySelector(`${Qe.selectors.elHeaderCountItemSelected}`),c=Ke.querySelector(`${Qe.selectors.elListItemsSelected}`),d=c.querySelector(`${Qe.selectors.elItemSelectedClone}`);l.innerHTML=o.innerHTML,n(a,0),n(o,0),n(r,0),n(i,1),n(l,1),n(c,1),c.querySelectorAll(`${Qe.selectors.elItemSelected}:not(.clone)`).forEach(e=>{e.remove()}),Ze.forEach(e=>{const t=d.cloneNode(!0);t.classList.remove("clone"),Object.entries(e).forEach(([e,s])=>{t.dataset[e]=s}),t.querySelector(".title-display").innerHTML=e.title,n(t,1),d.insertAdjacentElement("beforebegin",t)})};backToSelectItems=e=>{const{e:t,target:s}=e,o=s.closest(`${Qe.selectors.elBtnBackListItems}`);if(!o)return;const i=Ke.querySelector(`${Qe.selectors.elBtnCountItemsSelected}`),r=Ke.querySelector(".tabs"),a=Ke.querySelector(`${Qe.selectors.elListItemsWrap}`),l=Ke.querySelector(`${Qe.selectors.elHeaderCountItemSelected}`),c=Ke.querySelector(`${Qe.selectors.elListItemsSelected}`);n(i,1),n(a,1),n(r,1),n(o,0),n(l,0),n(c,0)};removeItemSelected=e=>{const{e:t,target:s}=e,o=s.closest(`${Qe.selectors.elItemSelected}`);if(!o)return;const n=o.dataset,i=Ze.findIndex(e=>e.id===n.id);-1!==i&&Ze.splice(i,1),o.remove(),this.watchItemsSelectedDataChange()};watchItemsSelectedDataChange=()=>{const e=Ke.querySelector(`${Qe.selectors.elBtnAddItemsSelected}`),t=Ke.querySelector(`${Qe.selectors.elBtnCountItemsSelected}`),s=t.querySelector("span"),o=Ke.querySelector(`${Qe.selectors.elHeaderCountItemSelected}`),n=Ke.querySelector(`${Qe.selectors.LPTarget}`);0!==Ze.length?(t.disabled=!1,e.disabled=!1,e.classList.add("active"),s.textContent=`(${Ze.length})`,o.innerHTML=t.innerHTML):(t.disabled=!0,e.disabled=!0,e.classList.remove("active"),s.textContent="",o.textContent=""),Ke.querySelector(`${Qe.selectors.elListItems}`).querySelectorAll('input[type="checkbox"]').forEach(e=>{const t=e.dataset,s=Ze.some(e=>e.id===t.id);e.checked=s});const i=window.lpAJAXG.getDataSetCurrent(n);i.args.item_selecting=Ze,window.lpAJAXG.setDataSetCurrent(n,i)};addItemsSelectedToSection=e=>{const{e:t,target:s,callBackHandle:o}=e;Ke&&(We().close(),"function"==typeof o&&(o(Ze),Ze=[]))}}const et=new Qe;class tt{static selectors={elPopupTemplate:"#lp-tmpl-select-courses-to-reset-progress",elFilterField:".lp-filter-field",elFormFilter:".lp-form-filter-reset-course-progress",elPopupItemsToSelect:".lp-popup-select-courses-to-reset-progress",elBtnResetAll:".lp-btn-reset-all-courses-progress"};constructor(){this.btnChooseCourses=null,this.elFormFilter=null,this.elPopupItemsToSelect=null,this.elBtnResetAll=null,this.elBtnAddItemsSelected=null,this.debouncedSearchUsers=c(e=>{this.fetchCourses(e)},800)}init(){this.events()}events(){tt._loadedEvents||(tt._loadedEvents=this,l("click",[{selector:Qe.selectors.elBtnShowPopupItemsToSelect,class:this,callBack:this.handleShowPopupItemsToSelect.name},{selector:Qe.selectors.elBtnAddItemsSelected,class:et,callBack:et.addItemsSelectedToSection.name,callBackHandle:this.addItemsSelectedToSection.bind(this),conditionBeforeCallBack:e=>!!e.target.closest(tt.selectors.elPopupItemsToSelect)},{selector:tt.selectors.elBtnResetAll,class:this,callBack:this.resetAllCoursesProgress.name}]),l("keyup",[{selector:tt.selectors.elFilterField,class:this,callBack:this.filterCourses.name}]))}handleShowPopupItemsToSelect(e){const{e:t,target:s}=e;this.btnChooseCourses=s.closest(".lp-btn-choose-courses-to-reset-progress"),this.btnChooseCourses&&(this.elPopupItemsToSelect=We().getPopup().querySelector(tt.selectors.elPopupItemsToSelect),this.elPopupItemsToSelect&&(this.elBtnAddItemsSelected=this.elPopupItemsToSelect.querySelector(Qe.selectors.elBtnAddItemsSelected),this.elBtnAddItemsSelected&&(this.elBtnResetAll=this.elPopupItemsToSelect.querySelector(tt.selectors.elBtnResetAll))))}addItemsSelectedToSection(e){if(!this.btnChooseCourses)return;const t=this.elBtnAddItemsSelected.dataset.messageConfirm;if(!t||!1===confirm(t))return;this.btnChooseCourses.textContent=this.btnChooseCourses.dataset.messageResetting,i(this.btnChooseCourses,1);const s=e.map(e=>parseInt(e.id,10)).filter(e=>!isNaN(e)&&e>0),o=this.elFormFilter?.querySelector(".lp-search-user"),n=o?.value||"";window.lpAJAXG.fetchAJAX({id_url:"course-reset-progress-tool",action:"reset_progress_courses",user_item_ids:s,search_user:n},{success:e=>{const{status:t,message:s}=e;Je(s,t)},error:e=>{Je(e.message,"error")},completed:()=>{this.btnChooseCourses.textContent=this.btnChooseCourses.dataset.messageChoose,i(this.btnChooseCourses,0)}})}resetAllCoursesProgress(e){const{e:t,target:s}=e,o=s.closest(tt.selectors.elPopupItemsToSelect);if(!o)return;const n=o.querySelector(tt.selectors.elFormFilter);if(!n)return;const a=this.elBtnResetAll.dataset.messageConfirm;if(!a||!1===confirm(a))return;i(this.btnChooseCourses,1),We().close();const l=r(n);window.lpAJAXG.fetchAJAX({id_url:"course-reset-progress-tool",action:"reset_progress_courses",reset_all:1,...l},{success:e=>{const{status:t,message:s}=e;Je(s,t)},error:e=>{Je(e.message,"error")},completed:()=>{this.btnChooseCourses.textContent=this.btnChooseCourses.dataset.messageChoose,i(this.btnChooseCourses,0)}})}fetchCourses(e){this.elFormFilter=e;const t=e.closest(tt.selectors.elPopupItemsToSelect).querySelector(".lp-target");let s=window.lpAJAXG.getDataSetCurrent(t);s.args=a(e,s.args),s.args.paged=1,window.lpAJAXG.setDataSetCurrent(t,s),window.lpAJAXG.showHideLoading(t,1),window.lpAJAXG.fetchAJAX(s,{success:e=>{const{data:s}=e;t.innerHTML=s.content||""},error:e=>{Je(e,"error")},completed:()=>{window.lpAJAXG.showHideLoading(t,0)}})}filterCourses(e){const{target:t}=e,s=t.closest(tt.selectors.elFilterField);if(!s)return;const o=s.closest(tt.selectors.elFormFilter);o&&this.debouncedSearchUsers(o)}}const st=new Qe({openButtonSelector:".lp-btn-choose-item-to-reset-progress"});class ot{static selectors={elPopupTemplate:"#lp-tmpl-select-items-to-reset-progress",elFilterField:".lp-filter-field",elFormFilter:".lp-form-filter-reset-item-progress",elPopupItemsToSelect:".lp-popup-select-items-to-reset-progress",elBtnResetAll:".lp-btn-reset-all-items-progress"};constructor(){this.btnChooseItems=null,this.elFormFilter=null,this.elPopupItemsToSelect=null,this.elBtnResetAll=null,this.elBtnAddItemsSelected=null,this.debouncedSearchItems=c(e=>{this.fetchItems(e)},800)}init(){this.events()}events(){ot._loadedEvents||(ot._loadedEvents=this,l("click",[{selector:Qe.selectors.elBtnShowPopupItemsToSelect,class:this,callBack:this.handleShowPopupItemsToSelect.name},{selector:Qe.selectors.elBtnAddItemsSelected,class:st,callBack:st.addItemsSelectedToSection.name,callBackHandle:this.addItemsSelectedToSection.bind(this),conditionBeforeCallBack:e=>!!e.target.closest(ot.selectors.elPopupItemsToSelect)},{selector:ot.selectors.elBtnResetAll,class:this,callBack:this.resetAllItemsProgress.name}]),l("keyup",[{selector:ot.selectors.elFilterField,class:this,callBack:this.filterItems.name}]),l("change",[{selector:ot.selectors.elFilterField,class:this,callBack:this.filterItems.name}]))}handleShowPopupItemsToSelect(e){const{e:t,target:s}=e;this.btnChooseItems=s.closest(".lp-btn-choose-item-to-reset-progress"),this.btnChooseItems&&(this.elPopupItemsToSelect=We().getPopup().querySelector(ot.selectors.elPopupItemsToSelect),this.elBtnAddItemsSelected=this.elPopupItemsToSelect.querySelector(Qe.selectors.elBtnAddItemsSelected),this.elBtnResetAll=this.elPopupItemsToSelect.querySelector(ot.selectors.elBtnResetAll))}addItemsSelectedToSection(e){if(!this.btnChooseItems)return;const t=this.elBtnAddItemsSelected.dataset.messageConfirm;if(!t||!1===confirm(t))return;this.btnChooseItems.textContent=this.btnChooseItems.dataset.messageResetting,i(this.btnChooseItems,1);const s=e.map(e=>parseInt(e.id,10)).filter(e=>!isNaN(e)&&e>0);window.lpAJAXG.fetchAJAX({id_url:"item-reset-progress-tool",action:"reset_progress_items_course",user_item_ids:s},{success:e=>{const{status:t,message:s}=e;Je(s,t)},error:e=>{Je(e.message,"error")},completed:()=>{this.btnChooseItems.textContent=this.btnChooseItems.dataset.messageChoose,i(this.btnChooseItems,0)}})}resetAllItemsProgress(e){const{e:t,target:s}=e,o=s.closest(ot.selectors.elPopupItemsToSelect);if(!o)return;const n=o.querySelector(ot.selectors.elFormFilter);if(!n)return;const a=this.elBtnResetAll.dataset.messageConfirm;if(!a||!1===confirm(a))return;i(this.btnChooseItems,1),We().close();const l=r(n);window.lpAJAXG.fetchAJAX({id_url:"item-reset-progress-tool",action:"reset_progress_items_course",reset_all:1,...l},{success:e=>{const{status:t,message:s}=e;Je(s,t)},error:e=>{Je(e.message,"error")},completed:()=>{this.btnChooseItems.textContent=this.btnChooseItems.dataset.messageChoose,i(this.btnChooseItems,0)}})}fetchItems(e){this.elFormFilter=e;const t=e.closest(ot.selectors.elPopupItemsToSelect).querySelector(".lp-target");let s=window.lpAJAXG.getDataSetCurrent(t);s.args=a(e,s.args),s.args.paged=1,window.lpAJAXG.setDataSetCurrent(t,s),window.lpAJAXG.showHideLoading(t,1),window.lpAJAXG.fetchAJAX(s,{success:e=>{const{data:s}=e;t.innerHTML=s.content||""},error:e=>{Je(e,"error")},completed:()=>{window.lpAJAXG.showHideLoading(t,0)}})}filterItems(e){const{target:t}=e,s=t.closest(ot.selectors.elFilterField);if(!s)return;const o=s.closest(ot.selectors.elFormFilter);o&&this.debouncedSearchItems(o)}}!function(){let e,t,s,n,i,r;const a=e=>{let t=[],s=[];"string"==typeof e.course_ids?t.push(e.course_ids):"object"==typeof e.course_ids&&(t=e.course_ids),"string"==typeof e.user_ids?s.push(e.user_ids):"object"==typeof e.user_ids&&(s=e.user_ids);const o=[];t.map((e,t)=>{const n={};n.course_id=e,s.map((e,t)=>{const s={...n,user_id:e};o.push(s)})});const n=o.slice(0,5),i=Math.ceil(o.length/5);return{packages:o,data:n,totalPage:i}},l=(t,s,n,a)=>{const c=Le.admin.apiAssignUserCourse,d={headers:{"Content-Type":"application/json","X-WP-Nonce":lpDataAdmin.nonce},method:"POST",body:JSON.stringify({data:s,page:n,totalPage:a})},u=e.querySelector(".percent"),p=e.querySelector(".lp-button-assign-course"),h=e.querySelector(".message");p.disabled=!0,o(c,d,{success:e=>{const{status:o,message:n}=e;if("success"===o){let o=parseInt(e.data.page);const n=5*o,i=n+5;s=t.slice(n,i),u.innerHTML=e.data.percent,l(t,s,++o,a)}else if("finished"===o){if(u.innerHTML="",h.style.color="green",h.innerHTML=n,setTimeout(()=>{h.innerHTML=""},2e3),p.disabled=!1,!i.tomselect||!r.tomselect)return;i.tomselect.clear(),r.tomselect.clear()}else"error"===o&&(p.disabled=!1,h.style.color="red",h.innerHTML=n,setTimeout(()=>{h.innerHTML=""},2e3))},error:e=>{p.disabled=!1,h.innerHTML=e.message},completed:()=>{}})},c=(e,i,r,a)=>{const l=Le.admin.apiUnAssignUserCourse,d={headers:{"Content-Type":"application/json","X-WP-Nonce":lpDataAdmin.nonce},method:"POST",body:JSON.stringify({data:i,page:r,totalPage:a})},u=t.querySelector(".percent"),p=t.querySelector(".lp-button-unassign-course"),h=t.querySelector(".message");p.disabled=!0,o(l,d,{success:t=>{const{status:o,message:r}=t;if("success"===o){let s=parseInt(t.data.page);const o=5*s,n=o+5;i=e.slice(o,n),u.innerHTML=t.data.percent,c(e,i,++s,a)}else if("finished"===o){if(u.innerHTML="",h.style.color="green",h.innerHTML=r,setTimeout(()=>{h.innerHTML=""},2e3),p.disabled=!1,!s.tomselect||!n.tomselect)return;s.tomselect.clear(),n.tomselect.clear()}else"error"===o&&(p.disabled=!1,h.style.color="red",h.innerHTML=r,setTimeout(()=>{h.innerHTML=""},2e3))},error:e=>{p.disabled=!1,h.innerHTML=e.message},completed:()=>{}})};document.addEventListener("DOMContentLoaded",()=>{e=document.querySelector("#lp-assign-user-course-form"),t=document.querySelector("#lp-unassign-user-course-form"),e&&(s=t.querySelector("[name=user_ids]"),n=t.querySelector("[name=course_ids]")),t&&(i=e.querySelector("[name=user_ids]"),r=e.querySelector("[name=course_ids]")),e&&document.querySelector("form")&&document.addEventListener("submit",e=>{const t=e.target,s=new FormData(e.target),o=Object.fromEntries(Array.from(s.keys(),e=>{const t=s.getAll(e);return[e,t.length>1?t:t.pop()]}));if("lp-assign-user-course-form"===t.id){if(e.preventDefault(),!confirm("Are you sure you want to Assign?"))return;const{packages:t,data:s,totalPage:n}=a(o);l(t,s,1,n)}else if("lp-unassign-user-course-form"===t.id){if(e.preventDefault(),!confirm("Are you sure you want to Unassign?"))return;const{packages:t,data:s,totalPage:n}=a(o);c(t,s,1,n)}})})}(),(new Ge).init(),(new tt).init(),(new ot).init()})()})();