@pod-os/elements 0.29.1-rc.c8e652b.0 → 0.29.1-rc.d6d1332.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.
Files changed (78) hide show
  1. package/dist/cjs/{app-globals-97a7ec18.js → app-globals-92c0c4ce.js} +3 -1
  2. package/dist/cjs/app-globals-92c0c4ce.js.map +1 -0
  3. package/dist/cjs/chunk.3Y6SB6QS-10eff6c1.js +31 -0
  4. package/dist/cjs/chunk.3Y6SB6QS-10eff6c1.js.map +1 -0
  5. package/dist/cjs/elements.cjs.js +3 -2
  6. package/dist/cjs/elements.cjs.js.map +1 -1
  7. package/dist/cjs/{ion-icon_32.cjs.entry.js → ion-icon_33.cjs.entry.js} +136 -120
  8. package/dist/cjs/ion-icon_33.cjs.entry.js.map +1 -0
  9. package/dist/cjs/loader.cjs.js +3 -2
  10. package/dist/cjs/loader.cjs.js.map +1 -1
  11. package/dist/collection/apps/pos-app-browser/pos-app-browser.css +3 -0
  12. package/dist/collection/collection-manifest.json +1 -0
  13. package/dist/collection/components/pos-tool-select/pos-tool-select.css +51 -0
  14. package/dist/collection/components/pos-tool-select/pos-tool-select.js +55 -0
  15. package/dist/collection/components/pos-tool-select/pos-tool-select.js.map +1 -0
  16. package/dist/collection/components/pos-tool-select/shoelace.js +2 -0
  17. package/dist/collection/components/pos-tool-select/shoelace.js.map +1 -0
  18. package/dist/collection/components/pos-type-router/pos-type-router.css +14 -0
  19. package/dist/collection/components/pos-type-router/pos-type-router.js +14 -3
  20. package/dist/collection/components/pos-type-router/pos-type-router.js.map +1 -1
  21. package/dist/collection/components/pos-type-router/selectToolsForTypes.js +47 -0
  22. package/dist/collection/components/pos-type-router/selectToolsForTypes.js.map +1 -0
  23. package/dist/collection/global.js +2 -0
  24. package/dist/collection/global.js.map +1 -1
  25. package/dist/components/chunk.3Y6SB6QS.js +28 -0
  26. package/dist/components/chunk.3Y6SB6QS.js.map +1 -0
  27. package/dist/components/chunk.HVTXQL7M.js +24 -598
  28. package/dist/components/chunk.HVTXQL7M.js.map +1 -1
  29. package/dist/components/chunk.YHLNUJ7P.js +556 -0
  30. package/dist/components/chunk.YHLNUJ7P.js.map +1 -0
  31. package/dist/components/index.js +2 -0
  32. package/dist/components/index.js.map +1 -1
  33. package/dist/components/pos-app-browser.js +65 -59
  34. package/dist/components/pos-app-browser.js.map +1 -1
  35. package/dist/components/pos-make-findable2.js +1 -0
  36. package/dist/components/pos-make-findable2.js.map +1 -1
  37. package/dist/components/pos-tool-select.d.ts +11 -0
  38. package/dist/components/pos-tool-select.js +8 -0
  39. package/dist/components/pos-tool-select.js.map +1 -0
  40. package/dist/components/pos-tool-select2.js +43 -0
  41. package/dist/components/pos-tool-select2.js.map +1 -0
  42. package/dist/components/pos-type-router2.js +43 -18
  43. package/dist/components/pos-type-router2.js.map +1 -1
  44. package/dist/components/pos-user-menu2.js +2 -1
  45. package/dist/components/pos-user-menu2.js.map +1 -1
  46. package/dist/elements/elements.esm.js +1 -1
  47. package/dist/elements/elements.esm.js.map +1 -1
  48. package/dist/elements/{p-d303d82c.entry.js → p-20c36eb6.entry.js} +48 -48
  49. package/dist/elements/p-20c36eb6.entry.js.map +1 -0
  50. package/dist/elements/p-36a54274.js +2 -0
  51. package/dist/elements/p-36a54274.js.map +1 -0
  52. package/dist/elements/p-c066fd50.js +2 -0
  53. package/dist/elements/p-c066fd50.js.map +1 -0
  54. package/dist/esm/{app-globals-fd9221d0.js → app-globals-64c60cb2.js} +3 -1
  55. package/dist/esm/app-globals-64c60cb2.js.map +1 -0
  56. package/dist/esm/chunk.3Y6SB6QS-ff2f5b55.js +28 -0
  57. package/dist/esm/chunk.3Y6SB6QS-ff2f5b55.js.map +1 -0
  58. package/dist/esm/elements.js +3 -2
  59. package/dist/esm/elements.js.map +1 -1
  60. package/dist/esm/{ion-icon_32.entry.js → ion-icon_33.entry.js} +135 -120
  61. package/dist/esm/ion-icon_33.entry.js.map +1 -0
  62. package/dist/esm/loader.js +3 -2
  63. package/dist/esm/loader.js.map +1 -1
  64. package/dist/types/components/pos-tool-select/pos-tool-select.d.ts +6 -0
  65. package/dist/types/components/pos-tool-select/shoelace.d.ts +1 -0
  66. package/dist/types/components/pos-type-router/selectToolsForTypes.d.ts +13 -0
  67. package/dist/types/components.d.ts +17 -0
  68. package/package.json +1 -1
  69. package/dist/cjs/app-globals-97a7ec18.js.map +0 -1
  70. package/dist/cjs/ion-icon_32.cjs.entry.js.map +0 -1
  71. package/dist/collection/components/pos-type-router/selectAppForTypes.js +0 -33
  72. package/dist/collection/components/pos-type-router/selectAppForTypes.js.map +0 -1
  73. package/dist/elements/p-61cd1259.js +0 -2
  74. package/dist/elements/p-61cd1259.js.map +0 -1
  75. package/dist/elements/p-d303d82c.entry.js.map +0 -1
  76. package/dist/esm/app-globals-fd9221d0.js.map +0 -1
  77. package/dist/esm/ion-icon_32.entry.js.map +0 -1
  78. package/dist/types/components/pos-type-router/selectAppForTypes.d.ts +0 -9
@@ -0,0 +1,556 @@
1
+ import { g as getBasePath } from './chunk.3Y6SB6QS.js';
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
11
+ var __typeError = (msg) => {
12
+ throw TypeError(msg);
13
+ };
14
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15
+ var __spreadValues = (a, b) => {
16
+ for (var prop in b || (b = {}))
17
+ if (__hasOwnProp.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ if (__getOwnPropSymbols)
20
+ for (var prop of __getOwnPropSymbols(b)) {
21
+ if (__propIsEnum.call(b, prop))
22
+ __defNormalProp(a, prop, b[prop]);
23
+ }
24
+ return a;
25
+ };
26
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
27
+ var __decorateClass = (decorators, target, key, kind) => {
28
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
29
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
30
+ if (decorator = decorators[i])
31
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
32
+ if (kind && result) __defProp(target, key, result);
33
+ return result;
34
+ };
35
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
36
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
37
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
38
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
39
+ var __await = function(promise, isYieldStar) {
40
+ this[0] = promise;
41
+ this[1] = isYieldStar;
42
+ };
43
+ var __yieldStar = (value) => {
44
+ var obj = value[__knownSymbol("asyncIterator")], isAwait = false, method, it = {};
45
+ if (obj == null) {
46
+ obj = value[__knownSymbol("iterator")]();
47
+ method = (k) => it[k] = (x) => obj[k](x);
48
+ } else {
49
+ obj = obj.call(value);
50
+ method = (k) => it[k] = (v) => {
51
+ if (isAwait) {
52
+ isAwait = false;
53
+ if (k === "throw") throw v;
54
+ return v;
55
+ }
56
+ isAwait = true;
57
+ return {
58
+ done: false,
59
+ value: new __await(new Promise((resolve) => {
60
+ var x = obj[k](v);
61
+ if (!(x instanceof Object)) __typeError("Object expected");
62
+ resolve(x);
63
+ }), 1)
64
+ };
65
+ };
66
+ }
67
+ return it[__knownSymbol("iterator")] = () => it, method("next"), "throw" in obj ? method("throw") : it.throw = (x) => {
68
+ throw x;
69
+ }, "return" in obj && method("return"), it;
70
+ };
71
+
72
+ /**
73
+ * @license
74
+ * Copyright 2019 Google LLC
75
+ * SPDX-License-Identifier: BSD-3-Clause
76
+ */
77
+ const t$1=globalThis,e$3=t$1.ShadowRoot&&(void 0===t$1.ShadyCSS||t$1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$4=new WeakMap;class n$3{constructor(t,e,o){if(this._$cssResult$=!0,o!==s$2)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$3&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$4.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$4.set(s,t));}return t}toString(){return this.cssText}}const r$4=t=>new n$3("string"==typeof t?t:t+"",void 0,s$2),i$3=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$3(o,t,s$2)},S$1=(s,o)=>{if(e$3)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$1.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$3?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$4(e)})(t):t;
78
+
79
+ /**
80
+ * @license
81
+ * Copyright 2017 Google LLC
82
+ * SPDX-License-Identifier: BSD-3-Clause
83
+ */const{is:i$2,defineProperty:e$2,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$3,getOwnPropertySymbols:o$3,getPrototypeOf:n$2}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$2=(t,s)=>!i$2(t,s),b={attribute:!0,type:String,converter:u$1,reflect:!1,useDefault:!1,hasChanged:f$2};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;class y$1 extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$2(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$3(t),...o$3(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return !1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.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((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$1).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$1;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$2)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);}!1===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=!0;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return !0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}}y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$1.reactiveElementVersions??=[]).push("2.1.1");
84
+
85
+ /**
86
+ * @license
87
+ * Copyright 2017 Google LLC
88
+ * SPDX-License-Identifier: BSD-3-Clause
89
+ */
90
+ const t=globalThis,i$1=t.trustedTypes,s$1=i$1?i$1.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$1="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$2="?"+h,n$1=`<${o$2}>`,r$2=document,l=()=>r$2.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a=Array.isArray,u=t=>a(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r$2.createTreeWalker(r$2,129);function P(t,i){if(!a(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$1?s$1.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$1;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f$1?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f$1,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f$1:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f$1?s+n$1:d>=0?(o.push(a),s.slice(0,d)+e$1+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [P(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$1)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H:"?"===e[1]?I:"@"===e[1]?L:k}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$1?i$1.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l());}}}else if(8===r.nodeType)if(r.data===o$2)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r$2.createElement("template");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r$2).importNode(i,!0);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C.nextNode(),o++);}return C.currentNode=r$2,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$2.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l()),this.O(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E;}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class H extends k{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E?void 0:t;}}class I extends k{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E);}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t);}}const j=t.litHtmlPolyfillSupport;j?.(N,R),(t.litHtmlVersions??=[]).push("3.3.1");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l(),t),t,void 0,s??{});}return h._$AI(t),h};
91
+
92
+ /**
93
+ * @license
94
+ * Copyright 2017 Google LLC
95
+ * SPDX-License-Identifier: BSD-3-Clause
96
+ */const s=globalThis;class i extends y$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1);}render(){return T}}i._$litElement$=!0,i["finalized"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o$1=s.litElementPolyfillSupport;o$1?.({LitElement:i});(s.litElementVersions??=[]).push("4.2.1");
97
+
98
+ // src/styles/component.styles.ts
99
+ var component_styles_default = i$3`
100
+ :host {
101
+ box-sizing: border-box;
102
+ }
103
+
104
+ :host *,
105
+ :host *::before,
106
+ :host *::after {
107
+ box-sizing: inherit;
108
+ }
109
+
110
+ [hidden] {
111
+ display: none !important;
112
+ }
113
+ `;
114
+
115
+ /**
116
+ * @license
117
+ * Copyright 2017 Google LLC
118
+ * SPDX-License-Identifier: BSD-3-Clause
119
+ */const o={attribute:!0,type:String,converter:u$1,reflect:!1,hasChanged:f$2},r$1=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),"setter"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),"accessor"===n){const{name:o}=r;return {set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t);},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t);}}throw Error("Unsupported decorator location: "+n)};function n(t){return (e,o)=>"object"==typeof o?r$1(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}
120
+
121
+ /**
122
+ * @license
123
+ * Copyright 2017 Google LLC
124
+ * SPDX-License-Identifier: BSD-3-Clause
125
+ */function r(r){return n({...r,state:!0,attribute:!1})}
126
+
127
+ var _hasRecordedInitialProperties;
128
+ var ShoelaceElement = class extends i {
129
+ constructor() {
130
+ super();
131
+ __privateAdd(this, _hasRecordedInitialProperties, false);
132
+ // Store the constructor value of all `static properties = {}`
133
+ this.initialReflectedProperties = /* @__PURE__ */ new Map();
134
+ Object.entries(this.constructor.dependencies).forEach(([name, component]) => {
135
+ this.constructor.define(name, component);
136
+ });
137
+ }
138
+ emit(name, options) {
139
+ const event = new CustomEvent(name, __spreadValues({
140
+ bubbles: true,
141
+ cancelable: false,
142
+ composed: true,
143
+ detail: {}
144
+ }, options));
145
+ this.dispatchEvent(event);
146
+ return event;
147
+ }
148
+ /* eslint-enable */
149
+ static define(name, elementConstructor = this, options = {}) {
150
+ const currentlyRegisteredConstructor = customElements.get(name);
151
+ if (!currentlyRegisteredConstructor) {
152
+ try {
153
+ customElements.define(name, elementConstructor, options);
154
+ } catch (_err) {
155
+ customElements.define(name, class extends elementConstructor {
156
+ }, options);
157
+ }
158
+ return;
159
+ }
160
+ let newVersion = " (unknown version)";
161
+ let existingVersion = newVersion;
162
+ if ("version" in elementConstructor && elementConstructor.version) {
163
+ newVersion = " v" + elementConstructor.version;
164
+ }
165
+ if ("version" in currentlyRegisteredConstructor && currentlyRegisteredConstructor.version) {
166
+ existingVersion = " v" + currentlyRegisteredConstructor.version;
167
+ }
168
+ if (newVersion && existingVersion && newVersion === existingVersion) {
169
+ return;
170
+ }
171
+ console.warn(
172
+ `Attempted to register <${name}>${newVersion}, but <${name}>${existingVersion} has already been registered.`
173
+ );
174
+ }
175
+ attributeChangedCallback(name, oldValue, newValue) {
176
+ if (!__privateGet(this, _hasRecordedInitialProperties)) {
177
+ this.constructor.elementProperties.forEach(
178
+ (obj, prop) => {
179
+ if (obj.reflect && this[prop] != null) {
180
+ this.initialReflectedProperties.set(prop, this[prop]);
181
+ }
182
+ }
183
+ );
184
+ __privateSet(this, _hasRecordedInitialProperties, true);
185
+ }
186
+ super.attributeChangedCallback(name, oldValue, newValue);
187
+ }
188
+ willUpdate(changedProperties) {
189
+ super.willUpdate(changedProperties);
190
+ this.initialReflectedProperties.forEach((value, prop) => {
191
+ if (changedProperties.has(prop) && this[prop] == null) {
192
+ this[prop] = value;
193
+ }
194
+ });
195
+ }
196
+ };
197
+ _hasRecordedInitialProperties = new WeakMap();
198
+ /* eslint-disable */
199
+ // @ts-expect-error This is auto-injected at build time.
200
+ ShoelaceElement.version = "2.20.1";
201
+ ShoelaceElement.dependencies = {};
202
+ __decorateClass([
203
+ n()
204
+ ], ShoelaceElement.prototype, "dir", 2);
205
+ __decorateClass([
206
+ n()
207
+ ], ShoelaceElement.prototype, "lang", 2);
208
+
209
+ // src/internal/watch.ts
210
+ function watch(propertyName, options) {
211
+ const resolvedOptions = __spreadValues({
212
+ waitUntilFirstUpdate: false
213
+ }, options);
214
+ return (proto, decoratedFnName) => {
215
+ const { update } = proto;
216
+ const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName];
217
+ proto.update = function(changedProps) {
218
+ watchedProperties.forEach((property) => {
219
+ const key = property;
220
+ if (changedProps.has(key)) {
221
+ const oldValue = changedProps.get(key);
222
+ const newValue = this[key];
223
+ if (oldValue !== newValue) {
224
+ if (!resolvedOptions.waitUntilFirstUpdate || this.hasUpdated) {
225
+ this[decoratedFnName](oldValue, newValue);
226
+ }
227
+ }
228
+ }
229
+ });
230
+ update.call(this, changedProps);
231
+ };
232
+ };
233
+ }
234
+
235
+ /**
236
+ * @license
237
+ * Copyright 2020 Google LLC
238
+ * SPDX-License-Identifier: BSD-3-Clause
239
+ */const e=(o,t)=>void 0===t?void 0!==o?._$litType$:o?._$litType$===t,f=o=>void 0===o.strings;
240
+
241
+ // src/components/icon/library.default.ts
242
+ var library = {
243
+ name: "default",
244
+ resolver: (name) => getBasePath(`assets/icons/${name}.svg`)
245
+ };
246
+ var library_default_default = library;
247
+
248
+ // src/components/icon/library.system.ts
249
+ var icons = {
250
+ caret: `
251
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
252
+ <polyline points="6 9 12 15 18 9"></polyline>
253
+ </svg>
254
+ `,
255
+ check: `
256
+ <svg part="checked-icon" class="checkbox__icon" viewBox="0 0 16 16">
257
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
258
+ <g stroke="currentColor">
259
+ <g transform="translate(3.428571, 3.428571)">
260
+ <path d="M0,5.71428571 L3.42857143,9.14285714"></path>
261
+ <path d="M9.14285714,0 L3.42857143,9.14285714"></path>
262
+ </g>
263
+ </g>
264
+ </g>
265
+ </svg>
266
+ `,
267
+ "chevron-down": `
268
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
269
+ <path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>
270
+ </svg>
271
+ `,
272
+ "chevron-left": `
273
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">
274
+ <path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>
275
+ </svg>
276
+ `,
277
+ "chevron-right": `
278
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">
279
+ <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/>
280
+ </svg>
281
+ `,
282
+ copy: `
283
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-copy" viewBox="0 0 16 16">
284
+ <path fill-rule="evenodd" d="M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V2Zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H6ZM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1H2Z"/>
285
+ </svg>
286
+ `,
287
+ eye: `
288
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">
289
+ <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
290
+ <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
291
+ </svg>
292
+ `,
293
+ "eye-slash": `
294
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16">
295
+ <path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/>
296
+ <path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>
297
+ <path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z"/>
298
+ </svg>
299
+ `,
300
+ eyedropper: `
301
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16">
302
+ <path d="M13.354.646a1.207 1.207 0 0 0-1.708 0L8.5 3.793l-.646-.647a.5.5 0 1 0-.708.708L8.293 5l-7.147 7.146A.5.5 0 0 0 1 12.5v1.793l-.854.853a.5.5 0 1 0 .708.707L1.707 15H3.5a.5.5 0 0 0 .354-.146L11 7.707l1.146 1.147a.5.5 0 0 0 .708-.708l-.647-.646 3.147-3.146a1.207 1.207 0 0 0 0-1.708l-2-2zM2 12.707l7-7L10.293 7l-7 7H2v-1.293z"></path>
303
+ </svg>
304
+ `,
305
+ "grip-vertical": `
306
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16">
307
+ <path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"></path>
308
+ </svg>
309
+ `,
310
+ indeterminate: `
311
+ <svg part="indeterminate-icon" class="checkbox__icon" viewBox="0 0 16 16">
312
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
313
+ <g stroke="currentColor" stroke-width="2">
314
+ <g transform="translate(2.285714, 6.857143)">
315
+ <path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path>
316
+ </g>
317
+ </g>
318
+ </g>
319
+ </svg>
320
+ `,
321
+ "person-fill": `
322
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">
323
+ <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>
324
+ </svg>
325
+ `,
326
+ "play-fill": `
327
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">
328
+ <path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"></path>
329
+ </svg>
330
+ `,
331
+ "pause-fill": `
332
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">
333
+ <path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"></path>
334
+ </svg>
335
+ `,
336
+ radio: `
337
+ <svg part="checked-icon" class="radio__icon" viewBox="0 0 16 16">
338
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
339
+ <g fill="currentColor">
340
+ <circle cx="8" cy="8" r="3.42857143"></circle>
341
+ </g>
342
+ </g>
343
+ </svg>
344
+ `,
345
+ "star-fill": `
346
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">
347
+ <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>
348
+ </svg>
349
+ `,
350
+ "x-lg": `
351
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">
352
+ <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
353
+ </svg>
354
+ `,
355
+ "x-circle-fill": `
356
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16">
357
+ <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"></path>
358
+ </svg>
359
+ `
360
+ };
361
+ var systemLibrary = {
362
+ name: "system",
363
+ resolver: (name) => {
364
+ if (name in icons) {
365
+ return `data:image/svg+xml,${encodeURIComponent(icons[name])}`;
366
+ }
367
+ return "";
368
+ }
369
+ };
370
+ var library_system_default = systemLibrary;
371
+
372
+ // src/components/icon/library.ts
373
+ var registry = [library_default_default, library_system_default];
374
+ var watchedIcons = [];
375
+ function watchIcon(icon) {
376
+ watchedIcons.push(icon);
377
+ }
378
+ function unwatchIcon(icon) {
379
+ watchedIcons = watchedIcons.filter((el) => el !== icon);
380
+ }
381
+ function getIconLibrary(name) {
382
+ return registry.find((lib) => lib.name === name);
383
+ }
384
+
385
+ // src/components/icon/icon.styles.ts
386
+ var icon_styles_default = i$3`
387
+ :host {
388
+ display: inline-block;
389
+ width: 1em;
390
+ height: 1em;
391
+ box-sizing: content-box !important;
392
+ }
393
+
394
+ svg {
395
+ display: block;
396
+ height: 100%;
397
+ width: 100%;
398
+ }
399
+ `;
400
+
401
+ var CACHEABLE_ERROR = Symbol();
402
+ var RETRYABLE_ERROR = Symbol();
403
+ var parser;
404
+ var iconCache = /* @__PURE__ */ new Map();
405
+ var SlIcon = class extends ShoelaceElement {
406
+ constructor() {
407
+ super(...arguments);
408
+ this.initialRender = false;
409
+ this.svg = null;
410
+ this.label = "";
411
+ this.library = "default";
412
+ }
413
+ /** Given a URL, this function returns the resulting SVG element or an appropriate error symbol. */
414
+ async resolveIcon(url, library) {
415
+ var _a;
416
+ let fileData;
417
+ if (library == null ? void 0 : library.spriteSheet) {
418
+ this.svg = x`<svg part="svg">
419
+ <use part="use" href="${url}"></use>
420
+ </svg>`;
421
+ return this.svg;
422
+ }
423
+ try {
424
+ fileData = await fetch(url, { mode: "cors" });
425
+ if (!fileData.ok) return fileData.status === 410 ? CACHEABLE_ERROR : RETRYABLE_ERROR;
426
+ } catch (e) {
427
+ return RETRYABLE_ERROR;
428
+ }
429
+ try {
430
+ const div = document.createElement("div");
431
+ div.innerHTML = await fileData.text();
432
+ const svg = div.firstElementChild;
433
+ if (((_a = svg == null ? void 0 : svg.tagName) == null ? void 0 : _a.toLowerCase()) !== "svg") return CACHEABLE_ERROR;
434
+ if (!parser) parser = new DOMParser();
435
+ const doc = parser.parseFromString(svg.outerHTML, "text/html");
436
+ const svgEl = doc.body.querySelector("svg");
437
+ if (!svgEl) return CACHEABLE_ERROR;
438
+ svgEl.part.add("svg");
439
+ return document.adoptNode(svgEl);
440
+ } catch (e) {
441
+ return CACHEABLE_ERROR;
442
+ }
443
+ }
444
+ connectedCallback() {
445
+ super.connectedCallback();
446
+ watchIcon(this);
447
+ }
448
+ firstUpdated() {
449
+ this.initialRender = true;
450
+ this.setIcon();
451
+ }
452
+ disconnectedCallback() {
453
+ super.disconnectedCallback();
454
+ unwatchIcon(this);
455
+ }
456
+ getIconSource() {
457
+ const library = getIconLibrary(this.library);
458
+ if (this.name && library) {
459
+ return {
460
+ url: library.resolver(this.name),
461
+ fromLibrary: true
462
+ };
463
+ }
464
+ return {
465
+ url: this.src,
466
+ fromLibrary: false
467
+ };
468
+ }
469
+ handleLabelChange() {
470
+ const hasLabel = typeof this.label === "string" && this.label.length > 0;
471
+ if (hasLabel) {
472
+ this.setAttribute("role", "img");
473
+ this.setAttribute("aria-label", this.label);
474
+ this.removeAttribute("aria-hidden");
475
+ } else {
476
+ this.removeAttribute("role");
477
+ this.removeAttribute("aria-label");
478
+ this.setAttribute("aria-hidden", "true");
479
+ }
480
+ }
481
+ async setIcon() {
482
+ var _a;
483
+ const { url, fromLibrary } = this.getIconSource();
484
+ const library = fromLibrary ? getIconLibrary(this.library) : void 0;
485
+ if (!url) {
486
+ this.svg = null;
487
+ return;
488
+ }
489
+ let iconResolver = iconCache.get(url);
490
+ if (!iconResolver) {
491
+ iconResolver = this.resolveIcon(url, library);
492
+ iconCache.set(url, iconResolver);
493
+ }
494
+ if (!this.initialRender) {
495
+ return;
496
+ }
497
+ const svg = await iconResolver;
498
+ if (svg === RETRYABLE_ERROR) {
499
+ iconCache.delete(url);
500
+ }
501
+ if (url !== this.getIconSource().url) {
502
+ return;
503
+ }
504
+ if (e(svg)) {
505
+ this.svg = svg;
506
+ if (library) {
507
+ await this.updateComplete;
508
+ const shadowSVG = this.shadowRoot.querySelector("[part='svg']");
509
+ if (typeof library.mutator === "function" && shadowSVG) {
510
+ library.mutator(shadowSVG);
511
+ }
512
+ }
513
+ return;
514
+ }
515
+ switch (svg) {
516
+ case RETRYABLE_ERROR:
517
+ case CACHEABLE_ERROR:
518
+ this.svg = null;
519
+ this.emit("sl-error");
520
+ break;
521
+ default:
522
+ this.svg = svg.cloneNode(true);
523
+ (_a = library == null ? void 0 : library.mutator) == null ? void 0 : _a.call(library, this.svg);
524
+ this.emit("sl-load");
525
+ }
526
+ }
527
+ render() {
528
+ return this.svg;
529
+ }
530
+ };
531
+ SlIcon.styles = [component_styles_default, icon_styles_default];
532
+ __decorateClass([
533
+ r()
534
+ ], SlIcon.prototype, "svg", 2);
535
+ __decorateClass([
536
+ n({ reflect: true })
537
+ ], SlIcon.prototype, "name", 2);
538
+ __decorateClass([
539
+ n()
540
+ ], SlIcon.prototype, "src", 2);
541
+ __decorateClass([
542
+ n()
543
+ ], SlIcon.prototype, "label", 2);
544
+ __decorateClass([
545
+ n({ reflect: true })
546
+ ], SlIcon.prototype, "library", 2);
547
+ __decorateClass([
548
+ watch("label")
549
+ ], SlIcon.prototype, "handleLabelChange", 1);
550
+ __decorateClass([
551
+ watch(["name", "src", "library"])
552
+ ], SlIcon.prototype, "setIcon", 1);
553
+
554
+ export { E, SlIcon as S, T, __decorateClass as _, ShoelaceElement as a, __yieldStar as b, component_styles_default as c, __spreadProps as d, __spreadValues as e, f, i$3 as i, n, r, watch as w, x };
555
+
556
+ //# sourceMappingURL=chunk.YHLNUJ7P.js.map