@govtechsg/sgds-web-component 3.13.2-rc.0 → 3.14.1-rc.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/Masthead/index.js +1 -1
- package/README.md +0 -6
- package/components/Breadcrumb/index.umd.min.js +5 -5
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/Dropdown/dropdown-item.js +1 -1
- package/components/Dropdown/index.umd.min.js +1 -1
- package/components/Dropdown/index.umd.min.js.map +1 -1
- package/components/Mainnav/index.umd.min.js +18 -18
- package/components/Mainnav/index.umd.min.js.map +1 -1
- package/components/Mainnav/mainnav-dropdown.js +1 -1
- package/components/Mainnav/mainnav-item.js +1 -1
- package/components/Mainnav/mainnav.js +1 -1
- package/components/Mainnav/sgds-mainnav-dropdown.js +2 -2
- package/components/Mainnav/sgds-mainnav-dropdown.js.map +1 -1
- package/components/Masthead/index.umd.min.js +1 -1
- package/components/Masthead/index.umd.min.js.map +1 -1
- package/components/Masthead/masthead.js +1 -1
- package/components/OverflowMenu/index.umd.min.js +1 -1
- package/components/OverflowMenu/index.umd.min.js.map +1 -1
- package/components/Sidebar/index.umd.min.js +163 -89
- package/components/Sidebar/index.umd.min.js.map +1 -1
- package/components/Sidebar/sgds-sidebar-group.js.map +1 -1
- package/components/Sidebar/sgds-sidebar-section.d.ts +8 -7
- package/components/Sidebar/sgds-sidebar-section.js +28 -25
- package/components/Sidebar/sgds-sidebar-section.js.map +1 -1
- package/components/Sidebar/sgds-sidebar.d.ts +71 -3
- package/components/Sidebar/sgds-sidebar.js +104 -30
- package/components/Sidebar/sgds-sidebar.js.map +1 -1
- package/components/Sidebar/sidebar-item.js +1 -1
- package/components/Sidebar/sidebar-section.js +1 -1
- package/components/Sidebar/sidebar.js +1 -1
- package/components/index.umd.min.js +48 -30
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +1 -1
- package/css/utility.css +41 -0
- package/index.umd.min.js +64 -44
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/components/Dropdown/dropdown-item.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-item.js +1 -1
- package/react/components/Mainnav/mainnav-dropdown.cjs.js +1 -1
- package/react/components/Mainnav/mainnav-dropdown.js +1 -1
- package/react/components/Mainnav/mainnav-item.cjs.js +1 -1
- package/react/components/Mainnav/mainnav-item.js +1 -1
- package/react/components/Mainnav/mainnav.cjs.js +1 -1
- package/react/components/Mainnav/mainnav.js +1 -1
- package/react/components/Mainnav/sgds-mainnav-dropdown.cjs.js +2 -2
- package/react/components/Mainnav/sgds-mainnav-dropdown.cjs.js.map +1 -1
- package/react/components/Mainnav/sgds-mainnav-dropdown.js +2 -2
- package/react/components/Mainnav/sgds-mainnav-dropdown.js.map +1 -1
- package/react/components/Masthead/masthead.cjs.js +1 -1
- package/react/components/Masthead/masthead.js +1 -1
- package/react/components/Sidebar/sgds-sidebar-group.cjs.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar-group.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar-section.cjs.js +27 -24
- package/react/components/Sidebar/sgds-sidebar-section.cjs.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar-section.js +28 -25
- package/react/components/Sidebar/sgds-sidebar-section.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar.cjs.js +104 -30
- package/react/components/Sidebar/sgds-sidebar.cjs.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar.js +104 -30
- package/react/components/Sidebar/sgds-sidebar.js.map +1 -1
- package/react/components/Sidebar/sidebar-item.cjs.js +1 -1
- package/react/components/Sidebar/sidebar-item.js +1 -1
- package/react/components/Sidebar/sidebar-section.cjs.js +1 -1
- package/react/components/Sidebar/sidebar-section.js +1 -1
- package/react/components/Sidebar/sidebar.cjs.js +1 -1
- package/react/components/Sidebar/sidebar.js +1 -1
- package/react/index.cjs.js +8 -8
- package/react/index.d.ts +1 -1
- package/react/index.js +1 -1
- package/react/sidebar/index.cjs.js +3 -1
- package/react/sidebar/index.cjs.js.map +1 -1
- package/react/sidebar/index.js +3 -1
- package/react/sidebar/index.js.map +1 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";function e(e,t,l
|
|
1
|
+
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";function e(e,t,i,l){var a,s=arguments.length,o=s<3?t:null===l?l=Object.getOwnPropertyDescriptor(t,i):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,l);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,i,o):a(t,i))||o);return s>3&&o&&Object.defineProperty(t,i,o),o}"function"==typeof SuppressedError&&SuppressedError;
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2019 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
const t=globalThis,l=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),a=new WeakMap;class o{constructor(e,t,l){if(this._$cssResult$=!0,l!==i)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=t}get styleSheet(){let e=this._styleSheet;const t=this._strings;if(l&&void 0===e){const l=void 0!==t&&1===t.length;l&&(e=a.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),l&&a.set(t,e))}return e}toString(){return this.cssText}}const s=(e,...t)=>{const l=1===e.length?e[0]:t.reduce((t,l,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(l)+e[i+1],e[0]);return new o(l,e,i)},n=e=>{let t="";for(const l of e.cssRules)t+=l.cssText;return new o("string"==typeof(l=t)?l:String(l),void 0,i);var l},c=l?e=>e:e=>e instanceof CSSStyleSheet?n(e):e,{is:r,defineProperty:d,getOwnPropertyDescriptor:h,getOwnPropertyNames:v,getOwnPropertySymbols:u,getPrototypeOf:p}=Object,g=globalThis;let w;const f=g.trustedTypes,m=f?f.emptyScript:"",x=g.reactiveElementPolyfillSupportDevMode;g.litIssuedWarnings??=new Set,w=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,g.litIssuedWarnings.has(t)||g.litIssuedWarnings.has(e)||(console.warn(t),g.litIssuedWarnings.add(t))},queueMicrotask(()=>{w("dev-mode","Lit is in dev mode. Not recommended for production!"),g.ShadyDOM?.inUse&&void 0===x&&w("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});const Z=(e,t)=>e,b={toAttribute(e,t){switch(t){case Boolean:e=e?m:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let l=e;switch(t){case Boolean:l=null!==e;break;case Number:l=null===e?null:Number(e);break;case Object:case Array:try{l=JSON.parse(e)}catch(e){l=null}}return l}},C=(e,t)=>!r(e,t),M={attribute:!0,type:String,converter:b,reflect:!1,useDefault:!1,hasChanged:C};Symbol.metadata??=Symbol("metadata"),g.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(e){this.__prepare(),(this._initializers??=[]).push(e)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(e,t=M){if(t.state&&(t.attribute=!1),this.__prepare(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const l=Symbol.for(`${String(e)} (@property() cache)`),i=this.getPropertyDescriptor(e,l,t);void 0!==i&&d(this.prototype,e,i)}}static getPropertyDescriptor(e,t,l){const{get:i,set:a}=h(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==i){if("value"in(h(this.prototype,e)??{}))throw new Error(`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);w("reactive-property-without-getter",`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`)}return{get:i,set(t){const o=i?.call(this);a?.call(this,t),this.requestUpdate(e,o,l)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??M}static __prepare(){if(this.hasOwnProperty(Z("elementProperties")))return;const e=p(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Z("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(Z("properties"))){const e=this.properties,t=[...v(e),...u(e)];for(const l of t)this.createProperty(l,e[l])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,l]of t)this.elementProperties.set(e,l)}this.__attributeToPropertyMap=new Map;for(const[e,t]of this.elementProperties){const l=this.__attributeNameForProperty(e,t);void 0!==l&&this.__attributeToPropertyMap.set(l,e)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&w("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&w("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const l=new Set(e.flat(1/0).reverse());for(const e of l)t.unshift(c(e))}else void 0!==e&&t.push(c(e));return t}static __attributeNameForProperty(e,t){const l=t.attribute;return!1===l?void 0:"string"==typeof l?l:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this.__instanceProperties=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}__initialize(){this.__updatePromise=new Promise(e=>this.enableUpdating=e),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach(e=>e(this))}addController(e){(this.__controllers??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this.__controllers?.delete(e)}__saveInstanceProperties(){const e=new Map,t=this.constructor.elementProperties;for(const l of t.keys())this.hasOwnProperty(l)&&(e.set(l,this[l]),delete this[l]);e.size>0&&(this.__instanceProperties=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,i)=>{if(l)e.adoptedStyleSheets=i.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const l of i){const i=document.createElement("style"),a=t.litNonce;void 0!==a&&i.setAttribute("nonce",a),i.textContent=l.cssText,e.appendChild(i)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this.__controllers?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,l){this._$attributeToProperty(e,l)}__propertyToAttribute(e,t){const l=this.constructor.elementProperties.get(e),i=this.constructor.__attributeNameForProperty(e,l);if(void 0!==i&&!0===l.reflect){const a=(void 0!==l.converter?.toAttribute?l.converter:b).toAttribute(t,l.type);this.constructor.enabledWarnings.includes("migration")&&void 0===a&&w("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`),this.__reflectingProperty=e,null==a?this.removeAttribute(i):this.setAttribute(i,a),this.__reflectingProperty=null}}_$attributeToProperty(e,t){const l=this.constructor,i=l.__attributeToPropertyMap.get(e);if(void 0!==i&&this.__reflectingProperty!==i){const e=l.getPropertyOptions(i),a="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:b;this.__reflectingProperty=i;const o=a.fromAttribute(t,e.type);this[i]=o??this.__defaultValues?.get(i)??o,this.__reflectingProperty=null}}requestUpdate(e,t,l,i=!1,a){if(void 0!==e){e instanceof Event&&w("","The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()");const o=this.constructor;!1===i&&(a=this[e]),l??=o.getPropertyOptions(e);if(!((l.hasChanged??C)(a,t)||l.useDefault&&l.reflect&&a===this.__defaultValues?.get(e)&&!this.hasAttribute(o.__attributeNameForProperty(e,l))))return;this._$changeProperty(e,t,l)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,{useDefault:l,reflect:i,wrapped:a},o){l&&!(this.__defaultValues??=new Map).has(e)&&(this.__defaultValues.set(e,o??t??this[e]),!0!==a||void 0!==o)||(this._$changedProperties.has(e)||(this.hasUpdated||l||(t=void 0),this._$changedProperties.set(e,t)),!0===i&&this.__reflectingProperty!==e&&(this.__reflectingProperties??=new Set).add(e))}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){const e=this.performUpdate();return this.constructor.enabledWarnings.includes("async-perform-update")&&"function"==typeof e?.then&&w("async-perform-update",`Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`),e}performUpdate(){if(!this.isUpdatePending)return;var e;if(e={kind:"update"},g.emitLitDebugLogEvents&&g.dispatchEvent(new CustomEvent("lit-debug",{detail:e})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const e=[...this.constructor.elementProperties.keys()].filter(e=>this.hasOwnProperty(e)&&e in p(this));if(e.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${e.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}if(this.__instanceProperties){for(const[e,t]of this.__instanceProperties)this[e]=t;this.__instanceProperties=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,l]of e){const{wrapped:e}=l,i=this[t];!0!==e||this._$changedProperties.has(t)||void 0===i||this._$changeProperty(t,void 0,l,i)}}let t=!1;const l=this._$changedProperties;try{t=this.shouldUpdate(l),t?(this.willUpdate(l),this.__controllers?.forEach(e=>e.hostUpdate?.()),this.update(l)):this.__markUpdated()}catch(e){throw t=!1,this.__markUpdated(),e}t&&this._$didUpdate(l)}willUpdate(e){}_$didUpdate(e){this.__controllers?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e),this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update")&&w("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(e){return!0}update(e){this.__reflectingProperties&&=this.__reflectingProperties.forEach(e=>this.__propertyToAttribute(e,this[e])),this.__markUpdated()}updated(e){}firstUpdated(e){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[Z("elementProperties")]=new Map,y[Z("finalized")]=new Map,x?.({ReactiveElement:y});{y.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(Z("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};y.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},y.disableWarning=function(t){e(this);const l=this.enabledWarnings.indexOf(t);l>=0&&this.enabledWarnings.splice(l,1)}}(g.reactiveElementVersions??=[]).push("2.1.2"),g.reactiveElementVersions.length>1&&queueMicrotask(()=>{w("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});
|
|
7
|
+
const t=globalThis,i=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,l=Symbol(),a=new WeakMap;class s{constructor(e,t,i){if(this._$cssResult$=!0,i!==l)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=t}get styleSheet(){let e=this._styleSheet;const t=this._strings;if(i&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=a.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),i&&a.set(t,e))}return e}toString(){return this.cssText}}const o=(e,...t)=>{const i=1===e.length?e[0]:t.reduce((t,i,l)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(i)+e[l+1],e[0]);return new s(i,e,l)},r=e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return new s("string"==typeof(i=t)?i:String(i),void 0,l);var i},n=i?e=>e:e=>e instanceof CSSStyleSheet?r(e):e,{is:c,defineProperty:d,getOwnPropertyDescriptor:h,getOwnPropertyNames:v,getOwnPropertySymbols:g,getPrototypeOf:p}=Object,u=globalThis;let w;const f=u.trustedTypes,m=f?f.emptyScript:"",b=u.reactiveElementPolyfillSupportDevMode;u.litIssuedWarnings??=new Set,w=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,u.litIssuedWarnings.has(t)||u.litIssuedWarnings.has(e)||(console.warn(t),u.litIssuedWarnings.add(t))},queueMicrotask(()=>{w("dev-mode","Lit is in dev mode. Not recommended for production!"),u.ShadyDOM?.inUse&&void 0===b&&w("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});const x=(e,t)=>e,Z={toAttribute(e,t){switch(t){case Boolean:e=e?m:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},C=(e,t)=>!c(e,t),y={attribute:!0,type:String,converter:Z,reflect:!1,useDefault:!1,hasChanged:C};Symbol.metadata??=Symbol("metadata"),u.litPropertyMetadata??=new WeakMap;class M extends HTMLElement{static addInitializer(e){this.__prepare(),(this._initializers??=[]).push(e)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(e,t=y){if(t.state&&(t.attribute=!1),this.__prepare(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol.for(`${String(e)} (@property() cache)`),l=this.getPropertyDescriptor(e,i,t);void 0!==l&&d(this.prototype,e,l)}}static getPropertyDescriptor(e,t,i){const{get:l,set:a}=h(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==l){if("value"in(h(this.prototype,e)??{}))throw new Error(`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);w("reactive-property-without-getter",`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`)}return{get:l,set(t){const s=l?.call(this);a?.call(this,t),this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??y}static __prepare(){if(this.hasOwnProperty(x("elementProperties")))return;const e=p(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(x("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(x("properties"))){const e=this.properties,t=[...v(e),...g(e)];for(const i of t)this.createProperty(i,e[i])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,i]of t)this.elementProperties.set(e,i)}this.__attributeToPropertyMap=new Map;for(const[e,t]of this.elementProperties){const i=this.__attributeNameForProperty(e,t);void 0!==i&&this.__attributeToPropertyMap.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&w("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&w("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(n(e))}else void 0!==e&&t.push(n(e));return t}static __attributeNameForProperty(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this.__instanceProperties=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}__initialize(){this.__updatePromise=new Promise(e=>this.enableUpdating=e),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach(e=>e(this))}addController(e){(this.__controllers??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this.__controllers?.delete(e)}__saveInstanceProperties(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this.__instanceProperties=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,l)=>{if(i)e.adoptedStyleSheets=l.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const i of l){const l=document.createElement("style"),a=t.litNonce;void 0!==a&&l.setAttribute("nonce",a),l.textContent=i.cssText,e.appendChild(l)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this.__controllers?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,i){this._$attributeToProperty(e,i)}__propertyToAttribute(e,t){const i=this.constructor.elementProperties.get(e),l=this.constructor.__attributeNameForProperty(e,i);if(void 0!==l&&!0===i.reflect){const a=(void 0!==i.converter?.toAttribute?i.converter:Z).toAttribute(t,i.type);this.constructor.enabledWarnings.includes("migration")&&void 0===a&&w("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`),this.__reflectingProperty=e,null==a?this.removeAttribute(l):this.setAttribute(l,a),this.__reflectingProperty=null}}_$attributeToProperty(e,t){const i=this.constructor,l=i.__attributeToPropertyMap.get(e);if(void 0!==l&&this.__reflectingProperty!==l){const e=i.getPropertyOptions(l),a="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Z;this.__reflectingProperty=l;const s=a.fromAttribute(t,e.type);this[l]=s??this.__defaultValues?.get(l)??s,this.__reflectingProperty=null}}requestUpdate(e,t,i,l=!1,a){if(void 0!==e){e instanceof Event&&w("","The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()");const s=this.constructor;!1===l&&(a=this[e]),i??=s.getPropertyOptions(e);if(!((i.hasChanged??C)(a,t)||i.useDefault&&i.reflect&&a===this.__defaultValues?.get(e)&&!this.hasAttribute(s.__attributeNameForProperty(e,i))))return;this._$changeProperty(e,t,i)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,{useDefault:i,reflect:l,wrapped:a},s){i&&!(this.__defaultValues??=new Map).has(e)&&(this.__defaultValues.set(e,s??t??this[e]),!0!==a||void 0!==s)||(this._$changedProperties.has(e)||(this.hasUpdated||i||(t=void 0),this._$changedProperties.set(e,t)),!0===l&&this.__reflectingProperty!==e&&(this.__reflectingProperties??=new Set).add(e))}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){const e=this.performUpdate();return this.constructor.enabledWarnings.includes("async-perform-update")&&"function"==typeof e?.then&&w("async-perform-update",`Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`),e}performUpdate(){if(!this.isUpdatePending)return;var e;if(e={kind:"update"},u.emitLitDebugLogEvents&&u.dispatchEvent(new CustomEvent("lit-debug",{detail:e})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const e=[...this.constructor.elementProperties.keys()].filter(e=>this.hasOwnProperty(e)&&e in p(this));if(e.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${e.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}if(this.__instanceProperties){for(const[e,t]of this.__instanceProperties)this[e]=t;this.__instanceProperties=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,i]of e){const{wrapped:e}=i,l=this[t];!0!==e||this._$changedProperties.has(t)||void 0===l||this._$changeProperty(t,void 0,i,l)}}let t=!1;const i=this._$changedProperties;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),this.__controllers?.forEach(e=>e.hostUpdate?.()),this.update(i)):this.__markUpdated()}catch(e){throw t=!1,this.__markUpdated(),e}t&&this._$didUpdate(i)}willUpdate(e){}_$didUpdate(e){this.__controllers?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e),this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update")&&w("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(e){return!0}update(e){this.__reflectingProperties&&=this.__reflectingProperties.forEach(e=>this.__propertyToAttribute(e,this[e])),this.__markUpdated()}updated(e){}firstUpdated(e){}}M.elementStyles=[],M.shadowRootOptions={mode:"open"},M[x("elementProperties")]=new Map,M[x("finalized")]=new Map,b?.({ReactiveElement:M});{M.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(x("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};M.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},M.disableWarning=function(t){e(this);const i=this.enabledWarnings.indexOf(t);i>=0&&this.enabledWarnings.splice(i,1)}}(u.reactiveElementVersions??=[]).push("2.1.2"),u.reactiveElementVersions.length>1&&queueMicrotask(()=>{w("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const _=globalThis,V=e=>{_.emitLitDebugLogEvents&&_.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let H,A=0;_.litIssuedWarnings??=new Set,H=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",_.litIssuedWarnings.has(t)||_.litIssuedWarnings.has(e)||(console.warn(t),_.litIssuedWarnings.add(t))},queueMicrotask(()=>{H("dev-mode","Lit is in dev mode. Not recommended for production!")});const B=_.ShadyDOM?.inUse&&!0===_.ShadyDOM?.noPatch?_.ShadyDOM.wrap:e=>e,L=_.trustedTypes,$=L?L.createPolicy("lit-html",{createHTML:e=>e}):void 0,S=e=>e,k=(e,t,l)=>S,E=e=>{if(oe!==k)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");oe=e},P=()=>{oe=k},T=(e,t,l)=>oe(e,t,l),O="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,I="?"+R,z=`<${I}>`,D=document,N=()=>D.createComment(""),U=e=>null===e||"object"!=typeof e&&"function"!=typeof e,W=Array.isArray,q="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,G=/>/g,K=new RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),J=/'/g,Y=/"/g,X=/^(?:script|style|textarea|title)$/i,Q=(ee=1,(e,...t)=>(e.some(e=>void 0===e)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some(e=>e?._$litStatic$)&&H("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:ee,strings:e,values:t}));var ee;const te=Symbol.for("lit-noChange"),le=Symbol.for("lit-nothing"),ie=new WeakMap,ae=D.createTreeWalker(D,129);let oe=k;function se(e,t){if(!W(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==$?$.createHTML(t):t}class ne{constructor({strings:e,_$litType$:t},l){let i;this.parts=[];let a=0,o=0;const s=e.length-1,n=this.parts,[c,r]=((e,t)=>{const l=e.length-1,i=[];let a,o=2===t?"<svg>":3===t?"<math>":"",s=j;for(let t=0;t<l;t++){const l=e[t];let n,c,r=-1,d=0;for(;d<l.length&&(s.lastIndex=d,c=s.exec(l),null!==c);)if(d=s.lastIndex,s===j){if("!--"===c[1])s=F;else if(void 0!==c[1])s=G;else if(void 0!==c[2])X.test(c[2])&&(a=new RegExp(`</${c[2]}`,"g")),s=K;else if(void 0!==c[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else s===K?">"===c[0]?(s=a??j,r=-1):void 0===c[1]?r=-2:(r=s.lastIndex-c[2].length,n=c[1],s=void 0===c[3]?K:'"'===c[3]?Y:J):s===Y||s===J?s=K:s===F||s===G?s=j:(s=K,a=void 0);console.assert(-1===r||s===K||s===J||s===Y,"unexpected parse state B");const h=s===K&&e[t+1].startsWith("/>")?" ":"";o+=s===j?l+z:r>=0?(i.push(n),l.slice(0,r)+O+l.slice(r)+R+h):l+R+(-2===r?t:h)}return[se(e,o+(e[l]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]})(e,t);if(this.el=ne.createElement(c,l),ae.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=ae.nextNode())&&n.length<s;){if(1===i.nodeType){{const e=i.localName;if(/^(?:textarea|template)$/i.test(e)&&i.innerHTML.includes(R)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);H("",t)}}if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(O)){const t=r[o++],l=i.getAttribute(e).split(R),s=/([.?@])?(.*)/.exec(t);n.push({type:1,index:a,name:s[2],strings:l,ctor:"."===s[1]?ve:"?"===s[1]?ue:"@"===s[1]?pe:he}),i.removeAttribute(e)}else e.startsWith(R)&&(n.push({type:6,index:a}),i.removeAttribute(e));if(X.test(i.tagName)){const e=i.textContent.split(R),t=e.length-1;if(t>0){i.textContent=L?L.emptyScript:"";for(let l=0;l<t;l++)i.append(e[l],N()),ae.nextNode(),n.push({type:2,index:++a});i.append(e[t],N())}}}else if(8===i.nodeType){if(i.data===I)n.push({type:2,index:a});else{let e=-1;for(;-1!==(e=i.data.indexOf(R,e+1));)n.push({type:7,index:a}),e+=R.length-1}}a++}if(r.length!==o)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");V&&V({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const l=D.createElement("template");return l.innerHTML=e,l}}function ce(e,t,l=e,i){if(t===te)return t;let a=void 0!==i?l.__directives?.[i]:l.__directive;const o=U(t)?void 0:t._$litDirective$;return a?.constructor!==o&&(a?._$notifyDirectiveConnectionChanged?.(!1),void 0===o?a=void 0:(a=new o(e),a._$initialize(e,l,i)),void 0!==i?(l.__directives??=[])[i]=a:l.__directive=a),void 0!==a&&(t=ce(e,a._$resolve(e,t.values),a,i)),t}class re{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:l}=this._$template,i=(e?.creationScope??D).importNode(t,!0);ae.currentNode=i;let a=ae.nextNode(),o=0,s=0,n=l[0];for(;void 0!==n;){if(o===n.index){let t;2===n.type?t=new de(a,a.nextSibling,this,e):1===n.type?t=new n.ctor(a,n.name,n.strings,this,e):6===n.type&&(t=new ge(a,this,e)),this._$parts.push(t),n=l[++s]}o!==n?.index&&(a=ae.nextNode(),o++)}return ae.currentNode=D,i}_update(e){let t=0;for(const l of this._$parts)void 0!==l&&(V&&V({kind:"set part",part:l,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==l.strings?(l._$setValue(e,l,t),t+=l.strings.length-2):l._$setValue(e[t])),t++}}class de{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,l,i){this.type=2,this._$committedValue=le,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=l,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=B(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=ce(this,e,t),U(e))e===le||null==e||""===e?(this._$committedValue!==le&&(V&&V({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=le):e!==this._$committedValue&&e!==te&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else(e=>W(e)||"function"==typeof e?.[Symbol.iterator])(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return B(B(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),oe!==k){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}V&&V({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==le&&U(this._$committedValue)){const t=B(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=T(t,"data","property")),e=this._textSanitizer(e),V&&V({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=D.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=T(t,"data","property")),e=this._textSanitizer(e),V&&V({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:l}=e,i="number"==typeof l?this._$getTemplate(e):(void 0===l.el&&(l.el=ne.createElement(se(l.h,l.h[0]),this.options)),l);if(this._$committedValue?._$template===i)V&&V({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new re(i,this),l=e._clone(this.options);V&&V({kind:"template instantiated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:l,values:t}),e._update(t),V&&V({kind:"template instantiated and updated",template:i,instance:e,parts:e._$parts,options:this.options,fragment:l,values:t}),this._commitNode(l),this._$committedValue=e}}_$getTemplate(e){let t=ie.get(e.strings);return void 0===t&&ie.set(e.strings,t=new ne(e)),t}_commitIterable(e){W(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let l,i=0;for(const a of e)i===t.length?t.push(l=new de(this._insert(N()),this._insert(N()),this,this.options)):l=t[i],l._$setValue(a),i++;i<t.length&&(this._$clear(l&&B(l._$endNode).nextSibling,i),t.length=i)}_$clear(e=B(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=B(e).nextSibling;B(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class he{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,l,i,a){this.type=1,this._$committedValue=le,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=i,this.options=a,l.length>2||""!==l[0]||""!==l[1]?(this._$committedValue=new Array(l.length-1).fill(new String),this.strings=l):this._$committedValue=le,this._sanitizer=void 0}_$setValue(e,t=this,l,i){const a=this.strings;let o=!1;if(void 0===a)e=ce(this,e,t,0),o=!U(e)||e!==this._$committedValue&&e!==te,o&&(this._$committedValue=e);else{const i=e;let s,n;for(e=a[0],s=0;s<a.length-1;s++)n=ce(this,i[l+s],t,s),n===te&&(n=this._$committedValue[s]),o||=!U(n)||n!==this._$committedValue[s],n===le?e=le:e!==le&&(e+=(n??"")+a[s+1]),this._$committedValue[s]=n}o&&!i&&this._commitValue(e)}_commitValue(e){e===le?B(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=oe(this.element,this.name,"attribute")),e=this._sanitizer(e??""),V&&V({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),B(this.element).setAttribute(this.name,e??""))}}class ve extends he{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=oe(this.element,this.name,"property")),e=this._sanitizer(e),V&&V({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===le?void 0:e}}class ue extends he{constructor(){super(...arguments),this.type=4}_commitValue(e){V&&V({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===le),options:this.options}),B(this.element).toggleAttribute(this.name,!!e&&e!==le)}}class pe extends he{constructor(e,t,l,i,a){if(super(e,t,l,i,a),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=ce(this,e,t,0)??le)===te)return;const l=this._$committedValue,i=e===le&&l!==le||e.capture!==l.capture||e.once!==l.once||e.passive!==l.passive,a=e!==le&&(l===le||i);V&&V({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:i,addListener:a,oldListener:l}),i&&this.element.removeEventListener(this.name,this,l),a&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,e):this._$committedValue.handleEvent(e)}}class ge{constructor(e,t,l){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=l}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){V&&V({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ce(this,e)}}const we=_.litHtmlPolyfillSupportDevMode;we?.(ne,de),(_.litHtmlVersions??=[]).push("3.3.2"),_.litHtmlVersions.length>1&&queueMicrotask(()=>{H("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const fe=(e,t,l)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const i=A++,a=l?.renderBefore??t;let o=a._$litPart$;if(V&&V({kind:"begin render",id:i,value:e,container:t,options:l,part:o}),void 0===o){const e=l?.renderBefore??null;a._$litPart$=o=new de(t.insertBefore(N(),e),e,void 0,l??{})}return o._$setValue(e),V&&V({kind:"end render",id:i,value:e,container:t,options:l,part:o}),o};fe.setSanitizer=E,fe.createSanitizer=T,fe._testOnlyClearSanitizerFactoryDoNotCallOrElse=P;
|
|
13
|
+
const _=globalThis,V=e=>{_.emitLitDebugLogEvents&&_.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let H,$=0;_.litIssuedWarnings??=new Set,H=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",_.litIssuedWarnings.has(t)||_.litIssuedWarnings.has(e)||(console.warn(t),_.litIssuedWarnings.add(t))},queueMicrotask(()=>{H("dev-mode","Lit is in dev mode. Not recommended for production!")});const A=_.ShadyDOM?.inUse&&!0===_.ShadyDOM?.noPatch?_.ShadyDOM.wrap:e=>e,B=_.trustedTypes,L=B?B.createPolicy("lit-html",{createHTML:e=>e}):void 0,k=e=>e,S=(e,t,i)=>k,E=e=>{if(se!==S)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");se=e},P=()=>{se=S},z=(e,t,i)=>se(e,t,i),T="$lit$",O=`lit$${Math.random().toFixed(9).slice(2)}$`,R="?"+O,I=`<${R}>`,D=document,N=()=>D.createComment(""),U=e=>null===e||"object"!=typeof e&&"function"!=typeof e,W=Array.isArray,q="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,G=/>/g,K=new RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),J=/'/g,Y=/"/g,X=/^(?:script|style|textarea|title)$/i,Q=(ee=1,(e,...t)=>(e.some(e=>void 0===e)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some(e=>e?._$litStatic$)&&H("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:ee,strings:e,values:t}));var ee;const te=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),le=new WeakMap,ae=D.createTreeWalker(D,129);let se=S;function oe(e,t){if(!W(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==L?L.createHTML(t):t}class re{constructor({strings:e,_$litType$:t},i){let l;this.parts=[];let a=0,s=0;const o=e.length-1,r=this.parts,[n,c]=((e,t)=>{const i=e.length-1,l=[];let a,s=2===t?"<svg>":3===t?"<math>":"",o=j;for(let t=0;t<i;t++){const i=e[t];let r,n,c=-1,d=0;for(;d<i.length&&(o.lastIndex=d,n=o.exec(i),null!==n);)if(d=o.lastIndex,o===j){if("!--"===n[1])o=F;else if(void 0!==n[1])o=G;else if(void 0!==n[2])X.test(n[2])&&(a=new RegExp(`</${n[2]}`,"g")),o=K;else if(void 0!==n[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else o===K?">"===n[0]?(o=a??j,c=-1):void 0===n[1]?c=-2:(c=o.lastIndex-n[2].length,r=n[1],o=void 0===n[3]?K:'"'===n[3]?Y:J):o===Y||o===J?o=K:o===F||o===G?o=j:(o=K,a=void 0);console.assert(-1===c||o===K||o===J||o===Y,"unexpected parse state B");const h=o===K&&e[t+1].startsWith("/>")?" ":"";s+=o===j?i+I:c>=0?(l.push(r),i.slice(0,c)+T+i.slice(c)+O+h):i+O+(-2===c?t:h)}return[oe(e,s+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),l]})(e,t);if(this.el=re.createElement(n,i),ae.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(l=ae.nextNode())&&r.length<o;){if(1===l.nodeType){{const e=l.localName;if(/^(?:textarea|template)$/i.test(e)&&l.innerHTML.includes(O)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);H("",t)}}if(l.hasAttributes())for(const e of l.getAttributeNames())if(e.endsWith(T)){const t=c[s++],i=l.getAttribute(e).split(O),o=/([.?@])?(.*)/.exec(t);r.push({type:1,index:a,name:o[2],strings:i,ctor:"."===o[1]?ve:"?"===o[1]?ge:"@"===o[1]?pe:he}),l.removeAttribute(e)}else e.startsWith(O)&&(r.push({type:6,index:a}),l.removeAttribute(e));if(X.test(l.tagName)){const e=l.textContent.split(O),t=e.length-1;if(t>0){l.textContent=B?B.emptyScript:"";for(let i=0;i<t;i++)l.append(e[i],N()),ae.nextNode(),r.push({type:2,index:++a});l.append(e[t],N())}}}else if(8===l.nodeType){if(l.data===R)r.push({type:2,index:a});else{let e=-1;for(;-1!==(e=l.data.indexOf(O,e+1));)r.push({type:7,index:a}),e+=O.length-1}}a++}if(c.length!==s)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");V&&V({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const i=D.createElement("template");return i.innerHTML=e,i}}function ne(e,t,i=e,l){if(t===te)return t;let a=void 0!==l?i.__directives?.[l]:i.__directive;const s=U(t)?void 0:t._$litDirective$;return a?.constructor!==s&&(a?._$notifyDirectiveConnectionChanged?.(!1),void 0===s?a=void 0:(a=new s(e),a._$initialize(e,i,l)),void 0!==l?(i.__directives??=[])[l]=a:i.__directive=a),void 0!==a&&(t=ne(e,a._$resolve(e,t.values),a,l)),t}class ce{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:i}=this._$template,l=(e?.creationScope??D).importNode(t,!0);ae.currentNode=l;let a=ae.nextNode(),s=0,o=0,r=i[0];for(;void 0!==r;){if(s===r.index){let t;2===r.type?t=new de(a,a.nextSibling,this,e):1===r.type?t=new r.ctor(a,r.name,r.strings,this,e):6===r.type&&(t=new ue(a,this,e)),this._$parts.push(t),r=i[++o]}s!==r?.index&&(a=ae.nextNode(),s++)}return ae.currentNode=D,l}_update(e){let t=0;for(const i of this._$parts)void 0!==i&&(V&&V({kind:"set part",part:i,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==i.strings?(i._$setValue(e,i,t),t+=i.strings.length-2):i._$setValue(e[t])),t++}}class de{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,i,l){this.type=2,this._$committedValue=ie,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=i,this.options=l,this.__isConnected=l?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=A(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=ne(this,e,t),U(e))e===ie||null==e||""===e?(this._$committedValue!==ie&&(V&&V({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=ie):e!==this._$committedValue&&e!==te&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else(e=>W(e)||"function"==typeof e?.[Symbol.iterator])(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return A(A(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),se!==S){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}V&&V({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==ie&&U(this._$committedValue)){const t=A(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=z(t,"data","property")),e=this._textSanitizer(e),V&&V({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=D.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=z(t,"data","property")),e=this._textSanitizer(e),V&&V({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:i}=e,l="number"==typeof i?this._$getTemplate(e):(void 0===i.el&&(i.el=re.createElement(oe(i.h,i.h[0]),this.options)),i);if(this._$committedValue?._$template===l)V&&V({kind:"template updating",template:l,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new ce(l,this),i=e._clone(this.options);V&&V({kind:"template instantiated",template:l,instance:e,parts:e._$parts,options:this.options,fragment:i,values:t}),e._update(t),V&&V({kind:"template instantiated and updated",template:l,instance:e,parts:e._$parts,options:this.options,fragment:i,values:t}),this._commitNode(i),this._$committedValue=e}}_$getTemplate(e){let t=le.get(e.strings);return void 0===t&&le.set(e.strings,t=new re(e)),t}_commitIterable(e){W(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let i,l=0;for(const a of e)l===t.length?t.push(i=new de(this._insert(N()),this._insert(N()),this,this.options)):i=t[l],i._$setValue(a),l++;l<t.length&&(this._$clear(i&&A(i._$endNode).nextSibling,l),t.length=l)}_$clear(e=A(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e!==this._$endNode;){const t=A(e).nextSibling;A(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class he{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,i,l,a){this.type=1,this._$committedValue=ie,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=l,this.options=a,i.length>2||""!==i[0]||""!==i[1]?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=ie,this._sanitizer=void 0}_$setValue(e,t=this,i,l){const a=this.strings;let s=!1;if(void 0===a)e=ne(this,e,t,0),s=!U(e)||e!==this._$committedValue&&e!==te,s&&(this._$committedValue=e);else{const l=e;let o,r;for(e=a[0],o=0;o<a.length-1;o++)r=ne(this,l[i+o],t,o),r===te&&(r=this._$committedValue[o]),s||=!U(r)||r!==this._$committedValue[o],r===ie?e=ie:e!==ie&&(e+=(r??"")+a[o+1]),this._$committedValue[o]=r}s&&!l&&this._commitValue(e)}_commitValue(e){e===ie?A(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=se(this.element,this.name,"attribute")),e=this._sanitizer(e??""),V&&V({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),A(this.element).setAttribute(this.name,e??""))}}class ve extends he{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=se(this.element,this.name,"property")),e=this._sanitizer(e),V&&V({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===ie?void 0:e}}class ge extends he{constructor(){super(...arguments),this.type=4}_commitValue(e){V&&V({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===ie),options:this.options}),A(this.element).toggleAttribute(this.name,!!e&&e!==ie)}}class pe extends he{constructor(e,t,i,l,a){if(super(e,t,i,l,a),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=ne(this,e,t,0)??ie)===te)return;const i=this._$committedValue,l=e===ie&&i!==ie||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,a=e!==ie&&(i===ie||l);V&&V({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:l,addListener:a,oldListener:i}),l&&this.element.removeEventListener(this.name,this,i),a&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,e):this._$committedValue.handleEvent(e)}}class ue{constructor(e,t,i){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){V&&V({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ne(this,e)}}const we=_.litHtmlPolyfillSupportDevMode;we?.(re,de),(_.litHtmlVersions??=[]).push("3.3.2"),_.litHtmlVersions.length>1&&queueMicrotask(()=>{H("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const fe=(e,t,i)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const l=$++,a=i?.renderBefore??t;let s=a._$litPart$;if(V&&V({kind:"begin render",id:l,value:e,container:t,options:i,part:s}),void 0===s){const e=i?.renderBefore??null;a._$litPart$=s=new de(t.insertBefore(N(),e),e,void 0,i??{})}return s._$setValue(e),V&&V({kind:"end render",id:l,value:e,container:t,options:i,part:s}),s};fe.setSanitizer=E,fe.createSanitizer=z,fe._testOnlyClearSanitizerFactoryDoNotCallOrElse=P;
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright 2017 Google LLC
|
|
17
17
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
18
|
*/
|
|
19
|
-
const me=globalThis;let
|
|
19
|
+
const me=globalThis;let be;me.litIssuedWarnings??=new Set,be=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,me.litIssuedWarnings.has(t)||me.litIssuedWarnings.has(e)||(console.warn(t),me.litIssuedWarnings.add(t))};class xe extends M{constructor(){super(...arguments),this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.__childPart=fe(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return te}}var Ze;xe._$litElement$=!0,xe[(Ze="finalized",Ze)]=!0,me.litElementHydrateSupport?.({LitElement:xe});const Ce=me.litElementPolyfillSupportDevMode;
|
|
20
20
|
/**
|
|
21
21
|
* @license
|
|
22
22
|
* Copyright 2017 Google LLC
|
|
23
23
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
24
24
|
*/
|
|
25
|
-
let
|
|
25
|
+
let ye;Ce?.({LitElement:xe}),(me.litElementVersions??=[]).push("4.2.2"),me.litElementVersions.length>1&&queueMicrotask(()=>{be("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")}),globalThis.litIssuedWarnings??=new Set,ye=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,globalThis.litIssuedWarnings.has(t)||globalThis.litIssuedWarnings.has(e)||(console.warn(t),globalThis.litIssuedWarnings.add(t))};const Me={attribute:!0,type:String,converter:Z,reflect:!1,hasChanged:C},_e=(e=Me,t,i)=>{const{kind:l,metadata:a}=i;null==a&&ye("missing-class-metadata",`The class ${t} is missing decorator metadata. This could mean that you're using a compiler that supports decorators but doesn't support decorator metadata, such as TypeScript 5.1. Please update your compiler.`);let s=globalThis.litPropertyMetadata.get(a);if(void 0===s&&globalThis.litPropertyMetadata.set(a,s=new Map),"setter"===l&&((e=Object.create(e)).wrapped=!0),s.set(i.name,e),"accessor"===l){const{name:l}=i;return{set(i){const a=t.get.call(this);t.set.call(this,i),this.requestUpdate(l,a,e,!0,i)},init(t){return void 0!==t&&this._$changeProperty(l,void 0,e,t),t}}}if("setter"===l){const{name:l}=i;return function(i){const a=this[l];t.call(this,i),this.requestUpdate(l,a,e,!0,i)}}throw new Error(`Unsupported decorator location: ${l}`)};function Ve(e){return(t,i)=>"object"==typeof i?_e(e,t,i):((e,t,i)=>{const l=t.hasOwnProperty(i);return t.constructor.createProperty(i,e),l?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright 2017 Google LLC
|
|
@@ -32,28 +32,33 @@ let Me;Ce?.({LitElement:Ze}),(me.litElementVersions??=[]).push("4.2.2"),me.litEl
|
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/
|
|
35
|
+
*/const $e=(e,t,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,i),i);
|
|
36
|
+
/**
|
|
37
|
+
* @license
|
|
38
|
+
* Copyright 2017 Google LLC
|
|
39
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
|
+
*/let Ae;
|
|
36
41
|
/**
|
|
37
42
|
* @license
|
|
38
43
|
* Copyright 2021 Google LLC
|
|
39
44
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
45
|
*/
|
|
41
|
-
function
|
|
46
|
+
function Be(e){return(t,i)=>{const{slot:l,selector:a}=e??{},s="slot"+(l?`[name=${l}]`:":not([name])");return $e(t,i,{get(){const t=this.renderRoot?.querySelector(s),i=t?.assignedElements(e)??[];return void 0===a?i:i.filter(e=>e.matches(a))}})}}
|
|
42
47
|
/**
|
|
43
48
|
* @license
|
|
44
49
|
* Copyright 2017 Google LLC
|
|
45
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
46
|
-
*/globalThis.litIssuedWarnings??=new Set;const
|
|
51
|
+
*/globalThis.litIssuedWarnings??=new Set,Ae=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",globalThis.litIssuedWarnings.has(t)||globalThis.litIssuedWarnings.has(e)||(console.warn(t),globalThis.litIssuedWarnings.add(t))};const Le=1;class ke{constructor(e){}get _$isConnected(){return this._$parent._$isConnected}_$initialize(e,t,i){this.__part=e,this._$parent=t,this.__attributeIndex=i}_$resolve(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}
|
|
47
52
|
/**
|
|
48
53
|
* @license
|
|
49
54
|
* Copyright 2018 Google LLC
|
|
50
55
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/const
|
|
56
|
+
*/const Se=(Ee=class extends ke{constructor(e){if(super(e),e.type!==Le||"class"!==e.name||e.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this._previousClasses){this._previousClasses=new Set,void 0!==e.strings&&(this._staticClasses=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!this._staticClasses?.has(e)&&this._previousClasses.add(e);return this.render(t)}const i=e.element.classList;for(const e of this._previousClasses)e in t||(i.remove(e),this._previousClasses.delete(e));for(const e in t){const l=!!t[e];l===this._previousClasses.has(e)||this._staticClasses?.has(e)||(l?(i.add(e),this._previousClasses.add(e)):(i.remove(e),this._previousClasses.delete(e)))}return te}},(...e)=>({_$litDirective$:Ee,values:e}));var Ee,Pe=o`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:top;width:1em}::slotted(svg){vertical-align:middle}}`;class ze extends xe{emit(e,t){const i=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){if(customElements.get(e));else try{customElements.define(e,t,i)}catch(l){customElements.define(e,class extends t{},i)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}firstUpdated(e){var t;super.firstUpdated(e),this.ssr&&(null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("slot").forEach(e=>{e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}ze.styles=[Pe],ze.dependencies={},e([Ve({type:Boolean,reflect:!0})],ze.prototype,"ssr",void 0);var Te=o`.sidebar{display:flex;flex-direction:column;height:100%;position:relative;transition:width var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard);z-index:1100}.sidebar--expanded{width:var(--sgds-dimension-288)}.sidebar--collapsed{width:var(--sgds-dimension-72)}.sidebar-top{align-items:center;display:flex;gap:var(--sgds-gap-md);justify-content:space-between;padding:0 var(--sgds-padding-xs)}.sidebar--collapsed .sidebar-brand-name{display:none}.sidebar--collapsed .sidebar-top{justify-content:center}.sidebar-main{background-color:var(--sgds-bg-default);border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);height:100%;overflow-x:hidden;overflow-y:auto;padding:var(--sgds-padding-lg) 0;position:relative;z-index:1}.sidebar-wrapper{display:flex;flex-direction:column;height:100%;justify-content:space-between}.sidebar-content{display:flex;flex:1;flex-direction:column;gap:var(--sgds-gap-md);overflow-y:auto}.sidebar-nested-overlay{background-color:var(--sgds-surface-raised);bottom:0;left:0;opacity:0;overflow-y:scroll;padding:var(--sgds-padding-md) var(--sgds-padding-xs);pointer-events:none;position:absolute;top:0;transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard);transition-property:opacity left;width:var(--sgds-dimension-288);z-index:0}.sidebar-nested-overlay.show{border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);left:var(--sgds-dimension-288);opacity:1;pointer-events:auto}.sidebar--collapsed .sidebar-nested-overlay.show{left:var(--sgds-dimension-72)}.sidebar::-webkit-scrollbar{width:var(--sgds-dimension-2)}.sidebar::-webkit-scrollbar-track{background:transparent}.sidebar::-webkit-scrollbar-thumb{background:var(--sgds-border-color-muted);border-radius:var(--sgds-border-radius-xs)}.sidebar::-webkit-scrollbar-thumb:hover{background:var(--sgds-color-subtle)}@media only screen and (max-width:511px){.sidebar--expanded{position:absolute;width:100dvw}.sidebar-nested-overlay{left:-100dvw;width:100dvw;z-index:2}.sidebar--collapsed .sidebar-nested-overlay.show,.sidebar-nested-overlay.show{left:0}}@media only screen and (max-width:767px){.sidebar--expanded,.sidebar-nested-overlay{width:var(--sgds-dimension-256)}.sidebar-nested-overlay,.sidebar-nested-overlay.show{left:var(--sgds-dimension-256)}}`
|
|
52
57
|
/**
|
|
53
58
|
* @license
|
|
54
59
|
* Copyright 2021 Google LLC
|
|
55
60
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
56
|
-
*/;class
|
|
61
|
+
*/;class Oe extends Event{constructor(e,t,i,l){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t,this.callback=i,this.subscribe=l??!1}}
|
|
57
62
|
/**
|
|
58
63
|
* @license
|
|
59
64
|
* Copyright 2021 Google LLC
|
|
@@ -64,69 +69,44 @@ function Ae(e){return(t,l)=>{const{slot:i,selector:a}=e??{},o="slot"+(i?`[name=$
|
|
|
64
69
|
* Copyright 2021 Google LLC
|
|
65
70
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
66
71
|
*/
|
|
67
|
-
class
|
|
72
|
+
class Re{constructor(e,t,i,l){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this._callback=(e,t)=>{this.unsubscribe&&(this.unsubscribe!==t&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=e,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(e,t)),this.unsubscribe=t},this.host=e,void 0!==t.context){const e=t;this.context=e.context,this.callback=e.callback,this.subscribe=e.subscribe??!1}else this.context=t,this.callback=i,this.subscribe=l??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Oe(this.context,this.host,this._callback,this.subscribe))}}
|
|
68
73
|
/**
|
|
69
74
|
* @license
|
|
70
75
|
* Copyright 2021 Google LLC
|
|
71
76
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
72
|
-
*/class
|
|
77
|
+
*/class Ie{get value(){return this._value}set value(e){this.setValue(e)}setValue(e,t=!1){const i=t||!Object.is(e,this._value);this._value=e,i&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(const[e,{disposer:t}]of this.subscriptions)e(this._value,t)},void 0!==e&&(this.value=e)}addCallback(e,t,i){if(!i)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:t});const{disposer:l}=this.subscriptions.get(e);e(this.value,l)}clearCallbacks(){this.subscriptions.clear()}}
|
|
73
78
|
/**
|
|
74
79
|
* @license
|
|
75
80
|
* Copyright 2021 Google LLC
|
|
76
81
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
77
|
-
*/class
|
|
82
|
+
*/class De extends Event{constructor(e,t){super("context-provider",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t}}class Ne extends Ie{constructor(e,t,i){super(void 0!==t.context?t.initialValue:i),this.onContextRequest=e=>{if(e.context!==this.context)return;const t=e.contextTarget??e.composedPath()[0];t!==this.host&&(e.stopPropagation(),this.addCallback(e.callback,t,e.subscribe))},this.onProviderRequest=e=>{if(e.context!==this.context)return;if((e.contextTarget??e.composedPath()[0])===this.host)return;const t=new Set;for(const[e,{consumerHost:i}]of this.subscriptions)t.has(e)||(t.add(e),i.dispatchEvent(new Oe(this.context,i,e,!0)));e.stopPropagation()},this.host=e,void 0!==t.context?this.context=t.context:this.context=t,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new De(this.context,this.host))}}
|
|
78
83
|
/**
|
|
79
84
|
* @license
|
|
80
85
|
* Copyright 2017 Google LLC
|
|
81
86
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
82
|
-
*/function
|
|
87
|
+
*/function Ue({context:e}){return(t,i)=>{const l=new WeakMap;if("object"==typeof i)return{get(){return t.get.call(this)},set(e){return l.get(this).setValue(e),t.set.call(this,e)},init(t){return l.set(this,new Ne(this,{context:e,initialValue:t})),t}};{t.constructor.addInitializer(t=>{l.set(t,new Ne(t,{context:e}))});const a=Object.getOwnPropertyDescriptor(t,i);let s;if(void 0===a){const e=new WeakMap;s={get(){return e.get(this)},set(t){l.get(this).setValue(t),e.set(this,t)},configurable:!0,enumerable:!0}}else{const e=a.set;s={...a,set(t){l.get(this).setValue(t),e?.call(this,t)}}}return void Object.defineProperty(t,i,s)}}}
|
|
83
88
|
/**
|
|
84
89
|
* @license
|
|
85
90
|
* Copyright 2022 Google LLC
|
|
86
91
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
87
|
-
*/function
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
name=${this._sidebarCollapsed?"sidebar-expand":"sidebar-collapse"}
|
|
99
|
-
variant="ghost"
|
|
100
|
-
tone="neutral"
|
|
101
|
-
size="sm"
|
|
102
|
-
@click=${this.toggleCollapsed}
|
|
103
|
-
aria-label=${this._sidebarCollapsed?"Expand sidebar":"Collapse sidebar"}
|
|
104
|
-
aria-expanded=${!this._sidebarCollapsed}
|
|
105
|
-
></sgds-icon-button>
|
|
106
|
-
</div>
|
|
107
|
-
|
|
108
|
-
<nav class="sidebar-content" role="navigation" aria-label="Main navigation" aria-activedescendant=${(null===(e=this._sidebarActiveItem)||void 0===e?void 0:e.name)||""}>
|
|
109
|
-
<slot></slot>
|
|
110
|
-
</nav>
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
<div
|
|
114
|
-
class=${$e({"sidebar-nested-overlay":!0,show:this._showDrawer})}
|
|
115
|
-
role="dialog"
|
|
116
|
-
aria-label=${(null===(t=this._sidebarActiveGroup)||void 0===t?void 0:t.title)?`Nested items for ${this._sidebarActiveGroup.title}`:""}
|
|
117
|
-
>
|
|
118
|
-
${this._drawerItems}
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
`}}Je.styles=[...Ee.styles,Pe],e([Ve({type:Boolean,reflect:!0})],Je.prototype,"collapsed",void 0),e([Ve({type:String,reflect:!0})],Je.prototype,"active",void 0),e([De({context:Ue}),He()],Je.prototype,"_sidebarActiveGroup",void 0),e([De({context:qe}),He()],Je.prototype,"_sidebarCollapsed",void 0),e([De({context:We}),He()],Je.prototype,"_sidebarActiveItem",void 0),e([De({context:je}),He()],Je.prototype,"_drawerItems",void 0),e([De({context:Fe}),He()],Je.prototype,"_showDrawer",void 0),e([Ae()],Je.prototype,"_defaultNodes",void 0),e([Ge("collapsed")],Je.prototype,"_handleCollapsed",null),e([Ge("_sidebarActiveItem")],Je.prototype,"_handleActiveItem",null),e([Ge("active")],Je.prototype,"_handleActive",null);var Ye=s`.sidebar-item{border-radius:var(--sgds-border-radius-md);cursor:pointer;padding:var(--sgds-padding-xs);transition:background-color .15s ease-in-out,color .15s ease-in-out}.sidebar-item.active,.sidebar-item:hover{background-color:var(--sgds-surface-raised)}.sidebar-item:focus,.sidebar-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-item-label-wrapper,.sidebar-item-label-wrapper>div{align-items:center;display:flex;gap:var(--sgds-gap-xs)}.sidebar-item-label-wrapper{justify-content:space-between}.sidebar-item-label{-webkit-line-clamp:2;-webkit-box-orient:vertical;line-clamp:2;display:-webkit-box;font-size:var(--sgds-font-size-1);line-height:var(--sgds-line-height-20);max-height:calc(var(--sgds-line-height-20, 20px)*2);overflow:hidden}.sidebar-item-label.offset{margin-left:var(--sgds-margin-2-xl)}.sidebar-item-label-wrapper .sidebar-item.active{background-color:var(--sgds-surface-raised);color:var(--sgds-primary-color-default)}.sidebar-item-label-wrapper .sidebar-item-trailingIcon{align-items:center;display:flex;gap:var(--sgds-gap-2-xs)}.sidebar-item--collapsed .sidebar-item-label,.sidebar-item--collapsed .sidebar-item-trailingIcon{display:none}.sidebar-item--collapsed .sidebar-item-label-wrapper{justify-content:center}.sidebar-submenu{overflow:hidden}.sidebar-submenu>div{margin-top:-100%;opacity:0;pointer-events:none;transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.sidebar-submenu.show>div{margin-top:0;opacity:1;pointer-events:auto}.sidebar-submenu--collapsed{display:none}`,Xe=Q`
|
|
92
|
+
*/function We({context:e,subscribe:t}){return(i,l)=>{"object"==typeof l?l.addInitializer(function(){new Re(this,{context:e,callback:e=>{i.set.call(this,e)},subscribe:t})}):i.constructor.addInitializer(i=>{new Re(i,{context:e,callback:e=>{i[l]=e},subscribe:t})})}}const qe="sidebar-active-group",je="sidebar-active",Fe="sidebar-collapsed",Ge="sidebar-drawer-items",Ke="sidebar-drawer-open";function Je(e,t){const i=Object.assign({waitUntilFirstUpdate:!1},t);return(t,l)=>{const{update:a}=t;if(e in t){const s=e;t.update=function(e){if(e.has(s)){const t=e.get(s),a=this[s];t!==a&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[l](t,a))}a.call(this,e)}}}}
|
|
93
|
+
/**
|
|
94
|
+
* @license
|
|
95
|
+
* Copyright 2018 Google LLC
|
|
96
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
97
|
+
*/const Ye=e=>e??ie,Xe=Symbol.for(""),Qe=e=>{if(e?.r===Xe)return e?._$litStatic$},et=(e,...t)=>({_$litStatic$:t.reduce((t,i,l)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw new Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(i)+e[l+1],e[0]),r:Xe}),tt=new Map,it=(lt=Q,(e,...t)=>{const i=t.length;let l,a;const s=[],o=[];let r,n=0,c=!1;for(;n<i;){for(r=e[n];n<i&&void 0!==(a=t[n],l=Qe(a));)r+=l+e[++n],c=!0;n!==i&&o.push(a),s.push(r),n++}if(n===i&&s.push(e[i]),c){const i=s.join("$$lit$$");void 0===(e=tt.get(i))&&(s.raw=s,tt.set(i,e=s)),t=o}return lt(e,...t)});
|
|
98
|
+
/**
|
|
99
|
+
* @license
|
|
100
|
+
* Copyright 2020 Google LLC
|
|
101
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
102
|
+
*/var lt,at,st,ot=o`:host{--btn-font-weight:var(--sgds-font-weight-regular);--btn-color:var(--sgds-color-fixed-light);--btn-bg:var(--sgds-primary-surface-default);--btn-hover-bg:var(--sgds-primary-surface-emphasis);--btn-border-radius:var(--sgds-border-radius-md);--btn-opacity:var(--sgds-opacity-100,1)}:host([variant=danger]){--btn-bg:var(--sgds-danger-surface-default);--btn-hover-bg:var(--sgds-danger-surface-emphasis);--btn-color:var(--sgds-color-fixed-light)}:host([variant=primary][tone=brand]){--btn-bg:var(--sgds-primary-surface-default);--btn-color:var(--sgds-color-fixed-light)}:host([variant=outline]){--btn-border-width:var(--sgds-border-width-1)}:host([variant=outline][tone=brand]){--btn-border-color:var(--sgds-primary-border-color-default);--btn-bg:var(--sgds-bg-transparent);--btn-color:var(--sgds-primary-color-default);--btn-hover-bg:var(--sgds-primary-bg-translucent)}:host([variant=ghost][tone=brand]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-primary-surface-translucent);--btn-color:var(--sgds-primary-color-default)}:host([variant=primary][tone=danger]){--btn-bg:var(--sgds-danger-surface-default);--btn-hover-bg:var(--sgds-danger-surface-emphasis);--btn-color:var(--sgds-color-fixed-light)}:host([variant=outline][tone=danger]){--btn-border-color:var(--sgds-danger-border-color-default);--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-danger-surface-translucent);--btn-color:var(--sgds-danger-color-default)}:host([variant=ghost][tone=danger]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-danger-surface-translucent);--btn-color:var(--sgds-danger-color-default)}:host([variant=primary][tone=fixed-light]){--btn-bg:var(--sgds-surface-fixed-light);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-fixed-dark,hsla(0,0%,5%,.2)) 0%,var(--sgds-bg-translucent-fixed-dark,hsla(0,0%,5%,.2)) 100%),var(--sgds-surface-fixed-light,#fff);--btn-color:var(--sgds-color-fixed-dark)}:host([variant=outline][tone=fixed-light]){--btn-border-color:var(--sgds-border-color-fixed-light);--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-fixed-dark) 0%,var(--sgds-bg-translucent-fixed-dark) 100%),var(--sgds-bg-transparent);--btn-color:var(--sgds-color-fixed-light)}:host([variant=ghost][tone=fixed-light]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-fixed-dark) 0%,var(--sgds-bg-translucent-fixed-dark) 100%),var(--sgds-bg-transparent);--btn-color:var(--sgds-color-fixed-light)}:host([variant=primary][tone=neutral]){--btn-bg:var(--sgds-surface-inverse);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-inverse) 0%,var(--sgds-bg-translucent-inverse) 100%),var(--sgds-surface-inverse);--btn-color:var(--sgds-color-inverse)}:host([variant=outline][tone=neutral]){--btn-border-color:var(--sgds-border-color-emphasis);--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:linear-gradient(0deg,var(--sgds-bg-translucent-inverse) 0%,var(--sgds-bg-translucent-inverse) 100%),var(--sgds-bg-translucent-subtle);--btn-color:var(--sgds-color-default)}:host([variant=ghost][tone=neutral]){--btn-bg:var(--sgds-bg-transparent);--btn-hover-bg:var(--sgds-bg-translucent-subtle);--btn-color:var(--sgds-color-default)}:host([variant=ghost]) .btn,:host([variant=outline]) .btn,:host([variant=primary]) .btn{color:var(--btn-color)}:host([variant=outline]) .btn{border:var(--btn-border-width) solid var(--btn-border-color)}:host([size=lg]) .btn{font-size:var(--sgds-font-size-20);height:var(--sgds-dimension-56);line-height:var(--sgds-line-height-32);min-width:var(--sgds-dimension-112);padding:var(--sgds-padding-none) var(--sgds-padding-xl)}:host([size=sm]) .btn{font-size:var(--sgds-font-size-14);height:var(--sgds-dimension-40);line-height:var(--sgds-line-height-20);min-width:var(--sgds-dimension-80);padding:var(--sgds-padding-none) var(--sgds-padding-md)}:host([size=xs]) .btn{font-size:var(--sgds-font-size-12);height:var(--sgds-dimension-32);line-height:var(--sgds-line-height-16);min-width:var(--sgds-dimension-64);padding:var(--sgds-padding-none) var(--sgds-padding-sm)}.btn{align-items:center;background-color:var(--btn-bg);border:1px solid var(--sgds-border-color-transparent);border-radius:var(--btn-border-radius);color:var(--sgds-color-fixed-light);cursor:pointer;display:inline-flex;font-size:var(--sgds-font-size-16);font-weight:var(--btn-font-weight);gap:var(--sgds-gap-2-xs);height:var(--sgds-dimension-48);justify-content:center;line-height:var(--sgds-line-height-24);min-width:var(--sgds-dimension-96);opacity:var(--btn-opacity);padding:var(--sgds-padding-none) var(--sgds-padding-lg);text-align:center;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;user-select:none;vertical-align:middle;white-space:nowrap;width:inherit}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn.active,.btn:hover{background:var(--btn-hover-bg)}.btn:focus,.btn:focus-visible{background:var(--btn-hover-bg);border-color:transparent;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.btn.disabled,.btn:disabled{color:var(--btn-color);cursor:not-allowed;opacity:var(--sgds-opacity-40)}.btn.loading{cursor:default}.btn slot::slotted(*){color:var(--btn-color)}`;class rt extends ze{constructor(){super(...arguments),this.variant="primary",this.tone="brand",this.size="md",this.active=!1,this.disabled=!1,this.target="_self"}focus(e){this.button.focus(e)}click(){this.button.click()}blur(){this.button.blur()}_handleBlur(){this.emit("sgds-blur")}_handleFocus(){this.emit("sgds-focus")}_handleClick(e){if(this.disabled||this.loading)return e.preventDefault(),void e.stopPropagation()}_handleKeydown(e){if("Enter"===e.key&&this.loading)return e.preventDefault(),void e.stopPropagation()}_assignSpinnerSize(e){return"xs"===e||"sm"===e?"xs":"md"===e||"lg"===e?"sm":void 0}_assignSpinnerTone(e,t){return"fixed-light"===e&&"primary"===t?"fixed-dark":"neutral"===e&&"primary"===t?"inverse":"fixed-light"===e||"primary"===t?"fixed-light":"neutral"!==e||"outline"!==t&&"ghost"!==t?"brand":"neutral"}}rt.styles=[...ze.styles,ot],e([(at=".btn",(e,t,i)=>{const l=e=>{const i=e.renderRoot?.querySelector(at)??null;if(null===i&&st&&!e.hasUpdated){const e="object"==typeof t?t.name:t;Ae("",`@query'd field ${JSON.stringify(String(e))} with the 'cache' flag set for selector '${at}' has been accessed before the first update and returned null. This is expected if the renderRoot tree has not been provided beforehand (e.g. via Declarative Shadow DOM). Therefore the value hasn't been cached.`)}return i};if(st){const{get:a,set:s}="object"==typeof t?e:i??(()=>{const e=Symbol(`${String(t)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return $e(e,t,{get(){let e=a.call(this);return void 0===e&&(e=l(this),(null!==e||this.hasUpdated)&&s.call(this,e)),e}})}return $e(e,t,{get(){return l(this)}})})],rt.prototype,"button",void 0),e([Ve({reflect:!0})],rt.prototype,"variant",void 0),e([Ve({reflect:!0})],rt.prototype,"tone",void 0),e([Ve({reflect:!0})],rt.prototype,"size",void 0),e([Ve({type:Boolean,reflect:!0})],rt.prototype,"active",void 0),e([Ve({type:Boolean,reflect:!0})],rt.prototype,"disabled",void 0),e([Ve({type:String,reflect:!0})],rt.prototype,"href",void 0),e([Ve({type:String,reflect:!0})],rt.prototype,"target",void 0),e([Ve({type:String,reflect:!0})],rt.prototype,"download",void 0),e([Ve({type:String})],rt.prototype,"ariaLabel",void 0),e([Ve({type:Boolean})],rt.prototype,"loading",void 0);var nt=Q`
|
|
123
103
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
124
104
|
<path
|
|
125
105
|
fill="currentColor"
|
|
126
106
|
d="M9.375 15.125H6.5a5.116 5.116 0 0 1-1.643-.27l1.324 5.292c.047.188.062.247.078.294.176.52.644.885 1.19.93.05.004.11.004.305.004.243 0 .32 0 .379-.006a1.375 1.375 0 0 0 1.235-1.237c.006-.058.007-.136.007-.379v-4.628Zm12-5.125c0-1.373-.963-2.52-2.25-2.805v5.61A2.874 2.874 0 0 0 21.375 10Zm-18.75 0A3.875 3.875 0 0 0 6.5 13.875h2.875v-7.75H6.5A3.875 3.875 0 0 0 2.625 10Zm15.25-4.873c0-.534 0-.896-.021-1.159-.023-.28-.063-.324-.05-.305a.326.326 0 0 0-.258-.155c.027.004-.035-.01-.31.115-.257.115-.597.3-1.092.57-1.565.853-3.667 1.801-5.519 1.919v7.774c1.852.118 3.954 1.068 5.519 1.921.495.27.835.455 1.091.57.276.125.338.111.31.115a.326.326 0 0 0 .26-.155c-.013.019.026-.026.049-.305.02-.263.021-.625.021-1.158V5.127Zm1.25.794a4.127 4.127 0 0 1 0 8.157v.796c0 .51 0 .932-.025 1.257-.025.307-.079.654-.279.934a1.57 1.57 0 0 1-1.124.667c-.346.042-.688-.084-.976-.215-.31-.14-.7-.352-1.176-.612-1.535-.837-3.39-1.645-4.92-1.764v4.612c0 .215 0 .366-.013.5a2.625 2.625 0 0 1-2.36 2.36c-.133.013-.284.012-.498.012-.171 0-.293 0-.406-.01a2.625 2.625 0 0 1-2.273-1.773c-.036-.107-.065-.226-.106-.392l-1.575-6.298a.632.632 0 0 1-.014-.087 5.125 5.125 0 0 1 3.12-9.19h3.75c1.594 0 3.632-.873 5.295-1.78.477-.26.866-.472 1.176-.612.288-.13.63-.257.976-.215.47.058.85.283 1.124.667.2.28.254.627.279.935.025.324.025.746.025 1.257v.794Z"
|
|
127
107
|
/>
|
|
128
108
|
</svg>
|
|
129
|
-
`,
|
|
109
|
+
`,ct=Q`
|
|
130
110
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
131
111
|
<path
|
|
132
112
|
fill="currentColor"
|
|
@@ -139,35 +119,35 @@ class Oe{constructor(e,t,l,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
139
119
|
clip-rule="evenodd"
|
|
140
120
|
/>
|
|
141
121
|
</svg>
|
|
142
|
-
`,
|
|
122
|
+
`,dt=Q`
|
|
143
123
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
144
124
|
<path
|
|
145
125
|
fill="currentColor"
|
|
146
126
|
d="M2.5 3.9a.6.6 0 0 0 0 1.2h19a.6.6 0 1 0 0-1.2h-19Zm10.1 5.6a.6.6 0 1 0-1.2 0v8.552l-3.976-3.976a.6.6 0 1 0-.848.848l5 5a.6.6 0 0 0 .848 0l5-5a.6.6 0 1 0-.848-.848L12.6 18.052V9.5Z"
|
|
147
127
|
/>
|
|
148
128
|
</svg>
|
|
149
|
-
`,
|
|
129
|
+
`,ht=Q`
|
|
150
130
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
151
131
|
<path
|
|
152
132
|
fill="currentColor"
|
|
153
133
|
d="M20.1 2.5a.6.6 0 1 0-1.2 0v19a.6.6 0 1 0 1.2 0v-19Zm-5.6 10.1a.6.6 0 1 0 0-1.2H5.948l3.976-3.976a.6.6 0 1 0-.848-.848l-5 5a.6.6 0 0 0 0 .848l5 5a.6.6 0 0 0 .848-.848L5.948 12.6H14.5Z"
|
|
154
134
|
/>
|
|
155
135
|
</svg>
|
|
156
|
-
`,
|
|
136
|
+
`,vt=Q`
|
|
157
137
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
158
138
|
<path
|
|
159
139
|
fill="currentColor"
|
|
160
140
|
d="M3.9 21.5a.6.6 0 1 0 1.2 0v-19a.6.6 0 1 0-1.2 0v19Zm5.6-10.1a.6.6 0 0 0 0 1.2h8.551l-3.975 3.976a.6.6 0 1 0 .848.848l5-5a.6.6 0 0 0 0-.848l-5-5a.6.6 0 0 0-.848.848L18.05 11.4H9.5Z"
|
|
161
141
|
/>
|
|
162
142
|
</svg>
|
|
163
|
-
`,
|
|
143
|
+
`,gt=Q`
|
|
164
144
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
165
145
|
<path
|
|
166
146
|
fill="currentColor"
|
|
167
147
|
d="M21.5 20.1a.6.6 0 1 0 0-1.2h-19a.6.6 0 0 0 0 1.2h19Zm-10.1-5.6a.6.6 0 1 0 1.2 0V5.949l3.976 3.975a.6.6 0 0 0 .848-.848l-5-5a.6.6 0 0 0-.848 0l-5 5a.6.6 0 1 0 .848.848L11.4 5.95v8.55Z"
|
|
168
148
|
/>
|
|
169
149
|
</svg>
|
|
170
|
-
`,
|
|
150
|
+
`,pt=Q`
|
|
171
151
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
172
152
|
<path
|
|
173
153
|
fill="currentColor"
|
|
@@ -180,7 +160,7 @@ class Oe{constructor(e,t,l,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
180
160
|
clip-rule="evenodd"
|
|
181
161
|
/>
|
|
182
162
|
</svg>
|
|
183
|
-
`,
|
|
163
|
+
`,ut=Q`
|
|
184
164
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
185
165
|
<path
|
|
186
166
|
fill="currentColor"
|
|
@@ -193,7 +173,7 @@ class Oe{constructor(e,t,l,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
193
173
|
clip-rule="evenodd"
|
|
194
174
|
/>
|
|
195
175
|
</svg>
|
|
196
|
-
`,
|
|
176
|
+
`,wt=Q`
|
|
197
177
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
198
178
|
<path
|
|
199
179
|
fill="currentColor"
|
|
@@ -206,7 +186,7 @@ class Oe{constructor(e,t,l,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
206
186
|
clip-rule="evenodd"
|
|
207
187
|
/>
|
|
208
188
|
</svg>
|
|
209
|
-
`,
|
|
189
|
+
`,ft=Q`
|
|
210
190
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
211
191
|
<path
|
|
212
192
|
fill="currentColor"
|
|
@@ -219,7 +199,7 @@ class Oe{constructor(e,t,l,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
219
199
|
clip-rule="evenodd"
|
|
220
200
|
/>
|
|
221
201
|
</svg>
|
|
222
|
-
`,
|
|
202
|
+
`,mt=Q`
|
|
223
203
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
224
204
|
<path
|
|
225
205
|
fill="currentColor"
|
|
@@ -228,7 +208,7 @@ class Oe{constructor(e,t,l,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
228
208
|
clip-rule="evenodd"
|
|
229
209
|
/>
|
|
230
210
|
</svg>
|
|
231
|
-
`,
|
|
211
|
+
`,bt=Q`
|
|
232
212
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
233
213
|
<path
|
|
234
214
|
fill="currentColor"
|
|
@@ -237,7 +217,7 @@ class Oe{constructor(e,t,l,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
237
217
|
clip-rule="evenodd"
|
|
238
218
|
/>
|
|
239
219
|
</svg>
|
|
240
|
-
`,
|
|
220
|
+
`,xt=Q`
|
|
241
221
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
242
222
|
<path
|
|
243
223
|
fill="currentColor"
|
|
@@ -246,7 +226,7 @@ class Oe{constructor(e,t,l,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
246
226
|
clip-rule="evenodd"
|
|
247
227
|
/>
|
|
248
228
|
</svg>
|
|
249
|
-
`,
|
|
229
|
+
`,Zt=Q`
|
|
250
230
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
251
231
|
<path
|
|
252
232
|
fill="currentColor"
|
|
@@ -255,7 +235,7 @@ class Oe{constructor(e,t,l,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
255
235
|
clip-rule="evenodd"
|
|
256
236
|
/>
|
|
257
237
|
</svg>
|
|
258
|
-
`,
|
|
238
|
+
`,Ct=Q`
|
|
259
239
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
260
240
|
<path
|
|
261
241
|
fill="currentColor"
|
|
@@ -264,7 +244,7 @@ class Oe{constructor(e,t,l,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
264
244
|
clip-rule="evenodd"
|
|
265
245
|
/>
|
|
266
246
|
</svg>
|
|
267
|
-
`;const
|
|
247
|
+
`;const yt={announcement:nt,archive:ct,"arrow-bar-down":dt,"arrow-bar-left":ht,"arrow-bar-right":vt,"arrow-bar-up":gt,"arrow-circle-down":pt,"arrow-circle-left":ut,"arrow-circle-right":wt,"arrow-circle-up":ft,"arrow-clockwise":mt,"arrow-down":bt,"arrow-left":xt,"arrow-repeat":Zt,"arrow-right":Ct,"arrow-square-down":Q`
|
|
268
248
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
269
249
|
<path
|
|
270
250
|
fill="currentColor"
|
|
@@ -2335,21 +2315,113 @@ class Oe{constructor(e,t,l,i){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
2335
2315
|
clip-rule="evenodd"
|
|
2336
2316
|
/>
|
|
2337
2317
|
</svg>
|
|
2338
|
-
`};var
|
|
2318
|
+
`};var Mt=o`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;class _t extends ze{constructor(){super(...arguments),this.size="lg"}_getIconByName(e){if(!e)return;const t=yt[e];if(t)return t;console.warn(`Icon not found: ${e}`)}render(){const e=this._getIconByName(this.name);return e||ie}}_t.styles=[...ze.styles,Mt],e([Ve({type:String,reflect:!0})],_t.prototype,"name",void 0),e([Ve({type:String,reflect:!0})],_t.prototype,"size",void 0);var Vt=o`:host{--sgds-spinner-bg:var(--sgds-primary-surface-default);display:inline-flex}:host([variant=neutral]){--sgds-spinner-bg:var(--sgds-neutral-surface-default)}:host([tone=neutral]){--sgds-spinner-bg:var(--sgds-surface-inverse)}:host([tone=inverse]){--sgds-spinner-bg:var(--sgds-surface-default)}:host([tone=fixed-light]){--sgds-spinner-bg:var(--sgds-surface-fixed-light)}:host([tone=fixed-dark]){--sgds-spinner-bg:var(--sgds-surface-fixed-dark)}.spinner-wrapper{align-items:center;display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.spinner-wrapper.horizontal{flex-direction:row}.spinner{--border-thickness:4px;animation:spinner .75s linear infinite;border:var(--border-thickness) solid var(--sgds-bg-translucent);border-radius:50%;border-right:var(--border-thickness) solid var(--sgds-spinner-bg);color:var(--sgds-spinner-color);display:inline-flex;height:var(--sgds-dimension-32);width:var(--sgds-dimension-32)}.spinner-xs{--border-thickness:2px;height:var(--sgds-dimension-16);width:var(--sgds-dimension-16)}.spinner-sm{--border-thickness:3px;height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}.spinner-lg{--border-thickness:6px;height:var(--sgds-dimension-48);width:var(--sgds-dimension-48)}.spinner-xl{--border-thickness:8px;height:var(--sgds-dimension-64);width:var(--sgds-dimension-64)}.spinner-label{color:var(--sgds-neutral-color-default);font-size:var(--sgds-font-size-14)}@media (prefers-reduced-motion:reduce){.spinner{animation-duration:1.5s}}
|
|
2319
|
+
|
|
2320
|
+
/*! CSS Used keyframes */@keyframes spinner{to{transform:rotate(1turn)}}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`,Ht=o`.text-primary{color:var(--sgds-primary-rgb)!important}.text-secondary{color:var(--sgds-secondary-rgb)!important}.text-success{color:var(--sgds-success-rgb)!important}.text-info{color:var(--sgds-info-rgb)!important}.text-warning{color:var(--sgds-warning-rgb)!important}.text-danger{color:var(--sgds-danger-rgb)!important}.text-light{color:var(--sgds-light-rgb)!important}.text-dark{color:var(--sgds-dark-rgb)!important}.text-muted{color:var(--sgds-secondary-color)!important}`;class $t extends ze{constructor(){super(...arguments),this.variant="primary",this.tone="brand",this.size="md",this.orientation="vertical"}render(){return it`
|
|
2321
|
+
<div
|
|
2322
|
+
class="spinner-wrapper ${Se({horizontal:"horizontal"===this.orientation})}"
|
|
2323
|
+
>
|
|
2324
|
+
<div
|
|
2325
|
+
class="spinner ${Se({[`spinner-${this.size}`]:this.size})}"
|
|
2326
|
+
role="status"
|
|
2327
|
+
>
|
|
2328
|
+
${this.label?ie:it`<span class="sr-only">Loading...</span>`}
|
|
2329
|
+
</div>
|
|
2330
|
+
${this.label?it`<span class="spinner-label">${this.label}</span>`:ie}
|
|
2331
|
+
</div>
|
|
2332
|
+
`}}$t.styles=[...ze.styles,Ht,Vt],e([Ve({type:String,reflect:!0})],$t.prototype,"variant",void 0),e([Ve({type:String,reflect:!0})],$t.prototype,"tone",void 0),e([Ve({type:String,reflect:!0})],$t.prototype,"size",void 0),e([Ve({reflect:!0,type:String})],$t.prototype,"label",void 0),e([Ve({type:String,reflect:!0})],$t.prototype,"orientation",void 0);var At=o`:host{display:inline-block}.btn.btn-icon{display:flex;height:var(--sgds-dimension-48,56px);min-width:unset;padding:0;width:var(--sgds-dimension-48,56px)}.btn.btn-icon.btn-lg{height:var(--sgds-dimension-56);min-width:unset;padding:0;width:var(--sgds-dimension-56)}.btn.btn-icon.btn-sm{height:var(--sgds-dimension-40);min-width:unset;padding:0;width:var(--sgds-dimension-40)}.btn.btn-icon.btn-xs{height:var(--sgds-dimension-32);min-width:unset;padding:0;width:var(--sgds-dimension-32)}`;class Bt extends rt{_assignIconSize(e){return"xs"===e?"sm":"sm"===e?"md":"md"===e?"lg":"lg"===e?"xl":void 0}render(){const e=this.href,t=e?et`a`:et`button`;return it`
|
|
2333
|
+
<${t}
|
|
2334
|
+
class="btn btn-icon${Se({disabled:this.disabled,active:this.active,[`btn-${this.variant}`]:this.variant,[`btn-${this.size}`]:this.size,loading:this.loading})}"
|
|
2335
|
+
?disabled=${Ye(e?void 0:this.disabled)}
|
|
2336
|
+
type=${Ye(e?void 0:"button")}
|
|
2337
|
+
href=${Ye(e?this.href:void 0)}
|
|
2338
|
+
target=${Ye(e?this.target:void 0)}
|
|
2339
|
+
download=${Ye(e?this.download:void 0)}
|
|
2340
|
+
rel=${Ye(e&&"_blank"===this.target?"noreferrer noopener":void 0)}
|
|
2341
|
+
role=${Ye(e?"button":void 0)}
|
|
2342
|
+
aria-disabled=${this.disabled||this.loading?"true":"false"}
|
|
2343
|
+
tabindex=${this.disabled?"-1":"0"}
|
|
2344
|
+
@click=${this._handleClick}
|
|
2345
|
+
@keydown=${this._handleKeydown}
|
|
2346
|
+
@focus=${this._handleFocus}
|
|
2347
|
+
@blur=${this._handleBlur}
|
|
2348
|
+
aria-label=${Ye(this.loading?"Loading":this.ariaLabel)}
|
|
2349
|
+
>
|
|
2350
|
+
${this.loading?it`<sgds-spinner
|
|
2351
|
+
size=${Ye(this._assignSpinnerSize(this.size))}
|
|
2352
|
+
tone=${Ye(this._assignSpinnerTone(this.tone,this.variant))}
|
|
2353
|
+
></sgds-spinner>`:it`<sgds-icon
|
|
2354
|
+
name=${Ye(this.name)}
|
|
2355
|
+
size=${Ye(this._assignIconSize(this.size))}
|
|
2356
|
+
></sgds-icon>`}
|
|
2357
|
+
</${t}>
|
|
2358
|
+
`}}Bt.styles=[...rt.styles,At],Bt.dependencies={"sgds-icon":_t,"sgds-spinner":$t},e([Ve({type:String,reflect:!0})],Bt.prototype,"name",void 0);const Lt="sgds-sidebar-group";class kt extends ze{constructor(){super(...arguments),this.collapsed=!1,this.active="",this._sidebarActiveGroup=null,this._sidebarActiveItem=null,this._drawerItems=[],this._showDrawer=!1,this._isMobile=!1,this._handleClickOutOfElement=e=>{this._sidebarActiveGroup&&(e.composedPath().includes(this)||(this._showDrawer=!1))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","navigation"),this.setAttribute("aria-label","Main navigation"),this.updateComplete.then(()=>{this.addItemListeners(),this._handleActive(),document.addEventListener("click",this._handleClickOutOfElement)}),window.addEventListener("resize",this._handleResize.bind(this)),this._handleResize()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),window.removeEventListener("resize",this._handleResize.bind(this))}_handleCollapsed(){this._sidebarCollapsed=this.collapsed}_handleActiveItem(){if(!this._sidebarActiveItem)return;const e=this._sidebarActiveItem._childLevel;if(this._sidebarActiveItem._selected=!0,0===e)this._sidebarActiveItem._childElements.length>0?this._setNodesToDrawer(this._sidebarActiveItem):this._revertNodesToParent();else{let e=this._sidebarActiveItem.parentElement;for(;e._childLevel>=0&&e.tagName.toLowerCase()===Lt;)e.tagName.toLowerCase()===Lt&&(0===e._childLevel&&(e.classList.contains("sidebar-nested-overlay")||this._setNodesToDrawer(e)),e._selected=!0,e._showMenu=e._childLevel>0,e=e.parentElement);this._sidebarActiveGroup&&(this._sidebarActiveGroup._selected=!0)}}_handleActive(){this.active?this._sidebarActiveItem=this._getActiveChild():this._sidebarActiveItem=null}_getActiveChild(){const e=t=>{var i;for(const l of t){if(l.name===this.active)return l;if(null===(i=l._childElements)||void 0===i?void 0:i.length){const t=e(l._childElements);if(t)return t}}return null};return e(this._defaultNodes)}_handleResize(){const e=window.innerWidth<=512;e!==this._isMobile&&(this._isMobile=e,this.collapsed=this._isMobile)}_setNodesToDrawer(e){if(!e)return;this._sidebarActiveGroup&&e!==this._sidebarActiveGroup&&this._revertNodesToParent(),this._sidebarActiveGroup=e,this._drawerItems=[];this._sidebarActiveGroup.querySelectorAll(":scope > sgds-sidebar-group, :scope > sgds-sidebar-item").forEach(e=>{this._drawerItems.push(e)})}_revertNodesToParent(){this._sidebarActiveGroup&&(this._drawerItems.forEach(e=>{this._sidebarActiveGroup.append(e)}),this._drawerItems=[]),this._sidebarActiveGroup=null}addItemListeners(){const e=[...this.querySelectorAll("sgds-sidebar-item"),...this.querySelectorAll(Lt)];e.forEach(t=>{t.addEventListener("i-sgds-click",i=>{const l=i.detail.element;if(l===this._sidebarActiveGroup)this._showDrawer=!this._showDrawer;else{if(this.active!==l.name&&(this.active=l.name,e.forEach(e=>e._selected=!1)),l._childElements.length>0)this._showDrawer=!0;else{this._showDrawer=!1;const e=t.querySelector(":scope > a");e&&e.click()}this.emit("sgds-select",{detail:{activeItem:l.name}})}})})}toggleCollapsed(){this.collapsed=!this.collapsed}render(){var e,t;return Q`
|
|
2359
|
+
<div
|
|
2360
|
+
class=${Se({sidebar:!0,"sidebar--expanded":!this._sidebarCollapsed,"sidebar--collapsed":this._sidebarCollapsed})}
|
|
2361
|
+
>
|
|
2362
|
+
<div class="sidebar-main">
|
|
2363
|
+
<div class="sidebar-wrapper">
|
|
2364
|
+
<div class="sidebar-top">
|
|
2365
|
+
<div class="sidebar-brand-name">
|
|
2366
|
+
<slot name="top"></slot>
|
|
2367
|
+
</div>
|
|
2368
|
+
|
|
2369
|
+
<sgds-icon-button
|
|
2370
|
+
name=${this._sidebarCollapsed?"sidebar-expand":"sidebar-collapse"}
|
|
2371
|
+
variant="ghost"
|
|
2372
|
+
tone="neutral"
|
|
2373
|
+
size="sm"
|
|
2374
|
+
@click=${this.toggleCollapsed}
|
|
2375
|
+
aria-label=${this._sidebarCollapsed?"Expand sidebar":"Collapse sidebar"}
|
|
2376
|
+
aria-expanded=${!this._sidebarCollapsed}
|
|
2377
|
+
></sgds-icon-button>
|
|
2378
|
+
</div>
|
|
2379
|
+
|
|
2380
|
+
<nav
|
|
2381
|
+
class="sidebar-content"
|
|
2382
|
+
role="navigation"
|
|
2383
|
+
aria-label="Main navigation"
|
|
2384
|
+
aria-activedescendant=${(null===(e=this._sidebarActiveItem)||void 0===e?void 0:e.name)||""}
|
|
2385
|
+
>
|
|
2386
|
+
<slot></slot>
|
|
2387
|
+
</nav>
|
|
2388
|
+
|
|
2389
|
+
<slot name="bottom"></slot>
|
|
2390
|
+
</div>
|
|
2391
|
+
</div>
|
|
2392
|
+
|
|
2393
|
+
<div
|
|
2394
|
+
class=${Se({"sidebar-nested-overlay":!0,show:this._showDrawer})}
|
|
2395
|
+
role="dialog"
|
|
2396
|
+
aria-label=${(null===(t=this._sidebarActiveGroup)||void 0===t?void 0:t.title)?`Nested items for ${this._sidebarActiveGroup.title}`:""}
|
|
2397
|
+
>
|
|
2398
|
+
<sgds-icon-button
|
|
2399
|
+
name="chevron-left"
|
|
2400
|
+
variant="ghost"
|
|
2401
|
+
tone="neutral"
|
|
2402
|
+
size="sm"
|
|
2403
|
+
@click=${()=>this._showDrawer=!1}
|
|
2404
|
+
aria-label=${"Close drawer"}
|
|
2405
|
+
aria-expanded=${this._showDrawer}
|
|
2406
|
+
></sgds-icon-button>
|
|
2407
|
+
|
|
2408
|
+
${this._drawerItems}
|
|
2409
|
+
</div>
|
|
2410
|
+
</div>
|
|
2411
|
+
`}}kt.styles=[...ze.styles,Te],kt.dependencies={"sgds-icon-button":Bt},e([Ve({type:Boolean,reflect:!0})],kt.prototype,"collapsed",void 0),e([Ve({type:String,reflect:!0})],kt.prototype,"active",void 0),e([Ue({context:qe}),He()],kt.prototype,"_sidebarActiveGroup",void 0),e([Ue({context:Fe}),He()],kt.prototype,"_sidebarCollapsed",void 0),e([Ue({context:je}),He()],kt.prototype,"_sidebarActiveItem",void 0),e([Ue({context:Ge}),He()],kt.prototype,"_drawerItems",void 0),e([Ue({context:Ke}),He()],kt.prototype,"_showDrawer",void 0),e([Be()],kt.prototype,"_defaultNodes",void 0),e([He()],kt.prototype,"_isMobile",void 0),e([Je("collapsed")],kt.prototype,"_handleCollapsed",null),e([Je("_sidebarActiveItem")],kt.prototype,"_handleActiveItem",null),e([Je("active")],kt.prototype,"_handleActive",null);var St=o`.sidebar-item{border-radius:var(--sgds-border-radius-md);cursor:pointer;padding:var(--sgds-padding-xs);transition:background-color .15s ease-in-out,color .15s ease-in-out}.sidebar-item.active,.sidebar-item:hover{background-color:var(--sgds-bg-translucent-subtle)}.sidebar-item:focus,.sidebar-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-item-label-wrapper,.sidebar-item-label-wrapper>div{align-items:center;display:flex;gap:var(--sgds-gap-xs)}.sidebar-item-label-wrapper{justify-content:space-between}.sidebar-item-label{-webkit-line-clamp:2;-webkit-box-orient:vertical;line-clamp:2;display:-webkit-box;font-size:var(--sgds-font-size-1);line-height:var(--sgds-line-height-20);max-height:calc(var(--sgds-line-height-20, 20px)*2);overflow:hidden}.sidebar-item-label.offset{margin-left:var(--sgds-margin-2-xl)}.sidebar-item-label-wrapper .sidebar-item.active{background-color:var(--sgds-surface-raised);color:var(--sgds-primary-color-default)}.sidebar-item-label-wrapper .sidebar-item-trailingIcon{align-items:center;display:flex;gap:var(--sgds-gap-2-xs)}.sidebar-item--collapsed .sidebar-item-label,.sidebar-item--collapsed .sidebar-item-trailingIcon{display:none}.sidebar-item--collapsed .sidebar-item-label-wrapper{justify-content:center}.sidebar-submenu{overflow:hidden}.sidebar-submenu>div{margin-top:-100%;opacity:0;pointer-events:none;transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.sidebar-submenu.show>div{margin-top:0;opacity:1;pointer-events:auto}.sidebar-submenu--collapsed{display:none}`
|
|
2339
2412
|
/**
|
|
2340
2413
|
* @license
|
|
2341
2414
|
* Copyright 2020 Google LLC
|
|
2342
2415
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2343
|
-
|
|
2344
|
-
window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch&&window.ShadyDOM.wrap;
|
|
2416
|
+
*/;window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch&&window.ShadyDOM.wrap;
|
|
2345
2417
|
/**
|
|
2346
2418
|
* @license
|
|
2347
2419
|
* Copyright 2020 Google LLC
|
|
2348
2420
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2349
2421
|
*/
|
|
2350
|
-
const wt=()=>new ft;class ft{}const mt=Math.min,xt=Math.max,Zt=Math.round,bt=Math.floor,Ct=e=>({x:e,y:e}),Mt={left:"right",right:"left",bottom:"top",top:"bottom"},yt={start:"end",end:"start"};function _t(e,t,l){return xt(e,mt(t,l))}function Vt(e,t){return"function"==typeof e?e(t):e}function Ht(e){return e.split("-")[0]}function At(e){return e.split("-")[1]}function Bt(e){return"x"===e?"y":"x"}function Lt(e){return"y"===e?"height":"width"}const $t=new Set(["top","bottom"]);function St(e){return $t.has(Ht(e))?"y":"x"}function kt(e){return Bt(St(e))}function Et(e,t,l){void 0===l&&(l=!1);const i=At(e),a=kt(e),o=Lt(a);let s="x"===a?i===(l?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Dt(s)),[s,Dt(s)]}function Pt(e){return e.replace(/start|end/g,e=>yt[e])}const Tt=["left","right"],Ot=["right","left"],Rt=["top","bottom"],It=["bottom","top"];function zt(e,t,l,i){const a=At(e);let o=function(e,t,l){switch(e){case"top":case"bottom":return l?t?Ot:Tt:t?Tt:Ot;case"left":case"right":return t?Rt:It;default:return[]}}(Ht(e),"start"===l,i);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(Pt)))),o}function Dt(e){return e.replace(/left|right|bottom|top/g,e=>Mt[e])}function Nt(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Ut(e){const{x:t,y:l,width:i,height:a}=e;return{width:i,height:a,top:l,left:t,right:t+i,bottom:l+a,x:t,y:l}}function Wt(e,t,l){let{reference:i,floating:a}=e;const o=St(t),s=kt(t),n=Lt(s),c=Ht(t),r="y"===o,d=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2,v=i[n]/2-a[n]/2;let u;switch(c){case"top":u={x:d,y:i.y-a.height};break;case"bottom":u={x:d,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:h};break;case"left":u={x:i.x-a.width,y:h};break;default:u={x:i.x,y:i.y}}switch(At(t)){case"start":u[s]-=v*(l&&r?-1:1);break;case"end":u[s]+=v*(l&&r?-1:1)}return u}async function qt(e,t){var l;void 0===t&&(t={});const{x:i,y:a,platform:o,rects:s,elements:n,strategy:c}=e,{boundary:r="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:u=0}=Vt(t,e),p=Nt(u),g=n[v?"floating"===h?"reference":"floating":h],w=Ut(await o.getClippingRect({element:null==(l=await(null==o.isElement?void 0:o.isElement(g)))||l?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(n.floating)),boundary:r,rootBoundary:d,strategy:c})),f="floating"===h?{x:i,y:a,width:s.floating.width,height:s.floating.height}:s.reference,m=await(null==o.getOffsetParent?void 0:o.getOffsetParent(n.floating)),x=await(null==o.isElement?void 0:o.isElement(m))&&await(null==o.getScale?void 0:o.getScale(m))||{x:1,y:1},Z=Ut(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:f,offsetParent:m,strategy:c}):f);return{top:(w.top-Z.top+p.top)/x.y,bottom:(Z.bottom-w.bottom+p.bottom)/x.y,left:(w.left-Z.left+p.left)/x.x,right:(Z.right-w.right+p.right)/x.x}}const jt=new Set(["left","top"]);function Ft(){return"undefined"!=typeof window}function Gt(e){return Yt(e)?(e.nodeName||"").toLowerCase():"#document"}function Kt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Jt(e){var t;return null==(t=(Yt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Yt(e){return!!Ft()&&(e instanceof Node||e instanceof Kt(e).Node)}function Xt(e){return!!Ft()&&(e instanceof Element||e instanceof Kt(e).Element)}function Qt(e){return!!Ft()&&(e instanceof HTMLElement||e instanceof Kt(e).HTMLElement)}function el(e){return!(!Ft()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Kt(e).ShadowRoot)}const tl=new Set(["inline","contents"]);function ll(e){const{overflow:t,overflowX:l,overflowY:i,display:a}=pl(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+l)&&!tl.has(a)}const il=new Set(["table","td","th"]);function al(e){return il.has(Gt(e))}const ol=[":popover-open",":modal"];function sl(e){return ol.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const nl=["transform","translate","scale","rotate","perspective"],cl=["transform","translate","scale","rotate","perspective","filter"],rl=["paint","layout","strict","content"];function dl(e){const t=hl(),l=Xt(e)?pl(e):e;return nl.some(e=>!!l[e]&&"none"!==l[e])||!!l.containerType&&"normal"!==l.containerType||!t&&!!l.backdropFilter&&"none"!==l.backdropFilter||!t&&!!l.filter&&"none"!==l.filter||cl.some(e=>(l.willChange||"").includes(e))||rl.some(e=>(l.contain||"").includes(e))}function hl(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const vl=new Set(["html","body","#document"]);function ul(e){return vl.has(Gt(e))}function pl(e){return Kt(e).getComputedStyle(e)}function gl(e){return Xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wl(e){if("html"===Gt(e))return e;const t=e.assignedSlot||e.parentNode||el(e)&&e.host||Jt(e);return el(t)?t.host:t}function fl(e){const t=wl(e);return ul(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qt(t)&&ll(t)?t:fl(t)}function ml(e,t,l){var i;void 0===t&&(t=[]),void 0===l&&(l=!0);const a=fl(e),o=a===(null==(i=e.ownerDocument)?void 0:i.body),s=Kt(a);if(o){const e=xl(s);return t.concat(s,s.visualViewport||[],ll(a)?a:[],e&&l?ml(e):[])}return t.concat(a,ml(a,[],l))}function xl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zl(e){const t=pl(e);let l=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const a=Qt(e),o=a?e.offsetWidth:l,s=a?e.offsetHeight:i,n=Zt(l)!==o||Zt(i)!==s;return n&&(l=o,i=s),{width:l,height:i,$:n}}function bl(e){return Xt(e)?e:e.contextElement}function Cl(e){const t=bl(e);if(!Qt(t))return Ct(1);const l=t.getBoundingClientRect(),{width:i,height:a,$:o}=Zl(t);let s=(o?Zt(l.width):l.width)/i,n=(o?Zt(l.height):l.height)/a;return s&&Number.isFinite(s)||(s=1),n&&Number.isFinite(n)||(n=1),{x:s,y:n}}const Ml=Ct(0);function yl(e){const t=Kt(e);return hl()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ml}function _l(e,t,l,i){void 0===t&&(t=!1),void 0===l&&(l=!1);const a=e.getBoundingClientRect(),o=bl(e);let s=Ct(1);t&&(i?Xt(i)&&(s=Cl(i)):s=Cl(e));const n=function(e,t,l){return void 0===t&&(t=!1),!(!l||t&&l!==Kt(e))&&t}(o,l,i)?yl(o):Ct(0);let c=(a.left+n.x)/s.x,r=(a.top+n.y)/s.y,d=a.width/s.x,h=a.height/s.y;if(o){const e=Kt(o),t=i&&Xt(i)?Kt(i):i;let l=e,a=xl(l);for(;a&&i&&t!==l;){const e=Cl(a),t=a.getBoundingClientRect(),i=pl(a),o=t.left+(a.clientLeft+parseFloat(i.paddingLeft))*e.x,s=t.top+(a.clientTop+parseFloat(i.paddingTop))*e.y;c*=e.x,r*=e.y,d*=e.x,h*=e.y,c+=o,r+=s,l=Kt(a),a=xl(l)}}return Ut({width:d,height:h,x:c,y:r})}function Vl(e,t){const l=gl(e).scrollLeft;return t?t.left+l:_l(Jt(e)).left+l}function Hl(e,t){const l=e.getBoundingClientRect();return{x:l.left+t.scrollLeft-Vl(e,l),y:l.top+t.scrollTop}}const Al=new Set(["absolute","fixed"]);function Bl(e,t,l){let i;if("viewport"===t)i=function(e,t){const l=Kt(e),i=Jt(e),a=l.visualViewport;let o=i.clientWidth,s=i.clientHeight,n=0,c=0;if(a){o=a.width,s=a.height;const e=hl();(!e||e&&"fixed"===t)&&(n=a.offsetLeft,c=a.offsetTop)}const r=Vl(i);if(r<=0){const e=i.ownerDocument,t=e.body,l=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(l.marginLeft)+parseFloat(l.marginRight)||0,s=Math.abs(i.clientWidth-t.clientWidth-a);s<=25&&(o-=s)}else r<=25&&(o+=r);return{width:o,height:s,x:n,y:c}}(e,l);else if("document"===t)i=function(e){const t=Jt(e),l=gl(e),i=e.ownerDocument.body,a=xt(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=xt(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-l.scrollLeft+Vl(e);const n=-l.scrollTop;return"rtl"===pl(i).direction&&(s+=xt(t.clientWidth,i.clientWidth)-a),{width:a,height:o,x:s,y:n}}(Jt(e));else if(Xt(t))i=function(e,t){const l=_l(e,!0,"fixed"===t),i=l.top+e.clientTop,a=l.left+e.clientLeft,o=Qt(e)?Cl(e):Ct(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:i*o.y}}(t,l);else{const l=yl(e);i={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return Ut(i)}function Ll(e,t){const l=wl(e);return!(l===t||!Xt(l)||ul(l))&&("fixed"===pl(l).position||Ll(l,t))}function $l(e,t,l){const i=Qt(t),a=Jt(t),o="fixed"===l,s=_l(e,!0,o,t);let n={scrollLeft:0,scrollTop:0};const c=Ct(0);function r(){c.x=Vl(a)}if(i||!i&&!o)if(("body"!==Gt(t)||ll(a))&&(n=gl(t)),i){const e=_l(t,!0,o,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else a&&r();o&&!i&&a&&r();const d=!a||i||o?Ct(0):Hl(a,n);return{x:s.left+n.scrollLeft-c.x-d.x,y:s.top+n.scrollTop-c.y-d.y,width:s.width,height:s.height}}function Sl(e){return"static"===pl(e).position}function kl(e,t){if(!Qt(e)||"fixed"===pl(e).position)return null;if(t)return t(e);let l=e.offsetParent;return Jt(e)===l&&(l=l.ownerDocument.body),l}function El(e,t){const l=Kt(e);if(sl(e))return l;if(!Qt(e)){let t=wl(e);for(;t&&!ul(t);){if(Xt(t)&&!Sl(t))return t;t=wl(t)}return l}let i=kl(e,t);for(;i&&al(i)&&Sl(i);)i=kl(i,t);return i&&ul(i)&&Sl(i)&&!dl(i)?l:i||function(e){let t=wl(e);for(;Qt(t)&&!ul(t);){if(dl(t))return t;if(sl(t))return null;t=wl(t)}return null}(e)||l}const Pl={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:l,offsetParent:i,strategy:a}=e;const o="fixed"===a,s=Jt(i),n=!!t&&sl(t.floating);if(i===s||n&&o)return l;let c={scrollLeft:0,scrollTop:0},r=Ct(1);const d=Ct(0),h=Qt(i);if((h||!h&&!o)&&(("body"!==Gt(i)||ll(s))&&(c=gl(i)),Qt(i))){const e=_l(i);r=Cl(i),d.x=e.x+i.clientLeft,d.y=e.y+i.clientTop}const v=!s||h||o?Ct(0):Hl(s,c);return{width:l.width*r.x,height:l.height*r.y,x:l.x*r.x-c.scrollLeft*r.x+d.x+v.x,y:l.y*r.y-c.scrollTop*r.y+d.y+v.y}},getDocumentElement:Jt,getClippingRect:function(e){let{element:t,boundary:l,rootBoundary:i,strategy:a}=e;const o=[..."clippingAncestors"===l?sl(t)?[]:function(e,t){const l=t.get(e);if(l)return l;let i=ml(e,[],!1).filter(e=>Xt(e)&&"body"!==Gt(e)),a=null;const o="fixed"===pl(e).position;let s=o?wl(e):e;for(;Xt(s)&&!ul(s);){const t=pl(s),l=dl(s);l||"fixed"!==t.position||(a=null),(o?!l&&!a:!l&&"static"===t.position&&a&&Al.has(a.position)||ll(s)&&!l&&Ll(e,s))?i=i.filter(e=>e!==s):a=t,s=wl(s)}return t.set(e,i),i}(t,this._c):[].concat(l),i],s=o[0],n=o.reduce((e,l)=>{const i=Bl(t,l,a);return e.top=xt(i.top,e.top),e.right=mt(i.right,e.right),e.bottom=mt(i.bottom,e.bottom),e.left=xt(i.left,e.left),e},Bl(t,s,a));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:El,getElementRects:async function(e){const t=this.getOffsetParent||El,l=this.getDimensions,i=await l(e.floating);return{reference:$l(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:l}=Zl(e);return{width:t,height:l}},getScale:Cl,isElement:Xt,isRTL:function(e){return"rtl"===pl(e).direction}};function Tl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ol(e,t,l,i){void 0===i&&(i={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:c=!1}=i,r=bl(e),d=a||o?[...r?ml(r):[],...ml(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",l,{passive:!0}),o&&e.addEventListener("resize",l)});const h=r&&n?function(e,t){let l,i=null;const a=Jt(e);function o(){var e;clearTimeout(l),null==(e=i)||e.disconnect(),i=null}return function s(n,c){void 0===n&&(n=!1),void 0===c&&(c=1),o();const r=e.getBoundingClientRect(),{left:d,top:h,width:v,height:u}=r;if(n||t(),!v||!u)return;const p={rootMargin:-bt(h)+"px "+-bt(a.clientWidth-(d+v))+"px "+-bt(a.clientHeight-(h+u))+"px "+-bt(d)+"px",threshold:xt(0,mt(1,c))||1};let g=!0;function w(t){const i=t[0].intersectionRatio;if(i!==c){if(!g)return s();i?s(!1,i):l=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==i||Tl(r,e.getBoundingClientRect())||s(),g=!1}try{i=new IntersectionObserver(w,{...p,root:a.ownerDocument})}catch(e){i=new IntersectionObserver(w,p)}i.observe(e)}(!0),o}(r,l):null;let v,u=-1,p=null;s&&(p=new ResizeObserver(e=>{let[i]=e;i&&i.target===r&&p&&(p.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),l()}),r&&!c&&p.observe(r),p.observe(t));let g=c?_l(e):null;return c&&function t(){const i=_l(e);g&&!Tl(g,i)&&l();g=i,v=requestAnimationFrame(t)}(),l(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",l),o&&e.removeEventListener("resize",l)}),null==h||h(),null==(e=p)||e.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const Rl=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var l,i;const{x:a,y:o,placement:s,middlewareData:n}=t,c=await async function(e,t){const{placement:l,platform:i,elements:a}=e,o=await(null==i.isRTL?void 0:i.isRTL(a.floating)),s=Ht(l),n=At(l),c="y"===St(l),r=jt.has(s)?-1:1,d=o&&c?-1:1,h=Vt(t,e);let{mainAxis:v,crossAxis:u,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return n&&"number"==typeof p&&(u="end"===n?-1*p:p),c?{x:u*d,y:v*r}:{x:v*r,y:u*d}}(t,e);return s===(null==(l=n.offset)?void 0:l.placement)&&null!=(i=n.arrow)&&i.alignmentOffset?{}:{x:a+c.x,y:o+c.y,data:{...c,placement:s}}}}},Il=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:l,y:i,placement:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:n={fn:e=>{let{x:t,y:l}=e;return{x:t,y:l}}},...c}=Vt(e,t),r={x:l,y:i},d=await qt(t,c),h=St(Ht(a)),v=Bt(h);let u=r[v],p=r[h];if(o){const e="y"===v?"bottom":"right";u=_t(u+d["y"===v?"top":"left"],u,u-d[e])}if(s){const e="y"===h?"bottom":"right";p=_t(p+d["y"===h?"top":"left"],p,p-d[e])}const g=n.fn({...t,[v]:u,[h]:p});return{...g,data:{x:g.x-l,y:g.y-i,enabled:{[v]:o,[h]:s}}}}}},zl=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var l,i;const{placement:a,middlewareData:o,rects:s,initialPlacement:n,platform:c,elements:r}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...w}=Vt(e,t);if(null!=(l=o.arrow)&&l.alignmentOffset)return{};const f=Ht(a),m=St(n),x=Ht(n)===n,Z=await(null==c.isRTL?void 0:c.isRTL(r.floating)),b=v||(x||!g?[Dt(n)]:function(e){const t=Dt(e);return[Pt(e),t,Pt(t)]}(n)),C="none"!==p;!v&&C&&b.push(...zt(n,g,p,Z));const M=[n,...b],y=await qt(t,w),_=[];let V=(null==(i=o.flip)?void 0:i.overflows)||[];if(d&&_.push(y[f]),h){const e=Et(a,s,Z);_.push(y[e[0]],y[e[1]])}if(V=[...V,{placement:a,overflows:_}],!_.every(e=>e<=0)){var H,A;const e=((null==(H=o.flip)?void 0:H.index)||0)+1,t=M[e];if(t){if(!("alignment"===h&&m!==St(t))||V.every(e=>St(e.placement)!==m||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let l=null==(A=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:A.placement;if(!l)switch(u){case"bestFit":{var B;const e=null==(B=V.filter(e=>{if(C){const t=St(e.placement);return t===m||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:B[0];e&&(l=e);break}case"initialPlacement":l=n}if(a!==l)return{reset:{placement:l}}}return{}}}},Dl=(e,t,l)=>{const i=new Map,a={platform:Pl,...l},o={...a.platform,_c:i};return(async(e,t,l)=>{const{placement:i="bottom",strategy:a="absolute",middleware:o=[],platform:s}=l,n=o.filter(Boolean),c=await(null==s.isRTL?void 0:s.isRTL(t));let r=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:h}=Wt(r,i,c),v=i,u={},p=0;for(let l=0;l<n.length;l++){const{name:o,fn:g}=n[l],{x:w,y:f,data:m,reset:x}=await g({x:d,y:h,initialPlacement:i,placement:v,strategy:a,middlewareData:u,rects:r,platform:s,elements:{reference:e,floating:t}});d=null!=w?w:d,h=null!=f?f:h,u={...u,[o]:{...u[o],...m}},x&&p<=50&&(p++,"object"==typeof x&&(x.placement&&(v=x.placement),x.rects&&(r=!0===x.rects?await s.getElementRects({reference:e,floating:t,strategy:a}):x.rects),({x:d,y:h}=Wt(r,v,c))),l=-1)}return{x:d,y:h,placement:v,strategy:a,middlewareData:u}})(e,t,{...a,platform:o})};class Nl extends Ee{constructor(){super(...arguments),this.myDropdown=wt(),this.dropdownMenuId=function(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}("dropdown-menu","div"),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.floatingOpts={},this.menuIsOpen=!1,this.close="default",this.disabled=!1,this.readonly=!1,this.menuRef=wt(),this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu(!0))}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&this.updateFloatingPosition()}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Ol(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition())))}hideMenu(e){this.menuIsOpen&&(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuIsOpen=!1,setTimeout(()=>this.emit("sgds-after-hide"),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}_handleKeyboardMenuEvent(e){if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}}mergeMiddleware(e,t){const l=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},i=t.map(l),a=e.map(e=>{const a=l(e),o=i.indexOf(a);return-1!==o?t[o]:e}).concat(t.filter(t=>!e.some(e=>l(e)===l(t))));return a}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[Rl(8),this.noFlip?void 0:zl(),Il()].filter(Boolean);let l=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(l=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const i=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:l}),{x:a,y:o,strategy:s,placement:n}=await Dl(this.myDropdown.value,this.menuRef.value,i);this.menuRef.value.setAttribute("data-placement",n),Object.assign(this.menuRef.value.style,{position:s,left:`${a}px`,top:`${o}px`})}}e([Ve({type:Boolean,state:!0})],Nl.prototype,"noFlip",void 0),e([Ve({type:Boolean,reflect:!0,state:!0})],Nl.prototype,"menuAlignRight",void 0),e([Ve({type:String,reflect:!0,state:!0})],Nl.prototype,"drop",void 0),e([Ve({type:Object})],Nl.prototype,"floatingOpts",void 0),e([Ve({type:Boolean,reflect:!0})],Nl.prototype,"menuIsOpen",void 0),e([Ve({type:Boolean,reflect:!0})],Nl.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],Nl.prototype,"readonly",void 0);class Ul extends Ee{constructor(){super(...arguments),this.title="",this.name="",this._sidebarCollapsed=!1,this._sidebarActiveItem=null,this._sidebarActiveGroup=null,this._drawerItems=null,this._showDrawer=!1,this._childLevel=0,this._selected=!1,this._hidden=!1,this._childElements=[],this._childActive=!1}connectedCallback(){super.connectedCallback(),this.getChildLevel(),this.setAttribute("role","option"),this.setAttribute("aria-label",this.title||this.name),this.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown)}firstUpdated(e){super.firstUpdated(e),this.getChildLevel()}updated(){1===this._childLevel&&(this._hidden=!this.closest(".sidebar-nested-overlay"))}_handleSlotChange(){this._childElements=this._defaultNodes}_handleClick(){this.emit("i-sgds-click",{detail:{element:this,level:this._childLevel}})}_handleKeyDown(e){var t,l,i;const a=e.target;switch(e.key){case"Enter":return e.preventDefault(),e.stopPropagation(),void(e.target===this&&this._handleClick());case"ArrowDown":{e.preventDefault(),e.stopPropagation();const t=a._childElements[0],l=((null==t?void 0:t._hidden)?null:t)||a.nextElementSibling||a.parentElement.nextElementSibling;if(null==l?void 0:l.shadowRoot){const e=l.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}return}case"ArrowUp":{e.preventDefault(),e.stopPropagation();const l=null===(t=a.previousElementSibling)||void 0===t?void 0:t._childElements,i=l?l[(null==l?void 0:l.length)-1]:null,o=((null==i?void 0:i._hidden)?null:i)||a.previousElementSibling||a.parentElement;if(null==o?void 0:o.shadowRoot){const e=o.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}return}case"ArrowLeft":if(e.preventDefault(),e.stopPropagation(),this._sidebarActiveGroup===this)this._showDrawer&&this._handleClick();else{if(a._childLevel>=1&&(null===(l=this._sidebarActiveGroup)||void 0===l?void 0:l.shadowRoot)){const e=this._sidebarActiveGroup.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}}return;case"ArrowRight":if(e.preventDefault(),e.stopPropagation(),this._sidebarActiveGroup===this){if(null===(i=this._drawerItems)||void 0===i?void 0:i.length)if(this._showDrawer){const e=this._drawerItems[0];if(null==e?void 0:e.shadowRoot){const t=e.shadowRoot.querySelector("[tabindex]");null==t||t.focus()}}else this._handleClick()}else 0===this._childLevel&&this._childElements.length>0&&this._handleClick();return}}getChildLevel(){let e=this.parentElement,t=0;for(;"sgds-sidebar-group"===e.tagName.toLowerCase();)t+=1,e=e.parentElement;const l=e.classList.contains("sidebar-nested-overlay");this._childLevel=l?t+1:t}}Ul.styles=Nl.styles,e([Ve({type:String,reflect:!0})],Ul.prototype,"title",void 0),e([Ve({type:String,reflect:!0})],Ul.prototype,"name",void 0),e([Ne({context:qe,subscribe:!0}),He()],Ul.prototype,"_sidebarCollapsed",void 0),e([Ne({context:We,subscribe:!0}),He()],Ul.prototype,"_sidebarActiveItem",void 0),e([Ne({context:Ue,subscribe:!0}),He()],Ul.prototype,"_sidebarActiveGroup",void 0),e([Ne({context:je,subscribe:!0}),He()],Ul.prototype,"_drawerItems",void 0),e([Ne({context:Fe,subscribe:!0}),He()],Ul.prototype,"_showDrawer",void 0),e([He()],Ul.prototype,"_childLevel",void 0),e([He()],Ul.prototype,"_selected",void 0),e([He()],Ul.prototype,"_hidden",void 0),e([He()],Ul.prototype,"_childElements",void 0),e([He()],Ul.prototype,"_childActive",void 0),e([Ae({flatten:!0})],Ul.prototype,"_defaultNodes",void 0);class Wl extends Ul{constructor(){super(...arguments),this._showMenu=!1}get showMenu(){return this._showMenu}_handleClick(){0!==this._childLevel?(this._showMenu=!this._showMenu,this._childElements.forEach(e=>{e._hidden=!this._showMenu})):super._handleClick()}getIcon(){return 0===this._childLevel?"chevron-right":this._showMenu?"chevron-down":"chevron-up"}render(){return Q`
|
|
2422
|
+
const Et=()=>new Pt;class Pt{}const zt=Math.min,Tt=Math.max,Ot=Math.round,Rt=Math.floor,It=e=>({x:e,y:e}),Dt={left:"right",right:"left",bottom:"top",top:"bottom"},Nt={start:"end",end:"start"};function Ut(e,t,i){return Tt(e,zt(t,i))}function Wt(e,t){return"function"==typeof e?e(t):e}function qt(e){return e.split("-")[0]}function jt(e){return e.split("-")[1]}function Ft(e){return"x"===e?"y":"x"}function Gt(e){return"y"===e?"height":"width"}const Kt=new Set(["top","bottom"]);function Jt(e){return Kt.has(qt(e))?"y":"x"}function Yt(e){return Ft(Jt(e))}function Xt(e,t,i){void 0===i&&(i=!1);const l=jt(e),a=Yt(e),s=Gt(a);let o="x"===a?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=si(o)),[o,si(o)]}function Qt(e){return e.replace(/start|end/g,e=>Nt[e])}const ei=["left","right"],ti=["right","left"],ii=["top","bottom"],li=["bottom","top"];function ai(e,t,i,l){const a=jt(e);let s=function(e,t,i){switch(e){case"top":case"bottom":return i?t?ti:ei:t?ei:ti;case"left":case"right":return t?ii:li;default:return[]}}(qt(e),"start"===i,l);return a&&(s=s.map(e=>e+"-"+a),t&&(s=s.concat(s.map(Qt)))),s}function si(e){return e.replace(/left|right|bottom|top/g,e=>Dt[e])}function oi(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ri(e){const{x:t,y:i,width:l,height:a}=e;return{width:l,height:a,top:i,left:t,right:t+l,bottom:i+a,x:t,y:i}}function ni(e,t,i){let{reference:l,floating:a}=e;const s=Jt(t),o=Yt(t),r=Gt(o),n=qt(t),c="y"===s,d=l.x+l.width/2-a.width/2,h=l.y+l.height/2-a.height/2,v=l[r]/2-a[r]/2;let g;switch(n){case"top":g={x:d,y:l.y-a.height};break;case"bottom":g={x:d,y:l.y+l.height};break;case"right":g={x:l.x+l.width,y:h};break;case"left":g={x:l.x-a.width,y:h};break;default:g={x:l.x,y:l.y}}switch(jt(t)){case"start":g[o]-=v*(i&&c?-1:1);break;case"end":g[o]+=v*(i&&c?-1:1)}return g}async function ci(e,t){var i;void 0===t&&(t={});const{x:l,y:a,platform:s,rects:o,elements:r,strategy:n}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:g=0}=Wt(t,e),p=oi(g),u=r[v?"floating"===h?"reference":"floating":h],w=ri(await s.getClippingRect({element:null==(i=await(null==s.isElement?void 0:s.isElement(u)))||i?u:u.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(r.floating)),boundary:c,rootBoundary:d,strategy:n})),f="floating"===h?{x:l,y:a,width:o.floating.width,height:o.floating.height}:o.reference,m=await(null==s.getOffsetParent?void 0:s.getOffsetParent(r.floating)),b=await(null==s.isElement?void 0:s.isElement(m))&&await(null==s.getScale?void 0:s.getScale(m))||{x:1,y:1},x=ri(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:f,offsetParent:m,strategy:n}):f);return{top:(w.top-x.top+p.top)/b.y,bottom:(x.bottom-w.bottom+p.bottom)/b.y,left:(w.left-x.left+p.left)/b.x,right:(x.right-w.right+p.right)/b.x}}const di=new Set(["left","top"]);function hi(){return"undefined"!=typeof window}function vi(e){return ui(e)?(e.nodeName||"").toLowerCase():"#document"}function gi(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function pi(e){var t;return null==(t=(ui(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ui(e){return!!hi()&&(e instanceof Node||e instanceof gi(e).Node)}function wi(e){return!!hi()&&(e instanceof Element||e instanceof gi(e).Element)}function fi(e){return!!hi()&&(e instanceof HTMLElement||e instanceof gi(e).HTMLElement)}function mi(e){return!(!hi()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof gi(e).ShadowRoot)}const bi=new Set(["inline","contents"]);function xi(e){const{overflow:t,overflowX:i,overflowY:l,display:a}=ki(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!bi.has(a)}const Zi=new Set(["table","td","th"]);function Ci(e){return Zi.has(vi(e))}const yi=[":popover-open",":modal"];function Mi(e){return yi.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const _i=["transform","translate","scale","rotate","perspective"],Vi=["transform","translate","scale","rotate","perspective","filter"],Hi=["paint","layout","strict","content"];function $i(e){const t=Ai(),i=wi(e)?ki(e):e;return _i.some(e=>!!i[e]&&"none"!==i[e])||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||Vi.some(e=>(i.willChange||"").includes(e))||Hi.some(e=>(i.contain||"").includes(e))}function Ai(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Bi=new Set(["html","body","#document"]);function Li(e){return Bi.has(vi(e))}function ki(e){return gi(e).getComputedStyle(e)}function Si(e){return wi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ei(e){if("html"===vi(e))return e;const t=e.assignedSlot||e.parentNode||mi(e)&&e.host||pi(e);return mi(t)?t.host:t}function Pi(e){const t=Ei(e);return Li(t)?e.ownerDocument?e.ownerDocument.body:e.body:fi(t)&&xi(t)?t:Pi(t)}function zi(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const a=Pi(e),s=a===(null==(l=e.ownerDocument)?void 0:l.body),o=gi(a);if(s){const e=Ti(o);return t.concat(o,o.visualViewport||[],xi(a)?a:[],e&&i?zi(e):[])}return t.concat(a,zi(a,[],i))}function Ti(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Oi(e){const t=ki(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const a=fi(e),s=a?e.offsetWidth:i,o=a?e.offsetHeight:l,r=Ot(i)!==s||Ot(l)!==o;return r&&(i=s,l=o),{width:i,height:l,$:r}}function Ri(e){return wi(e)?e:e.contextElement}function Ii(e){const t=Ri(e);if(!fi(t))return It(1);const i=t.getBoundingClientRect(),{width:l,height:a,$:s}=Oi(t);let o=(s?Ot(i.width):i.width)/l,r=(s?Ot(i.height):i.height)/a;return o&&Number.isFinite(o)||(o=1),r&&Number.isFinite(r)||(r=1),{x:o,y:r}}const Di=It(0);function Ni(e){const t=gi(e);return Ai()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Di}function Ui(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const a=e.getBoundingClientRect(),s=Ri(e);let o=It(1);t&&(l?wi(l)&&(o=Ii(l)):o=Ii(e));const r=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==gi(e))&&t}(s,i,l)?Ni(s):It(0);let n=(a.left+r.x)/o.x,c=(a.top+r.y)/o.y,d=a.width/o.x,h=a.height/o.y;if(s){const e=gi(s),t=l&&wi(l)?gi(l):l;let i=e,a=Ti(i);for(;a&&l&&t!==i;){const e=Ii(a),t=a.getBoundingClientRect(),l=ki(a),s=t.left+(a.clientLeft+parseFloat(l.paddingLeft))*e.x,o=t.top+(a.clientTop+parseFloat(l.paddingTop))*e.y;n*=e.x,c*=e.y,d*=e.x,h*=e.y,n+=s,c+=o,i=gi(a),a=Ti(i)}}return ri({width:d,height:h,x:n,y:c})}function Wi(e,t){const i=Si(e).scrollLeft;return t?t.left+i:Ui(pi(e)).left+i}function qi(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-Wi(e,i),y:i.top+t.scrollTop}}const ji=new Set(["absolute","fixed"]);function Fi(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=gi(e),l=pi(e),a=i.visualViewport;let s=l.clientWidth,o=l.clientHeight,r=0,n=0;if(a){s=a.width,o=a.height;const e=Ai();(!e||e&&"fixed"===t)&&(r=a.offsetLeft,n=a.offsetTop)}const c=Wi(l);if(c<=0){const e=l.ownerDocument,t=e.body,i=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,o=Math.abs(l.clientWidth-t.clientWidth-a);o<=25&&(s-=o)}else c<=25&&(s+=c);return{width:s,height:o,x:r,y:n}}(e,i);else if("document"===t)l=function(e){const t=pi(e),i=Si(e),l=e.ownerDocument.body,a=Tt(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),s=Tt(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let o=-i.scrollLeft+Wi(e);const r=-i.scrollTop;return"rtl"===ki(l).direction&&(o+=Tt(t.clientWidth,l.clientWidth)-a),{width:a,height:s,x:o,y:r}}(pi(e));else if(wi(t))l=function(e,t){const i=Ui(e,!0,"fixed"===t),l=i.top+e.clientTop,a=i.left+e.clientLeft,s=fi(e)?Ii(e):It(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:a*s.x,y:l*s.y}}(t,i);else{const i=Ni(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ri(l)}function Gi(e,t){const i=Ei(e);return!(i===t||!wi(i)||Li(i))&&("fixed"===ki(i).position||Gi(i,t))}function Ki(e,t,i){const l=fi(t),a=pi(t),s="fixed"===i,o=Ui(e,!0,s,t);let r={scrollLeft:0,scrollTop:0};const n=It(0);function c(){n.x=Wi(a)}if(l||!l&&!s)if(("body"!==vi(t)||xi(a))&&(r=Si(t)),l){const e=Ui(t,!0,s,t);n.x=e.x+t.clientLeft,n.y=e.y+t.clientTop}else a&&c();s&&!l&&a&&c();const d=!a||l||s?It(0):qi(a,r);return{x:o.left+r.scrollLeft-n.x-d.x,y:o.top+r.scrollTop-n.y-d.y,width:o.width,height:o.height}}function Ji(e){return"static"===ki(e).position}function Yi(e,t){if(!fi(e)||"fixed"===ki(e).position)return null;if(t)return t(e);let i=e.offsetParent;return pi(e)===i&&(i=i.ownerDocument.body),i}function Xi(e,t){const i=gi(e);if(Mi(e))return i;if(!fi(e)){let t=Ei(e);for(;t&&!Li(t);){if(wi(t)&&!Ji(t))return t;t=Ei(t)}return i}let l=Yi(e,t);for(;l&&Ci(l)&&Ji(l);)l=Yi(l,t);return l&&Li(l)&&Ji(l)&&!$i(l)?i:l||function(e){let t=Ei(e);for(;fi(t)&&!Li(t);){if($i(t))return t;if(Mi(t))return null;t=Ei(t)}return null}(e)||i}const Qi={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:a}=e;const s="fixed"===a,o=pi(l),r=!!t&&Mi(t.floating);if(l===o||r&&s)return i;let n={scrollLeft:0,scrollTop:0},c=It(1);const d=It(0),h=fi(l);if((h||!h&&!s)&&(("body"!==vi(l)||xi(o))&&(n=Si(l)),fi(l))){const e=Ui(l);c=Ii(l),d.x=e.x+l.clientLeft,d.y=e.y+l.clientTop}const v=!o||h||s?It(0):qi(o,n);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-n.scrollLeft*c.x+d.x+v.x,y:i.y*c.y-n.scrollTop*c.y+d.y+v.y}},getDocumentElement:pi,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:a}=e;const s="clippingAncestors"===i?Mi(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=zi(e,[],!1).filter(e=>wi(e)&&"body"!==vi(e)),a=null;const s="fixed"===ki(e).position;let o=s?Ei(e):e;for(;wi(o)&&!Li(o);){const t=ki(o),i=$i(o);i||"fixed"!==t.position||(a=null),(s?!i&&!a:!i&&"static"===t.position&&a&&ji.has(a.position)||xi(o)&&!i&&Gi(e,o))?l=l.filter(e=>e!==o):a=t,o=Ei(o)}return t.set(e,l),l}(t,this._c):[].concat(i),o=[...s,l],r=o[0],n=o.reduce((e,i)=>{const l=Fi(t,i,a);return e.top=Tt(l.top,e.top),e.right=zt(l.right,e.right),e.bottom=zt(l.bottom,e.bottom),e.left=Tt(l.left,e.left),e},Fi(t,r,a));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:Xi,getElementRects:async function(e){const t=this.getOffsetParent||Xi,i=this.getDimensions,l=await i(e.floating);return{reference:Ki(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=Oi(e);return{width:t,height:i}},getScale:Ii,isElement:wi,isRTL:function(e){return"rtl"===ki(e).direction}};function el(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tl(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:n=!1}=l,c=Ri(e),d=a||s?[...c?zi(c):[],...zi(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",i,{passive:!0}),s&&e.addEventListener("resize",i)});const h=c&&r?function(e,t){let i,l=null;const a=pi(e);function s(){var e;clearTimeout(i),null==(e=l)||e.disconnect(),l=null}return function o(r,n){void 0===r&&(r=!1),void 0===n&&(n=1),s();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:g}=c;if(r||t(),!v||!g)return;const p={rootMargin:-Rt(h)+"px "+-Rt(a.clientWidth-(d+v))+"px "+-Rt(a.clientHeight-(h+g))+"px "+-Rt(d)+"px",threshold:Tt(0,zt(1,n))||1};let u=!0;function w(t){const l=t[0].intersectionRatio;if(l!==n){if(!u)return o();l?o(!1,l):i=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==l||el(c,e.getBoundingClientRect())||o(),u=!1}try{l=new IntersectionObserver(w,{...p,root:a.ownerDocument})}catch(e){l=new IntersectionObserver(w,p)}l.observe(e)}(!0),s}(c,i):null;let v,g=-1,p=null;o&&(p=new ResizeObserver(e=>{let[l]=e;l&&l.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),i()}),c&&!n&&p.observe(c),p.observe(t));let u=n?Ui(e):null;return n&&function t(){const l=Ui(e);u&&!el(u,l)&&i();u=l,v=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",i),s&&e.removeEventListener("resize",i)}),null==h||h(),null==(e=p)||e.disconnect(),p=null,n&&cancelAnimationFrame(v)}}const il=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:a,y:s,placement:o,middlewareData:r}=t,n=await async function(e,t){const{placement:i,platform:l,elements:a}=e,s=await(null==l.isRTL?void 0:l.isRTL(a.floating)),o=qt(i),r=jt(i),n="y"===Jt(i),c=di.has(o)?-1:1,d=s&&n?-1:1,h=Wt(t,e);let{mainAxis:v,crossAxis:g,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return r&&"number"==typeof p&&(g="end"===r?-1*p:p),n?{x:g*d,y:v*c}:{x:v*c,y:g*d}}(t,e);return o===(null==(i=r.offset)?void 0:i.placement)&&null!=(l=r.arrow)&&l.alignmentOffset?{}:{x:a+n.x,y:s+n.y,data:{...n,placement:o}}}}},ll=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:a}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:r={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...n}=Wt(e,t),c={x:i,y:l},d=await ci(t,n),h=Jt(qt(a)),v=Ft(h);let g=c[v],p=c[h];if(s){const e="y"===v?"bottom":"right";g=Ut(g+d["y"===v?"top":"left"],g,g-d[e])}if(o){const e="y"===h?"bottom":"right";p=Ut(p+d["y"===h?"top":"left"],p,p-d[e])}const u=r.fn({...t,[v]:g,[h]:p});return{...u,data:{x:u.x-i,y:u.y-l,enabled:{[v]:s,[h]:o}}}}}},al=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:a,middlewareData:s,rects:o,initialPlacement:r,platform:n,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:u=!0,...w}=Wt(e,t);if(null!=(i=s.arrow)&&i.alignmentOffset)return{};const f=qt(a),m=Jt(r),b=qt(r)===r,x=await(null==n.isRTL?void 0:n.isRTL(c.floating)),Z=v||(b||!u?[si(r)]:function(e){const t=si(e);return[Qt(e),t,Qt(t)]}(r)),C="none"!==p;!v&&C&&Z.push(...ai(r,u,p,x));const y=[r,...Z],M=await ci(t,w),_=[];let V=(null==(l=s.flip)?void 0:l.overflows)||[];if(d&&_.push(M[f]),h){const e=Xt(a,o,x);_.push(M[e[0]],M[e[1]])}if(V=[...V,{placement:a,overflows:_}],!_.every(e=>e<=0)){var H,$;const e=((null==(H=s.flip)?void 0:H.index)||0)+1,t=y[e];if(t){if(!("alignment"===h&&m!==Jt(t))||V.every(e=>Jt(e.placement)!==m||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let i=null==($=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:$.placement;if(!i)switch(g){case"bestFit":{var A;const e=null==(A=V.filter(e=>{if(C){const t=Jt(e.placement);return t===m||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:A[0];e&&(i=e);break}case"initialPlacement":i=r}if(a!==i)return{reset:{placement:i}}}return{}}}},sl=(e,t,i)=>{const l=new Map,a={platform:Qi,...i},s={...a.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:a="absolute",middleware:s=[],platform:o}=i,r=s.filter(Boolean),n=await(null==o.isRTL?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:h}=ni(c,l,n),v=l,g={},p=0;for(let i=0;i<r.length;i++){const{name:s,fn:u}=r[i],{x:w,y:f,data:m,reset:b}=await u({x:d,y:h,initialPlacement:l,placement:v,strategy:a,middlewareData:g,rects:c,platform:o,elements:{reference:e,floating:t}});d=null!=w?w:d,h=null!=f?f:h,g={...g,[s]:{...g[s],...m}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(v=b.placement),b.rects&&(c=!0===b.rects?await o.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:d,y:h}=ni(c,v,n))),i=-1)}return{x:d,y:h,placement:v,strategy:a,middlewareData:g}})(e,t,{...a,platform:s})};class ol extends ze{constructor(){super(...arguments),this.myDropdown=Et(),this.dropdownMenuId=function(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}("dropdown-menu","div"),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.floatingOpts={},this.menuIsOpen=!1,this.close="default",this.disabled=!1,this.readonly=!1,this.menuRef=Et(),this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu(!0))}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&this.updateFloatingPosition()}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=tl(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition())))}hideMenu(e){this.menuIsOpen&&(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuIsOpen=!1,setTimeout(()=>this.emit("sgds-after-hide"),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}_handleKeyboardMenuEvent(e){if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}}mergeMiddleware(e,t){const i=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},l=t.map(i),a=e.map(e=>{const a=i(e),s=l.indexOf(a);return-1!==s?t[s]:e}).concat(t.filter(t=>!e.some(e=>i(e)===i(t))));return a}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[il(8),this.noFlip?void 0:al(),ll()].filter(Boolean);let i=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(i=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const l=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:i}),{x:a,y:s,strategy:o,placement:r}=await sl(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",r),Object.assign(this.menuRef.value.style,{position:o,left:`${a}px`,top:`${s}px`})}}e([Ve({type:Boolean,state:!0})],ol.prototype,"noFlip",void 0),e([Ve({type:Boolean,reflect:!0,state:!0})],ol.prototype,"menuAlignRight",void 0),e([Ve({type:String,reflect:!0,state:!0})],ol.prototype,"drop",void 0),e([Ve({type:Object})],ol.prototype,"floatingOpts",void 0),e([Ve({type:Boolean,reflect:!0})],ol.prototype,"menuIsOpen",void 0),e([Ve({type:Boolean,reflect:!0})],ol.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],ol.prototype,"readonly",void 0);class rl extends ze{constructor(){super(...arguments),this.title="",this.name="",this._sidebarCollapsed=!1,this._sidebarActiveItem=null,this._sidebarActiveGroup=null,this._drawerItems=null,this._showDrawer=!1,this._childLevel=0,this._selected=!1,this._hidden=!1,this._childElements=[],this._childActive=!1}connectedCallback(){super.connectedCallback(),this.getChildLevel(),this.setAttribute("role","option"),this.setAttribute("aria-label",this.title||this.name),this.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown)}firstUpdated(e){super.firstUpdated(e),this.getChildLevel()}updated(){1===this._childLevel&&(this._hidden=!this.closest(".sidebar-nested-overlay"))}_handleSlotChange(){this._childElements=this._defaultNodes}_handleClick(){this.emit("i-sgds-click",{detail:{element:this,level:this._childLevel}})}_handleKeyDown(e){var t,i,l;const a=e.target;switch(e.key){case"Enter":return e.preventDefault(),e.stopPropagation(),void(e.target===this&&this._handleClick());case"ArrowDown":{e.preventDefault(),e.stopPropagation();const t=a._childElements[0],i=((null==t?void 0:t._hidden)?null:t)||a.nextElementSibling||a.parentElement.nextElementSibling;if(null==i?void 0:i.shadowRoot){const e=i.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}return}case"ArrowUp":{e.preventDefault(),e.stopPropagation();const i=null===(t=a.previousElementSibling)||void 0===t?void 0:t._childElements,l=i?i[(null==i?void 0:i.length)-1]:null,s=((null==l?void 0:l._hidden)?null:l)||a.previousElementSibling||a.parentElement;if(null==s?void 0:s.shadowRoot){const e=s.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}return}case"ArrowLeft":if(e.preventDefault(),e.stopPropagation(),this._sidebarActiveGroup===this)this._showDrawer&&this._handleClick();else{if(a._childLevel>=1&&(null===(i=this._sidebarActiveGroup)||void 0===i?void 0:i.shadowRoot)){const e=this._sidebarActiveGroup.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}}return;case"ArrowRight":if(e.preventDefault(),e.stopPropagation(),this._sidebarActiveGroup===this){if(null===(l=this._drawerItems)||void 0===l?void 0:l.length)if(this._showDrawer){const e=this._drawerItems[0];if(null==e?void 0:e.shadowRoot){const t=e.shadowRoot.querySelector("[tabindex]");null==t||t.focus()}}else this._handleClick()}else 0===this._childLevel&&this._childElements.length>0&&this._handleClick();return}}getChildLevel(){let e=this.parentElement,t=0;for(;"sgds-sidebar-group"===e.tagName.toLowerCase();)t+=1,e=e.parentElement;const i=e.classList.contains("sidebar-nested-overlay");this._childLevel=i?t+1:t}}rl.styles=ol.styles,e([Ve({type:String,reflect:!0})],rl.prototype,"title",void 0),e([Ve({type:String,reflect:!0})],rl.prototype,"name",void 0),e([We({context:Fe,subscribe:!0}),He()],rl.prototype,"_sidebarCollapsed",void 0),e([We({context:je,subscribe:!0}),He()],rl.prototype,"_sidebarActiveItem",void 0),e([We({context:qe,subscribe:!0}),He()],rl.prototype,"_sidebarActiveGroup",void 0),e([We({context:Ge,subscribe:!0}),He()],rl.prototype,"_drawerItems",void 0),e([We({context:Ke,subscribe:!0}),He()],rl.prototype,"_showDrawer",void 0),e([He()],rl.prototype,"_childLevel",void 0),e([He()],rl.prototype,"_selected",void 0),e([He()],rl.prototype,"_hidden",void 0),e([He()],rl.prototype,"_childElements",void 0),e([He()],rl.prototype,"_childActive",void 0),e([Be({flatten:!0})],rl.prototype,"_defaultNodes",void 0);class nl extends rl{constructor(){super(...arguments),this._showMenu=!1}get showMenu(){return this._showMenu}_handleClick(){0!==this._childLevel?(this._showMenu=!this._showMenu,this._childElements.forEach(e=>{e._hidden=!this._showMenu})):super._handleClick()}getIcon(){return 0===this._childLevel?"chevron-right":this._showMenu?"chevron-down":"chevron-up"}render(){return Q`
|
|
2351
2423
|
<div
|
|
2352
|
-
class=${
|
|
2424
|
+
class=${Se({"sidebar-item":!0,"sidebar-item--collapsed":this._sidebarCollapsed&&0===this._childLevel,active:this._selected})}
|
|
2353
2425
|
@click=${()=>this._handleClick()}
|
|
2354
2426
|
aria-level=${this._childLevel}
|
|
2355
2427
|
.aria-expanded=${this._showMenu}
|
|
@@ -2370,15 +2442,15 @@ const wt=()=>new ft;class ft{}const mt=Math.min,xt=Math.max,Zt=Math.round,bt=Mat
|
|
|
2370
2442
|
</div>
|
|
2371
2443
|
|
|
2372
2444
|
<div
|
|
2373
|
-
class=${
|
|
2445
|
+
class=${Se({"sidebar-submenu":!0,"sidebar-submenu--collapsed":this._sidebarCollapsed&&0==this._childLevel,show:this._showMenu})}
|
|
2374
2446
|
>
|
|
2375
2447
|
<div>
|
|
2376
2448
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
2377
2449
|
</div>
|
|
2378
2450
|
</div>
|
|
2379
|
-
`}}
|
|
2451
|
+
`}}nl.styles=[...ze.styles,St],nl.dependencies={"sgds-icon":_t},e([He()],nl.prototype,"_showMenu",void 0);class cl extends rl{constructor(){super(...arguments),this.icon=""}render(){return Q`
|
|
2380
2452
|
<div
|
|
2381
|
-
class=${
|
|
2453
|
+
class=${Se({"sidebar-item":!0,"sidebar-item--collapsed":this._sidebarCollapsed&&0===this._childLevel,active:this._selected})}
|
|
2382
2454
|
@click=${()=>this._handleClick()}
|
|
2383
2455
|
aria-level=${this._childLevel}
|
|
2384
2456
|
aria-label=${this.title||this.name}
|
|
@@ -2388,9 +2460,9 @@ const wt=()=>new ft;class ft{}const mt=Math.min,xt=Math.max,Zt=Math.round,bt=Mat
|
|
|
2388
2460
|
>
|
|
2389
2461
|
<div class="sidebar-item-label-wrapper">
|
|
2390
2462
|
<div>
|
|
2391
|
-
${this._childLevel<=1?Q`<slot name="leadingIcon"></slot>`:
|
|
2463
|
+
${this._childLevel<=1?Q`<slot name="leadingIcon"></slot>`:ie}
|
|
2392
2464
|
<span
|
|
2393
|
-
class=${
|
|
2465
|
+
class=${Se({"sidebar-item-label":!0,offset:this._childLevel>1})}
|
|
2394
2466
|
>${this.title}</span
|
|
2395
2467
|
>
|
|
2396
2468
|
</div>
|
|
@@ -2400,28 +2472,30 @@ const wt=()=>new ft;class ft{}const mt=Math.min,xt=Math.max,Zt=Math.round,bt=Mat
|
|
|
2400
2472
|
</span>
|
|
2401
2473
|
</div>
|
|
2402
2474
|
</div>
|
|
2403
|
-
`}}
|
|
2475
|
+
`}}cl.styles=[...ze.styles,St],e([Ve({type:String,reflect:!0})],cl.prototype,"icon",void 0);var dl=o`.sidebar-section{display:flex;flex-direction:column}.sidebar-section-label{align-items:center;border-radius:var(--sgds-border-radius-md);color:var(--sgds-label-color-subtle);cursor:pointer;display:flex;font-size:var(--sgds-font-size-0);gap:var(--sgds-gap-2-xs);line-height:var(--sgds-line-height-20);padding:var(--sgds-padding-xs) var(--sgds-padding-sm)}.sidebar-section-label:hover{color:var(--sgds-label-color-default)}.sidebar-section-label:focus,.sidebar-section-label:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-section--collapsed .sidebar-section-label{height:0;margin:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;width:0}.sidebar-section-content{overflow:hidden;padding:0 var(--sgds-padding-xs)}.sidebar-section-content>div{margin-top:0;pointer-events:auto;transition:all var(--sgds-motion-duration-slow) var(--sgds-motion-easing-standard)}.sidebar-section-content.sidebar-section-content--collapsed>div{margin-top:-100%;pointer-events:none}.sidebar-section--collapsed .sidebar-section-content--collapsed>div{margin-top:0}.sidebar-section-seperator{margin-bottom:var(--sgds-margin-md)}`,hl=o`:host{--container-size:8px}:host([orientation=horizontal]){border-top:var(--border-width) solid var(--sgds-border-color-muted);display:block;margin:calc((var(--container-size) - var(--border-width))/2) 0;width:100%}:host([orientation=vertical]){border-left:var(--border-width) solid var(--sgds-border-color-muted);display:inline-block;height:100%;margin:0 calc((var(--container-size) - var(--border-width))/2)}:host([thickness=thin]){--border-width:var(--sgds-border-width-1)}:host([thickness=thick]){--border-width:var(--sgds-border-width-2)}:host([thickness=thicker]){--border-width:var(--sgds-border-width-4)}`;class vl extends ze{constructor(){super(...arguments),this.orientation="horizontal",this.thickness="thin"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator"),this.setAttribute("aria-orientation",this.orientation)}}vl.styles=[hl],e([Ve({type:String,reflect:!0})],vl.prototype,"orientation",void 0),e([Ve({type:String,reflect:!0})],vl.prototype,"thickness",void 0);class gl extends rl{constructor(){super(...arguments),this.title="",this.collapsed=!1,this.collapsible=!1,this.seperator=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","region"),this._childLevel=null}_handleClick(){this.collapsible&&(this.collapsed=!this.collapsed)}render(){return Q`
|
|
2404
2476
|
<div
|
|
2405
|
-
class=${
|
|
2477
|
+
class=${Se({"sidebar-section":!0,"sidebar-section--collapsed":this._sidebarCollapsed})}
|
|
2406
2478
|
>
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2479
|
+
${""!==this.title?Q`<div
|
|
2480
|
+
class="sidebar-section-label"
|
|
2481
|
+
@click=${this._handleClick}
|
|
2482
|
+
aria-expanded=${!this.collapsed}
|
|
2483
|
+
aria-disabled=${!this.collapsible}
|
|
2484
|
+
tabindex="0"
|
|
2485
|
+
>
|
|
2486
|
+
<span>${this.title}</span>
|
|
2487
|
+
${this.collapsible?Q`<sgds-icon name=${this.collapsed?"chevron-down":"chevron-up"} size="sm"></sgds-icon>`:ie}
|
|
2488
|
+
</div>`:ie}
|
|
2417
2489
|
|
|
2418
2490
|
<div
|
|
2419
|
-
class=${
|
|
2491
|
+
class=${Se({"sidebar-section-content":!0,"sidebar-section-content--collapsed":this.collapsed&&this.collapsible,"sidebar-section-seperator":this.seperator})}
|
|
2420
2492
|
>
|
|
2421
2493
|
<div>
|
|
2422
2494
|
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
2423
2495
|
</div>
|
|
2424
2496
|
</div>
|
|
2497
|
+
|
|
2498
|
+
${this.seperator?Q`<sgds-divider></sgds-divider>`:ie}
|
|
2425
2499
|
</div>
|
|
2426
|
-
`}}
|
|
2500
|
+
`}}gl.styles=[...ze.styles,dl],gl.dependencies={"sgds-icon":_t,"sgds-divider":vl},e([Ve({type:String,reflect:!0})],gl.prototype,"title",void 0),e([Ve({type:Boolean,reflect:!0})],gl.prototype,"collapsed",void 0),e([Ve({type:Boolean,reflect:!0})],gl.prototype,"collapsible",void 0),e([Ve({type:Boolean,reflect:!0})],gl.prototype,"seperator",void 0),customElements.define("sgds-sidebar",kt),customElements.define("sgds-sidebar-item",cl),customElements.define("sgds-sidebar-section",gl),customElements.define("sgds-sidebar-group",nl)});
|
|
2427
2501
|
//# sourceMappingURL=index.umd.min.js.map
|