@eox/itemfilter 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/eox-itemfilter.js
CHANGED
|
@@ -2899,7 +2899,7 @@ class oo extends ht {
|
|
|
2899
2899
|
// @ts-ignore
|
|
2900
2900
|
this._renderedTemplates[s]
|
|
2901
2901
|
);
|
|
2902
|
-
this.removeChild(c);
|
|
2902
|
+
this.contains(c) && this.removeChild(c);
|
|
2903
2903
|
}
|
|
2904
2904
|
const l = document.createElement("div");
|
|
2905
2905
|
return l.slot = s, l.dataset.generated = "template", this._renderTemplate(l, this.templates[e], o), this.appendChild(l), this._renderedTemplates[s] = { context: o, slot: l }, r;
|
|
@@ -3383,12 +3383,13 @@ let Pe = class extends oo {
|
|
|
3383
3383
|
}
|
|
3384
3384
|
aggregateResults(e, t) {
|
|
3385
3385
|
return e.filter((s) => {
|
|
3386
|
-
const r = s[this._config.aggregateResults]
|
|
3386
|
+
const r = s[this._config.aggregateResults];
|
|
3387
|
+
let o;
|
|
3388
|
+
return this._filters[this._config.aggregateResults] && (o = Object.keys(
|
|
3387
3389
|
// @ts-ignore
|
|
3388
3390
|
this._filters[this._config.aggregateResults]
|
|
3389
3391
|
// @ts-ignore
|
|
3390
|
-
).filter((c) => this._filters[this._config.aggregateResults].keys[c])
|
|
3391
|
-
return (o.length ? (
|
|
3392
|
+
).filter((c) => this._filters[this._config.aggregateResults].keys[c])), (o != null && o.length ? (
|
|
3392
3393
|
// @ts-ignore
|
|
3393
3394
|
o.includes(t)
|
|
3394
3395
|
) : !0) && Array.isArray(r) ? r.includes(t) : r === t;
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/class Yt extends er{constructor(e){if(super(e),this.et=Q,e.type!==Zi.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Q||e==null)return this.ft=void 0,this.et=e;if(e===We)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Yt.directiveName="unsafeHTML",Yt.resultType=1;const Vs=Qi(Yt);function Ne(r){return Array.isArray?Array.isArray(r):qs(r)==="[object Array]"}const tr=1/0;function sr(r){if(typeof r=="string")return r;let e=r+"";return e=="0"&&1/r==-tr?"-0":e}function ir(r){return r==null?"":sr(r)}function Te(r){return typeof r=="string"}function Ys(r){return typeof r=="number"}function rr(r){return r===!0||r===!1||nr(r)&&qs(r)=="[object Boolean]"}function Ks(r){return typeof r=="object"}function nr(r){return Ks(r)&&r!==null}function Ae(r){return r!=null}function Kt(r){return!r.trim().length}function qs(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}const ao="Extended search is not available",or="Incorrect 'index' type",lr=r=>`Invalid value for key ${r}`,ar=r=>`Pattern length exceeds max of ${r}.`,hr=r=>`Missing ${r} property in key`,cr=r=>`Property 'weight' in key '${r}' must be a positive integer`,Xs=Object.prototype.hasOwnProperty;class ur{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(s=>{let i=Js(s);t+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(s=>{s.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Js(r){let e=null,t=null,s=null,i=1,o=null;if(Te(r)||Ne(r))s=r,e=Gs(r),t=qt(r);else{if(!Xs.call(r,"name"))throw new Error(hr("name"));const a=r.name;if(s=a,Xs.call(r,"weight")&&(i=r.weight,i<=0))throw new Error(cr(a));e=Gs(a),t=qt(a),o=r.getFn}return{path:e,id:t,weight:i,src:s,getFn:o}}function Gs(r){return Ne(r)?r:r.split(".")}function qt(r){return Ne(r)?r.join("."):r}function dr(r,e){let t=[],s=!1;const i=(o,a,c)=>{if(Ae(o))if(!a[c])t.push(o);else{let u=a[c];const d=o[u];if(!Ae(d))return;if(c===a.length-1&&(Te(d)||Ys(d)||rr(d)))t.push(ir(d));else if(Ne(d)){s=!0;for(let v=0,m=d.length;v<m;v+=1)i(d[v],a,c+1)}else a.length&&i(d,a,c+1)}};return i(r,Te(e)?e.split("."):e,0),s?t:t[0]}var T={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(r,e)=>r.score===e.score?r.idx<e.idx?-1:1:r.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:dr,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const pr=/[^ ]+/g;function fr(r=1,e=3){const t=new Map,s=Math.pow(10,e);return{get(i){const o=i.match(pr).length;if(t.has(o))return t.get(o);const a=1/Math.pow(o,.5*r),c=parseFloat(Math.round(a*s)/s);return t.set(o,c),c},clear(){t.clear()}}}class Xt{constructor({getFn:e=T.getFn,fieldNormWeight:t=T.fieldNormWeight}={}){this.norm=fr(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,s)=>{this._keysMap[t.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Te(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();Te(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,s=this.size();t<s;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Ae(e)||Kt(e))return;let s={v:e,i:t,n:this.norm.get(e)};this.records.push(s)}_addObject(e,t){let s={i:t,$:{}};this.keys.forEach((i,o)=>{let a=i.getFn?i.getFn(e):this.getFn(e,i.path);if(Ae(a)){if(Ne(a)){let c=[];const u=[{nestedArrIndex:-1,value:a}];for(;u.length;){const{nestedArrIndex:d,value:v}=u.pop();if(Ae(v))if(Te(v)&&!Kt(v)){let m={v,i:d,n:this.norm.get(v)};c.push(m)}else Ne(v)&&v.forEach((m,$)=>{u.push({nestedArrIndex:$,value:m})})}s.$[o]=c}else if(Te(a)&&!Kt(a)){let c={v:a,n:this.norm.get(a)};s.$[o]=c}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function Zs(r,e,{getFn:t=T.getFn,fieldNormWeight:s=T.fieldNormWeight}={}){const i=new Xt({getFn:t,fieldNormWeight:s});return i.setKeys(r.map(Js)),i.setSources(e),i.create(),i}function gr(r,{getFn:e=T.getFn,fieldNormWeight:t=T.fieldNormWeight}={}){const{keys:s,records:i}=r,o=new Xt({getFn:e,fieldNormWeight:t});return o.setKeys(s),o.setIndexRecords(i),o}function _t(r,{errors:e=0,currentLocation:t=0,expectedLocation:s=0,distance:i=T.distance,ignoreLocation:o=T.ignoreLocation}={}){const a=e/r.length;if(o)return a;const c=Math.abs(s-t);return i?a+c/i:c?1:a}function mr(r=[],e=T.minMatchCharLength){let t=[],s=-1,i=-1,o=0;for(let a=r.length;o<a;o+=1){let c=r[o];c&&s===-1?s=o:!c&&s!==-1&&(i=o-1,i-s+1>=e&&t.push([s,i]),s=-1)}return r[o-1]&&o-s>=e&&t.push([s,o-1]),t}const Ye=32;function vr(r,e,t,{location:s=T.location,distance:i=T.distance,threshold:o=T.threshold,findAllMatches:a=T.findAllMatches,minMatchCharLength:c=T.minMatchCharLength,includeMatches:u=T.includeMatches,ignoreLocation:d=T.ignoreLocation}={}){if(e.length>Ye)throw new Error(ar(Ye));const v=e.length,m=r.length,$=Math.max(0,Math.min(s,m));let E=o,P=$;const G=c>1||u,ye=G?Array(m):[];let ae;for(;(ae=r.indexOf(e,P))>-1;){let X=_t(e,{currentLocation:ae,expectedLocation:$,distance:i,ignoreLocation:d});if(E=Math.min(X,E),P=ae+v,G){let re=0;for(;re<v;)ye[ae+re]=1,re+=1}}P=-1;let be=[],me=1,Se=v+m;const $e=1<<v-1;for(let X=0;X<v;X+=1){let re=0,z=Se;for(;re<z;)_t(e,{errors:X,currentLocation:$+z,expectedLocation:$,distance:i,ignoreLocation:d})<=E?re=z:Se=z,z=Math.floor((Se-re)/2+re);Se=z;let B=Math.max(1,$-z+1),De=a?m:Math.min($+z,m)+v,ke=Array(De+2);ke[De+1]=(1<<X)-1;for(let y=De;y>=B;y-=1){let b=y-1,k=t[r.charAt(b)];if(G&&(ye[b]=+!!k),ke[y]=(ke[y+1]<<1|1)&k,X&&(ke[y]|=(be[y+1]|be[y])<<1|1|be[y+1]),ke[y]&$e&&(me=_t(e,{errors:X,currentLocation:b,expectedLocation:$,distance:i,ignoreLocation:d}),me<=E)){if(E=me,P=b,P<=$)break;B=Math.max(1,2*$-P)}}if(_t(e,{errors:X+1,currentLocation:$,expectedLocation:$,distance:i,ignoreLocation:d})>E)break;be=ke}const U={isMatch:P>=0,score:Math.max(.001,me)};if(G){const X=mr(ye,c);X.length?u&&(U.indices=X):U.isMatch=!1}return U}function yr(r){let e={};for(let t=0,s=r.length;t<s;t+=1){const i=r.charAt(t);e[i]=(e[i]||0)|1<<s-t-1}return e}class Qs{constructor(e,{location:t=T.location,threshold:s=T.threshold,distance:i=T.distance,includeMatches:o=T.includeMatches,findAllMatches:a=T.findAllMatches,minMatchCharLength:c=T.minMatchCharLength,isCaseSensitive:u=T.isCaseSensitive,ignoreLocation:d=T.ignoreLocation}={}){if(this.options={location:t,threshold:s,distance:i,includeMatches:o,findAllMatches:a,minMatchCharLength:c,isCaseSensitive:u,ignoreLocation:d},this.pattern=u?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const v=($,E)=>{this.chunks.push({pattern:$,alphabet:yr($),startIndex:E})},m=this.pattern.length;if(m>Ye){let $=0;const E=m%Ye,P=m-E;for(;$<P;)v(this.pattern.substr($,Ye),$),$+=Ye;if(E){const G=m-Ye;v(this.pattern.substr(G),G)}}else v(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:s}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let P={isMatch:!0,score:0};return s&&(P.indices=[[0,e.length-1]]),P}const{location:i,distance:o,threshold:a,findAllMatches:c,minMatchCharLength:u,ignoreLocation:d}=this.options;let v=[],m=0,$=!1;this.chunks.forEach(({pattern:P,alphabet:G,startIndex:ye})=>{const{isMatch:ae,score:be,indices:me}=vr(e,P,G,{location:i+ye,distance:o,threshold:a,findAllMatches:c,minMatchCharLength:u,includeMatches:s,ignoreLocation:d});ae&&($=!0),m+=be,ae&&me&&(v=[...v,...me])});let E={isMatch:$,score:$?m/this.chunks.length:1};return $&&s&&(E.indices=v),E}}class He{constructor(e){this.pattern=e}static isMultiMatch(e){return ei(e,this.multiRegex)}static isSingleMatch(e){return ei(e,this.singleRegex)}search(){}}function ei(r,e){const t=r.match(e);return t?t[1]:null}class br extends He{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class $r extends He{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const s=e.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class _r extends He{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class xr extends He{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class wr extends He{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class Ar extends He{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class ti extends He{constructor(e,{location:t=T.location,threshold:s=T.threshold,distance:i=T.distance,includeMatches:o=T.includeMatches,findAllMatches:a=T.findAllMatches,minMatchCharLength:c=T.minMatchCharLength,isCaseSensitive:u=T.isCaseSensitive,ignoreLocation:d=T.ignoreLocation}={}){super(e),this._bitapSearch=new Qs(e,{location:t,threshold:s,distance:i,includeMatches:o,findAllMatches:a,minMatchCharLength:c,isCaseSensitive:u,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class si extends He{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,s;const i=[],o=this.pattern.length;for(;(s=e.indexOf(this.pattern,t))>-1;)t=s+o,i.push([s,t-1]);const a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}}}const Jt=[br,si,_r,xr,Ar,wr,$r,ti],ii=Jt.length,Er=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Mr="|";function Sr(r,e={}){return r.split(Mr).map(t=>{let s=t.trim().split(Er).filter(o=>o&&!!o.trim()),i=[];for(let o=0,a=s.length;o<a;o+=1){const c=s[o];let u=!1,d=-1;for(;!u&&++d<ii;){const v=Jt[d];let m=v.isMultiMatch(c);m&&(i.push(new v(m,e)),u=!0)}if(!u)for(d=-1;++d<ii;){const v=Jt[d];let m=v.isSingleMatch(c);if(m){i.push(new v(m,e));break}}}return i})}const kr=new Set([ti.type,si.type]);class Or{constructor(e,{isCaseSensitive:t=T.isCaseSensitive,includeMatches:s=T.includeMatches,minMatchCharLength:i=T.minMatchCharLength,ignoreLocation:o=T.ignoreLocation,findAllMatches:a=T.findAllMatches,location:c=T.location,threshold:u=T.threshold,distance:d=T.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:s,minMatchCharLength:i,findAllMatches:a,ignoreLocation:o,location:c,threshold:u,distance:d},this.pattern=t?e:e.toLowerCase(),this.query=Sr(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:i}=this.options;e=i?e:e.toLowerCase();let o=0,a=[],c=0;for(let u=0,d=t.length;u<d;u+=1){const v=t[u];a.length=0,o=0;for(let m=0,$=v.length;m<$;m+=1){const E=v[m],{isMatch:P,indices:G,score:ye}=E.search(e);if(P){if(o+=1,c+=ye,s){const ae=E.constructor.type;kr.has(ae)?a=[...a,...G]:a.push(G)}}else{c=0,o=0,a.length=0;break}}if(o){let m={isMatch:!0,score:c/o};return s&&(m.indices=a),m}}return{isMatch:!1,score:1}}}const Gt=[];function Cr(...r){Gt.push(...r)}function Zt(r,e){for(let t=0,s=Gt.length;t<s;t+=1){let i=Gt[t];if(i.condition(r,e))return new i(r,e)}return new Qs(r,e)}const xt={AND:"$and",OR:"$or"},Qt={PATH:"$path",PATTERN:"$val"},es=r=>!!(r[xt.AND]||r[xt.OR]),Lr=r=>!!r[Qt.PATH],Tr=r=>!Ne(r)&&Ks(r)&&!es(r),ri=r=>({[xt.AND]:Object.keys(r).map(e=>({[e]:r[e]}))});function ni(r,e,{auto:t=!0}={}){const s=i=>{let o=Object.keys(i);const a=Lr(i);if(!a&&o.length>1&&!es(i))return s(ri(i));if(Tr(i)){const u=a?i[Qt.PATH]:o[0],d=a?i[Qt.PATTERN]:i[u];if(!Te(d))throw new Error(lr(u));const v={keyId:qt(u),pattern:d};return t&&(v.searcher=Zt(d,e)),v}let c={children:[],operator:o[0]};return o.forEach(u=>{const d=i[u];Ne(d)&&d.forEach(v=>{c.children.push(s(v))})}),c};return es(r)||(r=ri(r)),s(r)}function Dr(r,{ignoreFieldNorm:e=T.ignoreFieldNorm}){r.forEach(t=>{let s=1;t.matches.forEach(({key:i,norm:o,score:a})=>{const c=i?i.weight:null;s*=Math.pow(a===0&&c?Number.EPSILON:a,(c||1)*(e?1:o))}),t.score=s})}function Rr(r,e){const t=r.matches;e.matches=[],Ae(t)&&t.forEach(s=>{if(!Ae(s.indices)||!s.indices.length)return;const{indices:i,value:o}=s;let a={indices:i,value:o};s.key&&(a.key=s.key.src),s.idx>-1&&(a.refIndex=s.idx),e.matches.push(a)})}function Pr(r,e){e.score=r.score}function Ir(r,e,{includeMatches:t=T.includeMatches,includeScore:s=T.includeScore}={}){const i=[];return t&&i.push(Rr),s&&i.push(Pr),r.map(o=>{const{idx:a}=o,c={item:e[a],refIndex:a};return i.length&&i.forEach(u=>{u(o,c)}),c})}class Qe{constructor(e,t={},s){this.options={...T,...t},this.options.useExtendedSearch,this._keyStore=new ur(this.options.keys),this.setCollection(e,s)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Xt))throw new Error(or);this._myIndex=t||Zs(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Ae(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let s=0,i=this._docs.length;s<i;s+=1){const o=this._docs[s];e(o,s)&&(this.removeAt(s),s-=1,i-=1,t.push(o))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:s,includeScore:i,shouldSort:o,sortFn:a,ignoreFieldNorm:c}=this.options;let u=Te(e)?Te(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Dr(u,{ignoreFieldNorm:c}),o&&u.sort(a),Ys(t)&&t>-1&&(u=u.slice(0,t)),Ir(u,this._docs,{includeMatches:s,includeScore:i})}_searchStringList(e){const t=Zt(e,this.options),{records:s}=this._myIndex,i=[];return s.forEach(({v:o,i:a,n:c})=>{if(!Ae(o))return;const{isMatch:u,score:d,indices:v}=t.searchIn(o);u&&i.push({item:o,idx:a,matches:[{score:d,value:o,norm:c,indices:v}]})}),i}_searchLogical(e){const t=ni(e,this.options),s=(c,u,d)=>{if(!c.children){const{keyId:m,searcher:$}=c,E=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(u,m),searcher:$});return E&&E.length?[{idx:d,item:u,matches:E}]:[]}const v=[];for(let m=0,$=c.children.length;m<$;m+=1){const E=c.children[m],P=s(E,u,d);if(P.length)v.push(...P);else if(c.operator===xt.AND)return[]}return v},i=this._myIndex.records,o={},a=[];return i.forEach(({$:c,i:u})=>{if(Ae(c)){let d=s(t,c,u);d.length&&(o[u]||(o[u]={idx:u,item:c,matches:[]},a.push(o[u])),d.forEach(({matches:v})=>{o[u].matches.push(...v)}))}}),a}_searchObjectList(e){const t=Zt(e,this.options),{keys:s,records:i}=this._myIndex,o=[];return i.forEach(({$:a,i:c})=>{if(!Ae(a))return;let u=[];s.forEach((d,v)=>{u.push(...this._findMatches({key:d,value:a[v],searcher:t}))}),u.length&&o.push({idx:c,item:a,matches:u})}),o}_findMatches({key:e,value:t,searcher:s}){if(!Ae(t))return[];let i=[];if(Ne(t))t.forEach(({v:o,i:a,n:c})=>{if(!Ae(o))return;const{isMatch:u,score:d,indices:v}=s.searchIn(o);u&&i.push({score:d,key:e,value:o,idx:a,norm:c,indices:v})});else{const{v:o,n:a}=t,{isMatch:c,score:u,indices:d}=s.searchIn(o);c&&i.push({score:u,key:e,value:o,norm:a,indices:d})}return i}}Qe.version="6.6.2",Qe.createIndex=Zs,Qe.parseIndex=gr,Qe.config=T,Qe.parseQuery=ni,Cr(Or);var dt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oi(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Nr="Expected a function",li=0/0,jr="[object Symbol]",Hr=/^\s+|\s+$/g,Fr=/^[-+]0x[0-9a-f]+$/i,Ur=/^0b[01]+$/i,Br=/^0o[0-7]+$/i,zr=parseInt,Wr=typeof dt=="object"&&dt&&dt.Object===Object&&dt,Vr=typeof self=="object"&&self&&self.Object===Object&&self,Yr=Wr||Vr||Function("return this")(),Kr=Object.prototype,qr=Kr.toString,Xr=Math.max,Jr=Math.min,ts=function(){return Yr.Date.now()};function Gr(r,e,t){var s,i,o,a,c,u,d=0,v=!1,m=!1,$=!0;if(typeof r!="function")throw new TypeError(Nr);e=ai(e)||0,ss(t)&&(v=!!t.leading,m="maxWait"in t,o=m?Xr(ai(t.maxWait)||0,e):o,$="trailing"in t?!!t.trailing:$);function E(U){var X=s,re=i;return s=i=void 0,d=U,a=r.apply(re,X),a}function P(U){return d=U,c=setTimeout(ae,e),v?E(U):a}function G(U){var X=U-u,re=U-d,z=e-X;return m?Jr(z,o-re):z}function ye(U){var X=U-u,re=U-d;return u===void 0||X>=e||X<0||m&&re>=o}function ae(){var U=ts();if(ye(U))return be(U);c=setTimeout(ae,G(U))}function be(U){return c=void 0,$&&s?E(U):(s=i=void 0,a)}function me(){c!==void 0&&clearTimeout(c),d=0,s=u=i=c=void 0}function Se(){return c===void 0?a:be(ts())}function $e(){var U=ts(),X=ye(U);if(s=arguments,i=this,u=U,X){if(c===void 0)return P(u);if(m)return c=setTimeout(ae,e),E(u)}return c===void 0&&(c=setTimeout(ae,e)),a}return $e.cancel=me,$e.flush=Se,$e}function ss(r){var e=typeof r;return!!r&&(e=="object"||e=="function")}function Zr(r){return!!r&&typeof r=="object"}function Qr(r){return typeof r=="symbol"||Zr(r)&&qr.call(r)==jr}function ai(r){if(typeof r=="number")return r;if(Qr(r))return li;if(ss(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=ss(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=r.replace(Hr,"");var t=Ur.test(r);return t||Br.test(r)?zr(r.slice(2),t?2:8):Fr.test(r)?li:+r}var en=Gr;const tn=oi(en);(()=>{var r=Object.defineProperty,e=Math.pow,t=(n,h,f)=>h in n?r(n,h,{enumerable:!0,configurable:!0,writable:!0,value:f}):n[h]=f,s=(n,h,f)=>(t(n,typeof h!="symbol"?h+"":h,f),f),i=(n,h)=>` ${h&&h.length>0?h.map(f=>`<link rel="stylesheet" href="${f}" />`).join(""):""} <style> ${n} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`,o=":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}",a="pointers-overlap",c="pointers-min-distance",u="pointers-max-distance",d="range-dragging",v="data",m="min",$="max",E="step",P="round",G="type",ye="theme",ae="rtl",be="btt",me="disabled",Se="keyboard-disabled",$e="mousewheel-disabled",U="slider-width",X="slider-height",re="slider-radius",z="slider-bg",B="slider-bg-hover",De="slider-bg-fill",ke="pointer-width",D="pointer-height",y="pointer-radius",b="pointer-bg",k="pointer-bg-hover",_="pointer-bg-focus",I="pointer-shadow",R="pointer-shadow-hover",V="pointer-shadow-focus",se="pointer-border",ee="pointer-border-hover",ce="pointer-border-focus",Oe="animate-onclick",Ce="css-links",de="vertical",Ee="horizontal",Re=(n,h,f,p,x)=>{let O=h-n;return O===0?f:(p-f)*(x-n)/O+f},te=n=>!isNaN(parseFloat(n))&&isFinite(n),K=(n,h)=>te(n)?Number(n):h,et=(n,h)=>h===0?0:Math.round(n/h)*h,tt=(n,h=1/0)=>{if(h===1/0)return n;let f=e(10,h);return Math.round(n*f)/f},pe=n=>n==null?!1:typeof n=="boolean"?n:n.trim().toLowerCase()==="true",cn=(n,h)=>{n.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:h}}))},un=(n,h)=>{n.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:h}}))},dn=(n,h)=>{n.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:h}}))},pn=(n,h)=>{n.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:h}}))},fn=(n,h)=>{if(!h||h.length<=0)return;let f=h.map(x=>te(x)?K(x,x):x),p={values:f||[]};p.value=f[0],p.value0=f[0],p.value1=f[0];for(let x=1;x<f.length;x++)p[`value${x+1}`]=f[x];n.dispatchEvent(new CustomEvent("change",{detail:p}))},is=(n,h,f)=>{let p=0,x,O,N,w,A=!1,j=(L,J,ue,he,ne,oe)=>{let _e=p;ue!==void 0&&L>ue&&(L=ue),J!==void 0&&L<J&&(L=J),p=L;let xe=p;return(he===de&&oe||he===Ee&&ne)&&(xe=100-xe),he===de?h.style.top=`${xe}%`:h.style.left=`${xe}%`,_e!==p},F=L=>L===h||h.contains(L),S=(L,J,ue,he)=>{x=L,O=J,N=ue,w=he},Y=L=>{A=L,h.classList.toggle("disabled",A),A?h.setAttribute("aria-disabled","true"):h.hasAttribute("aria-disabled")&&h.removeAttribute("aria-disabled")},Me=(L,J)=>{J==null?h.removeAttribute(L):h.setAttribute(L,J)},ve=L=>h.getAttribute(L),C=L=>{if(!A){switch(L.key){case"ArrowLeft":{L.preventDefault(),typeof x=="function"&&x(f);break}case"ArrowRight":{L.preventDefault(),typeof O=="function"&&O(f);break}case"ArrowUp":{L.preventDefault(),typeof N=="function"&&N(f);break}case"ArrowDown":{L.preventDefault(),typeof w=="function"&&w(f);break}}pn(n,L)}},H=()=>{A||cn(n,h)};return h.className=`pointer pointer-${f}`,h.addEventListener("keydown",C),h.addEventListener("click",H),{$pointer:h,get percent(){return p},get disabled(){return A},set disabled(L){Y(L)},updatePosition:j,isClicked:F,setCallbacks:S,setAttr:Me,getAttr:ve,destroy:()=>{h.removeEventListener("keydown",C),h.removeEventListener("click",H),h.remove()}}},gn=n=>{if(n==null)return;if(Array.isArray(n))return n;if(n.trim()==="")return;let h=n.split(","),f=[],p=!0;for(let x=0;x<h.length;x++){let O=h[x].trim();O!==""&&(f.push(O),te(O)||(p=!1))}return p?f.map(x=>Number(x)):f},mn=(n,h)=>h?h.findIndex(f=>f===n||f.toString().trim()===n.toString().trim()):-1,vn=n=>({updatePosition:(h,f,p,x)=>{if(f.length<=0)return;let O=f.length===1,N=f[0],w=f[f.length-1];h===de?(n.style.removeProperty("width"),n.style.removeProperty("right"),n.style.removeProperty("left"),O?n.style.height=`${N}%`:n.style.height=`${Math.abs(N-w)}%`,x?(n.style.bottom="0%",O?n.style.top="auto":n.style.top=`${Math.min(100-w,100-N)}%`):(n.style.bottom="auto",O?n.style.top="0%":n.style.top=`${Math.min(N,w)}%`)):(n.style.removeProperty("height"),n.style.removeProperty("top"),n.style.removeProperty("bottom"),O?n.style.width=`${N}%`:n.style.width=`${Math.abs(N-w)}%`,p?(n.style.right="0%",O?n.style.left="auto":n.style.left=`${Math.min(100-w,100-N)}%`):(n.style.right="auto",O?n.style.left="0%":n.style.left=`${Math.min(N,w)}%`))}}),ui="--animate-onclick",yn="--width",bn="--height",$n="--panel-bg-border-radius",_n="--panel-bg",xn="--panel-bg-hover",wn="--panel-bg-fill",An="--pointer-width",En="--pointer-height",Mn="--pointer-border-radius",Sn="--pointer-bg",kn="--pointer-bg-hover",On="--pointer-bg-focus",Cn="--pointer-shadow",Ln="--pointer-shadow-hover",Tn="--pointer-shadow-focus",Dn="--pointer-border",Rn="--pointer-border-hover",Pn="--pointer-border-focus",At=(n,h,f)=>{let p=new Map;for(let x of n.attributes){let O=x.nodeName.trim().toLowerCase();if(!h.test(O))continue;let N=O.replace(/\D/g,"").trim(),w=N===""||N==="0"||N==="1"?0:K(N,0)-1,A=f&&typeof f=="function"?f(x.value):x.value;p.set(w,A)}return p},In=n=>{if(!n)return null;let h=n.getAttribute(Ce);if(!h)return null;let f=h.split(";"),p=[];for(let x of f)x.trim()!==""&&p.push(x.trim());return p},di=[[yn,U,"sliderWidth",null],[bn,X,"sliderHeight",null],[$n,re,"sliderRadius",null],[_n,z,"sliderBg",null],[xn,B,"sliderBgHover",null],[wn,De,"sliderBgFill",null],[An,ke,"pointer#Width",/^pointer([0-9]*)-width$/],[En,D,"pointer#Height",/^pointer([0-9]*)-height$/],[Mn,y,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Sn,b,"pointer#Bg",/^pointer([0-9]*)-bg$/],[kn,k,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[On,_,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[Cn,I,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[Ln,R,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[Tn,V,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Dn,se,"pointer#Border",/^pointer([0-9]*)-border$/],[Rn,ee,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[Pn,ce,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],Nn=(n,h,f)=>{let p=null,x=[],O=new Map,N=(C,H=h)=>{let L=[...H.classList];for(let J of L)J.startsWith(C)&&h.classList.remove(J)},w=()=>{N("shape");let C=h.querySelectorAll(".pointer");for(let H of C)N("shape",H)},A=C=>{p=C,N("theme-"),typeof C=="string"&&h.classList.add(`theme-${C}`)},j=()=>{if(w(),!(x.length<=0)){h.classList.add("shape",`shape-${x[0]}`);for(let C=1;C<x.length;C++){let H=x[C];if(!H)continue;let L=h.querySelector(`.pointer-${C}`);!L||L.classList.add("shape",`shape-${H}`)}}},F=(C,H)=>{x[C]=H,j()},S=()=>{w();let C=At(n,/^pointer([0-9]*)-shape$/);if(!(C.size<=0)){for(let H of C){let L=H[0];x[L]=H[1]}j()}},Y=(C,H)=>`${C}-${H}`,Me=(C,H,L)=>{let J=f[L];if(!J)return;let ue=L===0?h:J.$pointer;if(H==null){O.has(Y(C,L))&&O.delete(Y(C,L)),ue.style.removeProperty(C);return}O.set(Y(C,L),H),ue.style.setProperty(C,H)},ve=(C,H)=>O.get(Y(C,H));return(()=>{for(let C of di){let[H,L,J,ue]=C;if(ue){let ne=At(n,ue);for(let oe of ne){let _e=oe[0],xe=oe[1];Me(H,xe,_e)}}else{let ne=n.getAttribute(L);Me(H,ne,0)}let he=[];if(J.indexOf("#")===-1)he.push([J,0]);else{he.push([J.replace("#",""),0]),he.push([J.replace("#","0"),0]),he.push([J.replace("#","1"),0]);for(let ne=1;ne<f.length;ne++)he.push([J.replace("#",(ne+1).toString()),ne])}for(let ne of he)try{let oe=ne[0],_e=ne[1];Object.prototype.hasOwnProperty.call(n,oe)||Object.defineProperty(n,oe,{get(){return ve(H,_e)},set:xe=>{Me(H,xe,_e)}})}catch(oe){console.error(oe)}}A(n.getAttribute(ye)),S()})(),{setStyle:Me,getStyle:ve,get theme(){return p},set theme(C){A(C)},get pointerShapes(){return x},setPointerShape:F}},st="animate-on-click",pi="range-dragging",jn=(n,h,f,p)=>{let x=[],O=F=>{for(let S of x)S.update&&typeof S.update=="function"&&S.update(F)},N=()=>{for(let F of x)F.destroy&&typeof F.destroy=="function"&&F.destroy()},w=(F,S)=>{for(let Y of x)Y.onAttrChange&&typeof Y.onAttrChange=="function"&&Y.onAttrChange(F,S)},A=F=>{if(F.gettersAndSetters){for(let S of F.gettersAndSetters)if(!(!S.name||!S.attributes))try{Object.prototype.hasOwnProperty.call(n,S.name)||Object.defineProperty(n,S.name,S.attributes)}catch(Y){console.error("defineSettersGetters error:",Y)}}},j=F=>{var S;if(!F.css)return;let Y=(S=n.shadowRoot)==null?void 0:S.querySelector("style");!Y||(Y.innerHTML+=F.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let F of window.tcRangeSliderPlugins){let S=F();x.push(S),S.init&&typeof S.init=="function"&&(S.init(n,h,f,p),A(S),j(S))}},update:O,onAttrChange:w,destroy:N}},Hn=10,Fn=(n,h)=>{let f=new Map,p=/^value([0-9]*)$/;for(let w of n.attributes){let A=w.nodeName.trim().toLowerCase();if(!p.test(A))continue;let j=A.replace("value","").trim(),F=j===""||j==="0"||j==="1"?0:K(j,0)-1,S=te(w.value)?K(w.value,0):w.value;f.set(F,S)}let x=Math.max(...Array.from(f.keys())),O=[];O.push([is(n,h,0),f.get(0)]);let N=h;for(let w=1;w<=x;w++){let A=h.cloneNode(!0);N.after(A),N=A,O.push([is(n,A,w),f.get(w)])}return O},fi=(n,h,f,p,x,O,N)=>{try{Object.defineProperty(n,p,{configurable:!0,get(){if(!h)return;let w=h.pointers[f];if(!w)return;let A=h.getTextValue(w.percent);return te(A)?K(A,A):A},set:w=>{h.pointers[f]?h==null||h.setValue(w,f):h==null||h.addPointer(w)}}),Object.defineProperty(n,x,{configurable:!0,get(){var w,A;return(A=(w=h==null?void 0:h.pointers[f])==null?void 0:w.getAttr("aria-label"))!=null?A:void 0},set:w=>{!h||h.setAriaLabel(f,w)}}),Object.defineProperty(n,O,{configurable:!0,get(){var w,A;return(A=(w=h==null?void 0:h.styles)==null?void 0:w.pointerShapes[f])!=null?A:null},set:w=>{!h||!h.styles||h.styles.setPointerShape(f,w)}}),Object.defineProperty(n,N,{configurable:!0,get(){var w;return(w=h==null?void 0:h.pointers[f].disabled)!=null?w:!1},set:w=>{if(!h)return;let A=h==null?void 0:h.pointers[f];!A||(A.disabled=w)}})}catch(w){console.error(w)}},Un=(n,h)=>{let f=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let p=2;p<Hn;p++)f.push([`value${p}`,`ariaLabel${p}`,`pointer${p}Shape`,`pointer${p}Disabled`,p-1]);for(let p of f)fi(n,h,p[4],p[0],p[1],p[2],p[3])},gi=(n,h,f)=>{var p;let x=(p=f.shadowRoot)==null?void 0:p.querySelector(".container");if(x)for(let O of n)h?x.prepend(O.$pointer):x.append(O.$pointer)},rs=0,pt=100,it=2,mi="0.3s",Bn=(n,h,f)=>{let p=f.map(l=>l[0]),x=null,O=null,N=null,w=null,A=rs,j=pt,F,S,Y=Ee,Me=it,ve=!1,C=!1,H=!1,L=0,J=1/0,ue=!1,he,ne,oe=!1,_e=!1,xe=!1,Ue=mi,vi=[],yi=l=>{oe||(l.preventDefault&&l.preventDefault(),Ke(l),window.addEventListener("mousemove",Ke),window.addEventListener("mouseup",Et),un(n,l))},Et=l=>{oe||(he=void 0,ne=void 0,window.removeEventListener("mousemove",Ke),window.removeEventListener("mouseup",Et),Ue&&h.classList.add(st),dn(n,l))},Vn=(l,g)=>{if(p.length<=0)return;if(p.length===1)return p[0].isClicked(l)&&Ue&&h.classList.remove(st),p[0];let M=Kn(l);if(ue){let W=g,Le=St(W);Le!==void 0&&(W=et(W,Le)),M?(he=W,ne=0,Ue&&h.classList.remove(st)):he!==void 0&&(ne=W-he,he=W)}if(!Yn(l)&&!M){for(let W of p)if(!(!W.isClicked(l)||W.disabled))return Ue&&h.classList.remove(st),W;for(let W of p)if(x===W)return W}let q=1/0,le=null;for(let W of p){if(W.disabled)continue;let Le=Math.abs(g-W.percent);Le<q&&(q=Le,le=W)}return le},bi=()=>p.findIndex(l=>x===l&&!l.disabled),Ke=l=>{let g;if(Y===de){let{height:q,top:le}=h.getBoundingClientRect(),W=l.type.indexOf("mouse")!==-1?l.clientY:l.touches[0].clientY;g=Math.min(Math.max(0,W-le),q)*100/q}else{let{width:q,left:le}=h.getBoundingClientRect(),W=l.type.indexOf("mouse")!==-1?l.clientX:l.touches[0].clientX;g=Math.min(Math.max(0,W-le),q)*100/q}if((ve||C)&&(g=100-g),x=Vn(l.target,g),ue&&p.length>1&&ne!==void 0){let q=p[0],le=p[p.length-1],W=q.percent+ne<0,Le=le.percent+ne>100;if(W||Le)return;for(let Pt=0;Pt<p.length;Pt++)we(Pt,p[Pt].percent+ne);return}let M=bi();M!==-1&&(we(M,g),x==null||x.$pointer.focus())},Mt=l=>{if(oe||document.activeElement!==n||x!=null&&x.disabled)return;l.stopPropagation(),l.preventDefault();let g=l.deltaY<0,M=ve||C,q=g?!M:M,le=bi();le!==-1&&(q?ft(le,p[le].percent):gt(le,p[le].percent))},$i=l=>{oe||_e||(Y===de?C?we(l,100):we(l,0):ve?gt(l,p[l].percent):ft(l,p[l].percent))},_i=l=>{oe||_e||(Y===de?C?we(l,0):we(l,100):ve?ft(l,p[l].percent):gt(l,p[l].percent))},xi=l=>{oe||_e||(Y===de?C?gt(l,p[l].percent):ft(l,p[l].percent):ve?we(l,100):we(l,0))},wi=l=>{oe||_e||(Y===de?C?ft(l,p[l].percent):gt(l,p[l].percent):ve?we(l,0):we(l,100))},Yn=l=>l.classList.contains("panel"),Kn=l=>l.classList.contains("panel-fill"),ft=(l,g)=>{if(g===void 0)return;let M=St(g);M==null&&(M=1),g-=M,g<0&&(g=0),we(l,g)},gt=(l,g)=>{if(g===void 0)return;let M=St(g);M==null&&(M=1),g+=M,g>100&&(g=100),we(l,g)},qe=()=>{!w||w.update({percents:Ai(),values:Ei(),$pointers:Mi(),min:Si(),max:ki(),data:ls(),step:os(),round:hs(),type:as(),textMin:kt(),textMax:Ot(),rightToLeft:ds(),bottomToTop:ps(),pointersOverlap:vs(),pointersMinDistance:cs(),pointersMaxDistance:us(),rangeDragging:ys(),disabled:fs(),keyboardDisabled:gs(),mousewheelDisabled:ms()})},qn=()=>{qe()},Xn=l=>{if(!(H||p.length<=1||j===A))if(l===0){let g=J*100/(j-A);return Math.max(0,p[l+1].percent-g)}else{let g=L*100/(j-A);return Math.min(p[l-1].percent+g,100)}},Jn=l=>{if(!(H||p.length<=1||j===A))if(l===p.length-1){let g=J*100/(j-A);return Math.min(p[l-1].percent+g,100)}else{let g=L*100/(j-A);return Math.max(0,p[l+1].percent-g)}},St=l=>{let g;if(typeof F=="function"){let M=Re(0,100,A,j,l);g=F(M,l)}else g=F;if(te(g)){let M=j-A;return g=M===0?0:g*100/M,g}},rt=l=>{if(l===void 0)return;let g=Re(0,100,A,j,l);return S!==void 0?S[Math.round(g)]:tt(g,Me)},kt=()=>S!==void 0?S[A]:A,Ot=()=>S!==void 0?S[j]:j,os=()=>F,Gn=l=>{var g;return l<=0||H?kt():(g=rt(p[l-1].percent))!=null?g:""},Zn=l=>{var g;return p.length<=1||l>=p.length-1||H?Ot():(g=rt(p[l+1].percent))!=null?g:""},Ai=()=>p.map(l=>l.percent),Ei=()=>p.map(l=>rt(l.percent)),Mi=()=>p.map(l=>l.$pointer),Si=()=>A,ki=()=>j,ls=()=>S,as=()=>Y,hs=()=>Me,cs=()=>L,us=()=>J,Qn=l=>vi[l],ds=()=>ve,ps=()=>C,fs=()=>oe,gs=()=>_e,ms=()=>xe,vs=()=>H,ys=()=>ue,we=(l,g)=>{if(g===void 0)return;let M=St(g);M!==void 0&&(g=et(g,M));let q=p[l];if(!q)return;let le=q.updatePosition(g,Xn(l),Jn(l),Y,ve,C);O==null||O.updatePosition(Y,p.map(W=>W.percent),ve,C),qe();for(let W of p){let Le=rt(W.percent);Le!==void 0&&(W.setAttr("aria-valuenow",Le.toString()),W.setAttr("aria-valuetext",Le.toString()))}to(),le&&fn(n,p.map(W=>rt(W.percent)))},Pe=()=>{for(let l=0;l<p.length;l++)we(l,p[l].percent)},eo=(l,g)=>{A=S!==void 0?0:K(l,rs),j=S!==void 0?S.length-1:K(g,pt),Ct(A),Lt(j)},to=()=>{var l,g;for(let M=0;M<p.length;M++){let q=p[M];q.setAttr("aria-valuemin",((l=Gn(M))!=null?l:"").toString()),q.setAttr("aria-valuemax",((g=Zn(M))!=null?g:"").toString())}},Ct=l=>{A=K(l,rs),A>j&&(j=A+pt),Pe()},Lt=l=>{j=K(l,pt),j<A&&(j=A+pt),Pe()},Oi=l=>{H=!0;for(let g=0;g<l.length;g++)Tt(l[g],g);H=!1;for(let g=0;g<l.length;g++)Tt(l[g],g)},Tt=(l,g)=>{let M;S!==void 0?(M=l==null?0:mn(l,S),M===-1&&(M=0)):(M=K(l,A),M<A&&(M=A),M>j&&(M=j));let q=Re(A,j,0,100,M);we(g,q)},Dt=l=>{if(l==null){F=void 0;return}if(typeof l=="function"){F=l,Pe();return}if(te(l)){F=K(l,1);let g=Math.abs(j-A);F>g&&(F=void 0),Pe();return}F=void 0},bs=l=>{H=l,Pe()},$s=l=>{(!te(l)||l<0)&&(l=0),L=l},_s=l=>{(!te(l)||l<0)&&(l=1/0),J=l},xs=l=>{oe=l,h.classList.toggle("disabled",oe),oe?h.setAttribute("aria-disabled","true"):h.hasAttribute("aria-disabled")&&h.removeAttribute("aria-disabled")},Ci=l=>{_e=l},Li=l=>{xe=l,xe?document.removeEventListener("wheel",Mt):document.addEventListener("wheel",Mt,{passive:!1})},ws=l=>{if(l==null){S=void 0;return}if(S=gn(l),S===void 0||S.length<=0){S=void 0;return}Ct(0),Lt(S.length-1),F===void 0&&Dt(1)},As=l=>{var g;typeof l=="string"?Y=l.trim().toLowerCase()===de?de:Ee:Y=Ee;let M=(g=n.shadowRoot)==null?void 0:g.querySelector(".range-slider-box");if(!M)return;M.className=`range-slider-box type-${Y}`,Pe();let q=Y===de?"vertical":"horizontal";for(let le of p)le.setAttr("aria-orientation",q)},Es=l=>{ve=l,p.length>1&&gi(p,ve,n),Pe(),qe()},Ms=l=>{C=l,p.length>1&&gi(p,C,n),Pe(),qe()},Ss=l=>{Me=K(l,it),Me<0&&(Me=it),qe()},Ti=l=>{l==null||l.toString().trim().toLowerCase()==="false"?(Ue=void 0,h.style.removeProperty(ui),h.classList.remove(st)):(Ue=l.toString(),h.style.setProperty(ui,Ue),h.classList.add(st))},Di=(l,g)=>{let M=p[l];!M||(M.setAttr("aria-label",g),vi[l]=g)},Rt=l=>{if(he=void 0,p.length<=1){ue=!1,h.classList.remove(pi);return}ue=l,h.classList.toggle(pi,ue)},so=()=>{xs(pe(n.getAttribute(me))),_e=pe(n.getAttribute(Se)),xe=pe(n.getAttribute($e));let l=At(n,/^pointer([0-9]*)-disabled$/,g=>pe(g));for(let g of l){let M=g[0];!p[M]||(p[M].disabled=g[1])}},io=()=>{let l=At(n,/^aria-label([0-9]*)$/);for(let g of l){let M=g[0];Di(M,g[1])}},ro=l=>{let g=p.length,M=p[g-1].$pointer,q=M.cloneNode(!0);M.after(q);let le=is(n,q,g);return le.setCallbacks($i,_i,xi,wi),p.push(le),Tt(l,g),Pe(),qe(),g},no=()=>{let l=p.length,g=p[l-1];return g?(g.destroy(),p.pop(),p.length<=1&&Rt(!1),Pe(),qe(),l-1):-1};return(()=>{var l,g;for(let q of p)q.setCallbacks($i,_i,xi,wi);let M=(l=n.shadowRoot)==null?void 0:l.querySelector(".panel-fill");M&&(O=vn(M)),As(n.getAttribute(G)),Es(pe(n.getAttribute(ae))),Ms(pe(n.getAttribute(be))),eo(n.getAttribute(m),n.getAttribute($)),Dt(n.getAttribute(E)),ws(n.getAttribute(v)),Oi(f.map(q=>q[1])),bs(pe(n.getAttribute(a))),$s(K(n.getAttribute(c),0)),_s(K(n.getAttribute(u),1/0)),Rt(pe(n.getAttribute(d))),Ss(K(n.getAttribute(P),it)),so(),io(),N=Nn(n,h,p),Ti((g=n.getAttribute(Oe))!=null?g:mi),h.addEventListener("mousedown",yi),h.addEventListener("mouseup",Et),h.addEventListener("touchmove",Ke),h.addEventListener("touchstart",Ke),xe||document.addEventListener("wheel",Mt,{passive:!1}),w=jn(n,qn,{setValues:Oi,setMin:Ct,setMax:Lt,setStep:Dt,setPointersOverlap:bs,setPointersMinDistance:$s,setPointersMaxDistance:_s,setDisabled:xs,setType:As,setRightToLeft:Es,setBottomToTop:Ms,setRound:Ss,setKeyboardDisabled:Ci,setMousewheelDisabled:Li,setRangeDragging:Rt,setData:ws},{getPercents:Ai,getValues:Ei,getPointerElements:Mi,getMin:Si,getMax:ki,getStep:os,getData:ls,getType:as,getRound:hs,getTextMin:kt,getTextMax:Ot,isRightToLeft:ds,isBottomToTop:ps,isDisabled:fs,isKeyboardDisabled:gs,isMousewheelDisabled:ms,isPointersOverlap:vs,isRangeDraggingEnabled:ys,getPointersMinDistance:cs,getPointersMaxDistance:us}),w.init()})(),{get pointers(){return p},get styles(){return N},get pluginsManager(){return w},get min(){return kt()},get max(){return Ot()},get step(){return os()},get pointersOverlap(){return vs()},set pointersOverlap(l){bs(l)},get pointersMinDistance(){return cs()},set pointersMinDistance(l){$s(l)},get pointersMaxDistance(){return us()},set pointersMaxDistance(l){_s(l)},get disabled(){return fs()},set disabled(l){xs(l)},get data(){return ls()},get type(){return as()},set type(l){As(l)},get rightToLeft(){return ds()},set rightToLeft(l){Es(l)},get bottomToTop(){return ps()},set bottomToTop(l){Ms(l)},get round(){return hs()},set round(l){Ss(l)},get animateOnClick(){return Ue},set animateOnClick(l){Ti(l)},get keyboardDisabled(){return gs()},set keyboardDisabled(l){Ci(l)},get mousewheelDisabled(){return ms()},set mousewheelDisabled(l){Li(l)},get rangeDragging(){return ys()},set rangeDragging(l){Rt(l)},setMin:Ct,setMax:Lt,setValue:Tt,setStep:Dt,setData:ws,getTextValue:rt,setAriaLabel:Di,getAriaLabel:Qn,addPointer:ro,removePointer:no,destroy:()=>{h.removeEventListener("mousedown",yi),h.removeEventListener("mouseup",Et),h.removeEventListener("touchmove",Ke),h.removeEventListener("touchstart",Ke),document.removeEventListener("wheel",Mt);for(let l of p)l.destroy();w==null||w.destroy()}}},zn=(n,h,f)=>{let p=di.find(([w,A,j,F])=>A.replace("#","")===h.replace(/\d+/g,""));if(p&&n.styles){let[w,A,j,F]=p,S=h.replace(/\D/g,"").trim(),Y=S===""||S==="0"||S==="1"?0:K(S,0)-1;n.styles.setStyle(w,f,Y);return}switch(n&&n.pluginsManager&&n.pluginsManager.onAttrChange(h,f),h){case m:{n.setMin(f);break}case $:{n.setMax(f);break}case E:{n.setStep(f);break}case a:{n.pointersOverlap=pe(f);break}case c:{n.pointersMinDistance=K(f,0);break}case d:{n.rangeDragging=pe(f);break}case u:{n.pointersMaxDistance=K(f,1/0);break}case me:{n.disabled=pe(f);break}case Se:{n.keyboardDisabled=pe(f);break}case $e:{n.mousewheelDisabled=pe(f);break}case v:{n.setData(f);break}case G:{n.type=f;break}case ae:{n.rightToLeft=pe(f);break}case be:{n.bottomToTop=pe(f);break}case P:{n.round=K(f,it);break}case ye:{n.styles&&(n.styles.theme=f);break}case Oe:{n.animateOnClick=f;break}}let x=null;if(/^value([0-9]*)$/.test(h)&&(x="value"),/^pointer([0-9]*)-disabled$/.test(h)&&(x="pointer-disabled"),/^aria-label([0-9]*)$/.test(h)&&(x="aria-label"),/^pointer([0-9]*)-shape$/.test(h)&&(x="pointer-shape"),!x)return;let O=h.replace(/\D/g,"").trim(),N=O===""||O==="0"||O==="1"?0:K(O,0)-1;switch(x){case"value":{n.setValue(f,N);break}case"pointer-disabled":{let w=n==null?void 0:n.pointers[N];if(!w)return;w.disabled=pe(f);break}case"aria-label":{n.setAriaLabel(N,f);break}case"pointer-shape":{n.styles&&n.styles.setPointerShape(N,f);break}}},Wn=class extends HTMLElement{constructor(){super(),s(this,"slider"),s(this,"_externalCSSList",[]),s(this,"_observer",null),this.attachShadow({mode:"open"})}set step(n){this.slider&&this.slider.setStep(n)}get step(){var n;return(n=this.slider)==null?void 0:n.step}set disabled(n){this.slider&&(this.slider.disabled=n)}get disabled(){var n,h;return(h=(n=this.slider)==null?void 0:n.disabled)!=null?h:!1}set data(n){var h;(h=this.slider)==null||h.setData(n)}get data(){var n;return(n=this.slider)==null?void 0:n.data}set min(n){var h;(h=this.slider)==null||h.setMin(n)}get min(){var n;return(n=this.slider)==null?void 0:n.min}set max(n){var h;(h=this.slider)==null||h.setMax(n)}get max(){var n;return(n=this.slider)==null?void 0:n.max}set round(n){!this.slider||(this.slider.round=n)}get round(){var n,h;return(h=(n=this.slider)==null?void 0:n.round)!=null?h:it}set type(n){!this.slider||(this.slider.type=n??Ee)}get type(){var n;return((n=this.slider)==null?void 0:n.type)||Ee}set pointersOverlap(n){!this.slider||(this.slider.pointersOverlap=n)}get pointersOverlap(){var n,h;return(h=(n=this.slider)==null?void 0:n.pointersOverlap)!=null?h:!1}set pointersMinDistance(n){!this.slider||(this.slider.pointersMinDistance=n)}get pointersMinDistance(){var n,h;return(h=(n=this.slider)==null?void 0:n.pointersMinDistance)!=null?h:0}set pointersMaxDistance(n){!this.slider||(this.slider.pointersMaxDistance=n)}get pointersMaxDistance(){var n,h;return(h=(n=this.slider)==null?void 0:n.pointersMaxDistance)!=null?h:1/0}set theme(n){!this.slider||!this.slider.styles||(this.slider.styles.theme=n)}get theme(){var n,h,f;return(f=(h=(n=this.slider)==null?void 0:n.styles)==null?void 0:h.theme)!=null?f:null}set rtl(n){!this.slider||(this.slider.rightToLeft=n)}get rtl(){var n,h;return(h=(n=this.slider)==null?void 0:n.rightToLeft)!=null?h:!1}set btt(n){!this.slider||(this.slider.bottomToTop=n)}get btt(){var n,h;return(h=(n=this.slider)==null?void 0:n.bottomToTop)!=null?h:!1}set keyboardDisabled(n){!this.slider||(this.slider.keyboardDisabled=n)}get keyboardDisabled(){var n,h;return(h=(n=this.slider)==null?void 0:n.keyboardDisabled)!=null?h:!1}set mousewheelDisabled(n){!this.slider||(this.slider.mousewheelDisabled=n)}get mousewheelDisabled(){var n,h;return(h=(n=this.slider)==null?void 0:n.mousewheelDisabled)!=null?h:!1}set animateOnClick(n){!this.slider||(this.slider.animateOnClick=n)}get animateOnClick(){var n;return(n=this.slider)==null?void 0:n.animateOnClick}get rangeDragging(){var n,h;return(h=(n=this.slider)==null?void 0:n.rangeDragging)!=null?h:!1}set rangeDragging(n){this.slider&&(this.slider.rangeDragging=pe(n))}get externalCSSList(){return this._externalCSSList}addPointer(n){var h;if(!this.slider)return;let f=(h=this.slider)==null?void 0:h.addPointer(n);fi(this,this.slider,f,`value${f+1}`,`ariaLabel${f+1}`,`pointerShape${f+1}`,`pointer${f+1}Disabled`)}removePointer(){var n;!this.slider||(n=this.slider)==null||n.removePointer()}addCSS(n){if(!this.shadowRoot)return;let h=document.createElement("style");h.textContent=n,this.shadowRoot.appendChild(h)}connectedCallback(){var n,h;if(!this.shadowRoot)return;this._externalCSSList=In(this),this.shadowRoot.innerHTML=i(o,this._externalCSSList);let f=(n=this.shadowRoot)==null?void 0:n.querySelector(".pointer");if(!f)return;let p=(h=this.shadowRoot)==null?void 0:h.getElementById("range-slider");if(!p)return;let x=Fn(this,f);this.slider=Bn(this,p,x),Un(this,this.slider),this._observer=new MutationObserver(O=>{O.forEach(N=>{var w;if(!this.slider||N.type!=="attributes")return;let A=N.attributeName;!A||zn(this.slider,A,(w=this.getAttribute(A))!=null?w:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},ns=Wn;window.tcRangeSlider=ns,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",ns),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends ns{})})();var hi={exports:{}};(function(r,e){(function(t,s){r.exports=s()})(dt,function(){var t=1e3,s=6e4,i=36e5,o="millisecond",a="second",c="minute",u="hour",d="day",v="week",m="month",$="quarter",E="year",P="date",G="Invalid Date",ye=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ae=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,be={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var y=["th","st","nd","rd"],b=D%100;return"["+D+(y[(b-20)%10]||y[b]||y[0])+"]"}},me=function(D,y,b){var k=String(D);return!k||k.length>=y?D:""+Array(y+1-k.length).join(b)+D},Se={s:me,z:function(D){var y=-D.utcOffset(),b=Math.abs(y),k=Math.floor(b/60),_=b%60;return(y<=0?"+":"-")+me(k,2,"0")+":"+me(_,2,"0")},m:function D(y,b){if(y.date()<b.date())return-D(b,y);var k=12*(b.year()-y.year())+(b.month()-y.month()),_=y.clone().add(k,m),I=b-_<0,R=y.clone().add(k+(I?-1:1),m);return+(-(k+(b-_)/(I?_-R:R-_))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:m,y:E,w:v,d,D:P,h:u,m:c,s:a,ms:o,Q:$}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},$e="en",U={};U[$e]=be;var X=function(D){return D instanceof De},re=function D(y,b,k){var _;if(!y)return $e;if(typeof y=="string"){var I=y.toLowerCase();U[I]&&(_=I),b&&(U[I]=b,_=I);var R=y.split("-");if(!_&&R.length>1)return D(R[0])}else{var V=y.name;U[V]=y,_=V}return!k&&_&&($e=_),_||!k&&$e},z=function(D,y){if(X(D))return D.clone();var b=typeof y=="object"?y:{};return b.date=D,b.args=arguments,new De(b)},B=Se;B.l=re,B.i=X,B.w=function(D,y){return z(D,{locale:y.$L,utc:y.$u,x:y.$x,$offset:y.$offset})};var De=function(){function D(b){this.$L=re(b.locale,null,!0),this.parse(b)}var y=D.prototype;return y.parse=function(b){this.$d=function(k){var _=k.date,I=k.utc;if(_===null)return new Date(NaN);if(B.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var R=_.match(ye);if(R){var V=R[2]-1||0,se=(R[7]||"0").substring(0,3);return I?new Date(Date.UTC(R[1],V,R[3]||1,R[4]||0,R[5]||0,R[6]||0,se)):new Date(R[1],V,R[3]||1,R[4]||0,R[5]||0,R[6]||0,se)}}return new Date(_)}(b),this.$x=b.x||{},this.init()},y.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},y.$utils=function(){return B},y.isValid=function(){return this.$d.toString()!==G},y.isSame=function(b,k){var _=z(b);return this.startOf(k)<=_&&_<=this.endOf(k)},y.isAfter=function(b,k){return z(b)<this.startOf(k)},y.isBefore=function(b,k){return this.endOf(k)<z(b)},y.$g=function(b,k,_){return B.u(b)?this[k]:this.set(_,b)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(b,k){var _=this,I=!!B.u(k)||k,R=B.p(b),V=function(Re,te){var K=B.w(_.$u?Date.UTC(_.$y,te,Re):new Date(_.$y,te,Re),_);return I?K:K.endOf(d)},se=function(Re,te){return B.w(_.toDate()[Re].apply(_.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(te)),_)},ee=this.$W,ce=this.$M,Oe=this.$D,Ce="set"+(this.$u?"UTC":"");switch(R){case E:return I?V(1,0):V(31,11);case m:return I?V(1,ce):V(0,ce+1);case v:var de=this.$locale().weekStart||0,Ee=(ee<de?ee+7:ee)-de;return V(I?Oe-Ee:Oe+(6-Ee),ce);case d:case P:return se(Ce+"Hours",0);case u:return se(Ce+"Minutes",1);case c:return se(Ce+"Seconds",2);case a:return se(Ce+"Milliseconds",3);default:return this.clone()}},y.endOf=function(b){return this.startOf(b,!1)},y.$set=function(b,k){var _,I=B.p(b),R="set"+(this.$u?"UTC":""),V=(_={},_[d]=R+"Date",_[P]=R+"Date",_[m]=R+"Month",_[E]=R+"FullYear",_[u]=R+"Hours",_[c]=R+"Minutes",_[a]=R+"Seconds",_[o]=R+"Milliseconds",_)[I],se=I===d?this.$D+(k-this.$W):k;if(I===m||I===E){var ee=this.clone().set(P,1);ee.$d[V](se),ee.init(),this.$d=ee.set(P,Math.min(this.$D,ee.daysInMonth())).$d}else V&&this.$d[V](se);return this.init(),this},y.set=function(b,k){return this.clone().$set(b,k)},y.get=function(b){return this[B.p(b)]()},y.add=function(b,k){var _,I=this;b=Number(b);var R=B.p(k),V=function(ce){var Oe=z(I);return B.w(Oe.date(Oe.date()+Math.round(ce*b)),I)};if(R===m)return this.set(m,this.$M+b);if(R===E)return this.set(E,this.$y+b);if(R===d)return V(1);if(R===v)return V(7);var se=(_={},_[c]=s,_[u]=i,_[a]=t,_)[R]||1,ee=this.$d.getTime()+b*se;return B.w(ee,this)},y.subtract=function(b,k){return this.add(-1*b,k)},y.format=function(b){var k=this,_=this.$locale();if(!this.isValid())return _.invalidDate||G;var I=b||"YYYY-MM-DDTHH:mm:ssZ",R=B.z(this),V=this.$H,se=this.$m,ee=this.$M,ce=_.weekdays,Oe=_.months,Ce=function(te,K,et,tt){return te&&(te[K]||te(k,I))||et[K].slice(0,tt)},de=function(te){return B.s(V%12||12,te,"0")},Ee=_.meridiem||function(te,K,et){var tt=te<12?"AM":"PM";return et?tt.toLowerCase():tt},Re={YY:String(this.$y).slice(-2),YYYY:B.s(this.$y,4,"0"),M:ee+1,MM:B.s(ee+1,2,"0"),MMM:Ce(_.monthsShort,ee,Oe,3),MMMM:Ce(Oe,ee),D:this.$D,DD:B.s(this.$D,2,"0"),d:String(this.$W),dd:Ce(_.weekdaysMin,this.$W,ce,2),ddd:Ce(_.weekdaysShort,this.$W,ce,3),dddd:ce[this.$W],H:String(V),HH:B.s(V,2,"0"),h:de(1),hh:de(2),a:Ee(V,se,!0),A:Ee(V,se,!1),m:String(se),mm:B.s(se,2,"0"),s:String(this.$s),ss:B.s(this.$s,2,"0"),SSS:B.s(this.$ms,3,"0"),Z:R};return I.replace(ae,function(te,K){return K||Re[te]||R.replace(":","")})},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(b,k,_){var I,R=B.p(k),V=z(b),se=(V.utcOffset()-this.utcOffset())*s,ee=this-V,ce=B.m(this,V);return ce=(I={},I[E]=ce/12,I[m]=ce,I[$]=ce/3,I[v]=(ee-se)/6048e5,I[d]=(ee-se)/864e5,I[u]=ee/i,I[c]=ee/s,I[a]=ee/t,I)[R]||ee,_?ce:B.a(ce)},y.daysInMonth=function(){return this.endOf(m).$D},y.$locale=function(){return U[this.$L]},y.locale=function(b,k){if(!b)return this.$L;var _=this.clone(),I=re(b,k,!0);return I&&(_.$L=I),_},y.clone=function(){return B.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},D}(),ke=De.prototype;return z.prototype=ke,[["$ms",o],["$s",a],["$m",c],["$H",u],["$W",d],["$M",m],["$y",E],["$D",P]].forEach(function(D){ke[D[1]]=function(y){return this.$g(y,D[0],D[1])}}),z.extend=function(D,y){return D.$i||(D(y,De,z),D.$i=!0),z},z.locale=re,z.isDayjs=X,z.unix=function(D){return z(1e3*D)},z.en=U[$e],z.Ls=U,z.p={},z})})(hi);var sn=hi.exports;const wt=oi(sn);class rn extends ct{constructor(){super(...arguments),this.templates={},this._renderedTemplates={}}setBindingSyntax(e,t){this._startExpression=e,this._endExpression=t;const s=this.escapeRegex(this._startExpression),i=this.escapeRegex(this._endExpression);this._expression=new RegExp(`${s}\\s*([$\\w\\.,'"\\s()\\[\\]]+)\\s*${i}`,"g")}hasTemplate(e){return this.templates&&!!this.templates[e]}renderTemplate(e,t,s){if(!this.hasTemplate(e))return null;s=s||e;const i=ge` <slot name=${s}></slot> `,o={[e]:{...t}};if(this._renderedTemplates.hasOwnProperty(s)){const{slot:c}=this._renderedTemplates[s];this.removeChild(c)}const a=document.createElement("div");return a.slot=s,a.dataset.generated="template",this._renderTemplate(a,this.templates[e],o),this.appendChild(a),this._renderedTemplates[s]={context:o,slot:a},i}getTemplates(){const e={};for(let t=0;t<this.children.length;t++){const s=this.children[t];if(s.nodeName==="TEMPLATE"){const i=s;i.dataset.type?e[i.dataset.type]=i:e.default=i,i.templateOrder=t}}return e}_renderTemplate(e,t,s){let i;if(t.content&&t.content.childNodes.length){const o=t.content.cloneNode(!0);i=this.renderNode(o,e,s)}i&&e.appendChild(i)}expandExpressionsAsString(e,t){return e.replace(this.expression,(s,i)=>{const o=this.evalInContext(i||this.trimExpression(s),t);return o?typeof o=="object"?JSON.stringify(o):o.toString():""})}get expression(){return this._expression||this.setBindingSyntax("{{","}}"),this._expression}escapeRegex(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}evalInContext(e,t){t={...t};const s=new Function("with(this) { return "+e+";}");let i;try{i=s.call(t)}catch{}return i}trimExpression(e){return e=e.trim(),e.startsWith(this._startExpression)&&e.endsWith(this._endExpression)&&(e=e.substr(this._startExpression.length,e.length-this._startExpression.length-this._endExpression.length),e=e.trim()),e}renderNode(e,t,s){if(e.nodeName==="#text")return e.textContent=this.expandExpressionsAsString(e.textContent,s),e;if(e.nodeName==="TEMPLATE")return e.$parentTemplateContext=s,e;for(let i=0;i<e.childNodes.length;i++){const o=e.childNodes[i];this.renderNode(o,t,s)}return e}updated(){this.templates=this.getTemplates()}}const nn=(r,e="highlight",t="title")=>{const s=(o,a,c)=>{const u=a.split(".");let d;for(d=0;d<u.length-1;d++)o=o[u[d]];o[u[d]]=c},i=(o,a=[])=>{let c="",u=0;return a.forEach(d=>{const v=d[1]+1;c+=[o.substring(u,d[0]),`<mark class="${e}">`,o.substring(d[0],v),"</mark>"].join(""),u=v}),c+=o.substring(u),c};return r.filter(({matches:o})=>o&&o.length).map(({item:o,matches:a})=>{const c={...o};return a.forEach(u=>{u.key===t&&s(c,u.key,i(u.value,u.indices))}),c})},on=`
|
|
51
|
+
*/class Yt extends er{constructor(e){if(super(e),this.et=Q,e.type!==Zi.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Q||e==null)return this.ft=void 0,this.et=e;if(e===We)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Yt.directiveName="unsafeHTML",Yt.resultType=1;const Vs=Qi(Yt);function Ne(r){return Array.isArray?Array.isArray(r):qs(r)==="[object Array]"}const tr=1/0;function sr(r){if(typeof r=="string")return r;let e=r+"";return e=="0"&&1/r==-tr?"-0":e}function ir(r){return r==null?"":sr(r)}function Te(r){return typeof r=="string"}function Ys(r){return typeof r=="number"}function rr(r){return r===!0||r===!1||nr(r)&&qs(r)=="[object Boolean]"}function Ks(r){return typeof r=="object"}function nr(r){return Ks(r)&&r!==null}function Ae(r){return r!=null}function Kt(r){return!r.trim().length}function qs(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}const ao="Extended search is not available",or="Incorrect 'index' type",lr=r=>`Invalid value for key ${r}`,ar=r=>`Pattern length exceeds max of ${r}.`,hr=r=>`Missing ${r} property in key`,cr=r=>`Property 'weight' in key '${r}' must be a positive integer`,Xs=Object.prototype.hasOwnProperty;class ur{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(s=>{let i=Js(s);t+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(s=>{s.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Js(r){let e=null,t=null,s=null,i=1,o=null;if(Te(r)||Ne(r))s=r,e=Gs(r),t=qt(r);else{if(!Xs.call(r,"name"))throw new Error(hr("name"));const a=r.name;if(s=a,Xs.call(r,"weight")&&(i=r.weight,i<=0))throw new Error(cr(a));e=Gs(a),t=qt(a),o=r.getFn}return{path:e,id:t,weight:i,src:s,getFn:o}}function Gs(r){return Ne(r)?r:r.split(".")}function qt(r){return Ne(r)?r.join("."):r}function dr(r,e){let t=[],s=!1;const i=(o,a,c)=>{if(Ae(o))if(!a[c])t.push(o);else{let u=a[c];const d=o[u];if(!Ae(d))return;if(c===a.length-1&&(Te(d)||Ys(d)||rr(d)))t.push(ir(d));else if(Ne(d)){s=!0;for(let v=0,m=d.length;v<m;v+=1)i(d[v],a,c+1)}else a.length&&i(d,a,c+1)}};return i(r,Te(e)?e.split("."):e,0),s?t:t[0]}var T={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(r,e)=>r.score===e.score?r.idx<e.idx?-1:1:r.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:dr,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const pr=/[^ ]+/g;function fr(r=1,e=3){const t=new Map,s=Math.pow(10,e);return{get(i){const o=i.match(pr).length;if(t.has(o))return t.get(o);const a=1/Math.pow(o,.5*r),c=parseFloat(Math.round(a*s)/s);return t.set(o,c),c},clear(){t.clear()}}}class Xt{constructor({getFn:e=T.getFn,fieldNormWeight:t=T.fieldNormWeight}={}){this.norm=fr(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,s)=>{this._keysMap[t.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Te(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();Te(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,s=this.size();t<s;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Ae(e)||Kt(e))return;let s={v:e,i:t,n:this.norm.get(e)};this.records.push(s)}_addObject(e,t){let s={i:t,$:{}};this.keys.forEach((i,o)=>{let a=i.getFn?i.getFn(e):this.getFn(e,i.path);if(Ae(a)){if(Ne(a)){let c=[];const u=[{nestedArrIndex:-1,value:a}];for(;u.length;){const{nestedArrIndex:d,value:v}=u.pop();if(Ae(v))if(Te(v)&&!Kt(v)){let m={v,i:d,n:this.norm.get(v)};c.push(m)}else Ne(v)&&v.forEach((m,$)=>{u.push({nestedArrIndex:$,value:m})})}s.$[o]=c}else if(Te(a)&&!Kt(a)){let c={v:a,n:this.norm.get(a)};s.$[o]=c}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function Zs(r,e,{getFn:t=T.getFn,fieldNormWeight:s=T.fieldNormWeight}={}){const i=new Xt({getFn:t,fieldNormWeight:s});return i.setKeys(r.map(Js)),i.setSources(e),i.create(),i}function gr(r,{getFn:e=T.getFn,fieldNormWeight:t=T.fieldNormWeight}={}){const{keys:s,records:i}=r,o=new Xt({getFn:e,fieldNormWeight:t});return o.setKeys(s),o.setIndexRecords(i),o}function _t(r,{errors:e=0,currentLocation:t=0,expectedLocation:s=0,distance:i=T.distance,ignoreLocation:o=T.ignoreLocation}={}){const a=e/r.length;if(o)return a;const c=Math.abs(s-t);return i?a+c/i:c?1:a}function mr(r=[],e=T.minMatchCharLength){let t=[],s=-1,i=-1,o=0;for(let a=r.length;o<a;o+=1){let c=r[o];c&&s===-1?s=o:!c&&s!==-1&&(i=o-1,i-s+1>=e&&t.push([s,i]),s=-1)}return r[o-1]&&o-s>=e&&t.push([s,o-1]),t}const Ye=32;function vr(r,e,t,{location:s=T.location,distance:i=T.distance,threshold:o=T.threshold,findAllMatches:a=T.findAllMatches,minMatchCharLength:c=T.minMatchCharLength,includeMatches:u=T.includeMatches,ignoreLocation:d=T.ignoreLocation}={}){if(e.length>Ye)throw new Error(ar(Ye));const v=e.length,m=r.length,$=Math.max(0,Math.min(s,m));let E=o,P=$;const G=c>1||u,ye=G?Array(m):[];let ae;for(;(ae=r.indexOf(e,P))>-1;){let X=_t(e,{currentLocation:ae,expectedLocation:$,distance:i,ignoreLocation:d});if(E=Math.min(X,E),P=ae+v,G){let re=0;for(;re<v;)ye[ae+re]=1,re+=1}}P=-1;let be=[],me=1,Se=v+m;const $e=1<<v-1;for(let X=0;X<v;X+=1){let re=0,z=Se;for(;re<z;)_t(e,{errors:X,currentLocation:$+z,expectedLocation:$,distance:i,ignoreLocation:d})<=E?re=z:Se=z,z=Math.floor((Se-re)/2+re);Se=z;let B=Math.max(1,$-z+1),De=a?m:Math.min($+z,m)+v,ke=Array(De+2);ke[De+1]=(1<<X)-1;for(let y=De;y>=B;y-=1){let b=y-1,k=t[r.charAt(b)];if(G&&(ye[b]=+!!k),ke[y]=(ke[y+1]<<1|1)&k,X&&(ke[y]|=(be[y+1]|be[y])<<1|1|be[y+1]),ke[y]&$e&&(me=_t(e,{errors:X,currentLocation:b,expectedLocation:$,distance:i,ignoreLocation:d}),me<=E)){if(E=me,P=b,P<=$)break;B=Math.max(1,2*$-P)}}if(_t(e,{errors:X+1,currentLocation:$,expectedLocation:$,distance:i,ignoreLocation:d})>E)break;be=ke}const U={isMatch:P>=0,score:Math.max(.001,me)};if(G){const X=mr(ye,c);X.length?u&&(U.indices=X):U.isMatch=!1}return U}function yr(r){let e={};for(let t=0,s=r.length;t<s;t+=1){const i=r.charAt(t);e[i]=(e[i]||0)|1<<s-t-1}return e}class Qs{constructor(e,{location:t=T.location,threshold:s=T.threshold,distance:i=T.distance,includeMatches:o=T.includeMatches,findAllMatches:a=T.findAllMatches,minMatchCharLength:c=T.minMatchCharLength,isCaseSensitive:u=T.isCaseSensitive,ignoreLocation:d=T.ignoreLocation}={}){if(this.options={location:t,threshold:s,distance:i,includeMatches:o,findAllMatches:a,minMatchCharLength:c,isCaseSensitive:u,ignoreLocation:d},this.pattern=u?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const v=($,E)=>{this.chunks.push({pattern:$,alphabet:yr($),startIndex:E})},m=this.pattern.length;if(m>Ye){let $=0;const E=m%Ye,P=m-E;for(;$<P;)v(this.pattern.substr($,Ye),$),$+=Ye;if(E){const G=m-Ye;v(this.pattern.substr(G),G)}}else v(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:s}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let P={isMatch:!0,score:0};return s&&(P.indices=[[0,e.length-1]]),P}const{location:i,distance:o,threshold:a,findAllMatches:c,minMatchCharLength:u,ignoreLocation:d}=this.options;let v=[],m=0,$=!1;this.chunks.forEach(({pattern:P,alphabet:G,startIndex:ye})=>{const{isMatch:ae,score:be,indices:me}=vr(e,P,G,{location:i+ye,distance:o,threshold:a,findAllMatches:c,minMatchCharLength:u,includeMatches:s,ignoreLocation:d});ae&&($=!0),m+=be,ae&&me&&(v=[...v,...me])});let E={isMatch:$,score:$?m/this.chunks.length:1};return $&&s&&(E.indices=v),E}}class He{constructor(e){this.pattern=e}static isMultiMatch(e){return ei(e,this.multiRegex)}static isSingleMatch(e){return ei(e,this.singleRegex)}search(){}}function ei(r,e){const t=r.match(e);return t?t[1]:null}class br extends He{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class $r extends He{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const s=e.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class _r extends He{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class xr extends He{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class wr extends He{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class Ar extends He{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class ti extends He{constructor(e,{location:t=T.location,threshold:s=T.threshold,distance:i=T.distance,includeMatches:o=T.includeMatches,findAllMatches:a=T.findAllMatches,minMatchCharLength:c=T.minMatchCharLength,isCaseSensitive:u=T.isCaseSensitive,ignoreLocation:d=T.ignoreLocation}={}){super(e),this._bitapSearch=new Qs(e,{location:t,threshold:s,distance:i,includeMatches:o,findAllMatches:a,minMatchCharLength:c,isCaseSensitive:u,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class si extends He{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,s;const i=[],o=this.pattern.length;for(;(s=e.indexOf(this.pattern,t))>-1;)t=s+o,i.push([s,t-1]);const a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}}}const Jt=[br,si,_r,xr,Ar,wr,$r,ti],ii=Jt.length,Er=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Mr="|";function Sr(r,e={}){return r.split(Mr).map(t=>{let s=t.trim().split(Er).filter(o=>o&&!!o.trim()),i=[];for(let o=0,a=s.length;o<a;o+=1){const c=s[o];let u=!1,d=-1;for(;!u&&++d<ii;){const v=Jt[d];let m=v.isMultiMatch(c);m&&(i.push(new v(m,e)),u=!0)}if(!u)for(d=-1;++d<ii;){const v=Jt[d];let m=v.isSingleMatch(c);if(m){i.push(new v(m,e));break}}}return i})}const kr=new Set([ti.type,si.type]);class Or{constructor(e,{isCaseSensitive:t=T.isCaseSensitive,includeMatches:s=T.includeMatches,minMatchCharLength:i=T.minMatchCharLength,ignoreLocation:o=T.ignoreLocation,findAllMatches:a=T.findAllMatches,location:c=T.location,threshold:u=T.threshold,distance:d=T.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:s,minMatchCharLength:i,findAllMatches:a,ignoreLocation:o,location:c,threshold:u,distance:d},this.pattern=t?e:e.toLowerCase(),this.query=Sr(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:i}=this.options;e=i?e:e.toLowerCase();let o=0,a=[],c=0;for(let u=0,d=t.length;u<d;u+=1){const v=t[u];a.length=0,o=0;for(let m=0,$=v.length;m<$;m+=1){const E=v[m],{isMatch:P,indices:G,score:ye}=E.search(e);if(P){if(o+=1,c+=ye,s){const ae=E.constructor.type;kr.has(ae)?a=[...a,...G]:a.push(G)}}else{c=0,o=0,a.length=0;break}}if(o){let m={isMatch:!0,score:c/o};return s&&(m.indices=a),m}}return{isMatch:!1,score:1}}}const Gt=[];function Cr(...r){Gt.push(...r)}function Zt(r,e){for(let t=0,s=Gt.length;t<s;t+=1){let i=Gt[t];if(i.condition(r,e))return new i(r,e)}return new Qs(r,e)}const xt={AND:"$and",OR:"$or"},Qt={PATH:"$path",PATTERN:"$val"},es=r=>!!(r[xt.AND]||r[xt.OR]),Lr=r=>!!r[Qt.PATH],Tr=r=>!Ne(r)&&Ks(r)&&!es(r),ri=r=>({[xt.AND]:Object.keys(r).map(e=>({[e]:r[e]}))});function ni(r,e,{auto:t=!0}={}){const s=i=>{let o=Object.keys(i);const a=Lr(i);if(!a&&o.length>1&&!es(i))return s(ri(i));if(Tr(i)){const u=a?i[Qt.PATH]:o[0],d=a?i[Qt.PATTERN]:i[u];if(!Te(d))throw new Error(lr(u));const v={keyId:qt(u),pattern:d};return t&&(v.searcher=Zt(d,e)),v}let c={children:[],operator:o[0]};return o.forEach(u=>{const d=i[u];Ne(d)&&d.forEach(v=>{c.children.push(s(v))})}),c};return es(r)||(r=ri(r)),s(r)}function Dr(r,{ignoreFieldNorm:e=T.ignoreFieldNorm}){r.forEach(t=>{let s=1;t.matches.forEach(({key:i,norm:o,score:a})=>{const c=i?i.weight:null;s*=Math.pow(a===0&&c?Number.EPSILON:a,(c||1)*(e?1:o))}),t.score=s})}function Rr(r,e){const t=r.matches;e.matches=[],Ae(t)&&t.forEach(s=>{if(!Ae(s.indices)||!s.indices.length)return;const{indices:i,value:o}=s;let a={indices:i,value:o};s.key&&(a.key=s.key.src),s.idx>-1&&(a.refIndex=s.idx),e.matches.push(a)})}function Pr(r,e){e.score=r.score}function Ir(r,e,{includeMatches:t=T.includeMatches,includeScore:s=T.includeScore}={}){const i=[];return t&&i.push(Rr),s&&i.push(Pr),r.map(o=>{const{idx:a}=o,c={item:e[a],refIndex:a};return i.length&&i.forEach(u=>{u(o,c)}),c})}class Qe{constructor(e,t={},s){this.options={...T,...t},this.options.useExtendedSearch,this._keyStore=new ur(this.options.keys),this.setCollection(e,s)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Xt))throw new Error(or);this._myIndex=t||Zs(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Ae(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let s=0,i=this._docs.length;s<i;s+=1){const o=this._docs[s];e(o,s)&&(this.removeAt(s),s-=1,i-=1,t.push(o))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:s,includeScore:i,shouldSort:o,sortFn:a,ignoreFieldNorm:c}=this.options;let u=Te(e)?Te(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Dr(u,{ignoreFieldNorm:c}),o&&u.sort(a),Ys(t)&&t>-1&&(u=u.slice(0,t)),Ir(u,this._docs,{includeMatches:s,includeScore:i})}_searchStringList(e){const t=Zt(e,this.options),{records:s}=this._myIndex,i=[];return s.forEach(({v:o,i:a,n:c})=>{if(!Ae(o))return;const{isMatch:u,score:d,indices:v}=t.searchIn(o);u&&i.push({item:o,idx:a,matches:[{score:d,value:o,norm:c,indices:v}]})}),i}_searchLogical(e){const t=ni(e,this.options),s=(c,u,d)=>{if(!c.children){const{keyId:m,searcher:$}=c,E=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(u,m),searcher:$});return E&&E.length?[{idx:d,item:u,matches:E}]:[]}const v=[];for(let m=0,$=c.children.length;m<$;m+=1){const E=c.children[m],P=s(E,u,d);if(P.length)v.push(...P);else if(c.operator===xt.AND)return[]}return v},i=this._myIndex.records,o={},a=[];return i.forEach(({$:c,i:u})=>{if(Ae(c)){let d=s(t,c,u);d.length&&(o[u]||(o[u]={idx:u,item:c,matches:[]},a.push(o[u])),d.forEach(({matches:v})=>{o[u].matches.push(...v)}))}}),a}_searchObjectList(e){const t=Zt(e,this.options),{keys:s,records:i}=this._myIndex,o=[];return i.forEach(({$:a,i:c})=>{if(!Ae(a))return;let u=[];s.forEach((d,v)=>{u.push(...this._findMatches({key:d,value:a[v],searcher:t}))}),u.length&&o.push({idx:c,item:a,matches:u})}),o}_findMatches({key:e,value:t,searcher:s}){if(!Ae(t))return[];let i=[];if(Ne(t))t.forEach(({v:o,i:a,n:c})=>{if(!Ae(o))return;const{isMatch:u,score:d,indices:v}=s.searchIn(o);u&&i.push({score:d,key:e,value:o,idx:a,norm:c,indices:v})});else{const{v:o,n:a}=t,{isMatch:c,score:u,indices:d}=s.searchIn(o);c&&i.push({score:u,key:e,value:o,norm:a,indices:d})}return i}}Qe.version="6.6.2",Qe.createIndex=Zs,Qe.parseIndex=gr,Qe.config=T,Qe.parseQuery=ni,Cr(Or);var dt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oi(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Nr="Expected a function",li=0/0,jr="[object Symbol]",Hr=/^\s+|\s+$/g,Fr=/^[-+]0x[0-9a-f]+$/i,Ur=/^0b[01]+$/i,Br=/^0o[0-7]+$/i,zr=parseInt,Wr=typeof dt=="object"&&dt&&dt.Object===Object&&dt,Vr=typeof self=="object"&&self&&self.Object===Object&&self,Yr=Wr||Vr||Function("return this")(),Kr=Object.prototype,qr=Kr.toString,Xr=Math.max,Jr=Math.min,ts=function(){return Yr.Date.now()};function Gr(r,e,t){var s,i,o,a,c,u,d=0,v=!1,m=!1,$=!0;if(typeof r!="function")throw new TypeError(Nr);e=ai(e)||0,ss(t)&&(v=!!t.leading,m="maxWait"in t,o=m?Xr(ai(t.maxWait)||0,e):o,$="trailing"in t?!!t.trailing:$);function E(U){var X=s,re=i;return s=i=void 0,d=U,a=r.apply(re,X),a}function P(U){return d=U,c=setTimeout(ae,e),v?E(U):a}function G(U){var X=U-u,re=U-d,z=e-X;return m?Jr(z,o-re):z}function ye(U){var X=U-u,re=U-d;return u===void 0||X>=e||X<0||m&&re>=o}function ae(){var U=ts();if(ye(U))return be(U);c=setTimeout(ae,G(U))}function be(U){return c=void 0,$&&s?E(U):(s=i=void 0,a)}function me(){c!==void 0&&clearTimeout(c),d=0,s=u=i=c=void 0}function Se(){return c===void 0?a:be(ts())}function $e(){var U=ts(),X=ye(U);if(s=arguments,i=this,u=U,X){if(c===void 0)return P(u);if(m)return c=setTimeout(ae,e),E(u)}return c===void 0&&(c=setTimeout(ae,e)),a}return $e.cancel=me,$e.flush=Se,$e}function ss(r){var e=typeof r;return!!r&&(e=="object"||e=="function")}function Zr(r){return!!r&&typeof r=="object"}function Qr(r){return typeof r=="symbol"||Zr(r)&&qr.call(r)==jr}function ai(r){if(typeof r=="number")return r;if(Qr(r))return li;if(ss(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=ss(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=r.replace(Hr,"");var t=Ur.test(r);return t||Br.test(r)?zr(r.slice(2),t?2:8):Fr.test(r)?li:+r}var en=Gr;const tn=oi(en);(()=>{var r=Object.defineProperty,e=Math.pow,t=(n,h,f)=>h in n?r(n,h,{enumerable:!0,configurable:!0,writable:!0,value:f}):n[h]=f,s=(n,h,f)=>(t(n,typeof h!="symbol"?h+"":h,f),f),i=(n,h)=>` ${h&&h.length>0?h.map(f=>`<link rel="stylesheet" href="${f}" />`).join(""):""} <style> ${n} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`,o=":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}",a="pointers-overlap",c="pointers-min-distance",u="pointers-max-distance",d="range-dragging",v="data",m="min",$="max",E="step",P="round",G="type",ye="theme",ae="rtl",be="btt",me="disabled",Se="keyboard-disabled",$e="mousewheel-disabled",U="slider-width",X="slider-height",re="slider-radius",z="slider-bg",B="slider-bg-hover",De="slider-bg-fill",ke="pointer-width",D="pointer-height",y="pointer-radius",b="pointer-bg",k="pointer-bg-hover",_="pointer-bg-focus",I="pointer-shadow",R="pointer-shadow-hover",V="pointer-shadow-focus",se="pointer-border",ee="pointer-border-hover",ce="pointer-border-focus",Oe="animate-onclick",Ce="css-links",de="vertical",Ee="horizontal",Re=(n,h,f,p,x)=>{let O=h-n;return O===0?f:(p-f)*(x-n)/O+f},te=n=>!isNaN(parseFloat(n))&&isFinite(n),K=(n,h)=>te(n)?Number(n):h,et=(n,h)=>h===0?0:Math.round(n/h)*h,tt=(n,h=1/0)=>{if(h===1/0)return n;let f=e(10,h);return Math.round(n*f)/f},pe=n=>n==null?!1:typeof n=="boolean"?n:n.trim().toLowerCase()==="true",cn=(n,h)=>{n.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:h}}))},un=(n,h)=>{n.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:h}}))},dn=(n,h)=>{n.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:h}}))},pn=(n,h)=>{n.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:h}}))},fn=(n,h)=>{if(!h||h.length<=0)return;let f=h.map(x=>te(x)?K(x,x):x),p={values:f||[]};p.value=f[0],p.value0=f[0],p.value1=f[0];for(let x=1;x<f.length;x++)p[`value${x+1}`]=f[x];n.dispatchEvent(new CustomEvent("change",{detail:p}))},is=(n,h,f)=>{let p=0,x,O,N,w,A=!1,j=(L,J,ue,he,ne,oe)=>{let _e=p;ue!==void 0&&L>ue&&(L=ue),J!==void 0&&L<J&&(L=J),p=L;let xe=p;return(he===de&&oe||he===Ee&&ne)&&(xe=100-xe),he===de?h.style.top=`${xe}%`:h.style.left=`${xe}%`,_e!==p},F=L=>L===h||h.contains(L),S=(L,J,ue,he)=>{x=L,O=J,N=ue,w=he},Y=L=>{A=L,h.classList.toggle("disabled",A),A?h.setAttribute("aria-disabled","true"):h.hasAttribute("aria-disabled")&&h.removeAttribute("aria-disabled")},Me=(L,J)=>{J==null?h.removeAttribute(L):h.setAttribute(L,J)},ve=L=>h.getAttribute(L),C=L=>{if(!A){switch(L.key){case"ArrowLeft":{L.preventDefault(),typeof x=="function"&&x(f);break}case"ArrowRight":{L.preventDefault(),typeof O=="function"&&O(f);break}case"ArrowUp":{L.preventDefault(),typeof N=="function"&&N(f);break}case"ArrowDown":{L.preventDefault(),typeof w=="function"&&w(f);break}}pn(n,L)}},H=()=>{A||cn(n,h)};return h.className=`pointer pointer-${f}`,h.addEventListener("keydown",C),h.addEventListener("click",H),{$pointer:h,get percent(){return p},get disabled(){return A},set disabled(L){Y(L)},updatePosition:j,isClicked:F,setCallbacks:S,setAttr:Me,getAttr:ve,destroy:()=>{h.removeEventListener("keydown",C),h.removeEventListener("click",H),h.remove()}}},gn=n=>{if(n==null)return;if(Array.isArray(n))return n;if(n.trim()==="")return;let h=n.split(","),f=[],p=!0;for(let x=0;x<h.length;x++){let O=h[x].trim();O!==""&&(f.push(O),te(O)||(p=!1))}return p?f.map(x=>Number(x)):f},mn=(n,h)=>h?h.findIndex(f=>f===n||f.toString().trim()===n.toString().trim()):-1,vn=n=>({updatePosition:(h,f,p,x)=>{if(f.length<=0)return;let O=f.length===1,N=f[0],w=f[f.length-1];h===de?(n.style.removeProperty("width"),n.style.removeProperty("right"),n.style.removeProperty("left"),O?n.style.height=`${N}%`:n.style.height=`${Math.abs(N-w)}%`,x?(n.style.bottom="0%",O?n.style.top="auto":n.style.top=`${Math.min(100-w,100-N)}%`):(n.style.bottom="auto",O?n.style.top="0%":n.style.top=`${Math.min(N,w)}%`)):(n.style.removeProperty("height"),n.style.removeProperty("top"),n.style.removeProperty("bottom"),O?n.style.width=`${N}%`:n.style.width=`${Math.abs(N-w)}%`,p?(n.style.right="0%",O?n.style.left="auto":n.style.left=`${Math.min(100-w,100-N)}%`):(n.style.right="auto",O?n.style.left="0%":n.style.left=`${Math.min(N,w)}%`))}}),ui="--animate-onclick",yn="--width",bn="--height",$n="--panel-bg-border-radius",_n="--panel-bg",xn="--panel-bg-hover",wn="--panel-bg-fill",An="--pointer-width",En="--pointer-height",Mn="--pointer-border-radius",Sn="--pointer-bg",kn="--pointer-bg-hover",On="--pointer-bg-focus",Cn="--pointer-shadow",Ln="--pointer-shadow-hover",Tn="--pointer-shadow-focus",Dn="--pointer-border",Rn="--pointer-border-hover",Pn="--pointer-border-focus",At=(n,h,f)=>{let p=new Map;for(let x of n.attributes){let O=x.nodeName.trim().toLowerCase();if(!h.test(O))continue;let N=O.replace(/\D/g,"").trim(),w=N===""||N==="0"||N==="1"?0:K(N,0)-1,A=f&&typeof f=="function"?f(x.value):x.value;p.set(w,A)}return p},In=n=>{if(!n)return null;let h=n.getAttribute(Ce);if(!h)return null;let f=h.split(";"),p=[];for(let x of f)x.trim()!==""&&p.push(x.trim());return p},di=[[yn,U,"sliderWidth",null],[bn,X,"sliderHeight",null],[$n,re,"sliderRadius",null],[_n,z,"sliderBg",null],[xn,B,"sliderBgHover",null],[wn,De,"sliderBgFill",null],[An,ke,"pointer#Width",/^pointer([0-9]*)-width$/],[En,D,"pointer#Height",/^pointer([0-9]*)-height$/],[Mn,y,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Sn,b,"pointer#Bg",/^pointer([0-9]*)-bg$/],[kn,k,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[On,_,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[Cn,I,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[Ln,R,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[Tn,V,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Dn,se,"pointer#Border",/^pointer([0-9]*)-border$/],[Rn,ee,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[Pn,ce,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],Nn=(n,h,f)=>{let p=null,x=[],O=new Map,N=(C,H=h)=>{let L=[...H.classList];for(let J of L)J.startsWith(C)&&h.classList.remove(J)},w=()=>{N("shape");let C=h.querySelectorAll(".pointer");for(let H of C)N("shape",H)},A=C=>{p=C,N("theme-"),typeof C=="string"&&h.classList.add(`theme-${C}`)},j=()=>{if(w(),!(x.length<=0)){h.classList.add("shape",`shape-${x[0]}`);for(let C=1;C<x.length;C++){let H=x[C];if(!H)continue;let L=h.querySelector(`.pointer-${C}`);!L||L.classList.add("shape",`shape-${H}`)}}},F=(C,H)=>{x[C]=H,j()},S=()=>{w();let C=At(n,/^pointer([0-9]*)-shape$/);if(!(C.size<=0)){for(let H of C){let L=H[0];x[L]=H[1]}j()}},Y=(C,H)=>`${C}-${H}`,Me=(C,H,L)=>{let J=f[L];if(!J)return;let ue=L===0?h:J.$pointer;if(H==null){O.has(Y(C,L))&&O.delete(Y(C,L)),ue.style.removeProperty(C);return}O.set(Y(C,L),H),ue.style.setProperty(C,H)},ve=(C,H)=>O.get(Y(C,H));return(()=>{for(let C of di){let[H,L,J,ue]=C;if(ue){let ne=At(n,ue);for(let oe of ne){let _e=oe[0],xe=oe[1];Me(H,xe,_e)}}else{let ne=n.getAttribute(L);Me(H,ne,0)}let he=[];if(J.indexOf("#")===-1)he.push([J,0]);else{he.push([J.replace("#",""),0]),he.push([J.replace("#","0"),0]),he.push([J.replace("#","1"),0]);for(let ne=1;ne<f.length;ne++)he.push([J.replace("#",(ne+1).toString()),ne])}for(let ne of he)try{let oe=ne[0],_e=ne[1];Object.prototype.hasOwnProperty.call(n,oe)||Object.defineProperty(n,oe,{get(){return ve(H,_e)},set:xe=>{Me(H,xe,_e)}})}catch(oe){console.error(oe)}}A(n.getAttribute(ye)),S()})(),{setStyle:Me,getStyle:ve,get theme(){return p},set theme(C){A(C)},get pointerShapes(){return x},setPointerShape:F}},st="animate-on-click",pi="range-dragging",jn=(n,h,f,p)=>{let x=[],O=F=>{for(let S of x)S.update&&typeof S.update=="function"&&S.update(F)},N=()=>{for(let F of x)F.destroy&&typeof F.destroy=="function"&&F.destroy()},w=(F,S)=>{for(let Y of x)Y.onAttrChange&&typeof Y.onAttrChange=="function"&&Y.onAttrChange(F,S)},A=F=>{if(F.gettersAndSetters){for(let S of F.gettersAndSetters)if(!(!S.name||!S.attributes))try{Object.prototype.hasOwnProperty.call(n,S.name)||Object.defineProperty(n,S.name,S.attributes)}catch(Y){console.error("defineSettersGetters error:",Y)}}},j=F=>{var S;if(!F.css)return;let Y=(S=n.shadowRoot)==null?void 0:S.querySelector("style");!Y||(Y.innerHTML+=F.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let F of window.tcRangeSliderPlugins){let S=F();x.push(S),S.init&&typeof S.init=="function"&&(S.init(n,h,f,p),A(S),j(S))}},update:O,onAttrChange:w,destroy:N}},Hn=10,Fn=(n,h)=>{let f=new Map,p=/^value([0-9]*)$/;for(let w of n.attributes){let A=w.nodeName.trim().toLowerCase();if(!p.test(A))continue;let j=A.replace("value","").trim(),F=j===""||j==="0"||j==="1"?0:K(j,0)-1,S=te(w.value)?K(w.value,0):w.value;f.set(F,S)}let x=Math.max(...Array.from(f.keys())),O=[];O.push([is(n,h,0),f.get(0)]);let N=h;for(let w=1;w<=x;w++){let A=h.cloneNode(!0);N.after(A),N=A,O.push([is(n,A,w),f.get(w)])}return O},fi=(n,h,f,p,x,O,N)=>{try{Object.defineProperty(n,p,{configurable:!0,get(){if(!h)return;let w=h.pointers[f];if(!w)return;let A=h.getTextValue(w.percent);return te(A)?K(A,A):A},set:w=>{h.pointers[f]?h==null||h.setValue(w,f):h==null||h.addPointer(w)}}),Object.defineProperty(n,x,{configurable:!0,get(){var w,A;return(A=(w=h==null?void 0:h.pointers[f])==null?void 0:w.getAttr("aria-label"))!=null?A:void 0},set:w=>{!h||h.setAriaLabel(f,w)}}),Object.defineProperty(n,O,{configurable:!0,get(){var w,A;return(A=(w=h==null?void 0:h.styles)==null?void 0:w.pointerShapes[f])!=null?A:null},set:w=>{!h||!h.styles||h.styles.setPointerShape(f,w)}}),Object.defineProperty(n,N,{configurable:!0,get(){var w;return(w=h==null?void 0:h.pointers[f].disabled)!=null?w:!1},set:w=>{if(!h)return;let A=h==null?void 0:h.pointers[f];!A||(A.disabled=w)}})}catch(w){console.error(w)}},Un=(n,h)=>{let f=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let p=2;p<Hn;p++)f.push([`value${p}`,`ariaLabel${p}`,`pointer${p}Shape`,`pointer${p}Disabled`,p-1]);for(let p of f)fi(n,h,p[4],p[0],p[1],p[2],p[3])},gi=(n,h,f)=>{var p;let x=(p=f.shadowRoot)==null?void 0:p.querySelector(".container");if(x)for(let O of n)h?x.prepend(O.$pointer):x.append(O.$pointer)},rs=0,pt=100,it=2,mi="0.3s",Bn=(n,h,f)=>{let p=f.map(l=>l[0]),x=null,O=null,N=null,w=null,A=rs,j=pt,F,S,Y=Ee,Me=it,ve=!1,C=!1,H=!1,L=0,J=1/0,ue=!1,he,ne,oe=!1,_e=!1,xe=!1,Ue=mi,vi=[],yi=l=>{oe||(l.preventDefault&&l.preventDefault(),Ke(l),window.addEventListener("mousemove",Ke),window.addEventListener("mouseup",Et),un(n,l))},Et=l=>{oe||(he=void 0,ne=void 0,window.removeEventListener("mousemove",Ke),window.removeEventListener("mouseup",Et),Ue&&h.classList.add(st),dn(n,l))},Vn=(l,g)=>{if(p.length<=0)return;if(p.length===1)return p[0].isClicked(l)&&Ue&&h.classList.remove(st),p[0];let M=Kn(l);if(ue){let W=g,Le=St(W);Le!==void 0&&(W=et(W,Le)),M?(he=W,ne=0,Ue&&h.classList.remove(st)):he!==void 0&&(ne=W-he,he=W)}if(!Yn(l)&&!M){for(let W of p)if(!(!W.isClicked(l)||W.disabled))return Ue&&h.classList.remove(st),W;for(let W of p)if(x===W)return W}let q=1/0,le=null;for(let W of p){if(W.disabled)continue;let Le=Math.abs(g-W.percent);Le<q&&(q=Le,le=W)}return le},bi=()=>p.findIndex(l=>x===l&&!l.disabled),Ke=l=>{let g;if(Y===de){let{height:q,top:le}=h.getBoundingClientRect(),W=l.type.indexOf("mouse")!==-1?l.clientY:l.touches[0].clientY;g=Math.min(Math.max(0,W-le),q)*100/q}else{let{width:q,left:le}=h.getBoundingClientRect(),W=l.type.indexOf("mouse")!==-1?l.clientX:l.touches[0].clientX;g=Math.min(Math.max(0,W-le),q)*100/q}if((ve||C)&&(g=100-g),x=Vn(l.target,g),ue&&p.length>1&&ne!==void 0){let q=p[0],le=p[p.length-1],W=q.percent+ne<0,Le=le.percent+ne>100;if(W||Le)return;for(let Pt=0;Pt<p.length;Pt++)we(Pt,p[Pt].percent+ne);return}let M=bi();M!==-1&&(we(M,g),x==null||x.$pointer.focus())},Mt=l=>{if(oe||document.activeElement!==n||x!=null&&x.disabled)return;l.stopPropagation(),l.preventDefault();let g=l.deltaY<0,M=ve||C,q=g?!M:M,le=bi();le!==-1&&(q?ft(le,p[le].percent):gt(le,p[le].percent))},$i=l=>{oe||_e||(Y===de?C?we(l,100):we(l,0):ve?gt(l,p[l].percent):ft(l,p[l].percent))},_i=l=>{oe||_e||(Y===de?C?we(l,0):we(l,100):ve?ft(l,p[l].percent):gt(l,p[l].percent))},xi=l=>{oe||_e||(Y===de?C?gt(l,p[l].percent):ft(l,p[l].percent):ve?we(l,100):we(l,0))},wi=l=>{oe||_e||(Y===de?C?ft(l,p[l].percent):gt(l,p[l].percent):ve?we(l,0):we(l,100))},Yn=l=>l.classList.contains("panel"),Kn=l=>l.classList.contains("panel-fill"),ft=(l,g)=>{if(g===void 0)return;let M=St(g);M==null&&(M=1),g-=M,g<0&&(g=0),we(l,g)},gt=(l,g)=>{if(g===void 0)return;let M=St(g);M==null&&(M=1),g+=M,g>100&&(g=100),we(l,g)},qe=()=>{!w||w.update({percents:Ai(),values:Ei(),$pointers:Mi(),min:Si(),max:ki(),data:ls(),step:os(),round:hs(),type:as(),textMin:kt(),textMax:Ot(),rightToLeft:ds(),bottomToTop:ps(),pointersOverlap:vs(),pointersMinDistance:cs(),pointersMaxDistance:us(),rangeDragging:ys(),disabled:fs(),keyboardDisabled:gs(),mousewheelDisabled:ms()})},qn=()=>{qe()},Xn=l=>{if(!(H||p.length<=1||j===A))if(l===0){let g=J*100/(j-A);return Math.max(0,p[l+1].percent-g)}else{let g=L*100/(j-A);return Math.min(p[l-1].percent+g,100)}},Jn=l=>{if(!(H||p.length<=1||j===A))if(l===p.length-1){let g=J*100/(j-A);return Math.min(p[l-1].percent+g,100)}else{let g=L*100/(j-A);return Math.max(0,p[l+1].percent-g)}},St=l=>{let g;if(typeof F=="function"){let M=Re(0,100,A,j,l);g=F(M,l)}else g=F;if(te(g)){let M=j-A;return g=M===0?0:g*100/M,g}},rt=l=>{if(l===void 0)return;let g=Re(0,100,A,j,l);return S!==void 0?S[Math.round(g)]:tt(g,Me)},kt=()=>S!==void 0?S[A]:A,Ot=()=>S!==void 0?S[j]:j,os=()=>F,Gn=l=>{var g;return l<=0||H?kt():(g=rt(p[l-1].percent))!=null?g:""},Zn=l=>{var g;return p.length<=1||l>=p.length-1||H?Ot():(g=rt(p[l+1].percent))!=null?g:""},Ai=()=>p.map(l=>l.percent),Ei=()=>p.map(l=>rt(l.percent)),Mi=()=>p.map(l=>l.$pointer),Si=()=>A,ki=()=>j,ls=()=>S,as=()=>Y,hs=()=>Me,cs=()=>L,us=()=>J,Qn=l=>vi[l],ds=()=>ve,ps=()=>C,fs=()=>oe,gs=()=>_e,ms=()=>xe,vs=()=>H,ys=()=>ue,we=(l,g)=>{if(g===void 0)return;let M=St(g);M!==void 0&&(g=et(g,M));let q=p[l];if(!q)return;let le=q.updatePosition(g,Xn(l),Jn(l),Y,ve,C);O==null||O.updatePosition(Y,p.map(W=>W.percent),ve,C),qe();for(let W of p){let Le=rt(W.percent);Le!==void 0&&(W.setAttr("aria-valuenow",Le.toString()),W.setAttr("aria-valuetext",Le.toString()))}to(),le&&fn(n,p.map(W=>rt(W.percent)))},Pe=()=>{for(let l=0;l<p.length;l++)we(l,p[l].percent)},eo=(l,g)=>{A=S!==void 0?0:K(l,rs),j=S!==void 0?S.length-1:K(g,pt),Ct(A),Lt(j)},to=()=>{var l,g;for(let M=0;M<p.length;M++){let q=p[M];q.setAttr("aria-valuemin",((l=Gn(M))!=null?l:"").toString()),q.setAttr("aria-valuemax",((g=Zn(M))!=null?g:"").toString())}},Ct=l=>{A=K(l,rs),A>j&&(j=A+pt),Pe()},Lt=l=>{j=K(l,pt),j<A&&(j=A+pt),Pe()},Oi=l=>{H=!0;for(let g=0;g<l.length;g++)Tt(l[g],g);H=!1;for(let g=0;g<l.length;g++)Tt(l[g],g)},Tt=(l,g)=>{let M;S!==void 0?(M=l==null?0:mn(l,S),M===-1&&(M=0)):(M=K(l,A),M<A&&(M=A),M>j&&(M=j));let q=Re(A,j,0,100,M);we(g,q)},Dt=l=>{if(l==null){F=void 0;return}if(typeof l=="function"){F=l,Pe();return}if(te(l)){F=K(l,1);let g=Math.abs(j-A);F>g&&(F=void 0),Pe();return}F=void 0},bs=l=>{H=l,Pe()},$s=l=>{(!te(l)||l<0)&&(l=0),L=l},_s=l=>{(!te(l)||l<0)&&(l=1/0),J=l},xs=l=>{oe=l,h.classList.toggle("disabled",oe),oe?h.setAttribute("aria-disabled","true"):h.hasAttribute("aria-disabled")&&h.removeAttribute("aria-disabled")},Ci=l=>{_e=l},Li=l=>{xe=l,xe?document.removeEventListener("wheel",Mt):document.addEventListener("wheel",Mt,{passive:!1})},ws=l=>{if(l==null){S=void 0;return}if(S=gn(l),S===void 0||S.length<=0){S=void 0;return}Ct(0),Lt(S.length-1),F===void 0&&Dt(1)},As=l=>{var g;typeof l=="string"?Y=l.trim().toLowerCase()===de?de:Ee:Y=Ee;let M=(g=n.shadowRoot)==null?void 0:g.querySelector(".range-slider-box");if(!M)return;M.className=`range-slider-box type-${Y}`,Pe();let q=Y===de?"vertical":"horizontal";for(let le of p)le.setAttr("aria-orientation",q)},Es=l=>{ve=l,p.length>1&&gi(p,ve,n),Pe(),qe()},Ms=l=>{C=l,p.length>1&&gi(p,C,n),Pe(),qe()},Ss=l=>{Me=K(l,it),Me<0&&(Me=it),qe()},Ti=l=>{l==null||l.toString().trim().toLowerCase()==="false"?(Ue=void 0,h.style.removeProperty(ui),h.classList.remove(st)):(Ue=l.toString(),h.style.setProperty(ui,Ue),h.classList.add(st))},Di=(l,g)=>{let M=p[l];!M||(M.setAttr("aria-label",g),vi[l]=g)},Rt=l=>{if(he=void 0,p.length<=1){ue=!1,h.classList.remove(pi);return}ue=l,h.classList.toggle(pi,ue)},so=()=>{xs(pe(n.getAttribute(me))),_e=pe(n.getAttribute(Se)),xe=pe(n.getAttribute($e));let l=At(n,/^pointer([0-9]*)-disabled$/,g=>pe(g));for(let g of l){let M=g[0];!p[M]||(p[M].disabled=g[1])}},io=()=>{let l=At(n,/^aria-label([0-9]*)$/);for(let g of l){let M=g[0];Di(M,g[1])}},ro=l=>{let g=p.length,M=p[g-1].$pointer,q=M.cloneNode(!0);M.after(q);let le=is(n,q,g);return le.setCallbacks($i,_i,xi,wi),p.push(le),Tt(l,g),Pe(),qe(),g},no=()=>{let l=p.length,g=p[l-1];return g?(g.destroy(),p.pop(),p.length<=1&&Rt(!1),Pe(),qe(),l-1):-1};return(()=>{var l,g;for(let q of p)q.setCallbacks($i,_i,xi,wi);let M=(l=n.shadowRoot)==null?void 0:l.querySelector(".panel-fill");M&&(O=vn(M)),As(n.getAttribute(G)),Es(pe(n.getAttribute(ae))),Ms(pe(n.getAttribute(be))),eo(n.getAttribute(m),n.getAttribute($)),Dt(n.getAttribute(E)),ws(n.getAttribute(v)),Oi(f.map(q=>q[1])),bs(pe(n.getAttribute(a))),$s(K(n.getAttribute(c),0)),_s(K(n.getAttribute(u),1/0)),Rt(pe(n.getAttribute(d))),Ss(K(n.getAttribute(P),it)),so(),io(),N=Nn(n,h,p),Ti((g=n.getAttribute(Oe))!=null?g:mi),h.addEventListener("mousedown",yi),h.addEventListener("mouseup",Et),h.addEventListener("touchmove",Ke),h.addEventListener("touchstart",Ke),xe||document.addEventListener("wheel",Mt,{passive:!1}),w=jn(n,qn,{setValues:Oi,setMin:Ct,setMax:Lt,setStep:Dt,setPointersOverlap:bs,setPointersMinDistance:$s,setPointersMaxDistance:_s,setDisabled:xs,setType:As,setRightToLeft:Es,setBottomToTop:Ms,setRound:Ss,setKeyboardDisabled:Ci,setMousewheelDisabled:Li,setRangeDragging:Rt,setData:ws},{getPercents:Ai,getValues:Ei,getPointerElements:Mi,getMin:Si,getMax:ki,getStep:os,getData:ls,getType:as,getRound:hs,getTextMin:kt,getTextMax:Ot,isRightToLeft:ds,isBottomToTop:ps,isDisabled:fs,isKeyboardDisabled:gs,isMousewheelDisabled:ms,isPointersOverlap:vs,isRangeDraggingEnabled:ys,getPointersMinDistance:cs,getPointersMaxDistance:us}),w.init()})(),{get pointers(){return p},get styles(){return N},get pluginsManager(){return w},get min(){return kt()},get max(){return Ot()},get step(){return os()},get pointersOverlap(){return vs()},set pointersOverlap(l){bs(l)},get pointersMinDistance(){return cs()},set pointersMinDistance(l){$s(l)},get pointersMaxDistance(){return us()},set pointersMaxDistance(l){_s(l)},get disabled(){return fs()},set disabled(l){xs(l)},get data(){return ls()},get type(){return as()},set type(l){As(l)},get rightToLeft(){return ds()},set rightToLeft(l){Es(l)},get bottomToTop(){return ps()},set bottomToTop(l){Ms(l)},get round(){return hs()},set round(l){Ss(l)},get animateOnClick(){return Ue},set animateOnClick(l){Ti(l)},get keyboardDisabled(){return gs()},set keyboardDisabled(l){Ci(l)},get mousewheelDisabled(){return ms()},set mousewheelDisabled(l){Li(l)},get rangeDragging(){return ys()},set rangeDragging(l){Rt(l)},setMin:Ct,setMax:Lt,setValue:Tt,setStep:Dt,setData:ws,getTextValue:rt,setAriaLabel:Di,getAriaLabel:Qn,addPointer:ro,removePointer:no,destroy:()=>{h.removeEventListener("mousedown",yi),h.removeEventListener("mouseup",Et),h.removeEventListener("touchmove",Ke),h.removeEventListener("touchstart",Ke),document.removeEventListener("wheel",Mt);for(let l of p)l.destroy();w==null||w.destroy()}}},zn=(n,h,f)=>{let p=di.find(([w,A,j,F])=>A.replace("#","")===h.replace(/\d+/g,""));if(p&&n.styles){let[w,A,j,F]=p,S=h.replace(/\D/g,"").trim(),Y=S===""||S==="0"||S==="1"?0:K(S,0)-1;n.styles.setStyle(w,f,Y);return}switch(n&&n.pluginsManager&&n.pluginsManager.onAttrChange(h,f),h){case m:{n.setMin(f);break}case $:{n.setMax(f);break}case E:{n.setStep(f);break}case a:{n.pointersOverlap=pe(f);break}case c:{n.pointersMinDistance=K(f,0);break}case d:{n.rangeDragging=pe(f);break}case u:{n.pointersMaxDistance=K(f,1/0);break}case me:{n.disabled=pe(f);break}case Se:{n.keyboardDisabled=pe(f);break}case $e:{n.mousewheelDisabled=pe(f);break}case v:{n.setData(f);break}case G:{n.type=f;break}case ae:{n.rightToLeft=pe(f);break}case be:{n.bottomToTop=pe(f);break}case P:{n.round=K(f,it);break}case ye:{n.styles&&(n.styles.theme=f);break}case Oe:{n.animateOnClick=f;break}}let x=null;if(/^value([0-9]*)$/.test(h)&&(x="value"),/^pointer([0-9]*)-disabled$/.test(h)&&(x="pointer-disabled"),/^aria-label([0-9]*)$/.test(h)&&(x="aria-label"),/^pointer([0-9]*)-shape$/.test(h)&&(x="pointer-shape"),!x)return;let O=h.replace(/\D/g,"").trim(),N=O===""||O==="0"||O==="1"?0:K(O,0)-1;switch(x){case"value":{n.setValue(f,N);break}case"pointer-disabled":{let w=n==null?void 0:n.pointers[N];if(!w)return;w.disabled=pe(f);break}case"aria-label":{n.setAriaLabel(N,f);break}case"pointer-shape":{n.styles&&n.styles.setPointerShape(N,f);break}}},Wn=class extends HTMLElement{constructor(){super(),s(this,"slider"),s(this,"_externalCSSList",[]),s(this,"_observer",null),this.attachShadow({mode:"open"})}set step(n){this.slider&&this.slider.setStep(n)}get step(){var n;return(n=this.slider)==null?void 0:n.step}set disabled(n){this.slider&&(this.slider.disabled=n)}get disabled(){var n,h;return(h=(n=this.slider)==null?void 0:n.disabled)!=null?h:!1}set data(n){var h;(h=this.slider)==null||h.setData(n)}get data(){var n;return(n=this.slider)==null?void 0:n.data}set min(n){var h;(h=this.slider)==null||h.setMin(n)}get min(){var n;return(n=this.slider)==null?void 0:n.min}set max(n){var h;(h=this.slider)==null||h.setMax(n)}get max(){var n;return(n=this.slider)==null?void 0:n.max}set round(n){!this.slider||(this.slider.round=n)}get round(){var n,h;return(h=(n=this.slider)==null?void 0:n.round)!=null?h:it}set type(n){!this.slider||(this.slider.type=n??Ee)}get type(){var n;return((n=this.slider)==null?void 0:n.type)||Ee}set pointersOverlap(n){!this.slider||(this.slider.pointersOverlap=n)}get pointersOverlap(){var n,h;return(h=(n=this.slider)==null?void 0:n.pointersOverlap)!=null?h:!1}set pointersMinDistance(n){!this.slider||(this.slider.pointersMinDistance=n)}get pointersMinDistance(){var n,h;return(h=(n=this.slider)==null?void 0:n.pointersMinDistance)!=null?h:0}set pointersMaxDistance(n){!this.slider||(this.slider.pointersMaxDistance=n)}get pointersMaxDistance(){var n,h;return(h=(n=this.slider)==null?void 0:n.pointersMaxDistance)!=null?h:1/0}set theme(n){!this.slider||!this.slider.styles||(this.slider.styles.theme=n)}get theme(){var n,h,f;return(f=(h=(n=this.slider)==null?void 0:n.styles)==null?void 0:h.theme)!=null?f:null}set rtl(n){!this.slider||(this.slider.rightToLeft=n)}get rtl(){var n,h;return(h=(n=this.slider)==null?void 0:n.rightToLeft)!=null?h:!1}set btt(n){!this.slider||(this.slider.bottomToTop=n)}get btt(){var n,h;return(h=(n=this.slider)==null?void 0:n.bottomToTop)!=null?h:!1}set keyboardDisabled(n){!this.slider||(this.slider.keyboardDisabled=n)}get keyboardDisabled(){var n,h;return(h=(n=this.slider)==null?void 0:n.keyboardDisabled)!=null?h:!1}set mousewheelDisabled(n){!this.slider||(this.slider.mousewheelDisabled=n)}get mousewheelDisabled(){var n,h;return(h=(n=this.slider)==null?void 0:n.mousewheelDisabled)!=null?h:!1}set animateOnClick(n){!this.slider||(this.slider.animateOnClick=n)}get animateOnClick(){var n;return(n=this.slider)==null?void 0:n.animateOnClick}get rangeDragging(){var n,h;return(h=(n=this.slider)==null?void 0:n.rangeDragging)!=null?h:!1}set rangeDragging(n){this.slider&&(this.slider.rangeDragging=pe(n))}get externalCSSList(){return this._externalCSSList}addPointer(n){var h;if(!this.slider)return;let f=(h=this.slider)==null?void 0:h.addPointer(n);fi(this,this.slider,f,`value${f+1}`,`ariaLabel${f+1}`,`pointerShape${f+1}`,`pointer${f+1}Disabled`)}removePointer(){var n;!this.slider||(n=this.slider)==null||n.removePointer()}addCSS(n){if(!this.shadowRoot)return;let h=document.createElement("style");h.textContent=n,this.shadowRoot.appendChild(h)}connectedCallback(){var n,h;if(!this.shadowRoot)return;this._externalCSSList=In(this),this.shadowRoot.innerHTML=i(o,this._externalCSSList);let f=(n=this.shadowRoot)==null?void 0:n.querySelector(".pointer");if(!f)return;let p=(h=this.shadowRoot)==null?void 0:h.getElementById("range-slider");if(!p)return;let x=Fn(this,f);this.slider=Bn(this,p,x),Un(this,this.slider),this._observer=new MutationObserver(O=>{O.forEach(N=>{var w;if(!this.slider||N.type!=="attributes")return;let A=N.attributeName;!A||zn(this.slider,A,(w=this.getAttribute(A))!=null?w:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},ns=Wn;window.tcRangeSlider=ns,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",ns),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends ns{})})();var hi={exports:{}};(function(r,e){(function(t,s){r.exports=s()})(dt,function(){var t=1e3,s=6e4,i=36e5,o="millisecond",a="second",c="minute",u="hour",d="day",v="week",m="month",$="quarter",E="year",P="date",G="Invalid Date",ye=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ae=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,be={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var y=["th","st","nd","rd"],b=D%100;return"["+D+(y[(b-20)%10]||y[b]||y[0])+"]"}},me=function(D,y,b){var k=String(D);return!k||k.length>=y?D:""+Array(y+1-k.length).join(b)+D},Se={s:me,z:function(D){var y=-D.utcOffset(),b=Math.abs(y),k=Math.floor(b/60),_=b%60;return(y<=0?"+":"-")+me(k,2,"0")+":"+me(_,2,"0")},m:function D(y,b){if(y.date()<b.date())return-D(b,y);var k=12*(b.year()-y.year())+(b.month()-y.month()),_=y.clone().add(k,m),I=b-_<0,R=y.clone().add(k+(I?-1:1),m);return+(-(k+(b-_)/(I?_-R:R-_))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:m,y:E,w:v,d,D:P,h:u,m:c,s:a,ms:o,Q:$}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},$e="en",U={};U[$e]=be;var X=function(D){return D instanceof De},re=function D(y,b,k){var _;if(!y)return $e;if(typeof y=="string"){var I=y.toLowerCase();U[I]&&(_=I),b&&(U[I]=b,_=I);var R=y.split("-");if(!_&&R.length>1)return D(R[0])}else{var V=y.name;U[V]=y,_=V}return!k&&_&&($e=_),_||!k&&$e},z=function(D,y){if(X(D))return D.clone();var b=typeof y=="object"?y:{};return b.date=D,b.args=arguments,new De(b)},B=Se;B.l=re,B.i=X,B.w=function(D,y){return z(D,{locale:y.$L,utc:y.$u,x:y.$x,$offset:y.$offset})};var De=function(){function D(b){this.$L=re(b.locale,null,!0),this.parse(b)}var y=D.prototype;return y.parse=function(b){this.$d=function(k){var _=k.date,I=k.utc;if(_===null)return new Date(NaN);if(B.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var R=_.match(ye);if(R){var V=R[2]-1||0,se=(R[7]||"0").substring(0,3);return I?new Date(Date.UTC(R[1],V,R[3]||1,R[4]||0,R[5]||0,R[6]||0,se)):new Date(R[1],V,R[3]||1,R[4]||0,R[5]||0,R[6]||0,se)}}return new Date(_)}(b),this.$x=b.x||{},this.init()},y.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},y.$utils=function(){return B},y.isValid=function(){return this.$d.toString()!==G},y.isSame=function(b,k){var _=z(b);return this.startOf(k)<=_&&_<=this.endOf(k)},y.isAfter=function(b,k){return z(b)<this.startOf(k)},y.isBefore=function(b,k){return this.endOf(k)<z(b)},y.$g=function(b,k,_){return B.u(b)?this[k]:this.set(_,b)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(b,k){var _=this,I=!!B.u(k)||k,R=B.p(b),V=function(Re,te){var K=B.w(_.$u?Date.UTC(_.$y,te,Re):new Date(_.$y,te,Re),_);return I?K:K.endOf(d)},se=function(Re,te){return B.w(_.toDate()[Re].apply(_.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(te)),_)},ee=this.$W,ce=this.$M,Oe=this.$D,Ce="set"+(this.$u?"UTC":"");switch(R){case E:return I?V(1,0):V(31,11);case m:return I?V(1,ce):V(0,ce+1);case v:var de=this.$locale().weekStart||0,Ee=(ee<de?ee+7:ee)-de;return V(I?Oe-Ee:Oe+(6-Ee),ce);case d:case P:return se(Ce+"Hours",0);case u:return se(Ce+"Minutes",1);case c:return se(Ce+"Seconds",2);case a:return se(Ce+"Milliseconds",3);default:return this.clone()}},y.endOf=function(b){return this.startOf(b,!1)},y.$set=function(b,k){var _,I=B.p(b),R="set"+(this.$u?"UTC":""),V=(_={},_[d]=R+"Date",_[P]=R+"Date",_[m]=R+"Month",_[E]=R+"FullYear",_[u]=R+"Hours",_[c]=R+"Minutes",_[a]=R+"Seconds",_[o]=R+"Milliseconds",_)[I],se=I===d?this.$D+(k-this.$W):k;if(I===m||I===E){var ee=this.clone().set(P,1);ee.$d[V](se),ee.init(),this.$d=ee.set(P,Math.min(this.$D,ee.daysInMonth())).$d}else V&&this.$d[V](se);return this.init(),this},y.set=function(b,k){return this.clone().$set(b,k)},y.get=function(b){return this[B.p(b)]()},y.add=function(b,k){var _,I=this;b=Number(b);var R=B.p(k),V=function(ce){var Oe=z(I);return B.w(Oe.date(Oe.date()+Math.round(ce*b)),I)};if(R===m)return this.set(m,this.$M+b);if(R===E)return this.set(E,this.$y+b);if(R===d)return V(1);if(R===v)return V(7);var se=(_={},_[c]=s,_[u]=i,_[a]=t,_)[R]||1,ee=this.$d.getTime()+b*se;return B.w(ee,this)},y.subtract=function(b,k){return this.add(-1*b,k)},y.format=function(b){var k=this,_=this.$locale();if(!this.isValid())return _.invalidDate||G;var I=b||"YYYY-MM-DDTHH:mm:ssZ",R=B.z(this),V=this.$H,se=this.$m,ee=this.$M,ce=_.weekdays,Oe=_.months,Ce=function(te,K,et,tt){return te&&(te[K]||te(k,I))||et[K].slice(0,tt)},de=function(te){return B.s(V%12||12,te,"0")},Ee=_.meridiem||function(te,K,et){var tt=te<12?"AM":"PM";return et?tt.toLowerCase():tt},Re={YY:String(this.$y).slice(-2),YYYY:B.s(this.$y,4,"0"),M:ee+1,MM:B.s(ee+1,2,"0"),MMM:Ce(_.monthsShort,ee,Oe,3),MMMM:Ce(Oe,ee),D:this.$D,DD:B.s(this.$D,2,"0"),d:String(this.$W),dd:Ce(_.weekdaysMin,this.$W,ce,2),ddd:Ce(_.weekdaysShort,this.$W,ce,3),dddd:ce[this.$W],H:String(V),HH:B.s(V,2,"0"),h:de(1),hh:de(2),a:Ee(V,se,!0),A:Ee(V,se,!1),m:String(se),mm:B.s(se,2,"0"),s:String(this.$s),ss:B.s(this.$s,2,"0"),SSS:B.s(this.$ms,3,"0"),Z:R};return I.replace(ae,function(te,K){return K||Re[te]||R.replace(":","")})},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(b,k,_){var I,R=B.p(k),V=z(b),se=(V.utcOffset()-this.utcOffset())*s,ee=this-V,ce=B.m(this,V);return ce=(I={},I[E]=ce/12,I[m]=ce,I[$]=ce/3,I[v]=(ee-se)/6048e5,I[d]=(ee-se)/864e5,I[u]=ee/i,I[c]=ee/s,I[a]=ee/t,I)[R]||ee,_?ce:B.a(ce)},y.daysInMonth=function(){return this.endOf(m).$D},y.$locale=function(){return U[this.$L]},y.locale=function(b,k){if(!b)return this.$L;var _=this.clone(),I=re(b,k,!0);return I&&(_.$L=I),_},y.clone=function(){return B.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},D}(),ke=De.prototype;return z.prototype=ke,[["$ms",o],["$s",a],["$m",c],["$H",u],["$W",d],["$M",m],["$y",E],["$D",P]].forEach(function(D){ke[D[1]]=function(y){return this.$g(y,D[0],D[1])}}),z.extend=function(D,y){return D.$i||(D(y,De,z),D.$i=!0),z},z.locale=re,z.isDayjs=X,z.unix=function(D){return z(1e3*D)},z.en=U[$e],z.Ls=U,z.p={},z})})(hi);var sn=hi.exports;const wt=oi(sn);class rn extends ct{constructor(){super(...arguments),this.templates={},this._renderedTemplates={}}setBindingSyntax(e,t){this._startExpression=e,this._endExpression=t;const s=this.escapeRegex(this._startExpression),i=this.escapeRegex(this._endExpression);this._expression=new RegExp(`${s}\\s*([$\\w\\.,'"\\s()\\[\\]]+)\\s*${i}`,"g")}hasTemplate(e){return this.templates&&!!this.templates[e]}renderTemplate(e,t,s){if(!this.hasTemplate(e))return null;s=s||e;const i=ge` <slot name=${s}></slot> `,o={[e]:{...t}};if(this._renderedTemplates.hasOwnProperty(s)){const{slot:c}=this._renderedTemplates[s];this.contains(c)&&this.removeChild(c)}const a=document.createElement("div");return a.slot=s,a.dataset.generated="template",this._renderTemplate(a,this.templates[e],o),this.appendChild(a),this._renderedTemplates[s]={context:o,slot:a},i}getTemplates(){const e={};for(let t=0;t<this.children.length;t++){const s=this.children[t];if(s.nodeName==="TEMPLATE"){const i=s;i.dataset.type?e[i.dataset.type]=i:e.default=i,i.templateOrder=t}}return e}_renderTemplate(e,t,s){let i;if(t.content&&t.content.childNodes.length){const o=t.content.cloneNode(!0);i=this.renderNode(o,e,s)}i&&e.appendChild(i)}expandExpressionsAsString(e,t){return e.replace(this.expression,(s,i)=>{const o=this.evalInContext(i||this.trimExpression(s),t);return o?typeof o=="object"?JSON.stringify(o):o.toString():""})}get expression(){return this._expression||this.setBindingSyntax("{{","}}"),this._expression}escapeRegex(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}evalInContext(e,t){t={...t};const s=new Function("with(this) { return "+e+";}");let i;try{i=s.call(t)}catch{}return i}trimExpression(e){return e=e.trim(),e.startsWith(this._startExpression)&&e.endsWith(this._endExpression)&&(e=e.substr(this._startExpression.length,e.length-this._startExpression.length-this._endExpression.length),e=e.trim()),e}renderNode(e,t,s){if(e.nodeName==="#text")return e.textContent=this.expandExpressionsAsString(e.textContent,s),e;if(e.nodeName==="TEMPLATE")return e.$parentTemplateContext=s,e;for(let i=0;i<e.childNodes.length;i++){const o=e.childNodes[i];this.renderNode(o,t,s)}return e}updated(){this.templates=this.getTemplates()}}const nn=(r,e="highlight",t="title")=>{const s=(o,a,c)=>{const u=a.split(".");let d;for(d=0;d<u.length-1;d++)o=o[u[d]];o[u[d]]=c},i=(o,a=[])=>{let c="",u=0;return a.forEach(d=>{const v=d[1]+1;c+=[o.substring(u,d[0]),`<mark class="${e}">`,o.substring(d[0],v),"</mark>"].join(""),u=v}),c+=o.substring(u),c};return r.filter(({matches:o})=>o&&o.length).map(({item:o,matches:a})=>{const c={...o};return a.forEach(u=>{u.key===t&&s(c,u.key,i(u.value,u.indices))}),c})},on=`
|
|
52
52
|
:host {
|
|
53
53
|
display: flex;
|
|
54
54
|
box-sizing: border-box;
|
|
@@ -205,7 +205,7 @@ section.inline details.details-filter summary {
|
|
|
205
205
|
overflow-x: hidden;
|
|
206
206
|
overflow-y: auto;
|
|
207
207
|
}
|
|
208
|
-
`;var an=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,Fe=(r,e,t,s)=>{for(var i=s>1?void 0:s?hn(e,t):e,o=r.length-1,a;o>=0;o--)(a=r[o])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&an(e,t,i),i};class ci{constructor(){Z(this,"aggregateResults");Z(this,"enableHighlighting",!1);Z(this,"enableSearch",!1);Z(this,"exclusiveFilters",!1);Z(this,"externalSearch");Z(this,"filterProperties",[]);Z(this,"fuseConfig",{keys:["title"]});Z(this,"inlineMode",!1);Z(this,"matchAllWhenEmpty",!0);Z(this,"onSearch",()=>{});Z(this,"onSelect",()=>{});Z(this,"showResults",!0);Z(this,"titleProperty","title")}}ie.EOxItemFilter=class extends rn{constructor(){super(...arguments);Z(this,"_fuse");Z(this,"_resultAggregation",[]);Z(this,"_items",[]);Z(this,"_results");Z(this,"_filters",{});Z(this,"_selectedResult");Z(this,"_config",new ci);Z(this,"apply",t=>{this._items=t.map((s,i)=>({id:`item-${i}`,...s})),this._fuse=new Qe(this._items,{threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...this._config.fuseConfig}),this._config.filterProperties.length&&this._config.filterProperties.forEach(s=>{const i={},o=a=>s.format==="date"?wt(a).unix():parseInt(a);this._items.forEach(a=>{if(s.type==="range"){if(Array.isArray(a[s.key])){const c=[o(a[s.key][0]),o(a[s.key][1])];i.min=i.min!==void 0?Math.min(i.min,c[0]):c[0],i.max=i.max!==void 0?Math.max(i.max,c[1]):c[1]}else{const c=o(a[s.key]);i.min=i.min!==void 0?Math.min(i.min,c):c,i.max=i.max!==void 0?Math.max(i.max,c):c}return}Array.isArray(a[s.key])?a[s.key].forEach(c=>{i[c]=void 0}):i[a[s.key]]=void 0}),this._filters[s.key]={type:s.type||"string",keys:i,...s.type==="range"&&{min:i.min,max:i.max,format:s.format}}}),this._config.matchAllWhenEmpty!==!1&&(this._results=this.sortResults(this._items),this.requestUpdate()),this._config.aggregateResults&&(this._resultAggregation=[...new Set(this._items.reduce((s,i)=>s.concat(i[this._config.aggregateResults]),[]))].sort((s,i)=>s.localeCompare(i)))});Z(this,"unstyled");Z(this,"inputHandler",()=>{this.search(this.renderRoot.querySelector("input[type='text']").value)});Z(this,"debouncedInputHandler",tn(this.inputHandler,500,{leading:!0}))}set config(t){const s=this._config;this._config={...new ci,...t},this.requestUpdate("config",s)}get config(){return this._config}async search(t="",s=this._filters){const i=Object.entries(s).filter(([c,u])=>u.type==="string").reduce((c,[u,d])=>{const v="$or",m=[],$=E=>{const P={};P[u]=`="${E}"`,m.push(P)};return Object.entries(d.keys).filter(([E,P])=>P).forEach(([E,P])=>$(E)),m.length>0&&c.push({[v]:m}),c},[]);let o;if(!(t.length>0)&&!i.length&&this._config.matchAllWhenEmpty!==!1)o=this._items;else if(this.config.externalSearch)o=(await(await fetch(`${this.config.externalSearch(t,s)}`)).json()).features;else{const c={$and:[...t.length>0?[{$or:[...this._config.fuseConfig.keys.map(d=>({[d]:t}))]}]:[],...i]},u=this._fuse.search(c);o=this._config.enableHighlighting?nn(u,"highlight",this._config.titleProperty):u.map(d=>d.item)}const a=Object.entries(this._filters).filter(([c,u])=>u.type==="range").reduce((c,[u,d])=>(c[u]={min:d.keys.min,max:d.keys.max,format:d.format},c),{});if(Object.keys(a).length>0){const c=[];for(let u=0;u<o.length;u++){const d={};for(let[v,m]of Object.entries(a)){const $=E=>m.format==="date"?wt(E).unix():E;o[u].hasOwnProperty(v)?Array.isArray(o[u][v])?d[v]=a[v].min<=$(o[u][v][1])&&$(o[u][v][0])<=a[v].max:$(o[u][v])>=a[v].min&&$(o[u][v])<=a[v].max?d[v]=!0:d[v]=!1:d[v]=!0}Object.values(d).every(v=>!!v)&&c.push(o[u])}o=[...c]}this._results=this.sortResults(o),this._config.onSearch(o),this.requestUpdate()}aggregateResults(t,s){return t.filter(i=>{const o=i[this._config.aggregateResults]
|
|
208
|
+
`;var an=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,Fe=(r,e,t,s)=>{for(var i=s>1?void 0:s?hn(e,t):e,o=r.length-1,a;o>=0;o--)(a=r[o])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&an(e,t,i),i};class ci{constructor(){Z(this,"aggregateResults");Z(this,"enableHighlighting",!1);Z(this,"enableSearch",!1);Z(this,"exclusiveFilters",!1);Z(this,"externalSearch");Z(this,"filterProperties",[]);Z(this,"fuseConfig",{keys:["title"]});Z(this,"inlineMode",!1);Z(this,"matchAllWhenEmpty",!0);Z(this,"onSearch",()=>{});Z(this,"onSelect",()=>{});Z(this,"showResults",!0);Z(this,"titleProperty","title")}}ie.EOxItemFilter=class extends rn{constructor(){super(...arguments);Z(this,"_fuse");Z(this,"_resultAggregation",[]);Z(this,"_items",[]);Z(this,"_results");Z(this,"_filters",{});Z(this,"_selectedResult");Z(this,"_config",new ci);Z(this,"apply",t=>{this._items=t.map((s,i)=>({id:`item-${i}`,...s})),this._fuse=new Qe(this._items,{threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...this._config.fuseConfig}),this._config.filterProperties.length&&this._config.filterProperties.forEach(s=>{const i={},o=a=>s.format==="date"?wt(a).unix():parseInt(a);this._items.forEach(a=>{if(s.type==="range"){if(Array.isArray(a[s.key])){const c=[o(a[s.key][0]),o(a[s.key][1])];i.min=i.min!==void 0?Math.min(i.min,c[0]):c[0],i.max=i.max!==void 0?Math.max(i.max,c[1]):c[1]}else{const c=o(a[s.key]);i.min=i.min!==void 0?Math.min(i.min,c):c,i.max=i.max!==void 0?Math.max(i.max,c):c}return}Array.isArray(a[s.key])?a[s.key].forEach(c=>{i[c]=void 0}):i[a[s.key]]=void 0}),this._filters[s.key]={type:s.type||"string",keys:i,...s.type==="range"&&{min:i.min,max:i.max,format:s.format}}}),this._config.matchAllWhenEmpty!==!1&&(this._results=this.sortResults(this._items),this.requestUpdate()),this._config.aggregateResults&&(this._resultAggregation=[...new Set(this._items.reduce((s,i)=>s.concat(i[this._config.aggregateResults]),[]))].sort((s,i)=>s.localeCompare(i)))});Z(this,"unstyled");Z(this,"inputHandler",()=>{this.search(this.renderRoot.querySelector("input[type='text']").value)});Z(this,"debouncedInputHandler",tn(this.inputHandler,500,{leading:!0}))}set config(t){const s=this._config;this._config={...new ci,...t},this.requestUpdate("config",s)}get config(){return this._config}async search(t="",s=this._filters){const i=Object.entries(s).filter(([c,u])=>u.type==="string").reduce((c,[u,d])=>{const v="$or",m=[],$=E=>{const P={};P[u]=`="${E}"`,m.push(P)};return Object.entries(d.keys).filter(([E,P])=>P).forEach(([E,P])=>$(E)),m.length>0&&c.push({[v]:m}),c},[]);let o;if(!(t.length>0)&&!i.length&&this._config.matchAllWhenEmpty!==!1)o=this._items;else if(this.config.externalSearch)o=(await(await fetch(`${this.config.externalSearch(t,s)}`)).json()).features;else{const c={$and:[...t.length>0?[{$or:[...this._config.fuseConfig.keys.map(d=>({[d]:t}))]}]:[],...i]},u=this._fuse.search(c);o=this._config.enableHighlighting?nn(u,"highlight",this._config.titleProperty):u.map(d=>d.item)}const a=Object.entries(this._filters).filter(([c,u])=>u.type==="range").reduce((c,[u,d])=>(c[u]={min:d.keys.min,max:d.keys.max,format:d.format},c),{});if(Object.keys(a).length>0){const c=[];for(let u=0;u<o.length;u++){const d={};for(let[v,m]of Object.entries(a)){const $=E=>m.format==="date"?wt(E).unix():E;o[u].hasOwnProperty(v)?Array.isArray(o[u][v])?d[v]=a[v].min<=$(o[u][v][1])&&$(o[u][v][0])<=a[v].max:$(o[u][v])>=a[v].min&&$(o[u][v])<=a[v].max?d[v]=!0:d[v]=!1:d[v]=!0}Object.values(d).every(v=>!!v)&&c.push(o[u])}o=[...c]}this._results=this.sortResults(o),this._config.onSearch(o),this.requestUpdate()}aggregateResults(t,s){return t.filter(i=>{const o=i[this._config.aggregateResults];let a;return this._filters[this._config.aggregateResults]&&(a=Object.keys(this._filters[this._config.aggregateResults]).filter(u=>this._filters[this._config.aggregateResults].keys[u])),(a!=null&&a.length?a.includes(s):!0)&&Array.isArray(o)?o.includes(s):o===s})}sortResults(t){return[...t].sort((s,i)=>s[this._config.titleProperty].localeCompare(i[this._config.titleProperty]))}toggleFilter(t,s,i){i&&Object.keys(this._filters).filter(c=>this._filters[c].type==="string").forEach(c=>{this._config.filterProperties.find(u=>u.key===c).exclusive&&Object.keys(this._filters[c].keys).forEach(u=>{this._filters[c].keys[u]=!1})}),this._filters[t].keys[s]=!this._filters[t].keys[s];const o=this.renderRoot.querySelector('input[type="text"]');o?this.search(o.value):this.search();const a=this.renderRoot.querySelectorAll("ul#results input[type='radio']");for(let c=0;c<a.length;c++)a[c].checked=!1;this._selectedResult&&setTimeout(()=>{const c=this.renderRoot.querySelector(`#${this._selectedResult.id}`);c&&(c.checked=!0,this.requestUpdate())})}resetFilters(){this.renderRoot.querySelectorAll(".details-filter input").forEach(s=>{s.checked=!1});const t=this.renderRoot.querySelector('input[type="text"]');t&&(t.value=""),Object.keys(this._filters).forEach(s=>{if(this._filters[s].type==="range"){this._filters[s].keys.min=this._filters[s].min,this._filters[s].keys.max=this._filters[s].max;return}Object.keys(this._filters[s].keys).forEach(i=>{this._filters[s].keys[i]=!1})}),this.search(),this.requestUpdate()}render(){return ge`
|
|
209
209
|
<style>
|
|
210
210
|
${on}
|
|
211
211
|
${!this.unstyled&&ln}
|