@cas-smartdesign/token-selector 0.21.3 → 0.22.0
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/docs/1_remove_only.js +1 -1
- package/dist/docs/2_multi_select.js +1 -1
- package/dist/docs/3_editable_input_attributes.js +1 -1
- package/dist/docs/4_dnd.js +1 -1
- package/dist/docs/5_other.js +1 -1
- package/dist/docs/button.mjs +2 -2
- package/dist/docs/doc.css +1 -1
- package/dist/docs/doc.mjs +99 -101
- package/dist/docs/token-provider.mjs +1 -1
- package/dist/token-selector-with-externals.js +41 -77
- package/dist/token-selector-with-externals.js.map +4 -4
- package/dist/token-selector.mjs +121 -126
- package/dist/token-selector.mjs.map +1 -1
- package/dist/token-suggest-popover.d.ts +1 -0
- package/npm-third-party-licenses.json +52 -47
- package/package.json +13 -13
package/dist/docs/doc.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./1_remove_only.js","./token-provider.mjs","./2_multi_select.js","./button.mjs","./3_editable_input_attributes.js","./4_dnd.js","./5_other.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))s(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function i(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(n){if(n.ep)return;n.ep=!0;const r=i(n);fetch(n.href,r)}})();const uo="modulepreload",ho=function(t,e){return new URL(t,e).href},rs={},Vt=function(e,i,s){let n=Promise.resolve();if(i&&i.length>0){let h=function(a){return Promise.all(a.map(u=>Promise.resolve(u).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};const o=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),p=d?.nonce||d?.getAttribute("nonce");n=h(i.map(a=>{if(a=ho(a,s),a in rs)return;rs[a]=!0;const u=a.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(!!s)for(let g=o.length-1;g>=0;g--){const v=o[g];if(v.href===a&&(!u||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":uo,u||(f.as="script"),f.crossOrigin="",f.href=a,p&&f.setAttribute("nonce",p),document.head.appendChild(f),u)return new Promise((g,v)=>{f.addEventListener("load",g),f.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${a}`)))})}))}function r(o){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=o,window.dispatchEvent(d),!d.defaultPrevented)throw o}return n.then(o=>{for(const d of o||[])d.status==="rejected"&&r(d.reason);return e().catch(r)})},po=`<div id="remove-only-example" class="example-root">
|
|
2
3
|
<label id="remove_only_tokens">Remove only tokens</label>
|
|
3
4
|
<sd-token-selector aria-labelledby="remove_only_tokens" selection-mode="remove-only"></sd-token-selector>
|
|
4
5
|
|
|
@@ -14,8 +15,8 @@
|
|
|
14
15
|
selection-mode="remove-only"
|
|
15
16
|
aria-disabled="true"></sd-token-selector>
|
|
16
17
|
</div>
|
|
17
|
-
`,
|
|
18
|
-
`,
|
|
18
|
+
`,fo=`<h3 id="remove-only-token-viewer">Remove only token viewer</h3>
|
|
19
|
+
`,Gt=`.example-root {
|
|
19
20
|
width: 100%;
|
|
20
21
|
max-width: 600px;
|
|
21
22
|
}
|
|
@@ -52,7 +53,7 @@ sd-token[type="system-tag"] {
|
|
|
52
53
|
sd-token-selector[drop] {
|
|
53
54
|
--input-wrapper-background-color: #dfeff9;
|
|
54
55
|
}
|
|
55
|
-
`,
|
|
56
|
+
`,go=`import TokenSelector from "@cas-smartdesign/token-selector";
|
|
56
57
|
import { getItems } from "token-provider";
|
|
57
58
|
|
|
58
59
|
TokenSelector.ensureDefined();
|
|
@@ -65,7 +66,7 @@ document.querySelectorAll("#remove-only-example sd-token-selector").forEach((sel
|
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
68
|
});
|
|
68
|
-
`,
|
|
69
|
+
`,Sn=`import { TokenData } from "@cas-smartdesign/token-selector";
|
|
69
70
|
|
|
70
71
|
const demoSvg = "./demo.svg";
|
|
71
72
|
|
|
@@ -107,7 +108,7 @@ export function getItems(editable: boolean): TokenData[] {
|
|
|
107
108
|
});
|
|
108
109
|
return items;
|
|
109
110
|
}
|
|
110
|
-
`,
|
|
111
|
+
`,mo={mainContent:po,description:fo,css:Gt,initializer:{content:go,type:"typescript",initialize:()=>Vt(()=>import("./1_remove_only.js"),__vite__mapDeps([0,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:Sn}]},vo=Object.freeze(Object.defineProperty({__proto__:null,default:mo},Symbol.toStringTag,{value:"Module"})),bo=`<div id="multi-select-example" class="example-root">
|
|
111
112
|
<sd-token-selector aria-label="Default editable token selector example">
|
|
112
113
|
<sd-button icon="edit.svg" slot="additional-content"></sd-button>
|
|
113
114
|
</sd-token-selector>
|
|
@@ -118,8 +119,8 @@ export function getItems(editable: boolean): TokenData[] {
|
|
|
118
119
|
<sd-button aria-disabled="true" icon="edit.svg" slot="additional-content"></sd-button>
|
|
119
120
|
</sd-token-selector>
|
|
120
121
|
</div>
|
|
121
|
-
`,
|
|
122
|
-
`,
|
|
122
|
+
`,yo=`<h3 id="editable-token-selector">Editable token selector</h3>
|
|
123
|
+
`,wo=`import "@cas-smartdesign/button";
|
|
123
124
|
import { Button } from "@cas-smartdesign/button";
|
|
124
125
|
import TokenSelector from "@cas-smartdesign/token-selector";
|
|
125
126
|
import { getItems } from "token-provider";
|
|
@@ -143,7 +144,7 @@ document.querySelectorAll("#multi-select-example sd-token-selector").forEach((el
|
|
|
143
144
|
|
|
144
145
|
editButton.addEventListener("click", () => tokenSelector.openSuggestions());
|
|
145
146
|
});
|
|
146
|
-
`,
|
|
147
|
+
`,xo={mainContent:bo,description:yo,css:Gt,initializer:{content:wo,type:"typescript",initialize:()=>Vt(()=>import("./2_multi_select.js"),__vite__mapDeps([2,3,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:Sn}]},ko=Object.freeze(Object.defineProperty({__proto__:null,default:xo},Symbol.toStringTag,{value:"Module"})),Eo=`<div id="editable-input-attributes-example" class="example-root">
|
|
147
148
|
<sd-token-selector placeholder="Default"
|
|
148
149
|
><sd-button icon="edit.svg" slot="additional-content"></sd-button
|
|
149
150
|
></sd-token-selector>
|
|
@@ -157,8 +158,8 @@ document.querySelectorAll("#multi-select-example sd-token-selector").forEach((el
|
|
|
157
158
|
><sd-button icon="edit.svg" slot="additional-content"></sd-button
|
|
158
159
|
></sd-token-selector>
|
|
159
160
|
</div>
|
|
160
|
-
`,
|
|
161
|
-
`,
|
|
161
|
+
`,So=`<h3 id="editable-token-selector-with-various-input-attributes">Editable token selector with various input attributes</h3>
|
|
162
|
+
`,_o=`import "@cas-smartdesign/button";
|
|
162
163
|
import { Button } from "@cas-smartdesign/button";
|
|
163
164
|
import { ValidationLevel } from "@cas-smartdesign/field-validation-message";
|
|
164
165
|
import TokenSelector from "@cas-smartdesign/token-selector";
|
|
@@ -196,7 +197,7 @@ document.querySelectorAll("#editable-input-attributes-example sd-token-selector"
|
|
|
196
197
|
|
|
197
198
|
editButton.addEventListener("click", () => tokenSelector.openSuggestions());
|
|
198
199
|
});
|
|
199
|
-
|
|
200
|
+
`,Ao={mainContent:Eo,description:So,css:Gt,initializer:{content:_o,type:"typescript",initialize:()=>Vt(()=>import("./3_editable_input_attributes.js"),__vite__mapDeps([4,3,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:Sn}]},Io=Object.freeze(Object.defineProperty({__proto__:null,default:Ao},Symbol.toStringTag,{value:"Module"})),Co=`<div id="dnd-example" class="example-root">
|
|
200
201
|
<sd-token-selector input-label="First selector"
|
|
201
202
|
><sd-button icon="edit.svg" slot="additional-content"></sd-button
|
|
202
203
|
></sd-token-selector>
|
|
@@ -280,7 +281,7 @@ document.querySelectorAll("#dnd-example sd-token-selector").forEach((tokenSelect
|
|
|
280
281
|
setUpWithSharedTokens(tokenSelector);
|
|
281
282
|
}
|
|
282
283
|
});
|
|
283
|
-
|
|
284
|
+
`,$o={mainContent:Co,description:Oo,css:Gt,initializer:{content:To,type:"typescript",initialize:()=>Vt(()=>import("./4_dnd.js"),__vite__mapDeps([5,3,1]),import.meta.url)}},Ro=Object.freeze(Object.defineProperty({__proto__:null,default:$o},Symbol.toStringTag,{value:"Module"})),Lo=`<div id="other-example" class="example-root">
|
|
284
285
|
<sd-token-selector input-label="Additional content" additional-icons
|
|
285
286
|
><sd-button icon="edit.svg" slot="additional-content"></sd-button
|
|
286
287
|
></sd-token-selector>
|
|
@@ -291,8 +292,8 @@ document.querySelectorAll("#dnd-example sd-token-selector").forEach((tokenSelect
|
|
|
291
292
|
><sd-button icon="edit.svg" slot="additional-content"></sd-button
|
|
292
293
|
></sd-token-selector>
|
|
293
294
|
</div>
|
|
294
|
-
`,
|
|
295
|
-
`,
|
|
295
|
+
`,Po=`<h3 id="additional-examples">Additional examples</h3>
|
|
296
|
+
`,Mo=`.overlap-indicator {
|
|
296
297
|
width: 4px;
|
|
297
298
|
background-color: #999999;
|
|
298
299
|
}
|
|
@@ -302,7 +303,7 @@ document.querySelectorAll("#dnd-example sd-token-selector").forEach((tokenSelect
|
|
|
302
303
|
.overlap-indicator.blocked {
|
|
303
304
|
background-color: #cc0000;
|
|
304
305
|
}
|
|
305
|
-
`,
|
|
306
|
+
`,Do=`import "@cas-smartdesign/button";
|
|
306
307
|
import { Button } from "@cas-smartdesign/button";
|
|
307
308
|
import TokenSelector, { TokenData, generator } from "@cas-smartdesign/token-selector";
|
|
308
309
|
import { getItems, OverlapStatus, InvitationStatus, ExtendedTokenData } from "./token-provider";
|
|
@@ -405,7 +406,7 @@ document.querySelectorAll("#other-example sd-token-selector").forEach((el) => {
|
|
|
405
406
|
|
|
406
407
|
editButton.addEventListener("click", () => tokenSelector.openSuggestions());
|
|
407
408
|
});
|
|
408
|
-
`,
|
|
409
|
+
`,No=`import { TokenData } from "@cas-smartdesign/token-selector";
|
|
409
410
|
|
|
410
411
|
export enum InvitationStatus {
|
|
411
412
|
Accept = "accept",
|
|
@@ -456,60 +457,60 @@ export function getItems(): ExtendedTokenData[] {
|
|
|
456
457
|
});
|
|
457
458
|
return items;
|
|
458
459
|
}
|
|
459
|
-
`,
|
|
460
|
-
\f\r]`,
|
|
461
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Yi=/'/g,Qi=/"/g,Ws=/^(?:script|style|textarea|title)$/i,qo=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),X=qo(1),Ge=Symbol.for("lit-noChange"),z=Symbol.for("lit-nothing"),es=new WeakMap,He=Ve.createTreeWalker(Ve,129,null,!1);function qs(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zi!==void 0?Zi.createHTML(e):e}const Vo=(i,e)=>{const t=i.length-1,n=[];let s,r=e===2?"<svg>":"",o=bt;for(let a=0;a<t;a++){const l=i[a];let c,d,h=-1,p=0;for(;p<l.length&&(o.lastIndex=p,d=o.exec(l),d!==null);)p=o.lastIndex,o===bt?d[1]==="!--"?o=Xi:d[1]!==void 0?o=Ji:d[2]!==void 0?(Ws.test(d[2])&&(s=RegExp("</"+d[2],"g")),o=Ue):d[3]!==void 0&&(o=Ue):o===Ue?d[0]===">"?(o=s??bt,h=-1):d[1]===void 0?h=-2:(h=o.lastIndex-d[2].length,c=d[1],o=d[3]===void 0?Ue:d[3]==='"'?Qi:Yi):o===Qi||o===Yi?o=Ue:o===Xi||o===Ji?o=bt:(o=Ue,s=void 0);const m=o===Ue&&i[a+1].startsWith("/>")?" ":"";r+=o===bt?l+Ho:h>=0?(n.push(c),l.slice(0,h)+Yn+l.slice(h)+Pe+m):l+Pe+(h===-2?(n.push(void 0),a):m)}return[qs(i,r+(i[t]||"<?>")+(e===2?"</svg>":"")),n]};class It{constructor({strings:e,_$litType$:t},n){let s;this.parts=[];let r=0,o=0;const a=e.length-1,l=this.parts,[c,d]=Vo(e,t);if(this.el=It.createElement(c,n),He.currentNode=this.el.content,t===2){const h=this.el.content,p=h.firstChild;p.remove(),h.append(...p.childNodes)}for(;(s=He.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const h=[];for(const p of s.getAttributeNames())if(p.endsWith(Yn)||p.startsWith(Pe)){const m=d[o++];if(h.push(p),m!==void 0){const E=s.getAttribute(m.toLowerCase()+Yn).split(Pe),w=/([.?@])?(.*)/.exec(m);l.push({type:1,index:r,name:w[2],strings:E,ctor:w[1]==="."?Ko:w[1]==="?"?Xo:w[1]==="@"?Jo:An})}else l.push({type:6,index:r})}for(const p of h)s.removeAttribute(p)}if(Ws.test(s.tagName)){const h=s.textContent.split(Pe),p=h.length-1;if(p>0){s.textContent=ot?ot.emptyScript:"";for(let m=0;m<p;m++)s.append(h[m],At()),He.nextNode(),l.push({type:2,index:++r});s.append(h[p],At())}}}else if(s.nodeType===8)if(s.data===Fs)l.push({type:2,index:r});else{let h=-1;for(;(h=s.data.indexOf(Pe,h+1))!==-1;)l.push({type:7,index:r}),h+=Pe.length-1}r++}}static createElement(e,t){const n=Ve.createElement("template");return n.innerHTML=e,n}}function at(i,e,t=i,n){var s,r,o,a;if(e===Ge)return e;let l=n!==void 0?(s=t._$Co)===null||s===void 0?void 0:s[n]:t._$Cl;const c=$t(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==c&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.call(l,!1),c===void 0?l=void 0:(l=new c(i),l._$AT(i,t,n)),n!==void 0?((o=(a=t)._$Co)!==null&&o!==void 0?o:a._$Co=[])[n]=l:t._$Cl=l),l!==void 0&&(e=at(i,l._$AS(i,e.values),l,n)),e}class Go{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:n},parts:s}=this._$AD,r=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:Ve).importNode(n,!0);He.currentNode=r;let o=He.nextNode(),a=0,l=0,c=s[0];for(;c!==void 0;){if(a===c.index){let d;c.type===2?d=new Ut(o,o.nextSibling,this,e):c.type===1?d=new c.ctor(o,c.name,c.strings,this,e):c.type===6&&(d=new Yo(o,this,e)),this._$AV.push(d),c=s[++l]}a!==(c==null?void 0:c.index)&&(o=He.nextNode(),a++)}return He.currentNode=Ve,r}v(e){let t=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class Ut{constructor(e,t,n,s){var r;this.type=2,this._$AH=z,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=s,this._$Cp=(r=s==null?void 0:s.isConnected)===null||r===void 0||r}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=at(this,e,t),$t(e)?e===z||e==null||e===""?(this._$AH!==z&&this._$AR(),this._$AH=z):e!==this._$AH&&e!==Ge&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Wo(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==z&&$t(this._$AH)?this._$AA.nextSibling.data=e:this.$(Ve.createTextNode(e)),this._$AH=e}g(e){var t;const{values:n,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=It.createElement(qs(s.h,s.h[0]),this.options)),s);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===r)this._$AH.v(n);else{const o=new Go(r,this),a=o.u(this.options);o.v(n),this.$(a),this._$AH=o}}_$AC(e){let t=es.get(e.strings);return t===void 0&&es.set(e.strings,t=new It(e)),t}T(e){Hs(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,s=0;for(const r of e)s===t.length?t.push(n=new Ut(this.k(At()),this.k(At()),this,this.options)):n=t[s],n._$AI(r),s++;s<t.length&&(this._$AR(n&&n._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,t);e&&e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}let An=class{constructor(e,t,n,s,r){this.type=1,this._$AH=z,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,s){const r=this.strings;let o=!1;if(r===void 0)e=at(this,e,t,0),o=!$t(e)||e!==this._$AH&&e!==Ge,o&&(this._$AH=e);else{const a=e;let l,c;for(e=r[0],l=0;l<r.length-1;l++)c=at(this,a[n+l],t,l),c===Ge&&(c=this._$AH[l]),o||(o=!$t(c)||c!==this._$AH[l]),c===z?e=z:e!==z&&(e+=(c??"")+r[l+1]),this._$AH[l]=c}o&&!s&&this.j(e)}j(e){e===z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}};class Ko extends An{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===z?void 0:e}}const Zo=ot?ot.emptyScript:"";let Xo=class extends An{constructor(){super(...arguments),this.type=4}j(e){e&&e!==z?this.element.setAttribute(this.name,Zo):this.element.removeAttribute(this.name)}},Jo=class extends An{constructor(e,t,n,s,r){super(e,t,n,s,r),this.type=5}_$AI(e,t=this){var n;if((e=(n=at(this,e,t,0))!==null&&n!==void 0?n:z)===Ge)return;const s=this._$AH,r=e===z&&s!==z||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,o=e!==z&&(s===z||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;typeof this._$AH=="function"?this._$AH.call((n=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&n!==void 0?n:this.element,e):this._$AH.handleEvent(e)}};class Yo{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){at(this,e)}}const ts=mn.litHtmlPolyfillSupport;ts==null||ts(It,Ut),((zn=mn.litHtmlVersions)!==null&&zn!==void 0?zn:mn.litHtmlVersions=[]).push("2.8.0");const Qo=(i,e,t)=>{var n,s;const r=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:e;let o=r._$litPart$;if(o===void 0){const a=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:null;r._$litPart$=o=new Ut(e.insertBefore(At(),a),a,void 0,t??{})}return o._$AI(i),o};var Fn,Hn;let ue=class extends st{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Qo(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return Ge}};ue.finalized=!0,ue._$litElement$=!0,(Fn=globalThis.litElementHydrateSupport)===null||Fn===void 0||Fn.call(globalThis,{LitElement:ue});const ns=globalThis.litElementPolyfillSupport;ns==null||ns({LitElement:ue});((Hn=globalThis.litElementVersions)!==null&&Hn!==void 0?Hn:globalThis.litElementVersions=[]).push("3.3.3");const ea=(i,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,i)}},ta=(i,e,t)=>{e.constructor.createProperty(t,i)};function v(i){return(e,t)=>t!==void 0?ta(i,e,t):ea(i,e)}const ee=i=>i??z,na=":host{display:inline-block;font-size:13px;line-height:20px;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;color:#111;contain:content}:host([hidden]){display:none!important}:host([level=warn i]){color:#555}:host([level=suggest i]){color:#bf8800}:host([level=error i]){color:#cc0017}:host([level=warn]){color:#555}:host([level=suggest]){color:#bf8800}:host([level=error]){color:#cc0017}.icon{height:12px;width:12px;padding-right:4px;margin-bottom:-1px}",ia="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cstyle%20id='style3'%3e%20.st0{fill:%23fff}.st1{fill:%23c00}%20%3c/style%3e%3cg%20id='g5'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20id='path9'/%3e%3c/g%3e%3cg%20id='g11'%3e%3cpath%20class='st0'%20id='rect13'%20d='M5.5%202.5h1v4h-1z'/%3e%3cpath%20class='st1'%20d='M6%203v3-3m1-1H5v5h2V2z'%20id='path15'/%3e%3c/g%3e%3cg%20id='g17'%3e%3cpath%20class='st0'%20id='rect19'%20d='M5.5%208.5h1v1h-1z'/%3e%3cpath%20class='st1'%20id='polygon21'%20d='M7%208H5v2h2V8z'/%3e%3c/g%3e%3c/svg%3e",sa="data:image/svg+xml,%3csvg%20id='Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cstyle%3e%20.st0{fill:%23bf8800}%20%3c/style%3e%3cpath%20class='st0'%20d='M12%20.8l11%2019.8v1.3H1v-1.3L12%20.8zm.8-.6h-1.6L0%2020v3h24v-3L12.8.2z'/%3e%3cpath%20class='st0'%20d='M11%208h2v8h-2zm0%2010h2v2h-2z'/%3e%3c/svg%3e",ra="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20fill='%23555'/%3e%3cpath%20d='M6%209V6v3m-1%201h2V5H5v5zm2-8H5v2h2z'%20class='st1'%20fill='%23555'/%3e%3c/svg%3e";var oa=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,xi=(i,e,t,n)=>{for(var s=n>1?void 0:n?aa(e,t):e,r=i.length-1,o;r>=0;r--)(o=i[r])&&(s=(n?o(e,t,s):o(s))||s);return n&&s&&oa(e,t,s),s},nt;const Ct=(nt=class extends ue{static parseLevel(i){if(i){const e=Object.keys(Ot).find(t=>t.toLowerCase()===i.toLowerCase());return e&&Ot[e]}}static get styles(){return[_n`
|
|
462
|
-
${
|
|
463
|
-
`]}render(){return
|
|
464
|
-
${
|
|
465
|
-
`]}render(){
|
|
460
|
+
`,jo={mainContent:Lo,description:Po,css:Mo+Gt,initializer:{content:Do,type:"typescript",initialize:()=>Vt(()=>import("./5_other.js"),__vite__mapDeps([6,3,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:No}]},Bo=Object.freeze(Object.defineProperty({__proto__:null,default:jo},Symbol.toStringTag,{value:"Module"}));const hi=globalThis,_n=hi.ShadowRoot&&(hi.ShadyCSS===void 0||hi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,An=Symbol(),os=new WeakMap;let sr=class{constructor(e,i,s){if(this._$cssResult$=!0,s!==An)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=i}get styleSheet(){let e=this.o;const i=this.t;if(_n&&e===void 0){const s=i!==void 0&&i.length===1;s&&(e=os.get(i)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&os.set(i,e))}return e}toString(){return this.cssText}};const mt=t=>new sr(typeof t=="string"?t:t+"",void 0,An),ki=(t,...e)=>{const i=t.length===1?t[0]:e.reduce(((s,n,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[r+1]),t[0]);return new sr(i,t,An)},zo=(t,e)=>{if(_n)t.adoptedStyleSheets=e.map((i=>i instanceof CSSStyleSheet?i:i.styleSheet));else for(const i of e){const s=document.createElement("style"),n=hi.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=i.cssText,t.appendChild(s)}},as=_n?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let i="";for(const s of e.cssRules)i+=s.cssText;return mt(i)})(t):t;const{is:Uo,defineProperty:qo,getOwnPropertyDescriptor:Fo,getOwnPropertyNames:Ho,getOwnPropertySymbols:Wo,getPrototypeOf:Vo}=Object,Ei=globalThis,ls=Ei.trustedTypes,Go=ls?ls.emptyScript:"",Ko=Ei.reactiveElementPolyfillSupport,Dt=(t,e)=>t,mi={toAttribute(t,e){switch(e){case Boolean:t=t?Go:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=t!==null;break;case Number:i=t===null?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},In=(t,e)=>!Uo(t,e),cs={attribute:!0,type:String,converter:mi,reflect:!1,useDefault:!1,hasChanged:In};Symbol.metadata??=Symbol("metadata"),Ei.litPropertyMetadata??=new WeakMap;let kt=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,i=cs){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(e,i),!i.noAccessor){const s=Symbol(),n=this.getPropertyDescriptor(e,s,i);n!==void 0&&qo(this.prototype,e,n)}}static getPropertyDescriptor(e,i,s){const{get:n,set:r}=Fo(this.prototype,e)??{get(){return this[i]},set(o){this[i]=o}};return{get:n,set(o){const d=n?.call(this);r?.call(this,o),this.requestUpdate(e,d,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??cs}static _$Ei(){if(this.hasOwnProperty(Dt("elementProperties")))return;const e=Vo(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Dt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Dt("properties"))){const i=this.properties,s=[...Ho(i),...Wo(i)];for(const n of s)this.createProperty(n,i[n])}const e=this[Symbol.metadata];if(e!==null){const i=litPropertyMetadata.get(e);if(i!==void 0)for(const[s,n]of i)this.elementProperties.set(s,n)}this._$Eh=new Map;for(const[i,s]of this.elementProperties){const n=this._$Eu(i,s);n!==void 0&&this._$Eh.set(n,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const i=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const n of s)i.unshift(as(n))}else e!==void 0&&i.push(as(e));return i}static _$Eu(e,i){const s=i.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,i=this.constructor.elementProperties;for(const s of i.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return zo(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,i,s){this._$AK(e,s)}_$ET(e,i){const s=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,s);if(n!==void 0&&s.reflect===!0){const r=(s.converter?.toAttribute!==void 0?s.converter:mi).toAttribute(i,s.type);this._$Em=e,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}_$AK(e,i){const s=this.constructor,n=s._$Eh.get(e);if(n!==void 0&&this._$Em!==n){const r=s.getPropertyOptions(n),o=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:mi;this._$Em=n;const d=o.fromAttribute(i,r.type);this[n]=d??this._$Ej?.get(n)??d,this._$Em=null}}requestUpdate(e,i,s){if(e!==void 0){const n=this.constructor,r=this[e];if(s??=n.getPropertyOptions(e),!((s.hasChanged??In)(r,i)||s.useDefault&&s.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,s))))return;this.C(e,i,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,i,{useDefault:s,reflect:n,wrapped:r},o){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??i??this[e]),r!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(i=void 0),this._$AL.set(e,i)),n===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[n,r]of s){const{wrapped:o}=r,d=this[n];o!==!0||this._$AL.has(n)||d===void 0||this.C(n,void 0,r,d)}}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(i)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(i)}willUpdate(e){}_$AE(e){this._$EO?.forEach((i=>i.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((i=>this._$ET(i,this[i]))),this._$EM()}updated(e){}firstUpdated(e){}};kt.elementStyles=[],kt.shadowRootOptions={mode:"open"},kt[Dt("elementProperties")]=new Map,kt[Dt("finalized")]=new Map,Ko?.({ReactiveElement:kt}),(Ei.reactiveElementVersions??=[]).push("2.1.1");const Cn=globalThis,vi=Cn.trustedTypes,ds=vi?vi.createPolicy("lit-html",{createHTML:t=>t}):void 0,rr="$lit$",tt=`lit$${Math.random().toFixed(9).slice(2)}$`,or="?"+tt,Zo=`<${or}>`,pt=document,zt=()=>pt.createComment(""),Ut=t=>t===null||typeof t!="object"&&typeof t!="function",On=Array.isArray,Jo=t=>On(t)||typeof t?.[Symbol.iterator]=="function",Fi=`[
|
|
461
|
+
\f\r]`,Lt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,us=/-->/g,hs=/>/g,ct=RegExp(`>|${Fi}(?:([^\\s"'>=/]+)(${Fi}*=${Fi}*(?:[^
|
|
462
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ps=/'/g,fs=/"/g,ar=/^(?:script|style|textarea|title)$/i,Xo=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),de=Xo(1),ft=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),gs=new WeakMap,ut=pt.createTreeWalker(pt,129);function lr(t,e){if(!On(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return ds!==void 0?ds.createHTML(e):e}const Yo=(t,e)=>{const i=t.length-1,s=[];let n,r=e===2?"<svg>":e===3?"<math>":"",o=Lt;for(let d=0;d<i;d++){const p=t[d];let h,a,u=-1,c=0;for(;c<p.length&&(o.lastIndex=c,a=o.exec(p),a!==null);)c=o.lastIndex,o===Lt?a[1]==="!--"?o=us:a[1]!==void 0?o=hs:a[2]!==void 0?(ar.test(a[2])&&(n=RegExp("</"+a[2],"g")),o=ct):a[3]!==void 0&&(o=ct):o===ct?a[0]===">"?(o=n??Lt,u=-1):a[1]===void 0?u=-2:(u=o.lastIndex-a[2].length,h=a[1],o=a[3]===void 0?ct:a[3]==='"'?fs:ps):o===fs||o===ps?o=ct:o===us||o===hs?o=Lt:(o=ct,n=void 0);const l=o===ct&&t[d+1].startsWith("/>")?" ":"";r+=o===Lt?p+Zo:u>=0?(s.push(h),p.slice(0,u)+rr+p.slice(u)+tt+l):p+tt+(u===-2?d:l)}return[lr(t,r+(t[i]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};class qt{constructor({strings:e,_$litType$:i},s){let n;this.parts=[];let r=0,o=0;const d=e.length-1,p=this.parts,[h,a]=Yo(e,i);if(this.el=qt.createElement(h,s),ut.currentNode=this.el.content,i===2||i===3){const u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(n=ut.nextNode())!==null&&p.length<d;){if(n.nodeType===1){if(n.hasAttributes())for(const u of n.getAttributeNames())if(u.endsWith(rr)){const c=a[o++],l=n.getAttribute(u).split(tt),f=/([.?@])?(.*)/.exec(c);p.push({type:1,index:r,name:f[2],strings:l,ctor:f[1]==="."?ea:f[1]==="?"?ta:f[1]==="@"?ia:Si}),n.removeAttribute(u)}else u.startsWith(tt)&&(p.push({type:6,index:r}),n.removeAttribute(u));if(ar.test(n.tagName)){const u=n.textContent.split(tt),c=u.length-1;if(c>0){n.textContent=vi?vi.emptyScript:"";for(let l=0;l<c;l++)n.append(u[l],zt()),ut.nextNode(),p.push({type:2,index:++r});n.append(u[c],zt())}}}else if(n.nodeType===8)if(n.data===or)p.push({type:2,index:r});else{let u=-1;for(;(u=n.data.indexOf(tt,u+1))!==-1;)p.push({type:7,index:r}),u+=tt.length-1}r++}}static createElement(e,i){const s=pt.createElement("template");return s.innerHTML=e,s}}function St(t,e,i=t,s){if(e===ft)return e;let n=s!==void 0?i._$Co?.[s]:i._$Cl;const r=Ut(e)?void 0:e._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),r===void 0?n=void 0:(n=new r(t),n._$AT(t,i,s)),s!==void 0?(i._$Co??=[])[s]=n:i._$Cl=n),n!==void 0&&(e=St(t,n._$AS(t,e.values),n,s)),e}class Qo{constructor(e,i){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:i},parts:s}=this._$AD,n=(e?.creationScope??pt).importNode(i,!0);ut.currentNode=n;let r=ut.nextNode(),o=0,d=0,p=s[0];for(;p!==void 0;){if(o===p.index){let h;p.type===2?h=new Kt(r,r.nextSibling,this,e):p.type===1?h=new p.ctor(r,p.name,p.strings,this,e):p.type===6&&(h=new na(r,this,e)),this._$AV.push(h),p=s[++d]}o!==p?.index&&(r=ut.nextNode(),o++)}return ut.currentNode=pt,n}p(e){let i=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,i),i+=s.strings.length-2):s._$AI(e[i])),i++}}class Kt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,i,s,n){this.type=2,this._$AH=K,this._$AN=void 0,this._$AA=e,this._$AB=i,this._$AM=s,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const i=this._$AM;return i!==void 0&&e?.nodeType===11&&(e=i.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,i=this){e=St(this,e,i),Ut(e)?e===K||e==null||e===""?(this._$AH!==K&&this._$AR(),this._$AH=K):e!==this._$AH&&e!==ft&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Jo(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==K&&Ut(this._$AH)?this._$AA.nextSibling.data=e:this.T(pt.createTextNode(e)),this._$AH=e}$(e){const{values:i,_$litType$:s}=e,n=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=qt.createElement(lr(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===n)this._$AH.p(i);else{const r=new Qo(n,this),o=r.u(this.options);r.p(i),this.T(o),this._$AH=r}}_$AC(e){let i=gs.get(e.strings);return i===void 0&&gs.set(e.strings,i=new qt(e)),i}k(e){On(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,n=0;for(const r of e)n===i.length?i.push(s=new Kt(this.O(zt()),this.O(zt()),this,this.options)):s=i[n],s._$AI(r),n++;n<i.length&&(this._$AR(s&&s._$AB.nextSibling,n),i.length=n)}_$AR(e=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class Si{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,i,s,n,r){this.type=1,this._$AH=K,this._$AN=void 0,this.element=e,this.name=i,this._$AM=n,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=K}_$AI(e,i=this,s,n){const r=this.strings;let o=!1;if(r===void 0)e=St(this,e,i,0),o=!Ut(e)||e!==this._$AH&&e!==ft,o&&(this._$AH=e);else{const d=e;let p,h;for(e=r[0],p=0;p<r.length-1;p++)h=St(this,d[s+p],i,p),h===ft&&(h=this._$AH[p]),o||=!Ut(h)||h!==this._$AH[p],h===K?e=K:e!==K&&(e+=(h??"")+r[p+1]),this._$AH[p]=h}o&&!n&&this.j(e)}j(e){e===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ea extends Si{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===K?void 0:e}}class ta extends Si{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==K)}}let ia=class extends Si{constructor(e,i,s,n,r){super(e,i,s,n,r),this.type=5}_$AI(e,i=this){if((e=St(this,e,i,0)??K)===ft)return;const s=this._$AH,n=e===K&&s!==K||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,r=e!==K&&(s===K||n);n&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},na=class{constructor(e,i,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){St(this,e)}};const sa=Cn.litHtmlPolyfillSupport;sa?.(qt,Kt),(Cn.litHtmlVersions??=[]).push("3.3.1");const ra=(t,e,i)=>{const s=i?.renderBefore??e;let n=s._$litPart$;if(n===void 0){const r=i?.renderBefore??null;s._$litPart$=n=new Kt(e.insertBefore(zt(),r),r,void 0,i??{})}return n._$AI(t),n};const Tn=globalThis;let Ie=class extends kt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ra(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ft}};Ie._$litElement$=!0,Ie.finalized=!0,Tn.litElementHydrateSupport?.({LitElement:Ie});const oa=Tn.litElementPolyfillSupport;oa?.({LitElement:Ie});(Tn.litElementVersions??=[]).push("4.2.1");const aa={attribute:!0,type:String,converter:mi,reflect:!1,hasChanged:In},la=(t=aa,e,i)=>{const{kind:s,metadata:n}=i;let r=globalThis.litPropertyMetadata.get(n);if(r===void 0&&globalThis.litPropertyMetadata.set(n,r=new Map),s==="setter"&&((t=Object.create(t)).wrapped=!0),r.set(i.name,t),s==="accessor"){const{name:o}=i;return{set(d){const p=e.get.call(this);e.set.call(this,d),this.requestUpdate(o,p,t)},init(d){return d!==void 0&&this.C(o,void 0,t,d),d}}}if(s==="setter"){const{name:o}=i;return function(d){const p=this[o];e.call(this,d),this.requestUpdate(o,p,t)}}throw Error("Unsupported decorator location: "+s)};function $(t){return(e,i)=>typeof i=="object"?la(t,e,i):((s,n,r)=>{const o=n.hasOwnProperty(r);return n.constructor.createProperty(r,s),o?Object.getOwnPropertyDescriptor(n,r):void 0})(t,e,i)}const fe=t=>t??K,ca=":host{display:inline-block;font-size:13px;line-height:20px;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;color:#111;contain:content}:host([hidden]){display:none!important}:host([level=warn i]){color:#555}:host([level=suggest i]){color:#bf8800}:host([level=error i]){color:#cc0017}:host([level=warn]){color:#555}:host([level=suggest]){color:#bf8800}:host([level=error]){color:#cc0017}.icon{height:12px;width:12px;padding-right:4px;margin-bottom:-1px}",da="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cstyle%20id='style3'%3e%20.st0{fill:%23fff}.st1{fill:%23c00}%20%3c/style%3e%3cg%20id='g5'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20id='path9'/%3e%3c/g%3e%3cg%20id='g11'%3e%3cpath%20class='st0'%20id='rect13'%20d='M5.5%202.5h1v4h-1z'/%3e%3cpath%20class='st1'%20d='M6%203v3-3m1-1H5v5h2V2z'%20id='path15'/%3e%3c/g%3e%3cg%20id='g17'%3e%3cpath%20class='st0'%20id='rect19'%20d='M5.5%208.5h1v1h-1z'/%3e%3cpath%20class='st1'%20id='polygon21'%20d='M7%208H5v2h2V8z'/%3e%3c/g%3e%3c/svg%3e",ua="data:image/svg+xml,%3csvg%20id='Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cstyle%3e%20.st0{fill:%23bf8800}%20%3c/style%3e%3cpath%20class='st0'%20d='M12%20.8l11%2019.8v1.3H1v-1.3L12%20.8zm.8-.6h-1.6L0%2020v3h24v-3L12.8.2z'/%3e%3cpath%20class='st0'%20d='M11%208h2v8h-2zm0%2010h2v2h-2z'/%3e%3c/svg%3e",ha="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20fill='%23555'/%3e%3cpath%20d='M6%209V6v3m-1%201h2V5H5v5zm2-8H5v2h2z'%20class='st1'%20fill='%23555'/%3e%3c/svg%3e";var pa=Object.defineProperty,$n=(t,e,i,s)=>{for(var n=void 0,r=t.length-1,o;r>=0;r--)(o=t[r])&&(n=o(e,i,n)||n);return n&&pa(e,i,n),n},xt;const Ft=(xt=class extends Ie{static parseLevel(t){if(t){const e=Object.keys(bi).find(i=>i.toLowerCase()===t.toLowerCase());return e&&bi[e]}}static get styles(){return[ki`
|
|
463
|
+
${mt(ca)}
|
|
464
|
+
`]}render(){return de`${this.iconToUse&&de`<img class="icon" src="${this.iconToUse}">`}${this.message}`}get iconToUse(){return this.icon||this._defaultIconPath}shouldUpdate(t){return t.has("level")&&(this._defaultIconPath=this.iconForLevel,!this.icon)?!0:super.shouldUpdate(t)}get iconForLevel(){switch(xt.parseLevel(this.level)){case"warn":return ha;case"suggest":return ua;case"error":return da;default:return null}}},xt.ID="sd-field-validation-message",xt.levelConverter={fromAttribute(t){return xt.parseLevel(t)},toAttribute(t){return t&&t.toLowerCase()}},xt);$n([$({type:String,attribute:!0})],Ft.prototype,"message");$n([$({type:String,attribute:!0})],Ft.prototype,"icon");$n([$({converter:Ft.levelConverter,reflect:!0})],Ft.prototype,"level");let pi=Ft;var bi=(t=>(t.Warn="warn",t.Suggest="suggest",t.Error="error",t))(bi||{});customElements.get(pi.ID)||customElements.define(pi.ID,pi);const fa=":host{display:inline-flex;position:relative;cursor:text;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;color:#111;contain:layout style;flex-direction:column}:host([hidden]),:host([type=hidden]){display:none!important}:host([effective-disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([effective-disabled]) .unfocused-line,:host([effective-disabled]) .focused-line{border-bottom-style:dashed}:host(:not([effective-disabled]):focus) .focused-line,:host(:not([effective-disabled])[focused]) .focused-line{transform:none;transition:transform .25s}:host(:not([effective-disabled]):focus) .label.float,:host(:not([effective-disabled])[focused]) .label.float{color:var(--sd-input-focused-color, #1467ba)}:host([inactive]) .input{pointer-events:none}:host([effective-disabled]:focus),:host([effective-disabled][focused]){box-shadow:0 0 0 1px #111}:host(:not([effective-disabled])[validationlevel]) .focused-line,:host(:not([effective-disabled]):invalid) .focused-line{transform:none;transition:transform .25s}:host([validationlevel=warn i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn i]) .label,:host([validationlevel=warn i]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest i]) .label,:host([validationlevel=suggest i]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error i]) .focused-line,:host(:not([validationlevel]):invalid) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error i]) .label,:host([validationlevel=error i]) .validation-message,:host(:not([validationlevel]):invalid) .label,:host(:not([validationlevel]):invalid) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}.validation-message-wrapper{min-height:var(--sd-input-validation-message-minheight, 0px);position:relative;font-size:0}.validation-message{position:relative;position:var(--sd-input-validation-message-minheight, absolute);left:0;right:0}.label.float{transform:translateY(-75%) scale(.75);width:133%}.label:not(.float){max-width:100%}.floated-label-placeholder{height:20px;width:100%}.label{position:absolute;top:0;left:0;line-height:24px;pointer-events:none;color:var(--sd-input-color, #767676);transition:transform .25s,width .25s;transform-origin:left top}.input-wrapper{position:relative;display:flex;flex-direction:row;align-items:center;background-color:var(--input-wrapper-background-color)}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-wrapper{flex-direction:column;align-items:baseline}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-container{width:100%}:host([extended-prefix]:not(:focus-within)) .input-container,:host([extended-prefix][effective-disabled]) .input-container{width:0px}.input-container{line-height:var(--sd-input-line-height, 24px);flex:1 1 auto}.input{width:100%;background:var(--sd-input-background, transparent);font-family:inherit;font-size:inherit;text-align:inherit;color:inherit;border:none;outline:none;resize:none;padding-left:0;padding-right:0}.input:-webkit-autofill{animation-name:onautofillstart}.input:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{0%{outline:none}}@keyframes onautofillcancel{0%{outline:none}}.label,input.input{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}.validation-message{text-overflow:ellipsis;overflow-x:hidden;white-space:normal;white-space:var(--sd-input-validation-message-minheight, nowrap)}.input::placeholder{color:var(--sd-input-color, #767676)}.underline{height:2px;width:100%;position:relative}.unfocused-line,.focused-line{position:absolute;inset:0}.unfocused-line{border-bottom:1px solid var(--sd-input-underline-color, #959595)}.focused-line{border-bottom:2px solid var(--sd-input-focused-color, #1467ba);transform-origin:center center;transform:scale3d(0,1,1)}.prefix,.suffix{display:flex;flex-wrap:nowrap;max-width:100%}.prefix ::slotted(*),.suffix ::slotted(*){display:flex}";var ga=Object.defineProperty,ie=(t,e,i,s)=>{for(var n=void 0,r=t.length-1,o;r>=0;r--)(o=t[r])&&(n=o(e,i,n)||n);return n&&ga(e,i,n),n};const ma="sd-lit-input",ms="delegatesFocus"in window.ShadowRoot.prototype;let va=0;var Ue;const ee=(Ue=class extends Ie{constructor(){super(),this.rows=1,this.effectiveDisabled=!1,this.type="text",this.autocomplete="off";const t=va++;this._validationMessageId=Ue.ID+"_message_"+t,this._inputId=Ue.ID+"_input_"+t,this.attachInternals&&!this.activeShadyDOM&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabIndex")||(this.tabIndex=0)}firstUpdated(t){super.firstUpdated(t),this.initAutocompleted(this.inputElement),this.updateInitialValue(),this.updateFormValidity(),this.hasAttribute("disabled")&&(this.disabled=!0),this.inputElement.oninput=e=>{this.autocompleted=e.inputType==="insertReplacementText"||!("data"in e),this.currentText=this.inputElement.value,this.fireValueChange(!0)},this.inputElement.onchange=()=>this.fireValueChange(),ms||(this.inputElement.onfocus=()=>this.setAttribute("focused",""),this.inputElement.onblur=()=>this.removeAttribute("focused"),this.addEventListener("focus",e=>{e.target===this&&this.inputElement.focus()})),this.inputElement.addEventListener("keyup",()=>{this.updateFormValidity()}),this.addEventListener("keydown",e=>{e.key=="Enter"&&this._internals?.form?.requestSubmit()}),this._initialized=!0}initAutocompleted(t){const e=i=>{/^onautofillstart(-sd-lit-input-\d+|\s?)$/.test(i.animationName)?this.autocompleted=!0:/^onautofillcancel(-sd-lit-input-\d+|\s?)$/.test(i.animationName)&&(this.autocompleted=!1)};this.activeShadyDOM?(this._needsAutocompletedCheck=!0,this.activeShadyDOM.nativeMethods.addEventListener.call(t,"animationstart",e)):t.addEventListener("animationstart",e)}get activeShadyDOM(){const t=window.ShadyDOM;return t&&t.inUse?t:null}updateInitialValue(){typeof this.currentText<"u"?this.value=this.currentText:this.value=this.getAttribute("value"),this.value&&(this.currentText=this.inputElement.value),this._initialValue=this.value}get disabled(){return this.hasAttribute("disabled")}set disabled(t){t?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this._internals||(this.effectiveDisabled=t)}get inputElement(){return this.shadowRoot&&!this._inputElement&&(this._inputElement=this.shadowRoot.querySelector(".input")),this._inputElement}get value(){return this.inputElement&&this.inputElement.value}set value(t){this.currentText=t||"",this.inputElement&&(this.inputElement.value=this.currentText),this.setFormValue(this.currentText)}get selectionStart(){return this.inputElement?this.inputElement.selectionStart:0}focus(){this.inputElement?this.inputElement.focus():super.focus()}select(){this.inputElement&&this.inputElement.select()}setSelectionRange(t,e){this.updateComplete.then(()=>{this.inputElement&&this.inputElement.setSelectionRange(t,e)})}static get styles(){return[ki`
|
|
465
|
+
${mt(fa)}
|
|
466
|
+
`]}render(){let t;const e=this.validationMessage||this.inputElement?.validationMessage,i=e||this.validationLevel!=null;return this.rows===1?t=de`
|
|
466
467
|
<input
|
|
467
468
|
id=${this._inputId}
|
|
468
469
|
class="input"
|
|
469
470
|
.type=${this.type}
|
|
470
|
-
placeholder=${
|
|
471
|
-
name=${
|
|
471
|
+
placeholder=${fe(this.placeholder||void 0)}
|
|
472
|
+
name=${fe(this.name||void 0)}
|
|
472
473
|
aria-disabled=${this.effectiveDisabled}
|
|
473
474
|
autocomplete=${this.autocomplete}
|
|
474
475
|
?disabled=${this.inactive}
|
|
475
476
|
?readonly=${this.readonly||this.effectiveDisabled}
|
|
476
477
|
?required=${this.required}
|
|
477
|
-
maxlength=${this.maxlength>0?this.maxlength:
|
|
478
|
+
maxlength=${this.maxlength>0?this.maxlength:Ue.DEFAULT_MAX_LENGTH}
|
|
478
479
|
aria-describedby=${this._validationMessageId}
|
|
479
|
-
aria-invalid=${
|
|
480
|
-
aria-label=${
|
|
481
|
-
min=${
|
|
482
|
-
max=${
|
|
483
|
-
pattern=${
|
|
480
|
+
aria-invalid=${fe(i)}
|
|
481
|
+
aria-label=${fe(this.sdAriaLabel||void 0)}
|
|
482
|
+
min=${fe(this.min||void 0)}
|
|
483
|
+
max=${fe(this.max||void 0)}
|
|
484
|
+
pattern=${fe(this.pattern||void 0)}
|
|
484
485
|
/>
|
|
485
|
-
`:
|
|
486
|
+
`:t=de`
|
|
486
487
|
<textarea
|
|
487
488
|
id=${this._inputId}
|
|
488
489
|
class="input"
|
|
489
|
-
placeholder=${
|
|
490
|
-
name=${
|
|
490
|
+
placeholder=${fe(this.placeholder||void 0)}
|
|
491
|
+
name=${fe(this.name||void 0)}
|
|
491
492
|
aria-disabled=${this.effectiveDisabled}
|
|
492
493
|
autocomplete=${this.autocomplete}
|
|
493
494
|
?disabled=${this.inactive}
|
|
494
495
|
?readonly=${this.readonly||this.effectiveDisabled}
|
|
495
496
|
?required=${this.required}
|
|
496
|
-
maxlength=${this.maxlength>0?this.maxlength:
|
|
497
|
+
maxlength=${this.maxlength>0?this.maxlength:Ue.DEFAULT_MAX_LENGTH}
|
|
497
498
|
rows=${this.rows}
|
|
498
499
|
aria-describedby=${this._validationMessageId}
|
|
499
|
-
aria-invalid=${
|
|
500
|
-
aria-label=${
|
|
500
|
+
aria-invalid=${fe(i)}
|
|
501
|
+
aria-label=${fe(this.sdAriaLabel||void 0)}
|
|
501
502
|
></textarea>
|
|
502
|
-
`,
|
|
503
|
-
${this.label?
|
|
503
|
+
`,de`
|
|
504
|
+
${this.label?de` <div class="floated-label-placeholder" aria-hidden="true"> </div> `:K}
|
|
504
505
|
<div class="input-wrapper">
|
|
505
506
|
<span class="prefix"><slot name="prefix"></slot></span>
|
|
506
507
|
<div class="input-container" style="position:${this.shouldFloat()?"static":"relative"};">
|
|
507
|
-
${this.label&&
|
|
508
|
+
${this.label&&de`
|
|
508
509
|
<label for="${this._inputId}" class="label ${this.shouldFloat()?"float":""}"
|
|
509
510
|
>${this.label}</label
|
|
510
511
|
>
|
|
511
512
|
`}
|
|
512
|
-
${
|
|
513
|
+
${t}
|
|
513
514
|
</div>
|
|
514
515
|
<span class="suffix"><slot name="suffix"></slot></span>
|
|
515
516
|
</div>
|
|
@@ -518,22 +519,22 @@ export function getItems(): ExtendedTokenData[] {
|
|
|
518
519
|
<div class="focused-line"></div>
|
|
519
520
|
</div>
|
|
520
521
|
<div class="validation-message-wrapper" aria-hidden="true">
|
|
521
|
-
${
|
|
522
|
+
${(e||this.validationIconSrc)&&de`
|
|
522
523
|
<sd-field-validation-message
|
|
523
524
|
id=${this._validationMessageId}
|
|
524
525
|
class="validation-message"
|
|
525
|
-
.message=${
|
|
526
|
+
.message=${e}
|
|
526
527
|
.icon=${this.validationIconSrc}
|
|
527
528
|
.level=${this.validationLevel}
|
|
528
529
|
>
|
|
529
530
|
</sd-field-validation-message>
|
|
530
531
|
`}
|
|
531
532
|
</div>
|
|
532
|
-
`}updated(
|
|
533
|
-
${
|
|
534
|
-
`]}render(){return
|
|
533
|
+
`}updated(t){super.updated(t),this._needsAutocompletedCheck&&!this.autocompleted&&setTimeout(()=>{try{this.autocompleted=this.autocompleted||!!this.shadowRoot.querySelector(":-webkit-autofill")}catch{}},0),this.rows>1&&((t.has("min")||t.has("max")||t.has("pattern"))&&console.warn("min, max & pattern attributes are not supported with multiple rows configuration."),this.type!="text"&&console.warn(`type: ${this.type} is not supported with multiple rows configuration.`))}update(t){if(super.update(t),t.has("validationMessage")&&(this.validationMessage?this._internals?.setValidity({customError:!0},this.validationMessage):this._internals?.setValidity(this.inputElement.validity,this.inputElement.validationMessage)),this._initialized&&t.has("rows"))throw Error("rows attribute cannot be changed after the input is attached to the DOM")}fireValueChange(t){this.dispatchEvent(new CustomEvent(`${t?"immediate-":""}value-change`,{detail:{value:this.value}})),this.setFormValue(this.value),this.updateFormValidity()}updateFormValidity(){if(this.validationMessage==null){this._internals.setValidity(this.inputElement.validity,this.inputElement.validationMessage);const t=this.shadowRoot.querySelector("sd-field-validation-message");this.requestUpdate("validationMessage",t==null?null:t.message)}}shouldFloat(){return this.alwaysFloatLabel||this.currentText||this.placeholder||this.autocompleted||this.type==="date"}setFormValue(t){this._internals?.setFormValue(t)}formResetCallback(){this.value=this._initialValue}formDisabledCallback(t){this.effectiveDisabled=t||this.hasAttribute("disabled")}formAssociatedCallback(t){this._needsAutocompletedCheck=!0}formStateRestoreCallback(t,e){typeof t=="string"&&(this.value=t)}},Ue.ID=ma,Ue.DEFAULT_MAX_LENGTH=524288,Ue.formAssociated=!0,Ue.shadowRootOptions={...Ie.shadowRootOptions,delegatesFocus:ms},Ue);ie([$({type:String,reflect:!0})],ee.prototype,"label");ie([$({type:String,attribute:!0})],ee.prototype,"validationMessage");ie([$({type:String,attribute:!0})],ee.prototype,"validationIconSrc");ie([$({type:bi,attribute:!0,reflect:!0})],ee.prototype,"validationLevel");ie([$({type:String,hasChanged(t,e){return e!=null&&e!=t}})],ee.prototype,"currentText");ie([$({type:Boolean,attribute:!0})],ee.prototype,"alwaysFloatLabel");ie([$({type:Boolean,attribute:!0})],ee.prototype,"autocompleted");ie([$({type:Number,attribute:!0})],ee.prototype,"rows");ie([$({type:Boolean,reflect:!0,attribute:"effective-disabled"})],ee.prototype,"effectiveDisabled");ie([$({type:Boolean,reflect:!0,attribute:"extended-prefix"})],ee.prototype,"extendedPrefix");ie([$({type:String,reflect:!0})],ee.prototype,"type");ie([$({type:String,reflect:!0})],ee.prototype,"placeholder");ie([$({type:String,reflect:!0})],ee.prototype,"sdAriaLabel");ie([$({type:Number,reflect:!0})],ee.prototype,"maxlength");ie([$({type:Boolean,reflect:!0})],ee.prototype,"readonly");ie([$({type:Boolean,reflect:!0})],ee.prototype,"required");ie([$({type:String,reflect:!0})],ee.prototype,"name");ie([$({type:Boolean,reflect:!0})],ee.prototype,"inactive");ie([$({type:String,attribute:!0})],ee.prototype,"autocomplete");ie([$({type:String,attribute:!0})],ee.prototype,"min");ie([$({type:String,attribute:!0})],ee.prototype,"max");ie([$({type:String,attribute:!0})],ee.prototype,"pattern");let Hi=ee;customElements.get(Hi.ID)||customElements.define(Hi.ID,Hi);const ba={CHILD:2},cr=t=>(...e)=>({_$litDirective$:t,values:e});let ya=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,i,s){this._$Ct=e,this._$AM=i,this._$Ci=s}_$AS(e,i){return this.update(e,i)}update(e,i){return this.render(...i)}};class yi extends ya{constructor(e){if(super(e),this.it=K,e.type!==ba.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===K||e==null)return this._t=void 0,this.it=e;if(e===ft)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const i=[e];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}}yi.directiveName="unsafeHTML",yi.resultType=1;const wa=cr(yi);class dr{static showImage(e,i,s,n){let r;if(n||!(e instanceof HTMLImageElement)?r=o=>e.style.backgroundImage=this.prepareSrc(o):r=o=>e.src=o,r(s),i){const o=()=>{r(i)},d=new Image;d.addEventListener("load",o),d.src=i,d.complete&&(d.removeEventListener("load",o),o())}}static prepareSrc(e){return e?e.startsWith("url")?e:`url("${e}")`:null}}const xa=':host{display:block;contain:strict;height:50px}:host([selected]){background-color:#d3e6fa}:host(:not([selected]):hover),:host(:not([selected])[focused]){background-color:#e7f1fa}@media (forced-colors: active){:host([selected]){outline:4px solid}:host(:not([selected]):hover){outline:4px dotted}:host(:not([selected])[focused]){outline:4px dashed}}:host([enable-line-clamp]) .labels>:only-child{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;overflow-wrap:break-word}.container{display:flex;height:100%;box-sizing:border-box}.container .level-indicator{width:7px;height:100%}.container .level-indicator.level-0{background-color:#a0c3ef}.container .level-indicator.level-1{background-color:#e7c374}.container .level-indicator.level-2{background-color:#bfd596}.container .level-indicator.level-3{background-color:#fd998d}.container .level-indicator.level-4{background-color:#c6e8f5}.container .level-indicator.level-5{background-color:#fde3a4}.container .level-indicator.level-6{background-color:#dcbfe0}.side-content{display:flex;align-items:center;flex-grow:0}.labels{display:flex;flex-direction:column;justify-content:center;flex:1 1 0px;height:100%;line-height:normal;overflow:hidden;padding:var(--sd-list-item-label-content-padding, 0 8px)}.caption,.description{width:100%;font-family:var(--sd-list-item-font-family, "Segoe UI", "Lucida Sans", Arial, sans-serif);font-style:normal;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none;text-decoration:var(--sd-list-item-text-decoration, inherit)}.caption em,.description em{font-weight:bolder}.caption{font-size:var(--sd-list-item-caption-font-size, 16px);color:var(--sd-list-item-caption-text-color, #111);font-weight:var(--sd-list-item-caption-font-weight, normal)}.description{font-size:var(--sd-list-item-description-font-size, 13px);color:var(--sd-list-item-description-text-color, #767676);font-weight:var(--sd-list-item-description-font-weight, normal)}.icon-wrapper{width:var(--sd-list-item-icon-wrapper-width, 45px);height:100%;display:flex;align-items:center;justify-content:center}.icon-wrapper .icon{min-height:var(--sd-list-item-icon-size, 24px);min-width:var(--sd-list-item-icon-size, 24px);background-repeat:no-repeat;background-position:center;background-size:cover}';var ka=Object.defineProperty,ve=(t,e,i,s)=>{for(var n=void 0,r=t.length-1,o;r>=0;r--)(o=t[r])&&(n=o(e,i,n)||n);return n&&ka(e,i,n),n},dt;const ge=(dt=class extends Ie{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[ki`
|
|
534
|
+
${mt(xa)}
|
|
535
|
+
`]}render(){return de`
|
|
535
536
|
<div class="container">
|
|
536
|
-
${this.getLevelIndicators().map((
|
|
537
|
+
${this.getLevelIndicators().map((t,e)=>de` <div class="level-indicator level-${e}"></div> `)}
|
|
537
538
|
<div class="side-content">
|
|
538
539
|
<slot name="left-content"></slot>
|
|
539
540
|
${this.renderIcon()}
|
|
@@ -546,55 +547,55 @@ export function getItems(): ExtendedTokenData[] {
|
|
|
546
547
|
<slot name="right-content"></slot>
|
|
547
548
|
</div>
|
|
548
549
|
</div>
|
|
549
|
-
`}renderIcon(){if(this.icon||this.iconPlaceholder){const
|
|
550
|
+
`}renderIcon(){if(this.icon||this.iconPlaceholder){const t=this.iconBackgroundColor!=null?`background-color:${this.iconBackgroundColor}`:void 0;return de`
|
|
550
551
|
<div
|
|
551
552
|
class="icon-wrapper"
|
|
552
553
|
@pointerdown="${this.handleIconClick}"
|
|
553
|
-
style="${
|
|
554
|
+
style="${fe(t)}"
|
|
554
555
|
role="img"
|
|
555
|
-
aria-label="${
|
|
556
|
-
title="${
|
|
556
|
+
aria-label="${fe(this.iconAttrAriaLabel)}"
|
|
557
|
+
title="${fe(this.iconAttrTitle)}"
|
|
557
558
|
>
|
|
558
559
|
<div class="icon"></div>
|
|
559
560
|
</div>
|
|
560
|
-
`}return
|
|
561
|
-
<div class="${
|
|
562
|
-
${this.contentMode==="html"?
|
|
561
|
+
`}return K}renderLabel(t,e,i){return e?de`
|
|
562
|
+
<div class="${t}" title="${fe(i)}">
|
|
563
|
+
${this.contentMode==="html"?wa(e):e}
|
|
563
564
|
</div>
|
|
564
|
-
`:z}updated(i){super.updated(i),(i.has("icon")||i.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&Gs.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),i.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){const i=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let e=0;const t=this.shadowRoot.querySelector(".caption");t&&(e+=t.scrollWidth-t.clientWidth);const n=this.shadowRoot.querySelector(".description");return n&&(e=Math.max(e,n.scrollWidth-n.clientWidth)),e>0&&e++,i&&this.setAttribute("enable-line-clamp",""),e}handleIconClick(i){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",i))&&i.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},Fe.ID="sd-list-item",Fe.ensureDefined=()=>{customElements.get(Fe.ID)||customElements.define(Fe.ID,Fe)},Fe);se([v({type:String})],te.prototype,"caption",2);se([v({type:String})],te.prototype,"description",2);se([v({type:Boolean})],te.prototype,"selected",2);se([v({type:String})],te.prototype,"icon",2);se([v({type:String})],te.prototype,"iconBackgroundColor",2);se([v({type:String})],te.prototype,"iconPlaceholder",2);se([v({type:Number})],te.prototype,"level",2);se([v()],te.prototype,"contentMode",2);se([v({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],te.prototype,"enableLineClamp",2);se([v({type:Boolean,reflect:!0,attribute:"aria-disabled"})],te.prototype,"disabled",2);se([v({type:String,attribute:"icon-attr-aria-label"})],te.prototype,"iconAttrAriaLabel",2);se([v({type:String,reflect:!0})],te.prototype,"role",2);se([v({type:String,attribute:"caption-attr-title"})],te.prototype,"captionAttrTitle",2);se([v({type:String,attribute:"description-attr-title"})],te.prototype,"descriptionAttrTitle",2);se([v({type:String,attribute:"icon-attr-title"})],te.prototype,"iconAttrTitle",2);let rt=te;const Ks=(i,e)=>{const t=document.createElement(rt.ID);if(i){if(t.caption=i.caption,t.description=i.description,t.icon=i.icon,t.iconBackgroundColor=i.iconBackgroundColor,t.iconPlaceholder=i.iconPlaceholder,t.level=i.level,t.disabled=i.disabled,i.contentMode&&(t.contentMode=i.contentMode),i.leftContentGenerator){const n=i.leftContentGenerator(i,t);n&&(n.slot="left-content",t.appendChild(n))}if(i.rightContentGenerator){const n=i.rightContentGenerator(i,t);n&&(n.slot="right-content",t.appendChild(n))}}return t};rt.ensureDefined();var re="top",pe="bottom",fe="right",oe="left",ki="auto",Ft=[re,pe,fe,oe],lt="start",Tt="end",ya="clippingParents",Zs="viewport",yt="popper",wa="reference",ss=Ft.reduce(function(i,e){return i.concat([e+"-"+lt,e+"-"+Tt])},[]),Xs=[].concat(Ft,[ki]).reduce(function(i,e){return i.concat([e,e+"-"+lt,e+"-"+Tt])},[]),xa="beforeRead",ka="read",Ea="afterRead",Sa="beforeMain",_a="main",Aa="afterMain",$a="beforeWrite",Ia="write",Ca="afterWrite",Oa=[xa,ka,Ea,Sa,_a,Aa,$a,Ia,Ca];function Ae(i){return i?(i.nodeName||"").toLowerCase():null}function ce(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var e=i.ownerDocument;return e&&e.defaultView||window}return i}function Ke(i){var e=ce(i).Element;return i instanceof e||i instanceof Element}function he(i){var e=ce(i).HTMLElement;return i instanceof e||i instanceof HTMLElement}function Ei(i){if(typeof ShadowRoot>"u")return!1;var e=ce(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function Ta(i){var e=i.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},s=e.attributes[t]||{},r=e.elements[t];!he(r)||!Ae(r)||(Object.assign(r.style,n),Object.keys(s).forEach(function(o){var a=s[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function La(i){var e=i.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(n){var s=e.elements[n],r=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]),a=o.reduce(function(l,c){return l[c]="",l},{});!he(s)||!Ae(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}const Ra={name:"applyStyles",enabled:!0,phase:"write",fn:Ta,effect:La,requires:["computeStyles"]};function _e(i){return i.split("-")[0]}var We=Math.max,bn=Math.min,ct=Math.round;function Qn(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Js(){return!/^((?!chrome|android).)*safari/i.test(Qn())}function dt(i,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var n=i.getBoundingClientRect(),s=1,r=1;e&&he(i)&&(s=i.offsetWidth>0&&ct(n.width)/i.offsetWidth||1,r=i.offsetHeight>0&&ct(n.height)/i.offsetHeight||1);var o=Ke(i)?ce(i):window,a=o.visualViewport,l=!Js()&&t,c=(n.left+(l&&a?a.offsetLeft:0))/s,d=(n.top+(l&&a?a.offsetTop:0))/r,h=n.width/s,p=n.height/r;return{width:h,height:p,top:d,right:c+h,bottom:d+p,left:c,x:c,y:d}}function Si(i){var e=dt(i),t=i.offsetWidth,n=i.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:i.offsetLeft,y:i.offsetTop,width:t,height:n}}function Ys(i,e){var t=e.getRootNode&&e.getRootNode();if(i.contains(e))return!0;if(t&&Ei(t)){var n=e;do{if(n&&i.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ce(i){return ce(i).getComputedStyle(i)}function Pa(i){return["table","td","th"].indexOf(Ae(i))>=0}function De(i){return((Ke(i)?i.ownerDocument:i.document)||window.document).documentElement}function $n(i){return Ae(i)==="html"?i:i.assignedSlot||i.parentNode||(Ei(i)?i.host:null)||De(i)}function rs(i){return!he(i)||Ce(i).position==="fixed"?null:i.offsetParent}function Ma(i){var e=/firefox/i.test(Qn()),t=/Trident/i.test(Qn());if(t&&he(i)){var n=Ce(i);if(n.position==="fixed")return null}var s=$n(i);for(Ei(s)&&(s=s.host);he(s)&&["html","body"].indexOf(Ae(s))<0;){var r=Ce(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function Ht(i){for(var e=ce(i),t=rs(i);t&&Pa(t)&&Ce(t).position==="static";)t=rs(t);return t&&(Ae(t)==="html"||Ae(t)==="body"&&Ce(t).position==="static")?e:t||Ma(i)||e}function _i(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function Et(i,e,t){return We(i,bn(e,t))}function Da(i,e,t){var n=Et(i,e,t);return n>t?t:n}function Qs(){return{top:0,right:0,bottom:0,left:0}}function er(i){return Object.assign({},Qs(),i)}function tr(i,e){return e.reduce(function(t,n){return t[n]=i,t},{})}var Na=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,er(typeof e!="number"?e:tr(e,Ft))};function ja(i){var e,t=i.state,n=i.name,s=i.options,r=t.elements.arrow,o=t.modifiersData.popperOffsets,a=_e(t.placement),l=_i(a),c=[oe,fe].indexOf(a)>=0,d=c?"height":"width";if(!(!r||!o)){var h=Na(s.padding,t),p=Si(r),m=l==="y"?re:oe,E=l==="y"?pe:fe,w=t.rects.reference[d]+t.rects.reference[l]-o[l]-t.rects.popper[d],f=o[l]-t.rects.reference[l],$=Ht(r),T=$?l==="y"?$.clientHeight||0:$.clientWidth||0:0,L=w/2-f/2,x=h[m],A=T-p[d]-h[E],C=T/2-p[d]/2+L,R=Et(x,C,A),M=l;t.modifiersData[n]=(e={},e[M]=R,e.centerOffset=R-C,e)}}function Ba(i){var e=i.state,t=i.options,n=t.element,s=n===void 0?"[data-popper-arrow]":n;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||Ys(e.elements.popper,s)&&(e.elements.arrow=s))}const za={name:"arrow",enabled:!0,phase:"main",fn:ja,effect:Ba,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ut(i){return i.split("-")[1]}var Ua={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Fa(i,e){var t=i.x,n=i.y,s=e.devicePixelRatio||1;return{x:ct(t*s)/s||0,y:ct(n*s)/s||0}}function os(i){var e,t=i.popper,n=i.popperRect,s=i.placement,r=i.variation,o=i.offsets,a=i.position,l=i.gpuAcceleration,c=i.adaptive,d=i.roundOffsets,h=i.isFixed,p=o.x,m=p===void 0?0:p,E=o.y,w=E===void 0?0:E,f=typeof d=="function"?d({x:m,y:w}):{x:m,y:w};m=f.x,w=f.y;var $=o.hasOwnProperty("x"),T=o.hasOwnProperty("y"),L=oe,x=re,A=window;if(c){var C=Ht(t),R="clientHeight",M="clientWidth";if(C===ce(t)&&(C=De(t),Ce(C).position!=="static"&&a==="absolute"&&(R="scrollHeight",M="scrollWidth")),C=C,s===re||(s===oe||s===fe)&&r===Tt){x=pe;var O=h&&C===A&&A.visualViewport?A.visualViewport.height:C[R];w-=O-n.height,w*=l?1:-1}if(s===oe||(s===re||s===pe)&&r===Tt){L=fe;var j=h&&C===A&&A.visualViewport?A.visualViewport.width:C[M];m-=j-n.width,m*=l?1:-1}}var G=Object.assign({position:a},c&&Ua),ne=d===!0?Fa({x:m,y:w},ce(t)):{x:m,y:w};if(m=ne.x,w=ne.y,l){var K;return Object.assign({},G,(K={},K[x]=T?"0":"",K[L]=$?"0":"",K.transform=(A.devicePixelRatio||1)<=1?"translate("+m+"px, "+w+"px)":"translate3d("+m+"px, "+w+"px, 0)",K))}return Object.assign({},G,(e={},e[x]=T?w+"px":"",e[L]=$?m+"px":"",e.transform="",e))}function Ha(i){var e=i.state,t=i.options,n=t.gpuAcceleration,s=n===void 0?!0:n,r=t.adaptive,o=r===void 0?!0:r,a=t.roundOffsets,l=a===void 0?!0:a,c={placement:_e(e.placement),variation:ut(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,os(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,os(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Wa={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ha,data:{}};var Zt={passive:!0};function qa(i){var e=i.state,t=i.instance,n=i.options,s=n.scroll,r=s===void 0?!0:s,o=n.resize,a=o===void 0?!0:o,l=ce(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach(function(d){d.addEventListener("scroll",t.update,Zt)}),a&&l.addEventListener("resize",t.update,Zt),function(){r&&c.forEach(function(d){d.removeEventListener("scroll",t.update,Zt)}),a&&l.removeEventListener("resize",t.update,Zt)}}const Va={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qa,data:{}};var Ga={left:"right",right:"left",bottom:"top",top:"bottom"};function un(i){return i.replace(/left|right|bottom|top/g,function(e){return Ga[e]})}var Ka={start:"end",end:"start"};function as(i){return i.replace(/start|end/g,function(e){return Ka[e]})}function Ai(i){var e=ce(i),t=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:t,scrollTop:n}}function $i(i){return dt(De(i)).left+Ai(i).scrollLeft}function Za(i,e){var t=ce(i),n=De(i),s=t.visualViewport,r=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var c=Js();(c||!c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+$i(i),y:l}}function Xa(i){var e,t=De(i),n=Ai(i),s=(e=i.ownerDocument)==null?void 0:e.body,r=We(t.scrollWidth,t.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=We(t.scrollHeight,t.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+$i(i),l=-n.scrollTop;return Ce(s||t).direction==="rtl"&&(a+=We(t.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function Ii(i){var e=Ce(i),t=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+n)}function nr(i){return["html","body","#document"].indexOf(Ae(i))>=0?i.ownerDocument.body:he(i)&&Ii(i)?i:nr($n(i))}function St(i,e){var t;e===void 0&&(e=[]);var n=nr(i),s=n===((t=i.ownerDocument)==null?void 0:t.body),r=ce(n),o=s?[r].concat(r.visualViewport||[],Ii(n)?n:[]):n,a=e.concat(o);return s?a:a.concat(St($n(o)))}function ei(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function Ja(i,e){var t=dt(i,!1,e==="fixed");return t.top=t.top+i.clientTop,t.left=t.left+i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top,t}function ls(i,e,t){return e===Zs?ei(Za(i,t)):Ke(e)?Ja(e,t):ei(Xa(De(i)))}function Ya(i){var e=St($n(i)),t=["absolute","fixed"].indexOf(Ce(i).position)>=0,n=t&&he(i)?Ht(i):i;return Ke(n)?e.filter(function(s){return Ke(s)&&Ys(s,n)&&Ae(s)!=="body"}):[]}function Qa(i,e,t,n){var s=e==="clippingParents"?Ya(i):[].concat(e),r=[].concat(s,[t]),o=r[0],a=r.reduce(function(l,c){var d=ls(i,c,n);return l.top=We(d.top,l.top),l.right=bn(d.right,l.right),l.bottom=bn(d.bottom,l.bottom),l.left=We(d.left,l.left),l},ls(i,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ir(i){var e=i.reference,t=i.element,n=i.placement,s=n?_e(n):null,r=n?ut(n):null,o=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2,l;switch(s){case re:l={x:o,y:e.y-t.height};break;case pe:l={x:o,y:e.y+e.height};break;case fe:l={x:e.x+e.width,y:a};break;case oe:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var c=s?_i(s):null;if(c!=null){var d=c==="y"?"height":"width";switch(r){case lt:l[c]=l[c]-(e[d]/2-t[d]/2);break;case Tt:l[c]=l[c]+(e[d]/2-t[d]/2);break}}return l}function Lt(i,e){e===void 0&&(e={});var t=e,n=t.placement,s=n===void 0?i.placement:n,r=t.strategy,o=r===void 0?i.strategy:r,a=t.boundary,l=a===void 0?ya:a,c=t.rootBoundary,d=c===void 0?Zs:c,h=t.elementContext,p=h===void 0?yt:h,m=t.altBoundary,E=m===void 0?!1:m,w=t.padding,f=w===void 0?0:w,$=er(typeof f!="number"?f:tr(f,Ft)),T=p===yt?wa:yt,L=i.rects.popper,x=i.elements[E?T:p],A=Qa(Ke(x)?x:x.contextElement||De(i.elements.popper),l,d,o),C=dt(i.elements.reference),R=ir({reference:C,element:L,strategy:"absolute",placement:s}),M=ei(Object.assign({},L,R)),O=p===yt?M:C,j={top:A.top-O.top+$.top,bottom:O.bottom-A.bottom+$.bottom,left:A.left-O.left+$.left,right:O.right-A.right+$.right},G=i.modifiersData.offset;if(p===yt&&G){var ne=G[s];Object.keys(j).forEach(function(K){var me=[fe,pe].indexOf(K)>=0?1:-1,ie=[re,pe].indexOf(K)>=0?"y":"x";j[K]+=ne[ie]*me})}return j}function el(i,e){e===void 0&&(e={});var t=e,n=t.placement,s=t.boundary,r=t.rootBoundary,o=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=l===void 0?Xs:l,d=ut(n),h=d?a?ss:ss.filter(function(E){return ut(E)===d}):Ft,p=h.filter(function(E){return c.indexOf(E)>=0});p.length===0&&(p=h);var m=p.reduce(function(E,w){return E[w]=Lt(i,{placement:w,boundary:s,rootBoundary:r,padding:o})[_e(w)],E},{});return Object.keys(m).sort(function(E,w){return m[E]-m[w]})}function tl(i){if(_e(i)===ki)return[];var e=un(i);return[as(i),e,as(e)]}function nl(i){var e=i.state,t=i.options,n=i.name;if(!e.modifiersData[n]._skip){for(var s=t.mainAxis,r=s===void 0?!0:s,o=t.altAxis,a=o===void 0?!0:o,l=t.fallbackPlacements,c=t.padding,d=t.boundary,h=t.rootBoundary,p=t.altBoundary,m=t.flipVariations,E=m===void 0?!0:m,w=t.allowedAutoPlacements,f=e.options.placement,$=_e(f),T=$===f,L=l||(T||!E?[un(f)]:tl(f)),x=[f].concat(L).reduce(function(ve,W){return ve.concat(_e(W)===ki?el(e,{placement:W,boundary:d,rootBoundary:h,padding:c,flipVariations:E,allowedAutoPlacements:w}):W)},[]),A=e.rects.reference,C=e.rects.popper,R=new Map,M=!0,O=x[0],j=0;j<x.length;j++){var G=x[j],ne=_e(G),K=ut(G)===lt,me=[re,pe].indexOf(ne)>=0,ie=me?"width":"height",J=Lt(e,{placement:G,boundary:d,rootBoundary:h,altBoundary:p,padding:c}),u=me?K?fe:oe:K?pe:re;A[ie]>C[ie]&&(u=un(u));var b=un(u),k=[];if(r&&k.push(J[ne]<=0),a&&k.push(J[u]<=0,J[b]<=0),k.every(function(ve){return ve})){O=G,M=!1;break}R.set(G,k)}if(M)for(var I=E?3:1,B=function(W){var Y=x.find(function(Be){var we=R.get(Be);if(we)return we.slice(0,W).every(function(Ye){return Ye})});if(Y)return O=Y,"break"},Z=I;Z>0;Z--){var ae=B(Z);if(ae==="break")break}e.placement!==O&&(e.modifiersData[n]._skip=!0,e.placement=O,e.reset=!0)}}const il={name:"flip",enabled:!0,phase:"main",fn:nl,requiresIfExists:["offset"],data:{_skip:!1}};function cs(i,e,t){return t===void 0&&(t={x:0,y:0}),{top:i.top-e.height-t.y,right:i.right-e.width+t.x,bottom:i.bottom-e.height+t.y,left:i.left-e.width-t.x}}function ds(i){return[re,fe,pe,oe].some(function(e){return i[e]>=0})}function sl(i){var e=i.state,t=i.name,n=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=Lt(e,{elementContext:"reference"}),a=Lt(e,{altBoundary:!0}),l=cs(o,n),c=cs(a,s,r),d=ds(l),h=ds(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const rl={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sl};function ol(i,e,t){var n=_e(i),s=[oe,re].indexOf(n)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},e,{placement:i})):t,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[oe,fe].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}function al(i){var e=i.state,t=i.options,n=i.name,s=t.offset,r=s===void 0?[0,0]:s,o=Xs.reduce(function(d,h){return d[h]=ol(h,e.rects,r),d},{}),a=o[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=o}const ll={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:al};function cl(i){var e=i.state,t=i.name;e.modifiersData[t]=ir({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const dl={name:"popperOffsets",enabled:!0,phase:"read",fn:cl,data:{}};function ul(i){return i==="x"?"y":"x"}function hl(i){var e=i.state,t=i.options,n=i.name,s=t.mainAxis,r=s===void 0?!0:s,o=t.altAxis,a=o===void 0?!1:o,l=t.boundary,c=t.rootBoundary,d=t.altBoundary,h=t.padding,p=t.tether,m=p===void 0?!0:p,E=t.tetherOffset,w=E===void 0?0:E,f=Lt(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:d}),$=_e(e.placement),T=ut(e.placement),L=!T,x=_i($),A=ul(x),C=e.modifiersData.popperOffsets,R=e.rects.reference,M=e.rects.popper,O=typeof w=="function"?w(Object.assign({},e.rects,{placement:e.placement})):w,j=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),G=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,ne={x:0,y:0};if(C){if(r){var K,me=x==="y"?re:oe,ie=x==="y"?pe:fe,J=x==="y"?"height":"width",u=C[x],b=u+f[me],k=u-f[ie],I=m?-M[J]/2:0,B=T===lt?R[J]:M[J],Z=T===lt?-M[J]:-R[J],ae=e.elements.arrow,ve=m&&ae?Si(ae):{width:0,height:0},W=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Qs(),Y=W[me],Be=W[ie],we=Et(0,R[J],ve[J]),Ye=L?R[J]/2-I-we-Y-j.mainAxis:B-we-Y-j.mainAxis,Dn=L?-R[J]/2+I+we+Be+j.mainAxis:Z+we+Be+j.mainAxis,mt=e.elements.arrow&&Ht(e.elements.arrow),Nn=mt?x==="y"?mt.clientTop||0:mt.clientLeft||0:0,Vt=(K=G==null?void 0:G[x])!=null?K:0,Qe=u+Ye-Vt-Nn,Gt=u+Dn-Vt,le=Et(m?bn(b,Qe):b,u,m?We(k,Gt):k);C[x]=le,ne[x]=le-u}if(a){var Kt,vt=x==="x"?re:oe,S=x==="x"?pe:fe,xe=C[A],q=A==="y"?"height":"width",D=xe+f[vt],ze=xe-f[S],be=[re,oe].indexOf($)!==-1,et=(Kt=G==null?void 0:G[A])!=null?Kt:0,tt=be?D:xe-R[q]-M[q]-et+j.altAxis,g=be?xe+R[q]+M[q]-et-j.altAxis:ze,y=m&&be?Da(tt,xe,g):Et(m?tt:D,xe,m?g:ze);C[A]=y,ne[A]=y-xe}e.modifiersData[n]=ne}}const pl={name:"preventOverflow",enabled:!0,phase:"main",fn:hl,requiresIfExists:["offset"]};function fl(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function gl(i){return i===ce(i)||!he(i)?Ai(i):fl(i)}function ml(i){var e=i.getBoundingClientRect(),t=ct(e.width)/i.offsetWidth||1,n=ct(e.height)/i.offsetHeight||1;return t!==1||n!==1}function vl(i,e,t){t===void 0&&(t=!1);var n=he(e),s=he(e)&&ml(e),r=De(e),o=dt(i,s,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!t)&&((Ae(e)!=="body"||Ii(r))&&(a=gl(e)),he(e)?(l=dt(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):r&&(l.x=$i(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function bl(i){var e=new Map,t=new Set,n=[];i.forEach(function(r){e.set(r.name,r)});function s(r){t.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&s(l)}}),n.push(r)}return i.forEach(function(r){t.has(r.name)||s(r)}),n}function yl(i){var e=bl(i);return Oa.reduce(function(t,n){return t.concat(e.filter(function(s){return s.phase===n}))},[])}function wl(i){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(i())})})),e}}function xl(i){var e=i.reduce(function(t,n){var s=t[n.name];return t[n.name]=s?Object.assign({},s,n,{options:Object.assign({},s.options,n.options),data:Object.assign({},s.data,n.data)}):n,t},{});return Object.keys(e).map(function(t){return e[t]})}var us={placement:"bottom",modifiers:[],strategy:"absolute"};function hs(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function kl(i){i===void 0&&(i={});var e=i,t=e.defaultModifiers,n=t===void 0?[]:t,s=e.defaultOptions,r=s===void 0?us:s;return function(a,l,c){c===void 0&&(c=r);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},us,r),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},h=[],p=!1,m={state:d,setOptions:function($){var T=typeof $=="function"?$(d.options):$;w(),d.options=Object.assign({},r,d.options,T),d.scrollParents={reference:Ke(a)?St(a):a.contextElement?St(a.contextElement):[],popper:St(l)};var L=yl(xl([].concat(n,d.options.modifiers)));return d.orderedModifiers=L.filter(function(x){return x.enabled}),E(),m.update()},forceUpdate:function(){if(!p){var $=d.elements,T=$.reference,L=$.popper;if(hs(T,L)){d.rects={reference:vl(T,Ht(L),d.options.strategy==="fixed"),popper:Si(L)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(j){return d.modifiersData[j.name]=Object.assign({},j.data)});for(var x=0;x<d.orderedModifiers.length;x++){if(d.reset===!0){d.reset=!1,x=-1;continue}var A=d.orderedModifiers[x],C=A.fn,R=A.options,M=R===void 0?{}:R,O=A.name;typeof C=="function"&&(d=C({state:d,options:M,name:O,instance:m})||d)}}}},update:wl(function(){return new Promise(function(f){m.forceUpdate(),f(d)})}),destroy:function(){w(),p=!0}};if(!hs(a,l))return m;m.setOptions(c).then(function(f){!p&&c.onFirstUpdate&&c.onFirstUpdate(f)});function E(){d.orderedModifiers.forEach(function(f){var $=f.name,T=f.options,L=T===void 0?{}:T,x=f.effect;if(typeof x=="function"){var A=x({state:d,name:$,instance:m,options:L}),C=function(){};h.push(A||C)}})}function w(){h.forEach(function(f){return f()}),h=[]}return m}}var El=[Va,dl,Wa,Ra,ll,il,pl,za,rl],Sl=kl({defaultModifiers:El});const _l=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="12" viewBox="0 0 24 12">\r
|
|
565
|
+
`:K}updated(t){super.updated(t),(t.has("icon")||t.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&dr.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),t.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){const t=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let e=0;const i=this.shadowRoot.querySelector(".caption");i&&(e+=i.scrollWidth-i.clientWidth);const s=this.shadowRoot.querySelector(".description");return s&&(e=Math.max(e,s.scrollWidth-s.clientWidth)),e>0&&e++,t&&this.setAttribute("enable-line-clamp",""),e}handleIconClick(t){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",t))&&t.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},dt.ID="sd-list-item",dt.ensureDefined=()=>{customElements.get(dt.ID)||customElements.define(dt.ID,dt)},dt);ve([$({type:String})],ge.prototype,"caption");ve([$({type:String})],ge.prototype,"description");ve([$({type:Boolean})],ge.prototype,"selected");ve([$({type:String})],ge.prototype,"icon");ve([$({type:String})],ge.prototype,"iconBackgroundColor");ve([$({type:String})],ge.prototype,"iconPlaceholder");ve([$({type:Number})],ge.prototype,"level");ve([$()],ge.prototype,"contentMode");ve([$({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],ge.prototype,"enableLineClamp");ve([$({converter:{fromAttribute:t=>t=="true",toAttribute:t=>t},reflect:!0,attribute:"aria-disabled"})],ge.prototype,"disabled");ve([$({type:String,attribute:"icon-attr-aria-label"})],ge.prototype,"iconAttrAriaLabel");ve([$({type:String,reflect:!0})],ge.prototype,"role");ve([$({type:String,attribute:"caption-attr-title"})],ge.prototype,"captionAttrTitle");ve([$({type:String,attribute:"description-attr-title"})],ge.prototype,"descriptionAttrTitle");ve([$({type:String,attribute:"icon-attr-title"})],ge.prototype,"iconAttrTitle");let Et=ge;const ur=(t,e)=>{const i=document.createElement(Et.ID);if(t){if(i.caption=t.caption,i.description=t.description,i.icon=t.icon,i.iconBackgroundColor=t.iconBackgroundColor,i.iconPlaceholder=t.iconPlaceholder,i.level=t.level,i.disabled=t.disabled,t.contentMode&&(i.contentMode=t.contentMode),t.leftContentGenerator){const s=t.leftContentGenerator(t,i);s&&(s.slot="left-content",i.appendChild(s))}if(t.rightContentGenerator){const s=t.rightContentGenerator(t,i);s&&(s.slot="right-content",i.appendChild(s))}}return i};Et.ensureDefined();var be="top",Oe="bottom",Te="right",ye="left",Rn="auto",Zt=[be,Oe,Te,ye],_t="start",Ht="end",Ea="clippingParents",hr="viewport",Pt="popper",Sa="reference",vs=Zt.reduce(function(t,e){return t.concat([e+"-"+_t,e+"-"+Ht])},[]),pr=[].concat(Zt,[Rn]).reduce(function(t,e){return t.concat([e,e+"-"+_t,e+"-"+Ht])},[]),_a="beforeRead",Aa="read",Ia="afterRead",Ca="beforeMain",Oa="main",Ta="afterMain",$a="beforeWrite",Ra="write",La="afterWrite",Pa=[_a,Aa,Ia,Ca,Oa,Ta,$a,Ra,La];function He(t){return t?(t.nodeName||"").toLowerCase():null}function ke(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function gt(t){var e=ke(t).Element;return t instanceof e||t instanceof Element}function Ce(t){var e=ke(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Ln(t){if(typeof ShadowRoot>"u")return!1;var e=ke(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Ma(t){var e=t.state;Object.keys(e.elements).forEach(function(i){var s=e.styles[i]||{},n=e.attributes[i]||{},r=e.elements[i];!Ce(r)||!He(r)||(Object.assign(r.style,s),Object.keys(n).forEach(function(o){var d=n[o];d===!1?r.removeAttribute(o):r.setAttribute(o,d===!0?"":d)}))})}function Da(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(s){var n=e.elements[s],r=e.attributes[s]||{},o=Object.keys(e.styles.hasOwnProperty(s)?e.styles[s]:i[s]),d=o.reduce(function(p,h){return p[h]="",p},{});!Ce(n)||!He(n)||(Object.assign(n.style,d),Object.keys(r).forEach(function(p){n.removeAttribute(p)}))})}}const Na={name:"applyStyles",enabled:!0,phase:"write",fn:Ma,effect:Da,requires:["computeStyles"]};function Fe(t){return t.split("-")[0]}var ht=Math.max,wi=Math.min,At=Math.round;function wn(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function fr(){return!/^((?!chrome|android).)*safari/i.test(wn())}function It(t,e,i){e===void 0&&(e=!1),i===void 0&&(i=!1);var s=t.getBoundingClientRect(),n=1,r=1;e&&Ce(t)&&(n=t.offsetWidth>0&&At(s.width)/t.offsetWidth||1,r=t.offsetHeight>0&&At(s.height)/t.offsetHeight||1);var o=gt(t)?ke(t):window,d=o.visualViewport,p=!fr()&&i,h=(s.left+(p&&d?d.offsetLeft:0))/n,a=(s.top+(p&&d?d.offsetTop:0))/r,u=s.width/n,c=s.height/r;return{width:u,height:c,top:a,right:h+u,bottom:a+c,left:h,x:h,y:a}}function Pn(t){var e=It(t),i=t.offsetWidth,s=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-s)<=1&&(s=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:s}}function gr(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&Ln(i)){var s=e;do{if(s&&t.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Ze(t){return ke(t).getComputedStyle(t)}function ja(t){return["table","td","th"].indexOf(He(t))>=0}function it(t){return((gt(t)?t.ownerDocument:t.document)||window.document).documentElement}function _i(t){return He(t)==="html"?t:t.assignedSlot||t.parentNode||(Ln(t)?t.host:null)||it(t)}function bs(t){return!Ce(t)||Ze(t).position==="fixed"?null:t.offsetParent}function Ba(t){var e=/firefox/i.test(wn()),i=/Trident/i.test(wn());if(i&&Ce(t)){var s=Ze(t);if(s.position==="fixed")return null}var n=_i(t);for(Ln(n)&&(n=n.host);Ce(n)&&["html","body"].indexOf(He(n))<0;){var r=Ze(n);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return n;n=n.parentNode}return null}function Jt(t){for(var e=ke(t),i=bs(t);i&&ja(i)&&Ze(i).position==="static";)i=bs(i);return i&&(He(i)==="html"||He(i)==="body"&&Ze(i).position==="static")?e:i||Ba(t)||e}function Mn(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Nt(t,e,i){return ht(t,wi(e,i))}function za(t,e,i){var s=Nt(t,e,i);return s>i?i:s}function mr(){return{top:0,right:0,bottom:0,left:0}}function vr(t){return Object.assign({},mr(),t)}function br(t,e){return e.reduce(function(i,s){return i[s]=t,i},{})}var Ua=function(e,i){return e=typeof e=="function"?e(Object.assign({},i.rects,{placement:i.placement})):e,vr(typeof e!="number"?e:br(e,Zt))};function qa(t){var e,i=t.state,s=t.name,n=t.options,r=i.elements.arrow,o=i.modifiersData.popperOffsets,d=Fe(i.placement),p=Mn(d),h=[ye,Te].indexOf(d)>=0,a=h?"height":"width";if(!(!r||!o)){var u=Ua(n.padding,i),c=Pn(r),l=p==="y"?be:ye,f=p==="y"?Oe:Te,g=i.rects.reference[a]+i.rects.reference[p]-o[p]-i.rects.popper[a],v=o[p]-i.rects.reference[p],x=Jt(r),k=x?p==="y"?x.clientHeight||0:x.clientWidth||0:0,w=g/2-v/2,y=u[l],b=k-c[a]-u[f],E=k/2-c[a]/2+w,_=Nt(y,E,b),R=p;i.modifiersData[s]=(e={},e[R]=_,e.centerOffset=_-E,e)}}function Fa(t){var e=t.state,i=t.options,s=i.element,n=s===void 0?"[data-popper-arrow]":s;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||gr(e.elements.popper,n)&&(e.elements.arrow=n))}const Ha={name:"arrow",enabled:!0,phase:"main",fn:qa,effect:Fa,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ct(t){return t.split("-")[1]}var Wa={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Va(t,e){var i=t.x,s=t.y,n=e.devicePixelRatio||1;return{x:At(i*n)/n||0,y:At(s*n)/n||0}}function ys(t){var e,i=t.popper,s=t.popperRect,n=t.placement,r=t.variation,o=t.offsets,d=t.position,p=t.gpuAcceleration,h=t.adaptive,a=t.roundOffsets,u=t.isFixed,c=o.x,l=c===void 0?0:c,f=o.y,g=f===void 0?0:f,v=typeof a=="function"?a({x:l,y:g}):{x:l,y:g};l=v.x,g=v.y;var x=o.hasOwnProperty("x"),k=o.hasOwnProperty("y"),w=ye,y=be,b=window;if(h){var E=Jt(i),_="clientHeight",R="clientWidth";if(E===ke(i)&&(E=it(i),Ze(E).position!=="static"&&d==="absolute"&&(_="scrollHeight",R="scrollWidth")),E=E,n===be||(n===ye||n===Te)&&r===Ht){y=Oe;var M=u&&E===b&&b.visualViewport?b.visualViewport.height:E[_];g-=M-s.height,g*=p?1:-1}if(n===ye||(n===be||n===Oe)&&r===Ht){w=Te;var I=u&&E===b&&b.visualViewport?b.visualViewport.width:E[R];l-=I-s.width,l*=p?1:-1}}var F=Object.assign({position:d},h&&Wa),U=a===!0?Va({x:l,y:g},ke(i)):{x:l,y:g};if(l=U.x,g=U.y,p){var Q;return Object.assign({},F,(Q={},Q[y]=k?"0":"",Q[w]=x?"0":"",Q.transform=(b.devicePixelRatio||1)<=1?"translate("+l+"px, "+g+"px)":"translate3d("+l+"px, "+g+"px, 0)",Q))}return Object.assign({},F,(e={},e[y]=k?g+"px":"",e[w]=x?l+"px":"",e.transform="",e))}function Ga(t){var e=t.state,i=t.options,s=i.gpuAcceleration,n=s===void 0?!0:s,r=i.adaptive,o=r===void 0?!0:r,d=i.roundOffsets,p=d===void 0?!0:d,h={placement:Fe(e.placement),variation:Ct(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,ys(Object.assign({},h,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:p})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,ys(Object.assign({},h,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:p})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Ka={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ga,data:{}};var ai={passive:!0};function Za(t){var e=t.state,i=t.instance,s=t.options,n=s.scroll,r=n===void 0?!0:n,o=s.resize,d=o===void 0?!0:o,p=ke(e.elements.popper),h=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&h.forEach(function(a){a.addEventListener("scroll",i.update,ai)}),d&&p.addEventListener("resize",i.update,ai),function(){r&&h.forEach(function(a){a.removeEventListener("scroll",i.update,ai)}),d&&p.removeEventListener("resize",i.update,ai)}}const Ja={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Za,data:{}};var Xa={left:"right",right:"left",bottom:"top",top:"bottom"};function fi(t){return t.replace(/left|right|bottom|top/g,function(e){return Xa[e]})}var Ya={start:"end",end:"start"};function ws(t){return t.replace(/start|end/g,function(e){return Ya[e]})}function Dn(t){var e=ke(t),i=e.pageXOffset,s=e.pageYOffset;return{scrollLeft:i,scrollTop:s}}function Nn(t){return It(it(t)).left+Dn(t).scrollLeft}function Qa(t,e){var i=ke(t),s=it(t),n=i.visualViewport,r=s.clientWidth,o=s.clientHeight,d=0,p=0;if(n){r=n.width,o=n.height;var h=fr();(h||!h&&e==="fixed")&&(d=n.offsetLeft,p=n.offsetTop)}return{width:r,height:o,x:d+Nn(t),y:p}}function el(t){var e,i=it(t),s=Dn(t),n=(e=t.ownerDocument)==null?void 0:e.body,r=ht(i.scrollWidth,i.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),o=ht(i.scrollHeight,i.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),d=-s.scrollLeft+Nn(t),p=-s.scrollTop;return Ze(n||i).direction==="rtl"&&(d+=ht(i.clientWidth,n?n.clientWidth:0)-r),{width:r,height:o,x:d,y:p}}function jn(t){var e=Ze(t),i=e.overflow,s=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+n+s)}function yr(t){return["html","body","#document"].indexOf(He(t))>=0?t.ownerDocument.body:Ce(t)&&jn(t)?t:yr(_i(t))}function jt(t,e){var i;e===void 0&&(e=[]);var s=yr(t),n=s===((i=t.ownerDocument)==null?void 0:i.body),r=ke(s),o=n?[r].concat(r.visualViewport||[],jn(s)?s:[]):s,d=e.concat(o);return n?d:d.concat(jt(_i(o)))}function xn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function tl(t,e){var i=It(t,!1,e==="fixed");return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}function xs(t,e,i){return e===hr?xn(Qa(t,i)):gt(e)?tl(e,i):xn(el(it(t)))}function il(t){var e=jt(_i(t)),i=["absolute","fixed"].indexOf(Ze(t).position)>=0,s=i&&Ce(t)?Jt(t):t;return gt(s)?e.filter(function(n){return gt(n)&&gr(n,s)&&He(n)!=="body"}):[]}function nl(t,e,i,s){var n=e==="clippingParents"?il(t):[].concat(e),r=[].concat(n,[i]),o=r[0],d=r.reduce(function(p,h){var a=xs(t,h,s);return p.top=ht(a.top,p.top),p.right=wi(a.right,p.right),p.bottom=wi(a.bottom,p.bottom),p.left=ht(a.left,p.left),p},xs(t,o,s));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function wr(t){var e=t.reference,i=t.element,s=t.placement,n=s?Fe(s):null,r=s?Ct(s):null,o=e.x+e.width/2-i.width/2,d=e.y+e.height/2-i.height/2,p;switch(n){case be:p={x:o,y:e.y-i.height};break;case Oe:p={x:o,y:e.y+e.height};break;case Te:p={x:e.x+e.width,y:d};break;case ye:p={x:e.x-i.width,y:d};break;default:p={x:e.x,y:e.y}}var h=n?Mn(n):null;if(h!=null){var a=h==="y"?"height":"width";switch(r){case _t:p[h]=p[h]-(e[a]/2-i[a]/2);break;case Ht:p[h]=p[h]+(e[a]/2-i[a]/2);break}}return p}function Wt(t,e){e===void 0&&(e={});var i=e,s=i.placement,n=s===void 0?t.placement:s,r=i.strategy,o=r===void 0?t.strategy:r,d=i.boundary,p=d===void 0?Ea:d,h=i.rootBoundary,a=h===void 0?hr:h,u=i.elementContext,c=u===void 0?Pt:u,l=i.altBoundary,f=l===void 0?!1:l,g=i.padding,v=g===void 0?0:g,x=vr(typeof v!="number"?v:br(v,Zt)),k=c===Pt?Sa:Pt,w=t.rects.popper,y=t.elements[f?k:c],b=nl(gt(y)?y:y.contextElement||it(t.elements.popper),p,a,o),E=It(t.elements.reference),_=wr({reference:E,element:w,placement:n}),R=xn(Object.assign({},w,_)),M=c===Pt?R:E,I={top:b.top-M.top+x.top,bottom:M.bottom-b.bottom+x.bottom,left:b.left-M.left+x.left,right:M.right-b.right+x.right},F=t.modifiersData.offset;if(c===Pt&&F){var U=F[n];Object.keys(I).forEach(function(Q){var re=[Te,Oe].indexOf(Q)>=0?1:-1,T=[be,Oe].indexOf(Q)>=0?"y":"x";I[Q]+=U[T]*re})}return I}function sl(t,e){e===void 0&&(e={});var i=e,s=i.placement,n=i.boundary,r=i.rootBoundary,o=i.padding,d=i.flipVariations,p=i.allowedAutoPlacements,h=p===void 0?pr:p,a=Ct(s),u=a?d?vs:vs.filter(function(f){return Ct(f)===a}):Zt,c=u.filter(function(f){return h.indexOf(f)>=0});c.length===0&&(c=u);var l=c.reduce(function(f,g){return f[g]=Wt(t,{placement:g,boundary:n,rootBoundary:r,padding:o})[Fe(g)],f},{});return Object.keys(l).sort(function(f,g){return l[f]-l[g]})}function rl(t){if(Fe(t)===Rn)return[];var e=fi(t);return[ws(t),e,ws(e)]}function ol(t){var e=t.state,i=t.options,s=t.name;if(!e.modifiersData[s]._skip){for(var n=i.mainAxis,r=n===void 0?!0:n,o=i.altAxis,d=o===void 0?!0:o,p=i.fallbackPlacements,h=i.padding,a=i.boundary,u=i.rootBoundary,c=i.altBoundary,l=i.flipVariations,f=l===void 0?!0:l,g=i.allowedAutoPlacements,v=e.options.placement,x=Fe(v),k=x===v,w=p||(k||!f?[fi(v)]:rl(v)),y=[v].concat(w).reduce(function(_e,me){return _e.concat(Fe(me)===Rn?sl(e,{placement:me,boundary:a,rootBoundary:u,padding:h,flipVariations:f,allowedAutoPlacements:g}):me)},[]),b=e.rects.reference,E=e.rects.popper,_=new Map,R=!0,M=y[0],I=0;I<y.length;I++){var F=y[I],U=Fe(F),Q=Ct(F)===_t,re=[be,Oe].indexOf(U)>=0,T=re?"width":"height",oe=Wt(e,{placement:F,boundary:a,rootBoundary:u,altBoundary:c,padding:h}),H=re?Q?Te:ye:Q?Oe:be;b[T]>E[T]&&(H=fi(H));var X=fi(H),te=[];if(r&&te.push(oe[U]<=0),d&&te.push(oe[H]<=0,oe[X]<=0),te.every(function(_e){return _e})){M=F,R=!1;break}_.set(F,te)}if(R)for(var le=f?3:1,Se=function(me){var We=y.find(function(Me){var Re=_.get(Me);if(Re)return Re.slice(0,me).every(function(De){return De})});if(We)return M=We,"break"},we=le;we>0;we--){var j=Se(we);if(j==="break")break}e.placement!==M&&(e.modifiersData[s]._skip=!0,e.placement=M,e.reset=!0)}}const al={name:"flip",enabled:!0,phase:"main",fn:ol,requiresIfExists:["offset"],data:{_skip:!1}};function ks(t,e,i){return i===void 0&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function Es(t){return[be,Te,Oe,ye].some(function(e){return t[e]>=0})}function ll(t){var e=t.state,i=t.name,s=e.rects.reference,n=e.rects.popper,r=e.modifiersData.preventOverflow,o=Wt(e,{elementContext:"reference"}),d=Wt(e,{altBoundary:!0}),p=ks(o,s),h=ks(d,n,r),a=Es(p),u=Es(h);e.modifiersData[i]={referenceClippingOffsets:p,popperEscapeOffsets:h,isReferenceHidden:a,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":a,"data-popper-escaped":u})}const cl={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ll};function dl(t,e,i){var s=Fe(t),n=[ye,be].indexOf(s)>=0?-1:1,r=typeof i=="function"?i(Object.assign({},e,{placement:t})):i,o=r[0],d=r[1];return o=o||0,d=(d||0)*n,[ye,Te].indexOf(s)>=0?{x:d,y:o}:{x:o,y:d}}function ul(t){var e=t.state,i=t.options,s=t.name,n=i.offset,r=n===void 0?[0,0]:n,o=pr.reduce(function(a,u){return a[u]=dl(u,e.rects,r),a},{}),d=o[e.placement],p=d.x,h=d.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=p,e.modifiersData.popperOffsets.y+=h),e.modifiersData[s]=o}const hl={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ul};function pl(t){var e=t.state,i=t.name;e.modifiersData[i]=wr({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const fl={name:"popperOffsets",enabled:!0,phase:"read",fn:pl,data:{}};function gl(t){return t==="x"?"y":"x"}function ml(t){var e=t.state,i=t.options,s=t.name,n=i.mainAxis,r=n===void 0?!0:n,o=i.altAxis,d=o===void 0?!1:o,p=i.boundary,h=i.rootBoundary,a=i.altBoundary,u=i.padding,c=i.tether,l=c===void 0?!0:c,f=i.tetherOffset,g=f===void 0?0:f,v=Wt(e,{boundary:p,rootBoundary:h,padding:u,altBoundary:a}),x=Fe(e.placement),k=Ct(e.placement),w=!k,y=Mn(x),b=gl(y),E=e.modifiersData.popperOffsets,_=e.rects.reference,R=e.rects.popper,M=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,I=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),F=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,U={x:0,y:0};if(E){if(r){var Q,re=y==="y"?be:ye,T=y==="y"?Oe:Te,oe=y==="y"?"height":"width",H=E[y],X=H+v[re],te=H-v[T],le=l?-R[oe]/2:0,Se=k===_t?_[oe]:R[oe],we=k===_t?-R[oe]:-_[oe],j=e.elements.arrow,_e=l&&j?Pn(j):{width:0,height:0},me=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:mr(),We=me[re],Me=me[T],Re=Nt(0,_[oe],_e[oe]),De=w?_[oe]/2-le-Re-We-I.mainAxis:Se-Re-We-I.mainAxis,Ot=w?-_[oe]/2+le+Re+Me+I.mainAxis:we+Re+Me+I.mainAxis,Ae=e.elements.arrow&&Jt(e.elements.arrow),rt=Ae?y==="y"?Ae.clientTop||0:Ae.clientLeft||0:0,ot=(Q=F?.[y])!=null?Q:0,Li=H+De-ot-rt,Pi=H+Ot-ot,Yt=Nt(l?wi(X,Li):X,H,l?ht(te,Pi):te);E[y]=Yt,U[y]=Yt-H}if(d){var Qt,Mi=y==="x"?be:ye,ei=y==="x"?Oe:Te,Ve=E[b],bt=b==="y"?"height":"width",Tt=Ve+v[Mi],Ne=Ve-v[ei],yt=[be,ye].indexOf(x)!==-1,Ge=(Qt=F?.[b])!=null?Qt:0,at=yt?Tt:Ve-_[bt]-R[bt]-Ge+I.altAxis,$t=yt?Ve+_[bt]+R[bt]-Ge-I.altAxis:Ne,ti=l&&yt?za(at,Ve,$t):Nt(l?at:Tt,Ve,l?$t:Ne);E[b]=ti,U[b]=ti-Ve}e.modifiersData[s]=U}}const vl={name:"preventOverflow",enabled:!0,phase:"main",fn:ml,requiresIfExists:["offset"]};function bl(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function yl(t){return t===ke(t)||!Ce(t)?Dn(t):bl(t)}function wl(t){var e=t.getBoundingClientRect(),i=At(e.width)/t.offsetWidth||1,s=At(e.height)/t.offsetHeight||1;return i!==1||s!==1}function xl(t,e,i){i===void 0&&(i=!1);var s=Ce(e),n=Ce(e)&&wl(e),r=it(e),o=It(t,n,i),d={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(s||!s&&!i)&&((He(e)!=="body"||jn(r))&&(d=yl(e)),Ce(e)?(p=It(e,!0),p.x+=e.clientLeft,p.y+=e.clientTop):r&&(p.x=Nn(r))),{x:o.left+d.scrollLeft-p.x,y:o.top+d.scrollTop-p.y,width:o.width,height:o.height}}function kl(t){var e=new Map,i=new Set,s=[];t.forEach(function(r){e.set(r.name,r)});function n(r){i.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(d){if(!i.has(d)){var p=e.get(d);p&&n(p)}}),s.push(r)}return t.forEach(function(r){i.has(r.name)||n(r)}),s}function El(t){var e=kl(t);return Pa.reduce(function(i,s){return i.concat(e.filter(function(n){return n.phase===s}))},[])}function Sl(t){var e;return function(){return e||(e=new Promise(function(i){Promise.resolve().then(function(){e=void 0,i(t())})})),e}}function _l(t){var e=t.reduce(function(i,s){var n=i[s.name];return i[s.name]=n?Object.assign({},n,s,{options:Object.assign({},n.options,s.options),data:Object.assign({},n.data,s.data)}):s,i},{});return Object.keys(e).map(function(i){return e[i]})}var Ss={placement:"bottom",modifiers:[],strategy:"absolute"};function _s(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some(function(s){return!(s&&typeof s.getBoundingClientRect=="function")})}function Al(t){t===void 0&&(t={});var e=t,i=e.defaultModifiers,s=i===void 0?[]:i,n=e.defaultOptions,r=n===void 0?Ss:n;return function(d,p,h){h===void 0&&(h=r);var a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ss,r),modifiersData:{},elements:{reference:d,popper:p},attributes:{},styles:{}},u=[],c=!1,l={state:a,setOptions:function(x){var k=typeof x=="function"?x(a.options):x;g(),a.options=Object.assign({},r,a.options,k),a.scrollParents={reference:gt(d)?jt(d):d.contextElement?jt(d.contextElement):[],popper:jt(p)};var w=El(_l([].concat(s,a.options.modifiers)));return a.orderedModifiers=w.filter(function(y){return y.enabled}),f(),l.update()},forceUpdate:function(){if(!c){var x=a.elements,k=x.reference,w=x.popper;if(_s(k,w)){a.rects={reference:xl(k,Jt(w),a.options.strategy==="fixed"),popper:Pn(w)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(I){return a.modifiersData[I.name]=Object.assign({},I.data)});for(var y=0;y<a.orderedModifiers.length;y++){if(a.reset===!0){a.reset=!1,y=-1;continue}var b=a.orderedModifiers[y],E=b.fn,_=b.options,R=_===void 0?{}:_,M=b.name;typeof E=="function"&&(a=E({state:a,options:R,name:M,instance:l})||a)}}}},update:Sl(function(){return new Promise(function(v){l.forceUpdate(),v(a)})}),destroy:function(){g(),c=!0}};if(!_s(d,p))return l;l.setOptions(h).then(function(v){!c&&h.onFirstUpdate&&h.onFirstUpdate(v)});function f(){a.orderedModifiers.forEach(function(v){var x=v.name,k=v.options,w=k===void 0?{}:k,y=v.effect;if(typeof y=="function"){var b=y({state:a,name:x,instance:l,options:w}),E=function(){};u.push(b||E)}})}function g(){u.forEach(function(v){return v()}),u=[]}return l}}var Il=[Ja,fl,Ka,Na,hl,al,vl,Ha,cl],Cl=Al({defaultModifiers:Il});const Ol=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="12" viewBox="0 0 24 12">\r
|
|
565
566
|
<path d="M0 0l11.96 12L24 0z" fill="#999" class="arrow-border"/>\r
|
|
566
567
|
<path d="M12 11L1 0h22z" fill="#f2f2f2" class="arrow-background"/>\r
|
|
567
568
|
</svg>\r
|
|
568
|
-
`,
|
|
569
|
+
`,Tl=navigator.userAgent.indexOf("Trident")!==-1,As=1,Is="sd-popover-open",xr=class extends HTMLElement{constructor(){super(...arguments),this._open=!1,this._firstUpdated=!1,this.toggle=()=>{this.open=!this.open},this.show=()=>{this.open=!0},this.hide=()=>{this.open=!1},this.hideIfExternalTarget=e=>{const i=e.target;(!(i instanceof HTMLElement)||!this._container.contains(i)&&!this.targetElement.contains(i))&&this.hide()}}get triggerType(){return this.getAttribute("trigger-type")}set triggerType(e){e?this.setAttribute("trigger-type",e):this.removeAttribute("trigger-type")}get placement(){return this.getAttribute("placement")}set placement(e){e?this.setAttribute("placement",e):this.removeAttribute("placement")}get targetElement(){return this._targetElement}set targetElement(e){this.removeTargetEventListener(this.targetElement),this._targetElement&&this._targetElement.getAttribute("aria-expanded")=="true"&&this._targetElement.setAttribute("aria-expanded","false"),this._targetElement=e,e&&e.setAttribute("aria-expanded","false"),this.addTargetEventListener(this.targetElement),this.updatePopper()}get targetSelector(){return this.getAttribute("target-selector")}set targetSelector(e){e?this.setAttribute("target-selector",e):this.removeAttribute("target-selector")}get modal(){return this.hasAttribute("modal")}set modal(e){e?this.setAttribute("modal",""):this.removeAttribute("modal")}get popoverFor(){return this.getAttribute("popover-for")}set popoverFor(e){e?this.setAttribute("popover-for",e):this.removeAttribute("popover-for")}get flipPriority(){return this._flipPriority}set flipPriority(e){e&&e.length>0?this._flipPriority=e:this._flipPriority=null,this.reConfigurePopper()}get offset(){return this.getAttribute("offset")?parseInt(this.getAttribute("offset")):0}set offset(e){e?this.setAttribute("offset",e.toString()):this.removeAttribute("offset"),this.reConfigurePopper()}reConfigurePopper(){this._popper&&this.configurePopper()}get noArrow(){return this.hasAttribute("no-arrow")}set noArrow(e){e?this.setAttribute("no-arrow",""):this.removeAttribute("no-arrow")}static get observedAttributes(){return["placement","target-selector","trigger-type"]}attributeChangedCallback(e,i){switch(e){case"placement":{this.updatePopper();break}case"trigger-type":{this.removeTargetEventListener(this.targetElement),this.addTargetEventListener(this.targetElement);break}case"target-selector":{this.handleTargetSelectorChange(i);break}}}connectedCallback(){this._firstUpdated||(this.firstUpdated(),this._firstUpdated=!0),this.targetElement?this.addTargetEventListener(this.targetElement):this.targetSelector&&requestAnimationFrame(()=>{this.isConnected&&this.handleTargetSelectorChange(null)}),this._arrow=document.createElement("div"),this._arrow.classList.add("popover-arrow"),this._arrow.setAttribute("data-popper-arrow",""),this._arrow.style.display="flex",this._arrow.innerHTML=Ol}disconnectedCallback(){this.targetElement&&(this.removeTargetEventListener(this.targetElement),this.removeTargetClassForOpen(this.targetElement)),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}firstUpdated(){this.style.display="none",this.triggerType=this.triggerType||"click",this.placement=this.placement||"auto"}get open(){return this._open}set open(e){e!==this._open&&(this._open=e,this.handleOpenChange())}handleOpenChange(){this.open?(this._popper||this.configurePopper(),this._container.innerHTML="",this.popoverFor&&this._container.setAttribute("popover-for",this.popoverFor),this.content&&(this._container.prepend(this.content),Object.assign(this.content.style,{position:"relative",display:"block",zIndex:1}),window.requestAnimationFrame(()=>{let e=getComputedStyle(this.content).backgroundColor;e=="rgba(0, 0, 0, 0)"&&(this.content.style.background=e="#f2f2f2"),this._arrow.querySelector(".arrow-background").style.fill=e})),this.ensureArrowIsAdded(),this.ownerDocument.body.appendChild(this._container),this.updatePopper(),this.setAttribute("open",""),this.modal&&(window.addEventListener("click",this.hideIfExternalTarget,{capture:!0}),window.addEventListener("focus",this.hideIfExternalTarget,{capture:!0})),this.targetElement&&(this.addTargetClassForOpen(this.targetElement),this.targetElement.setAttribute("aria-expanded","true")),this.dispatchEvent(new CustomEvent("open"))):(this.ownerDocument.body.removeChild(this._container),this.removeAttribute("open"),window.removeEventListener("click",this.hideIfExternalTarget,{capture:!0}),window.removeEventListener("focus",this.hideIfExternalTarget,{capture:!0}),this.targetElement&&(this.removeTargetClassForOpen(this.targetElement),this.targetElement.setAttribute("aria-expanded","false")),this.dispatchEvent(new CustomEvent("close")))}handleTargetSelectorChange(e){const i=document.querySelector(e);i&&(this.removeTargetEventListener(i),this.removeTargetClassForOpen(i)),this.targetSelector&&(this.targetElement=document.querySelector(this.targetSelector),this.addTargetEventListener(this.targetElement))}addTargetEventListener(e){if(e)switch(this.triggerType){case"hover":{e.addEventListener("mouseenter",this.show),e.addEventListener("mouseleave",this.hide);break}case"click":{e.addEventListener("click",this.toggle);break}}}removeTargetEventListener(e){if(e)switch(this.triggerType){case"hover":{e.removeEventListener("mouseenter",this.show),e.removeEventListener("mouseleave",this.hide);break}case"click":{e.removeEventListener("click",this.toggle);break}}}configurePopper(){this.createContentContainer(),this.ensureArrowIsAdded();const e=this,i={placement:e.placement,strategy:"absolute",modifiers:[{name:"computeStyles",options:{gpuAcceleration:!Tl}},{name:"flip",options:{fallbackPlacements:e._flipPriority}},{name:"offset",options:{offset:()=>[0,e.noArrow?0+e.offset:this._arrow.clientHeight+e.offset]}},{name:"arrow",options:{padding:6}},{name:"resetArrowStyles",enabled:!0,phase:"beforeWrite",fn({state:s}){Object.assign(e._arrow.style,{top:s.styles.arrow.top||"",left:s.styles.arrow.left||"",bottom:s.styles.arrow.bottom||"",right:s.styles.arrow.right||""})}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn({state:s}){e.updateArrow(s.placement)}}]};this._popper=Cl(this.targetElement,this._container,i)}createContentContainer(){this._container=document.createElement("div"),this._container.classList.add("popover-container"),this._container.tabIndex=0,this._resizeObserver&&this._resizeObserver.disconnect(),this._resizeObserver=new ResizeObserver(()=>{this._popper&&this._popper.update()}),this._resizeObserver.observe(this._container),Object.assign(this._container.style,{boxShadow:`0 4px 5px 0 rgba(0, 0, 0, 0.14),
|
|
569
570
|
0 1px 10px 0 rgba(0, 0, 0, 0.12),
|
|
570
|
-
0 2px 4px -1px rgba(0, 0, 0, 0.4)`,border:"1px solid #999",boxSizing:"border-box",zIndex:2e4})}ensureArrowIsAdded(){!this.noArrow&&!this._container.contains(this._arrow)&&this._container.appendChild(this._arrow)}updatePopper(){this._popper&&(this._popper.state.elements.reference=this.targetElement,this._popper.state.options.placement=this.placement,this.open&&this._popper.update())}updateArrow(e){if(this._arrow){const
|
|
571
|
-
${
|
|
572
|
-
`]}render(){return this.updateItemsRenderData(),
|
|
571
|
+
0 2px 4px -1px rgba(0, 0, 0, 0.4)`,border:"1px solid #999",boxSizing:"border-box",zIndex:2e4})}ensureArrowIsAdded(){!this.noArrow&&!this._container.contains(this._arrow)&&this._container.appendChild(this._arrow)}updatePopper(){this._popper&&(this._popper.state.elements.reference=this.targetElement,this._popper.state.options.placement=this.placement,this.open&&this._popper.update())}updateArrow(e){if(this._arrow){const i=this.getArrowVariant(e);if(this._arrow.setAttribute("variant",i),this._content){const s=this._arrow.querySelector("svg"),n=this._arrow.clientWidth,r=this._arrow.clientHeight,o=`-${r-As}px`,d=(n-r)/2,p=`-${r+d-As}px`;switch(i){case"bottom":{this._arrow.style.top=o,s.style.transform="rotate(180deg)";break}case"top":{this._arrow.style.bottom=o,s.style.transform="rotate(0deg)";break}case"left":{this._arrow.style.right=p,s.style.transform="rotate(270deg)";break}case"right":{this._arrow.style.left=p,s.style.transform="rotate(90deg)";break}}}}}getArrowVariant(e){if(e.indexOf("bottom")!==-1)return"bottom";if(e.indexOf("top")!==-1)return"top";if(e.indexOf("left")!==-1)return"left";if(e.indexOf("right")!==-1)return"right"}get content(){return this._content||(this._content=this.firstElementChild,this._content.setAttribute("data-popper-content","")),this._content}addTargetClassForOpen(e){e&&e.classList.add(Is)}removeTargetClassForOpen(e){e&&e.classList.remove(Is)}};xr.ID="sd-popover";let gi=xr;customElements.get(gi.ID)||customElements.define(gi.ID,gi);class $l{getOffsetForIndexAndAlignment(e,i,s,n,r,o){const d=Math.max(0,o*n),p=Math.min(d,e*n),h=Math.max(0,e*n-r+n);switch(i){case"start":return p;case"end":return h;case"center":{const a=Math.round(h+(p-h)/2);return a<Math.ceil(r/2)?0:a>d+Math.floor(r/2)?d:a}case"auto":default:return s>=h&&s<=p?s:s<h?h:p}}debounce(e){let i;return(...s)=>{i&&window.cancelAnimationFrame(i),i=window.requestAnimationFrame(()=>{e(...s),i=null})}}}const Rl=new $l,Ll=":host{display:block;position:relative;contain:layout}:host(:focus){outline:none}:host(:focus-visible) ::slotted([focused]){box-shadow:0 0 0 1px #1467ba inset}.container{width:100%}.container>::slotted(*){width:100%;position:absolute;box-sizing:border-box}.container>::slotted(:not([last])){border-bottom:1px solid #d9d9d9}";var Pl=Object.defineProperty,Ml=Object.getOwnPropertyDescriptor,nt=(t,e,i,s)=>{for(var n=s>1?void 0:s?Ml(e,i):e,r=t.length-1,o;r>=0;r--)(o=t[r])&&(n=(s?o(e,i,n):o(n))||n);return s&&n&&Pl(e,i,n),n};let Dl=0;var et;const Je=(et=class extends Ie{constructor(){super(),this.items=[],this.selectionType="trigger-only",this.id=et.ID+"_"+Dl++,this.role="listbox",this.itemGenerator=ur,this._lastKnownScrollTop=0,this._lastRenderedScrollTop=0,this._itemsRenderData=[],this._elementCache=new Map,this._visibleItemsNum=0,this._selectedIndices=[],this._focusIndex=-1,this._lastKnownHeight=0,this.onScroll=()=>{this._lastKnownScrollTop=this.scrollTop;const t=this._lastRenderedScrollTop-this._lastKnownScrollTop;Math.abs(t)>=this.itemHeight&&(this._lastRenderedScrollTop=this._lastKnownScrollTop,this.requestUpdate())},this.handleKeyDown=t=>{let e=!0;switch(t.key){case"Down":case"ArrowDown":this.focusIndex=this.normalizeIndex(this.focusIndex+1);break;case"Up":case"ArrowUp":this.focusIndex=this.normalizeIndex(this.focusIndex-1);break;case"Enter":this.handleSelection(this.focusIndex,t.metaKey||t.ctrlKey);break;case"End":this.focusIndex=this.itemCount-1;break;case"PageDown":this.focusIndex=this.normalizeIndex(this.focusIndex+this._visibleItemsNum-1);break;case"Home":this.focusIndex=0;break;case"PageUp":this.focusIndex=this.normalizeIndex(this.focusIndex-this._visibleItemsNum+1);break;default:e=!1;break}e&&(t.preventDefault(),t.stopPropagation())},this._resizeObserver=new ResizeObserver(()=>{this._lastKnownHeight!==this.offsetHeight&&(this._lastKnownHeight=this.offsetHeight,this.requestUpdate())})}get focusTarget(){return this.hasAttribute("focus-target")}set focusTarget(t){this.toggleAttribute("focus-target",t)}get focusIndex(){return this._focusIndex}set focusIndex(t){if(t>=-1&&t<this.itemCount){const e=this._focusIndex;this._focusIndex=t,(t<=this._firstVisibleIndex||this._lastVisibleIndex<=t)&&this.scrollToItem(t),e!=t&&(t==-1&&this.removeAttribute("aria-activedescendant"),this.requestUpdate("focusIndex",e))}}get selectedIndices(){return this._selectedIndices}set selectedIndices(t){t?this._selectedIndices=t.map(e=>Number(e)):this._selectedIndices=[],this.requestUpdate("selectedIndices")}scrollToItem(t,e="auto"){this.scrollTop=Rl.getOffsetForIndexAndAlignment(this.normalizeIndex(t),e,this.scrollTop,this.itemHeight,this.height,this.itemCount),this._lastKnownScrollTop=this.scrollTop}getListItem(t){return!this.shadowRoot||t<this._firstVisibleIndex||this._lastVisibleIndex<t?null:this.querySelector(`[item-index="${t}"]`)}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this),this.scrollTop!==this._lastKnownScrollTop&&(this.scrollTop=this._lastKnownScrollTop,this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.disconnect()}firstUpdated(t){super.firstUpdated(t),this.addEventListener("scroll",this.onScroll),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick),this.addEventListener("mousedown",e=>{e.button==1&&e.preventDefault()}),this.addEventListener("auxclick",this.handleClick),this.addEventListener("focus",()=>{this.matches(":focus-visible")&&(this.focusIndex==-1?(this.selectedIndices&&(this.focusIndex=this.selectedIndices[0]),this.focusIndex==-1&&this.itemCount>0&&(this.focusIndex=0)):this.updateFocusedItemAttributes())}),this.addEventListener("blur",()=>{this.focusIndex!=-1&&this.updateFocusedItemAttributes()}),this.selectedIndices.length>0&&this.scrollToItem(this.selectedIndices[0],"center")}updateFocusedItemAttributes(){const t=this.getListItem(this.focusIndex);t&&(this.focusTarget||document.activeElement==this?(t.setAttribute("focused",""),this.setAttribute("aria-activedescendant",t.id)):(t.removeAttribute("focused"),this.removeAttribute("aria-activedescendant")))}static get styles(){return[ki`
|
|
572
|
+
${mt(Ll)}
|
|
573
|
+
`]}render(){return this.updateItemsRenderData(),de`
|
|
573
574
|
<div class="container" style="height: ${this.itemCount*this.itemHeight}px">
|
|
574
575
|
<slot name="items"></slot>
|
|
575
576
|
</div>
|
|
576
|
-
`}updated(i){if(super.updated(i),this._lastRenderedScrollTop=this._lastKnownScrollTop,this.updateItems(),(this._increaseWidthOnNextRenderIfNeeded||this._reachedMaxWidth)&&this._firstVisibleIndex<this._lastVisibleIndex)if(this.querySelector("[item-index]"))this.adjustWidthIfNeeded();else{const e=new MutationObserver(()=>{this.adjustWidthIfNeeded(),e.disconnect()});e.observe(this)}}adjustWidthIfNeeded(){this._increaseWidthOnNextRenderIfNeeded?(this._increaseWidthOnNextRenderIfNeeded=!1,window.requestAnimationFrame(()=>{const i=Number.parseInt(getComputedStyle(this).maxWidth)-this.offsetWidth;if(i==0)this._reachedMaxWidth=!0,this.enableLineClampOnItemsIfNeeded();else{this._reachedMaxWidth=!1;const e=[...this.querySelectorAll("[item-index]")].map(n=>{if(n instanceof rt){n.enableLineClamp=!1;const s=n.missingWidthForTexts;return s>i&&(n.enableLineClamp=!0),s}}),t=Math.max(...e);t>0&&(this.style.width=`${this.offsetWidth+t}px`)}})):this._reachedMaxWidth&&this.enableLineClampOnItemsIfNeeded()}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[item-index]").forEach(i=>{i instanceof rt&&(i.enableLineClamp=i.enableLineClamp||i.missingWidthForTexts>0)})}increaseWidthOnNextRenderIfNeeded(){this._increaseWidthOnNextRenderIfNeeded=!0}updateItems(){const i=[...this.querySelectorAll("[item-index]")],e=new Map,t=document.createDocumentFragment();for(const n of this._itemsRenderData){const s=this.renderItem(n);s.parentElement||t.appendChild(s),e.set(n.dataHash,s);const r=i.indexOf(s);r!==-1&&i.splice(r,1)}this.appendChild(t);for(const n of i)n instanceof rt&&(n.enableLineClamp=!1),this.removeChild(n);e.forEach((n,s)=>{this._elementCache.set(s,n)})}renderItem({index:i,top:e,dataHash:t,data:n}){let s;return n?this._elementCache.has(t)?(s=this._elementCache.get(t),this._elementCache.delete(t)):(s=this.itemGenerator(n,i),s.setAttribute("slot","items")):(s=document.createElement("div"),s.setAttribute("placeholder-item",""),s.setAttribute("slot","items")),Object.assign(s.style,{transform:`translateY(${e}px)`,height:`${this.itemHeight}px`}),s.setAttribute("item-index",i.toString()),s.setAttribute("aria-setsize",String(this.finalSizeIsKnown?this.itemCount:-1)),s.setAttribute("aria-posinset",String(i+1)),(!s.id||s.id.startsWith(this.id+"_item_"))&&(s.id=this.id+"_item_"+i),this.itemCount-1==i?s.setAttribute("last",""):s.removeAttribute("last"),this.updateSelectedAttribute(i,s),this.updateFocusedAttribute(i,s),s}updateFocusedAttribute(i,e){this.focusIndex==i&&(this.focusTarget||document.activeElement==this)?(e.setAttribute("focused",""),this.setAttribute("aria-activedescendant",e.id)):e.removeAttribute("focused")}updateSelectedAttribute(i,e){const t=this.selectedIndices.indexOf(i)!==-1;t?e.setAttribute("selected",""):e.removeAttribute("selected"),e.setAttribute("aria-selected",String(t))}updateItemsRenderData(){if(this._itemsRenderData=[],this._visibleItemsNum=Math.min(Math.ceil(this.height/this.itemHeight),this.itemCount),this._visibleItemsNum>0){this._firstVisibleIndex=this.normalizeIndex(Math.floor(this._lastKnownScrollTop/this.itemHeight)),this._lastVisibleIndex=this.normalizeIndex(this._firstVisibleIndex+this._visibleItemsNum);const i=this.normalizeIndex(this._firstVisibleIndex-2),e=this.normalizeIndex(this._lastVisibleIndex+2);this.requestData(i,e);for(let t=i;t<=e;t++){const n=t-i,s=this.items[n];let r;s?r=JSON.stringify(s):r=`placeholder-${n}`,this._itemsRenderData.push({index:t,top:this.itemHeight*t,physicalIndex:n,dataHash:r,data:s})}}else this._firstVisibleIndex=0,this._lastVisibleIndex=0}normalizeIndex(i){return Math.max(0,Math.min(i,this.itemCount-1))}get height(){return this.offsetHeight}requestData(i,e){!Number.isNaN(i)&&!Number.isNaN(e)&&this.dispatchEvent(new CustomEvent("data-request",{detail:{startIndex:i,stopIndex:e}}))}handleSelection(i,e){if(i<0||this.itemCount<=i)return;const t=i%this._visibleItemsNum,n=this.items[t];if(!n||n.disabled)return;let s=!0;if(this.selectionType!=="trigger-only"){const r=this.selectedIndices.indexOf(i);s=r==-1,s?this.selectionType==="single"?this.selectedIndices=[i]:this.selectedIndices.push(i):this.selectedIndices.splice(r,1),this.requestUpdate("selectedIndices")}this.focusIndex=i,this.dispatchSelectionEvent(i,s,e)}dispatchSelectionEvent(i,e,t){this.dispatchEvent(new CustomEvent("selection",{detail:{index:i,selected:e,hasModifier:t}}))}handleClick(i){const e=i.composedPath().find(t=>t.hasAttribute&&t.hasAttribute("item-index"));if(e){const t=parseInt(e.getAttribute("item-index"));if(Number.isInteger(t)){if(i.button==0||i.button==1){const n=i.type=="auxclick"&&i.button==1||i.metaKey||i.ctrlKey;this.handleSelection(t,n)}this.focusIndex=t}}}},Re.ID="sd-virtual-list",Re.ensureDefined=()=>{rt.ensureDefined(),customElements.get(Re.ID)||customElements.define(Re.ID,Re)},Re);Ne([v({type:Number,attribute:"item-height",reflect:!0})],Te.prototype,"itemHeight",2);Ne([v({type:Number})],Te.prototype,"itemCount",2);Ne([v({type:Array,attribute:!1})],Te.prototype,"items",2);Ne([v({type:String,attribute:"selection-type",reflect:!0,noAccessor:!0})],Te.prototype,"selectionType",2);Ne([v({type:String,attribute:!0,reflect:!0})],Te.prototype,"id",2);Ne([v({type:String,reflect:!0})],Te.prototype,"role",2);Ne([v({type:Number,attribute:"focus-index",reflect:!0})],Te.prototype,"focusIndex",1);Ne([v({type:Array,attribute:!1})],Te.prototype,"selectedIndices",1);let ti=Te;ti.ensureDefined();let Rl=class rr{constructor(e,t){this.eventTarget=e,this.keydownHandler=t,this.catchedKeys=["Down","ArrowDown","Up","ArrowUp","Enter"],this.markAsFocusTargetHandler=()=>this.eventTarget.setAttribute("focus-target",""),this.unmarkAsFocusTargetHandler=()=>this.eventTarget.removeAttribute("focus-target"),this.delegateKeyDownEvent=n=>{if(this.catchedKeys.indexOf(n.key)!==-1){const s=n.key.toLocaleLowerCase();let r=0;const o=s.includes("enter");o||(r=s.includes("down")?1:-1),this.keydownHandler(n,r,o),n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()}}}static delegateTo(e){return new rr(e,t=>e.dispatchEvent(new KeyboardEvent(t.type,t)))}connect(e){var t,n;if(e!=null){e.addEventListener("keydown",this.delegateKeyDownEvent),e.addEventListener("focus",this.markAsFocusTargetHandler),e.addEventListener("blur",this.unmarkAsFocusTargetHandler);const s=document.activeElement;(e.contains(s)||(n=(t=e.shadowRoot)==null?void 0:t.activeElement)!=null&&n.contains(s))&&this.markAsFocusTargetHandler()}}disconnect(e){e!=null&&(e.removeEventListener("keydown",this.delegateKeyDownEvent),e.removeEventListener("focus",this.markAsFocusTargetHandler),e.removeEventListener("blur",this.unmarkAsFocusTargetHandler),this.unmarkAsFocusTargetHandler())}},Pl=0;class Ml{constructor(e,t,n,s){this.inputElement=e,this.notSelectedTokensProvider=t,this.initializeCallback=s,this.filter=(r,o)=>r?o.filter(a=>a.disabled||a.deactivated?!1:a.caption&&a.caption.toLowerCase().includes(r)):o,ti.ensureDefined(),this._tokenList=new ti,this._tokenList.id="sd_token_suggest_popover_list_"+Pl++,this._tokenList.style.minWidth="250px",this._tokenList.style.maxHeight="49vh",this._tokenList.itemHeight=50,this._tokenList.addEventListener("pointerdown",()=>{this.pointerDown=!0,window.addEventListener("pointerup",()=>{this.pointerDown=!1,this._tokenList.increaseWidthOnNextRenderIfNeeded(),this._tokenList.isUpdatePending||this._tokenList.requestUpdate()},{once:!0,capture:!0})}),this._tokenList.addEventListener("selection",r=>{const o=r.detail.index,a=this._suggestItems[o];n(a),this.hide()}),this._tokenList.addEventListener("data-request",r=>{this.lastRequestedStartIndex=r.detail.startIndex,this.lastRequestedStopIndex=r.detail.stopIndex,this.pointerDown||this._tokenList.increaseWidthOnNextRenderIfNeeded(),this._tokenList.items=this._suggestItems.slice(this.lastRequestedStartIndex,this.lastRequestedStopIndex+1)}),new Rl(this._tokenList,(r,o,a)=>{this._tokenList.dispatchEvent(new KeyboardEvent(r.type,r)),!a&&!this.isOpened&&this.show()}).connect(e)}show(){this.inputElement.effectiveDisabled||(this.popover,this._suggestItems=this.filterItems((this.inputElement.value||"").toLowerCase()),this._suggestItems.length==0?this.hide():(this._tokenList.itemCount=this._suggestItems.length,this._tokenList.focusIndex=-1,this._tokenList.style.width=null,requestAnimationFrame(()=>{this.lastRequestedStartIndex!=null&&(this._tokenList.increaseWidthOnNextRenderIfNeeded(),this._tokenList.items=this._suggestItems.slice(this.lastRequestedStartIndex,this.lastRequestedStopIndex+1))}),this.popover.show()))}refreshItems(){this.isOpened&&(this._suggestItems=this.filterItems((this.inputElement.value||"").toLowerCase()),this._suggestItems.length==0?this.hide():(this._tokenList.itemCount=this._suggestItems.length,this._tokenList.items=[],this._tokenList.style.width=null))}filterItems(e){const t=this.notSelectedTokensProvider();return this.filter(e,t)}hide(){var e;this._suggestItems=[],this._tokenList.itemCount=0,this._tokenList.items=[],(e=this._popover)==null||e.hide()}get list(){return this._tokenList}get popover(){return this._popover||(this._popover=this.createPopover(),this.initializeCallback(this)),this._popover}createPopover(){const e=new hn;return e.setAttribute("trigger-type","manual"),e.setAttribute("placement","bottom-start"),e.setAttribute("modal",""),e.setAttribute("popover-for","token-autosuggest-popover"),e.setAttribute("offset","-2"),e.targetElement=this.inputElement,e.appendChild(this._tokenList),e}get isOpened(){return this._popover&&this._popover.hasAttribute("open")}get focusedSuggestToken(){return this._suggestItems[this._tokenList.focusIndex]}}class ni extends vn{}ni.directiveName="unsafeSVG",ni.resultType=2;const Dl=Vs(ni),Nl=`:host{flex-shrink:0;max-width:100%;height:28px}:host([aria-checked=true]){position:relative}:host([aria-checked=true]):before{content:"";position:absolute;left:0;top:0;height:12px;width:12px;background:#1467ba url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20fill='none'%3e%3cpath%20stroke='%23FFF'%20stroke-width='2'%20d='M9%204%205%208%203%206'/%3e%3c/svg%3e") no-repeat center center}.container{display:flex;height:100%;background-color:var(--sd-token-background-color, #f3f3f3);border:var(--sd-token-focused-border, var(--sd-token-border));box-sizing:border-box}.container .icon-wrapper{display:flex;flex-shrink:0;justify-content:center;align-items:center;width:28px;height:100%;overflow:hidden;background-color:var(--sd-token-icon-background-color, transparent)}.container .icon-wrapper .icon{height:100%;width:100%;object-fit:contain;background-size:cover;background-repeat:no-repeat;background-position:center}.container .value{display:inline-block;align-self:center;padding:0 8px;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container .delete-button-wrapper{display:flex;align-self:center;height:16px;width:16px;padding-right:8px;opacity:.5}.container .delete-button-wrapper:hover{cursor:pointer;filter:brightness(10%);opacity:1}`,jl=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">\r
|
|
577
|
+
`}updated(t){if(super.updated(t),this._lastRenderedScrollTop=this._lastKnownScrollTop,this.updateItems(),(this._increaseWidthOnNextRenderIfNeeded||this._reachedMaxWidth)&&this._firstVisibleIndex<this._lastVisibleIndex)if(this.querySelector("[item-index]"))this.adjustWidthIfNeeded();else{const e=new MutationObserver(()=>{this.adjustWidthIfNeeded(),e.disconnect()});e.observe(this)}}adjustWidthIfNeeded(){this._increaseWidthOnNextRenderIfNeeded?(this._increaseWidthOnNextRenderIfNeeded=!1,window.requestAnimationFrame(()=>{const t=Number.parseInt(getComputedStyle(this).maxWidth)-this.offsetWidth;if(t==0)this._reachedMaxWidth=!0,this.enableLineClampOnItemsIfNeeded();else{this._reachedMaxWidth=!1;const e=[...this.querySelectorAll("[item-index]")].map(s=>{if(s instanceof Et){s.enableLineClamp=!1;const n=s.missingWidthForTexts;return n>t&&(s.enableLineClamp=!0),n}}),i=Math.max(...e);i>0&&(this.style.width=`${this.offsetWidth+i}px`)}})):this._reachedMaxWidth&&this.enableLineClampOnItemsIfNeeded()}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[item-index]").forEach(t=>{t instanceof Et&&(t.enableLineClamp=t.enableLineClamp||t.missingWidthForTexts>0)})}increaseWidthOnNextRenderIfNeeded(){this._increaseWidthOnNextRenderIfNeeded=!0}updateItems(){const t=[...this.querySelectorAll("[item-index]")],e=new Map,i=document.createDocumentFragment();for(const s of this._itemsRenderData){const n=this.renderItem(s);n.parentElement||i.appendChild(n),e.set(s.dataHash,n);const r=t.indexOf(n);r!==-1&&t.splice(r,1)}this.appendChild(i);for(const s of t)s instanceof Et&&(s.enableLineClamp=!1),this.removeChild(s);e.forEach((s,n)=>{this._elementCache.set(n,s)})}renderItem({index:t,top:e,dataHash:i,data:s}){let n;return s?this._elementCache.has(i)?(n=this._elementCache.get(i),this._elementCache.delete(i)):(n=this.itemGenerator(s,t),n.setAttribute("slot","items")):(n=document.createElement("div"),n.setAttribute("placeholder-item",""),n.setAttribute("slot","items")),Object.assign(n.style,{transform:`translateY(${e}px)`,height:`${this.itemHeight}px`}),n.setAttribute("item-index",t.toString()),n.setAttribute("aria-setsize",String(this.finalSizeIsKnown?this.itemCount:-1)),n.setAttribute("aria-posinset",String(t+1)),(!n.id||n.id.startsWith(this.id+"_item_"))&&(n.id=this.id+"_item_"+t),this.itemCount-1==t?n.setAttribute("last",""):n.removeAttribute("last"),this.updateSelectedAttribute(t,n),this.updateFocusedAttribute(t,n),n}updateFocusedAttribute(t,e){this.focusIndex==t&&(this.focusTarget||document.activeElement==this)?(e.setAttribute("focused",""),this.setAttribute("aria-activedescendant",e.id)):e.removeAttribute("focused")}updateSelectedAttribute(t,e){const i=this.selectedIndices.indexOf(t)!==-1;i?e.setAttribute("selected",""):e.removeAttribute("selected"),e.setAttribute("aria-selected",String(i))}updateItemsRenderData(){if(this._itemsRenderData=[],this._visibleItemsNum=Math.min(Math.ceil(this.height/this.itemHeight),this.itemCount),this._visibleItemsNum>0){this._firstVisibleIndex=this.normalizeIndex(Math.floor(this._lastKnownScrollTop/this.itemHeight)),this._lastVisibleIndex=this.normalizeIndex(this._firstVisibleIndex+this._visibleItemsNum);const t=this.normalizeIndex(this._firstVisibleIndex-2),e=this.normalizeIndex(this._lastVisibleIndex+2);this.requestData(t,e);for(let i=t;i<=e;i++){const s=i-t,n=this.items[s];let r;n?r=JSON.stringify(n):r=`placeholder-${s}`,this._itemsRenderData.push({index:i,top:this.itemHeight*i,physicalIndex:s,dataHash:r,data:n})}}else this._firstVisibleIndex=0,this._lastVisibleIndex=0}normalizeIndex(t){return Math.max(0,Math.min(t,this.itemCount-1))}get height(){return this.offsetHeight}requestData(t,e){!Number.isNaN(t)&&!Number.isNaN(e)&&this.dispatchEvent(new CustomEvent("data-request",{detail:{startIndex:t,stopIndex:e}}))}handleSelection(t,e){if(t<0||this.itemCount<=t)return;const i=this.getListItem(t);if(i.getAttribute("aria-disabled")=="true"||i.hasAttribute("disabled"))return;let s=!0;if(this.selectionType!=="trigger-only"){const n=this.selectedIndices.indexOf(t);s=n==-1,s?this.selectionType==="single"?this.selectedIndices=[t]:this.selectedIndices.push(t):this.selectedIndices.splice(n,1),this.requestUpdate("selectedIndices")}this.focusIndex=t,this.dispatchSelectionEvent(t,s,e)}dispatchSelectionEvent(t,e,i){this.dispatchEvent(new CustomEvent("selection",{detail:{index:t,selected:e,hasModifier:i}}))}handleClick(t){const e=t.composedPath().find(i=>i.hasAttribute&&i.hasAttribute("item-index"));if(e){const i=parseInt(e.getAttribute("item-index"));if(Number.isInteger(i)){if(t.button==0||t.button==1){const s=t.type=="auxclick"&&t.button==1||t.metaKey||t.ctrlKey;this.handleSelection(i,s)}this.focusIndex=i}}}},et.ID="sd-virtual-list",et.ensureDefined=()=>{Et.ensureDefined(),customElements.get(et.ID)||customElements.define(et.ID,et)},et);nt([$({type:Number,attribute:"item-height",reflect:!0})],Je.prototype,"itemHeight",2);nt([$({type:Number})],Je.prototype,"itemCount",2);nt([$({type:Array,attribute:!1})],Je.prototype,"items",2);nt([$({type:String,attribute:"selection-type",reflect:!0,noAccessor:!0})],Je.prototype,"selectionType",2);nt([$({type:String,attribute:!0,reflect:!0})],Je.prototype,"id",2);nt([$({type:String,reflect:!0})],Je.prototype,"role",2);nt([$({type:Number,attribute:"focus-index",reflect:!0})],Je.prototype,"focusIndex",1);nt([$({type:Array,attribute:!1})],Je.prototype,"selectedIndices",1);let kn=Je;kn.ensureDefined();let Nl=class kr{constructor(e,i){this.eventTarget=e,this.keydownHandler=i,this.catchedKeys=["Down","ArrowDown","Up","ArrowUp","Enter"],this.markAsFocusTargetHandler=()=>this.eventTarget.setAttribute("focus-target",""),this.unmarkAsFocusTargetHandler=()=>this.eventTarget.removeAttribute("focus-target"),this.delegateKeyDownEvent=s=>{if(this.catchedKeys.indexOf(s.key)!==-1){const n=s.key.toLocaleLowerCase();let r=0;const o=n.includes("enter");o||(r=n.includes("down")?1:-1),this.keydownHandler(s,r,o),s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation()}}}static delegateTo(e){return new kr(e,i=>e.dispatchEvent(new KeyboardEvent(i.type,i)))}connect(e){if(e!=null){e.addEventListener("keydown",this.delegateKeyDownEvent),e.addEventListener("focus",this.markAsFocusTargetHandler),e.addEventListener("blur",this.unmarkAsFocusTargetHandler);const i=document.activeElement;(e.contains(i)||e.shadowRoot?.activeElement?.contains(i))&&this.markAsFocusTargetHandler()}}disconnect(e){e!=null&&(e.removeEventListener("keydown",this.delegateKeyDownEvent),e.removeEventListener("focus",this.markAsFocusTargetHandler),e.removeEventListener("blur",this.unmarkAsFocusTargetHandler),this.unmarkAsFocusTargetHandler())}},jl=0;class Bl{constructor(e,i,s,n){this.inputElement=e,this.notSelectedTokensProvider=i,this.initializeCallback=n,this.filter=(r,o)=>r?o.filter(d=>d.disabled||d.deactivated?!1:d.caption&&d.caption.toLowerCase().includes(r)):o,kn.ensureDefined(),this._tokenList=new kn,this._tokenList.id="sd_token_suggest_popover_list_"+jl++,this._tokenList.style.minWidth="250px",this._tokenList.style.maxHeight="49vh",this._tokenList.itemHeight=50,this._tokenList.addEventListener("pointerdown",()=>{this.pointerDown=!0,window.addEventListener("pointerup",()=>{this.pointerDown=!1,this._tokenList.increaseWidthOnNextRenderIfNeeded(),this._tokenList.isUpdatePending||this._tokenList.requestUpdate()},{once:!0,capture:!0})}),this._tokenList.addEventListener("selection",r=>{const o=r.detail.index,d=this._suggestItems[o];s(d),this.hide()}),this._tokenList.addEventListener("data-request",r=>{this.lastRequestedStartIndex=r.detail.startIndex,this.lastRequestedStopIndex=r.detail.stopIndex,this.pointerDown||this._tokenList.increaseWidthOnNextRenderIfNeeded(),this._tokenList.items=this._suggestItems.slice(this.lastRequestedStartIndex,this.lastRequestedStopIndex+1)}),new Nl(this._tokenList,(r,o,d)=>{this._tokenList.dispatchEvent(new KeyboardEvent(r.type,r)),!d&&!this.isOpened&&this.show()}).connect(e)}show(){this.inputElement.effectiveDisabled||(this.ensurePopover(),this._suggestItems=this.filterItems((this.inputElement.value||"").toLowerCase()),this._suggestItems.length==0?this.hide():(this._tokenList.itemCount=this._suggestItems.length,this._tokenList.focusIndex=-1,this._tokenList.style.width=null,requestAnimationFrame(()=>{this.lastRequestedStartIndex!=null&&(this._tokenList.increaseWidthOnNextRenderIfNeeded(),this._tokenList.items=this._suggestItems.slice(this.lastRequestedStartIndex,this.lastRequestedStopIndex+1))}),this.popover.show()))}refreshItems(){this.isOpened&&(this._suggestItems=this.filterItems((this.inputElement.value||"").toLowerCase()),this._suggestItems.length==0?this.hide():(this._tokenList.itemCount=this._suggestItems.length,this._tokenList.items=[],this._tokenList.style.width=null))}filterItems(e){const i=this.notSelectedTokensProvider();return this.filter(e,i)}ensurePopover(){this._popover||(this._popover=this.createPopover(),this.initializeCallback(this))}hide(){this._suggestItems=[],this._tokenList.itemCount=0,this._tokenList.items=[],this._popover?.hide()}get list(){return this._tokenList}get popover(){return this.ensurePopover(),this._popover}createPopover(){const e=new gi;return e.setAttribute("trigger-type","manual"),e.setAttribute("placement","bottom-start"),e.setAttribute("modal",""),e.setAttribute("popover-for","token-autosuggest-popover"),e.setAttribute("offset","-2"),e.targetElement=this.inputElement,e.appendChild(this._tokenList),e}get isOpened(){return this._popover&&this._popover.hasAttribute("open")}get focusedSuggestToken(){return this._suggestItems[this._tokenList.focusIndex]}}class En extends yi{}En.directiveName="unsafeSVG",En.resultType=2;const zl=cr(En),Ul=`:host{flex-shrink:0;max-width:100%;height:28px}:host([aria-checked=true]){position:relative}:host([aria-checked=true]):before{content:"";position:absolute;left:0;top:0;height:12px;width:12px;background:#1467ba url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20fill='none'%3e%3cpath%20stroke='%23FFF'%20stroke-width='2'%20d='M9%204%205%208%203%206'/%3e%3c/svg%3e") no-repeat center center}.container{display:flex;height:100%;background-color:var(--sd-token-background-color, #f3f3f3);border:var(--sd-token-focused-border, var(--sd-token-border));box-sizing:border-box}.container .icon-wrapper{display:flex;flex-shrink:0;justify-content:center;align-items:center;width:28px;height:100%;overflow:hidden;background-color:var(--sd-token-icon-background-color, transparent)}.container .icon-wrapper .icon{height:100%;width:100%;object-fit:contain;background-size:cover;background-repeat:no-repeat;background-position:center}.container .value{display:inline-block;align-self:center;padding:0 8px;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container .delete-button-wrapper{display:flex;align-self:center;height:16px;width:16px;padding-right:8px;opacity:.5}.container .delete-button-wrapper:hover{cursor:pointer;filter:brightness(10%);opacity:1}`,ql=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">\r
|
|
577
578
|
<path d="m3.5 12.5 9-9m-9 0 9 9" style="fill:none;stroke:#333;stroke-linecap:square;stroke-width:1.1px"/>\r
|
|
578
|
-
</svg>`;var
|
|
579
|
+
</svg>`;var Fl=Object.defineProperty,Hl=Object.getOwnPropertyDescriptor,st=(t,e,i,s)=>{for(var n=s>1?void 0:s?Hl(e,i):e,r=t.length-1,o;r>=0;r--)(o=t[r])&&(n=(s?o(e,i,n):o(n))||n);return s&&n&&Fl(e,i,n),n};const Bn={fromAttribute:t=>t=="true",toAttribute:t=>t};var qe;const Xe=(qe=class extends Ie{constructor(){super(...arguments),this.value="",this.type="",this.icon="",this.iconPlaceholder="",this.iconBackgroundColor="",this._checked=!1}static get styles(){return mt(Ul)}set checked(e){const i=this._checked;this._checked=!this.disabled&&e,this.requestUpdate("checked",i)}get checked(){return this._checked}firstUpdated(e){super.firstUpdated(e),this.tabIndex=-1,this.setAttribute("role","option"),this.setAttribute("aria-selected","true"),this.addEventListener("click",s=>{const n=window.getSelection();if(n&&n.type=="Range")return;s.stopPropagation();const r=s.getModifierState("Control");this.disabled||(r?this.checked=!this.checked:this.checked=!0),this._tokenClickHandler&&this._tokenClickHandler(this.index,r)});const i=this.shadowRoot.querySelector(".delete-button-wrapper");i&&i.addEventListener("click",s=>{s.stopPropagation(),this._tokenDeleteHandler&&this._tokenDeleteHandler(this.index)})}render(){return de`
|
|
579
580
|
<div class="container">
|
|
580
581
|
<slot name="before-icon"></slot>
|
|
581
582
|
${this.renderIcon()}
|
|
582
583
|
<slot name="after-icon"></slot>
|
|
583
584
|
<div class="value">${this.value}</div>
|
|
584
|
-
${this.disabled?
|
|
585
|
+
${this.disabled?K:de` <div class="delete-button-wrapper">${zl(ql)}</div> `}
|
|
585
586
|
</div>
|
|
586
|
-
`}renderIcon(){if(this.icon||this.iconPlaceholder){const e=this.iconBackgroundColor!=null?`--sd-token-icon-background-color: ${this.iconBackgroundColor}`:void 0;return
|
|
587
|
-
<div class="icon-wrapper" style="${
|
|
587
|
+
`}renderIcon(){if(this.icon||this.iconPlaceholder){const e=this.iconBackgroundColor!=null?`--sd-token-icon-background-color: ${this.iconBackgroundColor}`:void 0;return de`
|
|
588
|
+
<div class="icon-wrapper" style="${fe(e)}" role="img">
|
|
588
589
|
<div part="icon" class="icon"></div>
|
|
589
590
|
</div>
|
|
590
|
-
`}return
|
|
591
|
+
`}return K}updated(e){super.updated(e),(e.has("icon")||e.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&dr.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),e.has("disabled")&&!this.disabled&&this.checked&&(this.checked=!1)}setClickHandler(e){this._tokenClickHandler=e}setDeleteHandler(e){this._tokenDeleteHandler=e}},qe.ID="sd-token",qe.ensureDefined=()=>{customElements.get(qe.ID)||customElements.define(qe.ID,qe)},qe);st([$({type:String,attribute:!0,reflect:!0})],Xe.prototype,"value",2);st([$({type:String,attribute:!0,reflect:!0})],Xe.prototype,"type",2);st([$({type:String})],Xe.prototype,"icon",2);st([$({type:String})],Xe.prototype,"iconPlaceholder",2);st([$({type:String})],Xe.prototype,"iconBackgroundColor",2);st([$({converter:Bn,reflect:!0,attribute:"aria-disabled"})],Xe.prototype,"disabled",2);st([$({converter:Bn,reflect:!0,attribute:"aria-current"})],Xe.prototype,"current",2);st([$({converter:Bn,reflect:!0,attribute:"aria-checked"})],Xe.prototype,"checked",1);let Ai=Xe;const Wl=(t,e)=>{const i=document.createElement(Ai.ID);return t&&(i.value=t.caption,i.type=t.type,i.icon=t.icon,i.iconPlaceholder=t.iconPlaceholder,i.iconBackgroundColor=t.iconBackgroundColor,i.disabled=t.disabled,i.index=e),i};Ai.ensureDefined();const li="web application/json";class Vl{constructor(e,i,s){navigator.clipboard&&(e.addEventListener("copy",()=>{const n=window.getSelection();(!n||n.type!="Range")&&!i()&&this.writeToClipboard(e)}),e.addEventListener("cut",()=>{i()||(e.removeSelectionOrActiveToken(),this.writeToClipboard(e))}),e.addEventListener("paste",()=>{e.disabled||this.readFromClipboard(s)}))}writeToClipboard(e){const i=e.querySelectorAll("[slot='items'][aria-checked='true']"),s=[];if(i.length>0)i.forEach(n=>s.push(n.index));else if(e.activeTokenIndex!=-1){const n=e.activeTokenElement;n&&s.push(n.index)}if(s.length>0){const n=JSON.stringify(s.map(o=>e.items[o])),r=new Blob([n],{type:li});navigator.clipboard.write([new ClipboardItem({[li]:r})])}}async readFromClipboard(e){const i=await navigator.clipboard.read();for(const s of i)if(s.types.includes(li)){const r=await(await s.getType(li)).text(),o=JSON.parse(r);Array.isArray(o)&&e(o)}}}const Gl=":host{display:flex;contain:layout style}:host .additonal-content::slotted(*){align-self:end;flex-shrink:0}:host([drop]) ::slotted(*){pointer-events:none}:host(:not([readonly])) ::slotted(sd-token:last-of-type){max-width:calc(100% - 24px);margin-right:24px;margin-bottom:4px}:host ::slotted(sd-token){--sd-token-border: 1px solid transparent;margin:1px}:host([selection-mode=multi][aria-disabled=true]){opacity:.6}:host([selection-mode=multi][aria-disabled=true]) .input[effective-disabled]{opacity:1}:host([selection-mode=multi][aria-disabled=true]) ::slotted([aria-disabled=true]){opacity:1}.input[focus-visible]:focus-within ::slotted(sd-token[aria-current=true]),.container:focus-visible ::slotted(sd-token[aria-current=true]){outline:1px solid #1467ba;--sd-token-focused-border: 1px solid #fff}.input[focus-visible]:focus-within ::slotted(sd-token[aria-current=true][aria-disabled=true]:not([aria-haspopup])),.container:focus-visible ::slotted(sd-token[aria-current=true][aria-disabled=true]:not([aria-haspopup])){outline-color:#767676}.container{outline:none;display:flex;flex-wrap:wrap;gap:6px;flex-grow:1;min-width:0;margin-top:auto}.container .placeholder{color:#767676;line-height:24px;align-self:flex-end}.input{flex-grow:1;min-width:0;width:100%;margin-top:auto}.input .token-wrapper{display:flex;flex-wrap:wrap;flex:1 0 auto;width:100%;gap:6px}";class Kl{constructor(e,i){this.tokenSelector=e;const s=new Map,n=r=>{const o=r.target;if(e.removeAttribute("drag-source"),!e.contains(o)){const d=r.addedIndexes;d&&e.removeTokens(d.map(p=>s.get(p)))}s.clear()};e.addEventListener("dragstart",r=>{const o=r.target;if(o instanceof Ai){if(o.disabled){r.preventDefault();return}e.setAttribute("drag-source",""),o.setAttribute("aria-checked","true");const d=e.querySelectorAll("[slot='items'][aria-checked='true']");if(d.length>0){const p=Array.from(d).filter(h=>!h.disabled).map((h,a)=>(s.set(a,h.index),e.items[h.index]));if(r.dataTransfer.setData("text/sd-token-selector",JSON.stringify(p)),r.dataTransfer.dropEffect="move",r.dataTransfer.effectAllowed="move",d.length>1){const h=this.createCustomDragImage(o,p.length);r.dataTransfer.setDragImage(h,-14,-14)}window.addEventListener("drop",n,{once:!0})}}}),e.addEventListener("dragenter",r=>{e.setAttribute("drop",""),r.preventDefault()}),e.addEventListener("dragover",r=>r.preventDefault()),e.addEventListener("dragleave",r=>{r.target==e&&e.removeAttribute("drop")}),e.addEventListener("drop",r=>{e.removeAttribute("drop");const o=r.dataTransfer.getData("text/sd-token-selector");if(o)try{const d=JSON.parse(o);Array.isArray(d)&&(r.addedIndexes=i(d),r.preventDefault())}catch{}}),e.addEventListener("dragend",()=>{window.removeEventListener("drop",n),e.removeAttribute("drag-source"),s.clear()})}createCustomDragImage(e,i){let s=e.cloneNode(!0);if(s.setAttribute("aria-disabled","true"),this.tokenSelector.tokenType)s.value=i+" "+this.tokenSelector.tokenType;else{const n=document.createElement("div");n.innerText="+"+(i-1),Object.assign(n.style,{position:"absolute",left:"90%",top:"75%"});const r=document.createElement("div");r.appendChild(s),r.appendChild(n),s=r}return Object.assign(s.style,{height:e.offsetHeight,outline:"none",maxWidth:"500px",position:"absolute",display:"block",left:"-99999px",overflow:"visible",margin:"1px"}),s.slot="items",this.tokenSelector.appendChild(s),requestAnimationFrame(()=>s.remove()),s}}var Zl=Object.defineProperty,$e=(t,e,i,s)=>{for(var n=void 0,r=t.length-1,o;r>=0;r--)(o=t[r])&&(n=o(e,i,n)||n);return n&&Zl(e,i,n),n};function Jl(t,e){let i;return function(...s){i!=null&&clearTimeout(i),i=window.setTimeout(()=>t(...s),e)}}var Le;const Ee=(Le=class extends Ie{constructor(){super(...arguments),this.selectionMode="multi",this.items=[],this.selectedIndexes=[],this._tokenGenerator=Wl,this._autoSuggestItemGenerator=ur,this.additionalTokenCommittingKeys=[],this._activeTokenIndex=-1,this.handleInputKeyDown=(e,i)=>{if((e.key==="Enter"||this.additionalTokenCommittingKeys.includes(e.key))&&i.value){e.preventDefault(),e.stopPropagation(),this.commitTokenValue(i.value),this.inputElement.removeAttribute("focus-visible");return}switch(e.key){case"Escape":{this.tokenSuggestPopover.isOpened&&(e.preventDefault(),e.stopPropagation(),this.tokenSuggestPopover.hide());break}case"Tab":{this.commitTokenValue(i.value),this.tokenSuggestPopover.hide(),this.inputElement.removeAttribute("focus-visible");break}default:this.handleKeyDown(e)}},this.handleKeyDown=e=>{switch(e.key){case"ArrowLeft":{this.hasInputValue||this.updateActiveToken(-1);break}case"ArrowRight":{this.hasInputValue||this.updateActiveToken(1);break}case"Enter":{if(!this.hasInputValue&&this.activeTokenIndex!=-1){const i=this.activeTokenElement,s=e.getModifierState("Control");s?i.checked=!i.checked:i.checked=!0,this.onTokenClick(i,!1,s),document.activeElement!=this&&this.focus()}break}case"Backspace":{this.hasInputValue||(this.activeTokenIndex==-1?this.updateActiveToken(-1):this.removeSelectionOrActiveToken());break}case"Clear":case"Delete":{this.removeSelectionOrActiveToken();break}case"a":{!this.hasInputValue&&e.getModifierState("Control")&&(this.querySelectorAll("[slot='items']").forEach(i=>i.checked=!0),e.preventDefault(),e.stopPropagation());break}}},this.selectOrAddItems=e=>{const i=[],s=e.map((n,r)=>{const o=n.caption==null?-1:this.findIndex(n);return o!=-1&&!this.items[o].disabled&&!this.selectedIndexes.includes(o)?(i.push(r),o):-1}).filter(n=>n!=-1);return s.length>0&&this.handleTokenSelection(s),i},this.handleWindowPointerDown=e=>{const i=this.inputElement;if(!i||!i.value)return;e.composedPath().some(n=>{if(n instanceof HTMLElement&&(e.composedPath().indexOf(i)>-1||n.getAttribute("popover-for")==="token-autosuggest-popover"))return!0})||this.commitTokenValue(i.value)},this.debouncedShowTokenSuggestPopover=Jl(this.showFilteredTokenSuggestions.bind(this),200)}static get styles(){return mt(Gl)}get tokenGenerator(){return this._tokenGenerator}set tokenGenerator(e){this._tokenGenerator=e,this.render()}get autoSuggestItemGenerator(){return this._autoSuggestItemGenerator}set autoSuggestItemGenerator(e){this._autoSuggestItemGenerator=e,this._tokenSuggestPopover&&(this._tokenSuggestPopover.list.itemGenerator=e)}setAdditionalTokenCommittingKeys(e){this.additionalTokenCommittingKeys=e}openSuggestions(){this.inputElement&&(this.focus(),this.tokenSuggestPopover.show())}focus(){const e=this.inputElement;e?e.focus():this.shadowRoot.querySelector(".container").focus()}render(){return this.selectionMode=="remove-only"?de`<div class="container" tabindex="${this.disabled?-1:0}">
|
|
591
592
|
<slot name="items"
|
|
592
|
-
>${this.placeholder?
|
|
593
|
+
>${this.placeholder?de`<span part="remove-only-placeholder" class="placeholder"
|
|
593
594
|
>${this.placeholder}</span
|
|
594
|
-
>`:
|
|
595
|
+
>`:K}</slot
|
|
595
596
|
>
|
|
596
597
|
</div>
|
|
597
|
-
<slot class="additonal-content" name="additional-content" @focusin=${this.clearCheckedTokens}></slot>`:
|
|
598
|
+
<slot class="additonal-content" name="additional-content" @focusin=${this.clearCheckedTokens}></slot>`:de`
|
|
598
599
|
<sd-lit-input
|
|
599
600
|
class="input"
|
|
600
601
|
.extendedPrefix=${!0}
|
|
@@ -611,35 +612,38 @@ export function getItems(): ExtendedTokenData[] {
|
|
|
611
612
|
><div class="token-wrapper" slot="prefix"><slot name="items"></slot></div>
|
|
612
613
|
</sd-lit-input>
|
|
613
614
|
<slot class="additonal-content" name="additional-content" @focusin=${this.clearCheckedTokens}></slot>
|
|
614
|
-
`}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","listbox"),this.setAttribute("aria-multiselectable","true"),!this.hasAttribute("tabIndex")&&!this.disabled&&(this.tabIndex=0),this.addEventListener("focusout",t=>{const n=t.relatedTarget;!this.contains(n)&&!this.shadowRoot.contains(n)&&this.clearCheckedTokens()}),this.addEventListener("focusin",()=>{this.selectionMode=="remove-only"&&this.activeTokenIndex==-1&&this.items.length>0&&!this.disabled&&(this.activeTokenIndex=0)}),new Fl(this,()=>{var t;return(t=this.inputElement)==null?void 0:t.value},t=>this.selectOrAddItems(t)),new Wl(this,t=>this.selectOrAddItems(t))}clearCheckedTokens(){this.querySelectorAll("[slot='items'][aria-checked='true']").forEach(t=>t.checked=!1);const e=this.inputElement;e&&(e.removeAttribute("focus-visible"),e.removeAttribute("focused"))}removeSelectionOrActiveToken(){if(!this.disabled){const e=this.querySelectorAll("[slot='items'][aria-checked='true']");if(e.length>0){const t=Array.from(e);this.removeTokens(t.filter(n=>!n.disabled).map(n=>n.index))}else if(this.activeTokenIndex!=-1){const t=this.activeTokenElement;t&&!t.disabled&&this.removeTokens([t.index])}}}updateActiveToken(e){var n;if(this.disabled)return;const t=this.querySelectorAll("[slot='items']").length-1;if(this.activeTokenIndex==-1?e<0&&(this.activeTokenIndex=t):this.activeTokenIndex==t&&e>0&&this.selectionMode=="multi"?(this.activeTokenIndex=-1,this.focus()):this.activeTokenIndex=Math.max(0,Math.min(t,this.activeTokenIndex+e)),this.activeTokenIndex>-1&&((n=this.inputElement)==null||n.setAttribute("focus-visible",""),this.scrollHeight>this.offsetHeight)){const s=this.activeTokenElement;s.scrollIntoViewIfNeeded?s.scrollIntoViewIfNeeded():s.scrollIntoView()}}commitTokenValue(e){if(this.disabled)return;if(this.tokenSuggestPopover.isOpened){const n=this.tokenSuggestPopover.focusedSuggestToken;if(n){if(!n.disabled){const s=this.findIndex(n);this.handleTokenSelection([s]),this.tokenSuggestPopover.hide()}return}}if(!(e!=null&&e.trim()))return;const t=this.items.findIndex(n=>this.caseSensitive?n.caption==e:n.caption.toLowerCase()==e.toLowerCase());this.selectedIndexes.includes(t)||(t>=0?this.handleTokenSelection([t]):this.handleTokenCreation(e)),this.requestUpdate("selectedIndexes"),this.tokenSuggestPopover.hide(),window.removeEventListener("pointerdown",this.handleWindowPointerDown)}updated(e){if(super.updated(e),this._tokenSuggestPopover&&(this.tokenSuggestPopover.list.className=this.suggestListClass||"",this.suggestionFilter&&(this.tokenSuggestPopover.filter=this.suggestionFilter)),e.has("selectionMode"))if(this.selectionMode=="multi"){this.setAttribute("aria-haspopup","listbox");const t=this.inputElement;t.addEventListener("immediate-value-change",n=>this.handleInputValueChange(n)),t.addEventListener("keydown",n=>this.handleInputKeyDown(n,t)),window.queueMicrotask(()=>this.tokenSuggestPopover)}else this.removeAttribute("aria-haspopup"),this.addEventListener("keydown",this.handleKeyDown),this._tokenSuggestPopover&&(this._tokenSuggestPopover.hide(),this._tokenSuggestPopover=null);(e.size==0||e.has("selectionMode")||e.has("items")||e.has("selectedIndexes")||e.has("disabled"))&&this.updateItems(),e.has("inputLabel")&&(this.inputLabel?this.setAttribute("aria-label",this.inputLabel):this.removeAttribute("aria-label"))}handleInputValueChange(e){e.detail.value?(this.activeTokenIndex=-1,this.cancelSearch=!1,this.debouncedShowTokenSuggestPopover(),window.addEventListener("pointerdown",this.handleWindowPointerDown)):(this.tokenSuggestPopover.hide(),this.cancelSearch=!0)}showFilteredTokenSuggestions(){!this.cancelSearch&&this.inputElement.value&&this.tokenSuggestPopover.show()}isTokenNotSelected(e){return!this.selectedIndexes.includes(e)}get tokenSuggestPopover(){return!this._tokenSuggestPopover&&this.inputElement&&(this._tokenSuggestPopover=new Ml(this.inputElement,()=>this.items.filter((e,t)=>!e.disabled&&this.isTokenNotSelected(t)),e=>{const t=this.findIndex(e);this.handleTokenSelection([t]),window.removeEventListener("pointerdown",this.handleWindowPointerDown)},e=>{this.appendChild(e.popover),this.inputElement.setAttribute("aria-controls",e.list.id),this.dispatchEvent(new CustomEvent("auto-suggest-initialized")),e.popover.addEventListener("close",()=>{this.inputElement.value&&!this.contains(document.activeElement)&&(this.inputElement.value="")})}),this._tokenSuggestPopover.list.itemGenerator=this._autoSuggestItemGenerator,this._tokenSuggestPopover.list.className=this.suggestListClass,this.suggestionFilter&&(this._tokenSuggestPopover.filter=this.suggestionFilter)),this._tokenSuggestPopover}updateItems(){if(!this.isConnected||!this.items)return;this.activeTokenIndex=-1;const e=this.inputElement;e&&(!this._tokenSuggestPopover||!this._tokenSuggestPopover.isOpened)&&(e.value=""),this.querySelectorAll("[slot='items']").forEach(s=>{this.removeChild(s)});const t=document.createDocumentFragment();let n=[];this.selectionMode=="remove-only"?n=this.items.map(s=>this.disableIfNeeded(s)):this.selectedIndexes.forEach(s=>{n.push(this.disableIfNeeded(this.items[s]))}),n.forEach(s=>{const r=this.tokenGenerator(s,this.findIndex(s));r.slot="items",t.appendChild(r),r.id||(r.id=window.crypto.getRandomValues(new Uint32Array(1))[0].toString(16)),r.setClickHandler((o,a)=>this.onTokenClick(r,!0,a)),r.addEventListener("click",()=>{var a;(a=this.inputElement)==null||a.removeAttribute("focus-visible");const o=window.getSelection();(!o||o.type!="Range")&&document.activeElement!=this&&this.focus()}),r.setDeleteHandler(o=>this.removeTokens([o]))}),this.appendChild(t),this._tokenSuggestPopover&&this._tokenSuggestPopover.refreshItems()}removeTokens(e){if(!(this.disabled||e==null||e.length==0))if(this.activeTokenIndex!=-1&&e.includes(this.activeTokenElement.index)&&(this.activeTokenIndex=-1),this.selectionMode=="remove-only")this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:e}}));else{const t=e.filter(n=>this.selectedIndexes.includes(n));t.length>0&&(this.selectedIndexes=this.selectedIndexes.filter(n=>!t.includes(n)),this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:t,selectedIndices:[...this.selectedIndexes]}})))}}onTokenClick(e,t,n){let s;this.querySelectorAll("[slot='items']").forEach((r,o)=>{e==r?s=o:n||r.setAttribute("aria-checked","false")}),this.activeTokenIndex=s,this.setAttribute("aria-activedescendant",this.activeTokenElement.id),this._tokenSuggestPopover&&this._tokenSuggestPopover.isOpened&&this._tokenSuggestPopover.hide(),n||this.dispatchEvent(new CustomEvent("token-clicked",{detail:{index:e.index,tokenElement:e,byPointerDevice:t}}))}disableIfNeeded(e){return this.disabled?{...e,disabled:!0}:e}handleTokenSelection(e){this.selectedIndexes=this.selectedIndexes.concat(e),this.dispatchEvent(new CustomEvent("tokens-selected",{detail:{newIndices:e,selectedIndices:[...this.selectedIndexes]}}))}handleTokenCreation(e){this.dispatchEvent(new CustomEvent("token-created",{detail:{value:e}}))}get inputElement(){return this.shadowRoot.querySelector(".input")}get activeTokenElement(){return this.getTokenElement(this.activeTokenIndex)}getTokenElement(e){return this.querySelector("[slot='items']:nth-of-type("+(e+1)+")")}findIndex(e){return this.items.findIndex(t=>t.caption===e.caption)}get activeTokenIndex(){return this._activeTokenIndex}set activeTokenIndex(e){if(this._activeTokenIndex!=-1){const t=this.activeTokenElement;t&&(t.current=!1)}if(this._activeTokenIndex=e,e==-1)this.removeAttribute("aria-activedescendant");else{const t=this.activeTokenElement;t.current=!0,this.setAttribute("aria-activedescendant",t.id)}}get hasInputValue(){var e;return!!((e=this.inputElement)!=null&&e.value)}},Se.ID="sd-token-selector",Se.ensureDefined=()=>{In.ensureDefined(),customElements.get(Se.ID)||customElements.define(Se.ID,Se)},Se.shadowRootOptions={...ue.shadowRootOptions,delegatesFocus:!0},Se);ge([v({type:String,attribute:"selection-mode",reflect:!0})],de.prototype,"selectionMode",2);ge([v({type:Array,attribute:!1})],de.prototype,"items",2);ge([v({type:Array,attribute:!1})],de.prototype,"selectedIndexes",2);ge([v({type:String,reflect:!0})],de.prototype,"placeholder",2);ge([v({type:String,reflect:!0,attribute:"suggest-list-class"})],de.prototype,"suggestListClass",2);ge([v({type:String,reflect:!0,attribute:"input-label"})],de.prototype,"inputLabel",2);ge([v({converter:{fromAttribute:i=>i=="true",toAttribute:i=>i},reflect:!0,attribute:"aria-disabled"})],de.prototype,"disabled",2);ge([v({type:String,attribute:!0})],de.prototype,"validationMessage",2);ge([v({type:String,attribute:!0})],de.prototype,"validationIconSrc",2);ge([v({converter:dn.levelConverter,attribute:!0,reflect:!0})],de.prototype,"validationLevel",2);ge([v({type:String,reflect:!0,attribute:"token-type"})],de.prototype,"tokenType",2);ge([v({type:Boolean,reflect:!0,attribute:"case-sensitive"})],de.prototype,"caseSensitive",2);let lh=de;function or(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Kl(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(n){var s=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return i[n]}})}),t}var Oi={exports:{}},U=String,ar=function(){return{isColorSupported:!1,reset:U,bold:U,dim:U,italic:U,underline:U,inverse:U,hidden:U,strikethrough:U,black:U,red:U,green:U,yellow:U,blue:U,magenta:U,cyan:U,white:U,gray:U,bgBlack:U,bgRed:U,bgGreen:U,bgYellow:U,bgBlue:U,bgMagenta:U,bgCyan:U,bgWhite:U}};Oi.exports=ar();Oi.exports.createColors=ar;var Zl=Oi.exports;const Xl={},Jl=Object.freeze(Object.defineProperty({__proto__:null,default:Xl},Symbol.toStringTag,{value:"Module"})),ye=Kl(Jl);let gs=Zl,ms=ye,ii=class lr extends Error{constructor(e,t,n,s,r,o){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),s&&(this.source=s),o&&(this.plugin=o),typeof t<"u"&&typeof n<"u"&&(typeof t=="number"?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,lr)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=gs.isColorSupported),ms&&e&&(t=ms(t));let n=t.split(/\r?\n/),s=Math.max(this.line-3,0),r=Math.min(this.line+2,n.length),o=String(r).length,a,l;if(e){let{bold:c,gray:d,red:h}=gs.createColors(!0);a=p=>c(h(p)),l=p=>d(p)}else a=l=c=>c;return n.slice(s,r).map((c,d)=>{let h=s+1+d,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let m=l(p.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(p)+c+`
|
|
615
|
-
`+
|
|
616
|
-
|
|
615
|
+
`}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","listbox"),this.setAttribute("aria-multiselectable","true"),!this.hasAttribute("tabIndex")&&!this.disabled&&(this.tabIndex=0),this.addEventListener("focusout",i=>{const s=i.relatedTarget;!this.contains(s)&&!this.shadowRoot.contains(s)&&this.clearCheckedTokens()}),this.addEventListener("focusin",()=>{this.selectionMode=="remove-only"&&this.activeTokenIndex==-1&&this.items.length>0&&!this.disabled&&(this.activeTokenIndex=0)}),new Vl(this,()=>this.inputElement?.value,i=>this.selectOrAddItems(i)),new Kl(this,i=>this.selectOrAddItems(i))}clearCheckedTokens(){this.querySelectorAll("[slot='items'][aria-checked='true']").forEach(i=>i.checked=!1);const e=this.inputElement;e&&(e.removeAttribute("focus-visible"),e.removeAttribute("focused"))}removeSelectionOrActiveToken(){if(!this.disabled){const e=this.querySelectorAll("[slot='items'][aria-checked='true']");if(e.length>0){const i=Array.from(e);this.removeTokens(i.filter(s=>!s.disabled).map(s=>s.index))}else if(this.activeTokenIndex!=-1){const i=this.activeTokenElement;i&&!i.disabled&&this.removeTokens([i.index])}}}updateActiveToken(e){if(this.disabled)return;const i=this.querySelectorAll("[slot='items']").length-1;if(this.activeTokenIndex==-1?e<0&&(this.activeTokenIndex=i):this.activeTokenIndex==i&&e>0&&this.selectionMode=="multi"?(this.activeTokenIndex=-1,this.focus()):this.activeTokenIndex=Math.max(0,Math.min(i,this.activeTokenIndex+e)),this.activeTokenIndex>-1&&(this.inputElement?.setAttribute("focus-visible",""),this.scrollHeight>this.offsetHeight)){const s=this.activeTokenElement;s.scrollIntoViewIfNeeded?s.scrollIntoViewIfNeeded():s.scrollIntoView()}}commitTokenValue(e){if(this.disabled)return;if(this.tokenSuggestPopover.isOpened){const s=this.tokenSuggestPopover.focusedSuggestToken;if(s){if(!s.disabled){const n=this.findIndex(s);this.handleTokenSelection([n]),this.tokenSuggestPopover.hide()}return}}if(!e?.trim())return;const i=this.items.findIndex(s=>this.caseSensitive?s.caption==e:s.caption.toLowerCase()==e.toLowerCase());this.selectedIndexes.includes(i)||(i>=0?this.handleTokenSelection([i]):this.handleTokenCreation(e)),this.requestUpdate("selectedIndexes"),this.tokenSuggestPopover.hide(),window.removeEventListener("pointerdown",this.handleWindowPointerDown)}updated(e){if(super.updated(e),this._tokenSuggestPopover&&(this.tokenSuggestPopover.list.className=this.suggestListClass||"",this.suggestionFilter&&(this.tokenSuggestPopover.filter=this.suggestionFilter)),e.has("selectionMode"))if(this.selectionMode=="multi"){this.setAttribute("aria-haspopup","listbox");const i=this.inputElement;i.addEventListener("immediate-value-change",s=>this.handleInputValueChange(s)),i.addEventListener("keydown",s=>this.handleInputKeyDown(s,i)),window.queueMicrotask(()=>this.tokenSuggestPopover)}else this.removeAttribute("aria-haspopup"),this.addEventListener("keydown",this.handleKeyDown),this._tokenSuggestPopover&&(this._tokenSuggestPopover.hide(),this._tokenSuggestPopover=null);(e.size==0||e.has("selectionMode")||e.has("items")||e.has("selectedIndexes")||e.has("disabled"))&&this.updateItems(),e.has("inputLabel")&&(this.inputLabel?this.setAttribute("aria-label",this.inputLabel):this.removeAttribute("aria-label"))}handleInputValueChange(e){e.detail.value?(this.activeTokenIndex=-1,this.cancelSearch=!1,this.debouncedShowTokenSuggestPopover(),window.addEventListener("pointerdown",this.handleWindowPointerDown)):(this.tokenSuggestPopover.hide(),this.cancelSearch=!0)}showFilteredTokenSuggestions(){!this.cancelSearch&&this.inputElement.value&&this.tokenSuggestPopover.show()}isTokenNotSelected(e){return!this.selectedIndexes.includes(e)}get tokenSuggestPopover(){return!this._tokenSuggestPopover&&this.inputElement&&(this._tokenSuggestPopover=new Bl(this.inputElement,()=>this.items.filter((e,i)=>!e.disabled&&this.isTokenNotSelected(i)),e=>{const i=this.findIndex(e);this.handleTokenSelection([i]),window.removeEventListener("pointerdown",this.handleWindowPointerDown)},e=>{this.appendChild(e.popover),this.inputElement.setAttribute("aria-controls",e.list.id),this.dispatchEvent(new CustomEvent("auto-suggest-initialized")),e.popover.addEventListener("close",()=>{this.inputElement.value&&!this.contains(document.activeElement)&&(this.inputElement.value="")})}),this._tokenSuggestPopover.list.itemGenerator=this._autoSuggestItemGenerator,this._tokenSuggestPopover.list.className=this.suggestListClass,this.suggestionFilter&&(this._tokenSuggestPopover.filter=this.suggestionFilter)),this._tokenSuggestPopover}updateItems(){if(!this.isConnected||!this.items)return;this.activeTokenIndex=-1;const e=this.inputElement;e&&(!this._tokenSuggestPopover||!this._tokenSuggestPopover.isOpened)&&(e.value=""),this.querySelectorAll("[slot='items']").forEach(n=>{this.removeChild(n)});const i=document.createDocumentFragment();let s=[];this.selectionMode=="remove-only"?s=this.items.map(n=>this.disableIfNeeded(n)):this.selectedIndexes.forEach(n=>{s.push(this.disableIfNeeded(this.items[n]))}),s.forEach(n=>{const r=this.tokenGenerator(n,this.findIndex(n));r.slot="items",i.appendChild(r),r.id||(r.id=window.crypto.getRandomValues(new Uint32Array(1))[0].toString(16)),r.setClickHandler((o,d)=>this.onTokenClick(r,!0,d)),r.addEventListener("click",()=>{this.inputElement?.removeAttribute("focus-visible");const o=window.getSelection();(!o||o.type!="Range")&&document.activeElement!=this&&this.focus()}),r.setDeleteHandler(o=>this.removeTokens([o]))}),this.appendChild(i),this._tokenSuggestPopover&&this._tokenSuggestPopover.refreshItems()}removeTokens(e){if(!(this.disabled||e==null||e.length==0))if(this.activeTokenIndex!=-1&&e.includes(this.activeTokenElement.index)&&(this.activeTokenIndex=-1),this.selectionMode=="remove-only")this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:e}}));else{const i=e.filter(s=>this.selectedIndexes.includes(s));i.length>0&&(this.selectedIndexes=this.selectedIndexes.filter(s=>!i.includes(s)),this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:i,selectedIndices:[...this.selectedIndexes]}})))}}onTokenClick(e,i,s){let n;this.querySelectorAll("[slot='items']").forEach((r,o)=>{e==r?n=o:s||r.setAttribute("aria-checked","false")}),this.activeTokenIndex=n,this.setAttribute("aria-activedescendant",this.activeTokenElement.id),this._tokenSuggestPopover&&this._tokenSuggestPopover.isOpened&&this._tokenSuggestPopover.hide(),s||this.dispatchEvent(new CustomEvent("token-clicked",{detail:{index:e.index,tokenElement:e,byPointerDevice:i}}))}disableIfNeeded(e){return this.disabled?{...e,disabled:!0}:e}handleTokenSelection(e){this.selectedIndexes=this.selectedIndexes.concat(e),this.dispatchEvent(new CustomEvent("tokens-selected",{detail:{newIndices:e,selectedIndices:[...this.selectedIndexes]}}))}handleTokenCreation(e){this.dispatchEvent(new CustomEvent("token-created",{detail:{value:e}}))}get inputElement(){return this.shadowRoot.querySelector(".input")}get activeTokenElement(){return this.getTokenElement(this.activeTokenIndex)}getTokenElement(e){return this.querySelector("[slot='items']:nth-of-type("+(e+1)+")")}findIndex(e){return this.items.findIndex(i=>i.caption===e.caption)}get activeTokenIndex(){return this._activeTokenIndex}set activeTokenIndex(e){if(this._activeTokenIndex!=-1){const i=this.activeTokenElement;i&&(i.current=!1)}if(this._activeTokenIndex=e,e==-1)this.removeAttribute("aria-activedescendant");else{const i=this.activeTokenElement;i.current=!0,this.setAttribute("aria-activedescendant",i.id)}}get hasInputValue(){return!!this.inputElement?.value}},Le.ID="sd-token-selector",Le.ensureDefined=()=>{Ai.ensureDefined(),customElements.get(Le.ID)||customElements.define(Le.ID,Le)},Le.shadowRootOptions={...Ie.shadowRootOptions,delegatesFocus:!0},Le);$e([$({type:String,attribute:"selection-mode",reflect:!0})],Ee.prototype,"selectionMode");$e([$({type:Array,attribute:!1})],Ee.prototype,"items");$e([$({type:Array,attribute:!1})],Ee.prototype,"selectedIndexes");$e([$({type:String,reflect:!0})],Ee.prototype,"placeholder");$e([$({type:String,reflect:!0,attribute:"suggest-list-class"})],Ee.prototype,"suggestListClass");$e([$({type:String,reflect:!0,attribute:"input-label"})],Ee.prototype,"inputLabel");$e([$({converter:{fromAttribute:t=>t=="true",toAttribute:t=>t},reflect:!0,attribute:"aria-disabled"})],Ee.prototype,"disabled");$e([$({type:String,attribute:!0})],Ee.prototype,"validationMessage");$e([$({type:String,attribute:!0})],Ee.prototype,"validationIconSrc");$e([$({converter:pi.levelConverter,attribute:!0,reflect:!0})],Ee.prototype,"validationLevel");$e([$({type:String,reflect:!0,attribute:"token-type"})],Ee.prototype,"tokenType");$e([$({type:Boolean,reflect:!0,attribute:"case-sensitive"})],Ee.prototype,"caseSensitive");let Hc=Ee;function Er(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Xl(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var i=function s(){var n=!1;try{n=this instanceof s}catch{}return n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(i,s,n.get?n:{enumerable:!0,get:function(){return t[s]}})}),i}var ci={exports:{}},Cs;function Yl(){if(Cs)return ci.exports;Cs=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return ci.exports=e(),ci.exports.createColors=e,ci.exports}const Ql={},ec=Object.freeze(Object.defineProperty({__proto__:null,default:Ql},Symbol.toStringTag,{value:"Module"})),Pe=Xl(ec);var Wi,Os;function zn(){if(Os)return Wi;Os=1;let t=Yl(),e=Pe;class i extends Error{constructor(n,r,o,d,p,h){super(n),this.name="CssSyntaxError",this.reason=n,p&&(this.file=p),d&&(this.source=d),h&&(this.plugin=h),typeof r<"u"&&typeof o<"u"&&(typeof r=="number"?(this.line=r,this.column=o):(this.line=r.line,this.column=r.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(n){if(!this.source)return"";let r=this.source;n==null&&(n=t.isColorSupported);let o=l=>l,d=l=>l,p=l=>l;if(n){let{bold:l,gray:f,red:g}=t.createColors(!0);d=v=>l(g(v)),o=v=>f(v),e&&(p=v=>e(v))}let h=r.split(/\r?\n/),a=Math.max(this.line-3,0),u=Math.min(this.line+2,h.length),c=String(u).length;return h.slice(a,u).map((l,f)=>{let g=a+1+f,v=" "+(" "+g).slice(-c)+" | ";if(g===this.line){if(l.length>160){let k=20,w=Math.max(0,this.column-k),y=Math.max(this.column+k,this.endColumn+k),b=l.slice(w,y),E=o(v.replace(/\d/g," "))+l.slice(0,Math.min(this.column-1,k-1)).replace(/[^\t]/g," ");return d(">")+o(v)+p(b)+`
|
|
616
|
+
`+E+d("^")}let x=o(v.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return d(">")+o(v)+p(l)+`
|
|
617
|
+
`+x+d("^")}return" "+o(v)+p(l)}).join(`
|
|
618
|
+
`)}toString(){let n=this.showSourceCode();return n&&(n=`
|
|
617
619
|
|
|
618
|
-
`+
|
|
619
|
-
`),this.name+": "+this.message+
|
|
620
|
+
`+n+`
|
|
621
|
+
`),this.name+": "+this.message+n}}return Wi=i,i.default=i,Wi}var Vi,Ts;function Sr(){if(Ts)return Vi;Ts=1;const t={after:`
|
|
620
622
|
`,beforeClose:`
|
|
621
623
|
`,beforeComment:`
|
|
622
624
|
`,beforeDecl:`
|
|
623
625
|
`,beforeOpen:" ",beforeRule:`
|
|
624
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
625
|
-
`)){let
|
|
626
|
-
`)&&(
|
|
627
|
-
`)&&(
|
|
628
|
-
`)&&(
|
|
629
|
-
`)&&(
|
|
630
|
-
`);return
|
|
631
|
-
`?(
|
|
632
|
-
`);n=new Array(r.length);let o=0;for(let a=0,l=r.length;a<l;a++)n[a]=o,o+=r[a].length+1;this[Gn]=n}t=n[n.length-1];let s=0;if(e>=t)s=n.length-1;else{let r=n.length-2,o;for(;s<r;)if(o=s+(r-s>>1),e<n[o])r=o-1;else if(e>=n[o+1])s=o+1;else{s=o;break}}return{col:e-n[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ui(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,s){if(!this.map)return!1;let r=this.map.consumer(),o=r.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof n=="number"&&(a=r.originalPositionFor({column:s,line:n}));let l;di(o.source)?l=Yt(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||Yt(this.map.mapFile));let c={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(ws)c.file=ws(l);else throw new Error("file: protocol is not available in this PostCSS build");let d=r.sourceContentFor(o.source);return d&&(c.source=d),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Ln=yn;yn.default=yn;Vn&&Vn.registerInput&&Vn.registerInput(yn);let{SourceMapConsumer:ur,SourceMapGenerator:pn}=ye,{dirname:fn,relative:hr,resolve:pr,sep:fr}=ye,{pathToFileURL:Es}=ye,bc=Ln,yc=!!(ur&&pn),wc=!!(fn&&pr&&hr&&fr),xc=class{constructor(e,t,n,s){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
626
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function e(s){return s[0].toUpperCase()+s.slice(1)}class i{constructor(n){this.builder=n}atrule(n,r){let o="@"+n.name,d=n.params?this.rawValue(n,"params"):"";if(typeof n.raws.afterName<"u"?o+=n.raws.afterName:d&&(o+=" "),n.nodes)this.block(n,o+d);else{let p=(n.raws.between||"")+(r?";":"");this.builder(o+d+p,n)}}beforeAfter(n,r){let o;n.type==="decl"?o=this.raw(n,null,"beforeDecl"):n.type==="comment"?o=this.raw(n,null,"beforeComment"):r==="before"?o=this.raw(n,null,"beforeRule"):o=this.raw(n,null,"beforeClose");let d=n.parent,p=0;for(;d&&d.type!=="root";)p+=1,d=d.parent;if(o.includes(`
|
|
627
|
+
`)){let h=this.raw(n,null,"indent");if(h.length)for(let a=0;a<p;a++)o+=h}return o}block(n,r){let o=this.raw(n,"between","beforeOpen");this.builder(r+o+"{",n,"start");let d;n.nodes&&n.nodes.length?(this.body(n),d=this.raw(n,"after")):d=this.raw(n,"after","emptyBody"),d&&this.builder(d),this.builder("}",n,"end")}body(n){let r=n.nodes.length-1;for(;r>0&&n.nodes[r].type==="comment";)r-=1;let o=this.raw(n,"semicolon");for(let d=0;d<n.nodes.length;d++){let p=n.nodes[d],h=this.raw(p,"before");h&&this.builder(h),this.stringify(p,r!==d||o)}}comment(n){let r=this.raw(n,"left","commentLeft"),o=this.raw(n,"right","commentRight");this.builder("/*"+r+n.text+o+"*/",n)}decl(n,r){let o=this.raw(n,"between","colon"),d=n.prop+o+this.rawValue(n,"value");n.important&&(d+=n.raws.important||" !important"),r&&(d+=";"),this.builder(d,n)}document(n){this.body(n)}raw(n,r,o){let d;if(o||(o=r),r&&(d=n.raws[r],typeof d<"u"))return d;let p=n.parent;if(o==="before"&&(!p||p.type==="root"&&p.first===n||p&&p.type==="document"))return"";if(!p)return t[o];let h=n.root();if(h.rawCache||(h.rawCache={}),typeof h.rawCache[o]<"u")return h.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(n,o);{let a="raw"+e(o);this[a]?d=this[a](h,n):h.walk(u=>{if(d=u.raws[r],typeof d<"u")return!1})}return typeof d>"u"&&(d=t[o]),h.rawCache[o]=d,d}rawBeforeClose(n){let r;return n.walk(o=>{if(o.nodes&&o.nodes.length>0&&typeof o.raws.after<"u")return r=o.raws.after,r.includes(`
|
|
628
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawBeforeComment(n,r){let o;return n.walkComments(d=>{if(typeof d.raws.before<"u")return o=d.raws.before,o.includes(`
|
|
629
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(r,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(n,r){let o;return n.walkDecls(d=>{if(typeof d.raws.before<"u")return o=d.raws.before,o.includes(`
|
|
630
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(r,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(n){let r;return n.walk(o=>{if(o.type!=="decl"&&(r=o.raws.between,typeof r<"u"))return!1}),r}rawBeforeRule(n){let r;return n.walk(o=>{if(o.nodes&&(o.parent!==n||n.first!==o)&&typeof o.raws.before<"u")return r=o.raws.before,r.includes(`
|
|
631
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawColon(n){let r;return n.walkDecls(o=>{if(typeof o.raws.between<"u")return r=o.raws.between.replace(/[^\s:]/g,""),!1}),r}rawEmptyBody(n){let r;return n.walk(o=>{if(o.nodes&&o.nodes.length===0&&(r=o.raws.after,typeof r<"u"))return!1}),r}rawIndent(n){if(n.raws.indent)return n.raws.indent;let r;return n.walk(o=>{let d=o.parent;if(d&&d!==n&&d.parent&&d.parent===n&&typeof o.raws.before<"u"){let p=o.raws.before.split(`
|
|
632
|
+
`);return r=p[p.length-1],r=r.replace(/\S/g,""),!1}}),r}rawSemicolon(n){let r;return n.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(r=o.raws.semicolon,typeof r<"u"))return!1}),r}rawValue(n,r){let o=n[r],d=n.raws[r];return d&&d.value===o?d.raw:o}root(n){this.body(n),n.raws.after&&this.builder(n.raws.after)}rule(n){this.block(n,this.rawValue(n,"selector")),n.raws.ownSemicolon&&this.builder(n.raws.ownSemicolon,n,"end")}stringify(n,r){if(!this[n.type])throw new Error("Unknown AST node type "+n.type+". Maybe you need to change PostCSS stringifier.");this[n.type](n,r)}}return Vi=i,i.default=i,Vi}var Gi,$s;function Ii(){if($s)return Gi;$s=1;let t=Sr();function e(i,s){new t(s).stringify(i)}return Gi=e,e.default=e,Gi}var di={},Rs;function Un(){return Rs||(Rs=1,di.isClean=Symbol("isClean"),di.my=Symbol("my")),di}var Ki,Ls;function Ci(){if(Ls)return Ki;Ls=1;let t=zn(),e=Sr(),i=Ii(),{isClean:s,my:n}=Un();function r(p,h){let a=new p.constructor;for(let u in p){if(!Object.prototype.hasOwnProperty.call(p,u)||u==="proxyCache")continue;let c=p[u],l=typeof c;u==="parent"&&l==="object"?h&&(a[u]=h):u==="source"?a[u]=c:Array.isArray(c)?a[u]=c.map(f=>r(f,a)):(l==="object"&&c!==null&&(c=r(c)),a[u]=c)}return a}function o(p,h){if(h&&typeof h.offset<"u")return h.offset;let a=1,u=1,c=0;for(let l=0;l<p.length;l++){if(u===h.line&&a===h.column){c=l;break}p[l]===`
|
|
633
|
+
`?(a=1,u+=1):a+=1}return c}class d{get proxyOf(){return this}constructor(h={}){this.raws={},this[s]=!1,this[n]=!0;for(let a in h)if(a==="nodes"){this.nodes=[];for(let u of h[a])typeof u.clone=="function"?this.append(u.clone()):this.append(u)}else this[a]=h[a]}addToError(h){if(h.postcssNode=this,h.stack&&this.source&&/\n\s{4}at /.test(h.stack)){let a=this.source;h.stack=h.stack.replace(/\n\s{4}at /,`$&${a.input.from}:${a.start.line}:${a.start.column}$&`)}return h}after(h){return this.parent.insertAfter(this,h),this}assign(h={}){for(let a in h)this[a]=h[a];return this}before(h){return this.parent.insertBefore(this,h),this}cleanRaws(h){delete this.raws.before,delete this.raws.after,h||delete this.raws.between}clone(h={}){let a=r(this);for(let u in h)a[u]=h[u];return a}cloneAfter(h={}){let a=this.clone(h);return this.parent.insertAfter(this,a),a}cloneBefore(h={}){let a=this.clone(h);return this.parent.insertBefore(this,a),a}error(h,a={}){if(this.source){let{end:u,start:c}=this.rangeBy(a);return this.source.input.error(h,{column:c.column,line:c.line},{column:u.column,line:u.line},a)}return new t(h)}getProxyProcessor(){return{get(h,a){return a==="proxyOf"?h:a==="root"?()=>h.root().toProxy():h[a]},set(h,a,u){return h[a]===u||(h[a]=u,(a==="prop"||a==="value"||a==="name"||a==="params"||a==="important"||a==="text")&&h.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let h=this;for(;h=h.parent;)h[s]=!1}}next(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h+1]}positionBy(h={}){let a=this.source.start;if(h.index)a=this.positionInside(h.index);else if(h.word){let u="document"in this.source.input?this.source.input.document:this.source.input.css,l=u.slice(o(u,this.source.start),o(u,this.source.end)).indexOf(h.word);l!==-1&&(a=this.positionInside(l))}return a}positionInside(h){let a=this.source.start.column,u=this.source.start.line,c="document"in this.source.input?this.source.input.document:this.source.input.css,l=o(c,this.source.start),f=l+h;for(let g=l;g<f;g++)c[g]===`
|
|
634
|
+
`?(a=1,u+=1):a+=1;return{column:a,line:u,offset:f}}prev(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h-1]}rangeBy(h={}){let a="document"in this.source.input?this.source.input.document:this.source.input.css,u={column:this.source.start.column,line:this.source.start.line,offset:o(a,this.source.start)},c=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:o(a,this.source.end)+1}:{column:u.column+1,line:u.line,offset:u.offset+1};if(h.word){let f=a.slice(o(a,this.source.start),o(a,this.source.end)).indexOf(h.word);f!==-1&&(u=this.positionInside(f),c=this.positionInside(f+h.word.length))}else h.start?u={column:h.start.column,line:h.start.line,offset:o(a,h.start)}:h.index&&(u=this.positionInside(h.index)),h.end?c={column:h.end.column,line:h.end.line,offset:o(a,h.end)}:typeof h.endIndex=="number"?c=this.positionInside(h.endIndex):h.index&&(c=this.positionInside(h.index+1));return(c.line<u.line||c.line===u.line&&c.column<=u.column)&&(c={column:u.column+1,line:u.line,offset:u.offset+1}),{end:c,start:u}}raw(h,a){return new e().raw(this,h,a)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...h){if(this.parent){let a=this,u=!1;for(let c of h)c===this?u=!0:u?(this.parent.insertAfter(a,c),a=c):this.parent.insertBefore(a,c);u||this.remove()}return this}root(){let h=this;for(;h.parent&&h.parent.type!=="document";)h=h.parent;return h}toJSON(h,a){let u={},c=a==null;a=a||new Map;let l=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let g=this[f];if(Array.isArray(g))u[f]=g.map(v=>typeof v=="object"&&v.toJSON?v.toJSON(null,a):v);else if(typeof g=="object"&&g.toJSON)u[f]=g.toJSON(null,a);else if(f==="source"){if(g==null)continue;let v=a.get(g.input);v==null&&(v=l,a.set(g.input,l),l++),u[f]={end:g.end,inputId:v,start:g.start}}else u[f]=g}return c&&(u.inputs=[...a.keys()].map(f=>f.toJSON())),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(h=i){h.stringify&&(h=h.stringify);let a="";return h(this,u=>{a+=u}),a}warn(h,a,u={}){let c={node:this};for(let l in u)c[l]=u[l];return h.warn(a,c)}}return Ki=d,d.default=d,Ki}var Zi,Ps;function Oi(){if(Ps)return Zi;Ps=1;let t=Ci();class e extends t{constructor(s){super(s),this.type="comment"}}return Zi=e,e.default=e,Zi}var Ji,Ms;function Ti(){if(Ms)return Ji;Ms=1;let t=Ci();class e extends t{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(s){s&&typeof s.value<"u"&&typeof s.value!="string"&&(s={...s,value:String(s.value)}),super(s),this.type="decl"}}return Ji=e,e.default=e,Ji}var Xi,Ds;function vt(){if(Ds)return Xi;Ds=1;let t=Oi(),e=Ti(),i=Ci(),{isClean:s,my:n}=Un(),r,o,d,p;function h(c){return c.map(l=>(l.nodes&&(l.nodes=h(l.nodes)),delete l.source,l))}function a(c){if(c[s]=!1,c.proxyOf.nodes)for(let l of c.proxyOf.nodes)a(l)}class u extends i{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...l){for(let f of l){let g=this.normalize(f,this.last);for(let v of g)this.proxyOf.nodes.push(v)}return this.markDirty(),this}cleanRaws(l){if(super.cleanRaws(l),this.nodes)for(let f of this.nodes)f.cleanRaws(l)}each(l){if(!this.proxyOf.nodes)return;let f=this.getIterator(),g,v;for(;this.indexes[f]<this.proxyOf.nodes.length&&(g=this.indexes[f],v=l(this.proxyOf.nodes[g],g),v!==!1);)this.indexes[f]+=1;return delete this.indexes[f],v}every(l){return this.nodes.every(l)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let l=this.lastEach;return this.indexes[l]=0,l}getProxyProcessor(){return{get(l,f){return f==="proxyOf"?l:l[f]?f==="each"||typeof f=="string"&&f.startsWith("walk")?(...g)=>l[f](...g.map(v=>typeof v=="function"?(x,k)=>v(x.toProxy(),k):v)):f==="every"||f==="some"?g=>l[f]((v,...x)=>g(v.toProxy(),...x)):f==="root"?()=>l.root().toProxy():f==="nodes"?l.nodes.map(g=>g.toProxy()):f==="first"||f==="last"?l[f].toProxy():l[f]:l[f]},set(l,f,g){return l[f]===g||(l[f]=g,(f==="name"||f==="params"||f==="selector")&&l.markDirty()),!0}}}index(l){return typeof l=="number"?l:(l.proxyOf&&(l=l.proxyOf),this.proxyOf.nodes.indexOf(l))}insertAfter(l,f){let g=this.index(l),v=this.normalize(f,this.proxyOf.nodes[g]).reverse();g=this.index(l);for(let k of v)this.proxyOf.nodes.splice(g+1,0,k);let x;for(let k in this.indexes)x=this.indexes[k],g<x&&(this.indexes[k]=x+v.length);return this.markDirty(),this}insertBefore(l,f){let g=this.index(l),v=g===0?"prepend":!1,x=this.normalize(f,this.proxyOf.nodes[g],v).reverse();g=this.index(l);for(let w of x)this.proxyOf.nodes.splice(g,0,w);let k;for(let w in this.indexes)k=this.indexes[w],g<=k&&(this.indexes[w]=k+x.length);return this.markDirty(),this}normalize(l,f){if(typeof l=="string")l=h(o(l).nodes);else if(typeof l>"u")l=[];else if(Array.isArray(l)){l=l.slice(0);for(let v of l)v.parent&&v.parent.removeChild(v,"ignore")}else if(l.type==="root"&&this.type!=="document"){l=l.nodes.slice(0);for(let v of l)v.parent&&v.parent.removeChild(v,"ignore")}else if(l.type)l=[l];else if(l.prop){if(typeof l.value>"u")throw new Error("Value field is missed in node creation");typeof l.value!="string"&&(l.value=String(l.value)),l=[new e(l)]}else if(l.selector||l.selectors)l=[new p(l)];else if(l.name)l=[new r(l)];else if(l.text)l=[new t(l)];else throw new Error("Unknown node type in node creation");return l.map(v=>(v[n]||u.rebuild(v),v=v.proxyOf,v.parent&&v.parent.removeChild(v),v[s]&&a(v),v.raws||(v.raws={}),typeof v.raws.before>"u"&&f&&typeof f.raws.before<"u"&&(v.raws.before=f.raws.before.replace(/\S/g,"")),v.parent=this.proxyOf,v))}prepend(...l){l=l.reverse();for(let f of l){let g=this.normalize(f,this.first,"prepend").reverse();for(let v of g)this.proxyOf.nodes.unshift(v);for(let v in this.indexes)this.indexes[v]=this.indexes[v]+g.length}return this.markDirty(),this}push(l){return l.parent=this,this.proxyOf.nodes.push(l),this}removeAll(){for(let l of this.proxyOf.nodes)l.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(l){l=this.index(l),this.proxyOf.nodes[l].parent=void 0,this.proxyOf.nodes.splice(l,1);let f;for(let g in this.indexes)f=this.indexes[g],f>=l&&(this.indexes[g]=f-1);return this.markDirty(),this}replaceValues(l,f,g){return g||(g=f,f={}),this.walkDecls(v=>{f.props&&!f.props.includes(v.prop)||f.fast&&!v.value.includes(f.fast)||(v.value=v.value.replace(l,g))}),this.markDirty(),this}some(l){return this.nodes.some(l)}walk(l){return this.each((f,g)=>{let v;try{v=l(f,g)}catch(x){throw f.addToError(x)}return v!==!1&&f.walk&&(v=f.walk(l)),v})}walkAtRules(l,f){return f?l instanceof RegExp?this.walk((g,v)=>{if(g.type==="atrule"&&l.test(g.name))return f(g,v)}):this.walk((g,v)=>{if(g.type==="atrule"&&g.name===l)return f(g,v)}):(f=l,this.walk((g,v)=>{if(g.type==="atrule")return f(g,v)}))}walkComments(l){return this.walk((f,g)=>{if(f.type==="comment")return l(f,g)})}walkDecls(l,f){return f?l instanceof RegExp?this.walk((g,v)=>{if(g.type==="decl"&&l.test(g.prop))return f(g,v)}):this.walk((g,v)=>{if(g.type==="decl"&&g.prop===l)return f(g,v)}):(f=l,this.walk((g,v)=>{if(g.type==="decl")return f(g,v)}))}walkRules(l,f){return f?l instanceof RegExp?this.walk((g,v)=>{if(g.type==="rule"&&l.test(g.selector))return f(g,v)}):this.walk((g,v)=>{if(g.type==="rule"&&g.selector===l)return f(g,v)}):(f=l,this.walk((g,v)=>{if(g.type==="rule")return f(g,v)}))}}return u.registerParse=c=>{o=c},u.registerRule=c=>{p=c},u.registerAtRule=c=>{r=c},u.registerRoot=c=>{d=c},Xi=u,u.default=u,u.rebuild=c=>{c.type==="atrule"?Object.setPrototypeOf(c,r.prototype):c.type==="rule"?Object.setPrototypeOf(c,p.prototype):c.type==="decl"?Object.setPrototypeOf(c,e.prototype):c.type==="comment"?Object.setPrototypeOf(c,t.prototype):c.type==="root"&&Object.setPrototypeOf(c,d.prototype),c[n]=!0,c.nodes&&c.nodes.forEach(l=>{u.rebuild(l)})},Xi}var Yi,Ns;function qn(){if(Ns)return Yi;Ns=1;let t=vt();class e extends t{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return Yi=e,e.default=e,t.registerAtRule(e),Yi}var Qi,js;function Fn(){if(js)return Qi;js=1;let t=vt(),e,i;class s extends t{constructor(r){super({type:"document",...r}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new i,this,r).stringify()}}return s.registerLazyResult=n=>{e=n},s.registerProcessor=n=>{i=n},Qi=s,s.default=s,Qi}var en,Bs;function tc(){if(Bs)return en;Bs=1;let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return en={nanoid:(s=21)=>{let n="",r=s|0;for(;r--;)n+=t[Math.random()*64|0];return n},customAlphabet:(s,n=21)=>(r=n)=>{let o="",d=r|0;for(;d--;)o+=s[Math.random()*s.length|0];return o}},en}var tn,zs;function _r(){if(zs)return tn;zs=1;let{existsSync:t,readFileSync:e}=Pe,{dirname:i,join:s}=Pe,{SourceMapConsumer:n,SourceMapGenerator:r}=Pe;function o(p){return Buffer?Buffer.from(p,"base64").toString():window.atob(p)}class d{constructor(h,a){if(a.map===!1)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let u=a.map?a.map.prev:void 0,c=this.loadMap(a.from,u);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=i(this.mapFile)),c&&(this.text=c)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}decodeInline(h){let a=/^data:application\/json;charset=utf-?8;base64,/,u=/^data:application\/json;base64,/,c=/^data:application\/json;charset=utf-?8,/,l=/^data:application\/json,/,f=h.match(c)||h.match(l);if(f)return decodeURIComponent(h.substr(f[0].length));let g=h.match(a)||h.match(u);if(g)return o(h.substr(g[0].length));let v=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+v)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?!1:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let a=h.match(/\/\*\s*# sourceMappingURL=/g);if(!a)return;let u=h.lastIndexOf(a.pop()),c=h.indexOf("*/",u);u>-1&&c>-1&&(this.annotation=this.getAnnotationURL(h.substring(u,c)))}loadFile(h){if(this.root=i(h),t(h))return this.mapFile=h,e(h,"utf-8").toString().trim()}loadMap(h,a){if(a===!1)return!1;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let u=a(h);if(u){let c=this.loadFile(u);if(!c)throw new Error("Unable to load previous source map: "+u.toString());return c}}else{if(a instanceof n)return r.fromSourceMap(a).toString();if(a instanceof r)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let u=this.annotation;return h&&(u=s(i(h),u)),this.loadFile(u)}}}startWith(h,a){return h?h.substr(0,a.length)===a:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return tn=d,d.default=d,tn}var nn,Us;function $i(){if(Us)return nn;Us=1;let{nanoid:t}=tc(),{isAbsolute:e,resolve:i}=Pe,{SourceMapConsumer:s,SourceMapGenerator:n}=Pe,{fileURLToPath:r,pathToFileURL:o}=Pe,d=zn(),p=_r(),h=Pe,a=Symbol("lineToIndexCache"),u=!!(s&&n),c=!!(i&&e);function l(g){if(g[a])return g[a];let v=g.css.split(`
|
|
635
|
+
`),x=new Array(v.length),k=0;for(let w=0,y=v.length;w<y;w++)x[w]=k,k+=v[w].length+1;return g[a]=x,x}class f{get from(){return this.file||this.id}constructor(v,x={}){if(v===null||typeof v>"u"||typeof v=="object"&&!v.toString)throw new Error(`PostCSS received ${v} instead of CSS string`);if(this.css=v.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,x.document&&(this.document=x.document.toString()),x.from&&(!c||/^\w+:\/\//.test(x.from)||e(x.from)?this.file=x.from:this.file=i(x.from)),c&&u){let k=new p(this.css,x);if(k.text){this.map=k;let w=k.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(v,x,k,w={}){let y,b,E,_,R;if(x&&typeof x=="object"){let I=x,F=k;if(typeof I.offset=="number"){_=I.offset;let U=this.fromOffset(_);x=U.line,k=U.col}else x=I.line,k=I.column,_=this.fromLineAndColumn(x,k);if(typeof F.offset=="number"){E=F.offset;let U=this.fromOffset(E);b=U.line,y=U.col}else b=F.line,y=F.column,E=this.fromLineAndColumn(F.line,F.column)}else if(k)_=this.fromLineAndColumn(x,k);else{_=x;let I=this.fromOffset(_);x=I.line,k=I.col}let M=this.origin(x,k,b,y);return M?R=new d(v,M.endLine===void 0?M.line:{column:M.column,line:M.line},M.endLine===void 0?M.column:{column:M.endColumn,line:M.endLine},M.source,M.file,w.plugin):R=new d(v,b===void 0?x:{column:k,line:x},b===void 0?k:{column:y,line:b},this.css,this.file,w.plugin),R.input={column:k,endColumn:y,endLine:b,endOffset:E,line:x,offset:_,source:this.css},this.file&&(o&&(R.input.url=o(this.file).toString()),R.input.file=this.file),R}fromLineAndColumn(v,x){return l(this)[v-1]+x-1}fromOffset(v){let x=l(this),k=x[x.length-1],w=0;if(v>=k)w=x.length-1;else{let y=x.length-2,b;for(;w<y;)if(b=w+(y-w>>1),v<x[b])y=b-1;else if(v>=x[b+1])w=b+1;else{w=b;break}}return{col:v-x[w]+1,line:w+1}}mapResolve(v){return/^\w+:\/\//.test(v)?v:i(this.map.consumer().sourceRoot||this.map.root||".",v)}origin(v,x,k,w){if(!this.map)return!1;let y=this.map.consumer(),b=y.originalPositionFor({column:x,line:v});if(!b.source)return!1;let E;typeof k=="number"&&(E=y.originalPositionFor({column:w,line:k}));let _;e(b.source)?_=o(b.source):_=new URL(b.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let R={column:b.column,endColumn:E&&E.column,endLine:E&&E.line,line:b.line,url:_.toString()};if(_.protocol==="file:")if(r)R.file=r(_);else throw new Error("file: protocol is not available in this PostCSS build");let M=y.sourceContentFor(b.source);return M&&(R.source=M),R}toJSON(){let v={};for(let x of["hasBOM","css","file","id"])this[x]!=null&&(v[x]=this[x]);return this.map&&(v.map={...this.map},v.map.consumerCache&&(v.map.consumerCache=void 0)),v}}return nn=f,f.default=f,h&&h.registerInput&&h.registerInput(f),nn}var sn,qs;function Xt(){if(qs)return sn;qs=1;let t=vt(),e,i;class s extends t{constructor(r){super(r),this.type="root",this.nodes||(this.nodes=[])}normalize(r,o,d){let p=super.normalize(r);if(o){if(d==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let h of p)h.raws.before=o.raws.before}return p}removeChild(r,o){let d=this.index(r);return!o&&d===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[d].raws.before),super.removeChild(r)}toResult(r={}){return new e(new i,this,r).stringify()}}return s.registerLazyResult=n=>{e=n},s.registerProcessor=n=>{i=n},sn=s,s.default=s,t.registerRoot(s),sn}var rn,Fs;function Ar(){if(Fs)return rn;Fs=1;let t={comma(e){return t.split(e,[","],!0)},space(e){let i=[" ",`
|
|
636
|
+
`," "];return t.split(e,i)},split(e,i,s){let n=[],r="",o=!1,d=0,p=!1,h="",a=!1;for(let u of e)a?a=!1:u==="\\"?a=!0:p?u===h&&(p=!1):u==='"'||u==="'"?(p=!0,h=u):u==="("?d+=1:u===")"?d>0&&(d-=1):d===0&&i.includes(u)&&(o=!0),o?(r!==""&&n.push(r.trim()),r="",o=!1):r+=u;return(s||r!=="")&&n.push(r.trim()),n}};return rn=t,t.default=t,rn}var on,Hs;function Hn(){if(Hs)return on;Hs=1;let t=vt(),e=Ar();class i extends t{get selectors(){return e.comma(this.selector)}set selectors(n){let r=this.selector?this.selector.match(/,\s*/):null,o=r?r[0]:","+this.raw("between","beforeOpen");this.selector=n.join(o)}constructor(n){super(n),this.type="rule",this.nodes||(this.nodes=[])}}return on=i,i.default=i,t.registerRule(i),on}var an,Ws;function ic(){if(Ws)return an;Ws=1;let t=qn(),e=Oi(),i=Ti(),s=$i(),n=_r(),r=Xt(),o=Hn();function d(p,h){if(Array.isArray(p))return p.map(c=>d(c));let{inputs:a,...u}=p;if(a){h=[];for(let c of a){let l={...c,__proto__:s.prototype};l.map&&(l.map={...l.map,__proto__:n.prototype}),h.push(l)}}if(u.nodes&&(u.nodes=p.nodes.map(c=>d(c,h))),u.source){let{inputId:c,...l}=u.source;u.source=l,c!=null&&(u.source.input=h[c])}if(u.type==="root")return new r(u);if(u.type==="decl")return new i(u);if(u.type==="rule")return new o(u);if(u.type==="comment")return new e(u);if(u.type==="atrule")return new t(u);throw new Error("Unknown node type: "+p.type)}return an=d,d.default=d,an}var ln,Vs;function Ir(){if(Vs)return ln;Vs=1;let{dirname:t,relative:e,resolve:i,sep:s}=Pe,{SourceMapConsumer:n,SourceMapGenerator:r}=Pe,{pathToFileURL:o}=Pe,d=$i(),p=!!(n&&r),h=!!(t&&i&&e&&s);class a{constructor(c,l,f,g){this.stringify=c,this.mapOpts=f.map||{},this.root=l,this.opts=f,this.css=g,this.originalCSS=g,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let c;this.isInline()?c="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?c=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?c=this.mapOpts.annotation(this.opts.to,this.root):c=this.outputFile()+".map";let l=`
|
|
633
637
|
`;this.css.includes(`\r
|
|
634
|
-
`)&&(
|
|
635
|
-
`),this.css+=
|
|
636
|
-
`),t=a.length-o):t+=a.length,l&&c!=="start"){let d=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==d.last||d.raws.semicolon)&&(l.source&&l.source.end?(s.source=this.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?fn(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=fn(pr(n,this.mapOpts.annotation)));let s=hr(n,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new bc(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let s=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Es){let n=Es(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;fr==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};var gr=xc;let kc=On,hi=class extends kc{constructor(e){super(e),this.type="comment"}};var Rn=hi;hi.default=hi;let{isClean:mr,my:vr}=Wt,br=Tn,yr=Rn,Ec=On,wr,Li,Ri,xr;function kr(i){return i.map(e=>(e.nodes&&(e.nodes=kr(e.nodes)),delete e.source,e))}function Er(i){if(i[mr]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Er(e)}let Oe=class Sr extends Ec{append(...e){for(let t of e){let n=this.normalize(t,this.last);for(let s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],s=e(this.proxyOf.nodes[n],n),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...n)=>e[t](...n.map(s=>typeof s=="function"?(r,o)=>s(r.toProxy(),o):s)):t==="every"||t==="some"?n=>e[t]((s,...r)=>n(s.toProxy(),...r)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(n=>n.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let o of s)this.proxyOf.nodes.splice(n+1,0,o);let r;for(let o in this.indexes)r=this.indexes[o],n<r&&(this.indexes[o]=r+s.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),s=n===0?"prepend":!1,r=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let a of r)this.proxyOf.nodes.splice(n,0,a);let o;for(let a in this.indexes)o=this.indexes[a],n<=o&&(this.indexes[a]=o+r.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=kr(wr(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new br(e)]}else if(e.selector)e=[new Li(e)];else if(e.name)e=[new Ri(e)];else if(e.text)e=[new yr(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[vr]||Sr.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[mr]&&Er(s),typeof s.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let n=this.normalize(t,this.first,"prepend").reverse();for(let s of n)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let s;try{s=e(t,n)}catch(r){throw t.addToError(r)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="atrule"&&e.test(n.name))return t(n,s)}):this.walk((n,s)=>{if(n.type==="atrule"&&n.name===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="atrule")return t(n,s)}))}walkComments(e){return this.walk((t,n)=>{if(t.type==="comment")return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="decl"&&e.test(n.prop))return t(n,s)}):this.walk((n,s)=>{if(n.type==="decl"&&n.prop===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="decl")return t(n,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="rule"&&e.test(n.selector))return t(n,s)}):this.walk((n,s)=>{if(n.type==="rule"&&n.selector===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="rule")return t(n,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Oe.registerParse=i=>{wr=i};Oe.registerRule=i=>{Li=i};Oe.registerAtRule=i=>{Ri=i};Oe.registerRoot=i=>{xr=i};var Xe=Oe;Oe.default=Oe;Oe.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Ri.prototype):i.type==="rule"?Object.setPrototypeOf(i,Li.prototype):i.type==="decl"?Object.setPrototypeOf(i,br.prototype):i.type==="comment"?Object.setPrototypeOf(i,yr.prototype):i.type==="root"&&Object.setPrototypeOf(i,xr.prototype),i[vr]=!0,i.nodes&&i.nodes.forEach(e=>{Oe.rebuild(e)})};let Sc=Xe,_r,Ar,Rt=class extends Sc{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new _r(new Ar,this,e).stringify()}};Rt.registerLazyResult=i=>{_r=i};Rt.registerProcessor=i=>{Ar=i};var Pi=Rt;Rt.default=Rt;let pi=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in t)this[n]=t[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var $r=pi;pi.default=pi;let _c=$r,fi=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new _c(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Mi=fi;fi.default=fi;const Kn=39,Ss=34,Qt=92,_s=47,en=10,wt=32,tn=12,nn=9,sn=13,Ac=91,$c=93,Ic=40,Cc=41,Oc=123,Tc=125,Lc=59,Rc=42,Pc=58,Mc=64,rn=/[\t\n\f\r "#'()/;[\\\]{}]/g,on=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Dc=/.[\r\n"'(/\\]/,As=/[\da-f]/i;var Nc=function(e,t={}){let n=e.css.valueOf(),s=t.ignoreErrors,r,o,a,l,c,d,h,p,m,E,w=n.length,f=0,$=[],T=[];function L(){return f}function x(M){throw e.error("Unclosed "+M,f)}function A(){return T.length===0&&f>=w}function C(M){if(T.length)return T.pop();if(f>=w)return;let O=M?M.ignoreUnclosed:!1;switch(r=n.charCodeAt(f),r){case en:case wt:case nn:case sn:case tn:{o=f;do o+=1,r=n.charCodeAt(o);while(r===wt||r===en||r===nn||r===sn||r===tn);E=["space",n.slice(f,o)],f=o-1;break}case Ac:case $c:case Oc:case Tc:case Pc:case Lc:case Cc:{let j=String.fromCharCode(r);E=[j,j,f];break}case Ic:{if(p=$.length?$.pop()[1]:"",m=n.charCodeAt(f+1),p==="url"&&m!==Kn&&m!==Ss&&m!==wt&&m!==en&&m!==nn&&m!==tn&&m!==sn){o=f;do{if(d=!1,o=n.indexOf(")",o+1),o===-1)if(s||O){o=f;break}else x("bracket");for(h=o;n.charCodeAt(h-1)===Qt;)h-=1,d=!d}while(d);E=["brackets",n.slice(f,o+1),f,o],f=o}else o=n.indexOf(")",f+1),l=n.slice(f,o+1),o===-1||Dc.test(l)?E=["(","(",f]:(E=["brackets",l,f,o],f=o);break}case Kn:case Ss:{a=r===Kn?"'":'"',o=f;do{if(d=!1,o=n.indexOf(a,o+1),o===-1)if(s||O){o=f+1;break}else x("string");for(h=o;n.charCodeAt(h-1)===Qt;)h-=1,d=!d}while(d);E=["string",n.slice(f,o+1),f,o],f=o;break}case Mc:{rn.lastIndex=f+1,rn.test(n),rn.lastIndex===0?o=n.length-1:o=rn.lastIndex-2,E=["at-word",n.slice(f,o+1),f,o],f=o;break}case Qt:{for(o=f,c=!0;n.charCodeAt(o+1)===Qt;)o+=1,c=!c;if(r=n.charCodeAt(o+1),c&&r!==_s&&r!==wt&&r!==en&&r!==nn&&r!==sn&&r!==tn&&(o+=1,As.test(n.charAt(o)))){for(;As.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===wt&&(o+=1)}E=["word",n.slice(f,o+1),f,o],f=o;break}default:{r===_s&&n.charCodeAt(f+1)===Rc?(o=n.indexOf("*/",f+2)+1,o===0&&(s||O?o=n.length:x("comment")),E=["comment",n.slice(f,o+1),f,o],f=o):(on.lastIndex=f+1,on.test(n),on.lastIndex===0?o=n.length-1:o=on.lastIndex-2,E=["word",n.slice(f,o+1),f,o],$.push(E),f=o);break}}return f++,E}function R(M){T.push(M)}return{back:R,endOfFile:A,nextToken:C,position:L}};let Ir=Xe,wn=class extends Ir{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Di=wn;wn.default=wn;Ir.registerAtRule(wn);let Cr=Xe,Or,Tr,ht=class extends Cr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let s=super.normalize(e);if(t){if(n==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let r of s)r.raws.before=t.raws.before}return s}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new Or(new Tr,this,e).stringify()}};ht.registerLazyResult=i=>{Or=i};ht.registerProcessor=i=>{Tr=i};var qt=ht;ht.default=ht;Cr.registerRoot(ht);let Pt={comma(i){return Pt.split(i,[","],!0)},space(i){let e=[" ",`
|
|
637
|
-
`," "];return Pt.split(i,e)},split(i,e,t){let n=[],s="",r=!1,o=0,a=!1,l="",c=!1;for(let d of i)c?c=!1:d==="\\"?c=!0:a?d===l&&(a=!1):d==='"'||d==="'"?(a=!0,l=d):d==="("?o+=1:d===")"?o>0&&(o-=1):o===0&&e.includes(d)&&(r=!0),r?(s!==""&&n.push(s.trim()),s="",r=!1):s+=d;return(t||s!=="")&&n.push(s.trim()),n}};var Lr=Pt;Pt.default=Pt;let Rr=Xe,jc=Lr,xn=class extends Rr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return jc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}};var Ni=xn;xn.default=xn;Rr.registerRule(xn);let Bc=Tn,zc=Nc,Uc=Rn,Fc=Di,Hc=qt,$s=Ni;const Is={empty:!0,space:!0};function Wc(i){for(let e=i.length-1;e>=0;e--){let t=i[e],n=t[3]||t[2];if(n)return n}}let qc=class{constructor(e){this.input=e,this.root=new Hc,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Fc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,s,r,o=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){a=!0;break}else if(n==="}"){if(l.length>0){for(r=l.length-1,s=l[r];s&&s[0]==="space";)s=l[--r];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,s;for(let r=t-1;r>=0&&(s=e[r],!(s[0]!=="space"&&(n+=1,n===2)));r--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,n,s,r;for(let[o,a]of e.entries()){if(n=a,s=n[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!r)this.doubleColon(n);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=n}return!1}comment(e){let t=new Uc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let s=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=zc(this.input)}decl(e,t){let n=new Bc;this.init(n,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(s[3]||s[2]||Wc(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let r;for(;e.length;)if(r=e.shift(),r[0]===":"){n.raws.between+=r[1];break}else r[0]==="word"&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(r=e[c],r[1].toLowerCase()==="!important"){n.important=!0;let d=this.stringFrom(e,c);d=this.spacesFromEnd(e)+d,d!==" !important"&&(n.raws.important=d);break}else if(r[1].toLowerCase()==="important"){let d=e.slice(0),h="";for(let p=c;p>0;p--){let m=d[p][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=d.pop()[1]+h}h.trim().indexOf("!")===0&&(n.important=!0,n.raws.important=h,e=d)}if(r[0]!=="space"&&r[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(n.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new $s;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,n=null,s=!1,r=null,o=[],a=e[1].startsWith("--"),l=[],c=e;for(;c;){if(n=c[0],l.push(c),n==="("||n==="[")r||(r=c),o.push(n==="("?")":"]");else if(a&&s&&n==="{")r||(r=c),o.push("}");else if(o.length===0)if(n===";")if(s){this.decl(l,a);return}else break;else if(n==="{"){this.rule(l);return}else if(n==="}"){this.tokenizer.back(l.pop()),t=!0;break}else n===":"&&(s=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(r=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(r),t&&s){if(!a)for(;l.length&&(c=l[l.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,s){let r,o,a=n.length,l="",c=!0,d,h;for(let p=0;p<a;p+=1)r=n[p],o=r[0],o==="space"&&p===a-1&&!s?c=!1:o==="comment"?(h=n[p-1]?n[p-1][0]:"empty",d=n[p+1]?n[p+1][0]:"empty",!Is[h]&&!Is[d]?l.slice(-1)===","?c=!1:l+=r[1]:c=!1):l+=r[1];if(!c){let p=n.reduce((m,E)=>m+E[1],"");e.raws[t]={raw:p,value:l}}e[t]=l}rule(e){e.pop();let t=new $s;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let s=t;s<e.length;s++)n+=e[s][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Vc=qc;let Gc=Xe,Kc=Vc,Zc=Ln;function kn(i,e){let t=new Zc(i,e),n=new Kc(t);try{n.parse()}catch(s){throw s}return n.root}var ji=kn;kn.default=kn;Gc.registerParse(kn);let{isClean:Ee,my:Xc}=Wt,Jc=gr,Yc=Cn,Qc=Xe,ed=Pi,Cs=Mi,td=ji,nd=qt;const id={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},sd={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},rd={Once:!0,postcssPlugin:!0,prepare:!0},pt=0;function xt(i){return typeof i=="object"&&typeof i.then=="function"}function Pr(i){let e=!1,t=id[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,pt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,pt,t+"Exit"]:[t,t+"Exit"]}function Os(i){let e;return i.type==="document"?e=["Document",pt,"DocumentExit"]:i.type==="root"?e=["Root",pt,"RootExit"]:e=Pr(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function gi(i){return i[Ee]=!1,i.nodes&&i.nodes.forEach(e=>gi(e)),i}let mi={},ft=class Mr{constructor(e,t,n){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=gi(t);else if(t instanceof Mr||t instanceof Cs)s=gi(t.root),t.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let r=td;n.syntax&&(r=n.syntax.parse),n.parser&&(r=n.parser),r.parse&&(r=r.parse);try{s=r(t,n)}catch(o){this.processed=!0,this.error=o}s&&!s[Xc]&&Qc.rebuild(s)}this.result=new Cs(e,s,n),this.helpers={...mi,postcss:mi,result:this.result},this.plugins=this.processor.plugins.map(r=>typeof r=="object"&&r.prepare?{...r,...r.prepare(this.result)}:r)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,n,s)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let n in t){if(!sd[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!rd[n])if(typeof t[n]=="object")for(let s in t[n])s==="*"?e(t,n,t[n][s]):e(t,n+"-"+s.toLowerCase(),t[n][s]);else typeof t[n]=="function"&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(xt(n))try{await n}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ee];){e[Ee]=!0;let t=[Os(e)];for(;t.length>0;){let n=this.visitTick(t);if(xt(n))try{await n}catch(s){let r=t[t.length-1].node;throw this.handleError(s,r)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(r=>n(r,this.helpers));await Promise.all(s)}else await n(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return xt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Yc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Jc(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(xt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ee];)e[Ee]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,s]of e){this.result.lastPlugin=n;let r;try{r=s(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(xt(r))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:s}=t;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,a]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(n.toProxy(),this.helpers)}catch(l){throw this.handleError(l,n)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!a[Ee]){a[Ee]=!0,e.push(Os(a));return}t.iterator=0,delete n.indexes[o]}let r=t.events;for(;t.eventIndex<r.length;){let o=r[t.eventIndex];if(t.eventIndex+=1,o===pt){n.nodes&&n.nodes.length&&(n[Ee]=!0,t.iterator=n.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Ee]=!0;let t=Pr(e);for(let n of t)if(n===pt)e.nodes&&e.each(s=>{s[Ee]||this.walkSync(s)});else{let s=this.listeners[n];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ft.registerPostcss=i=>{mi=i};var Dr=ft;ft.default=ft;nd.registerLazyResult(ft);ed.registerLazyResult(ft);let od=gr,ad=Cn,ld=ji;const cd=Mi;let vi=class{constructor(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let s,r=ad;this.result=new cd(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new od(r,s,this._opts,t);if(a.isMap()){let[l,c]=a.generate();l&&(this.result.css=l),c&&(this.result.map=c)}}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=ld;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var dd=vi;vi.default=vi;let ud=dd,hd=Dr,pd=Pi,fd=qt,Mt=class{constructor(e=[]){this.version="8.4.32",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)t.push(n);else if(typeof n=="function")t.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length===0&&typeof t.parser>"u"&&typeof t.stringifier>"u"&&typeof t.syntax>"u"?new ud(this,e,t):new hd(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var gd=Mt;Mt.default=Mt;fd.registerProcessor(Mt);pd.registerProcessor(Mt);let md=Tn,vd=dr,bd=Rn,yd=Di,wd=Ln,xd=qt,kd=Ni;function Dt(i,e){if(Array.isArray(i))return i.map(s=>Dt(s));let{inputs:t,...n}=i;if(t){e=[];for(let s of t){let r={...s,__proto__:wd.prototype};r.map&&(r.map={...r.map,__proto__:vd.prototype}),e.push(r)}}if(n.nodes&&(n.nodes=i.nodes.map(s=>Dt(s,e))),n.source){let{inputId:s,...r}=n.source;n.source=r,s!=null&&(n.source.input=e[s])}if(n.type==="root")return new xd(n);if(n.type==="decl")return new md(n);if(n.type==="rule")return new kd(n);if(n.type==="comment")return new bd(n);if(n.type==="atrule")return new yd(n);throw new Error("Unknown node type: "+i.type)}var Ed=Dt;Dt.default=Dt;var Ts={};let Sd=Ti,Nr=Tn,_d=Dr,Ad=Xe,Bi=gd,$d=Cn,Id=Ed,jr=Pi,Cd=$r,Br=Rn,zr=Di,Od=Mi,Td=Ln,Ld=ji,Rd=Lr,Ur=Ni,Fr=qt,Pd=On;function P(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Bi(i)}P.plugin=function(e,t){let n=!1;function s(...o){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
638
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),Ts.LANG&&Ts.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
639
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Bi().version,a}let r;return Object.defineProperty(s,"postcss",{get(){return r||(r=s()),r}}),s.process=function(o,a,l){return P([s(l)]).process(o,a)},s};P.stringify=$d;P.parse=Ld;P.fromJSON=Id;P.list=Rd;P.comment=i=>new Br(i);P.atRule=i=>new zr(i);P.decl=i=>new Nr(i);P.rule=i=>new Ur(i);P.root=i=>new Fr(i);P.document=i=>new jr(i);P.CssSyntaxError=Sd;P.Declaration=Nr;P.Container=Ad;P.Processor=Bi;P.Document=jr;P.Comment=Br;P.Warning=Cd;P.AtRule=zr;P.Result=Od;P.Input=Td;P.Rule=Ur;P.Root=Fr;P.Node=Pd;_d.registerPostcss(P);var Md=P;P.default=P;const F=or(Md);F.stringify;F.fromJSON;F.plugin;F.parse;F.list;F.document;F.comment;F.atRule;F.rule;F.decl;F.root;F.CssSyntaxError;F.Declaration;F.Container;F.Processor;F.Document;F.Comment;F.Warning;F.AtRule;F.Result;F.Input;F.Rule;F.Root;F.Node;var Dd=function(e){const t=e.prefix,n=/\s+$/.test(t)?t:`${t} `,s=e.ignoreFiles?[].concat(e.ignoreFiles):[],r=e.includeFiles?[].concat(e.includeFiles):[];return function(o){s.length&&o.source.input.file&&Ls(o.source.input.file,s)||r.length&&o.source.input.file&&!Ls(o.source.input.file,r)||o.walkRules(a=>{const l=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes"];a.parent&&l.includes(a.parent.name)||(a.selectors=a.selectors.map(c=>e.exclude&&Nd(c,e.exclude)?c:e.transform?e.transform(t,c,n+c,o.source.input.file,a):n+c))})}};function Ls(i,e){return e.some(t=>t instanceof RegExp?t.test(i):i.includes(t))}function Nd(i,e){return e.some(t=>t instanceof RegExp?t.test(i):i===t)}const jd=or(Dd),Bd="code{white-space:pre}.example{display:flex;flex-wrap:wrap;flex-direction:row;align-items:center;gap:16px}.example>*{flex:1 1 500px}.example .tab-control{overflow:hidden}.example div[role=tab]{cursor:pointer;padding:8px 16px;display:inline-block;font-size:16px;border-bottom:2px solid transparent;background-clip:padding-box;-webkit-user-select:none;user-select:none}.example div[role=tab]:hover{background-color:#1467ba14}.example div[role=tab][selected]{background-color:#1467ba21;border-bottom:2px solid #1467ba}.tab-content{margin:16px 0}.tab-content>pre{padding-top:0}.tab-content.code{max-height:500px;overflow:auto}.tab-content.code pre{margin:0}",zd="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}";function Ud(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Hr(i){return i instanceof Map?i.clear=i.delete=i.set=function(){throw new Error("map is read-only")}:i instanceof Set&&(i.add=i.clear=i.delete=function(){throw new Error("set is read-only")}),Object.freeze(i),Object.getOwnPropertyNames(i).forEach(e=>{const t=i[e],n=typeof t;(n==="object"||n==="function")&&!Object.isFrozen(t)&&Hr(t)}),i}class Rs{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Wr(i){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Me(i,...e){const t=Object.create(null);for(const n in i)t[n]=i[n];return e.forEach(function(n){for(const s in n)t[s]=n[s]}),t}const Fd="</span>",Ps=i=>!!i.scope,Hd=(i,{prefix:e})=>{if(i.startsWith("language:"))return i.replace("language:","language-");if(i.includes(".")){const t=i.split(".");return[`${e}${t.shift()}`,...t.map((n,s)=>`${n}${"_".repeat(s+1)}`)].join(" ")}return`${e}${i}`};class Wd{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=Wr(e)}openNode(e){if(!Ps(e))return;const t=Hd(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){Ps(e)&&(this.buffer+=Fd)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const Ms=(i={})=>{const e={children:[]};return Object.assign(e,i),e};class zi{constructor(){this.rootNode=Ms(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=Ms({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t=="string"?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(n=>this._walk(e,n)),e.closeNode(t)),e}static _collapse(e){typeof e!="string"&&e.children&&(e.children.every(t=>typeof t=="string")?e.children=[e.children.join("")]:e.children.forEach(t=>{zi._collapse(t)}))}}class qd extends zi{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new Wd(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Nt(i){return i?typeof i=="string"?i:i.source:null}function qr(i){return Je("(?=",i,")")}function Vd(i){return Je("(?:",i,")*")}function Gd(i){return Je("(?:",i,")?")}function Je(...i){return i.map(e=>Nt(e)).join("")}function Kd(i){const e=i[i.length-1];return typeof e=="object"&&e.constructor===Object?(i.splice(i.length-1,1),e):{}}function Ui(...i){return"("+(Kd(i).capture?"":"?:")+i.map(e=>Nt(e)).join("|")+")"}function Vr(i){return new RegExp(i.toString()+"|").exec("").length-1}function Zd(i,e){const t=i&&i.exec(e);return t&&t.index===0}const Xd=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Fi(i,{joinWith:e}){let t=0;return i.map(n=>{t+=1;const s=t;let r=Nt(n),o="";for(;r.length>0;){const a=Xd.exec(r);if(!a){o+=r;break}o+=r.substring(0,a.index),r=r.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?o+="\\"+String(Number(a[1])+s):(o+=a[0],a[0]==="("&&t++)}return o}).map(n=>`(${n})`).join(e)}const Jd=/\b\B/,Gr="[a-zA-Z]\\w*",Hi="[a-zA-Z_]\\w*",Kr="\\b\\d+(\\.\\d+)?",Zr="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Xr="\\b(0b[01]+)",Yd="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Qd=(i={})=>{const e=/^#![ ]*\//;return i.binary&&(i.begin=Je(e,/.*\b/,i.binary,/\b.*/)),Me({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,n)=>{t.index!==0&&n.ignoreMatch()}},i)},jt={begin:"\\\\[\\s\\S]",relevance:0},eu={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[jt]},tu={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[jt]},nu={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Pn=function(i,e,t={}){const n=Me({scope:"comment",begin:i,end:e,contains:[]},t);n.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const s=Ui("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return n.contains.push({begin:Je(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},iu=Pn("//","$"),su=Pn("/\\*","\\*/"),ru=Pn("#","$"),ou={scope:"number",begin:Kr,relevance:0},au={scope:"number",begin:Zr,relevance:0},lu={scope:"number",begin:Xr,relevance:0},cu={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[jt,{begin:/\[/,end:/\]/,relevance:0,contains:[jt]}]},du={scope:"title",begin:Gr,relevance:0},uu={scope:"title",begin:Hi,relevance:0},hu={begin:"\\.\\s*"+Hi,relevance:0},pu=function(i){return Object.assign(i,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})};var an=Object.freeze({__proto__:null,APOS_STRING_MODE:eu,BACKSLASH_ESCAPE:jt,BINARY_NUMBER_MODE:lu,BINARY_NUMBER_RE:Xr,COMMENT:Pn,C_BLOCK_COMMENT_MODE:su,C_LINE_COMMENT_MODE:iu,C_NUMBER_MODE:au,C_NUMBER_RE:Zr,END_SAME_AS_BEGIN:pu,HASH_COMMENT_MODE:ru,IDENT_RE:Gr,MATCH_NOTHING_RE:Jd,METHOD_GUARD:hu,NUMBER_MODE:ou,NUMBER_RE:Kr,PHRASAL_WORDS_MODE:nu,QUOTE_STRING_MODE:tu,REGEXP_MODE:cu,RE_STARTERS_RE:Yd,SHEBANG:Qd,TITLE_MODE:du,UNDERSCORE_IDENT_RE:Hi,UNDERSCORE_TITLE_MODE:uu});function fu(i,e){i.input[i.index-1]==="."&&e.ignoreMatch()}function gu(i,e){i.className!==void 0&&(i.scope=i.className,delete i.className)}function mu(i,e){e&&i.beginKeywords&&(i.begin="\\b("+i.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",i.__beforeBegin=fu,i.keywords=i.keywords||i.beginKeywords,delete i.beginKeywords,i.relevance===void 0&&(i.relevance=0))}function vu(i,e){Array.isArray(i.illegal)&&(i.illegal=Ui(...i.illegal))}function bu(i,e){if(i.match){if(i.begin||i.end)throw new Error("begin & end are not supported with match");i.begin=i.match,delete i.match}}function yu(i,e){i.relevance===void 0&&(i.relevance=1)}const wu=(i,e)=>{if(!i.beforeMatch)return;if(i.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},i);Object.keys(i).forEach(n=>{delete i[n]}),i.keywords=t.keywords,i.begin=Je(t.beforeMatch,qr(t.begin)),i.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},i.relevance=0,delete t.beforeMatch},xu=["of","and","for","in","not","or","if","then","parent","list","value"],ku="keyword";function Jr(i,e,t=ku){const n=Object.create(null);return typeof i=="string"?s(t,i.split(" ")):Array.isArray(i)?s(t,i):Object.keys(i).forEach(function(r){Object.assign(n,Jr(i[r],e,r))}),n;function s(r,o){e&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){const l=a.split("|");n[l[0]]=[r,Eu(l[0],l[1])]})}}function Eu(i,e){return e?Number(e):Su(i)?0:1}function Su(i){return xu.includes(i.toLowerCase())}const Ds={},qe=i=>{console.error(i)},Ns=(i,...e)=>{console.log(`WARN: ${i}`,...e)},it=(i,e)=>{Ds[`${i}/${e}`]||(console.log(`Deprecated as of ${i}. ${e}`),Ds[`${i}/${e}`]=!0)},En=new Error;function Yr(i,e,{key:t}){let n=0;const s=i[t],r={},o={};for(let a=1;a<=e.length;a++)o[a+n]=s[a],r[a+n]=!0,n+=Vr(e[a-1]);i[t]=o,i[t]._emit=r,i[t]._multi=!0}function _u(i){if(Array.isArray(i.begin)){if(i.skip||i.excludeBegin||i.returnBegin)throw qe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),En;if(typeof i.beginScope!="object"||i.beginScope===null)throw qe("beginScope must be object"),En;Yr(i,i.begin,{key:"beginScope"}),i.begin=Fi(i.begin,{joinWith:""})}}function Au(i){if(Array.isArray(i.end)){if(i.skip||i.excludeEnd||i.returnEnd)throw qe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),En;if(typeof i.endScope!="object"||i.endScope===null)throw qe("endScope must be object"),En;Yr(i,i.end,{key:"endScope"}),i.end=Fi(i.end,{joinWith:""})}}function $u(i){i.scope&&typeof i.scope=="object"&&i.scope!==null&&(i.beginScope=i.scope,delete i.scope)}function Iu(i){$u(i),typeof i.beginScope=="string"&&(i.beginScope={_wrap:i.beginScope}),typeof i.endScope=="string"&&(i.endScope={_wrap:i.endScope}),_u(i),Au(i)}function Cu(i){function e(o,a){return new RegExp(Nt(o),"m"+(i.case_insensitive?"i":"")+(i.unicodeRegex?"u":"")+(a?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=Vr(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=e(Fi(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const c=l.findIndex((h,p)=>p>0&&h!==void 0),d=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,d)}}class n{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const l=new t;return this.rules.slice(a).forEach(([c,d])=>l.addRule(c,d)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(a);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,c=d.exec(a)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function s(o){const a=new n;return o.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&a.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&a.addRule(o.illegal,{type:"illegal"}),a}function r(o,a){const l=o;if(o.isCompiled)return l;[gu,bu,Iu,wu].forEach(d=>d(o,a)),i.compilerExtensions.forEach(d=>d(o,a)),o.__beforeBegin=null,[mu,vu,yu].forEach(d=>d(o,a)),o.isCompiled=!0;let c=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),c=o.keywords.$pattern,delete o.keywords.$pattern),c=c||/\w+/,o.keywords&&(o.keywords=Jr(o.keywords,i.case_insensitive)),l.keywordPatternRe=e(c,!0),a&&(o.begin||(o.begin=/\B|\b/),l.beginRe=e(l.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(l.endRe=e(l.end)),l.terminatorEnd=Nt(l.end)||"",o.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(l.illegalRe=e(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(d){return Ou(d==="self"?o:d)})),o.contains.forEach(function(d){r(d,l)}),o.starts&&r(o.starts,a),l.matcher=s(l),l}if(i.compilerExtensions||(i.compilerExtensions=[]),i.contains&&i.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return i.classNameAliases=Me(i.classNameAliases||{}),r(i)}function Qr(i){return i?i.endsWithParent||Qr(i.starts):!1}function Ou(i){return i.variants&&!i.cachedVariants&&(i.cachedVariants=i.variants.map(function(e){return Me(i,{variants:null},e)})),i.cachedVariants?i.cachedVariants:Qr(i)?Me(i,{starts:i.starts?Me(i.starts):null}):Object.isFrozen(i)?Me(i):i}var Tu="11.9.0";class Lu extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const Zn=Wr,js=Me,Bs=Symbol("nomatch"),Ru=7,eo=function(i){const e=Object.create(null),t=Object.create(null),n=[];let s=!0;const r="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:qd};function l(u){return a.noHighlightRe.test(u)}function c(u){let b=u.className+" ";b+=u.parentNode?u.parentNode.className:"";const k=a.languageDetectRe.exec(b);if(k){const I=O(k[1]);return I||(Ns(r.replace("{}",k[1])),Ns("Falling back to no-highlight mode for this block.",u)),I?k[1]:"no-highlight"}return b.split(/\s+/).find(I=>l(I)||O(I))}function d(u,b,k){let I="",B="";typeof b=="object"?(I=u,k=b.ignoreIllegals,B=b.language):(it("10.7.0","highlight(lang, code, ...args) has been deprecated."),it("10.7.0",`Please use highlight(code, options) instead.
|
|
640
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),B=u,I=b),k===void 0&&(k=!0);const Z={code:I,language:B};ie("before:highlight",Z);const ae=Z.result?Z.result:h(Z.language,Z.code,k);return ae.code=Z.code,ie("after:highlight",ae),ae}function h(u,b,k,I){const B=Object.create(null);function Z(g,y){return g.keywords[y]}function ae(){if(!S.keywords){q.addText(D);return}let g=0;S.keywordPatternRe.lastIndex=0;let y=S.keywordPatternRe.exec(D),_="";for(;y;){_+=D.substring(g,y.index);const N=le.case_insensitive?y[0].toLowerCase():y[0],Q=Z(S,N);if(Q){const[$e,co]=Q;if(q.addText(_),_="",B[N]=(B[N]||0)+1,B[N]<=Ru&&(ze+=co),$e.startsWith("_"))_+=y[0];else{const uo=le.classNameAliases[$e]||$e;Y(y[0],uo)}}else _+=y[0];g=S.keywordPatternRe.lastIndex,y=S.keywordPatternRe.exec(D)}_+=D.substring(g),q.addText(_)}function ve(){if(D==="")return;let g=null;if(typeof S.subLanguage=="string"){if(!e[S.subLanguage]){q.addText(D);return}g=h(S.subLanguage,D,!0,xe[S.subLanguage]),xe[S.subLanguage]=g._top}else g=m(D,S.subLanguage.length?S.subLanguage:null);S.relevance>0&&(ze+=g.relevance),q.__addSublanguage(g._emitter,g.language)}function W(){S.subLanguage!=null?ve():ae(),D=""}function Y(g,y){g!==""&&(q.startScope(y),q.addText(g),q.endScope())}function Be(g,y){let _=1;const N=y.length-1;for(;_<=N;){if(!g._emit[_]){_++;continue}const Q=le.classNameAliases[g[_]]||g[_],$e=y[_];Q?Y($e,Q):(D=$e,ae(),D=""),_++}}function we(g,y){return g.scope&&typeof g.scope=="string"&&q.openNode(le.classNameAliases[g.scope]||g.scope),g.beginScope&&(g.beginScope._wrap?(Y(D,le.classNameAliases[g.beginScope._wrap]||g.beginScope._wrap),D=""):g.beginScope._multi&&(Be(g.beginScope,y),D="")),S=Object.create(g,{parent:{value:S}}),S}function Ye(g,y,_){let N=Zd(g.endRe,_);if(N){if(g["on:end"]){const Q=new Rs(g);g["on:end"](y,Q),Q.isMatchIgnored&&(N=!1)}if(N){for(;g.endsParent&&g.parent;)g=g.parent;return g}}if(g.endsWithParent)return Ye(g.parent,y,_)}function Dn(g){return S.matcher.regexIndex===0?(D+=g[0],1):(tt=!0,0)}function mt(g){const y=g[0],_=g.rule,N=new Rs(_),Q=[_.__beforeBegin,_["on:begin"]];for(const $e of Q)if($e&&($e(g,N),N.isMatchIgnored))return Dn(y);return _.skip?D+=y:(_.excludeBegin&&(D+=y),W(),!_.returnBegin&&!_.excludeBegin&&(D=y)),we(_,g),_.returnBegin?0:y.length}function Nn(g){const y=g[0],_=b.substring(g.index),N=Ye(S,g,_);if(!N)return Bs;const Q=S;S.endScope&&S.endScope._wrap?(W(),Y(y,S.endScope._wrap)):S.endScope&&S.endScope._multi?(W(),Be(S.endScope,g)):Q.skip?D+=y:(Q.returnEnd||Q.excludeEnd||(D+=y),W(),Q.excludeEnd&&(D=y));do S.scope&&q.closeNode(),!S.skip&&!S.subLanguage&&(ze+=S.relevance),S=S.parent;while(S!==N.parent);return N.starts&&we(N.starts,g),Q.returnEnd?0:y.length}function Vt(){const g=[];for(let y=S;y!==le;y=y.parent)y.scope&&g.unshift(y.scope);g.forEach(y=>q.openNode(y))}let Qe={};function Gt(g,y){const _=y&&y[0];if(D+=g,_==null)return W(),0;if(Qe.type==="begin"&&y.type==="end"&&Qe.index===y.index&&_===""){if(D+=b.slice(y.index,y.index+1),!s){const N=new Error(`0 width match regex (${u})`);throw N.languageName=u,N.badRule=Qe.rule,N}return 1}if(Qe=y,y.type==="begin")return mt(y);if(y.type==="illegal"&&!k){const N=new Error('Illegal lexeme "'+_+'" for mode "'+(S.scope||"<unnamed>")+'"');throw N.mode=S,N}else if(y.type==="end"){const N=Nn(y);if(N!==Bs)return N}if(y.type==="illegal"&&_==="")return 1;if(et>1e5&&et>y.index*3)throw new Error("potential infinite loop, way more iterations than matches");return D+=_,_.length}const le=O(u);if(!le)throw qe(r.replace("{}",u)),new Error('Unknown language: "'+u+'"');const Kt=Cu(le);let vt="",S=I||Kt;const xe={},q=new a.__emitter(a);Vt();let D="",ze=0,be=0,et=0,tt=!1;try{if(le.__emitTokens)le.__emitTokens(b,q);else{for(S.matcher.considerAll();;){et++,tt?tt=!1:S.matcher.considerAll(),S.matcher.lastIndex=be;const g=S.matcher.exec(b);if(!g)break;const y=b.substring(be,g.index),_=Gt(y,g);be=g.index+_}Gt(b.substring(be))}return q.finalize(),vt=q.toHTML(),{language:u,value:vt,relevance:ze,illegal:!1,_emitter:q,_top:S}}catch(g){if(g.message&&g.message.includes("Illegal"))return{language:u,value:Zn(b),illegal:!0,relevance:0,_illegalBy:{message:g.message,index:be,context:b.slice(be-100,be+100),mode:g.mode,resultSoFar:vt},_emitter:q};if(s)return{language:u,value:Zn(b),illegal:!1,relevance:0,errorRaised:g,_emitter:q,_top:S};throw g}}function p(u){const b={value:Zn(u),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return b._emitter.addText(u),b}function m(u,b){b=b||a.languages||Object.keys(e);const k=p(u),I=b.filter(O).filter(G).map(W=>h(W,u,!1));I.unshift(k);const B=I.sort((W,Y)=>{if(W.relevance!==Y.relevance)return Y.relevance-W.relevance;if(W.language&&Y.language){if(O(W.language).supersetOf===Y.language)return 1;if(O(Y.language).supersetOf===W.language)return-1}return 0}),[Z,ae]=B,ve=Z;return ve.secondBest=ae,ve}function E(u,b,k){const I=b&&t[b]||k;u.classList.add("hljs"),u.classList.add(`language-${I}`)}function w(u){let b=null;const k=c(u);if(l(k))return;if(ie("before:highlightElement",{el:u,language:k}),u.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",u);return}if(u.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(u)),a.throwUnescapedHTML))throw new Lu("One of your code blocks includes unescaped HTML.",u.innerHTML);b=u;const I=b.textContent,B=k?d(I,{language:k,ignoreIllegals:!0}):m(I);u.innerHTML=B.value,u.dataset.highlighted="yes",E(u,k,B.language),u.result={language:B.language,re:B.relevance,relevance:B.relevance},B.secondBest&&(u.secondBest={language:B.secondBest.language,relevance:B.secondBest.relevance}),ie("after:highlightElement",{el:u,result:B,text:I})}function f(u){a=js(a,u)}const $=()=>{x(),it("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function T(){x(),it("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let L=!1;function x(){if(document.readyState==="loading"){L=!0;return}document.querySelectorAll(a.cssSelector).forEach(w)}function A(){L&&x()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function C(u,b){let k=null;try{k=b(i)}catch(I){if(qe("Language definition for '{}' could not be registered.".replace("{}",u)),s)qe(I);else throw I;k=o}k.name||(k.name=u),e[u]=k,k.rawDefinition=b.bind(null,i),k.aliases&&j(k.aliases,{languageName:u})}function R(u){delete e[u];for(const b of Object.keys(t))t[b]===u&&delete t[b]}function M(){return Object.keys(e)}function O(u){return u=(u||"").toLowerCase(),e[u]||e[t[u]]}function j(u,{languageName:b}){typeof u=="string"&&(u=[u]),u.forEach(k=>{t[k.toLowerCase()]=b})}function G(u){const b=O(u);return b&&!b.disableAutodetect}function ne(u){u["before:highlightBlock"]&&!u["before:highlightElement"]&&(u["before:highlightElement"]=b=>{u["before:highlightBlock"](Object.assign({block:b.el},b))}),u["after:highlightBlock"]&&!u["after:highlightElement"]&&(u["after:highlightElement"]=b=>{u["after:highlightBlock"](Object.assign({block:b.el},b))})}function K(u){ne(u),n.push(u)}function me(u){const b=n.indexOf(u);b!==-1&&n.splice(b,1)}function ie(u,b){const k=u;n.forEach(function(I){I[k]&&I[k](b)})}function J(u){return it("10.7.0","highlightBlock will be removed entirely in v12.0"),it("10.7.0","Please use highlightElement now."),w(u)}Object.assign(i,{highlight:d,highlightAuto:m,highlightAll:x,highlightElement:w,highlightBlock:J,configure:f,initHighlighting:$,initHighlightingOnLoad:T,registerLanguage:C,unregisterLanguage:R,listLanguages:M,getLanguage:O,registerAliases:j,autoDetection:G,inherit:js,addPlugin:K,removePlugin:me}),i.debugMode=function(){s=!1},i.safeMode=function(){s=!0},i.versionString=Tu,i.regex={concat:Je,lookahead:qr,either:Ui,optional:Gd,anyNumberOfTimes:Vd};for(const u in an)typeof an[u]=="object"&&Hr(an[u]);return Object.assign(i,an),i},gt=eo({});gt.newInstance=()=>eo({});var Pu=gt;gt.HighlightJS=gt;gt.default=gt;const Mn=Ud(Pu),Sn="[A-Za-z$_][0-9A-Za-z$_]*",to=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],no=["true","false","null","undefined","NaN","Infinity"],io=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],so=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ro=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],oo=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ao=[].concat(ro,io,so);function Mu(i){const e=i.regex,t=(u,{after:b})=>{const k="</"+u[0].slice(1);return u.input.indexOf(k,b)!==-1},n=Sn,s={begin:"<>",end:"</>"},r=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(u,b)=>{const k=u[0].length+u.index,I=u.input[k];if(I==="<"||I===","){b.ignoreMatch();return}I===">"&&(t(u,{after:k})||b.ignoreMatch());let B;const Z=u.input.substring(k);if(B=Z.match(/^\s*=/)){b.ignoreMatch();return}if((B=Z.match(/^\s+extends\s+/))&&B.index===0){b.ignoreMatch();return}}},a={$pattern:Sn,keyword:to,literal:no,built_in:ao,"variable.language":oo},l="[0-9](_?[0-9])*",c=`\\.(${l})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${d})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},m={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},E={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,p],subLanguage:"css"}},w={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},f={className:"string",begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,p]},$={className:"comment",variants:[i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]},T=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,m,E,w,f,{match:/\$\d+/},h];p.contains=T.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(T)});const L=[].concat($,p.contains),x=L.concat([{begin:/\(/,end:/\)/,keywords:a,contains:["self"].concat(L)}]),A={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:x},C={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,e.concat(n,"(",e.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},R={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...io,...so]}},M={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(u){return e.concat("(?!",u.join("|"),")")}const ne={match:e.concat(/\b/,G([...ro,"super","import"]),n,e.lookahead(/\(/)),className:"title.function",relevance:0},K={begin:e.concat(/\./,e.lookahead(e.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},me={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},ie="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>",J={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(ie)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:x,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node",relevance:5}),M,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,m,E,w,f,$,{match:/\$\d+/},h,R,{className:"attr",begin:n+e.lookahead(":"),relevance:0},J,{begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[$,i.REGEXP_MODE,{className:"function",begin:ie,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:x}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:r},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,i.inherit(i.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},K,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},ne,j,C,me,{match:/\$[(.]/}]}}function Du(i){const e=Mu(i),t=Sn,n=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[e.exports.CLASS_REFERENCE]},r={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:n},contains:[e.exports.CLASS_REFERENCE]},o={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},a=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],l={$pattern:Sn,keyword:to.concat(a),literal:no,built_in:ao.concat(n),"variable.language":oo},c={className:"meta",begin:"@"+t},d=(p,m,E)=>{const w=p.contains.findIndex(f=>f.label===m);if(w===-1)throw new Error("can not find mode to replace");p.contains.splice(w,1,E)};Object.assign(e.keywords,l),e.exports.PARAMS_CONTAINS.push(c),e.contains=e.contains.concat([c,s,r]),d(e,"shebang",i.SHEBANG()),d(e,"use_strict",o);const h=e.contains.find(p=>p.label==="func.def");return h.relevance=0,Object.assign(e,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),e}function Nu(i){const e=i.regex,t=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),n=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=i.inherit(r,{begin:/\(/,end:/\)/}),a=i.inherit(i.APOS_STRING_MODE,{className:"string"}),l=i.inherit(i.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:n,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[r,l,a,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[r,o,l,a]}]}]},i.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(/</,e.lookahead(e.concat(t,e.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:c}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}const ju=i=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:i.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:i.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Bu=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],zu=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],Uu=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],Fu=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],Hu=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function Wu(i){const e=i.regex,t=ju(i),n={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",r=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",a=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[t.BLOCK_COMMENT,n,t.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Uu.join("|")+")"},{begin:":(:)?("+Fu.join("|")+")"}]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Hu.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[t.BLOCK_COMMENT,t.HEXCOLOR,t.IMPORTANT,t.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},t.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:r},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:zu.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,t.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Bu.join("|")+")\\b"}]}}const lo=document.createElement("style");lo.innerText=[Bd,zd].join(`
|
|
641
|
-
`);document.head.appendChild(
|
|
642
|
-
`).trim();return
|
|
638
|
+
`)&&(l=`\r
|
|
639
|
+
`),this.css+=l+"/*# sourceMappingURL="+c+" */"}applyPrevMaps(){for(let c of this.previous()){let l=this.toUrl(this.path(c.file)),f=c.root||t(c.file),g;this.mapOpts.sourcesContent===!1?(g=new n(c.text),g.sourcesContent&&(g.sourcesContent=null)):g=c.consumer(),this.map.applySourceMap(g,l,this.toUrl(this.path(f)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let c;for(let l=this.root.nodes.length-1;l>=0;l--)c=this.root.nodes[l],c.type==="comment"&&c.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(l)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),h&&p&&this.isMap())return this.generateMap();{let c="";return this.stringify(this.root,l=>{c+=l}),[c]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let c=this.previous()[0].consumer();c.file=this.outputFile(),this.map=r.fromSourceMap(c,{ignoreInvalidMapping:!0})}else this.map=new r({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new r({file:this.outputFile(),ignoreInvalidMapping:!0});let c=1,l=1,f="<no source>",g={generated:{column:0,line:0},original:{column:0,line:0},source:""},v,x;this.stringify(this.root,(k,w,y)=>{if(this.css+=k,w&&y!=="end"&&(g.generated.line=c,g.generated.column=l-1,w.source&&w.source.start?(g.source=this.sourcePath(w),g.original.line=w.source.start.line,g.original.column=w.source.start.column-1,this.map.addMapping(g)):(g.source=f,g.original.line=1,g.original.column=0,this.map.addMapping(g))),x=k.match(/\n/g),x?(c+=x.length,v=k.lastIndexOf(`
|
|
640
|
+
`),l=k.length-v):l+=k.length,w&&y!=="start"){let b=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==b.last||b.raws.semicolon)&&(w.source&&w.source.end?(g.source=this.sourcePath(w),g.original.line=w.source.end.line,g.original.column=w.source.end.column-1,g.generated.line=c,g.generated.column=l-2,this.map.addMapping(g)):(g.source=f,g.original.line=1,g.original.column=0,g.generated.line=c,g.generated.column=l-1,this.map.addMapping(g)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(c=>c.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let c=this.mapOpts.annotation;return typeof c<"u"&&c!==!0?!1:this.previous().length?this.previous().some(l=>l.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(c=>c.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(c){if(this.mapOpts.absolute||c.charCodeAt(0)===60||/^\w+:\/\//.test(c))return c;let l=this.memoizedPaths.get(c);if(l)return l;let f=this.opts.to?t(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(f=t(i(f,this.mapOpts.annotation)));let g=e(f,c);return this.memoizedPaths.set(c,g),g}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(c=>{if(c.source&&c.source.input.map){let l=c.source.input.map;this.previousMaps.includes(l)||this.previousMaps.push(l)}});else{let c=new d(this.originalCSS,this.opts);c.map&&this.previousMaps.push(c.map)}return this.previousMaps}setSourcesContent(){let c={};if(this.root)this.root.walk(l=>{if(l.source){let f=l.source.input.from;if(f&&!c[f]){c[f]=!0;let g=this.usesFileUrls?this.toFileUrl(f):this.toUrl(this.path(f));this.map.setSourceContent(g,l.source.input.css)}}});else if(this.css){let l=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(l,this.css)}}sourcePath(c){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(c.source.input.from):this.toUrl(this.path(c.source.input.from))}toBase64(c){return Buffer?Buffer.from(c).toString("base64"):window.btoa(unescape(encodeURIComponent(c)))}toFileUrl(c){let l=this.memoizedFileURLs.get(c);if(l)return l;if(o){let f=o(c).toString();return this.memoizedFileURLs.set(c,f),f}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(c){let l=this.memoizedURLs.get(c);if(l)return l;s==="\\"&&(c=c.replace(/\\/g,"/"));let f=encodeURI(c).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(c,f),f}}return ln=a,ln}var cn,Gs;function nc(){if(Gs)return cn;Gs=1;const t=39,e=34,i=92,s=47,n=10,r=32,o=12,d=9,p=13,h=91,a=93,u=40,c=41,l=123,f=125,g=59,v=42,x=58,k=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,y=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,E=/[\da-f]/i;return cn=function(R,M={}){let I=R.css.valueOf(),F=M.ignoreErrors,U,Q,re,T,oe,H,X,te,le,Se,we=I.length,j=0,_e=[],me=[];function We(){return j}function Me(Ae){throw R.error("Unclosed "+Ae,j)}function Re(){return me.length===0&&j>=we}function De(Ae){if(me.length)return me.pop();if(j>=we)return;let rt=Ae?Ae.ignoreUnclosed:!1;switch(U=I.charCodeAt(j),U){case n:case r:case d:case p:case o:{T=j;do T+=1,U=I.charCodeAt(T);while(U===r||U===n||U===d||U===p||U===o);H=["space",I.slice(j,T)],j=T-1;break}case h:case a:case l:case f:case x:case g:case c:{let ot=String.fromCharCode(U);H=[ot,ot,j];break}case u:{if(Se=_e.length?_e.pop()[1]:"",le=I.charCodeAt(j+1),Se==="url"&&le!==t&&le!==e&&le!==r&&le!==n&&le!==d&&le!==o&&le!==p){T=j;do{if(X=!1,T=I.indexOf(")",T+1),T===-1)if(F||rt){T=j;break}else Me("bracket");for(te=T;I.charCodeAt(te-1)===i;)te-=1,X=!X}while(X);H=["brackets",I.slice(j,T+1),j,T],j=T}else T=I.indexOf(")",j+1),Q=I.slice(j,T+1),T===-1||b.test(Q)?H=["(","(",j]:(H=["brackets",Q,j,T],j=T);break}case t:case e:{oe=U===t?"'":'"',T=j;do{if(X=!1,T=I.indexOf(oe,T+1),T===-1)if(F||rt){T=j+1;break}else Me("string");for(te=T;I.charCodeAt(te-1)===i;)te-=1,X=!X}while(X);H=["string",I.slice(j,T+1),j,T],j=T;break}case k:{w.lastIndex=j+1,w.test(I),w.lastIndex===0?T=I.length-1:T=w.lastIndex-2,H=["at-word",I.slice(j,T+1),j,T],j=T;break}case i:{for(T=j,re=!0;I.charCodeAt(T+1)===i;)T+=1,re=!re;if(U=I.charCodeAt(T+1),re&&U!==s&&U!==r&&U!==n&&U!==d&&U!==p&&U!==o&&(T+=1,E.test(I.charAt(T)))){for(;E.test(I.charAt(T+1));)T+=1;I.charCodeAt(T+1)===r&&(T+=1)}H=["word",I.slice(j,T+1),j,T],j=T;break}default:{U===s&&I.charCodeAt(j+1)===v?(T=I.indexOf("*/",j+2)+1,T===0&&(F||rt?T=I.length:Me("comment")),H=["comment",I.slice(j,T+1),j,T],j=T):(y.lastIndex=j+1,y.test(I),y.lastIndex===0?T=I.length-1:T=y.lastIndex-2,H=["word",I.slice(j,T+1),j,T],_e.push(H),j=T);break}}return j++,H}function Ot(Ae){me.push(Ae)}return{back:Ot,endOfFile:Re,nextToken:De,position:We}},cn}var dn,Ks;function sc(){if(Ks)return dn;Ks=1;let t=qn(),e=Oi(),i=Ti(),s=Xt(),n=Hn(),r=nc();const o={empty:!0,space:!0};function d(h){for(let a=h.length-1;a>=0;a--){let u=h[a],c=u[3]||u[2];if(c)return c}}class p{constructor(a){this.input=a,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:a,start:{column:1,line:1,offset:0}}}atrule(a){let u=new t;u.name=a[1].slice(1),u.name===""&&this.unnamedAtrule(u,a),this.init(u,a[2]);let c,l,f,g=!1,v=!1,x=[],k=[];for(;!this.tokenizer.endOfFile();){if(a=this.tokenizer.nextToken(),c=a[0],c==="("||c==="["?k.push(c==="("?")":"]"):c==="{"&&k.length>0?k.push("}"):c===k[k.length-1]&&k.pop(),k.length===0)if(c===";"){u.source.end=this.getPosition(a[2]),u.source.end.offset++,this.semicolon=!0;break}else if(c==="{"){v=!0;break}else if(c==="}"){if(x.length>0){for(f=x.length-1,l=x[f];l&&l[0]==="space";)l=x[--f];l&&(u.source.end=this.getPosition(l[3]||l[2]),u.source.end.offset++)}this.end(a);break}else x.push(a);else x.push(a);if(this.tokenizer.endOfFile()){g=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(x),x.length?(u.raws.afterName=this.spacesAndCommentsFromStart(x),this.raw(u,"params",x),g&&(a=x[x.length-1],u.source.end=this.getPosition(a[3]||a[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),v&&(u.nodes=[],this.current=u)}checkMissedSemicolon(a){let u=this.colon(a);if(u===!1)return;let c=0,l;for(let f=u-1;f>=0&&(l=a[f],!(l[0]!=="space"&&(c+=1,c===2)));f--);throw this.input.error("Missed semicolon",l[0]==="word"?l[3]+1:l[2])}colon(a){let u=0,c,l,f;for(let[g,v]of a.entries()){if(l=v,f=l[0],f==="("&&(u+=1),f===")"&&(u-=1),u===0&&f===":")if(!c)this.doubleColon(l);else{if(c[0]==="word"&&c[1]==="progid")continue;return g}c=l}return!1}comment(a){let u=new e;this.init(u,a[2]),u.source.end=this.getPosition(a[3]||a[2]),u.source.end.offset++;let c=a[1].slice(2,-2);if(/^\s*$/.test(c))u.text="",u.raws.left=c,u.raws.right="";else{let l=c.match(/^(\s*)([^]*\S)(\s*)$/);u.text=l[2],u.raws.left=l[1],u.raws.right=l[3]}}createTokenizer(){this.tokenizer=r(this.input)}decl(a,u){let c=new i;this.init(c,a[0][2]);let l=a[a.length-1];for(l[0]===";"&&(this.semicolon=!0,a.pop()),c.source.end=this.getPosition(l[3]||l[2]||d(a)),c.source.end.offset++;a[0][0]!=="word";)a.length===1&&this.unknownWord(a),c.raws.before+=a.shift()[1];for(c.source.start=this.getPosition(a[0][2]),c.prop="";a.length;){let k=a[0][0];if(k===":"||k==="space"||k==="comment")break;c.prop+=a.shift()[1]}c.raws.between="";let f;for(;a.length;)if(f=a.shift(),f[0]===":"){c.raws.between+=f[1];break}else f[0]==="word"&&/\w/.test(f[1])&&this.unknownWord([f]),c.raws.between+=f[1];(c.prop[0]==="_"||c.prop[0]==="*")&&(c.raws.before+=c.prop[0],c.prop=c.prop.slice(1));let g=[],v;for(;a.length&&(v=a[0][0],!(v!=="space"&&v!=="comment"));)g.push(a.shift());this.precheckMissedSemicolon(a);for(let k=a.length-1;k>=0;k--){if(f=a[k],f[1].toLowerCase()==="!important"){c.important=!0;let w=this.stringFrom(a,k);w=this.spacesFromEnd(a)+w,w!==" !important"&&(c.raws.important=w);break}else if(f[1].toLowerCase()==="important"){let w=a.slice(0),y="";for(let b=k;b>0;b--){let E=w[b][0];if(y.trim().startsWith("!")&&E!=="space")break;y=w.pop()[1]+y}y.trim().startsWith("!")&&(c.important=!0,c.raws.important=y,a=w)}if(f[0]!=="space"&&f[0]!=="comment")break}a.some(k=>k[0]!=="space"&&k[0]!=="comment")&&(c.raws.between+=g.map(k=>k[1]).join(""),g=[]),this.raw(c,"value",g.concat(a),u),c.value.includes(":")&&!u&&this.checkMissedSemicolon(a)}doubleColon(a){throw this.input.error("Double colon",{offset:a[2]},{offset:a[2]+a[1].length})}emptyRule(a){let u=new n;this.init(u,a[2]),u.selector="",u.raws.between="",this.current=u}end(a){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(a[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(a)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(a){if(this.spaces+=a[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="",u.source.end=this.getPosition(a[2]),u.source.end.offset+=u.raws.ownSemicolon.length)}}getPosition(a){let u=this.input.fromOffset(a);return{column:u.col,line:u.line,offset:a}}init(a,u){this.current.push(a),a.source={input:this.input,start:this.getPosition(u)},a.raws.before=this.spaces,this.spaces="",a.type!=="comment"&&(this.semicolon=!1)}other(a){let u=!1,c=null,l=!1,f=null,g=[],v=a[1].startsWith("--"),x=[],k=a;for(;k;){if(c=k[0],x.push(k),c==="("||c==="[")f||(f=k),g.push(c==="("?")":"]");else if(v&&l&&c==="{")f||(f=k),g.push("}");else if(g.length===0)if(c===";")if(l){this.decl(x,v);return}else break;else if(c==="{"){this.rule(x);return}else if(c==="}"){this.tokenizer.back(x.pop()),u=!0;break}else c===":"&&(l=!0);else c===g[g.length-1]&&(g.pop(),g.length===0&&(f=null));k=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),g.length>0&&this.unclosedBracket(f),u&&l){if(!v)for(;x.length&&(k=x[x.length-1][0],!(k!=="space"&&k!=="comment"));)this.tokenizer.back(x.pop());this.decl(x,v)}else this.unknownWord(x)}parse(){let a;for(;!this.tokenizer.endOfFile();)switch(a=this.tokenizer.nextToken(),a[0]){case"space":this.spaces+=a[1];break;case";":this.freeSemicolon(a);break;case"}":this.end(a);break;case"comment":this.comment(a);break;case"at-word":this.atrule(a);break;case"{":this.emptyRule(a);break;default:this.other(a);break}this.endFile()}precheckMissedSemicolon(){}raw(a,u,c,l){let f,g,v=c.length,x="",k=!0,w,y;for(let b=0;b<v;b+=1)f=c[b],g=f[0],g==="space"&&b===v-1&&!l?k=!1:g==="comment"?(y=c[b-1]?c[b-1][0]:"empty",w=c[b+1]?c[b+1][0]:"empty",!o[y]&&!o[w]?x.slice(-1)===","?k=!1:x+=f[1]:k=!1):x+=f[1];if(!k){let b=c.reduce((E,_)=>E+_[1],"");a.raws[u]={raw:b,value:x}}a[u]=x}rule(a){a.pop();let u=new n;this.init(u,a[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(a),this.raw(u,"selector",a),this.current=u}spacesAndCommentsFromEnd(a){let u,c="";for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)c=a.pop()[1]+c;return c}spacesAndCommentsFromStart(a){let u,c="";for(;a.length&&(u=a[0][0],!(u!=="space"&&u!=="comment"));)c+=a.shift()[1];return c}spacesFromEnd(a){let u,c="";for(;a.length&&(u=a[a.length-1][0],u==="space");)c=a.pop()[1]+c;return c}stringFrom(a,u){let c="";for(let l=u;l<a.length;l++)c+=a[l][1];return a.splice(u,a.length-u),c}unclosedBlock(){let a=this.current.source.start;throw this.input.error("Unclosed block",a.line,a.column)}unclosedBracket(a){throw this.input.error("Unclosed bracket",{offset:a[2]},{offset:a[2]+1})}unexpectedClose(a){throw this.input.error("Unexpected }",{offset:a[2]},{offset:a[2]+1})}unknownWord(a){throw this.input.error("Unknown word "+a[0][1],{offset:a[0][2]},{offset:a[0][2]+a[0][1].length})}unnamedAtrule(a,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return dn=p,dn}var un,Zs;function Wn(){if(Zs)return un;Zs=1;let t=vt(),e=$i(),i=sc();function s(n,r){let o=new e(n,r),d=new i(o);try{d.parse()}catch(p){throw p}return d.root}return un=s,s.default=s,t.registerParse(s),un}var hn,Js;function Cr(){if(Js)return hn;Js=1;class t{constructor(i,s={}){if(this.type="warning",this.text=i,s.node&&s.node.source){let n=s.node.rangeBy(s);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in s)this[n]=s[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return hn=t,t.default=t,hn}var pn,Xs;function Vn(){if(Xs)return pn;Xs=1;let t=Cr();class e{get content(){return this.css}constructor(s,n,r){this.processor=s,this.messages=[],this.root=n,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(s,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new t(s,n);return this.messages.push(r),r}warnings(){return this.messages.filter(s=>s.type==="warning")}}return pn=e,e.default=e,pn}var fn,Ys;function Or(){if(Ys)return fn;Ys=1;let t=vt(),e=Fn(),i=Ir(),s=Wn(),n=Vn(),r=Xt(),o=Ii(),{isClean:d,my:p}=Un();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},a={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},u={Once:!0,postcssPlugin:!0,prepare:!0},c=0;function l(w){return typeof w=="object"&&typeof w.then=="function"}function f(w){let y=!1,b=h[w.type];return w.type==="decl"?y=w.prop.toLowerCase():w.type==="atrule"&&(y=w.name.toLowerCase()),y&&w.append?[b,b+"-"+y,c,b+"Exit",b+"Exit-"+y]:y?[b,b+"-"+y,b+"Exit",b+"Exit-"+y]:w.append?[b,c,b+"Exit"]:[b,b+"Exit"]}function g(w){let y;return w.type==="document"?y=["Document",c,"DocumentExit"]:w.type==="root"?y=["Root",c,"RootExit"]:y=f(w),{eventIndex:0,events:y,iterator:0,node:w,visitorIndex:0,visitors:[]}}function v(w){return w[d]=!1,w.nodes&&w.nodes.forEach(y=>v(y)),w}let x={};class k{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(y,b,E){this.stringified=!1,this.processed=!1;let _;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))_=v(b);else if(b instanceof k||b instanceof n)_=v(b.root),b.map&&(typeof E.map>"u"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=b.map);else{let R=s;E.syntax&&(R=E.syntax.parse),E.parser&&(R=E.parser),R.parse&&(R=R.parse);try{_=R(b,E)}catch(M){this.processed=!0,this.error=M}_&&!_[p]&&t.rebuild(_)}this.result=new n(y,_,E),this.helpers={...x,postcss:x,result:this.result},this.plugins=this.processor.plugins.map(R=>typeof R=="object"&&R.prepare?{...R,...R.prepare(this.result)}:R)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,b){let E=this.result.lastPlugin;try{b&&b.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=E.postcssPlugin,y.setMessage()):E.postcssVersion}catch(_){console&&console.error&&console.error(_)}return y}prepareVisitors(){this.listeners={};let y=(b,E,_)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([b,_])};for(let b of this.plugins)if(typeof b=="object")for(let E in b){if(!a[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!u[E])if(typeof b[E]=="object")for(let _ in b[E])_==="*"?y(b,E,b[E][_]):y(b,E+"-"+_.toLowerCase(),b[E][_]);else typeof b[E]=="function"&&y(b,E,b[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let b=this.plugins[y],E=this.runOnRoot(b);if(l(E))try{await E}catch(_){throw this.handleError(_)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];){y[d]=!0;let b=[g(y)];for(;b.length>0;){let E=this.visitTick(b);if(l(E))try{await E}catch(_){let R=b[b.length-1].node;throw this.handleError(_,R)}}}if(this.listeners.OnceExit)for(let[b,E]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(y.type==="document"){let _=y.nodes.map(R=>E(R,this.helpers));await Promise.all(_)}else await E(y,this.helpers)}catch(_){throw this.handleError(_)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(E=>y.Once(E,this.helpers));return l(b[0])?Promise.all(b):b}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,b=o;y.syntax&&(b=y.syntax.stringify),y.stringifier&&(b=y.stringifier),b.stringify&&(b=b.stringify);let _=new i(b,this.result.root,this.result.opts).generate();return this.result.css=_[0],this.result.map=_[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let y of this.plugins){let b=this.runOnRoot(y);if(l(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[d];)y[d]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let b of y.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,b){return this.async().then(y,b)}toString(){return this.css}visitSync(y,b){for(let[E,_]of y){this.result.lastPlugin=E;let R;try{R=_(b,this.helpers)}catch(M){throw this.handleError(M,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(l(R))throw this.getAsyncError()}}visitTick(y){let b=y[y.length-1],{node:E,visitors:_}=b;if(E.type!=="root"&&E.type!=="document"&&!E.parent){y.pop();return}if(_.length>0&&b.visitorIndex<_.length){let[M,I]=_[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===_.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=M;try{return I(E.toProxy(),this.helpers)}catch(F){throw this.handleError(F,E)}}if(b.iterator!==0){let M=b.iterator,I;for(;I=E.nodes[E.indexes[M]];)if(E.indexes[M]+=1,!I[d]){I[d]=!0,y.push(g(I));return}b.iterator=0,delete E.indexes[M]}let R=b.events;for(;b.eventIndex<R.length;){let M=R[b.eventIndex];if(b.eventIndex+=1,M===c){E.nodes&&E.nodes.length&&(E[d]=!0,b.iterator=E.getIterator());return}else if(this.listeners[M]){b.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[d]=!0;let b=f(y);for(let E of b)if(E===c)y.nodes&&y.each(_=>{_[d]||this.walkSync(_)});else{let _=this.listeners[E];if(_&&this.visitSync(_,y.toProxy()))return}}warnings(){return this.sync().warnings()}}return k.registerPostcss=w=>{x=w},fn=k,k.default=k,r.registerLazyResult(k),e.registerLazyResult(k),fn}var gn,Qs;function rc(){if(Qs)return gn;Qs=1;let t=Ir(),e=Wn();const i=Vn();let s=Ii();class n{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let o,d=e;try{o=d(this._css,this._opts)}catch(p){this.error=p}if(this.error)throw this.error;return this._root=o,o}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(o,d,p){d=d.toString(),this.stringified=!1,this._processor=o,this._css=d,this._opts=p,this._map=void 0;let h,a=s;this.result=new i(this._processor,h,this._opts),this.result.css=d;let u=this;Object.defineProperty(this.result,"root",{get(){return u.root}});let c=new t(a,h,this._opts,d);if(c.isMap()){let[l,f]=c.generate();l&&(this.result.css=l),f&&(this.result.map=f)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(o){return this.async().catch(o)}finally(o){return this.async().then(o,o)}sync(){if(this.error)throw this.error;return this.result}then(o,d){return this.async().then(o,d)}toString(){return this._css}warnings(){return[]}}return gn=n,n.default=n,gn}var mn,er;function oc(){if(er)return mn;er=1;let t=Fn(),e=Or(),i=rc(),s=Xt();class n{constructor(o=[]){this.version="8.5.6",this.plugins=this.normalize(o)}normalize(o){let d=[];for(let p of o)if(p.postcss===!0?p=p():p.postcss&&(p=p.postcss),typeof p=="object"&&Array.isArray(p.plugins))d=d.concat(p.plugins);else if(typeof p=="object"&&p.postcssPlugin)d.push(p);else if(typeof p=="function")d.push(p);else if(!(typeof p=="object"&&(p.parse||p.stringify)))throw new Error(p+" is not a PostCSS plugin");return d}process(o,d={}){return!this.plugins.length&&!d.parser&&!d.stringifier&&!d.syntax?new i(this,o,d):new e(this,o,d)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return mn=n,n.default=n,s.registerProcessor(n),t.registerProcessor(n),mn}var vn,tr;function ac(){if(tr)return vn;tr=1;var t={};let e=qn(),i=Oi(),s=vt(),n=zn(),r=Ti(),o=Fn(),d=ic(),p=$i(),h=Or(),a=Ar(),u=Ci(),c=Wn(),l=oc(),f=Vn(),g=Xt(),v=Hn(),x=Ii(),k=Cr();function w(...y){return y.length===1&&Array.isArray(y[0])&&(y=y[0]),new l(y)}return w.plugin=function(b,E){let _=!1;function R(...I){console&&console.warn&&!_&&(_=!0,console.warn(b+`: postcss.plugin was deprecated. Migration guide:
|
|
641
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),t.LANG&&t.LANG.startsWith("cn")&&console.warn(b+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
642
|
+
https://www.w3ctech.com/topic/2226`));let F=E(...I);return F.postcssPlugin=b,F.postcssVersion=new l().version,F}let M;return Object.defineProperty(R,"postcss",{get(){return M||(M=R()),M}}),R.process=function(I,F,U){return w([R(U)]).process(I,F)},R},w.stringify=x,w.parse=c,w.fromJSON=d,w.list=a,w.comment=y=>new i(y),w.atRule=y=>new e(y),w.decl=y=>new r(y),w.rule=y=>new v(y),w.root=y=>new g(y),w.document=y=>new o(y),w.CssSyntaxError=n,w.Declaration=r,w.Container=s,w.Processor=l,w.Document=o,w.Comment=i,w.Warning=k,w.AtRule=e,w.Result=f,w.Input=p,w.Rule=v,w.Root=g,w.Node=u,h.registerPostcss(w),vn=w,w.default=w,vn}var lc=ac();const Y=Er(lc);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;var bn,ir;function cc(){if(ir)return bn;ir=1;const t=(s={})=>{const n=s.prefix,r=/\s+$/.test(n)?n:`${n} `,o=s.ignoreFiles?[].concat(s.ignoreFiles):[],d=s.includeFiles?[].concat(s.includeFiles):[];return{postcssPlugin:"postcss-prefix-selector",prepare(p){const h=p.root,a=h.source.input.file;if(!(o.length&&a&&e(a,o))&&!(d.length&&a&&!e(a,d)))return{Rule(u,{result:c}){const l=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"];u.parent&&l.includes(u.parent.name)||(u.selectors=u.selectors.map(f=>s.exclude&&i(f,s.exclude)?f:s.transform?s.transform(n,f,r+f,h.source.input.file,u):[":root","body","html"].some(g=>f.startsWith(g))?s.skipGlobalSelectors?f:f.replace(/(html\s+body|:root\s+body|html|:root|body)/gm,n):r+f))}}}}};function e(s,n){return n.some(r=>r instanceof RegExp?r.test(s):s.includes(r))}function i(s,n){return n.some(r=>r instanceof RegExp?r.test(s):s===r)}return t.postcss=!0,bn=t,bn}var dc=cc();const uc=Er(dc),hc="code{white-space:pre}.example{display:flex;flex-wrap:wrap;flex-direction:row;align-items:center;gap:16px}.example>*{flex:1 1 500px}.example .tab-control{overflow:hidden}.example div[role=tab]{cursor:pointer;padding:8px 16px;display:inline-block;font-size:16px;border-bottom:2px solid transparent;background-clip:padding-box;-webkit-user-select:none;user-select:none}.example div[role=tab]:hover{background-color:#1467ba14}.example div[role=tab][selected]{background-color:#1467ba21;border-bottom:2px solid #1467ba}.tab-content{margin:16px 0}.tab-content>pre{padding-top:0}.tab-content.code{max-height:500px;overflow:auto}.tab-content.code pre{margin:0}",pc="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}";function fc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var yn,nr;function gc(){if(nr)return yn;nr=1;function t(m){return m instanceof Map?m.clear=m.delete=m.set=function(){throw new Error("map is read-only")}:m instanceof Set&&(m.add=m.clear=m.delete=function(){throw new Error("set is read-only")}),Object.freeze(m),Object.getOwnPropertyNames(m).forEach(S=>{const O=m[S],q=typeof O;(q==="object"||q==="function")&&!Object.isFrozen(O)&&t(O)}),m}class e{constructor(S){S.data===void 0&&(S.data={}),this.data=S.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(m){return m.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function s(m,...S){const O=Object.create(null);for(const q in m)O[q]=m[q];return S.forEach(function(q){for(const ne in q)O[ne]=q[ne]}),O}const n="</span>",r=m=>!!m.scope,o=(m,{prefix:S})=>{if(m.startsWith("language:"))return m.replace("language:","language-");if(m.includes(".")){const O=m.split(".");return[`${S}${O.shift()}`,...O.map((q,ne)=>`${q}${"_".repeat(ne+1)}`)].join(" ")}return`${S}${m}`};class d{constructor(S,O){this.buffer="",this.classPrefix=O.classPrefix,S.walk(this)}addText(S){this.buffer+=i(S)}openNode(S){if(!r(S))return;const O=o(S.scope,{prefix:this.classPrefix});this.span(O)}closeNode(S){r(S)&&(this.buffer+=n)}value(){return this.buffer}span(S){this.buffer+=`<span class="${S}">`}}const p=(m={})=>{const S={children:[]};return Object.assign(S,m),S};class h{constructor(){this.rootNode=p(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(S){this.top.children.push(S)}openNode(S){const O=p({scope:S});this.add(O),this.stack.push(O)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(S){return this.constructor._walk(S,this.rootNode)}static _walk(S,O){return typeof O=="string"?S.addText(O):O.children&&(S.openNode(O),O.children.forEach(q=>this._walk(S,q)),S.closeNode(O)),S}static _collapse(S){typeof S!="string"&&S.children&&(S.children.every(O=>typeof O=="string")?S.children=[S.children.join("")]:S.children.forEach(O=>{h._collapse(O)}))}}class a extends h{constructor(S){super(),this.options=S}addText(S){S!==""&&this.add(S)}startScope(S){this.openNode(S)}endScope(){this.closeNode()}__addSublanguage(S,O){const q=S.root;O&&(q.scope=`language:${O}`),this.add(q)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function u(m){return m?typeof m=="string"?m:m.source:null}function c(m){return g("(?=",m,")")}function l(m){return g("(?:",m,")*")}function f(m){return g("(?:",m,")?")}function g(...m){return m.map(S=>u(S)).join("")}function v(m){const S=m[m.length-1];return typeof S=="object"&&S.constructor===Object?(m.splice(m.length-1,1),S):{}}function x(...m){return"("+(v(m).capture?"":"?:")+m.map(S=>u(S)).join("|")+")"}function k(m){return new RegExp(m.toString()+"|").exec("").length-1}function w(m,S){const O=m&&m.exec(S);return O&&O.index===0}const y=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function b(m,{joinWith:S}){let O=0;return m.map(q=>{O+=1;const ne=O;let se=u(q),P="";for(;se.length>0;){const L=y.exec(se);if(!L){P+=se;break}P+=se.substring(0,L.index),se=se.substring(L.index+L[0].length),L[0][0]==="\\"&&L[1]?P+="\\"+String(Number(L[1])+ne):(P+=L[0],L[0]==="("&&O++)}return P}).map(q=>`(${q})`).join(S)}const E=/\b\B/,_="[a-zA-Z]\\w*",R="[a-zA-Z_]\\w*",M="\\b\\d+(\\.\\d+)?",I="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",F="\\b(0b[01]+)",U="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Q=(m={})=>{const S=/^#![ ]*\//;return m.binary&&(m.begin=g(S,/.*\b/,m.binary,/\b.*/)),s({scope:"meta",begin:S,end:/$/,relevance:0,"on:begin":(O,q)=>{O.index!==0&&q.ignoreMatch()}},m)},re={begin:"\\\\[\\s\\S]",relevance:0},T={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[re]},oe={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[re]},H={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},X=function(m,S,O={}){const q=s({scope:"comment",begin:m,end:S,contains:[]},O);q.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const ne=x("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return q.contains.push({begin:g(/[ ]+/,"(",ne,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),q},te=X("//","$"),le=X("/\\*","\\*/"),Se=X("#","$"),we={scope:"number",begin:M,relevance:0},j={scope:"number",begin:I,relevance:0},_e={scope:"number",begin:F,relevance:0},me={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[re,{begin:/\[/,end:/\]/,relevance:0,contains:[re]}]},We={scope:"title",begin:_,relevance:0},Me={scope:"title",begin:R,relevance:0},Re={begin:"\\.\\s*"+R,relevance:0};var De=Object.freeze({__proto__:null,APOS_STRING_MODE:T,BACKSLASH_ESCAPE:re,BINARY_NUMBER_MODE:_e,BINARY_NUMBER_RE:F,COMMENT:X,C_BLOCK_COMMENT_MODE:le,C_LINE_COMMENT_MODE:te,C_NUMBER_MODE:j,C_NUMBER_RE:I,END_SAME_AS_BEGIN:function(m){return Object.assign(m,{"on:begin":(S,O)=>{O.data._beginMatch=S[1]},"on:end":(S,O)=>{O.data._beginMatch!==S[1]&&O.ignoreMatch()}})},HASH_COMMENT_MODE:Se,IDENT_RE:_,MATCH_NOTHING_RE:E,METHOD_GUARD:Re,NUMBER_MODE:we,NUMBER_RE:M,PHRASAL_WORDS_MODE:H,QUOTE_STRING_MODE:oe,REGEXP_MODE:me,RE_STARTERS_RE:U,SHEBANG:Q,TITLE_MODE:We,UNDERSCORE_IDENT_RE:R,UNDERSCORE_TITLE_MODE:Me});function Ot(m,S){m.input[m.index-1]==="."&&S.ignoreMatch()}function Ae(m,S){m.className!==void 0&&(m.scope=m.className,delete m.className)}function rt(m,S){S&&m.beginKeywords&&(m.begin="\\b("+m.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",m.__beforeBegin=Ot,m.keywords=m.keywords||m.beginKeywords,delete m.beginKeywords,m.relevance===void 0&&(m.relevance=0))}function ot(m,S){Array.isArray(m.illegal)&&(m.illegal=x(...m.illegal))}function Li(m,S){if(m.match){if(m.begin||m.end)throw new Error("begin & end are not supported with match");m.begin=m.match,delete m.match}}function Pi(m,S){m.relevance===void 0&&(m.relevance=1)}const Yt=(m,S)=>{if(!m.beforeMatch)return;if(m.starts)throw new Error("beforeMatch cannot be used with starts");const O=Object.assign({},m);Object.keys(m).forEach(q=>{delete m[q]}),m.keywords=O.keywords,m.begin=g(O.beforeMatch,c(O.begin)),m.starts={relevance:0,contains:[Object.assign(O,{endsParent:!0})]},m.relevance=0,delete O.beforeMatch},Qt=["of","and","for","in","not","or","if","then","parent","list","value"],Mi="keyword";function ei(m,S,O=Mi){const q=Object.create(null);return typeof m=="string"?ne(O,m.split(" ")):Array.isArray(m)?ne(O,m):Object.keys(m).forEach(function(se){Object.assign(q,ei(m[se],S,se))}),q;function ne(se,P){S&&(P=P.map(L=>L.toLowerCase())),P.forEach(function(L){const B=L.split("|");q[B[0]]=[se,Ve(B[0],B[1])]})}}function Ve(m,S){return S?Number(S):bt(m)?0:1}function bt(m){return Qt.includes(m.toLowerCase())}const Tt={},Ne=m=>{console.error(m)},yt=(m,...S)=>{console.log(`WARN: ${m}`,...S)},Ge=(m,S)=>{Tt[`${m}/${S}`]||(console.log(`Deprecated as of ${m}. ${S}`),Tt[`${m}/${S}`]=!0)},at=new Error;function $t(m,S,{key:O}){let q=0;const ne=m[O],se={},P={};for(let L=1;L<=S.length;L++)P[L+q]=ne[L],se[L+q]=!0,q+=k(S[L-1]);m[O]=P,m[O]._emit=se,m[O]._multi=!0}function ti(m){if(Array.isArray(m.begin)){if(m.skip||m.excludeBegin||m.returnBegin)throw Ne("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),at;if(typeof m.beginScope!="object"||m.beginScope===null)throw Ne("beginScope must be object"),at;$t(m,m.begin,{key:"beginScope"}),m.begin=b(m.begin,{joinWith:""})}}function jr(m){if(Array.isArray(m.end)){if(m.skip||m.excludeEnd||m.returnEnd)throw Ne("skip, excludeEnd, returnEnd not compatible with endScope: {}"),at;if(typeof m.endScope!="object"||m.endScope===null)throw Ne("endScope must be object"),at;$t(m,m.end,{key:"endScope"}),m.end=b(m.end,{joinWith:""})}}function Br(m){m.scope&&typeof m.scope=="object"&&m.scope!==null&&(m.beginScope=m.scope,delete m.scope)}function zr(m){Br(m),typeof m.beginScope=="string"&&(m.beginScope={_wrap:m.beginScope}),typeof m.endScope=="string"&&(m.endScope={_wrap:m.endScope}),ti(m),jr(m)}function Ur(m){function S(P,L){return new RegExp(u(P),"m"+(m.case_insensitive?"i":"")+(m.unicodeRegex?"u":"")+(L?"g":""))}class O{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(L,B){B.position=this.position++,this.matchIndexes[this.matchAt]=B,this.regexes.push([B,L]),this.matchAt+=k(L)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const L=this.regexes.map(B=>B[1]);this.matcherRe=S(b(L,{joinWith:"|"}),!0),this.lastIndex=0}exec(L){this.matcherRe.lastIndex=this.lastIndex;const B=this.matcherRe.exec(L);if(!B)return null;const ue=B.findIndex((Rt,Ni)=>Ni>0&&Rt!==void 0),ae=this.matchIndexes[ue];return B.splice(0,ue),Object.assign(B,ae)}}class q{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(L){if(this.multiRegexes[L])return this.multiRegexes[L];const B=new O;return this.rules.slice(L).forEach(([ue,ae])=>B.addRule(ue,ae)),B.compile(),this.multiRegexes[L]=B,B}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(L,B){this.rules.push([L,B]),B.type==="begin"&&this.count++}exec(L){const B=this.getMatcher(this.regexIndex);B.lastIndex=this.lastIndex;let ue=B.exec(L);if(this.resumingScanAtSamePosition()&&!(ue&&ue.index===this.lastIndex)){const ae=this.getMatcher(0);ae.lastIndex=this.lastIndex+1,ue=ae.exec(L)}return ue&&(this.regexIndex+=ue.position+1,this.regexIndex===this.count&&this.considerAll()),ue}}function ne(P){const L=new q;return P.contains.forEach(B=>L.addRule(B.begin,{rule:B,type:"begin"})),P.terminatorEnd&&L.addRule(P.terminatorEnd,{type:"end"}),P.illegal&&L.addRule(P.illegal,{type:"illegal"}),L}function se(P,L){const B=P;if(P.isCompiled)return B;[Ae,Li,zr,Yt].forEach(ae=>ae(P,L)),m.compilerExtensions.forEach(ae=>ae(P,L)),P.__beforeBegin=null,[rt,ot,Pi].forEach(ae=>ae(P,L)),P.isCompiled=!0;let ue=null;return typeof P.keywords=="object"&&P.keywords.$pattern&&(P.keywords=Object.assign({},P.keywords),ue=P.keywords.$pattern,delete P.keywords.$pattern),ue=ue||/\w+/,P.keywords&&(P.keywords=ei(P.keywords,m.case_insensitive)),B.keywordPatternRe=S(ue,!0),L&&(P.begin||(P.begin=/\B|\b/),B.beginRe=S(B.begin),!P.end&&!P.endsWithParent&&(P.end=/\B|\b/),P.end&&(B.endRe=S(B.end)),B.terminatorEnd=u(B.end)||"",P.endsWithParent&&L.terminatorEnd&&(B.terminatorEnd+=(P.end?"|":"")+L.terminatorEnd)),P.illegal&&(B.illegalRe=S(P.illegal)),P.contains||(P.contains=[]),P.contains=[].concat(...P.contains.map(function(ae){return qr(ae==="self"?P:ae)})),P.contains.forEach(function(ae){se(ae,B)}),P.starts&&se(P.starts,L),B.matcher=ne(B),B}if(m.compilerExtensions||(m.compilerExtensions=[]),m.contains&&m.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return m.classNameAliases=s(m.classNameAliases||{}),se(m)}function Gn(m){return m?m.endsWithParent||Gn(m.starts):!1}function qr(m){return m.variants&&!m.cachedVariants&&(m.cachedVariants=m.variants.map(function(S){return s(m,{variants:null},S)})),m.cachedVariants?m.cachedVariants:Gn(m)?s(m,{starts:m.starts?s(m.starts):null}):Object.isFrozen(m)?s(m):m}var Fr="11.11.1";class Hr extends Error{constructor(S,O){super(S),this.name="HTMLInjectionError",this.html=O}}const Di=i,Kn=s,Zn=Symbol("nomatch"),Wr=7,Jn=function(m){const S=Object.create(null),O=Object.create(null),q=[];let ne=!0;const se="Could not find the language '{}', did you forget to load/include a language module?",P={disableAutodetect:!0,name:"Plain text",contains:[]};let L={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:a};function B(A){return L.noHighlightRe.test(A)}function ue(A){let N=A.className+" ";N+=A.parentNode?A.parentNode.className:"";const V=L.languageDetectRe.exec(N);if(V){const Z=Ye(V[1]);return Z||(yt(se.replace("{}",V[1])),yt("Falling back to no-highlight mode for this block.",A)),Z?V[1]:"no-highlight"}return N.split(/\s+/).find(Z=>B(Z)||Ye(Z))}function ae(A,N,V){let Z="",ce="";typeof N=="object"?(Z=A,V=N.ignoreIllegals,ce=N.language):(Ge("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ge("10.7.0",`Please use highlight(code, options) instead.
|
|
643
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),ce=A,Z=N),V===void 0&&(V=!0);const je={code:Z,language:ce};ni("before:highlight",je);const Qe=je.result?je.result:Rt(je.language,je.code,V);return Qe.code=je.code,ni("after:highlight",Qe),Qe}function Rt(A,N,V,Z){const ce=Object.create(null);function je(C,D){return C.keywords[D]}function Qe(){if(!z.keywords){he.addText(J);return}let C=0;z.keywordPatternRe.lastIndex=0;let D=z.keywordPatternRe.exec(J),W="";for(;D;){W+=J.substring(C,D.index);const G=ze.case_insensitive?D[0].toLowerCase():D[0],pe=je(z,G);if(pe){const[Ke,lo]=pe;if(he.addText(W),W="",ce[G]=(ce[G]||0)+1,ce[G]<=Wr&&(oi+=lo),Ke.startsWith("_"))W+=D[0];else{const co=ze.classNameAliases[Ke]||Ke;Be(D[0],co)}}else W+=D[0];C=z.keywordPatternRe.lastIndex,D=z.keywordPatternRe.exec(J)}W+=J.substring(C),he.addText(W)}function si(){if(J==="")return;let C=null;if(typeof z.subLanguage=="string"){if(!S[z.subLanguage]){he.addText(J);return}C=Rt(z.subLanguage,J,!0,ss[z.subLanguage]),ss[z.subLanguage]=C._top}else C=ji(J,z.subLanguage.length?z.subLanguage:null);z.relevance>0&&(oi+=C.relevance),he.__addSublanguage(C._emitter,C.language)}function xe(){z.subLanguage!=null?si():Qe(),J=""}function Be(C,D){C!==""&&(he.startScope(D),he.addText(C),he.endScope())}function es(C,D){let W=1;const G=D.length-1;for(;W<=G;){if(!C._emit[W]){W++;continue}const pe=ze.classNameAliases[C[W]]||C[W],Ke=D[W];pe?Be(Ke,pe):(J=Ke,Qe(),J=""),W++}}function ts(C,D){return C.scope&&typeof C.scope=="string"&&he.openNode(ze.classNameAliases[C.scope]||C.scope),C.beginScope&&(C.beginScope._wrap?(Be(J,ze.classNameAliases[C.beginScope._wrap]||C.beginScope._wrap),J=""):C.beginScope._multi&&(es(C.beginScope,D),J="")),z=Object.create(C,{parent:{value:z}}),z}function is(C,D,W){let G=w(C.endRe,W);if(G){if(C["on:end"]){const pe=new e(C);C["on:end"](D,pe),pe.isMatchIgnored&&(G=!1)}if(G){for(;C.endsParent&&C.parent;)C=C.parent;return C}}if(C.endsWithParent)return is(C.parent,D,W)}function no(C){return z.matcher.regexIndex===0?(J+=C[0],1):(qi=!0,0)}function so(C){const D=C[0],W=C.rule,G=new e(W),pe=[W.__beforeBegin,W["on:begin"]];for(const Ke of pe)if(Ke&&(Ke(C,G),G.isMatchIgnored))return no(D);return W.skip?J+=D:(W.excludeBegin&&(J+=D),xe(),!W.returnBegin&&!W.excludeBegin&&(J=D)),ts(W,C),W.returnBegin?0:D.length}function ro(C){const D=C[0],W=N.substring(C.index),G=is(z,C,W);if(!G)return Zn;const pe=z;z.endScope&&z.endScope._wrap?(xe(),Be(D,z.endScope._wrap)):z.endScope&&z.endScope._multi?(xe(),es(z.endScope,C)):pe.skip?J+=D:(pe.returnEnd||pe.excludeEnd||(J+=D),xe(),pe.excludeEnd&&(J=D));do z.scope&&he.closeNode(),!z.skip&&!z.subLanguage&&(oi+=z.relevance),z=z.parent;while(z!==G.parent);return G.starts&&ts(G.starts,C),pe.returnEnd?0:D.length}function oo(){const C=[];for(let D=z;D!==ze;D=D.parent)D.scope&&C.unshift(D.scope);C.forEach(D=>he.openNode(D))}let ri={};function ns(C,D){const W=D&&D[0];if(J+=C,W==null)return xe(),0;if(ri.type==="begin"&&D.type==="end"&&ri.index===D.index&&W===""){if(J+=N.slice(D.index,D.index+1),!ne){const G=new Error(`0 width match regex (${A})`);throw G.languageName=A,G.badRule=ri.rule,G}return 1}if(ri=D,D.type==="begin")return so(D);if(D.type==="illegal"&&!V){const G=new Error('Illegal lexeme "'+W+'" for mode "'+(z.scope||"<unnamed>")+'"');throw G.mode=z,G}else if(D.type==="end"){const G=ro(D);if(G!==Zn)return G}if(D.type==="illegal"&&W==="")return J+=`
|
|
644
|
+
`,1;if(Ui>1e5&&Ui>D.index*3)throw new Error("potential infinite loop, way more iterations than matches");return J+=W,W.length}const ze=Ye(A);if(!ze)throw Ne(se.replace("{}",A)),new Error('Unknown language: "'+A+'"');const ao=Ur(ze);let zi="",z=Z||ao;const ss={},he=new L.__emitter(L);oo();let J="",oi=0,lt=0,Ui=0,qi=!1;try{if(ze.__emitTokens)ze.__emitTokens(N,he);else{for(z.matcher.considerAll();;){Ui++,qi?qi=!1:z.matcher.considerAll(),z.matcher.lastIndex=lt;const C=z.matcher.exec(N);if(!C)break;const D=N.substring(lt,C.index),W=ns(D,C);lt=C.index+W}ns(N.substring(lt))}return he.finalize(),zi=he.toHTML(),{language:A,value:zi,relevance:oi,illegal:!1,_emitter:he,_top:z}}catch(C){if(C.message&&C.message.includes("Illegal"))return{language:A,value:Di(N),illegal:!0,relevance:0,_illegalBy:{message:C.message,index:lt,context:N.slice(lt-100,lt+100),mode:C.mode,resultSoFar:zi},_emitter:he};if(ne)return{language:A,value:Di(N),illegal:!1,relevance:0,errorRaised:C,_emitter:he,_top:z};throw C}}function Ni(A){const N={value:Di(A),illegal:!1,relevance:0,_top:P,_emitter:new L.__emitter(L)};return N._emitter.addText(A),N}function ji(A,N){N=N||L.languages||Object.keys(S);const V=Ni(A),Z=N.filter(Ye).filter(Qn).map(xe=>Rt(xe,A,!1));Z.unshift(V);const ce=Z.sort((xe,Be)=>{if(xe.relevance!==Be.relevance)return Be.relevance-xe.relevance;if(xe.language&&Be.language){if(Ye(xe.language).supersetOf===Be.language)return 1;if(Ye(Be.language).supersetOf===xe.language)return-1}return 0}),[je,Qe]=ce,si=je;return si.secondBest=Qe,si}function Vr(A,N,V){const Z=N&&O[N]||V;A.classList.add("hljs"),A.classList.add(`language-${Z}`)}function Bi(A){let N=null;const V=ue(A);if(B(V))return;if(ni("before:highlightElement",{el:A,language:V}),A.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",A);return}if(A.children.length>0&&(L.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(A)),L.throwUnescapedHTML))throw new Hr("One of your code blocks includes unescaped HTML.",A.innerHTML);N=A;const Z=N.textContent,ce=V?ae(Z,{language:V,ignoreIllegals:!0}):ji(Z);A.innerHTML=ce.value,A.dataset.highlighted="yes",Vr(A,V,ce.language),A.result={language:ce.language,re:ce.relevance,relevance:ce.relevance},ce.secondBest&&(A.secondBest={language:ce.secondBest.language,relevance:ce.secondBest.relevance}),ni("after:highlightElement",{el:A,result:ce,text:Z})}function Gr(A){L=Kn(L,A)}const Kr=()=>{ii(),Ge("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Zr(){ii(),Ge("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Xn=!1;function ii(){function A(){ii()}if(document.readyState==="loading"){Xn||window.addEventListener("DOMContentLoaded",A,!1),Xn=!0;return}document.querySelectorAll(L.cssSelector).forEach(Bi)}function Jr(A,N){let V=null;try{V=N(m)}catch(Z){if(Ne("Language definition for '{}' could not be registered.".replace("{}",A)),ne)Ne(Z);else throw Z;V=P}V.name||(V.name=A),S[A]=V,V.rawDefinition=N.bind(null,m),V.aliases&&Yn(V.aliases,{languageName:A})}function Xr(A){delete S[A];for(const N of Object.keys(O))O[N]===A&&delete O[N]}function Yr(){return Object.keys(S)}function Ye(A){return A=(A||"").toLowerCase(),S[A]||S[O[A]]}function Yn(A,{languageName:N}){typeof A=="string"&&(A=[A]),A.forEach(V=>{O[V.toLowerCase()]=N})}function Qn(A){const N=Ye(A);return N&&!N.disableAutodetect}function Qr(A){A["before:highlightBlock"]&&!A["before:highlightElement"]&&(A["before:highlightElement"]=N=>{A["before:highlightBlock"](Object.assign({block:N.el},N))}),A["after:highlightBlock"]&&!A["after:highlightElement"]&&(A["after:highlightElement"]=N=>{A["after:highlightBlock"](Object.assign({block:N.el},N))})}function eo(A){Qr(A),q.push(A)}function to(A){const N=q.indexOf(A);N!==-1&&q.splice(N,1)}function ni(A,N){const V=A;q.forEach(function(Z){Z[V]&&Z[V](N)})}function io(A){return Ge("10.7.0","highlightBlock will be removed entirely in v12.0"),Ge("10.7.0","Please use highlightElement now."),Bi(A)}Object.assign(m,{highlight:ae,highlightAuto:ji,highlightAll:ii,highlightElement:Bi,highlightBlock:io,configure:Gr,initHighlighting:Kr,initHighlightingOnLoad:Zr,registerLanguage:Jr,unregisterLanguage:Xr,listLanguages:Yr,getLanguage:Ye,registerAliases:Yn,autoDetection:Qn,inherit:Kn,addPlugin:eo,removePlugin:to}),m.debugMode=function(){ne=!1},m.safeMode=function(){ne=!0},m.versionString=Fr,m.regex={concat:g,lookahead:c,either:x,optional:f,anyNumberOfTimes:l};for(const A in De)typeof De[A]=="object"&&t(De[A]);return Object.assign(m,De),m},wt=Jn({});return wt.newInstance=()=>Jn({}),yn=wt,wt.HighlightJS=wt,wt.default=wt,yn}var mc=gc();const Ri=fc(mc),xi="[A-Za-z$_][0-9A-Za-z$_]*",Tr=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],$r=["true","false","null","undefined","NaN","Infinity"],Rr=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Lr=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Pr=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Mr=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Dr=[].concat(Pr,Rr,Lr);function vc(t){const e=t.regex,i=(H,{after:X})=>{const te="</"+H[0].slice(1);return H.input.indexOf(te,X)!==-1},s=xi,n={begin:"<>",end:"</>"},r=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(H,X)=>{const te=H[0].length+H.index,le=H.input[te];if(le==="<"||le===","){X.ignoreMatch();return}le===">"&&(i(H,{after:te})||X.ignoreMatch());let Se;const we=H.input.substring(te);if(Se=we.match(/^\s*=/)){X.ignoreMatch();return}if((Se=we.match(/^\s+extends\s+/))&&Se.index===0){X.ignoreMatch();return}}},d={$pattern:xi,keyword:Tr,literal:$r,built_in:Dr,"variable.language":Mr},p="[0-9](_?[0-9])*",h=`\\.(${p})`,a="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",u={className:"number",variants:[{begin:`(\\b(${a})((${h})|\\.)?|(${h}))[eE][+-]?(${p})\\b`},{begin:`\\b(${a})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},c={className:"subst",begin:"\\$\\{",end:"\\}",keywords:d,contains:[]},l={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,c],subLanguage:"xml"}},f={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,c],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,c],subLanguage:"graphql"}},v={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,c]},x={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},k=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,l,f,g,v,{match:/\$\d+/},u];c.contains=k.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(k)});const w=[].concat(x,c.contains),y=w.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(w)}]),b={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:y},E={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,e.concat(s,"(",e.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},_={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Rr,...Lr]}},R={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},M={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[b],illegal:/%/},I={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function F(H){return e.concat("(?!",H.join("|"),")")}const U={match:e.concat(/\b/,F([...Pr,"super","import"].map(H=>`${H}\\s*\\(`)),s,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},Q={begin:e.concat(/\./,e.lookahead(e.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},re={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},b]},T="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",oe={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(T)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[b]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:_},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),R,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,l,f,g,v,x,{match:/\$\d+/},u,_,{scope:"attr",match:s+e.lookahead(":"),relevance:0},oe,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[x,t.REGEXP_MODE,{className:"function",begin:T,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:y}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:n.begin,end:n.end},{match:r},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},M,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[b,t.inherit(t.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},Q,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[b]},U,I,E,re,{match:/\$[(.]/}]}}function bc(t){const e=t.regex,i=vc(t),s=xi,n=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],r={begin:[/namespace/,/\s+/,t.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:n},contains:[i.exports.CLASS_REFERENCE]},d={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},p=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:xi,keyword:Tr.concat(p),literal:$r,built_in:Dr.concat(n),"variable.language":Mr},a={className:"meta",begin:"@"+s},u=(g,v,x)=>{const k=g.contains.findIndex(w=>w.label===v);if(k===-1)throw new Error("can not find mode to replace");g.contains.splice(k,1,x)};Object.assign(i.keywords,h),i.exports.PARAMS_CONTAINS.push(a);const c=i.contains.find(g=>g.scope==="attr"),l=Object.assign({},c,{match:e.concat(s,e.lookahead(/\s*\?:/))});i.exports.PARAMS_CONTAINS.push([i.exports.CLASS_REFERENCE,c,l]),i.contains=i.contains.concat([a,r,o,l]),u(i,"shebang",t.SHEBANG()),u(i,"use_strict",d);const f=i.contains.find(g=>g.label==="func.def");return f.relevance=0,Object.assign(i,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),i}function yc(t){const e=t.regex,i=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,n={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=t.inherit(r,{begin:/\(/,end:/\)/}),d=t.inherit(t.APOS_STRING_MODE,{className:"string"}),p=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),h={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:s,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[n]},{begin:/'/,end:/'/,contains:[n]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[r,p,d,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[r,o,p,d]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},n,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[p]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[h],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[h],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(/</,e.lookahead(e.concat(i,e.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:i,relevance:0,starts:h}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(i,/>/))),contains:[{className:"name",begin:i,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}const wc=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),xc=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],kc=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Ec=[...xc,...kc],Sc=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),_c=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Ac=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Ic=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Cc(t){const e=t.regex,i=wc(t),s={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n="and or not only",r=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",d=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[i.BLOCK_COMMENT,s,i.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},i.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+_c.join("|")+")"},{begin:":(:)?("+Ac.join("|")+")"}]},i.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Ic.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[i.BLOCK_COMMENT,i.HEXCOLOR,i.IMPORTANT,i.CSS_NUMBER_MODE,...d,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...d,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},i.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:r},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:n,attribute:Sc.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...d,i.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Ec.join("|")+")\\b"}]}}const Nr=document.createElement("style");Nr.innerText=[hc,pc].join(`
|
|
645
|
+
`);document.head.appendChild(Nr);Ri.registerLanguage("typescript",bc);Ri.registerLanguage("html",yc);Ri.registerLanguage("css",Cc);function Oc(...t){const e=document.createElement("div"),i=document.createElement("div");i.classList.add("tab-control");const s=document.createElement("div");return t.forEach(n=>{e.appendChild(n),n.addEventListener("click",()=>{t.forEach(r=>r.removeAttribute("selected")),n.setAttribute("selected",""),s.innerHTML="",s.appendChild(n.content),s.className=n.className,s.classList.add("tab-content")})}),i.appendChild(e),i.appendChild(s),s.classList.add("tab-content"),t[0].setAttribute("selected",""),s.appendChild(t[0].content),i}function Mt(t,e){const i=document.createElement("div");return i.role="tab",i.tabIndex=0,i.innerText=t,i.content=e,e.tagName=="PRE"&&i.classList.add("code"),i}function Bt(t,e){const i=document.createElement(t);return typeof e=="string"?i.innerHTML=e:e.forEach(s=>{i.appendChild(s)}),i}async function Tc(t,e,i){const s=e.mainContent,n=Bt("div",s);n.id=`example-preview-${i}`;const r=typeof e.css=="string"?void 0:e.css?.label,o=typeof e.css=="string"?e.css:e.css?.content,d=Oc(Mt("Preview",n),Mt("HTML",ui("html",s)),...o?[Mt(r??"CSS",ui("css",o))]:[],...e.initializer&&e.initializer.content?[Mt(e.initializer.label??"TS",ui("typescript",e.initializer.content))]:[],...(e.additionalSources||[]).map(h=>Mt(h.label,ui(h.language,h.content))));e.description&&t.appendChild(Bt("div",e.description));const p=Bt("div",[d]);p.classList.add("example"),t.appendChild(p),o&&$c(`#${n.id}`,o),e.initializer?.initialize&&await e.initializer.initialize(n)}function ui(t,e){let i=e.split(/\r?\n/).map(s=>{const n=s.indexOf("///");if(n>-1){const r=s.substring(n+3).trimStart();return r?s.replace(/^(\s*)([^\s].*)$/,`$1${r}`):void 0}return s}).filter(s=>typeof s<"u").join(`
|
|
646
|
+
`).trim();return t&&t!="raw"&&(i=Ri.highlight(i,{language:t}).value),Bt("pre",[Bt("code",i)])}function $c(t,e){const i=document.createElement("style");i.innerHTML=Y().use(uc({prefix:t})).process(e).css,document.head.appendChild(i)}async function Rc(t,e=document.body){const i=Pc(e);let s=0;Object.keys(t).sort().forEach(async n=>{const r=document.createElement("div");r.className="example-container",i.appendChild(r);const o=t[n].default;Tc(r,o,s++)})}function Lc(t){const e=document.createElement("div");e.id="examples-container";const i=t.querySelector("#examples");return i?i.after(e):t.appendChild(e),e}function Pc(t){return t.children?Lc(t):t}const Mc=`<h1 id="@cas-smartdesign/token-selector">@cas-smartdesign/token-selector</h1>
|
|
643
647
|
<p>A token-selector element based on <a href="https://github.com/Polymer/lit-element">lit-element</a> with SmartDesign look & feel.</p>
|
|
644
648
|
<p><em><code>Note: This is a preview version of the sd-token-selector element. Some features like for example declarative support for the element is not fully supported and guaranteed.</code></em></p>
|
|
645
649
|
<h2 id="attributes---token-selector">Attributes - Token-Selector</h2>
|
|
@@ -748,7 +752,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),B=u,I=b),k===void 0&&(
|
|
|
748
752
|
</li>
|
|
749
753
|
</ul>
|
|
750
754
|
<p>In addition it allows to inject elements with slot named <code>additional-content</code> that is shown right after the tokens part.</p>
|
|
751
|
-
<h2 id="attributes/properties---delegated-to-the-internal
|
|
755
|
+
<h2 id="attributes/properties---delegated-to-the-internal-\`sd-lit-input\`">Attributes/properties - delegated to the internal \`sd-lit-input\`</h2>
|
|
752
756
|
<ul>
|
|
753
757
|
<li><code>placeholder</code> : <strong>string (default = null)</strong></li>
|
|
754
758
|
<li><code>inputLabel</code> : <strong>string (default = null)</strong></li>
|
|
@@ -813,7 +817,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),B=u,I=b),k===void 0&&(
|
|
|
813
817
|
</li>
|
|
814
818
|
</ul>
|
|
815
819
|
<p>In addition it allows to inject elements with slots named <code>before-icon</code> & <code>after-icon</code>.</p>
|
|
816
|
-
<h2 id="css-custom-properties
|
|
820
|
+
<h2 id="css-custom-properties-&-parts">CSS Custom Properties & parts</h2>
|
|
817
821
|
<ul>
|
|
818
822
|
<li><code>--sd-token-background-color</code><ul>
|
|
819
823
|
<li>Defines the background color of the token.</li>
|
|
@@ -868,10 +872,4 @@ https://github.com/highlightjs/highlight.js/issues/2277`),B=u,I=b),k===void 0&&(
|
|
|
868
872
|
</ul>
|
|
869
873
|
</li>
|
|
870
874
|
</ul>
|
|
871
|
-
`,
|
|
872
|
-
function __vite__mapDeps(indexes) {
|
|
873
|
-
if (!__vite__mapDeps.viteFileDeps) {
|
|
874
|
-
__vite__mapDeps.viteFileDeps = ["./1_remove_only.js","./token-provider.mjs","./2_multi_select.js","./button.mjs","./3_editable_input_attributes.js","./4_dnd.js","./5_other.js"]
|
|
875
|
-
}
|
|
876
|
-
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
877
|
-
}
|
|
875
|
+
`,Dc=document.querySelector("#markdown-container");Dc.innerHTML=Mc;Rc(Object.assign({"./examples/1_remove_only/index.ts":vo,"./examples/2_multi_select/index.ts":ko,"./examples/3_editable_input_attributes/index.ts":Io,"./examples/4_dnd/index.ts":Ro,"./examples/5_other/index.ts":Bo}),document.querySelector(".markdown-body"));export{Hc as T,bi as a,Wl as g};
|