@cas-smartdesign/token-selector 0.21.4 → 1.0.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 +111 -111
- package/dist/docs/token-provider.mjs +1 -1
- package/dist/token-selector-with-externals.js +57 -83
- package/dist/token-selector-with-externals.js.map +4 -4
- package/dist/token-selector.mjs +118 -119
- 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 vo="modulepreload",bo=function(t,e){return new URL(t,e).href},cs={},Gt=function(e,i,s){let n=Promise.resolve();if(i&&i.length>0){let h=function(a){return Promise.all(a.map(d=>Promise.resolve(d).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};const o=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),p=u?.nonce||u?.getAttribute("nonce");n=h(i.map(a=>{if(a=bo(a,s),a in cs)return;cs[a]=!0;const d=a.endsWith(".css"),c=d?'[rel="stylesheet"]':"";if(!!s)for(let g=o.length-1;g>=0;g--){const v=o[g];if(v.href===a&&(!d||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${c}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":vo,d||(f.as="script"),f.crossOrigin="",f.href=a,p&&f.setAttribute("nonce",p),document.head.appendChild(f),d)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 u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=o,window.dispatchEvent(u),!u.defaultPrevented)throw o}return n.then(o=>{for(const u of o||[])u.status==="rejected"&&r(u.reason);return e().catch(r)})},yo=`<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
|
+
`,wo=`<h3 id="remove-only-token-viewer">Remove only token viewer</h3>
|
|
19
|
+
`,Kt=`.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
|
+
`,xo=`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
|
+
`,An=`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
|
+
`,ko={mainContent:yo,description:wo,css:Kt,initializer:{content:xo,type:"typescript",initialize:()=>Gt(()=>import("./1_remove_only.js"),__vite__mapDeps([0,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:An}]},Eo=Object.freeze(Object.defineProperty({__proto__:null,default:ko},Symbol.toStringTag,{value:"Module"})),_o=`<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
|
+
`,So=`<h3 id="editable-token-selector">Editable token selector</h3>
|
|
123
|
+
`,Ao=`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
|
+
`,Io={mainContent:_o,description:So,css:Kt,initializer:{content:Ao,type:"typescript",initialize:()=>Gt(()=>import("./2_multi_select.js"),__vite__mapDeps([2,3,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:An}]},Co=Object.freeze(Object.defineProperty({__proto__:null,default:Io},Symbol.toStringTag,{value:"Module"})),Oo=`<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
|
+
`,To=`<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
|
+
`,Ro={mainContent:Oo,description:To,css:Kt,initializer:{content:$o,type:"typescript",initialize:()=>Gt(()=>import("./3_editable_input_attributes.js"),__vite__mapDeps([4,3,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:An}]},Lo=Object.freeze(Object.defineProperty({__proto__:null,default:Ro},Symbol.toStringTag,{value:"Module"})),Po=`<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>
|
|
@@ -210,8 +211,8 @@ document.querySelectorAll("#editable-input-attributes-example sd-token-selector"
|
|
|
210
211
|
><sd-button icon="edit.svg" slot="additional-content"></sd-button
|
|
211
212
|
></sd-token-selector>
|
|
212
213
|
</div>
|
|
213
|
-
`,
|
|
214
|
-
`,
|
|
214
|
+
`,Mo=`<h3 id="drag-and-drop-example">Drag and drop example</h3>
|
|
215
|
+
`,No=`import "@cas-smartdesign/button";
|
|
215
216
|
import TokenSelector, { TokenData, generator } from "@cas-smartdesign/token-selector";
|
|
216
217
|
import { getItems as getDefaultItems } from "../token-provider";
|
|
217
218
|
|
|
@@ -280,7 +281,7 @@ document.querySelectorAll("#dnd-example sd-token-selector").forEach((tokenSelect
|
|
|
280
281
|
setUpWithSharedTokens(tokenSelector);
|
|
281
282
|
}
|
|
282
283
|
});
|
|
283
|
-
`,
|
|
284
|
+
`,Do={mainContent:Po,description:Mo,css:Kt,initializer:{content:No,type:"typescript",initialize:()=>Gt(()=>import("./4_dnd.js"),__vite__mapDeps([5,3,1]),import.meta.url)}},jo=Object.freeze(Object.defineProperty({__proto__:null,default:Do},Symbol.toStringTag,{value:"Module"})),Bo=`<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
|
+
`,zo=`<h3 id="additional-examples">Additional examples</h3>
|
|
296
|
+
`,Uo=`.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
|
+
`,qo=`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
|
+
`,Fo=`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"),Yn=/'/g,Qn=/"/g,Ws=/^(?:script|style|textarea|title)$/i,qo=n=>(e,...t)=>({_$litType$:n,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(n,e){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zn!==void 0?Zn.createHTML(e):e}const Vo=(n,e)=>{const t=n.length-1,i=[];let s,r=e===2?"<svg>":"",o=bt;for(let a=0;a<t;a++){const l=n[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=Xn:d[1]!==void 0?o=Jn: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]==='"'?Qn:Yn):o===Qn||o===Yn?o=Ue:o===Xn||o===Jn?o=bt:(o=Ue,s=void 0);const m=o===Ue&&n[a+1].startsWith("/>")?" ":"";r+=o===bt?l+Ho:h>=0?(i.push(c),l.slice(0,h)+Ji+l.slice(h)+Pe+m):l+Pe+(h===-2?(i.push(void 0),a):m)}return[qs(n,r+(n[t]||"<?>")+(e===2?"</svg>":"")),i]};class It{constructor({strings:e,_$litType$:t},i){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,i),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(Ji)||p.startsWith(Pe)){const m=d[o++];if(h.push(p),m!==void 0){const E=s.getAttribute(m.toLowerCase()+Ji).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:_i})}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 i=Ve.createElement("template");return i.innerHTML=e,i}}function at(n,e,t=n,i){var s,r,o,a;if(e===Ge)return e;let l=i!==void 0?(s=t._$Co)===null||s===void 0?void 0:s[i]: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(n),l._$AT(n,t,i)),i!==void 0?((o=(a=t)._$Co)!==null&&o!==void 0?o:a._$Co=[])[i]=l:t._$Cl=l),l!==void 0&&(e=at(n,l._$AS(n,e.values),l,i)),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:i},parts:s}=this._$AD,r=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:Ve).importNode(i,!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 zt(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 i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class zt{constructor(e,t,i,s){var r;this.type=2,this._$AH=z,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,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:i,_$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(i);else{const o=new Go(r,this),a=o.u(this.options);o.v(i),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 i,s=0;for(const r of e)s===t.length?t.push(i=new zt(this.k(At()),this.k(At()),this,this.options)):i=t[s],i._$AI(r),s++;s<t.length&&(this._$AR(i&&i._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){var i;for((i=this._$AP)===null||i===void 0||i.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 _i=class{constructor(e,t,i,s,r){this.type=1,this._$AH=z,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,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[i+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 _i{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 _i{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 _i{constructor(e,t,i,s,r){super(e,t,i,s,r),this.type=5}_$AI(e,t=this){var i;if((e=(i=at(this,e,t,0))!==null&&i!==void 0?i: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,i;typeof this._$AH=="function"?this._$AH.call((i=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}};class Yo{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){at(this,e)}}const ts=fi.litHtmlPolyfillSupport;ts==null||ts(It,zt),((Bi=fi.litHtmlVersions)!==null&&Bi!==void 0?Bi:fi.litHtmlVersions=[]).push("2.8.0");const Qo=(n,e,t)=>{var i,s;const r=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i: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 zt(e.insertBefore(At(),a),a,void 0,t??{})}return o._$AI(n),o};var Ui,Fi;let ue=class extends st{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=i.firstChild),i}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,(Ui=globalThis.litElementHydrateSupport)===null||Ui===void 0||Ui.call(globalThis,{LitElement:ue});const is=globalThis.litElementPolyfillSupport;is==null||is({LitElement:ue});((Fi=globalThis.litElementVersions)!==null&&Fi!==void 0?Fi:globalThis.litElementVersions=[]).push("3.3.3");const ea=(n,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,n)}}:{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,n)}},ta=(n,e,t)=>{e.constructor.createProperty(t,n)};function v(n){return(e,t)=>t!==void 0?ta(n,e,t):ea(n,e)}const ee=n=>n??z,ia=":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}",na="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,xn=(n,e,t,i)=>{for(var s=i>1?void 0:i?aa(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=(i?o(e,t,s):o(s))||s);return i&&s&&oa(e,t,s),s},it;const Ct=(it=class extends ue{static parseLevel(n){if(n){const e=Object.keys(gi).find(t=>t.toLowerCase()===n.toLowerCase());return e&&gi[e]}}static get styles(){return[Si`
|
|
462
|
-
${
|
|
463
|
-
`]}render(){return
|
|
464
|
-
${
|
|
465
|
-
`]}render(){
|
|
460
|
+
`,Ho={mainContent:Bo,description:zo,css:Uo+Kt,initializer:{content:qo,type:"typescript",initialize:()=>Gt(()=>import("./5_other.js"),__vite__mapDeps([6,3,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:Fo}]},Wo=Object.freeze(Object.defineProperty({__proto__:null,default:Ho},Symbol.toStringTag,{value:"Module"}));const pi=globalThis,In=pi.ShadowRoot&&(pi.ShadyCSS===void 0||pi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Cn=Symbol(),ds=new WeakMap;let cr=class{constructor(e,i,s){if(this._$cssResult$=!0,s!==Cn)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(In&&e===void 0){const s=i!==void 0&&i.length===1;s&&(e=ds.get(i)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&ds.set(i,e))}return e}toString(){return this.cssText}};const mt=t=>new cr(typeof t=="string"?t:t+"",void 0,Cn),_i=(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 cr(i,t,Cn)},Vo=(t,e)=>{if(In)t.adoptedStyleSheets=e.map((i=>i instanceof CSSStyleSheet?i:i.styleSheet));else for(const i of e){const s=document.createElement("style"),n=pi.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=i.cssText,t.appendChild(s)}},us=In?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:Go,defineProperty:Ko,getOwnPropertyDescriptor:Zo,getOwnPropertyNames:Jo,getOwnPropertySymbols:Xo,getPrototypeOf:Yo}=Object,Si=globalThis,hs=Si.trustedTypes,Qo=hs?hs.emptyScript:"",ea=Si.reactiveElementPolyfillSupport,Nt=(t,e)=>t,vi={toAttribute(t,e){switch(e){case Boolean:t=t?Qo: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}},On=(t,e)=>!Go(t,e),ps={attribute:!0,type:String,converter:vi,reflect:!1,useDefault:!1,hasChanged:On};Symbol.metadata??=Symbol("metadata"),Si.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=ps){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&&Ko(this.prototype,e,n)}}static getPropertyDescriptor(e,i,s){const{get:n,set:r}=Zo(this.prototype,e)??{get(){return this[i]},set(o){this[i]=o}};return{get:n,set(o){const u=n?.call(this);r?.call(this,o),this.requestUpdate(e,u,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ps}static _$Ei(){if(this.hasOwnProperty(Nt("elementProperties")))return;const e=Yo(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Nt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Nt("properties"))){const i=this.properties,s=[...Jo(i),...Xo(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(us(n))}else e!==void 0&&i.push(us(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 Vo(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:vi).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:vi;this._$Em=n;const u=o.fromAttribute(i,r.type);this[n]=u??this._$Ej?.get(n)??u,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??On)(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,u=this[n];o!==!0||this._$AL.has(n)||u===void 0||this.C(n,void 0,r,u)}}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[Nt("elementProperties")]=new Map,kt[Nt("finalized")]=new Map,ea?.({ReactiveElement:kt}),(Si.reactiveElementVersions??=[]).push("2.1.1");const Tn=globalThis,bi=Tn.trustedTypes,fs=bi?bi.createPolicy("lit-html",{createHTML:t=>t}):void 0,dr="$lit$",tt=`lit$${Math.random().toFixed(9).slice(2)}$`,ur="?"+tt,ta=`<${ur}>`,pt=document,Ut=()=>pt.createComment(""),qt=t=>t===null||typeof t!="object"&&typeof t!="function",$n=Array.isArray,ia=t=>$n(t)||typeof t?.[Symbol.iterator]=="function",Wi=`[
|
|
461
|
+
\f\r]`,Lt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,gs=/-->/g,ms=/>/g,ct=RegExp(`>|${Wi}(?:([^\\s"'>=/]+)(${Wi}*=${Wi}*(?:[^
|
|
462
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),vs=/'/g,bs=/"/g,hr=/^(?:script|style|textarea|title)$/i,na=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),de=na(1),ft=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),ys=new WeakMap,ut=pt.createTreeWalker(pt,129);function pr(t,e){if(!$n(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return fs!==void 0?fs.createHTML(e):e}const sa=(t,e)=>{const i=t.length-1,s=[];let n,r=e===2?"<svg>":e===3?"<math>":"",o=Lt;for(let u=0;u<i;u++){const p=t[u];let h,a,d=-1,c=0;for(;c<p.length&&(o.lastIndex=c,a=o.exec(p),a!==null);)c=o.lastIndex,o===Lt?a[1]==="!--"?o=gs:a[1]!==void 0?o=ms:a[2]!==void 0?(hr.test(a[2])&&(n=RegExp("</"+a[2],"g")),o=ct):a[3]!==void 0&&(o=ct):o===ct?a[0]===">"?(o=n??Lt,d=-1):a[1]===void 0?d=-2:(d=o.lastIndex-a[2].length,h=a[1],o=a[3]===void 0?ct:a[3]==='"'?bs:vs):o===bs||o===vs?o=ct:o===gs||o===ms?o=Lt:(o=ct,n=void 0);const l=o===ct&&t[u+1].startsWith("/>")?" ":"";r+=o===Lt?p+ta:d>=0?(s.push(h),p.slice(0,d)+dr+p.slice(d)+tt+l):p+tt+(d===-2?u:l)}return[pr(t,r+(t[i]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};class Ft{constructor({strings:e,_$litType$:i},s){let n;this.parts=[];let r=0,o=0;const u=e.length-1,p=this.parts,[h,a]=sa(e,i);if(this.el=Ft.createElement(h,s),ut.currentNode=this.el.content,i===2||i===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(n=ut.nextNode())!==null&&p.length<u;){if(n.nodeType===1){if(n.hasAttributes())for(const d of n.getAttributeNames())if(d.endsWith(dr)){const c=a[o++],l=n.getAttribute(d).split(tt),f=/([.?@])?(.*)/.exec(c);p.push({type:1,index:r,name:f[2],strings:l,ctor:f[1]==="."?oa:f[1]==="?"?aa:f[1]==="@"?la:Ai}),n.removeAttribute(d)}else d.startsWith(tt)&&(p.push({type:6,index:r}),n.removeAttribute(d));if(hr.test(n.tagName)){const d=n.textContent.split(tt),c=d.length-1;if(c>0){n.textContent=bi?bi.emptyScript:"";for(let l=0;l<c;l++)n.append(d[l],Ut()),ut.nextNode(),p.push({type:2,index:++r});n.append(d[c],Ut())}}}else if(n.nodeType===8)if(n.data===ur)p.push({type:2,index:r});else{let d=-1;for(;(d=n.data.indexOf(tt,d+1))!==-1;)p.push({type:7,index:r}),d+=tt.length-1}r++}}static createElement(e,i){const s=pt.createElement("template");return s.innerHTML=e,s}}function _t(t,e,i=t,s){if(e===ft)return e;let n=s!==void 0?i._$Co?.[s]:i._$Cl;const r=qt(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=_t(t,n._$AS(t,e.values),n,s)),e}class ra{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,u=0,p=s[0];for(;p!==void 0;){if(o===p.index){let h;p.type===2?h=new Zt(r,r.nextSibling,this,e):p.type===1?h=new p.ctor(r,p.name,p.strings,this,e):p.type===6&&(h=new ca(r,this,e)),this._$AV.push(h),p=s[++u]}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 Zt{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=_t(this,e,i),qt(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):ia(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&&qt(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=Ft.createElement(pr(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===n)this._$AH.p(i);else{const r=new ra(n,this),o=r.u(this.options);r.p(i),this.T(o),this._$AH=r}}_$AC(e){let i=ys.get(e.strings);return i===void 0&&ys.set(e.strings,i=new Ft(e)),i}k(e){$n(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 Zt(this.O(Ut()),this.O(Ut()),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 Ai{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=_t(this,e,i,0),o=!qt(e)||e!==this._$AH&&e!==ft,o&&(this._$AH=e);else{const u=e;let p,h;for(e=r[0],p=0;p<r.length-1;p++)h=_t(this,u[s+p],i,p),h===ft&&(h=this._$AH[p]),o||=!qt(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 oa extends Ai{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===K?void 0:e}}class aa extends Ai{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==K)}}let la=class extends Ai{constructor(e,i,s,n,r){super(e,i,s,n,r),this.type=5}_$AI(e,i=this){if((e=_t(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)}},ca=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){_t(this,e)}};const da=Tn.litHtmlPolyfillSupport;da?.(Ft,Zt),(Tn.litHtmlVersions??=[]).push("3.3.1");const ua=(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 Zt(e.insertBefore(Ut(),r),r,void 0,i??{})}return n._$AI(t),n};const Rn=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=ua(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,Rn.litElementHydrateSupport?.({LitElement:Ie});const ha=Rn.litElementPolyfillSupport;ha?.({LitElement:Ie});(Rn.litElementVersions??=[]).push("4.2.1");const pa={attribute:!0,type:String,converter:vi,reflect:!1,hasChanged:On},fa=(t=pa,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(u){const p=e.get.call(this);e.set.call(this,u),this.requestUpdate(o,p,t)},init(u){return u!==void 0&&this.C(o,void 0,t,u),u}}}if(s==="setter"){const{name:o}=i;return function(u){const p=this[o];e.call(this,u),this.requestUpdate(o,p,t)}}throw Error("Unsupported decorator location: "+s)};function $(t){return(e,i)=>typeof i=="object"?fa(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,ga=":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}",ma="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",va="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",ba="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 ya=Object.defineProperty,Ln=(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&&ya(e,i,n),n},xt;const Ht=(xt=class extends Ie{static parseLevel(t){if(t){const e=Object.keys(yi).find(i=>i.toLowerCase()===t.toLowerCase());return e&&yi[e]}}static get styles(){return[_i`
|
|
463
|
+
${mt(ga)}
|
|
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 ba;case"suggest":return va;case"error":return ma;default:return null}}},xt.ID="sd-field-validation-message",xt.levelConverter={fromAttribute(t){return xt.parseLevel(t)},toAttribute(t){return t&&t.toLowerCase()}},xt);Ln([$({type:String,attribute:!0})],Ht.prototype,"message");Ln([$({type:String,attribute:!0})],Ht.prototype,"icon");Ln([$({converter:Ht.levelConverter,reflect:!0})],Ht.prototype,"level");let fi=Ht;var yi=(t=>(t.Warn="warn",t.Suggest="suggest",t.Error="error",t))(yi||{});customElements.get(fi.ID)||customElements.define(fi.ID,fi);const wa=":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 xa=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&&xa(e,i,n),n};const ka="sd-lit-input",ws="delegatesFocus"in window.ShadowRoot.prototype;let Ea=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=Ea++;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(),ws||(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[_i`
|
|
465
|
+
${mt(wa)}
|
|
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)}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),this.updateFormValidity()}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=ka,Ue.DEFAULT_MAX_LENGTH=524288,Ue.formAssociated=!0,Ue.shadowRootOptions={...Ie.shadowRootOptions,delegatesFocus:ws},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:yi,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 Vi=ee;customElements.get(Vi.ID)||customElements.define(Vi.ID,Vi);const Pn={ATTRIBUTE:1,CHILD:2},Mn=t=>(...e)=>({_$litDirective$:t,values:e});let fr=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 wi extends fr{constructor(e){if(super(e),this.it=K,e.type!==Pn.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:[]}}}wi.directiveName="unsafeHTML",wi.resultType=1;const _a=Mn(wi);const Sa=t=>t.strings===void 0;const Dt=(t,e)=>{const i=t._$AN;if(i===void 0)return!1;for(const s of i)s._$AO?.(e,!1),Dt(s,e);return!0},xi=t=>{let e,i;do{if((e=t._$AM)===void 0)break;i=e._$AN,i.delete(t),t=e}while(i?.size===0)},gr=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(i===void 0)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),Ca(e)}};function Aa(t){this._$AN!==void 0?(xi(this),this._$AM=t,gr(this)):this._$AM=t}function Ia(t,e=!1,i=0){const s=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(e)if(Array.isArray(s))for(let r=i;r<s.length;r++)Dt(s[r],!1),xi(s[r]);else s!=null&&(Dt(s,!1),xi(s));else Dt(this,t)}const Ca=t=>{t.type==Pn.CHILD&&(t._$AP??=Ia,t._$AQ??=Aa)};let Oa=class extends fr{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,i,s){super._$AT(e,i,s),gr(this),this.isConnected=e._$AU}_$AO(e,i=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),i&&(Dt(this,e),xi(this))}setValue(e){if(Sa(this._$Ct))this._$Ct._$AI(e,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=e,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}};const xs=t=>t?t.startsWith("url")?t:`url("${t}")`:null,Ta=(t,e)=>{if(t){const i=new Image;i.addEventListener("load",e),i.src=t,i.complete&&(i.removeEventListener("load",e),e())}};let $a=class extends Oa{constructor(e){if(super(e),e.type!==Pn.ATTRIBUTE||e.name!=="src"&&e.name!=="style")throw new Error("The `placeholder` directive must be used in the `src` or `style` attributes")}update(e,[i,s]){return this.useCssBackground=e.name=="style",this.render(i,s)}render(e,i){this.loadingToken!=null&&(this.loadingToken.cancelled=!0);const s={cancelled:!1};return this.loadingToken=s,typeof e=="string"?this.preload(e,s):e?.then(n=>{this.preload(n,s)}),this.useCssBackground?xs(i):i}preload(e,i){e!=null&&!i.cancelled&&Ta(e,()=>{i.cancelled||this.setValue(this.useCssBackground?xs(e):e)})}};const mr=Mn($a),Ra=':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 La=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&&La(e,i,n),n},dt;const ge=(dt=class extends Ie{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[_i`
|
|
534
|
+
${mt(Ra)}
|
|
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,57 @@ export function getItems(): ExtendedTokenData[] {
|
|
|
546
547
|
<slot name="right-content"></slot>
|
|
547
548
|
</div>
|
|
548
549
|
</div>
|
|
549
|
-
`}renderIcon(){
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
>
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
<div class="${n}" title="${ee(t)}">
|
|
562
|
-
${this.contentMode==="html"?ga(e):e}
|
|
550
|
+
`}renderIcon(){return this.icon||this.iconPlaceholder?de`<div
|
|
551
|
+
class="icon-wrapper"
|
|
552
|
+
@pointerdown="${this.handleIconClick}"
|
|
553
|
+
style="background-color:${fe(this.iconBackgroundColor)};"
|
|
554
|
+
role="img"
|
|
555
|
+
aria-label="${fe(this.iconAttrAriaLabel)}"
|
|
556
|
+
title="${fe(this.iconAttrTitle)}"
|
|
557
|
+
>
|
|
558
|
+
<div class="icon" style="background-image:${mr(this.icon,this.iconPlaceholder)}"></div>
|
|
559
|
+
</div> `:K}renderLabel(t,e,i){return e?de`
|
|
560
|
+
<div class="${t}" title="${fe(i)}">
|
|
561
|
+
${this.contentMode==="html"?_a(e):e}
|
|
563
562
|
</div>
|
|
564
|
-
`:z}updated(n){super.updated(n),(n.has("icon")||n.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&Gs.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),n.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){const n=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let e=0;const t=this.shadowRoot.querySelector(".caption");t&&(e+=t.scrollWidth-t.clientWidth);const i=this.shadowRoot.querySelector(".description");return i&&(e=Math.max(e,i.scrollWidth-i.clientWidth)),e>0&&e++,n&&this.setAttribute("enable-line-clamp",""),e}handleIconClick(n){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",n))&&n.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({converter:{fromAttribute:n=>n=="true",toAttribute:n=>n},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=(n,e)=>{const t=document.createElement(rt.ID);if(n){if(t.caption=n.caption,t.description=n.description,t.icon=n.icon,t.iconBackgroundColor=n.iconBackgroundColor,t.iconPlaceholder=n.iconPlaceholder,t.level=n.level,t.disabled=n.disabled,n.contentMode&&(t.contentMode=n.contentMode),n.leftContentGenerator){const i=n.leftContentGenerator(n,t);i&&(i.slot="left-content",t.appendChild(i))}if(n.rightContentGenerator){const i=n.rightContentGenerator(n,t);i&&(i.slot="right-content",t.appendChild(i))}}return t};rt.ensureDefined();var re="top",pe="bottom",fe="right",oe="left",kn="auto",Ut=[re,pe,fe,oe],lt="start",Ot="end",ya="clippingParents",Zs="viewport",yt="popper",wa="reference",ss=Ut.reduce(function(n,e){return n.concat([e+"-"+lt,e+"-"+Ot])},[]),Xs=[].concat(Ut,[kn]).reduce(function(n,e){return n.concat([e,e+"-"+lt,e+"-"+Ot])},[]),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(n){return n?(n.nodeName||"").toLowerCase():null}function ce(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function Ke(n){var e=ce(n).Element;return n instanceof e||n instanceof Element}function he(n){var e=ce(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function En(n){if(typeof ShadowRoot>"u")return!1;var e=ce(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function Ta(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},s=e.attributes[t]||{},r=e.elements[t];!he(r)||!Ae(r)||(Object.assign(r.style,i),Object.keys(s).forEach(function(o){var a=s[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function La(n){var e=n.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(i){var s=e.elements[i],r=e.attributes[i]||{},o=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]),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(n){return n.split("-")[0]}var We=Math.max,vi=Math.min,ct=Math.round;function Yi(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Js(){return!/^((?!chrome|android).)*safari/i.test(Yi())}function dt(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=n.getBoundingClientRect(),s=1,r=1;e&&he(n)&&(s=n.offsetWidth>0&&ct(i.width)/n.offsetWidth||1,r=n.offsetHeight>0&&ct(i.height)/n.offsetHeight||1);var o=Ke(n)?ce(n):window,a=o.visualViewport,l=!Js()&&t,c=(i.left+(l&&a?a.offsetLeft:0))/s,d=(i.top+(l&&a?a.offsetTop:0))/r,h=i.width/s,p=i.height/r;return{width:h,height:p,top:d,right:c+h,bottom:d+p,left:c,x:c,y:d}}function Sn(n){var e=dt(n),t=n.offsetWidth,i=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:i}}function Ys(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&En(t)){var i=e;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Ce(n){return ce(n).getComputedStyle(n)}function Pa(n){return["table","td","th"].indexOf(Ae(n))>=0}function De(n){return((Ke(n)?n.ownerDocument:n.document)||window.document).documentElement}function Ai(n){return Ae(n)==="html"?n:n.assignedSlot||n.parentNode||(En(n)?n.host:null)||De(n)}function rs(n){return!he(n)||Ce(n).position==="fixed"?null:n.offsetParent}function Ma(n){var e=/firefox/i.test(Yi()),t=/Trident/i.test(Yi());if(t&&he(n)){var i=Ce(n);if(i.position==="fixed")return null}var s=Ai(n);for(En(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 Ft(n){for(var e=ce(n),t=rs(n);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(n)||e}function _n(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Et(n,e,t){return We(n,vi(e,t))}function Da(n,e,t){var i=Et(n,e,t);return i>t?t:i}function Qs(){return{top:0,right:0,bottom:0,left:0}}function er(n){return Object.assign({},Qs(),n)}function tr(n,e){return e.reduce(function(t,i){return t[i]=n,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,Ut))};function ja(n){var e,t=n.state,i=n.name,s=n.options,r=t.elements.arrow,o=t.modifiersData.popperOffsets,a=_e(t.placement),l=_n(a),c=[oe,fe].indexOf(a)>=0,d=c?"height":"width";if(!(!r||!o)){var h=Na(s.padding,t),p=Sn(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],$=Ft(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[i]=(e={},e[M]=R,e.centerOffset=R-C,e)}}function Ba(n){var e=n.state,t=n.options,i=t.element,s=i===void 0?"[data-popper-arrow]":i;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(n){return n.split("-")[1]}var Ua={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Fa(n,e){var t=n.x,i=n.y,s=e.devicePixelRatio||1;return{x:ct(t*s)/s||0,y:ct(i*s)/s||0}}function os(n){var e,t=n.popper,i=n.popperRect,s=n.placement,r=n.variation,o=n.offsets,a=n.position,l=n.gpuAcceleration,c=n.adaptive,d=n.roundOffsets,h=n.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=Ft(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===Ot){x=pe;var O=h&&C===A&&A.visualViewport?A.visualViewport.height:C[R];w-=O-i.height,w*=l?1:-1}if(s===oe||(s===re||s===pe)&&r===Ot){L=fe;var j=h&&C===A&&A.visualViewport?A.visualViewport.width:C[M];m-=j-i.width,m*=l?1:-1}}var G=Object.assign({position:a},c&&Ua),ie=d===!0?Fa({x:m,y:w},ce(t)):{x:m,y:w};if(m=ie.x,w=ie.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(n){var e=n.state,t=n.options,i=t.gpuAcceleration,s=i===void 0?!0:i,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 Kt={passive:!0};function qa(n){var e=n.state,t=n.instance,i=n.options,s=i.scroll,r=s===void 0?!0:s,o=i.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,Kt)}),a&&l.addEventListener("resize",t.update,Kt),function(){r&&c.forEach(function(d){d.removeEventListener("scroll",t.update,Kt)}),a&&l.removeEventListener("resize",t.update,Kt)}}const Va={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qa,data:{}};var Ga={left:"right",right:"left",bottom:"top",top:"bottom"};function ci(n){return n.replace(/left|right|bottom|top/g,function(e){return Ga[e]})}var Ka={start:"end",end:"start"};function as(n){return n.replace(/start|end/g,function(e){return Ka[e]})}function An(n){var e=ce(n),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function $n(n){return dt(De(n)).left+An(n).scrollLeft}function Za(n,e){var t=ce(n),i=De(n),s=t.visualViewport,r=i.clientWidth,o=i.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+$n(n),y:l}}function Xa(n){var e,t=De(n),i=An(n),s=(e=n.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=-i.scrollLeft+$n(n),l=-i.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 In(n){var e=Ce(n),t=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+i)}function ir(n){return["html","body","#document"].indexOf(Ae(n))>=0?n.ownerDocument.body:he(n)&&In(n)?n:ir(Ai(n))}function St(n,e){var t;e===void 0&&(e=[]);var i=ir(n),s=i===((t=n.ownerDocument)==null?void 0:t.body),r=ce(i),o=s?[r].concat(r.visualViewport||[],In(i)?i:[]):i,a=e.concat(o);return s?a:a.concat(St(Ai(o)))}function Qi(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Ja(n,e){var t=dt(n,!1,e==="fixed");return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function ls(n,e,t){return e===Zs?Qi(Za(n,t)):Ke(e)?Ja(e,t):Qi(Xa(De(n)))}function Ya(n){var e=St(Ai(n)),t=["absolute","fixed"].indexOf(Ce(n).position)>=0,i=t&&he(n)?Ft(n):n;return Ke(i)?e.filter(function(s){return Ke(s)&&Ys(s,i)&&Ae(s)!=="body"}):[]}function Qa(n,e,t,i){var s=e==="clippingParents"?Ya(n):[].concat(e),r=[].concat(s,[t]),o=r[0],a=r.reduce(function(l,c){var d=ls(n,c,i);return l.top=We(d.top,l.top),l.right=vi(d.right,l.right),l.bottom=vi(d.bottom,l.bottom),l.left=We(d.left,l.left),l},ls(n,o,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function nr(n){var e=n.reference,t=n.element,i=n.placement,s=i?_e(i):null,r=i?ut(i):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?_n(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 Ot:l[c]=l[c]+(e[d]/2-t[d]/2);break}}return l}function Tt(n,e){e===void 0&&(e={});var t=e,i=t.placement,s=i===void 0?n.placement:i,r=t.strategy,o=r===void 0?n.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,Ut)),T=p===yt?wa:yt,L=n.rects.popper,x=n.elements[E?T:p],A=Qa(Ke(x)?x:x.contextElement||De(n.elements.popper),l,d,o),C=dt(n.elements.reference),R=nr({reference:C,element:L,strategy:"absolute",placement:s}),M=Qi(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=n.modifiersData.offset;if(p===yt&&G){var ie=G[s];Object.keys(j).forEach(function(K){var me=[fe,pe].indexOf(K)>=0?1:-1,ne=[re,pe].indexOf(K)>=0?"y":"x";j[K]+=ie[ne]*me})}return j}function el(n,e){e===void 0&&(e={});var t=e,i=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(i),h=d?a?ss:ss.filter(function(E){return ut(E)===d}):Ut,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]=Tt(n,{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(n){if(_e(n)===kn)return[];var e=ci(n);return[as(n),e,as(e)]}function il(n){var e=n.state,t=n.options,i=n.name;if(!e.modifiersData[i]._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?[ci(f)]:tl(f)),x=[f].concat(L).reduce(function(ve,W){return ve.concat(_e(W)===kn?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],ie=_e(G),K=ut(G)===lt,me=[re,pe].indexOf(ie)>=0,ne=me?"width":"height",J=Tt(e,{placement:G,boundary:d,rootBoundary:h,altBoundary:p,padding:c}),u=me?K?fe:oe:K?pe:re;A[ne]>C[ne]&&(u=ci(u));var b=ci(u),k=[];if(r&&k.push(J[ie]<=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[i]._skip=!0,e.placement=O,e.reset=!0)}}const nl={name:"flip",enabled:!0,phase:"main",fn:il,requiresIfExists:["offset"],data:{_skip:!1}};function cs(n,e,t){return t===void 0&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function ds(n){return[re,fe,pe,oe].some(function(e){return n[e]>=0})}function sl(n){var e=n.state,t=n.name,i=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=Tt(e,{elementContext:"reference"}),a=Tt(e,{altBoundary:!0}),l=cs(o,i),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(n,e,t){var i=_e(n),s=[oe,re].indexOf(i)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[oe,fe].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}function al(n){var e=n.state,t=n.options,i=n.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[i]=o}const ll={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:al};function cl(n){var e=n.state,t=n.name;e.modifiersData[t]=nr({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(n){return n==="x"?"y":"x"}function hl(n){var e=n.state,t=n.options,i=n.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=Tt(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:d}),$=_e(e.placement),T=ut(e.placement),L=!T,x=_n($),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,ie={x:0,y:0};if(C){if(r){var K,me=x==="y"?re:oe,ne=x==="y"?pe:fe,J=x==="y"?"height":"width",u=C[x],b=u+f[me],k=u-f[ne],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?Sn(ae):{width:0,height:0},W=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Qs(),Y=W[me],Be=W[ne],we=Et(0,R[J],ve[J]),Ye=L?R[J]/2-I-we-Y-j.mainAxis:B-we-Y-j.mainAxis,Mi=L?-R[J]/2+I+we+Be+j.mainAxis:Z+we+Be+j.mainAxis,mt=e.elements.arrow&&Ft(e.elements.arrow),Di=mt?x==="y"?mt.clientTop||0:mt.clientLeft||0:0,qt=(K=G==null?void 0:G[x])!=null?K:0,Qe=u+Ye-qt-Di,Vt=u+Mi-qt,le=Et(m?vi(b,Qe):b,u,m?We(k,Vt):k);C[x]=le,ie[x]=le-u}if(a){var Gt,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=(Gt=G==null?void 0:G[A])!=null?Gt: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,ie[A]=y-xe}e.modifiersData[i]=ie}}const pl={name:"preventOverflow",enabled:!0,phase:"main",fn:hl,requiresIfExists:["offset"]};function fl(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function gl(n){return n===ce(n)||!he(n)?An(n):fl(n)}function ml(n){var e=n.getBoundingClientRect(),t=ct(e.width)/n.offsetWidth||1,i=ct(e.height)/n.offsetHeight||1;return t!==1||i!==1}function vl(n,e,t){t===void 0&&(t=!1);var i=he(e),s=he(e)&&ml(e),r=De(e),o=dt(n,s,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((Ae(e)!=="body"||In(r))&&(a=gl(e)),he(e)?(l=dt(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):r&&(l.x=$n(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function bl(n){var e=new Map,t=new Set,i=[];n.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)}}),i.push(r)}return n.forEach(function(r){t.has(r.name)||s(r)}),i}function yl(n){var e=bl(n);return Oa.reduce(function(t,i){return t.concat(e.filter(function(s){return s.phase===i}))},[])}function wl(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function xl(n){var e=n.reduce(function(t,i){var s=t[i.name];return t[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var us={placement:"bottom",modifiers:[],strategy:"absolute"};function hs(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function kl(n){n===void 0&&(n={});var e=n,t=e.defaultModifiers,i=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(i,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,Ft(L),d.options.strategy==="fixed"),popper:Sn(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,nl,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
|
|
563
|
+
`:K}updated(t){super.updated(t),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 vr=(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",Nn="auto",Jt=[be,Oe,Te,ye],St="start",Wt="end",Pa="clippingParents",br="viewport",Pt="popper",Ma="reference",ks=Jt.reduce(function(t,e){return t.concat([e+"-"+St,e+"-"+Wt])},[]),yr=[].concat(Jt,[Nn]).reduce(function(t,e){return t.concat([e,e+"-"+St,e+"-"+Wt])},[]),Na="beforeRead",Da="read",ja="afterRead",Ba="beforeMain",za="main",Ua="afterMain",qa="beforeWrite",Fa="write",Ha="afterWrite",Wa=[Na,Da,ja,Ba,za,Ua,qa,Fa,Ha];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 Dn(t){if(typeof ShadowRoot>"u")return!1;var e=ke(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Va(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 u=n[o];u===!1?r.removeAttribute(o):r.setAttribute(o,u===!0?"":u)}))})}function Ga(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]),u=o.reduce(function(p,h){return p[h]="",p},{});!Ce(n)||!He(n)||(Object.assign(n.style,u),Object.keys(r).forEach(function(p){n.removeAttribute(p)}))})}}const Ka={name:"applyStyles",enabled:!0,phase:"write",fn:Va,effect:Ga,requires:["computeStyles"]};function Fe(t){return t.split("-")[0]}var ht=Math.max,ki=Math.min,At=Math.round;function kn(){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 wr(){return!/^((?!chrome|android).)*safari/i.test(kn())}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,u=o.visualViewport,p=!wr()&&i,h=(s.left+(p&&u?u.offsetLeft:0))/n,a=(s.top+(p&&u?u.offsetTop:0))/r,d=s.width/n,c=s.height/r;return{width:d,height:c,top:a,right:h+d,bottom:a+c,left:h,x:h,y:a}}function jn(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 xr(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&Dn(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 Za(t){return["table","td","th"].indexOf(He(t))>=0}function it(t){return((gt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ii(t){return He(t)==="html"?t:t.assignedSlot||t.parentNode||(Dn(t)?t.host:null)||it(t)}function Es(t){return!Ce(t)||Ze(t).position==="fixed"?null:t.offsetParent}function Ja(t){var e=/firefox/i.test(kn()),i=/Trident/i.test(kn());if(i&&Ce(t)){var s=Ze(t);if(s.position==="fixed")return null}var n=Ii(t);for(Dn(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 Xt(t){for(var e=ke(t),i=Es(t);i&&Za(i)&&Ze(i).position==="static";)i=Es(i);return i&&(He(i)==="html"||He(i)==="body"&&Ze(i).position==="static")?e:i||Ja(t)||e}function Bn(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function jt(t,e,i){return ht(t,ki(e,i))}function Xa(t,e,i){var s=jt(t,e,i);return s>i?i:s}function kr(){return{top:0,right:0,bottom:0,left:0}}function Er(t){return Object.assign({},kr(),t)}function _r(t,e){return e.reduce(function(i,s){return i[s]=t,i},{})}var Ya=function(e,i){return e=typeof e=="function"?e(Object.assign({},i.rects,{placement:i.placement})):e,Er(typeof e!="number"?e:_r(e,Jt))};function Qa(t){var e,i=t.state,s=t.name,n=t.options,r=i.elements.arrow,o=i.modifiersData.popperOffsets,u=Fe(i.placement),p=Bn(u),h=[ye,Te].indexOf(u)>=0,a=h?"height":"width";if(!(!r||!o)){var d=Ya(n.padding,i),c=jn(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=Xt(r),k=x?p==="y"?x.clientHeight||0:x.clientWidth||0:0,w=g/2-v/2,y=d[l],b=k-c[a]-d[f],E=k/2-c[a]/2+w,S=jt(y,E,b),R=p;i.modifiersData[s]=(e={},e[R]=S,e.centerOffset=S-E,e)}}function el(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)||xr(e.elements.popper,n)&&(e.elements.arrow=n))}const tl={name:"arrow",enabled:!0,phase:"main",fn:Qa,effect:el,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ct(t){return t.split("-")[1]}var il={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nl(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 _s(t){var e,i=t.popper,s=t.popperRect,n=t.placement,r=t.variation,o=t.offsets,u=t.position,p=t.gpuAcceleration,h=t.adaptive,a=t.roundOffsets,d=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=Xt(i),S="clientHeight",R="clientWidth";if(E===ke(i)&&(E=it(i),Ze(E).position!=="static"&&u==="absolute"&&(S="scrollHeight",R="scrollWidth")),E=E,n===be||(n===ye||n===Te)&&r===Wt){y=Oe;var M=d&&E===b&&b.visualViewport?b.visualViewport.height:E[S];g-=M-s.height,g*=p?1:-1}if(n===ye||(n===be||n===Oe)&&r===Wt){w=Te;var I=d&&E===b&&b.visualViewport?b.visualViewport.width:E[R];l-=I-s.width,l*=p?1:-1}}var F=Object.assign({position:u},h&&il),U=a===!0?nl({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 sl(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,u=i.roundOffsets,p=u===void 0?!0:u,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,_s(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,_s(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 rl={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:sl,data:{}};var li={passive:!0};function ol(t){var e=t.state,i=t.instance,s=t.options,n=s.scroll,r=n===void 0?!0:n,o=s.resize,u=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,li)}),u&&p.addEventListener("resize",i.update,li),function(){r&&h.forEach(function(a){a.removeEventListener("scroll",i.update,li)}),u&&p.removeEventListener("resize",i.update,li)}}const al={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ol,data:{}};var ll={left:"right",right:"left",bottom:"top",top:"bottom"};function gi(t){return t.replace(/left|right|bottom|top/g,function(e){return ll[e]})}var cl={start:"end",end:"start"};function Ss(t){return t.replace(/start|end/g,function(e){return cl[e]})}function zn(t){var e=ke(t),i=e.pageXOffset,s=e.pageYOffset;return{scrollLeft:i,scrollTop:s}}function Un(t){return It(it(t)).left+zn(t).scrollLeft}function dl(t,e){var i=ke(t),s=it(t),n=i.visualViewport,r=s.clientWidth,o=s.clientHeight,u=0,p=0;if(n){r=n.width,o=n.height;var h=wr();(h||!h&&e==="fixed")&&(u=n.offsetLeft,p=n.offsetTop)}return{width:r,height:o,x:u+Un(t),y:p}}function ul(t){var e,i=it(t),s=zn(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),u=-s.scrollLeft+Un(t),p=-s.scrollTop;return Ze(n||i).direction==="rtl"&&(u+=ht(i.clientWidth,n?n.clientWidth:0)-r),{width:r,height:o,x:u,y:p}}function qn(t){var e=Ze(t),i=e.overflow,s=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+n+s)}function Sr(t){return["html","body","#document"].indexOf(He(t))>=0?t.ownerDocument.body:Ce(t)&&qn(t)?t:Sr(Ii(t))}function Bt(t,e){var i;e===void 0&&(e=[]);var s=Sr(t),n=s===((i=t.ownerDocument)==null?void 0:i.body),r=ke(s),o=n?[r].concat(r.visualViewport||[],qn(s)?s:[]):s,u=e.concat(o);return n?u:u.concat(Bt(Ii(o)))}function En(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function hl(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 As(t,e,i){return e===br?En(dl(t,i)):gt(e)?hl(e,i):En(ul(it(t)))}function pl(t){var e=Bt(Ii(t)),i=["absolute","fixed"].indexOf(Ze(t).position)>=0,s=i&&Ce(t)?Xt(t):t;return gt(s)?e.filter(function(n){return gt(n)&&xr(n,s)&&He(n)!=="body"}):[]}function fl(t,e,i,s){var n=e==="clippingParents"?pl(t):[].concat(e),r=[].concat(n,[i]),o=r[0],u=r.reduce(function(p,h){var a=As(t,h,s);return p.top=ht(a.top,p.top),p.right=ki(a.right,p.right),p.bottom=ki(a.bottom,p.bottom),p.left=ht(a.left,p.left),p},As(t,o,s));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function Ar(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,u=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:u};break;case ye:p={x:e.x-i.width,y:u};break;default:p={x:e.x,y:e.y}}var h=n?Bn(n):null;if(h!=null){var a=h==="y"?"height":"width";switch(r){case St:p[h]=p[h]-(e[a]/2-i[a]/2);break;case Wt:p[h]=p[h]+(e[a]/2-i[a]/2);break}}return p}function Vt(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,u=i.boundary,p=u===void 0?Pa:u,h=i.rootBoundary,a=h===void 0?br:h,d=i.elementContext,c=d===void 0?Pt:d,l=i.altBoundary,f=l===void 0?!1:l,g=i.padding,v=g===void 0?0:g,x=Er(typeof v!="number"?v:_r(v,Jt)),k=c===Pt?Ma:Pt,w=t.rects.popper,y=t.elements[f?k:c],b=fl(gt(y)?y:y.contextElement||it(t.elements.popper),p,a,o),E=It(t.elements.reference),S=Ar({reference:E,element:w,placement:n}),R=En(Object.assign({},w,S)),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 gl(t,e){e===void 0&&(e={});var i=e,s=i.placement,n=i.boundary,r=i.rootBoundary,o=i.padding,u=i.flipVariations,p=i.allowedAutoPlacements,h=p===void 0?yr:p,a=Ct(s),d=a?u?ks:ks.filter(function(f){return Ct(f)===a}):Jt,c=d.filter(function(f){return h.indexOf(f)>=0});c.length===0&&(c=d);var l=c.reduce(function(f,g){return f[g]=Vt(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 ml(t){if(Fe(t)===Nn)return[];var e=gi(t);return[Ss(t),e,Ss(e)]}function vl(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,u=o===void 0?!0:o,p=i.fallbackPlacements,h=i.padding,a=i.boundary,d=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?[gi(v)]:ml(v)),y=[v].concat(w).reduce(function(Se,me){return Se.concat(Fe(me)===Nn?gl(e,{placement:me,boundary:a,rootBoundary:d,padding:h,flipVariations:f,allowedAutoPlacements:g}):me)},[]),b=e.rects.reference,E=e.rects.popper,S=new Map,R=!0,M=y[0],I=0;I<y.length;I++){var F=y[I],U=Fe(F),Q=Ct(F)===St,re=[be,Oe].indexOf(U)>=0,T=re?"width":"height",oe=Vt(e,{placement:F,boundary:a,rootBoundary:d,altBoundary:c,padding:h}),H=re?Q?Te:ye:Q?Oe:be;b[T]>E[T]&&(H=gi(H));var X=gi(H),te=[];if(r&&te.push(oe[U]<=0),u&&te.push(oe[H]<=0,oe[X]<=0),te.every(function(Se){return Se})){M=F,R=!1;break}S.set(F,te)}if(R)for(var le=f?3:1,_e=function(me){var We=y.find(function(Me){var Re=S.get(Me);if(Re)return Re.slice(0,me).every(function(Ne){return Ne})});if(We)return M=We,"break"},we=le;we>0;we--){var j=_e(we);if(j==="break")break}e.placement!==M&&(e.modifiersData[s]._skip=!0,e.placement=M,e.reset=!0)}}const bl={name:"flip",enabled:!0,phase:"main",fn:vl,requiresIfExists:["offset"],data:{_skip:!1}};function Is(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 Cs(t){return[be,Te,Oe,ye].some(function(e){return t[e]>=0})}function yl(t){var e=t.state,i=t.name,s=e.rects.reference,n=e.rects.popper,r=e.modifiersData.preventOverflow,o=Vt(e,{elementContext:"reference"}),u=Vt(e,{altBoundary:!0}),p=Is(o,s),h=Is(u,n,r),a=Cs(p),d=Cs(h);e.modifiersData[i]={referenceClippingOffsets:p,popperEscapeOffsets:h,isReferenceHidden:a,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":a,"data-popper-escaped":d})}const wl={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:yl};function xl(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],u=r[1];return o=o||0,u=(u||0)*n,[ye,Te].indexOf(s)>=0?{x:u,y:o}:{x:o,y:u}}function kl(t){var e=t.state,i=t.options,s=t.name,n=i.offset,r=n===void 0?[0,0]:n,o=yr.reduce(function(a,d){return a[d]=xl(d,e.rects,r),a},{}),u=o[e.placement],p=u.x,h=u.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=p,e.modifiersData.popperOffsets.y+=h),e.modifiersData[s]=o}const El={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:kl};function _l(t){var e=t.state,i=t.name;e.modifiersData[i]=Ar({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const Sl={name:"popperOffsets",enabled:!0,phase:"read",fn:_l,data:{}};function Al(t){return t==="x"?"y":"x"}function Il(t){var e=t.state,i=t.options,s=t.name,n=i.mainAxis,r=n===void 0?!0:n,o=i.altAxis,u=o===void 0?!1:o,p=i.boundary,h=i.rootBoundary,a=i.altBoundary,d=i.padding,c=i.tether,l=c===void 0?!0:c,f=i.tetherOffset,g=f===void 0?0:f,v=Vt(e,{boundary:p,rootBoundary:h,padding:d,altBoundary:a}),x=Fe(e.placement),k=Ct(e.placement),w=!k,y=Bn(x),b=Al(y),E=e.modifiersData.popperOffsets,S=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,_e=k===St?S[oe]:R[oe],we=k===St?-R[oe]:-S[oe],j=e.elements.arrow,Se=l&&j?jn(j):{width:0,height:0},me=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:kr(),We=me[re],Me=me[T],Re=jt(0,S[oe],Se[oe]),Ne=w?S[oe]/2-le-Re-We-I.mainAxis:_e-Re-We-I.mainAxis,Ot=w?-S[oe]/2+le+Re+Me+I.mainAxis:we+Re+Me+I.mainAxis,Ae=e.elements.arrow&&Xt(e.elements.arrow),rt=Ae?y==="y"?Ae.clientTop||0:Ae.clientLeft||0:0,ot=(Q=F?.[y])!=null?Q:0,Mi=H+Ne-ot-rt,Ni=H+Ot-ot,Qt=jt(l?ki(X,Mi):X,H,l?ht(te,Ni):te);E[y]=Qt,U[y]=Qt-H}if(u){var ei,Di=y==="x"?be:ye,ti=y==="x"?Oe:Te,Ve=E[b],bt=b==="y"?"height":"width",Tt=Ve+v[Di],De=Ve-v[ti],yt=[be,ye].indexOf(x)!==-1,Ge=(ei=F?.[b])!=null?ei:0,at=yt?Tt:Ve-S[bt]-R[bt]-Ge+I.altAxis,$t=yt?Ve+S[bt]+R[bt]-Ge-I.altAxis:De,ii=l&&yt?Xa(at,Ve,$t):jt(l?at:Tt,Ve,l?$t:De);E[b]=ii,U[b]=ii-Ve}e.modifiersData[s]=U}}const Cl={name:"preventOverflow",enabled:!0,phase:"main",fn:Il,requiresIfExists:["offset"]};function Ol(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Tl(t){return t===ke(t)||!Ce(t)?zn(t):Ol(t)}function $l(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 Rl(t,e,i){i===void 0&&(i=!1);var s=Ce(e),n=Ce(e)&&$l(e),r=it(e),o=It(t,n,i),u={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(s||!s&&!i)&&((He(e)!=="body"||qn(r))&&(u=Tl(e)),Ce(e)?(p=It(e,!0),p.x+=e.clientLeft,p.y+=e.clientTop):r&&(p.x=Un(r))),{x:o.left+u.scrollLeft-p.x,y:o.top+u.scrollTop-p.y,width:o.width,height:o.height}}function Ll(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(u){if(!i.has(u)){var p=e.get(u);p&&n(p)}}),s.push(r)}return t.forEach(function(r){i.has(r.name)||n(r)}),s}function Pl(t){var e=Ll(t);return Wa.reduce(function(i,s){return i.concat(e.filter(function(n){return n.phase===s}))},[])}function Ml(t){var e;return function(){return e||(e=new Promise(function(i){Promise.resolve().then(function(){e=void 0,i(t())})})),e}}function Nl(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 Os={placement:"bottom",modifiers:[],strategy:"absolute"};function Ts(){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 Dl(t){t===void 0&&(t={});var e=t,i=e.defaultModifiers,s=i===void 0?[]:i,n=e.defaultOptions,r=n===void 0?Os:n;return function(u,p,h){h===void 0&&(h=r);var a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Os,r),modifiersData:{},elements:{reference:u,popper:p},attributes:{},styles:{}},d=[],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(u)?Bt(u):u.contextElement?Bt(u.contextElement):[],popper:Bt(p)};var w=Pl(Nl([].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(Ts(k,w)){a.rects={reference:Rl(k,Xt(w),a.options.strategy==="fixed"),popper:jn(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,S=b.options,R=S===void 0?{}:S,M=b.name;typeof E=="function"&&(a=E({state:a,options:R,name:M,instance:l})||a)}}}},update:Ml(function(){return new Promise(function(v){l.forceUpdate(),v(a)})}),destroy:function(){g(),c=!0}};if(!Ts(u,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(){};d.push(b||E)}})}function g(){d.forEach(function(v){return v()}),d=[]}return l}}var jl=[al,Sl,rl,Ka,El,bl,Cl,tl,wl],Bl=Dl({defaultModifiers:jl});const zl=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="12" viewBox="0 0 24 12">\r
|
|
565
564
|
<path d="M0 0l11.96 12L24 0z" fill="#999" class="arrow-border"/>\r
|
|
566
565
|
<path d="M12 11L1 0h22z" fill="#f2f2f2" class="arrow-background"/>\r
|
|
567
566
|
</svg>\r
|
|
568
|
-
`,
|
|
567
|
+
`,Ul=navigator.userAgent.indexOf("Trident")!==-1,$s=1,Rs="sd-popover-open",Ir=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=zl}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:!Ul}},{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=Bl(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
568
|
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(),
|
|
569
|
+
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-$s}px`,u=(n-r)/2,p=`-${r+u-$s}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(Rs)}removeTargetClassForOpen(e){e&&e.classList.remove(Rs)}};Ir.ID="sd-popover";let mi=Ir;customElements.get(mi.ID)||customElements.define(mi.ID,mi);class ql{getOffsetForIndexAndAlignment(e,i,s,n,r,o){const u=Math.max(0,o*n),p=Math.min(u,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>u+Math.floor(r/2)?u: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 Fl=new ql,Hl=":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 Wl=Object.defineProperty,Vl=Object.getOwnPropertyDescriptor,nt=(t,e,i,s)=>{for(var n=s>1?void 0:s?Vl(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&&Wl(e,i,n),n};let Gl=0;var et;const Je=(et=class extends Ie{constructor(){super(),this.items=[],this.selectionType="trigger-only",this.id=et.ID+"_"+Gl++,this.role="listbox",this.itemGenerator=vr,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=Fl.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[_i`
|
|
570
|
+
${mt(Hl)}
|
|
571
|
+
`]}render(){return this.updateItemsRenderData(),de`
|
|
573
572
|
<div class="container" style="height: ${this.itemCount*this.itemHeight}px">
|
|
574
573
|
<slot name="items"></slot>
|
|
575
574
|
</div>
|
|
576
|
-
`}updated(n){if(super.updated(n),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 n=Number.parseInt(getComputedStyle(this).maxWidth)-this.offsetWidth;if(n==0)this._reachedMaxWidth=!0,this.enableLineClampOnItemsIfNeeded();else{this._reachedMaxWidth=!1;const e=[...this.querySelectorAll("[item-index]")].map(i=>{if(i instanceof rt){i.enableLineClamp=!1;const s=i.missingWidthForTexts;return s>n&&(i.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(n=>{n instanceof rt&&(n.enableLineClamp=n.enableLineClamp||n.missingWidthForTexts>0)})}increaseWidthOnNextRenderIfNeeded(){this._increaseWidthOnNextRenderIfNeeded=!0}updateItems(){const n=[...this.querySelectorAll("[item-index]")],e=new Map,t=document.createDocumentFragment();for(const i of this._itemsRenderData){const s=this.renderItem(i);s.parentElement||t.appendChild(s),e.set(i.dataHash,s);const r=n.indexOf(s);r!==-1&&n.splice(r,1)}this.appendChild(t);for(const i of n)i instanceof rt&&(i.enableLineClamp=!1),this.removeChild(i);e.forEach((i,s)=>{this._elementCache.set(s,i)})}renderItem({index:n,top:e,dataHash:t,data:i}){let s;return i?this._elementCache.has(t)?(s=this._elementCache.get(t),this._elementCache.delete(t)):(s=this.itemGenerator(i,n),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",n.toString()),s.setAttribute("aria-setsize",String(this.finalSizeIsKnown?this.itemCount:-1)),s.setAttribute("aria-posinset",String(n+1)),(!s.id||s.id.startsWith(this.id+"_item_"))&&(s.id=this.id+"_item_"+n),this.itemCount-1==n?s.setAttribute("last",""):s.removeAttribute("last"),this.updateSelectedAttribute(n,s),this.updateFocusedAttribute(n,s),s}updateFocusedAttribute(n,e){this.focusIndex==n&&(this.focusTarget||document.activeElement==this)?(e.setAttribute("focused",""),this.setAttribute("aria-activedescendant",e.id)):e.removeAttribute("focused")}updateSelectedAttribute(n,e){const t=this.selectedIndices.indexOf(n)!==-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 n=this.normalizeIndex(this._firstVisibleIndex-2),e=this.normalizeIndex(this._lastVisibleIndex+2);this.requestData(n,e);for(let t=n;t<=e;t++){const i=t-n,s=this.items[i];let r;s?r=JSON.stringify(s):r=`placeholder-${i}`,this._itemsRenderData.push({index:t,top:this.itemHeight*t,physicalIndex:i,dataHash:r,data:s})}}else this._firstVisibleIndex=0,this._lastVisibleIndex=0}normalizeIndex(n){return Math.max(0,Math.min(n,this.itemCount-1))}get height(){return this.offsetHeight}requestData(n,e){!Number.isNaN(n)&&!Number.isNaN(e)&&this.dispatchEvent(new CustomEvent("data-request",{detail:{startIndex:n,stopIndex:e}}))}handleSelection(n,e){if(n<0||this.itemCount<=n)return;const t=n%this._visibleItemsNum,i=this.items[t];if(!i||i.disabled)return;let s=!0;if(this.selectionType!=="trigger-only"){const r=this.selectedIndices.indexOf(n);s=r==-1,s?this.selectionType==="single"?this.selectedIndices=[n]:this.selectedIndices.push(n):this.selectedIndices.splice(r,1),this.requestUpdate("selectedIndices")}this.focusIndex=n,this.dispatchSelectionEvent(n,s,e)}dispatchSelectionEvent(n,e,t){this.dispatchEvent(new CustomEvent("selection",{detail:{index:n,selected:e,hasModifier:t}}))}handleClick(n){const e=n.composedPath().find(t=>t.hasAttribute&&t.hasAttribute("item-index"));if(e){const t=parseInt(e.getAttribute("item-index"));if(Number.isInteger(t)){if(n.button==0||n.button==1){const i=n.type=="auxclick"&&n.button==1||n.metaKey||n.ctrlKey;this.handleSelection(t,i)}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 en=Te;en.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=i=>{if(this.catchedKeys.indexOf(i.key)!==-1){const s=i.key.toLocaleLowerCase();let r=0;const o=s.includes("enter");o||(r=s.includes("down")?1:-1),this.keydownHandler(i,r,o),i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}}}static delegateTo(e){return new rr(e,t=>e.dispatchEvent(new KeyboardEvent(t.type,t)))}connect(e){var t,i;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)||(i=(t=e.shadowRoot)==null?void 0:t.activeElement)!=null&&i.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,i,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,en.ensureDefined(),this._tokenList=new en,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];i(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 di;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 tn extends mi{}tn.directiveName="unsafeSVG",tn.resultType=2;const Dl=Vs(tn),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
|
|
575
|
+
`}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 _n=Je;_n.ensureDefined();let Kl=class Cr{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 Cr(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())}},Zl=0;class Jl{constructor(e,i,s,n){this.inputElement=e,this.notSelectedTokensProvider=i,this.initializeCallback=n,this.filter=(r,o)=>r?o.filter(u=>u.disabled||u.deactivated?!1:u.caption&&u.caption.toLowerCase().includes(r)):o,_n.ensureDefined(),this._tokenList=new _n,this._tokenList.id="sd_token_suggest_popover_list_"+Zl++,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,u=this._suggestItems[o];s(u),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 Kl(this._tokenList,(r,o,u)=>{this._tokenList.dispatchEvent(new KeyboardEvent(r.type,r)),!u&&!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 mi;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 Sn extends wi{}Sn.directiveName="unsafeSVG",Sn.resultType=2;const Xl=Mn(Sn),Yl=`: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
576
|
<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
|
|
577
|
+
</svg>`;var ec=Object.defineProperty,tc=Object.getOwnPropertyDescriptor,st=(t,e,i,s)=>{for(var n=s>1?void 0:s?tc(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&&ec(e,i,n),n};const Fn={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(Yl)}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
578
|
<div class="container">
|
|
580
579
|
<slot name="before-icon"></slot>
|
|
581
580
|
${this.renderIcon()}
|
|
582
581
|
<slot name="after-icon"></slot>
|
|
583
582
|
<div class="value">${this.value}</div>
|
|
584
|
-
${this.disabled?
|
|
583
|
+
${this.disabled?K:de` <div class="delete-button-wrapper">${Xl(Ql)}</div> `}
|
|
585
584
|
</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="${
|
|
588
|
-
<div
|
|
585
|
+
`}renderIcon(){if(this.icon||this.iconPlaceholder){const e=this.iconBackgroundColor!=null?`--sd-token-icon-background-color: ${this.iconBackgroundColor}`:void 0;return de`
|
|
586
|
+
<div class="icon-wrapper" style="${fe(e)}" role="img">
|
|
587
|
+
<div
|
|
588
|
+
part="icon"
|
|
589
|
+
class="icon"
|
|
590
|
+
style="background-image:${mr(this.icon,this.iconPlaceholder)}"
|
|
591
|
+
></div>
|
|
589
592
|
</div>
|
|
590
|
-
`}return
|
|
593
|
+
`}return K}updated(e){super.updated(e),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:Fn,reflect:!0,attribute:"aria-disabled"})],Xe.prototype,"disabled",2);st([$({converter:Fn,reflect:!0,attribute:"aria-current"})],Xe.prototype,"current",2);st([$({converter:Fn,reflect:!0,attribute:"aria-checked"})],Xe.prototype,"checked",1);let Ci=Xe;const ic=(t,e)=>{const i=document.createElement(Ci.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};Ci.ensureDefined();const ci="web application/json";class nc{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:ci});navigator.clipboard.write([new ClipboardItem({[ci]:r})])}}async readFromClipboard(e){const i=await navigator.clipboard.read();for(const s of i)if(s.types.includes(ci)){const r=await(await s.getType(ci)).text(),o=JSON.parse(r);Array.isArray(o)&&e(o)}}}const sc=":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 rc{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 u=r.addedIndexes;u&&e.removeTokens(u.map(p=>s.get(p)))}s.clear()};e.addEventListener("dragstart",r=>{const o=r.target;if(o instanceof Ci){if(o.disabled){r.preventDefault();return}e.setAttribute("drag-source",""),o.setAttribute("aria-checked","true");const u=e.querySelectorAll("[slot='items'][aria-checked='true']");if(u.length>0){const p=Array.from(u).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",u.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 u=JSON.parse(o);Array.isArray(u)&&(r.addedIndexes=i(u),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 oc=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&&oc(e,i,n),n};function ac(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=ic,this._autoSuggestItemGenerator=vr,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=ac(this.showFilteredTokenSuggestions.bind(this),200)}static get styles(){return mt(sc)}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
594
|
<slot name="items"
|
|
592
|
-
>${this.placeholder?
|
|
595
|
+
>${this.placeholder?de`<span part="remove-only-placeholder" class="placeholder"
|
|
593
596
|
>${this.placeholder}</span
|
|
594
|
-
>`:
|
|
597
|
+
>`:K}</slot
|
|
595
598
|
>
|
|
596
599
|
</div>
|
|
597
|
-
<slot class="additonal-content" name="additional-content" @focusin=${this.clearCheckedTokens}></slot>`:
|
|
600
|
+
<slot class="additonal-content" name="additional-content" @focusin=${this.clearCheckedTokens}></slot>`:de`
|
|
598
601
|
<sd-lit-input
|
|
599
602
|
class="input"
|
|
600
603
|
.extendedPrefix=${!0}
|
|
@@ -611,35 +614,38 @@ export function getItems(): ExtendedTokenData[] {
|
|
|
611
614
|
><div class="token-wrapper" slot="prefix"><slot name="items"></slot></div>
|
|
612
615
|
</sd-lit-input>
|
|
613
616
|
<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 i=t.relatedTarget;!this.contains(i)&&!this.shadowRoot.contains(i)&&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(i=>!i.disabled).map(i=>i.index))}else if(this.activeTokenIndex!=-1){const t=this.activeTokenElement;t&&!t.disabled&&this.removeTokens([t.index])}}}updateActiveToken(e){var i;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&&((i=this.inputElement)==null||i.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 i=this.tokenSuggestPopover.focusedSuggestToken;if(i){if(!i.disabled){const s=this.findIndex(i);this.handleTokenSelection([s]),this.tokenSuggestPopover.hide()}return}}if(!(e!=null&&e.trim()))return;const t=this.items.findIndex(i=>this.caseSensitive?i.caption==e:i.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",i=>this.handleInputValueChange(i)),t.addEventListener("keydown",i=>this.handleInputKeyDown(i,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 i=[];this.selectionMode=="remove-only"?i=this.items.map(s=>this.disableIfNeeded(s)):this.selectedIndexes.forEach(s=>{i.push(this.disableIfNeeded(this.items[s]))}),i.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(i=>this.selectedIndexes.includes(i));t.length>0&&(this.selectedIndexes=this.selectedIndexes.filter(i=>!t.includes(i)),this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:t,selectedIndices:[...this.selectedIndexes]}})))}}onTokenClick(e,t,i){let s;this.querySelectorAll("[slot='items']").forEach((r,o)=>{e==r?s=o:i||r.setAttribute("aria-checked","false")}),this.activeTokenIndex=s,this.setAttribute("aria-activedescendant",this.activeTokenElement.id),this._tokenSuggestPopover&&this._tokenSuggestPopover.isOpened&&this._tokenSuggestPopover.hide(),i||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=()=>{$i.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:n=>n=="true",toAttribute:n=>n},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:li.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(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Kl(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function i(){return this instanceof i?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(n).forEach(function(i){var s=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:function(){return n[i]}})}),t}var On={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}};On.exports=ar();On.exports.createColors=ar;var Zl=On.exports;const Xl={},Jl=Object.freeze(Object.defineProperty({__proto__:null,default:Xl},Symbol.toStringTag,{value:"Module"})),ye=Kl(Jl);let gs=Zl,ms=ye,nn=class lr extends Error{constructor(e,t,i,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 i<"u"&&(typeof t=="number"?(this.line=t,this.column=i):(this.line=t.line,this.column=t.column,this.endLine=i.line,this.endColumn=i.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 i=t.split(/\r?\n/),s=Math.max(this.line-3,0),r=Math.min(this.line+2,i.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 i.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
|
-
|
|
617
|
+
`}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 nc(this,()=>this.inputElement?.value,i=>this.selectOrAddItems(i)),new rc(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 Jl(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,u)=>this.onTokenClick(r,!0,u)),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=()=>{Ci.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:fi.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 nd=Ee;function Or(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function lc(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 di={exports:{}},Ls;function cc(){if(Ls)return di.exports;Ls=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 di.exports=e(),di.exports.createColors=e,di.exports}const dc={},uc=Object.freeze(Object.defineProperty({__proto__:null,default:dc},Symbol.toStringTag,{value:"Module"})),Pe=lc(uc);var Gi,Ps;function Hn(){if(Ps)return Gi;Ps=1;let t=cc(),e=Pe;class i extends Error{constructor(n,r,o,u,p,h){super(n),this.name="CssSyntaxError",this.reason=n,p&&(this.file=p),u&&(this.source=u),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,u=l=>l,p=l=>l;if(n){let{bold:l,gray:f,red:g}=t.createColors(!0);u=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),d=Math.min(this.line+2,h.length),c=String(d).length;return h.slice(a,d).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 u(">")+o(v)+p(b)+`
|
|
618
|
+
`+E+u("^")}let x=o(v.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+o(v)+p(l)+`
|
|
619
|
+
`+x+u("^")}return" "+o(v)+p(l)}).join(`
|
|
620
|
+
`)}toString(){let n=this.showSourceCode();return n&&(n=`
|
|
617
621
|
|
|
618
|
-
`+
|
|
619
|
-
`),this.name+": "+this.message+
|
|
622
|
+
`+n+`
|
|
623
|
+
`),this.name+": "+this.message+n}}return Gi=i,i.default=i,Gi}var Ki,Ms;function Tr(){if(Ms)return Ki;Ms=1;const t={after:`
|
|
620
624
|
`,beforeClose:`
|
|
621
625
|
`,beforeComment:`
|
|
622
626
|
`,beforeDecl:`
|
|
623
627
|
`,beforeOpen:" ",beforeRule:`
|
|
624
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
625
|
-
`)){let
|
|
626
|
-
`)&&(
|
|
627
|
-
`)&&(
|
|
628
|
-
`)&&(
|
|
629
|
-
`)&&(
|
|
630
|
-
`);return
|
|
631
|
-
`?(
|
|
632
|
-
`);i=new Array(r.length);let o=0;for(let a=0,l=r.length;a<l;a++)i[a]=o,o+=r[a].length+1;this[Vi]=i}t=i[i.length-1];let s=0;if(e>=t)s=i.length-1;else{let r=i.length-2,o;for(;s<r;)if(o=s+(r-s>>1),e<i[o])r=o-1;else if(e>=i[o+1])s=o+1;else{s=o;break}}return{col:e-i[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:un(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,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 i=="number"&&(a=r.originalPositionFor({column:s,line:i}));let l;dn(o.source)?l=Jt(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||Jt(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 Ti=bi;bi.default=bi;qi&&qi.registerInput&&qi.registerInput(bi);let{SourceMapConsumer:ur,SourceMapGenerator:ui}=ye,{dirname:hi,relative:hr,resolve:pr,sep:fr}=ye,{pathToFileURL:Es}=ye,bc=Ti,yc=!!(ur&&ui),wc=!!(hi&&pr&&hr&&fr),xc=class{constructor(e,t,i,s){this.stringify=e,this.mapOpts=i.map||{},this.root=t,this.opts=i,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=`
|
|
628
|
+
`,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,u=n.params?this.rawValue(n,"params"):"";if(typeof n.raws.afterName<"u"?o+=n.raws.afterName:u&&(o+=" "),n.nodes)this.block(n,o+u);else{let p=(n.raws.between||"")+(r?";":"");this.builder(o+u+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 u=n.parent,p=0;for(;u&&u.type!=="root";)p+=1,u=u.parent;if(o.includes(`
|
|
629
|
+
`)){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 u;n.nodes&&n.nodes.length?(this.body(n),u=this.raw(n,"after")):u=this.raw(n,"after","emptyBody"),u&&this.builder(u),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 u=0;u<n.nodes.length;u++){let p=n.nodes[u],h=this.raw(p,"before");h&&this.builder(h),this.stringify(p,r!==u||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"),u=n.prop+o+this.rawValue(n,"value");n.important&&(u+=n.raws.important||" !important"),r&&(u+=";"),this.builder(u,n)}document(n){this.body(n)}raw(n,r,o){let u;if(o||(o=r),r&&(u=n.raws[r],typeof u<"u"))return u;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]?u=this[a](h,n):h.walk(d=>{if(u=d.raws[r],typeof u<"u")return!1})}return typeof u>"u"&&(u=t[o]),h.rawCache[o]=u,u}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(`
|
|
630
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawBeforeComment(n,r){let o;return n.walkComments(u=>{if(typeof u.raws.before<"u")return o=u.raws.before,o.includes(`
|
|
631
|
+
`)&&(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(u=>{if(typeof u.raws.before<"u")return o=u.raws.before,o.includes(`
|
|
632
|
+
`)&&(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(`
|
|
633
|
+
`)&&(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 u=o.parent;if(u&&u!==n&&u.parent&&u.parent===n&&typeof o.raws.before<"u"){let p=o.raws.before.split(`
|
|
634
|
+
`);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],u=n.raws[r];return u&&u.value===o?u.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 Ki=i,i.default=i,Ki}var Zi,Ns;function Oi(){if(Ns)return Zi;Ns=1;let t=Tr();function e(i,s){new t(s).stringify(i)}return Zi=e,e.default=e,Zi}var ui={},Ds;function Wn(){return Ds||(Ds=1,ui.isClean=Symbol("isClean"),ui.my=Symbol("my")),ui}var Ji,js;function Ti(){if(js)return Ji;js=1;let t=Hn(),e=Tr(),i=Oi(),{isClean:s,my:n}=Wn();function r(p,h){let a=new p.constructor;for(let d in p){if(!Object.prototype.hasOwnProperty.call(p,d)||d==="proxyCache")continue;let c=p[d],l=typeof c;d==="parent"&&l==="object"?h&&(a[d]=h):d==="source"?a[d]=c:Array.isArray(c)?a[d]=c.map(f=>r(f,a)):(l==="object"&&c!==null&&(c=r(c)),a[d]=c)}return a}function o(p,h){if(h&&typeof h.offset<"u")return h.offset;let a=1,d=1,c=0;for(let l=0;l<p.length;l++){if(d===h.line&&a===h.column){c=l;break}p[l]===`
|
|
635
|
+
`?(a=1,d+=1):a+=1}return c}class u{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 d of h[a])typeof d.clone=="function"?this.append(d.clone()):this.append(d)}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 d in h)a[d]=h[d];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:d,start:c}=this.rangeBy(a);return this.source.input.error(h,{column:c.column,line:c.line},{column:d.column,line:d.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,d){return h[a]===d||(h[a]=d,(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 d="document"in this.source.input?this.source.input.document:this.source.input.css,l=d.slice(o(d,this.source.start),o(d,this.source.end)).indexOf(h.word);l!==-1&&(a=this.positionInside(l))}return a}positionInside(h){let a=this.source.start.column,d=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]===`
|
|
636
|
+
`?(a=1,d+=1):a+=1;return{column:a,line:d,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,d={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:d.column+1,line:d.line,offset:d.offset+1};if(h.word){let f=a.slice(o(a,this.source.start),o(a,this.source.end)).indexOf(h.word);f!==-1&&(d=this.positionInside(f),c=this.positionInside(f+h.word.length))}else h.start?d={column:h.start.column,line:h.start.line,offset:o(a,h.start)}:h.index&&(d=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<d.line||c.line===d.line&&c.column<=d.column)&&(c={column:d.column+1,line:d.line,offset:d.offset+1}),{end:c,start:d}}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,d=!1;for(let c of h)c===this?d=!0:d?(this.parent.insertAfter(a,c),a=c):this.parent.insertBefore(a,c);d||this.remove()}return this}root(){let h=this;for(;h.parent&&h.parent.type!=="document";)h=h.parent;return h}toJSON(h,a){let d={},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))d[f]=g.map(v=>typeof v=="object"&&v.toJSON?v.toJSON(null,a):v);else if(typeof g=="object"&&g.toJSON)d[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++),d[f]={end:g.end,inputId:v,start:g.start}}else d[f]=g}return c&&(d.inputs=[...a.keys()].map(f=>f.toJSON())),d}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,d=>{a+=d}),a}warn(h,a,d={}){let c={node:this};for(let l in d)c[l]=d[l];return h.warn(a,c)}}return Ji=u,u.default=u,Ji}var Xi,Bs;function $i(){if(Bs)return Xi;Bs=1;let t=Ti();class e extends t{constructor(s){super(s),this.type="comment"}}return Xi=e,e.default=e,Xi}var Yi,zs;function Ri(){if(zs)return Yi;zs=1;let t=Ti();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 Yi=e,e.default=e,Yi}var Qi,Us;function vt(){if(Us)return Qi;Us=1;let t=$i(),e=Ri(),i=Ti(),{isClean:s,my:n}=Wn(),r,o,u,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 d 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]||d.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 d.registerParse=c=>{o=c},d.registerRule=c=>{p=c},d.registerAtRule=c=>{r=c},d.registerRoot=c=>{u=c},Qi=d,d.default=d,d.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,u.prototype),c[n]=!0,c.nodes&&c.nodes.forEach(l=>{d.rebuild(l)})},Qi}var en,qs;function Vn(){if(qs)return en;qs=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 en=e,e.default=e,t.registerAtRule(e),en}var tn,Fs;function Gn(){if(Fs)return tn;Fs=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},tn=s,s.default=s,tn}var nn,Hs;function hc(){if(Hs)return nn;Hs=1;let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return nn={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="",u=r|0;for(;u--;)o+=s[Math.random()*s.length|0];return o}},nn}var sn,Ws;function $r(){if(Ws)return sn;Ws=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 u{constructor(h,a){if(a.map===!1)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let d=a.map?a.map.prev:void 0,c=this.loadMap(a.from,d);!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,/,d=/^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(d);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 d=h.lastIndexOf(a.pop()),c=h.indexOf("*/",d);d>-1&&c>-1&&(this.annotation=this.getAnnotationURL(h.substring(d,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 d=a(h);if(d){let c=this.loadFile(d);if(!c)throw new Error("Unable to load previous source map: "+d.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 d=this.annotation;return h&&(d=s(i(h),d)),this.loadFile(d)}}}startWith(h,a){return h?h.substr(0,a.length)===a:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return sn=u,u.default=u,sn}var rn,Vs;function Li(){if(Vs)return rn;Vs=1;let{nanoid:t}=hc(),{isAbsolute:e,resolve:i}=Pe,{SourceMapConsumer:s,SourceMapGenerator:n}=Pe,{fileURLToPath:r,pathToFileURL:o}=Pe,u=Hn(),p=$r(),h=Pe,a=Symbol("lineToIndexCache"),d=!!(s&&n),c=!!(i&&e);function l(g){if(g[a])return g[a];let v=g.css.split(`
|
|
637
|
+
`),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&&d){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,S,R;if(x&&typeof x=="object"){let I=x,F=k;if(typeof I.offset=="number"){S=I.offset;let U=this.fromOffset(S);x=U.line,k=U.col}else x=I.line,k=I.column,S=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)S=this.fromLineAndColumn(x,k);else{S=x;let I=this.fromOffset(S);x=I.line,k=I.col}let M=this.origin(x,k,b,y);return M?R=new u(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 u(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:S,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 S;e(b.source)?S=o(b.source):S=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:S.toString()};if(S.protocol==="file:")if(r)R.file=r(S);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 rn=f,f.default=f,h&&h.registerInput&&h.registerInput(f),rn}var on,Gs;function Yt(){if(Gs)return on;Gs=1;let t=vt(),e,i;class s extends t{constructor(r){super(r),this.type="root",this.nodes||(this.nodes=[])}normalize(r,o,u){let p=super.normalize(r);if(o){if(u==="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 u=this.index(r);return!o&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].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},on=s,s.default=s,t.registerRoot(s),on}var an,Ks;function Rr(){if(Ks)return an;Ks=1;let t={comma(e){return t.split(e,[","],!0)},space(e){let i=[" ",`
|
|
638
|
+
`," "];return t.split(e,i)},split(e,i,s){let n=[],r="",o=!1,u=0,p=!1,h="",a=!1;for(let d of e)a?a=!1:d==="\\"?a=!0:p?d===h&&(p=!1):d==='"'||d==="'"?(p=!0,h=d):d==="("?u+=1:d===")"?u>0&&(u-=1):u===0&&i.includes(d)&&(o=!0),o?(r!==""&&n.push(r.trim()),r="",o=!1):r+=d;return(s||r!=="")&&n.push(r.trim()),n}};return an=t,t.default=t,an}var ln,Zs;function Kn(){if(Zs)return ln;Zs=1;let t=vt(),e=Rr();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 ln=i,i.default=i,t.registerRule(i),ln}var cn,Js;function pc(){if(Js)return cn;Js=1;let t=Vn(),e=$i(),i=Ri(),s=Li(),n=$r(),r=Yt(),o=Kn();function u(p,h){if(Array.isArray(p))return p.map(c=>u(c));let{inputs:a,...d}=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(d.nodes&&(d.nodes=p.nodes.map(c=>u(c,h))),d.source){let{inputId:c,...l}=d.source;d.source=l,c!=null&&(d.source.input=h[c])}if(d.type==="root")return new r(d);if(d.type==="decl")return new i(d);if(d.type==="rule")return new o(d);if(d.type==="comment")return new e(d);if(d.type==="atrule")return new t(d);throw new Error("Unknown node type: "+p.type)}return cn=u,u.default=u,cn}var dn,Xs;function Lr(){if(Xs)return dn;Xs=1;let{dirname:t,relative:e,resolve:i,sep:s}=Pe,{SourceMapConsumer:n,SourceMapGenerator:r}=Pe,{pathToFileURL:o}=Pe,u=Li(),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
639
|
`;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=i,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 i=this.opts.to?hi(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=hi(pr(i,this.mapOpts.annotation)));let s=hr(i,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 i=t.source.input.from;if(i&&!e[i]){e[i]=!0;let s=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));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 i=Es(e).toString();return this.memoizedFileURLs.set(e,i),i}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 i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}};var gr=xc;let kc=Ci,hn=class extends kc{constructor(e){super(e),this.type="comment"}};var Li=hn;hn.default=hn;let{isClean:mr,my:vr}=Ht,br=Oi,yr=Li,Ec=Ci,wr,Ln,Rn,xr;function kr(n){return n.map(e=>(e.nodes&&(e.nodes=kr(e.nodes)),delete e.source,e))}function Er(n){if(n[mr]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)Er(e)}let Oe=class Sr extends Ec{append(...e){for(let t of e){let i=this.normalize(t,this.last);for(let s of i)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(),i,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(i=this.indexes[t],s=e(this.proxyOf.nodes[i],i),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")?(...i)=>e[t](...i.map(s=>typeof s=="function"?(r,o)=>s(r.toProxy(),o):s)):t==="every"||t==="some"?i=>e[t]((s,...r)=>i(s.toProxy(),...r)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(i=>i.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,i){return e[t]===i||(e[t]=i,(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 i=this.index(e),s=this.normalize(t,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let o of s)this.proxyOf.nodes.splice(i+1,0,o);let r;for(let o in this.indexes)r=this.indexes[o],i<r&&(this.indexes[o]=r+s.length);return this.markDirty(),this}insertBefore(e,t){let i=this.index(e),s=i===0?"prepend":!1,r=this.normalize(t,this.proxyOf.nodes[i],s).reverse();i=this.index(e);for(let a of r)this.proxyOf.nodes.splice(i,0,a);let o;for(let a in this.indexes)o=this.indexes[a],i<=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 Ln(e)];else if(e.name)e=[new Rn(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 i=this.normalize(t,this.first,"prepend").reverse();for(let s of i)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+i.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 i in this.indexes)t=this.indexes[i],t>=e&&(this.indexes[i]=t-1);return this.markDirty(),this}replaceValues(e,t,i){return i||(i=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,i))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,i)=>{let s;try{s=e(t,i)}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((i,s)=>{if(i.type==="atrule"&&e.test(i.name))return t(i,s)}):this.walk((i,s)=>{if(i.type==="atrule"&&i.name===e)return t(i,s)}):(t=e,this.walk((i,s)=>{if(i.type==="atrule")return t(i,s)}))}walkComments(e){return this.walk((t,i)=>{if(t.type==="comment")return e(t,i)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((i,s)=>{if(i.type==="decl"&&e.test(i.prop))return t(i,s)}):this.walk((i,s)=>{if(i.type==="decl"&&i.prop===e)return t(i,s)}):(t=e,this.walk((i,s)=>{if(i.type==="decl")return t(i,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((i,s)=>{if(i.type==="rule"&&e.test(i.selector))return t(i,s)}):this.walk((i,s)=>{if(i.type==="rule"&&i.selector===e)return t(i,s)}):(t=e,this.walk((i,s)=>{if(i.type==="rule")return t(i,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=n=>{wr=n};Oe.registerRule=n=>{Ln=n};Oe.registerAtRule=n=>{Rn=n};Oe.registerRoot=n=>{xr=n};var Xe=Oe;Oe.default=Oe;Oe.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,Rn.prototype):n.type==="rule"?Object.setPrototypeOf(n,Ln.prototype):n.type==="decl"?Object.setPrototypeOf(n,br.prototype):n.type==="comment"?Object.setPrototypeOf(n,yr.prototype):n.type==="root"&&Object.setPrototypeOf(n,xr.prototype),n[vr]=!0,n.nodes&&n.nodes.forEach(e=>{Oe.rebuild(e)})};let Sc=Xe,_r,Ar,Lt=class extends Sc{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new _r(new Ar,this,e).stringify()}};Lt.registerLazyResult=n=>{_r=n};Lt.registerProcessor=n=>{Ar=n};var Pn=Lt;Lt.default=Lt;let pn=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let i=t.node.rangeBy(t);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in t)this[i]=t[i]}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=pn;pn.default=pn;let _c=$r,fn=class{constructor(e,t,i){this.processor=e,this.messages=[],this.root=t,this.opts=i,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 i=new _c(e,t);return this.messages.push(i),i}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Mn=fn;fn.default=fn;const Gi=39,Ss=34,Yt=92,_s=47,Qt=10,wt=32,ei=12,ti=9,ii=13,Ac=91,$c=93,Ic=40,Cc=41,Oc=123,Tc=125,Lc=59,Rc=42,Pc=58,Mc=64,ni=/[\t\n\f\r "#'()/;[\\\]{}]/g,si=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Dc=/.[\r\n"'(/\\]/,As=/[\da-f]/i;var Nc=function(e,t={}){let i=e.css.valueOf(),s=t.ignoreErrors,r,o,a,l,c,d,h,p,m,E,w=i.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=i.charCodeAt(f),r){case Qt:case wt:case ti:case ii:case ei:{o=f;do o+=1,r=i.charCodeAt(o);while(r===wt||r===Qt||r===ti||r===ii||r===ei);E=["space",i.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=i.charCodeAt(f+1),p==="url"&&m!==Gi&&m!==Ss&&m!==wt&&m!==Qt&&m!==ti&&m!==ei&&m!==ii){o=f;do{if(d=!1,o=i.indexOf(")",o+1),o===-1)if(s||O){o=f;break}else x("bracket");for(h=o;i.charCodeAt(h-1)===Yt;)h-=1,d=!d}while(d);E=["brackets",i.slice(f,o+1),f,o],f=o}else o=i.indexOf(")",f+1),l=i.slice(f,o+1),o===-1||Dc.test(l)?E=["(","(",f]:(E=["brackets",l,f,o],f=o);break}case Gi:case Ss:{a=r===Gi?"'":'"',o=f;do{if(d=!1,o=i.indexOf(a,o+1),o===-1)if(s||O){o=f+1;break}else x("string");for(h=o;i.charCodeAt(h-1)===Yt;)h-=1,d=!d}while(d);E=["string",i.slice(f,o+1),f,o],f=o;break}case Mc:{ni.lastIndex=f+1,ni.test(i),ni.lastIndex===0?o=i.length-1:o=ni.lastIndex-2,E=["at-word",i.slice(f,o+1),f,o],f=o;break}case Yt:{for(o=f,c=!0;i.charCodeAt(o+1)===Yt;)o+=1,c=!c;if(r=i.charCodeAt(o+1),c&&r!==_s&&r!==wt&&r!==Qt&&r!==ti&&r!==ii&&r!==ei&&(o+=1,As.test(i.charAt(o)))){for(;As.test(i.charAt(o+1));)o+=1;i.charCodeAt(o+1)===wt&&(o+=1)}E=["word",i.slice(f,o+1),f,o],f=o;break}default:{r===_s&&i.charCodeAt(f+1)===Rc?(o=i.indexOf("*/",f+2)+1,o===0&&(s||O?o=i.length:x("comment")),E=["comment",i.slice(f,o+1),f,o],f=o):(si.lastIndex=f+1,si.test(i),si.lastIndex===0?o=i.length-1:o=si.lastIndex-2,E=["word",i.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,yi=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 Dn=yi;yi.default=yi;Ir.registerAtRule(yi);let Cr=Xe,Or,Tr,ht=class extends Cr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,i){let s=super.normalize(e);if(t){if(i==="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 i=this.index(e);return!t&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}toResult(e={}){return new Or(new Tr,this,e).stringify()}};ht.registerLazyResult=n=>{Or=n};ht.registerProcessor=n=>{Tr=n};var Wt=ht;ht.default=ht;Cr.registerRoot(ht);let Rt={comma(n){return Rt.split(n,[","],!0)},space(n){let e=[" ",`
|
|
637
|
-
`," "];return Rt.split(n,e)},split(n,e,t){let i=[],s="",r=!1,o=0,a=!1,l="",c=!1;for(let d of n)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!==""&&i.push(s.trim()),s="",r=!1):s+=d;return(t||s!=="")&&i.push(s.trim()),i}};var Lr=Rt;Rt.default=Rt;let Rr=Xe,jc=Lr,wi=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,i=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}};var Nn=wi;wi.default=wi;Rr.registerRule(wi);let Bc=Oi,zc=Nc,Uc=Li,Fc=Dn,Hc=Wt,$s=Nn;const Is={empty:!0,space:!0};function Wc(n){for(let e=n.length-1;e>=0;e--){let t=n[e],i=t[3]||t[2];if(i)return i}}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 i,s,r,o=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="["?c.push(i==="("?")":"]"):i==="{"&&c.length>0?c.push("}"):i===c[c.length-1]&&c.pop(),c.length===0)if(i===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){a=!0;break}else if(i==="}"){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 i=0,s;for(let r=t-1;r>=0&&(s=e[r],!(s[0]!=="space"&&(i+=1,i===2)));r--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,i,s,r;for(let[o,a]of e.entries()){if(i=a,s=i[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=i}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 i=e[1].slice(2,-2);if(/^\s*$/.test(i))t.text="",t.raws.left=i,t.raws.right="";else{let s=i.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 i=new Bc;this.init(i,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(s[3]||s[2]||Wc(e)),i.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let r;for(;e.length;)if(r=e.shift(),r[0]===":"){i.raws.between+=r[1];break}else r[0]==="word"&&/\w/.test(r[1])&&this.unknownWord([r]),i.raws.between+=r[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.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"){i.important=!0;let d=this.stringFrom(e,c);d=this.spacesFromEnd(e)+d,d!==" !important"&&(i.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&&(i.important=!0,i.raws.important=h,e=d)}if(r[0]!=="space"&&r[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(i.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(i,"value",o.concat(e),t),i.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,i=null,s=!1,r=null,o=[],a=e[1].startsWith("--"),l=[],c=e;for(;c;){if(i=c[0],l.push(c),i==="("||i==="[")r||(r=c),o.push(i==="("?")":"]");else if(a&&s&&i==="{")r||(r=c),o.push("}");else if(o.length===0)if(i===";")if(s){this.decl(l,a);return}else break;else if(i==="{"){this.rule(l);return}else if(i==="}"){this.tokenizer.back(l.pop()),t=!0;break}else i===":"&&(s=!0);else i===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,i,s){let r,o,a=i.length,l="",c=!0,d,h;for(let p=0;p<a;p+=1)r=i[p],o=r[0],o==="space"&&p===a-1&&!s?c=!1:o==="comment"?(h=i[p-1]?i[p-1][0]:"empty",d=i[p+1]?i[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=i.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,i="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let t,i="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)i+=e.shift()[1];return i}spacesFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],t==="space");)i=e.pop()[1]+i;return i}stringFrom(e,t){let i="";for(let s=t;s<e.length;s++)i+=e[s][1];return e.splice(t,e.length-t),i}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=Ti;function xi(n,e){let t=new Zc(n,e),i=new Kc(t);try{i.parse()}catch(s){throw s}return i.root}var jn=xi;xi.default=xi;Gc.registerParse(xi);let{isClean:Ee,my:Xc}=Ht,Jc=gr,Yc=Ii,Qc=Xe,ed=Pn,Cs=Mn,td=jn,id=Wt;const nd={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(n){return typeof n=="object"&&typeof n.then=="function"}function Pr(n){let e=!1,t=nd[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,pt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,pt,t+"Exit"]:[t,t+"Exit"]}function Os(n){let e;return n.type==="document"?e=["Document",pt,"DocumentExit"]:n.type==="root"?e=["Root",pt,"RootExit"]:e=Pr(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}function gn(n){return n[Ee]=!1,n.nodes&&n.nodes.forEach(e=>gn(e)),n}let mn={},ft=class Mr{constructor(e,t,i){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=gn(t);else if(t instanceof Mr||t instanceof Cs)s=gn(t.root),t.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=t.map);else{let r=td;i.syntax&&(r=i.syntax.parse),i.parser&&(r=i.parser),r.parse&&(r=r.parse);try{s=r(t,i)}catch(o){this.processed=!0,this.error=o}s&&!s[Xc]&&Qc.rebuild(s)}this.result=new Cs(e,s,i),this.helpers={...mn,postcss:mn,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 i=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=i.postcssPlugin,e.setMessage()):i.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,i,s)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let i in t){if(!sd[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!rd[i])if(typeof t[i]=="object")for(let s in t[i])s==="*"?e(t,i,t[i][s]):e(t,i+"-"+s.toLowerCase(),t[i][s]);else typeof t[i]=="function"&&e(t,i,t[i])}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],i=this.runOnRoot(t);if(xt(i))try{await i}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 i=this.visitTick(t);if(xt(i))try{await i}catch(s){let r=t[t.length-1].node;throw this.handleError(s,r)}}}if(this.listeners.OnceExit)for(let[t,i]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(r=>i(r,this.helpers));await Promise.all(s)}else await i(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(i=>e.Once(i,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[i,s]of e){this.result.lastPlugin=i;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:i,visitors:s}=t;if(i.type!=="root"&&i.type!=="document"&&!i.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(i.toProxy(),this.helpers)}catch(l){throw this.handleError(l,i)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=i.nodes[i.indexes[o]];)if(i.indexes[o]+=1,!a[Ee]){a[Ee]=!0,e.push(Os(a));return}t.iterator=0,delete i.indexes[o]}let r=t.events;for(;t.eventIndex<r.length;){let o=r[t.eventIndex];if(t.eventIndex+=1,o===pt){i.nodes&&i.nodes.length&&(i[Ee]=!0,t.iterator=i.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 i of t)if(i===pt)e.nodes&&e.each(s=>{s[Ee]||this.walkSync(s)});else{let s=this.listeners[i];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=n=>{mn=n};var Dr=ft;ft.default=ft;id.registerLazyResult(ft);ed.registerLazyResult(ft);let od=gr,ad=Ii,ld=jn;const cd=Mn;let vn=class{constructor(e,t,i){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=i,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(i){this.error=i}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var dd=vn;vn.default=vn;let ud=dd,hd=Dr,pd=Pn,fd=Wt,Pt=class{constructor(e=[]){this.version="8.4.32",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let i of e)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)t.push(i);else if(typeof i=="function")t.push(i);else if(!(typeof i=="object"&&(i.parse||i.stringify)))throw new Error(i+" 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=Pt;Pt.default=Pt;fd.registerProcessor(Pt);pd.registerProcessor(Pt);let md=Oi,vd=dr,bd=Li,yd=Dn,wd=Ti,xd=Wt,kd=Nn;function Mt(n,e){if(Array.isArray(n))return n.map(s=>Mt(s));let{inputs:t,...i}=n;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(i.nodes&&(i.nodes=n.nodes.map(s=>Mt(s,e))),i.source){let{inputId:s,...r}=i.source;i.source=r,s!=null&&(i.source.input=e[s])}if(i.type==="root")return new xd(i);if(i.type==="decl")return new md(i);if(i.type==="rule")return new kd(i);if(i.type==="comment")return new bd(i);if(i.type==="atrule")return new yd(i);throw new Error("Unknown node type: "+n.type)}var Ed=Mt;Mt.default=Mt;var Ts={};let Sd=Tn,Nr=Oi,_d=Dr,Ad=Xe,Bn=gd,$d=Ii,Id=Ed,jr=Pn,Cd=$r,Br=Li,zr=Dn,Od=Mn,Td=Ti,Ld=jn,Rd=Lr,Ur=Nn,Fr=Wt,Pd=Ci;function P(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new Bn(n)}P.plugin=function(e,t){let i=!1;function s(...o){console&&console.warn&&!i&&(i=!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 Bn().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=n=>new Br(n);P.atRule=n=>new zr(n);P.decl=n=>new Nr(n);P.rule=n=>new Ur(n);P.root=n=>new Fr(n);P.document=n=>new jr(n);P.CssSyntaxError=Sd;P.Declaration=Nr;P.Container=Ad;P.Processor=Bn;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,i=/\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,i+c,o.source.input.file,a):i+c))})}};function Ls(n,e){return e.some(t=>t instanceof RegExp?t.test(n):n.includes(t))}function Nd(n,e){return e.some(t=>t instanceof RegExp?t.test(n):n===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(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Hr(n){return n instanceof Map?n.clear=n.delete=n.set=function(){throw new Error("map is read-only")}:n instanceof Set&&(n.add=n.clear=n.delete=function(){throw new Error("set is read-only")}),Object.freeze(n),Object.getOwnPropertyNames(n).forEach(e=>{const t=n[e],i=typeof t;(i==="object"||i==="function")&&!Object.isFrozen(t)&&Hr(t)}),n}class Rs{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Wr(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Me(n,...e){const t=Object.create(null);for(const i in n)t[i]=n[i];return e.forEach(function(i){for(const s in i)t[s]=i[s]}),t}const Fd="</span>",Ps=n=>!!n.scope,Hd=(n,{prefix:e})=>{if(n.startsWith("language:"))return n.replace("language:","language-");if(n.includes(".")){const t=n.split(".");return[`${e}${t.shift()}`,...t.map((i,s)=>`${i}${"_".repeat(s+1)}`)].join(" ")}return`${e}${n}`};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=(n={})=>{const e={children:[]};return Object.assign(e,n),e};class zn{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(i=>this._walk(e,i)),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=>{zn._collapse(t)}))}}class qd extends zn{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const i=e.root;t&&(i.scope=`language:${t}`),this.add(i)}toHTML(){return new Wd(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Dt(n){return n?typeof n=="string"?n:n.source:null}function qr(n){return Je("(?=",n,")")}function Vd(n){return Je("(?:",n,")*")}function Gd(n){return Je("(?:",n,")?")}function Je(...n){return n.map(e=>Dt(e)).join("")}function Kd(n){const e=n[n.length-1];return typeof e=="object"&&e.constructor===Object?(n.splice(n.length-1,1),e):{}}function Un(...n){return"("+(Kd(n).capture?"":"?:")+n.map(e=>Dt(e)).join("|")+")"}function Vr(n){return new RegExp(n.toString()+"|").exec("").length-1}function Zd(n,e){const t=n&&n.exec(e);return t&&t.index===0}const Xd=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Fn(n,{joinWith:e}){let t=0;return n.map(i=>{t+=1;const s=t;let r=Dt(i),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(i=>`(${i})`).join(e)}const Jd=/\b\B/,Gr="[a-zA-Z]\\w*",Hn="[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=(n={})=>{const e=/^#![ ]*\//;return n.binary&&(n.begin=Je(e,/.*\b/,n.binary,/\b.*/)),Me({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,i)=>{t.index!==0&&i.ignoreMatch()}},n)},Nt={begin:"\\\\[\\s\\S]",relevance:0},eu={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Nt]},tu={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Nt]},iu={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/},Ri=function(n,e,t={}){const i=Me({scope:"comment",begin:n,end:e,contains:[]},t);i.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=Un("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 i.contains.push({begin:Je(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},nu=Ri("//","$"),su=Ri("/\\*","\\*/"),ru=Ri("#","$"),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:[Nt,{begin:/\[/,end:/\]/,relevance:0,contains:[Nt]}]},du={scope:"title",begin:Gr,relevance:0},uu={scope:"title",begin:Hn,relevance:0},hu={begin:"\\.\\s*"+Hn,relevance:0},pu=function(n){return Object.assign(n,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})};var ri=Object.freeze({__proto__:null,APOS_STRING_MODE:eu,BACKSLASH_ESCAPE:Nt,BINARY_NUMBER_MODE:lu,BINARY_NUMBER_RE:Xr,COMMENT:Ri,C_BLOCK_COMMENT_MODE:su,C_LINE_COMMENT_MODE:nu,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:iu,QUOTE_STRING_MODE:tu,REGEXP_MODE:cu,RE_STARTERS_RE:Yd,SHEBANG:Qd,TITLE_MODE:du,UNDERSCORE_IDENT_RE:Hn,UNDERSCORE_TITLE_MODE:uu});function fu(n,e){n.input[n.index-1]==="."&&e.ignoreMatch()}function gu(n,e){n.className!==void 0&&(n.scope=n.className,delete n.className)}function mu(n,e){e&&n.beginKeywords&&(n.begin="\\b("+n.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",n.__beforeBegin=fu,n.keywords=n.keywords||n.beginKeywords,delete n.beginKeywords,n.relevance===void 0&&(n.relevance=0))}function vu(n,e){Array.isArray(n.illegal)&&(n.illegal=Un(...n.illegal))}function bu(n,e){if(n.match){if(n.begin||n.end)throw new Error("begin & end are not supported with match");n.begin=n.match,delete n.match}}function yu(n,e){n.relevance===void 0&&(n.relevance=1)}const wu=(n,e)=>{if(!n.beforeMatch)return;if(n.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},n);Object.keys(n).forEach(i=>{delete n[i]}),n.keywords=t.keywords,n.begin=Je(t.beforeMatch,qr(t.begin)),n.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},n.relevance=0,delete t.beforeMatch},xu=["of","and","for","in","not","or","if","then","parent","list","value"],ku="keyword";function Jr(n,e,t=ku){const i=Object.create(null);return typeof n=="string"?s(t,n.split(" ")):Array.isArray(n)?s(t,n):Object.keys(n).forEach(function(r){Object.assign(i,Jr(n[r],e,r))}),i;function s(r,o){e&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){const l=a.split("|");i[l[0]]=[r,Eu(l[0],l[1])]})}}function Eu(n,e){return e?Number(e):Su(n)?0:1}function Su(n){return xu.includes(n.toLowerCase())}const Ds={},qe=n=>{console.error(n)},Ns=(n,...e)=>{console.log(`WARN: ${n}`,...e)},nt=(n,e)=>{Ds[`${n}/${e}`]||(console.log(`Deprecated as of ${n}. ${e}`),Ds[`${n}/${e}`]=!0)},ki=new Error;function Yr(n,e,{key:t}){let i=0;const s=n[t],r={},o={};for(let a=1;a<=e.length;a++)o[a+i]=s[a],r[a+i]=!0,i+=Vr(e[a-1]);n[t]=o,n[t]._emit=r,n[t]._multi=!0}function _u(n){if(Array.isArray(n.begin)){if(n.skip||n.excludeBegin||n.returnBegin)throw qe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ki;if(typeof n.beginScope!="object"||n.beginScope===null)throw qe("beginScope must be object"),ki;Yr(n,n.begin,{key:"beginScope"}),n.begin=Fn(n.begin,{joinWith:""})}}function Au(n){if(Array.isArray(n.end)){if(n.skip||n.excludeEnd||n.returnEnd)throw qe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ki;if(typeof n.endScope!="object"||n.endScope===null)throw qe("endScope must be object"),ki;Yr(n,n.end,{key:"endScope"}),n.end=Fn(n.end,{joinWith:""})}}function $u(n){n.scope&&typeof n.scope=="object"&&n.scope!==null&&(n.beginScope=n.scope,delete n.scope)}function Iu(n){$u(n),typeof n.beginScope=="string"&&(n.beginScope={_wrap:n.beginScope}),typeof n.endScope=="string"&&(n.endScope={_wrap:n.endScope}),_u(n),Au(n)}function Cu(n){function e(o,a){return new RegExp(Dt(o),"m"+(n.case_insensitive?"i":"")+(n.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(Fn(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 i{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 i;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)),n.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,n.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=Dt(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(n.compilerExtensions||(n.compilerExtensions=[]),n.contains&&n.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return n.classNameAliases=Me(n.classNameAliases||{}),r(n)}function Qr(n){return n?n.endsWithParent||Qr(n.starts):!1}function Ou(n){return n.variants&&!n.cachedVariants&&(n.cachedVariants=n.variants.map(function(e){return Me(n,{variants:null},e)})),n.cachedVariants?n.cachedVariants:Qr(n)?Me(n,{starts:n.starts?Me(n.starts):null}):Object.isFrozen(n)?Me(n):n}var Tu="11.9.0";class Lu extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const Ki=Wr,js=Me,Bs=Symbol("nomatch"),Ru=7,eo=function(n){const e=Object.create(null),t=Object.create(null),i=[];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):(nt("10.7.0","highlight(lang, code, ...args) has been deprecated."),nt("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};ne("before:highlight",Z);const ae=Z.result?Z.result:h(Z.language,Z.code,k);return ae.code=Z.code,ne("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 Mi(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 Mi(y);return _.skip?D+=y:(_.excludeBegin&&(D+=y),W(),!_.returnBegin&&!_.excludeBegin&&(D=y)),we(_,g),_.returnBegin?0:y.length}function Di(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 qt(){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 Vt(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=Di(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 Gt=Cu(le);let vt="",S=I||Gt;const xe={},q=new a.__emitter(a);qt();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),_=Vt(y,g);be=g.index+_}Vt(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:Ki(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:Ki(b),illegal:!1,relevance:0,errorRaised:g,_emitter:q,_top:S};throw g}}function p(u){const b={value:Ki(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(ne("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}),ne("after:highlightElement",{el:u,result:B,text:I})}function f(u){a=js(a,u)}const $=()=>{x(),nt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function T(){x(),nt("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(n)}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,n),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 ie(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){ie(u),i.push(u)}function me(u){const b=i.indexOf(u);b!==-1&&i.splice(b,1)}function ne(u,b){const k=u;i.forEach(function(I){I[k]&&I[k](b)})}function J(u){return nt("10.7.0","highlightBlock will be removed entirely in v12.0"),nt("10.7.0","Please use highlightElement now."),w(u)}Object.assign(n,{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}),n.debugMode=function(){s=!1},n.safeMode=function(){s=!0},n.versionString=Tu,n.regex={concat:Je,lookahead:qr,either:Un,optional:Gd,anyNumberOfTimes:Vd};for(const u in ri)typeof ri[u]=="object"&&Hr(ri[u]);return Object.assign(n,ri),n},gt=eo({});gt.newInstance=()=>eo({});var Pu=gt;gt.HighlightJS=gt;gt.default=gt;const Pi=Ud(Pu),Ei="[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"],io=["true","false","null","undefined","NaN","Infinity"],no=["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,no,so);function Mu(n){const e=n.regex,t=(u,{after:b})=>{const k="</"+u[0].slice(1);return u.input.indexOf(k,b)!==-1},i=Ei,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:Ei,keyword:to,literal:io,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:[n.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},E={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,p],subLanguage:"css"}},w={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},f={className:"string",begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE,p]},$={className:"comment",variants:[n.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:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},T=[n.APOS_STRING_MODE,n.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+/,i,/\s+/,/extends/,/\s+/,e.concat(i,"(",e.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],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:{_:[...no,...so]}},M={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,i,/(?=\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 ie={match:e.concat(/\b/,G([...ro,"super","import"]),i,e.lookahead(/\(/)),className:"title.function",relevance:0},K={begin:e.concat(/\./,e.lookahead(e.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},me={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},ne="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+n.UNDERSCORE_IDENT_RE+")\\s*=>",J={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(ne)],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:[n.SHEBANG({label:"shebang",binary:"node",relevance:5}),M,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,m,E,w,f,$,{match:/\$\d+/},h,R,{className:"attr",begin:i+e.lookahead(":"),relevance:0},J,{begin:"("+n.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[$,n.REGEXP_MODE,{className:"function",begin:ne,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n.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)"+n.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,n.inherit(n.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},K,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},ie,j,C,me,{match:/\$[(.]/}]}}function Du(n){const e=Mu(n),t=Ei,i=["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:i},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:Ei,keyword:to.concat(a),literal:io,built_in:ao.concat(i),"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",n.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(n){const e=n.regex,t=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\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=n.inherit(r,{begin:/\(/,end:/\)/}),a=n.inherit(n.APOS_STRING_MODE,{className:"string"}),l=n.inherit(n.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:i,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]}]}]},n.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=n=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:n.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:[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:n.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(n){const e=n.regex,t=ju(n),i={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=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[t.BLOCK_COMMENT,i,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
|
|
640
|
+
`)&&(l=`\r
|
|
641
|
+
`),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(`
|
|
642
|
+
`),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 u(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 dn=a,dn}var un,Ys;function fc(){if(Ys)return un;Ys=1;const t=39,e=34,i=92,s=47,n=10,r=32,o=12,u=9,p=13,h=91,a=93,d=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 un=function(R,M={}){let I=R.css.valueOf(),F=M.ignoreErrors,U,Q,re,T,oe,H,X,te,le,_e,we=I.length,j=0,Se=[],me=[];function We(){return j}function Me(Ae){throw R.error("Unclosed "+Ae,j)}function Re(){return me.length===0&&j>=we}function Ne(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 u:case p:case o:{T=j;do T+=1,U=I.charCodeAt(T);while(U===r||U===n||U===u||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 d:{if(_e=Se.length?Se.pop()[1]:"",le=I.charCodeAt(j+1),_e==="url"&&le!==t&&le!==e&&le!==r&&le!==n&&le!==u&&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!==u&&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],Se.push(H),j=T);break}}return j++,H}function Ot(Ae){me.push(Ae)}return{back:Ot,endOfFile:Re,nextToken:Ne,position:We}},un}var hn,Qs;function gc(){if(Qs)return hn;Qs=1;let t=Vn(),e=$i(),i=Ri(),s=Yt(),n=Kn(),r=fc();const o={empty:!0,space:!0};function u(h){for(let a=h.length-1;a>=0;a--){let d=h[a],c=d[3]||d[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 d=new t;d.name=a[1].slice(1),d.name===""&&this.unnamedAtrule(d,a),this.init(d,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===";"){d.source.end=this.getPosition(a[2]),d.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&&(d.source.end=this.getPosition(l[3]||l[2]),d.source.end.offset++)}this.end(a);break}else x.push(a);else x.push(a);if(this.tokenizer.endOfFile()){g=!0;break}}d.raws.between=this.spacesAndCommentsFromEnd(x),x.length?(d.raws.afterName=this.spacesAndCommentsFromStart(x),this.raw(d,"params",x),g&&(a=x[x.length-1],d.source.end=this.getPosition(a[3]||a[2]),d.source.end.offset++,this.spaces=d.raws.between,d.raws.between="")):(d.raws.afterName="",d.params=""),v&&(d.nodes=[],this.current=d)}checkMissedSemicolon(a){let d=this.colon(a);if(d===!1)return;let c=0,l;for(let f=d-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 d=0,c,l,f;for(let[g,v]of a.entries()){if(l=v,f=l[0],f==="("&&(d+=1),f===")"&&(d-=1),d===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 d=new e;this.init(d,a[2]),d.source.end=this.getPosition(a[3]||a[2]),d.source.end.offset++;let c=a[1].slice(2,-2);if(/^\s*$/.test(c))d.text="",d.raws.left=c,d.raws.right="";else{let l=c.match(/^(\s*)([^]*\S)(\s*)$/);d.text=l[2],d.raws.left=l[1],d.raws.right=l[3]}}createTokenizer(){this.tokenizer=r(this.input)}decl(a,d){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]||u(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),d),c.value.includes(":")&&!d&&this.checkMissedSemicolon(a)}doubleColon(a){throw this.input.error("Double colon",{offset:a[2]},{offset:a[2]+a[1].length})}emptyRule(a){let d=new n;this.init(d,a[2]),d.selector="",d.raws.between="",this.current=d}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 d=this.current.nodes[this.current.nodes.length-1];d&&d.type==="rule"&&!d.raws.ownSemicolon&&(d.raws.ownSemicolon=this.spaces,this.spaces="",d.source.end=this.getPosition(a[2]),d.source.end.offset+=d.raws.ownSemicolon.length)}}getPosition(a){let d=this.input.fromOffset(a);return{column:d.col,line:d.line,offset:a}}init(a,d){this.current.push(a),a.source={input:this.input,start:this.getPosition(d)},a.raws.before=this.spaces,this.spaces="",a.type!=="comment"&&(this.semicolon=!1)}other(a){let d=!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()),d=!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()&&(d=!0),g.length>0&&this.unclosedBracket(f),d&&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,d,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,S)=>E+S[1],"");a.raws[d]={raw:b,value:x}}a[d]=x}rule(a){a.pop();let d=new n;this.init(d,a[0][2]),d.raws.between=this.spacesAndCommentsFromEnd(a),this.raw(d,"selector",a),this.current=d}spacesAndCommentsFromEnd(a){let d,c="";for(;a.length&&(d=a[a.length-1][0],!(d!=="space"&&d!=="comment"));)c=a.pop()[1]+c;return c}spacesAndCommentsFromStart(a){let d,c="";for(;a.length&&(d=a[0][0],!(d!=="space"&&d!=="comment"));)c+=a.shift()[1];return c}spacesFromEnd(a){let d,c="";for(;a.length&&(d=a[a.length-1][0],d==="space");)c=a.pop()[1]+c;return c}stringFrom(a,d){let c="";for(let l=d;l<a.length;l++)c+=a[l][1];return a.splice(d,a.length-d),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,d){throw this.input.error("At-rule without name",{offset:d[2]},{offset:d[2]+d[1].length})}}return hn=p,hn}var pn,er;function Zn(){if(er)return pn;er=1;let t=vt(),e=Li(),i=gc();function s(n,r){let o=new e(n,r),u=new i(o);try{u.parse()}catch(p){throw p}return u.root}return pn=s,s.default=s,t.registerParse(s),pn}var fn,tr;function Pr(){if(tr)return fn;tr=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 fn=t,t.default=t,fn}var gn,ir;function Jn(){if(ir)return gn;ir=1;let t=Pr();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 gn=e,e.default=e,gn}var mn,nr;function Mr(){if(nr)return mn;nr=1;let t=vt(),e=Gn(),i=Lr(),s=Zn(),n=Jn(),r=Yt(),o=Oi(),{isClean:u,my:p}=Wn();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},d={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[u]=!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 S;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))S=v(b);else if(b instanceof k||b instanceof n)S=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{S=R(b,E)}catch(M){this.processed=!0,this.error=M}S&&!S[p]&&t.rebuild(S)}this.result=new n(y,S,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(S){console&&console.error&&console.error(S)}return y}prepareVisitors(){this.listeners={};let y=(b,E,S)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([b,S])};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(!d[E])if(typeof b[E]=="object")for(let S in b[E])S==="*"?y(b,E,b[E][S]):y(b,E+"-"+S.toLowerCase(),b[E][S]);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(S){throw this.handleError(S)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[u];){y[u]=!0;let b=[g(y)];for(;b.length>0;){let E=this.visitTick(b);if(l(E))try{await E}catch(S){let R=b[b.length-1].node;throw this.handleError(S,R)}}}if(this.listeners.OnceExit)for(let[b,E]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(y.type==="document"){let S=y.nodes.map(R=>E(R,this.helpers));await Promise.all(S)}else await E(y,this.helpers)}catch(S){throw this.handleError(S)}}}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 S=new i(b,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 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[u];)y[u]=!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,S]of y){this.result.lastPlugin=E;let R;try{R=S(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:S}=b;if(E.type!=="root"&&E.type!=="document"&&!E.parent){y.pop();return}if(S.length>0&&b.visitorIndex<S.length){let[M,I]=S[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===S.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[u]){I[u]=!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[u]=!0,b.iterator=E.getIterator());return}else if(this.listeners[M]){b.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[u]=!0;let b=f(y);for(let E of b)if(E===c)y.nodes&&y.each(S=>{S[u]||this.walkSync(S)});else{let S=this.listeners[E];if(S&&this.visitSync(S,y.toProxy()))return}}warnings(){return this.sync().warnings()}}return k.registerPostcss=w=>{x=w},mn=k,k.default=k,r.registerLazyResult(k),e.registerLazyResult(k),mn}var vn,sr;function mc(){if(sr)return vn;sr=1;let t=Lr(),e=Zn();const i=Jn();let s=Oi();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,u=e;try{o=u(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,u,p){u=u.toString(),this.stringified=!1,this._processor=o,this._css=u,this._opts=p,this._map=void 0;let h,a=s;this.result=new i(this._processor,h,this._opts),this.result.css=u;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let c=new t(a,h,this._opts,u);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,u){return this.async().then(o,u)}toString(){return this._css}warnings(){return[]}}return vn=n,n.default=n,vn}var bn,rr;function vc(){if(rr)return bn;rr=1;let t=Gn(),e=Mr(),i=mc(),s=Yt();class n{constructor(o=[]){this.version="8.5.6",this.plugins=this.normalize(o)}normalize(o){let u=[];for(let p of o)if(p.postcss===!0?p=p():p.postcss&&(p=p.postcss),typeof p=="object"&&Array.isArray(p.plugins))u=u.concat(p.plugins);else if(typeof p=="object"&&p.postcssPlugin)u.push(p);else if(typeof p=="function")u.push(p);else if(!(typeof p=="object"&&(p.parse||p.stringify)))throw new Error(p+" is not a PostCSS plugin");return u}process(o,u={}){return!this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new i(this,o,u):new e(this,o,u)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return bn=n,n.default=n,s.registerProcessor(n),t.registerProcessor(n),bn}var yn,or;function bc(){if(or)return yn;or=1;var t={};let e=Vn(),i=$i(),s=vt(),n=Hn(),r=Ri(),o=Gn(),u=pc(),p=Li(),h=Mr(),a=Rr(),d=Ti(),c=Zn(),l=vc(),f=Jn(),g=Yt(),v=Kn(),x=Oi(),k=Pr();function w(...y){return y.length===1&&Array.isArray(y[0])&&(y=y[0]),new l(y)}return w.plugin=function(b,E){let S=!1;function R(...I){console&&console.warn&&!S&&(S=!0,console.warn(b+`: postcss.plugin was deprecated. Migration guide:
|
|
643
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),t.LANG&&t.LANG.startsWith("cn")&&console.warn(b+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
644
|
+
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=u,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=d,h.registerPostcss(w),yn=w,w.default=w,yn}var yc=bc();const Y=Or(yc);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 wn,ar;function wc(){if(ar)return wn;ar=1;const t=(s={})=>{const n=s.prefix,r=/\s+$/.test(n)?n:`${n} `,o=s.ignoreFiles?[].concat(s.ignoreFiles):[],u=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))&&!(u.length&&a&&!e(a,u)))return{Rule(d,{result:c}){const l=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"];d.parent&&l.includes(d.parent.name)||(d.selectors=d.selectors.map(f=>s.exclude&&i(f,s.exclude)?f:s.transform?s.transform(n,f,r+f,h.source.input.file,d):[":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,wn=t,wn}var xc=wc();const kc=Or(xc),Ec="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}",_c="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 Sc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xn,lr;function Ac(){if(lr)return xn;lr=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(_=>{const O=m[_],q=typeof O;(q==="object"||q==="function")&&!Object.isFrozen(O)&&t(O)}),m}class e{constructor(_){_.data===void 0&&(_.data={}),this.data=_.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,..._){const O=Object.create(null);for(const q in m)O[q]=m[q];return _.forEach(function(q){for(const ne in q)O[ne]=q[ne]}),O}const n="</span>",r=m=>!!m.scope,o=(m,{prefix:_})=>{if(m.startsWith("language:"))return m.replace("language:","language-");if(m.includes(".")){const O=m.split(".");return[`${_}${O.shift()}`,...O.map((q,ne)=>`${q}${"_".repeat(ne+1)}`)].join(" ")}return`${_}${m}`};class u{constructor(_,O){this.buffer="",this.classPrefix=O.classPrefix,_.walk(this)}addText(_){this.buffer+=i(_)}openNode(_){if(!r(_))return;const O=o(_.scope,{prefix:this.classPrefix});this.span(O)}closeNode(_){r(_)&&(this.buffer+=n)}value(){return this.buffer}span(_){this.buffer+=`<span class="${_}">`}}const p=(m={})=>{const _={children:[]};return Object.assign(_,m),_};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(_){this.top.children.push(_)}openNode(_){const O=p({scope:_});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(_){return this.constructor._walk(_,this.rootNode)}static _walk(_,O){return typeof O=="string"?_.addText(O):O.children&&(_.openNode(O),O.children.forEach(q=>this._walk(_,q)),_.closeNode(O)),_}static _collapse(_){typeof _!="string"&&_.children&&(_.children.every(O=>typeof O=="string")?_.children=[_.children.join("")]:_.children.forEach(O=>{h._collapse(O)}))}}class a extends h{constructor(_){super(),this.options=_}addText(_){_!==""&&this.add(_)}startScope(_){this.openNode(_)}endScope(){this.closeNode()}__addSublanguage(_,O){const q=_.root;O&&(q.scope=`language:${O}`),this.add(q)}toHTML(){return new u(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(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(_=>d(_)).join("")}function v(m){const _=m[m.length-1];return typeof _=="object"&&_.constructor===Object?(m.splice(m.length-1,1),_):{}}function x(...m){return"("+(v(m).capture?"":"?:")+m.map(_=>d(_)).join("|")+")"}function k(m){return new RegExp(m.toString()+"|").exec("").length-1}function w(m,_){const O=m&&m.exec(_);return O&&O.index===0}const y=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function b(m,{joinWith:_}){let O=0;return m.map(q=>{O+=1;const ne=O;let se=d(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(_)}const E=/\b\B/,S="[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 _=/^#![ ]*\//;return m.binary&&(m.begin=g(_,/.*\b/,m.binary,/\b.*/)),s({scope:"meta",begin:_,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,_,O={}){const q=s({scope:"comment",begin:m,end:_,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("/\\*","\\*/"),_e=X("#","$"),we={scope:"number",begin:M,relevance:0},j={scope:"number",begin:I,relevance:0},Se={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:S,relevance:0},Me={scope:"title",begin:R,relevance:0},Re={begin:"\\.\\s*"+R,relevance:0};var Ne=Object.freeze({__proto__:null,APOS_STRING_MODE:T,BACKSLASH_ESCAPE:re,BINARY_NUMBER_MODE:Se,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":(_,O)=>{O.data._beginMatch=_[1]},"on:end":(_,O)=>{O.data._beginMatch!==_[1]&&O.ignoreMatch()}})},HASH_COMMENT_MODE:_e,IDENT_RE:S,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,_){m.input[m.index-1]==="."&&_.ignoreMatch()}function Ae(m,_){m.className!==void 0&&(m.scope=m.className,delete m.className)}function rt(m,_){_&&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,_){Array.isArray(m.illegal)&&(m.illegal=x(...m.illegal))}function Mi(m,_){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 Ni(m,_){m.relevance===void 0&&(m.relevance=1)}const Qt=(m,_)=>{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},ei=["of","and","for","in","not","or","if","then","parent","list","value"],Di="keyword";function ti(m,_,O=Di){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,ti(m[se],_,se))}),q;function ne(se,P){_&&(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,_){return _?Number(_):bt(m)?0:1}function bt(m){return ei.includes(m.toLowerCase())}const Tt={},De=m=>{console.error(m)},yt=(m,..._)=>{console.log(`WARN: ${m}`,..._)},Ge=(m,_)=>{Tt[`${m}/${_}`]||(console.log(`Deprecated as of ${m}. ${_}`),Tt[`${m}/${_}`]=!0)},at=new Error;function $t(m,_,{key:O}){let q=0;const ne=m[O],se={},P={};for(let L=1;L<=_.length;L++)P[L+q]=ne[L],se[L+q]=!0,q+=k(_[L-1]);m[O]=P,m[O]._emit=se,m[O]._multi=!0}function ii(m){if(Array.isArray(m.begin)){if(m.skip||m.excludeBegin||m.returnBegin)throw De("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),at;if(typeof m.beginScope!="object"||m.beginScope===null)throw De("beginScope must be object"),at;$t(m,m.begin,{key:"beginScope"}),m.begin=b(m.begin,{joinWith:""})}}function Hr(m){if(Array.isArray(m.end)){if(m.skip||m.excludeEnd||m.returnEnd)throw De("skip, excludeEnd, returnEnd not compatible with endScope: {}"),at;if(typeof m.endScope!="object"||m.endScope===null)throw De("endScope must be object"),at;$t(m,m.end,{key:"endScope"}),m.end=b(m.end,{joinWith:""})}}function Wr(m){m.scope&&typeof m.scope=="object"&&m.scope!==null&&(m.beginScope=m.scope,delete m.scope)}function Vr(m){Wr(m),typeof m.beginScope=="string"&&(m.beginScope={_wrap:m.beginScope}),typeof m.endScope=="string"&&(m.endScope={_wrap:m.endScope}),ii(m),Hr(m)}function Gr(m){function _(P,L){return new RegExp(d(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=_(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,Bi)=>Bi>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,Mi,Vr,Qt].forEach(ae=>ae(P,L)),m.compilerExtensions.forEach(ae=>ae(P,L)),P.__beforeBegin=null,[rt,ot,Ni].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=ti(P.keywords,m.case_insensitive)),B.keywordPatternRe=_(ue,!0),L&&(P.begin||(P.begin=/\B|\b/),B.beginRe=_(B.begin),!P.end&&!P.endsWithParent&&(P.end=/\B|\b/),P.end&&(B.endRe=_(B.end)),B.terminatorEnd=d(B.end)||"",P.endsWithParent&&L.terminatorEnd&&(B.terminatorEnd+=(P.end?"|":"")+L.terminatorEnd)),P.illegal&&(B.illegalRe=_(P.illegal)),P.contains||(P.contains=[]),P.contains=[].concat(...P.contains.map(function(ae){return Kr(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 Xn(m){return m?m.endsWithParent||Xn(m.starts):!1}function Kr(m){return m.variants&&!m.cachedVariants&&(m.cachedVariants=m.variants.map(function(_){return s(m,{variants:null},_)})),m.cachedVariants?m.cachedVariants:Xn(m)?s(m,{starts:m.starts?s(m.starts):null}):Object.isFrozen(m)?s(m):m}var Zr="11.11.1";class Jr extends Error{constructor(_,O){super(_),this.name="HTMLInjectionError",this.html=O}}const ji=i,Yn=s,Qn=Symbol("nomatch"),Xr=7,es=function(m){const _=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 D=A.className+" ";D+=A.parentNode?A.parentNode.className:"";const V=L.languageDetectRe.exec(D);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 D.split(/\s+/).find(Z=>B(Z)||Ye(Z))}function ae(A,D,V){let Z="",ce="";typeof D=="object"?(Z=A,V=D.ignoreIllegals,ce=D.language):(Ge("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ge("10.7.0",`Please use highlight(code, options) instead.
|
|
645
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),ce=A,Z=D),V===void 0&&(V=!0);const je={code:Z,language:ce};si("before:highlight",je);const Qe=je.result?je.result:Rt(je.language,je.code,V);return Qe.code=je.code,si("after:highlight",Qe),Qe}function Rt(A,D,V,Z){const ce=Object.create(null);function je(C,N){return C.keywords[N]}function Qe(){if(!z.keywords){he.addText(J);return}let C=0;z.keywordPatternRe.lastIndex=0;let N=z.keywordPatternRe.exec(J),W="";for(;N;){W+=J.substring(C,N.index);const G=ze.case_insensitive?N[0].toLowerCase():N[0],pe=je(z,G);if(pe){const[Ke,go]=pe;if(he.addText(W),W="",ce[G]=(ce[G]||0)+1,ce[G]<=Xr&&(ai+=go),Ke.startsWith("_"))W+=N[0];else{const mo=ze.classNameAliases[Ke]||Ke;Be(N[0],mo)}}else W+=N[0];C=z.keywordPatternRe.lastIndex,N=z.keywordPatternRe.exec(J)}W+=J.substring(C),he.addText(W)}function ri(){if(J==="")return;let C=null;if(typeof z.subLanguage=="string"){if(!_[z.subLanguage]){he.addText(J);return}C=Rt(z.subLanguage,J,!0,ls[z.subLanguage]),ls[z.subLanguage]=C._top}else C=zi(J,z.subLanguage.length?z.subLanguage:null);z.relevance>0&&(ai+=C.relevance),he.__addSublanguage(C._emitter,C.language)}function xe(){z.subLanguage!=null?ri():Qe(),J=""}function Be(C,N){C!==""&&(he.startScope(N),he.addText(C),he.endScope())}function ss(C,N){let W=1;const G=N.length-1;for(;W<=G;){if(!C._emit[W]){W++;continue}const pe=ze.classNameAliases[C[W]]||C[W],Ke=N[W];pe?Be(Ke,pe):(J=Ke,Qe(),J=""),W++}}function rs(C,N){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&&(ss(C.beginScope,N),J="")),z=Object.create(C,{parent:{value:z}}),z}function os(C,N,W){let G=w(C.endRe,W);if(G){if(C["on:end"]){const pe=new e(C);C["on:end"](N,pe),pe.isMatchIgnored&&(G=!1)}if(G){for(;C.endsParent&&C.parent;)C=C.parent;return C}}if(C.endsWithParent)return os(C.parent,N,W)}function co(C){return z.matcher.regexIndex===0?(J+=C[0],1):(Hi=!0,0)}function uo(C){const N=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 co(N);return W.skip?J+=N:(W.excludeBegin&&(J+=N),xe(),!W.returnBegin&&!W.excludeBegin&&(J=N)),rs(W,C),W.returnBegin?0:N.length}function ho(C){const N=C[0],W=D.substring(C.index),G=os(z,C,W);if(!G)return Qn;const pe=z;z.endScope&&z.endScope._wrap?(xe(),Be(N,z.endScope._wrap)):z.endScope&&z.endScope._multi?(xe(),ss(z.endScope,C)):pe.skip?J+=N:(pe.returnEnd||pe.excludeEnd||(J+=N),xe(),pe.excludeEnd&&(J=N));do z.scope&&he.closeNode(),!z.skip&&!z.subLanguage&&(ai+=z.relevance),z=z.parent;while(z!==G.parent);return G.starts&&rs(G.starts,C),pe.returnEnd?0:N.length}function po(){const C=[];for(let N=z;N!==ze;N=N.parent)N.scope&&C.unshift(N.scope);C.forEach(N=>he.openNode(N))}let oi={};function as(C,N){const W=N&&N[0];if(J+=C,W==null)return xe(),0;if(oi.type==="begin"&&N.type==="end"&&oi.index===N.index&&W===""){if(J+=D.slice(N.index,N.index+1),!ne){const G=new Error(`0 width match regex (${A})`);throw G.languageName=A,G.badRule=oi.rule,G}return 1}if(oi=N,N.type==="begin")return uo(N);if(N.type==="illegal"&&!V){const G=new Error('Illegal lexeme "'+W+'" for mode "'+(z.scope||"<unnamed>")+'"');throw G.mode=z,G}else if(N.type==="end"){const G=ho(N);if(G!==Qn)return G}if(N.type==="illegal"&&W==="")return J+=`
|
|
646
|
+
`,1;if(Fi>1e5&&Fi>N.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 De(se.replace("{}",A)),new Error('Unknown language: "'+A+'"');const fo=Gr(ze);let qi="",z=Z||fo;const ls={},he=new L.__emitter(L);po();let J="",ai=0,lt=0,Fi=0,Hi=!1;try{if(ze.__emitTokens)ze.__emitTokens(D,he);else{for(z.matcher.considerAll();;){Fi++,Hi?Hi=!1:z.matcher.considerAll(),z.matcher.lastIndex=lt;const C=z.matcher.exec(D);if(!C)break;const N=D.substring(lt,C.index),W=as(N,C);lt=C.index+W}as(D.substring(lt))}return he.finalize(),qi=he.toHTML(),{language:A,value:qi,relevance:ai,illegal:!1,_emitter:he,_top:z}}catch(C){if(C.message&&C.message.includes("Illegal"))return{language:A,value:ji(D),illegal:!0,relevance:0,_illegalBy:{message:C.message,index:lt,context:D.slice(lt-100,lt+100),mode:C.mode,resultSoFar:qi},_emitter:he};if(ne)return{language:A,value:ji(D),illegal:!1,relevance:0,errorRaised:C,_emitter:he,_top:z};throw C}}function Bi(A){const D={value:ji(A),illegal:!1,relevance:0,_top:P,_emitter:new L.__emitter(L)};return D._emitter.addText(A),D}function zi(A,D){D=D||L.languages||Object.keys(_);const V=Bi(A),Z=D.filter(Ye).filter(ns).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,ri=je;return ri.secondBest=Qe,ri}function Yr(A,D,V){const Z=D&&O[D]||V;A.classList.add("hljs"),A.classList.add(`language-${Z}`)}function Ui(A){let D=null;const V=ue(A);if(B(V))return;if(si("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 Jr("One of your code blocks includes unescaped HTML.",A.innerHTML);D=A;const Z=D.textContent,ce=V?ae(Z,{language:V,ignoreIllegals:!0}):zi(Z);A.innerHTML=ce.value,A.dataset.highlighted="yes",Yr(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}),si("after:highlightElement",{el:A,result:ce,text:Z})}function Qr(A){L=Yn(L,A)}const eo=()=>{ni(),Ge("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function to(){ni(),Ge("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let ts=!1;function ni(){function A(){ni()}if(document.readyState==="loading"){ts||window.addEventListener("DOMContentLoaded",A,!1),ts=!0;return}document.querySelectorAll(L.cssSelector).forEach(Ui)}function io(A,D){let V=null;try{V=D(m)}catch(Z){if(De("Language definition for '{}' could not be registered.".replace("{}",A)),ne)De(Z);else throw Z;V=P}V.name||(V.name=A),_[A]=V,V.rawDefinition=D.bind(null,m),V.aliases&&is(V.aliases,{languageName:A})}function no(A){delete _[A];for(const D of Object.keys(O))O[D]===A&&delete O[D]}function so(){return Object.keys(_)}function Ye(A){return A=(A||"").toLowerCase(),_[A]||_[O[A]]}function is(A,{languageName:D}){typeof A=="string"&&(A=[A]),A.forEach(V=>{O[V.toLowerCase()]=D})}function ns(A){const D=Ye(A);return D&&!D.disableAutodetect}function ro(A){A["before:highlightBlock"]&&!A["before:highlightElement"]&&(A["before:highlightElement"]=D=>{A["before:highlightBlock"](Object.assign({block:D.el},D))}),A["after:highlightBlock"]&&!A["after:highlightElement"]&&(A["after:highlightElement"]=D=>{A["after:highlightBlock"](Object.assign({block:D.el},D))})}function oo(A){ro(A),q.push(A)}function ao(A){const D=q.indexOf(A);D!==-1&&q.splice(D,1)}function si(A,D){const V=A;q.forEach(function(Z){Z[V]&&Z[V](D)})}function lo(A){return Ge("10.7.0","highlightBlock will be removed entirely in v12.0"),Ge("10.7.0","Please use highlightElement now."),Ui(A)}Object.assign(m,{highlight:ae,highlightAuto:zi,highlightAll:ni,highlightElement:Ui,highlightBlock:lo,configure:Qr,initHighlighting:eo,initHighlightingOnLoad:to,registerLanguage:io,unregisterLanguage:no,listLanguages:so,getLanguage:Ye,registerAliases:is,autoDetection:ns,inherit:Yn,addPlugin:oo,removePlugin:ao}),m.debugMode=function(){ne=!1},m.safeMode=function(){ne=!0},m.versionString=Zr,m.regex={concat:g,lookahead:c,either:x,optional:f,anyNumberOfTimes:l};for(const A in Ne)typeof Ne[A]=="object"&&t(Ne[A]);return Object.assign(m,Ne),m},wt=es({});return wt.newInstance=()=>es({}),xn=wt,wt.HighlightJS=wt,wt.default=wt,xn}var Ic=Ac();const Pi=Sc(Ic),Ei="[A-Za-z$_][0-9A-Za-z$_]*",Nr=["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"],Dr=["true","false","null","undefined","NaN","Infinity"],jr=["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"],Br=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],zr=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Ur=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],qr=[].concat(zr,jr,Br);function Cc(t){const e=t.regex,i=(H,{after:X})=>{const te="</"+H[0].slice(1);return H.input.indexOf(te,X)!==-1},s=Ei,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 _e;const we=H.input.substring(te);if(_e=we.match(/^\s*=/)){X.ignoreMatch();return}if((_e=we.match(/^\s+extends\s+/))&&_e.index===0){X.ignoreMatch();return}}},u={$pattern:Ei,keyword:Nr,literal:Dr,built_in:qr,"variable.language":Ur},p="[0-9](_?[0-9])*",h=`\\.(${p})`,a="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={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:u,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+/},d];c.contains=k.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(k)});const w=[].concat(x,c.contains),y=w.concat([{begin:/(\s*)\(/,end:/\)/,keywords:u,contains:["self"].concat(w)}]),b={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,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"}}]},S={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:{_:[...jr,...Br]}},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([...zr,"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:u,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:S},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+/},d,S,{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:u,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 Oc(t){const e=t.regex,i=Cc(t),s=Ei,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]},u={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},p=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:Ei,keyword:Nr.concat(p),literal:Dr,built_in:qr.concat(n),"variable.language":Ur},a={className:"meta",begin:"@"+s},d=(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]),d(i,"shebang",t.SHEBANG()),d(i,"use_strict",u);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 Tc(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:/\)/}),u=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,u,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[r,o,p,u]}]}]},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 $c=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_-]*/}}),Rc=["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"],Lc=["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"],Pc=[...Rc,...Lc],Mc=["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(),Nc=["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(),Dc=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),jc=["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 Bc(t){const e=t.regex,i=$c(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_-]*",u=[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:":("+Nc.join("|")+")"},{begin:":(:)?("+Dc.join("|")+")"}]},i.CSS_VARIABLE,{className:"attribute",begin:"\\b("+jc.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[i.BLOCK_COMMENT,i.HEXCOLOR,i.IMPORTANT,i.CSS_NUMBER_MODE,...u,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...u,{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:Mc.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...u,i.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Pc.join("|")+")\\b"}]}}const Fr=document.createElement("style");Fr.innerText=[Ec,_c].join(`
|
|
647
|
+
`);document.head.appendChild(Fr);Pi.registerLanguage("typescript",Oc);Pi.registerLanguage("html",Tc);Pi.registerLanguage("css",Bc);function zc(...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 zt(t,e){const i=document.createElement(t);return typeof e=="string"?i.innerHTML=e:e.forEach(s=>{i.appendChild(s)}),i}async function Uc(t,e,i){const s=e.mainContent,n=zt("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,u=zc(Mt("Preview",n),Mt("HTML",hi("html",s)),...o?[Mt(r??"CSS",hi("css",o))]:[],...e.initializer&&e.initializer.content?[Mt(e.initializer.label??"TS",hi("typescript",e.initializer.content))]:[],...(e.additionalSources||[]).map(h=>Mt(h.label,hi(h.language,h.content))));e.description&&t.appendChild(zt("div",e.description));const p=zt("div",[u]);p.classList.add("example"),t.appendChild(p),o&&qc(`#${n.id}`,o),e.initializer?.initialize&&await e.initializer.initialize(n)}function hi(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(`
|
|
648
|
+
`).trim();return t&&t!="raw"&&(i=Pi.highlight(i,{language:t}).value),zt("pre",[zt("code",i)])}function qc(t,e){const i=document.createElement("style");i.innerHTML=Y().use(kc({prefix:t})).process(e).css,document.head.appendChild(i)}async function Fc(t,e=document.body){const i=Wc(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;Uc(r,o,s++)})}function Hc(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 Wc(t){return t.children?Hc(t):t}const Vc=`<h1 id="@cas-smartdesign/token-selector">@cas-smartdesign/token-selector</h1>
|
|
643
649
|
<p>A token-selector element based on <a href="https://github.com/Polymer/lit-element">lit-element</a> with SmartDesign look & feel.</p>
|
|
644
650
|
<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
651
|
<h2 id="attributes---token-selector">Attributes - Token-Selector</h2>
|
|
@@ -748,7 +754,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),B=u,I=b),k===void 0&&(
|
|
|
748
754
|
</li>
|
|
749
755
|
</ul>
|
|
750
756
|
<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
|
|
757
|
+
<h2 id="attributes/properties---delegated-to-the-internal-\`sd-lit-input\`">Attributes/properties - delegated to the internal \`sd-lit-input\`</h2>
|
|
752
758
|
<ul>
|
|
753
759
|
<li><code>placeholder</code> : <strong>string (default = null)</strong></li>
|
|
754
760
|
<li><code>inputLabel</code> : <strong>string (default = null)</strong></li>
|
|
@@ -813,7 +819,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),B=u,I=b),k===void 0&&(
|
|
|
813
819
|
</li>
|
|
814
820
|
</ul>
|
|
815
821
|
<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
|
|
822
|
+
<h2 id="css-custom-properties-&-parts">CSS Custom Properties & parts</h2>
|
|
817
823
|
<ul>
|
|
818
824
|
<li><code>--sd-token-background-color</code><ul>
|
|
819
825
|
<li>Defines the background color of the token.</li>
|
|
@@ -868,10 +874,4 @@ https://github.com/highlightjs/highlight.js/issues/2277`),B=u,I=b),k===void 0&&(
|
|
|
868
874
|
</ul>
|
|
869
875
|
</li>
|
|
870
876
|
</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
|
-
}
|
|
877
|
+
`,Gc=document.querySelector("#markdown-container");Gc.innerHTML=Vc;Fc(Object.assign({"./examples/1_remove_only/index.ts":Eo,"./examples/2_multi_select/index.ts":Co,"./examples/3_editable_input_attributes/index.ts":Lo,"./examples/4_dnd/index.ts":jo,"./examples/5_other/index.ts":Wo}),document.querySelector(".markdown-body"));export{nd as T,yi as a,ic as g};
|