UNPKG

@linkurious/ogma-ui-kit

Version:
376 lines (349 loc) 193 kB
(function(T,Wt){typeof exports=="object"&&typeof module<"u"?Wt(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],Wt):(T=typeof globalThis<"u"?globalThis:T||self,Wt(T.OgmaUiKitReact={},T.React))})(this,(function(T,Wt){"use strict";var fi;function bi(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>t[o]})}}return e.default=t,Object.freeze(e)}const q=bi(Wt);/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const ae=globalThis,De=ae.ShadowRoot&&(ae.ShadyCSS===void 0||ae.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Be=Symbol(),fo=new WeakMap;let bo=class{constructor(e,o,i){if(this._$cssResult$=!0,i!==Be)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=o}get styleSheet(){let e=this.o;const o=this.t;if(De&&e===void 0){const i=o!==void 0&&o.length===1;i&&(e=fo.get(o)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&fo.set(o,e))}return e}toString(){return this.cssText}};const mi=t=>new bo(typeof t=="string"?t:t+"",void 0,Be),B=(t,...e)=>{const o=t.length===1?t[0]:e.reduce(((i,s,r)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[r+1]),t[0]);return new bo(o,t,Be)},gi=(t,e)=>{if(De)t.adoptedStyleSheets=e.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(const o of e){const i=document.createElement("style"),s=ae.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=o.cssText,t.appendChild(i)}},mo=De?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let o="";for(const i of e.cssRules)o+=i.cssText;return mi(o)})(t):t;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const{is:vi,defineProperty:yi,getOwnPropertyDescriptor:wi,getOwnPropertyNames:_i,getOwnPropertySymbols:xi,getPrototypeOf:ki}=Object,bt=globalThis,go=bt.trustedTypes,$i=go?go.emptyScript:"",Re=bt.reactiveElementPolyfillSupport,jt=(t,e)=>t,Bt={toAttribute(t,e){switch(e){case Boolean:t=t?$i:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=t!==null;break;case Number:o=t===null?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch{o=null}}return o}},Ne=(t,e)=>!vi(t,e),vo={attribute:!0,type:String,converter:Bt,reflect:!1,useDefault:!1,hasChanged:Ne};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),bt.litPropertyMetadata??(bt.litPropertyMetadata=new WeakMap);let Rt=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,o=vo){if(o.state&&(o.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((o=Object.create(o)).wrapped=!0),this.elementProperties.set(e,o),!o.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,o);s!==void 0&&yi(this.prototype,e,s)}}static getPropertyDescriptor(e,o,i){const{get:s,set:r}=wi(this.prototype,e)??{get(){return this[o]},set(n){this[o]=n}};return{get:s,set(n){const a=s==null?void 0:s.call(this);r==null||r.call(this,n),this.requestUpdate(e,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??vo}static _$Ei(){if(this.hasOwnProperty(jt("elementProperties")))return;const e=ki(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(jt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(jt("properties"))){const o=this.properties,i=[..._i(o),...xi(o)];for(const s of i)this.createProperty(s,o[s])}const e=this[Symbol.metadata];if(e!==null){const o=litPropertyMetadata.get(e);if(o!==void 0)for(const[i,s]of o)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[o,i]of this.elementProperties){const s=this._$Eu(o,i);s!==void 0&&this._$Eh.set(s,o)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const o=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)o.unshift(mo(s))}else e!==void 0&&o.push(mo(e));return o}static _$Eu(e,o){const i=o.attribute;return i===!1?void 0:typeof i=="string"?i: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(){var e;this._$ES=new Promise((o=>this.enableUpdating=o)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach((o=>o(this)))}addController(e){var o;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((o=e.hostConnected)==null||o.call(e))}removeController(e){var o;(o=this._$EO)==null||o.delete(e)}_$E_(){const e=new Map,o=this.constructor.elementProperties;for(const i of o.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return gi(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach((o=>{var i;return(i=o.hostConnected)==null?void 0:i.call(o)}))}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach((o=>{var i;return(i=o.hostDisconnected)==null?void 0:i.call(o)}))}attributeChangedCallback(e,o,i){this._$AK(e,i)}_$ET(e,o){var r;const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const n=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:Bt).toAttribute(o,i.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,o){var r,n;const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const a=i.getPropertyOptions(s),u=typeof a.converter=="function"?{fromAttribute:a.converter}:((r=a.converter)==null?void 0:r.fromAttribute)!==void 0?a.converter:Bt;this._$Em=s;const d=u.fromAttribute(o,a.type);this[s]=d??((n=this._$Ej)==null?void 0:n.get(s))??d,this._$Em=null}}requestUpdate(e,o,i){var s;if(e!==void 0){const r=this.constructor,n=this[e];if(i??(i=r.getPropertyOptions(e)),!((i.hasChanged??Ne)(n,o)||i.useDefault&&i.reflect&&n===((s=this._$Ej)==null?void 0:s.get(e))&&!this.hasAttribute(r._$Eu(e,i))))return;this.C(e,o,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,o,{useDefault:i,reflect:s,wrapped:r},n){i&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,n??o??this[e]),r!==!0||n!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(o=void 0),this._$AL.set(e,o)),s===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(o){Promise.reject(o)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,n]of s){const{wrapped:a}=n,u=this[r];a!==!0||this._$AL.has(r)||u===void 0||this.C(r,void 0,n,u)}}let e=!1;const o=this._$AL;try{e=this.shouldUpdate(o),e?(this.willUpdate(o),(i=this._$EO)==null||i.forEach((s=>{var r;return(r=s.hostUpdate)==null?void 0:r.call(s)})),this.update(o)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(o)}willUpdate(e){}_$AE(e){var o;(o=this._$EO)==null||o.forEach((i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)})),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=this._$Eq.forEach((o=>this._$ET(o,this[o])))),this._$EM()}updated(e){}firstUpdated(e){}};Rt.elementStyles=[],Rt.shadowRootOptions={mode:"open"},Rt[jt("elementProperties")]=new Map,Rt[jt("finalized")]=new Map,Re==null||Re({ReactiveElement:Rt}),(bt.reactiveElementVersions??(bt.reactiveElementVersions=[])).push("2.1.1");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const qt=globalThis,ce=qt.trustedTypes,yo=ce?ce.createPolicy("lit-html",{createHTML:t=>t}):void 0,wo="$lit$",mt=`lit$${Math.random().toFixed(9).slice(2)}$`,_o="?"+mt,Ci=`<${_o}>`,$t=document,Kt=()=>$t.createComment(""),Yt=t=>t===null||typeof t!="object"&&typeof t!="function",Ve=Array.isArray,Si=t=>Ve(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",Ie=`[ \f\r]`,Xt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xo=/-->/g,ko=/>/g,Ct=RegExp(`>|${Ie}(?:([^\\s"'>=/]+)(${Ie}*=${Ie}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),$o=/'/g,Co=/"/g,So=/^(?:script|style|textarea|title)$/i,Ai=t=>(e,...o)=>({_$litType$:t,strings:e,values:o}),k=Ai(1),G=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),Ao=new WeakMap,St=$t.createTreeWalker($t,129);function Eo(t,e){if(!Ve(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return yo!==void 0?yo.createHTML(e):e}const Ei=(t,e)=>{const o=t.length-1,i=[];let s,r=e===2?"<svg>":e===3?"<math>":"",n=Xt;for(let a=0;a<o;a++){const u=t[a];let d,h,p=-1,m=0;for(;m<u.length&&(n.lastIndex=m,h=n.exec(u),h!==null);)m=n.lastIndex,n===Xt?h[1]==="!--"?n=xo:h[1]!==void 0?n=ko:h[2]!==void 0?(So.test(h[2])&&(s=RegExp("</"+h[2],"g")),n=Ct):h[3]!==void 0&&(n=Ct):n===Ct?h[0]===">"?(n=s??Xt,p=-1):h[1]===void 0?p=-2:(p=n.lastIndex-h[2].length,d=h[1],n=h[3]===void 0?Ct:h[3]==='"'?Co:$o):n===Co||n===$o?n=Ct:n===xo||n===ko?n=Xt:(n=Ct,s=void 0);const f=n===Ct&&t[a+1].startsWith("/>")?" ":"";r+=n===Xt?u+Ci:p>=0?(i.push(d),u.slice(0,p)+wo+u.slice(p)+mt+f):u+mt+(p===-2?a:f)}return[Eo(t,r+(t[o]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class Zt{constructor({strings:e,_$litType$:o},i){let s;this.parts=[];let r=0,n=0;const a=e.length-1,u=this.parts,[d,h]=Ei(e,o);if(this.el=Zt.createElement(d,i),St.currentNode=this.el.content,o===2||o===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(s=St.nextNode())!==null&&u.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const p of s.getAttributeNames())if(p.endsWith(wo)){const m=h[n++],f=s.getAttribute(p).split(mt),b=/([.?@])?(.*)/.exec(m);u.push({type:1,index:r,name:b[2],strings:f,ctor:b[1]==="."?Oi:b[1]==="?"?Ti:b[1]==="@"?Li:ue}),s.removeAttribute(p)}else p.startsWith(mt)&&(u.push({type:6,index:r}),s.removeAttribute(p));if(So.test(s.tagName)){const p=s.textContent.split(mt),m=p.length-1;if(m>0){s.textContent=ce?ce.emptyScript:"";for(let f=0;f<m;f++)s.append(p[f],Kt()),St.nextNode(),u.push({type:2,index:++r});s.append(p[m],Kt())}}}else if(s.nodeType===8)if(s.data===_o)u.push({type:2,index:r});else{let p=-1;for(;(p=s.data.indexOf(mt,p+1))!==-1;)u.push({type:7,index:r}),p+=mt.length-1}r++}}static createElement(e,o){const i=$t.createElement("template");return i.innerHTML=e,i}}function Nt(t,e,o=t,i){var n,a;if(e===G)return e;let s=i!==void 0?(n=o._$Co)==null?void 0:n[i]:o._$Cl;const r=Yt(e)?void 0:e._$litDirective$;return(s==null?void 0:s.constructor)!==r&&((a=s==null?void 0:s._$AO)==null||a.call(s,!1),r===void 0?s=void 0:(s=new r(t),s._$AT(t,o,i)),i!==void 0?(o._$Co??(o._$Co=[]))[i]=s:o._$Cl=s),s!==void 0&&(e=Nt(t,s._$AS(t,e.values),s,i)),e}class zi{constructor(e,o){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:o},parts:i}=this._$AD,s=((e==null?void 0:e.creationScope)??$t).importNode(o,!0);St.currentNode=s;let r=St.nextNode(),n=0,a=0,u=i[0];for(;u!==void 0;){if(n===u.index){let d;u.type===2?d=new Gt(r,r.nextSibling,this,e):u.type===1?d=new u.ctor(r,u.name,u.strings,this,e):u.type===6&&(d=new Pi(r,this,e)),this._$AV.push(d),u=i[++a]}n!==(u==null?void 0:u.index)&&(r=St.nextNode(),n++)}return St.currentNode=$t,s}p(e){let o=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,o),o+=i.strings.length-2):i._$AI(e[o])),o++}}class Gt{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,o,i,s){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=e,this._$AB=o,this._$AM=i,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const o=this._$AM;return o!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=o.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,o=this){e=Nt(this,e,o),Yt(e)?e===E||e==null||e===""?(this._$AH!==E&&this._$AR(),this._$AH=E):e!==this._$AH&&e!==G&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Si(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!==E&&Yt(this._$AH)?this._$AA.nextSibling.data=e:this.T($t.createTextNode(e)),this._$AH=e}$(e){var r;const{values:o,_$litType$:i}=e,s=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Zt.createElement(Eo(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===s)this._$AH.p(o);else{const n=new zi(s,this),a=n.u(this.options);n.p(o),this.T(a),this._$AH=n}}_$AC(e){let o=Ao.get(e.strings);return o===void 0&&Ao.set(e.strings,o=new Zt(e)),o}k(e){Ve(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let i,s=0;for(const r of e)s===o.length?o.push(i=new Gt(this.O(Kt()),this.O(Kt()),this,this.options)):i=o[s],i._$AI(r),s++;s<o.length&&(this._$AR(i&&i._$AB.nextSibling,s),o.length=s)}_$AR(e=this._$AA.nextSibling,o){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,o);e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var o;this._$AM===void 0&&(this._$Cv=e,(o=this._$AP)==null||o.call(this,e))}}class ue{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,o,i,s,r){this.type=1,this._$AH=E,this._$AN=void 0,this.element=e,this.name=o,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=E}_$AI(e,o=this,i,s){const r=this.strings;let n=!1;if(r===void 0)e=Nt(this,e,o,0),n=!Yt(e)||e!==this._$AH&&e!==G,n&&(this._$AH=e);else{const a=e;let u,d;for(e=r[0],u=0;u<r.length-1;u++)d=Nt(this,a[i+u],o,u),d===G&&(d=this._$AH[u]),n||(n=!Yt(d)||d!==this._$AH[u]),d===E?e=E:e!==E&&(e+=(d??"")+r[u+1]),this._$AH[u]=d}n&&!s&&this.j(e)}j(e){e===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Oi extends ue{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===E?void 0:e}}class Ti extends ue{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==E)}}class Li extends ue{constructor(e,o,i,s,r){super(e,o,i,s,r),this.type=5}_$AI(e,o=this){if((e=Nt(this,e,o,0)??E)===G)return;const i=this._$AH,s=e===E&&i!==E||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==E&&(i===E||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var o;typeof this._$AH=="function"?this._$AH.call(((o=this.options)==null?void 0:o.host)??this.element,e):this._$AH.handleEvent(e)}}class Pi{constructor(e,o,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=o,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Nt(this,e)}}const Me=qt.litHtmlPolyfillSupport;Me==null||Me(Zt,Gt),(qt.litHtmlVersions??(qt.litHtmlVersions=[])).push("3.3.1");const Di=(t,e,o)=>{const i=(o==null?void 0:o.renderBefore)??e;let s=i._$litPart$;if(s===void 0){const r=(o==null?void 0:o.renderBefore)??null;i._$litPart$=s=new Gt(e.insertBefore(Kt(),r),r,void 0,o??{})}return s._$AI(t),s};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const At=globalThis;let Jt=class extends Rt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var o;const e=super.createRenderRoot();return(o=this.renderOptions).renderBefore??(o.renderBefore=e.firstChild),e}update(e){const o=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Di(o,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return G}};Jt._$litElement$=!0,Jt.finalized=!0,(fi=At.litElementHydrateSupport)==null||fi.call(At,{LitElement:Jt});const Fe=At.litElementPolyfillSupport;Fe==null||Fe({LitElement:Jt}),(At.litElementVersions??(At.litElementVersions=[])).push("4.2.1");var Bi=B` .breadcrumb { display: flex; align-items: center; flex-wrap: wrap; } `;const He=new Set,Vt=new Map;let Et,Ue="ltr",We="en";const zo=typeof MutationObserver<"u"&&typeof document<"u"&&typeof document.documentElement<"u";if(zo){const t=new MutationObserver(To);Ue=document.documentElement.dir||"ltr",We=document.documentElement.lang||navigator.language,t.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function Oo(...t){t.map(e=>{const o=e.$code.toLowerCase();Vt.has(o)?Vt.set(o,Object.assign(Object.assign({},Vt.get(o)),e)):Vt.set(o,e),Et||(Et=e)}),To()}function To(){zo&&(Ue=document.documentElement.dir||"ltr",We=document.documentElement.lang||navigator.language),[...He.keys()].map(t=>{typeof t.requestUpdate=="function"&&t.requestUpdate()})}let Ri=class{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){He.add(this.host)}hostDisconnected(){He.delete(this.host)}dir(){return`${this.host.dir||Ue}`.toLowerCase()}lang(){return`${this.host.lang||We}`.toLowerCase()}getTranslationData(e){var o,i;const s=new Intl.Locale(e.replace(/_/g,"-")),r=s==null?void 0:s.language.toLowerCase(),n=(i=(o=s==null?void 0:s.region)===null||o===void 0?void 0:o.toLowerCase())!==null&&i!==void 0?i:"",a=Vt.get(`${r}-${n}`),u=Vt.get(r);return{locale:s,language:r,region:n,primary:a,secondary:u}}exists(e,o){var i;const{primary:s,secondary:r}=this.getTranslationData((i=o.lang)!==null&&i!==void 0?i:this.lang());return o=Object.assign({includeFallback:!1},o),!!(s&&s[e]||r&&r[e]||o.includeFallback&&Et&&Et[e])}term(e,...o){const{primary:i,secondary:s}=this.getTranslationData(this.lang());let r;if(i&&i[e])r=i[e];else if(s&&s[e])r=s[e];else if(Et&&Et[e])r=Et[e];else return console.error(`No translation found for: ${String(e)}`),String(e);return typeof r=="function"?r(...o):r}date(e,o){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),o).format(e)}number(e,o){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),o).format(e)}relativeTime(e,o,i){return new Intl.RelativeTimeFormat(this.lang(),i).format(e,o)}};var Lo={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(t,e)=>`Go to slide ${t} of ${e}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:t=>t===0?"No options selected":t===1?"1 option selected":`${t} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:t=>`Slide ${t}`,toggleColorFormat:"Toggle color format"};Oo(Lo);var Ni=Lo,ut=class extends Ri{};Oo(Ni);var je="";function Po(t){je=t}function Vi(t=""){if(!je){const e=[...document.getElementsByTagName("script")],o=e.find(i=>i.hasAttribute("data-shoelace"));if(o)Po(o.getAttribute("data-shoelace"));else{const i=e.find(r=>/shoelace(\.min)?\.js($|\?)/.test(r.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(r.src));let s="";i&&(s=i.getAttribute("src")),Po(s.split("/").slice(0,-1).join("/"))}}return je.replace(/\/$/,"")+(t?`/${t.replace(/^\//,"")}`:"")}var Ii={name:"default",resolver:t=>Vi(`assets/icons/${t}.svg`)},Mi=Ii,Do={caret:` <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="6 9 12 15 18 9"></polyline> </svg> `,check:` <svg part="checked-icon" class="checkbox__icon" viewBox="0 0 16 16"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round"> <g stroke="currentColor"> <g transform="translate(3.428571, 3.428571)"> <path d="M0,5.71428571 L3.42857143,9.14285714"></path> <path d="M9.14285714,0 L3.42857143,9.14285714"></path> </g> </g> </g> </svg> `,"chevron-down":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16"> <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"/> </svg> `,"chevron-left":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16"> <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"/> </svg> `,"chevron-right":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16"> <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"/> </svg> `,copy:` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-copy" viewBox="0 0 16 16"> <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"/> </svg> `,eye:` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> <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"/> <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"/> </svg> `,"eye-slash":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16"> <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"/> <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"/> <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"/> </svg> `,eyedropper:` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16"> <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> </svg> `,"grip-vertical":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16"> <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> </svg> `,indeterminate:` <svg part="indeterminate-icon" class="checkbox__icon" viewBox="0 0 16 16"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round"> <g stroke="currentColor" stroke-width="2"> <g transform="translate(2.285714, 6.857143)"> <path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path> </g> </g> </g> </svg> `,"person-fill":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16"> <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"/> </svg> `,"play-fill":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16"> <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> </svg> `,"pause-fill":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16"> <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> </svg> `,radio:` <svg part="checked-icon" class="radio__icon" viewBox="0 0 16 16"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g fill="currentColor"> <circle cx="8" cy="8" r="3.42857143"></circle> </g> </g> </svg> `,"star-fill":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16"> <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"/> </svg> `,"x-lg":` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16"> <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"/> </svg> `,"x-circle-fill":` <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"> <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> </svg> `},Fi={name:"system",resolver:t=>t in Do?`data:image/svg+xml,${encodeURIComponent(Do[t])}`:""},Hi=Fi,Ui=[Mi,Hi],qe=[];function Wi(t){qe.push(t)}function ji(t){qe=qe.filter(e=>e!==t)}function Bo(t){return Ui.find(e=>e.name===t)}var qi=B` :host { display: inline-block; width: 1em; height: 1em; box-sizing: content-box !important; } svg { display: block; height: 100%; width: 100%; } `,Ro=Object.defineProperty,Ki=Object.defineProperties,Yi=Object.getOwnPropertyDescriptor,Xi=Object.getOwnPropertyDescriptors,No=Object.getOwnPropertySymbols,Zi=Object.prototype.hasOwnProperty,Gi=Object.prototype.propertyIsEnumerable,Ke=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),Ye=t=>{throw TypeError(t)},Vo=(t,e,o)=>e in t?Ro(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,zt=(t,e)=>{for(var o in e||(e={}))Zi.call(e,o)&&Vo(t,o,e[o]);if(No)for(var o of No(e))Gi.call(e,o)&&Vo(t,o,e[o]);return t},de=(t,e)=>Ki(t,Xi(e)),l=(t,e,o,i)=>{for(var s=i>1?void 0:i?Yi(e,o):e,r=t.length-1,n;r>=0;r--)(n=t[r])&&(s=(i?n(e,o,s):n(s))||s);return i&&s&&Ro(e,o,s),s},Io=(t,e,o)=>e.has(t)||Ye("Cannot "+o),Ji=(t,e,o)=>(Io(t,e,"read from private field"),e.get(t)),Qi=(t,e,o)=>e.has(t)?Ye("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),ts=(t,e,o,i)=>(Io(t,e,"write to private field"),e.set(t,o),o),es=function(t,e){this[0]=t,this[1]=e},os=t=>{var e=t[Ke("asyncIterator")],o=!1,i,s={};return e==null?(e=t[Ke("iterator")](),i=r=>s[r]=n=>e[r](n)):(e=e.call(t),i=r=>s[r]=n=>{if(o){if(o=!1,r==="throw")throw n;return n}return o=!0,{done:!1,value:new es(new Promise(a=>{var u=e[r](n);u instanceof Object||Ye("Object expected"),a(u)}),1)}}),s[Ke("iterator")]=()=>s,i("next"),"throw"in e?i("throw"):s.throw=r=>{throw r},"return"in e&&i("return"),s};function L(t,e){const o=zt({waitUntilFirstUpdate:!1},e);return(i,s)=>{const{update:r}=i,n=Array.isArray(t)?t:[t];i.update=function(a){n.forEach(u=>{const d=u;if(a.has(d)){const h=a.get(d),p=this[d];h!==p&&(!o.waitUntilFirstUpdate||this.hasUpdated)&&this[s](h,p)}}),r.call(this,a)}}}var H=B` :host { box-sizing: border-box; } :host *, :host *::before, :host *::after { box-sizing: inherit; } [hidden] { display: none !important; } `;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const is={attribute:!0,type:String,converter:Bt,reflect:!1,hasChanged:Ne},ss=(t=is,e,o)=>{const{kind:i,metadata:s}=o;let r=globalThis.litPropertyMetadata.get(s);if(r===void 0&&globalThis.litPropertyMetadata.set(s,r=new Map),i==="setter"&&((t=Object.create(t)).wrapped=!0),r.set(o.name,t),i==="accessor"){const{name:n}=o;return{set(a){const u=e.get.call(this);e.set.call(this,a),this.requestUpdate(n,u,t)},init(a){return a!==void 0&&this.C(n,void 0,t,a),a}}}if(i==="setter"){const{name:n}=o;return function(a){const u=this[n];e.call(this,a),this.requestUpdate(n,u,t)}}throw Error("Unsupported decorator location: "+i)};function c(t){return(e,o)=>typeof o=="object"?ss(t,e,o):((i,s,r)=>{const n=s.hasOwnProperty(r);return s.constructor.createProperty(r,i),n?Object.getOwnPropertyDescriptor(s,r):void 0})(t,e,o)}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function R(t){return c({...t,state:!0,attribute:!1})}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const rs=(t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,o),o);/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function O(t,e){return(o,i,s)=>{const r=n=>{var a;return((a=n.renderRoot)==null?void 0:a.querySelector(t))??null};return rs(o,i,{get(){return r(this)}})}}var he,P=class extends Jt{constructor(){super(),Qi(this,he,!1),this.initialReflectedProperties=new Map,Object.entries(this.constructor.dependencies).forEach(([t,e])=>{this.constructor.define(t,e)})}emit(t,e){const o=new CustomEvent(t,zt({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(o),o}static define(t,e=this,o={}){const i=customElements.get(t);if(!i){try{customElements.define(t,e,o)}catch{customElements.define(t,class extends e{},o)}return}let s=" (unknown version)",r=s;"version"in e&&e.version&&(s=" v"+e.version),"version"in i&&i.version&&(r=" v"+i.version),!(s&&r&&s===r)&&console.warn(`Attempted to register <${t}>${s}, but <${t}>${r} has already been registered.`)}attributeChangedCallback(t,e,o){Ji(this,he)||(this.constructor.elementProperties.forEach((i,s)=>{i.reflect&&this[s]!=null&&this.initialReflectedProperties.set(s,this[s])}),ts(this,he,!0)),super.attributeChangedCallback(t,e,o)}willUpdate(t){super.willUpdate(t),this.initialReflectedProperties.forEach((e,o)=>{t.has(o)&&this[o]==null&&(this[o]=e)})}};he=new WeakMap,P.version="2.20.1",P.dependencies={},l([c()],P.prototype,"dir",2),l([c()],P.prototype,"lang",2);/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const ns=(t,e)=>(t==null?void 0:t._$litType$)!==void 0,ls=t=>t.strings===void 0,as={},cs=(t,e=as)=>t._$AH=e;var Qt=Symbol(),pe=Symbol(),Xe,Ze=new Map,V=class extends P{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,e){var o;let i;if(e!=null&&e.spriteSheet)return this.svg=k`<svg part="svg"> <use part="use" href="${t}"></use> </svg>`,this.svg;try{if(i=await fetch(t,{mode:"cors"}),!i.ok)return i.status===410?Qt:pe}catch{return pe}try{const s=document.createElement("div");s.innerHTML=await i.text();const r=s.firstElementChild;if(((o=r==null?void 0:r.tagName)==null?void 0:o.toLowerCase())!=="svg")return Qt;Xe||(Xe=new DOMParser);const a=Xe.parseFromString(r.outerHTML,"text/html").body.querySelector("svg");return a?(a.part.add("svg"),document.adoptNode(a)):Qt}catch{return Qt}}connectedCallback(){super.connectedCallback(),Wi(this)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),ji(this)}getIconSource(){const t=Bo(this.library);return this.name&&t?{url:t.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var t;const{url:e,fromLibrary:o}=this.getIconSource(),i=o?Bo(this.library):void 0;if(!e){this.svg=null;return}let s=Ze.get(e);if(s||(s=this.resolveIcon(e,i),Ze.set(e,s)),!this.initialRender)return;const r=await s;if(r===pe&&Ze.delete(e),e===this.getIconSource().url){if(ns(r)){if(this.svg=r,i){await this.updateComplete;const n=this.shadowRoot.querySelector("[part='svg']");typeof i.mutator=="function"&&n&&i.mutator(n)}return}switch(r){case pe:case Qt:this.svg=null,this.emit("sl-error");break;default:this.svg=r.cloneNode(!0),(t=i==null?void 0:i.mutator)==null||t.call(i,this.svg),this.emit("sl-load")}}}render(){return this.svg}};V.styles=[H,qi],l([R()],V.prototype,"svg",2),l([c({reflect:!0})],V.prototype,"name",2),l([c()],V.prototype,"src",2),l([c()],V.prototype,"label",2),l([c({reflect:!0})],V.prototype,"library",2),l([L("label")],V.prototype,"handleLabelChange",1),l([L(["name","src","library"])],V.prototype,"setIcon",1);var Ot=class extends P{constructor(){super(...arguments),this.localize=new ut(this),this.separatorDir=this.localize.dir(),this.label=""}getSeparator(){const e=this.separatorSlot.assignedElements({flatten:!0})[0].cloneNode(!0);return[e,...e.querySelectorAll("[id]")].forEach(o=>o.removeAttribute("id")),e.setAttribute("data-default",""),e.slot="separator",e}handleSlotChange(){const t=[...this.defaultSlot.assignedElements({flatten:!0})].filter(e=>e.tagName.toLowerCase()==="sl-breadcrumb-item");t.forEach((e,o)=>{const i=e.querySelector('[slot="separator"]');i===null?e.append(this.getSeparator()):i.hasAttribute("data-default")&&i.replaceWith(this.getSeparator()),o===t.length-1?e.setAttribute("aria-current","page"):e.removeAttribute("aria-current")})}render(){return this.separatorDir!==this.localize.dir()&&(this.separatorDir=this.localize.dir(),this.updateComplete.then(()=>this.handleSlotChange())),k` <nav part="base" class="breadcrumb" aria-label=${this.label}> <slot @slotchange=${this.handleSlotChange}></slot> </nav> <span hidden aria-hidden="true"> <slot name="separator"> <sl-icon name=${this.localize.dir()==="rtl"?"chevron-left":"chevron-right"} library="system"></sl-icon> </slot> </span> `}};Ot.styles=[H,Bi],Ot.dependencies={"sl-icon":V},l([O("slot")],Ot.prototype,"defaultSlot",2),l([O('slot[name="separator"]')],Ot.prototype,"separatorSlot",2),l([c()],Ot.prototype,"label",2);/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const us=new Set(["children","localName","ref","style","className"]),Mo=new WeakMap,Fo=(t,e,o,i,s)=>{const r=s==null?void 0:s[e];r===void 0?(t[e]=o,o==null&&e in HTMLElement.prototype&&t.removeAttribute(e)):o!==i&&((n,a,u)=>{let d=Mo.get(n);d===void 0&&Mo.set(n,d=new Map);let h=d.get(a);u!==void 0?h===void 0?(d.set(a,h={handleEvent:u}),n.addEventListener(a,h)):h.handleEvent=u:h!==void 0&&(d.delete(a),n.removeEventListener(a,h))})(t,r,o)},K=({react:t,tagName:e,elementClass:o,events:i,displayName:s})=>{const r=new Set(Object.keys(i??{})),n=t.forwardRef(((a,u)=>{const d=t.useRef(new Map),h=t.useRef(null),p={},m={};for(const[f,b]of Object.entries(a))us.has(f)?p[f==="className"?"class":f]=b:r.has(f)||f in o.prototype?m[f]=b:p[f]=b;return t.useLayoutEffect((()=>{if(h.current===null)return;const f=new Map;for(const b in m)Fo(h.current,b,a[b],d.current.get(b),i),d.current.delete(b),f.set(b,a[b]);for(const[b,v]of d.current)Fo(h.current,b,void 0,v,i);d.current=f})),t.useLayoutEffect((()=>{var f;(f=h.current)==null||f.removeAttribute("defer-hydration")}),[]),p.suppressHydrationWarning=!0,t.createElement(e,{...p,ref:t.useCallback((f=>{h.current=f,typeof u=="function"?u(f):u!==null&&(u.current=f)}),[u])})}));return n.displayName=s??o.name,n};var ds="sl-breadcrumb";Ot.define("sl-breadcrumb");var hs=K({tagName:ds,elementClass:Ot,react:q,events:{},displayName:"SlBreadcrumb"}),ps=hs,fs=B` :host { display: inline-flex; } .breadcrumb-item { display: inline-flex; align-items: center; font-family: var(--sl-font-sans); font-size: var(--sl-font-size-small); font-weight: var(--sl-font-weight-semibold); color: var(--sl-color-neutral-600); line-height: var(--sl-line-height-normal); white-space: nowrap; } .breadcrumb-item__label { display: inline-block; font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; text-decoration: none; color: inherit; background: none; border: none; border-radius: var(--sl-border-radius-medium); padding: 0; margin: 0; cursor: pointer; transition: var(--sl-transition-fast) --color; } :host(:not(:last-of-type)) .breadcrumb-item__label { color: var(--sl-color-primary-600); } :host(:not(:last-of-type)) .breadcrumb-item__label:hover { color: var(--sl-color-primary-500); } :host(:not(:last-of-type)) .breadcrumb-item__label:active { color: var(--sl-color-primary-600); } .breadcrumb-item__label:focus { outline: none; } .breadcrumb-item__label:focus-visible { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); } .breadcrumb-item__prefix, .breadcrumb-item__suffix { display: none; flex: 0 0 auto; display: flex; align-items: center; } .breadcrumb-item--has-prefix .breadcrumb-item__prefix { display: inline-flex; margin-inline-end: var(--sl-spacing-x-small); } .breadcrumb-item--has-suffix .breadcrumb-item__suffix { display: inline-flex; margin-inline-start: var(--sl-spacing-x-small); } :host(:last-of-type) .breadcrumb-item__separator { display: none; } .breadcrumb-item__separator { display: inline-flex; align-items: center; margin: 0 var(--sl-spacing-x-small); user-select: none; -webkit-user-select: none; } `,Tt=class{constructor(t,...e){this.slotNames=[],this.handleSlotChange=o=>{const i=o.target;(this.slotNames.includes("[default]")&&!i.name||i.name&&this.slotNames.includes(i.name))&&this.host.requestUpdate()},(this.host=t).addController(this),this.slotNames=e}hasDefaultSlot(){return[...this.host.childNodes].some(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent.trim()!=="")return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if(e.tagName.toLowerCase()==="sl-visually-hidden")return!1;if(!e.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(t){return this.host.querySelector(`:scope > [slot="${t}"]`)!==null}test(t){return t==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const gt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},Ge=t=>(...e)=>({_$litDirective$:t,values:e});let Je=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,o,i){this._$Ct=e,this._$AM=o,this._$Ci=i}_$AS(e,o){return this.update(e,o)}update(e,o){return this.render(...o)}};/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const I=Ge(class extends Je{constructor(t){var e;if(super(t),t.type!==gt.ATTRIBUTE||t.name!=="class"||((e=t.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,s;if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in e)e[r]&&!((i=this.nt)!=null&&i.has(r))&&this.st.add(r);return this.render(e)}const o=t.element.classList;for(const r of this.st)r in e||(o.remove(r),this.st.delete(r));for(const r in e){const n=!!e[r];n===this.st.has(r)||(s=this.nt)!=null&&s.has(r)||(n?(o.add(r),this.st.add(r)):(o.remove(r),this.st.delete(r)))}return G}});/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const y=t=>t??E;var dt=class extends P{constructor(){super(...arguments),this.hasSlotController=new Tt(this,"prefix","suffix"),this.renderType="button",this.rel="noreferrer noopener"}setRenderType(){const t=this.defaultSlot.assignedElements({flatten:!0}).filter(e=>e.tagName.toLowerCase()==="sl-dropdown").length>0;if(this.href){this.renderType="link";return}if(t){this.renderType="dropdown";return}this.renderType="button"}hrefChanged(){this.setRenderType()}handleSlotChange(){this.setRenderType()}render(){return k` <div part="base" class=${I({"breadcrumb-item":!0,"breadcrumb-item--has-prefix":this.hasSlotController.test("prefix"),"breadcrumb-item--has-suffix":this.hasSlotController.test("suffix")})} > <span part="prefix" class="breadcrumb-item__prefix"> <slot name="prefix"></slot> </span> ${this.renderType==="link"?k` <a part="label" class="breadcrumb-item__label breadcrumb-item__label--link" href="${this.href}" target="${y(this.target?this.target:void 0)}" rel=${y(this.target?this.rel:void 0)} > <slot @slotchange=${this.handleSlotChange}></slot> </a> `:""} ${this.renderType==="button"?k` <button part="label" type="button" class="breadcrumb-item__label breadcrumb-item__label--button"> <slot @slotchange=${this.handleSlotChange}></slot> </button> `:""} ${this.renderType==="dropdown"?k` <div part="label" class="breadcrumb-item__label breadcrumb-item__label--drop-down"> <slot @slotchange=${this.handleSlotChange}></slot> </div> `:""} <span part="suffix" class="breadcrumb-item__suffix"> <slot name="suffix"></slot> </span> <span part="separator" class="breadcrumb-item__separator" aria-hidden="true"> <slot name="separator"></slot> </span> </div> `}};dt.styles=[H,fs],l([O("slot:not([name])")],dt.prototype,"defaultSlot",2),l([R()],dt.prototype,"renderType",2),l([c()],dt.prototype,"href",2),l([c()],dt.prototype,"target",2),l([c()],dt.prototype,"rel",2),l([L("href",{waitUntilFirstUpdate:!0})],dt.prototype,"hrefChanged",1);var bs="sl-breadcrumb-item";dt.define("sl-breadcrumb-item");var ms=K({tagName:bs,elementClass:dt,react:q,events:{},displayName:"SlBreadcrumbItem"}),gs=ms,vs=B` :host { --track-width: 2px; --track-color: rgb(128 128 128 / 25%); --indicator-color: var(--sl-color-primary-600); --speed: 2s; display: inline-flex; width: 1em; height: 1em; flex: none; } .spinner { flex: 1 1 auto; height: 100%; width: 100%; } .spinner__track, .spinner__indicator { fill: none; stroke-width: var(--track-width); r: calc(0.5em - var(--track-width) / 2); cx: 0.5em; cy: 0.5em; transform-origin: 50% 50%; } .spinner__track { stroke: var(--track-color); transform-origin: 0% 0%; } .spinner__indicator { stroke: var(--indicator-color); stroke-linecap: round; stroke-dasharray: 150% 75%; animation: spin var(--speed) linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); stroke-dasharray: 0.05em, 3em; } 50% { transform: rotate(450deg); stroke-dasharray: 1.375em, 1.375em; } 100% { transform: rotate(1080deg); stroke-dasharray: 0.05em, 3em; } } `,fe=class extends P{constructor(){super(...arguments),this.localize=new ut(this)}render(){return k` <svg part="base" class="spinner" role="progressbar" aria-label=${this.localize.term("loading")}> <circle class="spinner__track"></circle> <circle class="spinner__indicator"></circle> </svg> `}};fe.styles=[H,vs];var te=new WeakMap,ee=new WeakMap,oe=new WeakMap,Qe=new WeakSet,be=new WeakMap,ie=class{constructor(t,e){this.handleFormData=o=>{const i=this.options.disabled(this.host),s=this.options.name(this.host),r=this.options.value(this.host),n=this.host.tagName.toLowerCase()==="sl-button";this.host.isConnected&&!i&&!n&&typeof s=="string"&&s.length>0&&typeof r<"u"&&(Array.isArray(r)?r.forEach(a=>{o.formData.append(s,a.toString())}):o.formData.append(s,r.toString()))},this.handleFormSubmit=o=>{var i;const s=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&((i=te.get(this.form))==null||i.forEach(n=>{this.setUserInteracted(n,!0)})),this.form&&!this.form.noValidate&&!s&&!r(this.host)&&(o.preventDefault(),o.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),be.set(this.host,[])},this.handleInteraction=o=>{const i=be.get(this.host);i.includes(o.type)||i.push(o.type),i.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)},this.checkFormValidity=()=>{if(this.form&&!this.form.noValidate){const o=this.form.querySelectorAll("*");for(const i of o)if(typeof i.checkValidity=="function"&&!i.checkValidity())return!1}return!0},this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){const o=this.form.querySelectorAll("*");for(const i of o)if(typeof i.reportValidity=="function"&&!i.reportValidity())return!1}return!0},(this.host=t).addController(this),this.options=zt({form:o=>{const i=o.form;if(i){const r=o.getRootNode().querySelector(`#${i}`);if(r)return r}return o.closest("form")},name:o=>o.name,value:o=>o.value,defaultValue:o=>o.defaultValue,disabled:o=>{var i;return(i=o.disabled)!=null?i:!1},reportValidity:o=>typeof o.reportValidity=="function"?o.reportValidity():!0,checkValidity:o=>typeof o.checkValidity=="function"?o.checkValidity():!0,setValue:(o,i)=>o.value=i,assumeInteractionOn:["sl-input"]},e)}hostConnected(){const t=this.options.form(this.host);t&&this.attachForm(t),be.set(this.host,[]),this.options.assumeInteractionOn.forEach(e=>{this.host.addEventListener(e,this.handleInteraction)})}hostDisconnected(){this.detachForm(),be.delete(this.host),this.options.assumeInteractionOn.forEach(t=>{this.host.removeEventListener(t,this.handleInteraction)})}hostUpdated(){const t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(t){t?(this.form=t,te.has(this.form)?te.get(this.form).add(this.host):te.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),ee.has(this.form)||(ee.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),oe.has(this.form)||(oe.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())):this.form=void 0}detachForm(){if(!this.form)return;const t=te.get(this.form);t&&(t.delete(this.host),t.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),ee.has(this.form)&&(this.form.reportValidity=ee.get(this.form),ee.delete(this.form)),oe.has(this.form)&&(this.form.checkValidity=oe.get(this.form),oe.delete(this.form)),this.fo