@pontive/pontkit-core 1.7.1 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6,17 +6,17 @@
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:du,defineProperty:cu,getOwnPropertyDescriptor:pu,getOwnPropertyNames:hu,getOwnPropertySymbols:uu,getPrototypeOf:mu}=Object,dr=globalThis,Bl=dr.trustedTypes,gu=Bl?Bl.emptyScript:"",as=dr.reactiveElementPolyfillSupport,io=(e,t)=>e,ti={toAttribute(e,t){switch(t){case Boolean:e=e?gu:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},ja=(e,t)=>!du(e,t),Ul={attribute:!0,type:String,converter:ti,reflect:!1,useDefault:!1,hasChanged:ja};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),dr.litPropertyMetadata??(dr.litPropertyMetadata=new WeakMap);let bn=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=Ul){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){const o=Symbol(),n=this.getPropertyDescriptor(t,o,r);n!==void 0&&cu(this.prototype,t,n)}}static getPropertyDescriptor(t,r,o){const{get:n,set:i}=pu(this.prototype,t)??{get(){return this[r]},set(s){this[r]=s}};return{get:n,set(s){const d=n==null?void 0:n.call(this);i==null||i.call(this,s),this.requestUpdate(t,d,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ul}static _$Ei(){if(this.hasOwnProperty(io("elementProperties")))return;const t=mu(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(io("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(io("properties"))){const r=this.properties,o=[...hu(r),...uu(r)];for(const n of o)this.createProperty(n,r[n])}const t=this[Symbol.metadata];if(t!==null){const r=litPropertyMetadata.get(t);if(r!==void 0)for(const[o,n]of r)this.elementProperties.set(o,n)}this._$Eh=new Map;for(const[r,o]of this.elementProperties){const n=this._$Eu(r,o);n!==void 0&&this._$Eh.set(n,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const r=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const n of o)r.unshift(Ml(n))}else t!==void 0&&r.push(Ml(t));return r}static _$Eu(t,r){const o=r.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(r=>r(this))}addController(t){var r;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)==null||r.call(t))}removeController(t){var r;(r=this._$EO)==null||r.delete(t)}_$E_(){const t=new Map,r=this.constructor.elementProperties;for(const o of r.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return lu(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(r=>{var o;return(o=r.hostConnected)==null?void 0:o.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(r=>{var o;return(o=r.hostDisconnected)==null?void 0:o.call(r)})}attributeChangedCallback(t,r,o){this._$AK(t,o)}_$ET(t,r){var i;const o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===!0){const s=(((i=o.converter)==null?void 0:i.toAttribute)!==void 0?o.converter:ti).toAttribute(r,o.type);this._$Em=t,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(t,r){var i,s;const o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){const d=o.getPropertyOptions(n),c=typeof d.converter=="function"?{fromAttribute:d.converter}:((i=d.converter)==null?void 0:i.fromAttribute)!==void 0?d.converter:ti;this._$Em=n;const m=c.fromAttribute(r,d.type);this[n]=m??((s=this._$Ej)==null?void 0:s.get(n))??m,this._$Em=null}}requestUpdate(t,r,o,n=!1,i){var s;if(t!==void 0){const d=this.constructor;if(n===!1&&(i=this[t]),o??(o=d.getPropertyOptions(t)),!((o.hasChanged??ja)(i,r)||o.useDefault&&o.reflect&&i===((s=this._$Ej)==null?void 0:s.get(t))&&!this.hasAttribute(d._$Eu(t,o))))return;this.C(t,r,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:o,reflect:n,wrapped:i},s){o&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,s??r??this[t]),i!==!0||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(r=void 0),this._$AL.set(t,r)),n===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[i,s]of n){const{wrapped:d}=s,c=this[i];d!==!0||this._$AL.has(i)||c===void 0||this.C(i,void 0,s,c)}}let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(o=this._$EO)==null||o.forEach(n=>{var i;return(i=n.hostUpdate)==null?void 0:i.call(n)}),this.update(r)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(r)}willUpdate(t){}_$AE(t){var r;(r=this._$EO)==null||r.forEach(o=>{var n;return(n=o.hostUpdated)==null?void 0:n.call(o)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(r=>this._$ET(r,this[r]))),this._$EM()}updated(t){}firstUpdated(t){}};bn.elementStyles=[],bn.shadowRootOptions={mode:"open"},bn[io("elementProperties")]=new Map,bn[io("finalized")]=new Map,as==null||as({ReactiveElement:bn}),(dr.reactiveElementVersions??(dr.reactiveElementVersions=[])).push("2.1.2");/**
9
+ */const{is:du,defineProperty:cu,getOwnPropertyDescriptor:pu,getOwnPropertyNames:hu,getOwnPropertySymbols:uu,getPrototypeOf:mu}=Object,cr=globalThis,Bl=cr.trustedTypes,gu=Bl?Bl.emptyScript:"",as=cr.reactiveElementPolyfillSupport,io=(e,t)=>e,ti={toAttribute(e,t){switch(t){case Boolean:e=e?gu:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},ja=(e,t)=>!du(e,t),Ul={attribute:!0,type:String,converter:ti,reflect:!1,useDefault:!1,hasChanged:ja};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),cr.litPropertyMetadata??(cr.litPropertyMetadata=new WeakMap);let bn=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=Ul){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){const o=Symbol(),n=this.getPropertyDescriptor(t,o,r);n!==void 0&&cu(this.prototype,t,n)}}static getPropertyDescriptor(t,r,o){const{get:n,set:i}=pu(this.prototype,t)??{get(){return this[r]},set(s){this[r]=s}};return{get:n,set(s){const d=n==null?void 0:n.call(this);i==null||i.call(this,s),this.requestUpdate(t,d,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ul}static _$Ei(){if(this.hasOwnProperty(io("elementProperties")))return;const t=mu(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(io("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(io("properties"))){const r=this.properties,o=[...hu(r),...uu(r)];for(const n of o)this.createProperty(n,r[n])}const t=this[Symbol.metadata];if(t!==null){const r=litPropertyMetadata.get(t);if(r!==void 0)for(const[o,n]of r)this.elementProperties.set(o,n)}this._$Eh=new Map;for(const[r,o]of this.elementProperties){const n=this._$Eu(r,o);n!==void 0&&this._$Eh.set(n,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const r=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const n of o)r.unshift(Ml(n))}else t!==void 0&&r.push(Ml(t));return r}static _$Eu(t,r){const o=r.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(r=>r(this))}addController(t){var r;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)==null||r.call(t))}removeController(t){var r;(r=this._$EO)==null||r.delete(t)}_$E_(){const t=new Map,r=this.constructor.elementProperties;for(const o of r.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return lu(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(r=>{var o;return(o=r.hostConnected)==null?void 0:o.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(r=>{var o;return(o=r.hostDisconnected)==null?void 0:o.call(r)})}attributeChangedCallback(t,r,o){this._$AK(t,o)}_$ET(t,r){var i;const o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===!0){const s=(((i=o.converter)==null?void 0:i.toAttribute)!==void 0?o.converter:ti).toAttribute(r,o.type);this._$Em=t,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(t,r){var i,s;const o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){const d=o.getPropertyOptions(n),c=typeof d.converter=="function"?{fromAttribute:d.converter}:((i=d.converter)==null?void 0:i.fromAttribute)!==void 0?d.converter:ti;this._$Em=n;const m=c.fromAttribute(r,d.type);this[n]=m??((s=this._$Ej)==null?void 0:s.get(n))??m,this._$Em=null}}requestUpdate(t,r,o,n=!1,i){var s;if(t!==void 0){const d=this.constructor;if(n===!1&&(i=this[t]),o??(o=d.getPropertyOptions(t)),!((o.hasChanged??ja)(i,r)||o.useDefault&&o.reflect&&i===((s=this._$Ej)==null?void 0:s.get(t))&&!this.hasAttribute(d._$Eu(t,o))))return;this.C(t,r,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:o,reflect:n,wrapped:i},s){o&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,s??r??this[t]),i!==!0||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(r=void 0),this._$AL.set(t,r)),n===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[i,s]of n){const{wrapped:d}=s,c=this[i];d!==!0||this._$AL.has(i)||c===void 0||this.C(i,void 0,s,c)}}let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(o=this._$EO)==null||o.forEach(n=>{var i;return(i=n.hostUpdate)==null?void 0:i.call(n)}),this.update(r)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(r)}willUpdate(t){}_$AE(t){var r;(r=this._$EO)==null||r.forEach(o=>{var n;return(n=o.hostUpdated)==null?void 0:n.call(o)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(r=>this._$ET(r,this[r]))),this._$EM()}updated(t){}firstUpdated(t){}};bn.elementStyles=[],bn.shadowRootOptions={mode:"open"},bn[io("elementProperties")]=new Map,bn[io("finalized")]=new Map,as==null||as({ReactiveElement:bn}),(cr.reactiveElementVersions??(cr.reactiveElementVersions=[])).push("2.1.2");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const so=globalThis,jl=e=>e,ei=so.trustedTypes,ql=ei?ei.createPolicy("lit-html",{createHTML:e=>e}):void 0,$p="$lit$",ar=`lit$${Math.random().toFixed(9).slice(2)}$`,Pp="?"+ar,fu=`<${Pp}>`,Fr=document,po=()=>Fr.createComment(""),ho=e=>e===null||typeof e!="object"&&typeof e!="function",qa=Array.isArray,vu=e=>qa(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",ls=`[
13
+ */const so=globalThis,jl=e=>e,ei=so.trustedTypes,ql=ei?ei.createPolicy("lit-html",{createHTML:e=>e}):void 0,$p="$lit$",lr=`lit$${Math.random().toFixed(9).slice(2)}$`,Pp="?"+lr,fu=`<${Pp}>`,Fr=document,po=()=>Fr.createComment(""),ho=e=>e===null||typeof e!="object"&&typeof e!="function",qa=Array.isArray,vu=e=>qa(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",ls=`[
14
14
  \f\r]`,Zn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zl=/-->/g,Vl=/>/g,Or=RegExp(`>|${ls}(?:([^\\s"'>=/]+)(${ls}*=${ls}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Hl=/'/g,Gl=/"/g,Cp=/^(?:script|style|textarea|title)$/i,Sp=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),l=Sp(1),U=Sp(2),pr=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),Kl=new WeakMap,Tr=Fr.createTreeWalker(Fr,129);function Ep(e,t){if(!qa(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return ql!==void 0?ql.createHTML(t):t}const bu=(e,t)=>{const r=e.length-1,o=[];let n,i=t===2?"<svg>":t===3?"<math>":"",s=Zn;for(let d=0;d<r;d++){const c=e[d];let m,v,b=-1,w=0;for(;w<c.length&&(s.lastIndex=w,v=s.exec(c),v!==null);)w=s.lastIndex,s===Zn?v[1]==="!--"?s=zl:v[1]!==void 0?s=Vl:v[2]!==void 0?(Cp.test(v[2])&&(n=RegExp("</"+v[2],"g")),s=Or):v[3]!==void 0&&(s=Or):s===Or?v[0]===">"?(s=n??Zn,b=-1):v[1]===void 0?b=-2:(b=s.lastIndex-v[2].length,m=v[1],s=v[3]===void 0?Or:v[3]==='"'?Gl:Hl):s===Gl||s===Hl?s=Or:s===zl||s===Vl?s=Zn:(s=Or,n=void 0);const _=s===Or&&e[d+1].startsWith("/>")?" ":"";i+=s===Zn?c+fu:b>=0?(o.push(m),c.slice(0,b)+$p+c.slice(b)+ar+_):c+ar+(b===-2?d:_)}return[Ep(e,i+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]};class uo{constructor({strings:t,_$litType$:r},o){let n;this.parts=[];let i=0,s=0;const d=t.length-1,c=this.parts,[m,v]=bu(t,r);if(this.el=uo.createElement(m,o),Tr.currentNode=this.el.content,r===2||r===3){const b=this.el.content.firstChild;b.replaceWith(...b.childNodes)}for(;(n=Tr.nextNode())!==null&&c.length<d;){if(n.nodeType===1){if(n.hasAttributes())for(const b of n.getAttributeNames())if(b.endsWith($p)){const w=v[s++],_=n.getAttribute(b).split(ar),C=/([.?@])?(.*)/.exec(w);c.push({type:1,index:i,name:C[2],strings:_,ctor:C[1]==="."?_u:C[1]==="?"?wu:C[1]==="@"?$u:Ai}),n.removeAttribute(b)}else b.startsWith(ar)&&(c.push({type:6,index:i}),n.removeAttribute(b));if(Cp.test(n.tagName)){const b=n.textContent.split(ar),w=b.length-1;if(w>0){n.textContent=ei?ei.emptyScript:"";for(let _=0;_<w;_++)n.append(b[_],po()),Tr.nextNode(),c.push({type:2,index:++i});n.append(b[w],po())}}}else if(n.nodeType===8)if(n.data===Pp)c.push({type:2,index:i});else{let b=-1;for(;(b=n.data.indexOf(ar,b+1))!==-1;)c.push({type:7,index:i}),b+=ar.length-1}i++}}static createElement(t,r){const o=Fr.createElement("template");return o.innerHTML=t,o}}function _n(e,t,r=e,o){var s,d;if(t===pr)return t;let n=o!==void 0?(s=r._$Co)==null?void 0:s[o]:r._$Cl;const i=ho(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==i&&((d=n==null?void 0:n._$AO)==null||d.call(n,!1),i===void 0?n=void 0:(n=new i(e),n._$AT(e,r,o)),o!==void 0?(r._$Co??(r._$Co=[]))[o]=n:r._$Cl=n),n!==void 0&&(t=_n(e,n._$AS(e,t.values),n,o)),t}class yu{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:r},parts:o}=this._$AD,n=((t==null?void 0:t.creationScope)??Fr).importNode(r,!0);Tr.currentNode=n;let i=Tr.nextNode(),s=0,d=0,c=o[0];for(;c!==void 0;){if(s===c.index){let m;c.type===2?m=new Po(i,i.nextSibling,this,t):c.type===1?m=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(m=new Pu(i,this,t)),this._$AV.push(m),c=o[++d]}s!==(c==null?void 0:c.index)&&(i=Tr.nextNode(),s++)}return Tr.currentNode=Fr,n}p(t){let r=0;for(const o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,r),r+=o.strings.length-2):o._$AI(t[r])),r++}}class Po{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,r,o,n){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=o,this.options=n,this._$Cv=(n==null?void 0:n.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=_n(this,t,r),ho(t)?t===h||t==null||t===""?(this._$AH!==h&&this._$AR(),this._$AH=h):t!==this._$AH&&t!==pr&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):vu(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==h&&ho(this._$AH)?this._$AA.nextSibling.data=t:this.T(Fr.createTextNode(t)),this._$AH=t}$(t){var i;const{values:r,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=uo.createElement(Ep(o.h,o.h[0]),this.options)),o);if(((i=this._$AH)==null?void 0:i._$AD)===n)this._$AH.p(r);else{const s=new yu(n,this),d=s.u(this.options);s.p(r),this.T(d),this._$AH=s}}_$AC(t){let r=Kl.get(t.strings);return r===void 0&&Kl.set(t.strings,r=new uo(t)),r}k(t){qa(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let o,n=0;for(const i of t)n===r.length?r.push(o=new Po(this.O(po()),this.O(po()),this,this.options)):o=r[n],o._$AI(i),n++;n<r.length&&(this._$AR(o&&o._$AB.nextSibling,n),r.length=n)}_$AR(t=this._$AA.nextSibling,r){var o;for((o=this._$AP)==null?void 0:o.call(this,!1,!0,r);t!==this._$AB;){const n=jl(t).nextSibling;jl(t).remove(),t=n}}setConnected(t){var r;this._$AM===void 0&&(this._$Cv=t,(r=this._$AP)==null||r.call(this,t))}}class Ai{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,o,n,i){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=r,this._$AM=n,this.options=i,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=h}_$AI(t,r=this,o,n){const i=this.strings;let s=!1;if(i===void 0)t=_n(this,t,r,0),s=!ho(t)||t!==this._$AH&&t!==pr,s&&(this._$AH=t);else{const d=t;let c,m;for(t=i[0],c=0;c<i.length-1;c++)m=_n(this,d[o+c],r,c),m===pr&&(m=this._$AH[c]),s||(s=!ho(m)||m!==this._$AH[c]),m===h?t=h:t!==h&&(t+=(m??"")+i[c+1]),this._$AH[c]=m}s&&!n&&this.j(t)}j(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class _u extends Ai{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===h?void 0:t}}class wu extends Ai{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==h)}}class $u extends Ai{constructor(t,r,o,n,i){super(t,r,o,n,i),this.type=5}_$AI(t,r=this){if((t=_n(this,t,r,0)??h)===pr)return;const o=this._$AH,n=t===h&&o!==h||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,i=t!==h&&(o===h||n);n&&this.element.removeEventListener(this.name,this,o),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var r;typeof this._$AH=="function"?this._$AH.call(((r=this.options)==null?void 0:r.host)??this.element,t):this._$AH.handleEvent(t)}}class Pu{constructor(t,r,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){_n(this,t)}}const ds=so.litHtmlPolyfillSupport;ds==null||ds(uo,Po),(so.litHtmlVersions??(so.litHtmlVersions=[])).push("3.3.3");const Cu=(e,t,r)=>{const o=(r==null?void 0:r.renderBefore)??t;let n=o._$litPart$;if(n===void 0){const i=(r==null?void 0:r.renderBefore)??null;o._$litPart$=n=new Po(t.insertBefore(po(),i),i,void 0,r??{})}return n._$AI(e),n};/**
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Hl=/'/g,Gl=/"/g,Cp=/^(?:script|style|textarea|title)$/i,Sp=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),l=Sp(1),U=Sp(2),hr=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),Kl=new WeakMap,Tr=Fr.createTreeWalker(Fr,129);function Ep(e,t){if(!qa(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return ql!==void 0?ql.createHTML(t):t}const bu=(e,t)=>{const r=e.length-1,o=[];let n,i=t===2?"<svg>":t===3?"<math>":"",s=Zn;for(let d=0;d<r;d++){const c=e[d];let m,v,b=-1,w=0;for(;w<c.length&&(s.lastIndex=w,v=s.exec(c),v!==null);)w=s.lastIndex,s===Zn?v[1]==="!--"?s=zl:v[1]!==void 0?s=Vl:v[2]!==void 0?(Cp.test(v[2])&&(n=RegExp("</"+v[2],"g")),s=Or):v[3]!==void 0&&(s=Or):s===Or?v[0]===">"?(s=n??Zn,b=-1):v[1]===void 0?b=-2:(b=s.lastIndex-v[2].length,m=v[1],s=v[3]===void 0?Or:v[3]==='"'?Gl:Hl):s===Gl||s===Hl?s=Or:s===zl||s===Vl?s=Zn:(s=Or,n=void 0);const _=s===Or&&e[d+1].startsWith("/>")?" ":"";i+=s===Zn?c+fu:b>=0?(o.push(m),c.slice(0,b)+$p+c.slice(b)+lr+_):c+lr+(b===-2?d:_)}return[Ep(e,i+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]};class uo{constructor({strings:t,_$litType$:r},o){let n;this.parts=[];let i=0,s=0;const d=t.length-1,c=this.parts,[m,v]=bu(t,r);if(this.el=uo.createElement(m,o),Tr.currentNode=this.el.content,r===2||r===3){const b=this.el.content.firstChild;b.replaceWith(...b.childNodes)}for(;(n=Tr.nextNode())!==null&&c.length<d;){if(n.nodeType===1){if(n.hasAttributes())for(const b of n.getAttributeNames())if(b.endsWith($p)){const w=v[s++],_=n.getAttribute(b).split(lr),C=/([.?@])?(.*)/.exec(w);c.push({type:1,index:i,name:C[2],strings:_,ctor:C[1]==="."?_u:C[1]==="?"?wu:C[1]==="@"?$u:Ai}),n.removeAttribute(b)}else b.startsWith(lr)&&(c.push({type:6,index:i}),n.removeAttribute(b));if(Cp.test(n.tagName)){const b=n.textContent.split(lr),w=b.length-1;if(w>0){n.textContent=ei?ei.emptyScript:"";for(let _=0;_<w;_++)n.append(b[_],po()),Tr.nextNode(),c.push({type:2,index:++i});n.append(b[w],po())}}}else if(n.nodeType===8)if(n.data===Pp)c.push({type:2,index:i});else{let b=-1;for(;(b=n.data.indexOf(lr,b+1))!==-1;)c.push({type:7,index:i}),b+=lr.length-1}i++}}static createElement(t,r){const o=Fr.createElement("template");return o.innerHTML=t,o}}function _n(e,t,r=e,o){var s,d;if(t===hr)return t;let n=o!==void 0?(s=r._$Co)==null?void 0:s[o]:r._$Cl;const i=ho(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==i&&((d=n==null?void 0:n._$AO)==null||d.call(n,!1),i===void 0?n=void 0:(n=new i(e),n._$AT(e,r,o)),o!==void 0?(r._$Co??(r._$Co=[]))[o]=n:r._$Cl=n),n!==void 0&&(t=_n(e,n._$AS(e,t.values),n,o)),t}class yu{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:r},parts:o}=this._$AD,n=((t==null?void 0:t.creationScope)??Fr).importNode(r,!0);Tr.currentNode=n;let i=Tr.nextNode(),s=0,d=0,c=o[0];for(;c!==void 0;){if(s===c.index){let m;c.type===2?m=new Po(i,i.nextSibling,this,t):c.type===1?m=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(m=new Pu(i,this,t)),this._$AV.push(m),c=o[++d]}s!==(c==null?void 0:c.index)&&(i=Tr.nextNode(),s++)}return Tr.currentNode=Fr,n}p(t){let r=0;for(const o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,r),r+=o.strings.length-2):o._$AI(t[r])),r++}}class Po{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,r,o,n){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=o,this.options=n,this._$Cv=(n==null?void 0:n.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=_n(this,t,r),ho(t)?t===h||t==null||t===""?(this._$AH!==h&&this._$AR(),this._$AH=h):t!==this._$AH&&t!==hr&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):vu(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==h&&ho(this._$AH)?this._$AA.nextSibling.data=t:this.T(Fr.createTextNode(t)),this._$AH=t}$(t){var i;const{values:r,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=uo.createElement(Ep(o.h,o.h[0]),this.options)),o);if(((i=this._$AH)==null?void 0:i._$AD)===n)this._$AH.p(r);else{const s=new yu(n,this),d=s.u(this.options);s.p(r),this.T(d),this._$AH=s}}_$AC(t){let r=Kl.get(t.strings);return r===void 0&&Kl.set(t.strings,r=new uo(t)),r}k(t){qa(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let o,n=0;for(const i of t)n===r.length?r.push(o=new Po(this.O(po()),this.O(po()),this,this.options)):o=r[n],o._$AI(i),n++;n<r.length&&(this._$AR(o&&o._$AB.nextSibling,n),r.length=n)}_$AR(t=this._$AA.nextSibling,r){var o;for((o=this._$AP)==null?void 0:o.call(this,!1,!0,r);t!==this._$AB;){const n=jl(t).nextSibling;jl(t).remove(),t=n}}setConnected(t){var r;this._$AM===void 0&&(this._$Cv=t,(r=this._$AP)==null||r.call(this,t))}}class Ai{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,o,n,i){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=r,this._$AM=n,this.options=i,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=h}_$AI(t,r=this,o,n){const i=this.strings;let s=!1;if(i===void 0)t=_n(this,t,r,0),s=!ho(t)||t!==this._$AH&&t!==hr,s&&(this._$AH=t);else{const d=t;let c,m;for(t=i[0],c=0;c<i.length-1;c++)m=_n(this,d[o+c],r,c),m===hr&&(m=this._$AH[c]),s||(s=!ho(m)||m!==this._$AH[c]),m===h?t=h:t!==h&&(t+=(m??"")+i[c+1]),this._$AH[c]=m}s&&!n&&this.j(t)}j(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class _u extends Ai{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===h?void 0:t}}class wu extends Ai{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==h)}}class $u extends Ai{constructor(t,r,o,n,i){super(t,r,o,n,i),this.type=5}_$AI(t,r=this){if((t=_n(this,t,r,0)??h)===hr)return;const o=this._$AH,n=t===h&&o!==h||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,i=t!==h&&(o===h||n);n&&this.element.removeEventListener(this.name,this,o),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var r;typeof this._$AH=="function"?this._$AH.call(((r=this.options)==null?void 0:r.host)??this.element,t):this._$AH.handleEvent(t)}}class Pu{constructor(t,r,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){_n(this,t)}}const ds=so.litHtmlPolyfillSupport;ds==null||ds(uo,Po),(so.litHtmlVersions??(so.litHtmlVersions=[])).push("3.3.3");const Cu=(e,t,r)=>{const o=(r==null?void 0:r.renderBefore)??t;let n=o._$litPart$;if(n===void 0){const i=(r==null?void 0:r.renderBefore)??null;o._$litPart$=n=new Po(t.insertBefore(po(),i),i,void 0,r??{})}return n._$AI(e),n};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */const Dr=globalThis;let f=class extends bn{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;const t=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=t.firstChild),t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Cu(r,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return pr}};var yp;f._$litElement$=!0,f.finalized=!0,(yp=Dr.litElementHydrateSupport)==null||yp.call(Dr,{LitElement:f});const cs=Dr.litElementPolyfillSupport;cs==null||cs({LitElement:f});(Dr.litElementVersions??(Dr.litElementVersions=[])).push("4.2.2");/**
19
+ */const Dr=globalThis;let f=class extends bn{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;const t=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=t.firstChild),t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Cu(r,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return hr}};var yp;f._$litElement$=!0,f.finalized=!0,(yp=Dr.litElementHydrateSupport)==null||yp.call(Dr,{LitElement:f});const cs=Dr.litElementPolyfillSupport;cs==null||cs({LitElement:f});(Dr.litElementVersions??(Dr.litElementVersions=[])).push("4.2.2");/**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
@@ -45,7 +45,7 @@
45
45
  .wrapper {
46
46
  display: block;
47
47
  }
48
- `;let zs=Dl;customElements.define("pont-shadow-wrapper",zs);function Op(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=Op(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Va(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Op(e))&&(o&&(o+=" "),o+=t);return o}const Ha="-",Iu=e=>{const t=Tu(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{const d=s.split(Ha);return d[0]===""&&d.length!==1&&d.shift(),Rp(d,t)||Au(s)},getConflictingClassGroupIds:(s,d)=>{const c=r[s]||[];return d&&o[s]?[...c,...o[s]]:c}}},Rp=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?Rp(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;const i=e.join(Ha);return(s=t.validators.find(({validator:d})=>d(i)))==null?void 0:s.classGroupId},Wl=/^\[(.+)\]$/,Au=e=>{if(Wl.test(e)){const t=Wl.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Tu=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Lu(Object.entries(e.classGroups),r).forEach(([i,s])=>{Vs(s,o,i,t)}),o},Vs=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){const i=n===""?t:Yl(t,n);i.classGroupId=r;return}if(typeof n=="function"){if(Du(n)){Vs(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([i,s])=>{Vs(s,Yl(t,i),r,o)})})},Yl=(e,t)=>{let r=e;return t.split(Ha).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Du=e=>e.isThemeGetter,Lu=(e,t)=>t?e.map(([r,o])=>{const n=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,d])=>[t+s,d])):i);return[r,n]}):e,Fu=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const n=(i,s)=>{r.set(i,s),t++,t>e&&(t=0,o=r,r=new Map)};return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=o.get(i))!==void 0)return n(i,s),s},set(i,s){r.has(i)?r.set(i,s):n(i,s)}}},Ip="!",ku=e=>{const{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],i=t.length,s=d=>{const c=[];let m=0,v=0,b;for(let O=0;O<d.length;O++){let E=d[O];if(m===0){if(E===n&&(o||d.slice(O,O+i)===t)){c.push(d.slice(v,O)),v=O+i;continue}if(E==="/"){b=O;continue}}E==="["?m++:E==="]"&&m--}const w=c.length===0?d:d.substring(v),_=w.startsWith(Ip),C=_?w.substring(1):w,P=b&&b>v?b-v:void 0;return{modifiers:c,hasImportantModifier:_,baseClassName:C,maybePostfixModifierPosition:P}};return r?d=>r({className:d,parseClassName:s}):s},Nu=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Mu=e=>({cache:Fu(e.cacheSize),parseClassName:ku(e),...Iu(e)}),Bu=/\s+/,Uu=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,i=[],s=e.trim().split(Bu);let d="";for(let c=s.length-1;c>=0;c-=1){const m=s[c],{modifiers:v,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:_}=r(m);let C=!!_,P=o(C?w.substring(0,_):w);if(!P){if(!C){d=m+(d.length>0?" "+d:d);continue}if(P=o(w),!P){d=m+(d.length>0?" "+d:d);continue}C=!1}const O=Nu(v).join(":"),E=b?O+Ip:O,D=E+P;if(i.includes(D))continue;i.push(D);const L=n(P,C);for(let I=0;I<L.length;++I){const Q=L[I];i.push(E+Q)}d=m+(d.length>0?" "+d:d)}return d};function ju(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ap(t))&&(o&&(o+=" "),o+=r);return o}const Ap=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Ap(e[o]))&&(r&&(r+=" "),r+=t);return r};function qu(e,...t){let r,o,n,i=s;function s(c){const m=t.reduce((v,b)=>b(v),e());return r=Mu(m),o=r.cache.get,n=r.cache.set,i=d,d(c)}function d(c){const m=o(c);if(m)return m;const v=Uu(c,r);return n(c,v),v}return function(){return i(ju.apply(null,arguments))}}const Z=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Tp=/^\[(?:([a-z-]+):)?(.+)\]$/i,zu=/^\d+\/\d+$/,Vu=new Set(["px","full","screen"]),Hu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Gu=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ku=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Wu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ve=e=>yn(e)||Vu.has(e)||zu.test(e),nr=e=>In(e,"length",nm),yn=e=>!!e&&!Number.isNaN(Number(e)),ps=e=>In(e,"number",yn),Jn=e=>!!e&&Number.isInteger(Number(e)),Qu=e=>e.endsWith("%")&&yn(e.slice(0,-1)),B=e=>Tp.test(e),or=e=>Hu.test(e),Zu=new Set(["length","size","percentage"]),Ju=e=>In(e,Zu,Dp),Xu=e=>In(e,"position",Dp),tm=new Set(["image","url"]),em=e=>In(e,tm,im),rm=e=>In(e,"",om),Xn=()=>!0,In=(e,t,r)=>{const o=Tp.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},nm=e=>Gu.test(e)&&!Ku.test(e),Dp=()=>!1,om=e=>Wu.test(e),im=e=>Yu.test(e),sm=()=>{const e=Z("colors"),t=Z("spacing"),r=Z("blur"),o=Z("brightness"),n=Z("borderColor"),i=Z("borderRadius"),s=Z("borderSpacing"),d=Z("borderWidth"),c=Z("contrast"),m=Z("grayscale"),v=Z("hueRotate"),b=Z("invert"),w=Z("gap"),_=Z("gradientColorStops"),C=Z("gradientColorStopPositions"),P=Z("inset"),O=Z("margin"),E=Z("opacity"),D=Z("padding"),L=Z("saturate"),I=Z("scale"),Q=Z("sepia"),R=Z("skew"),A=Z("space"),T=Z("translate"),x=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",B,t],$=()=>[B,t],k=()=>["",Ve,nr],M=()=>["auto",yn,B],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],me=()=>["solid","dashed","dotted","double","none"],jo=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],an=()=>["start","end","center","between","around","evenly","stretch"],xr=()=>["","0",B],ln=()=>["auto","avoid","all","avoid-page","page","left","right","column"],It=()=>[yn,B];return{cacheSize:500,separator:":",theme:{colors:[Xn],spacing:[Ve,nr],blur:["none","",or,B],brightness:It(),borderColor:[e],borderRadius:["none","","full",or,B],borderSpacing:$(),borderWidth:k(),contrast:It(),grayscale:xr(),hueRotate:It(),invert:xr(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[Qu,nr],inset:F(),margin:F(),opacity:It(),padding:$(),saturate:It(),scale:It(),sepia:xr(),skew:It(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",B]}],container:["container"],columns:[{columns:[or]}],"break-after":[{"break-after":ln()}],"break-before":[{"break-before":ln()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...te(),B]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:x()}],"overscroll-x":[{"overscroll-x":x()}],"overscroll-y":[{"overscroll-y":x()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Jn,B]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",B]}],grow:[{grow:xr()}],shrink:[{shrink:xr()}],order:[{order:["first","last","none",Jn,B]}],"grid-cols":[{"grid-cols":[Xn]}],"col-start-end":[{col:["auto",{span:["full",Jn,B]},B]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[Xn]}],"row-start-end":[{row:["auto",{span:[Jn,B]},B]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",B]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",B]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...an()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...an(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...an(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[D]}],px:[{px:[D]}],py:[{py:[D]}],ps:[{ps:[D]}],pe:[{pe:[D]}],pt:[{pt:[D]}],pr:[{pr:[D]}],pb:[{pb:[D]}],pl:[{pl:[D]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",B,t]}],"min-w":[{"min-w":[B,t,"min","max","fit"]}],"max-w":[{"max-w":[B,t,"none","full","min","max","fit","prose",{screen:[or]},or]}],h:[{h:[B,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[B,t,"auto","min","max","fit"]}],"font-size":[{text:["base",or,nr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ps]}],"font-family":[{font:[Xn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",B]}],"line-clamp":[{"line-clamp":["none",yn,ps]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ve,B]}],"list-image":[{"list-image":["none",B]}],"list-style-type":[{list:["none","disc","decimal",B]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ve,nr]}],"underline-offset":[{"underline-offset":["auto",Ve,B]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),Xu]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ju]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},em]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[_]}],"gradient-via":[{via:[_]}],"gradient-to":[{to:[_]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...me(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:me()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...me()]}],"outline-offset":[{"outline-offset":[Ve,B]}],"outline-w":[{outline:[Ve,nr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Ve,nr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",or,rm]}],"shadow-color":[{shadow:[Xn]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...jo(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":jo()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",or,B]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[b]}],saturate:[{saturate:[L]}],sepia:[{sepia:[Q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[L]}],"backdrop-sepia":[{"backdrop-sepia":[Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",B]}],duration:[{duration:It()}],ease:[{ease:["linear","in","out","in-out",B]}],delay:[{delay:It()}],animate:[{animate:["none","spin","ping","pulse","bounce",B]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Jn,B]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",B]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ve,nr,ps]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Lp=qu(sm);function u(...e){return Lp(Va(e))}/**
48
+ `;let zs=Dl;customElements.define("pont-shadow-wrapper",zs);function Op(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=Op(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Va(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Op(e))&&(o&&(o+=" "),o+=t);return o}const Ha="-",Iu=e=>{const t=Tu(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{const d=s.split(Ha);return d[0]===""&&d.length!==1&&d.shift(),Rp(d,t)||Au(s)},getConflictingClassGroupIds:(s,d)=>{const c=r[s]||[];return d&&o[s]?[...c,...o[s]]:c}}},Rp=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?Rp(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;const i=e.join(Ha);return(s=t.validators.find(({validator:d})=>d(i)))==null?void 0:s.classGroupId},Wl=/^\[(.+)\]$/,Au=e=>{if(Wl.test(e)){const t=Wl.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Tu=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Lu(Object.entries(e.classGroups),r).forEach(([i,s])=>{Vs(s,o,i,t)}),o},Vs=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){const i=n===""?t:Yl(t,n);i.classGroupId=r;return}if(typeof n=="function"){if(Du(n)){Vs(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([i,s])=>{Vs(s,Yl(t,i),r,o)})})},Yl=(e,t)=>{let r=e;return t.split(Ha).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Du=e=>e.isThemeGetter,Lu=(e,t)=>t?e.map(([r,o])=>{const n=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,d])=>[t+s,d])):i);return[r,n]}):e,Fu=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const n=(i,s)=>{r.set(i,s),t++,t>e&&(t=0,o=r,r=new Map)};return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=o.get(i))!==void 0)return n(i,s),s},set(i,s){r.has(i)?r.set(i,s):n(i,s)}}},Ip="!",ku=e=>{const{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],i=t.length,s=d=>{const c=[];let m=0,v=0,b;for(let O=0;O<d.length;O++){let E=d[O];if(m===0){if(E===n&&(o||d.slice(O,O+i)===t)){c.push(d.slice(v,O)),v=O+i;continue}if(E==="/"){b=O;continue}}E==="["?m++:E==="]"&&m--}const w=c.length===0?d:d.substring(v),_=w.startsWith(Ip),C=_?w.substring(1):w,P=b&&b>v?b-v:void 0;return{modifiers:c,hasImportantModifier:_,baseClassName:C,maybePostfixModifierPosition:P}};return r?d=>r({className:d,parseClassName:s}):s},Nu=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Mu=e=>({cache:Fu(e.cacheSize),parseClassName:ku(e),...Iu(e)}),Bu=/\s+/,Uu=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,i=[],s=e.trim().split(Bu);let d="";for(let c=s.length-1;c>=0;c-=1){const m=s[c],{modifiers:v,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:_}=r(m);let C=!!_,P=o(C?w.substring(0,_):w);if(!P){if(!C){d=m+(d.length>0?" "+d:d);continue}if(P=o(w),!P){d=m+(d.length>0?" "+d:d);continue}C=!1}const O=Nu(v).join(":"),E=b?O+Ip:O,D=E+P;if(i.includes(D))continue;i.push(D);const L=n(P,C);for(let I=0;I<L.length;++I){const Q=L[I];i.push(E+Q)}d=m+(d.length>0?" "+d:d)}return d};function ju(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ap(t))&&(o&&(o+=" "),o+=r);return o}const Ap=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Ap(e[o]))&&(r&&(r+=" "),r+=t);return r};function qu(e,...t){let r,o,n,i=s;function s(c){const m=t.reduce((v,b)=>b(v),e());return r=Mu(m),o=r.cache.get,n=r.cache.set,i=d,d(c)}function d(c){const m=o(c);if(m)return m;const v=Uu(c,r);return n(c,v),v}return function(){return i(ju.apply(null,arguments))}}const Z=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Tp=/^\[(?:([a-z-]+):)?(.+)\]$/i,zu=/^\d+\/\d+$/,Vu=new Set(["px","full","screen"]),Hu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Gu=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ku=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Wu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ve=e=>yn(e)||Vu.has(e)||zu.test(e),or=e=>In(e,"length",nm),yn=e=>!!e&&!Number.isNaN(Number(e)),ps=e=>In(e,"number",yn),Jn=e=>!!e&&Number.isInteger(Number(e)),Qu=e=>e.endsWith("%")&&yn(e.slice(0,-1)),B=e=>Tp.test(e),ir=e=>Hu.test(e),Zu=new Set(["length","size","percentage"]),Ju=e=>In(e,Zu,Dp),Xu=e=>In(e,"position",Dp),tm=new Set(["image","url"]),em=e=>In(e,tm,im),rm=e=>In(e,"",om),Xn=()=>!0,In=(e,t,r)=>{const o=Tp.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},nm=e=>Gu.test(e)&&!Ku.test(e),Dp=()=>!1,om=e=>Wu.test(e),im=e=>Yu.test(e),sm=()=>{const e=Z("colors"),t=Z("spacing"),r=Z("blur"),o=Z("brightness"),n=Z("borderColor"),i=Z("borderRadius"),s=Z("borderSpacing"),d=Z("borderWidth"),c=Z("contrast"),m=Z("grayscale"),v=Z("hueRotate"),b=Z("invert"),w=Z("gap"),_=Z("gradientColorStops"),C=Z("gradientColorStopPositions"),P=Z("inset"),O=Z("margin"),E=Z("opacity"),D=Z("padding"),L=Z("saturate"),I=Z("scale"),Q=Z("sepia"),R=Z("skew"),A=Z("space"),T=Z("translate"),x=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",B,t],$=()=>[B,t],k=()=>["",Ve,or],M=()=>["auto",yn,B],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],me=()=>["solid","dashed","dotted","double","none"],jo=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],an=()=>["start","end","center","between","around","evenly","stretch"],xr=()=>["","0",B],ln=()=>["auto","avoid","all","avoid-page","page","left","right","column"],It=()=>[yn,B];return{cacheSize:500,separator:":",theme:{colors:[Xn],spacing:[Ve,or],blur:["none","",ir,B],brightness:It(),borderColor:[e],borderRadius:["none","","full",ir,B],borderSpacing:$(),borderWidth:k(),contrast:It(),grayscale:xr(),hueRotate:It(),invert:xr(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[Qu,or],inset:F(),margin:F(),opacity:It(),padding:$(),saturate:It(),scale:It(),sepia:xr(),skew:It(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",B]}],container:["container"],columns:[{columns:[ir]}],"break-after":[{"break-after":ln()}],"break-before":[{"break-before":ln()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...te(),B]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:x()}],"overscroll-x":[{"overscroll-x":x()}],"overscroll-y":[{"overscroll-y":x()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Jn,B]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",B]}],grow:[{grow:xr()}],shrink:[{shrink:xr()}],order:[{order:["first","last","none",Jn,B]}],"grid-cols":[{"grid-cols":[Xn]}],"col-start-end":[{col:["auto",{span:["full",Jn,B]},B]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[Xn]}],"row-start-end":[{row:["auto",{span:[Jn,B]},B]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",B]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",B]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...an()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...an(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...an(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[D]}],px:[{px:[D]}],py:[{py:[D]}],ps:[{ps:[D]}],pe:[{pe:[D]}],pt:[{pt:[D]}],pr:[{pr:[D]}],pb:[{pb:[D]}],pl:[{pl:[D]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",B,t]}],"min-w":[{"min-w":[B,t,"min","max","fit"]}],"max-w":[{"max-w":[B,t,"none","full","min","max","fit","prose",{screen:[ir]},ir]}],h:[{h:[B,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[B,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ir,or]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ps]}],"font-family":[{font:[Xn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",B]}],"line-clamp":[{"line-clamp":["none",yn,ps]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ve,B]}],"list-image":[{"list-image":["none",B]}],"list-style-type":[{list:["none","disc","decimal",B]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ve,or]}],"underline-offset":[{"underline-offset":["auto",Ve,B]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),Xu]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ju]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},em]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[_]}],"gradient-via":[{via:[_]}],"gradient-to":[{to:[_]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...me(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:me()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...me()]}],"outline-offset":[{"outline-offset":[Ve,B]}],"outline-w":[{outline:[Ve,or]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Ve,or]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ir,rm]}],"shadow-color":[{shadow:[Xn]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...jo(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":jo()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ir,B]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[b]}],saturate:[{saturate:[L]}],sepia:[{sepia:[Q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[L]}],"backdrop-sepia":[{"backdrop-sepia":[Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",B]}],duration:[{duration:It()}],ease:[{ease:["linear","in","out","in-out",B]}],delay:[{delay:It()}],animate:[{animate:["none","spin","ping","pulse","bounce",B]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Jn,B]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",B]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ve,or,ps]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Lp=qu(sm);function u(...e){return Lp(Va(e))}/**
49
49
  * @license
50
50
  * Copyright 2017 Google LLC
51
51
  * SPDX-License-Identifier: BSD-3-Clause
@@ -61,7 +61,7 @@
61
61
  * @license
62
62
  * Copyright 2017 Google LLC
63
63
  * SPDX-License-Identifier: BSD-3-Clause
64
- */let ni=class extends Ti{constructor(t){if(super(t),this.it=h,t.type!==Ga.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===h||t==null)return this._t=void 0,this.it=t;if(t===pr)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const r=[t];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};ni.directiveName="unsafeHTML",ni.resultType=1;const Np=An(ni),mo={base:[""],item:["pont-border-b-accordion-item-width-border pont-border-b-accordion-item-color-border"],trigger:["pont-flex pont-flex-1 pont-gap-accordion-trigger-space-gap pont-justify-between pont-items-start","pont-py-accordion-trigger-space-py","pont-w-accordion-trigger-space-w","pont-rounded-accordion-trigger-radius pont-outline-none","pont-text-accordion-trigger-font pont-font-accordion-trigger-font-weight pont-text-left","pont-transition-all","hover:pont-underline","focus-visible:pont-border-accordion-trigger-width-border-focus focus-visible:pont-border-accordion-trigger-color-border-focus","focus-visible:pont-ring-accordion-trigger-width-ring-focus focus-visible:pont-ring-accordion-trigger-color-ring-focus","disabled:pont-pointer-events-none disabled:pont-opacity-50","[&[data-state=open]>svg]:pont-rotate-180"],chevron:["pont-shrink-0","pont-size-accordion-trigger-icon-space-size","pont-text-accordion-trigger-icon-color-text","pont-translate-y-0.5 pont-transition-transform pont-duration-200","pont-pointer-events-none"],content:["pont-overflow-hidden","pont-text-accordion-content-font pont-font-accordion-content-font-weight","data-[state=closed]:pont-h-accordion-content-space-h-closed","data-[state=closed]:pont-animate-accordion-content-animate-closed","data-[state=open]:pont-animate-accordion-content-animate-open","data-[state=open]:pont-h-fit","[&>div]:pont-pt-accordion-content-div-space-pt [&>div]:pont-pb-accordion-content-div-space-pb"]};var fm=Object.getOwnPropertyDescriptor,vm=(e,t,r,o)=>{for(var n=o>1?void 0:o?fm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Hs=class extends y{constructor(){super(...arguments),this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof wn);)e=e.parentElement;return e}get _item(){let e=this.parentElement;for(;e&&!(e instanceof be);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var t;const e=this.hasActiveState();return l`
64
+ */let ni=class extends Ti{constructor(t){if(super(t),this.it=h,t.type!==Ga.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===h||t==null)return this._t=void 0,this.it=t;if(t===hr)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const r=[t];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};ni.directiveName="unsafeHTML",ni.resultType=1;const Np=An(ni),mo={base:[""],item:["pont-border-b-accordion-item-width-border pont-border-b-accordion-item-color-border"],trigger:["pont-flex pont-flex-1 pont-gap-accordion-trigger-space-gap pont-justify-between pont-items-start","pont-py-accordion-trigger-space-py","pont-w-accordion-trigger-space-w","pont-rounded-accordion-trigger-radius pont-outline-none","pont-text-accordion-trigger-font pont-font-accordion-trigger-font-weight pont-text-left","pont-transition-all","hover:pont-underline","focus-visible:pont-border-accordion-trigger-width-border-focus focus-visible:pont-border-accordion-trigger-color-border-focus","focus-visible:pont-ring-accordion-trigger-width-ring-focus focus-visible:pont-ring-accordion-trigger-color-ring-focus","disabled:pont-pointer-events-none disabled:pont-opacity-50","[&[data-state=open]>svg]:pont-rotate-180"],chevron:["pont-shrink-0","pont-size-accordion-trigger-icon-space-size","pont-text-accordion-trigger-icon-color-text","pont-translate-y-0.5 pont-transition-transform pont-duration-200","pont-pointer-events-none"],content:["pont-overflow-hidden","pont-text-accordion-content-font pont-font-accordion-content-font-weight","data-[state=closed]:pont-h-accordion-content-space-h-closed","data-[state=closed]:pont-animate-accordion-content-animate-closed","data-[state=open]:pont-animate-accordion-content-animate-open","data-[state=open]:pont-h-fit","[&>div]:pont-pt-accordion-content-div-space-pt [&>div]:pont-pb-accordion-content-div-space-pb"]};var fm=Object.getOwnPropertyDescriptor,vm=(e,t,r,o)=>{for(var n=o>1?void 0:o?fm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Hs=class extends y{constructor(){super(...arguments),this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof wn);)e=e.parentElement;return e}get _item(){let e=this.parentElement;for(;e&&!(e instanceof be);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var t;const e=this.hasActiveState();return l`
65
65
  <div
66
66
  part="accordion-content"
67
67
  role="region"
@@ -721,7 +721,7 @@
721
721
  role="presentation"
722
722
  class=${u($e.empty,this._hidden==="true"&&"pont-hidden",this.className)}
723
723
  ></div>
724
- `}};Mr._counter=0;Ja([a({type:String})],Mr.prototype,"_id",2);Ja([a({attribute:"aria-hidden",type:String})],Mr.prototype,"_hidden",2);Mr=Ja([p("pont-command-empty")],Mr);var uf=Object.defineProperty,mf=Object.getOwnPropertyDescriptor,Li=(e,t,r,o)=>{for(var n=o>1?void 0:o?mf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&uf(t,r,n),n};let hr=class extends y{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get itemsContainerElement(){return this.querySelector(`#${this.identifier}g`)}get identifier(){if(this._id!=="")return this._id;const e=this.parentElement;return e?this._id=`${e.getAttribute("id")}g${hr._counter++}`:this._id=`rtgcmdrxlxg${hr._counter++}`,this._id}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){const t=this.itemsContainerElement;if(t){for(;t.firstChild;)t.removeChild(t.firstChild);this.moveLightDomChildrenInto(t)}}render(){return l`
724
+ `}};Mr._counter=0;Ja([a({type:String})],Mr.prototype,"_id",2);Ja([a({attribute:"aria-hidden",type:String})],Mr.prototype,"_hidden",2);Mr=Ja([p("pont-command-empty")],Mr);var uf=Object.defineProperty,mf=Object.getOwnPropertyDescriptor,Li=(e,t,r,o)=>{for(var n=o>1?void 0:o?mf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&uf(t,r,n),n};let ur=class extends y{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get itemsContainerElement(){return this.querySelector(`#${this.identifier}g`)}get identifier(){if(this._id!=="")return this._id;const e=this.parentElement;return e?this._id=`${e.getAttribute("id")}g${ur._counter++}`:this._id=`rtgcmdrxlxg${ur._counter++}`,this._id}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){const t=this.itemsContainerElement;if(t){for(;t.firstChild;)t.removeChild(t.firstChild);this.moveLightDomChildrenInto(t)}}render(){return l`
725
725
  <div
726
726
  rtgcmd-group
727
727
  id="${this.identifier}"
@@ -744,7 +744,7 @@
744
744
  aria-labelledby="${this.identifier}h"
745
745
  ></div>
746
746
  </div>
747
- `}};hr._counter=0;Li([a({type:String})],hr.prototype,"heading",2);Li([a({attribute:"id",type:String})],hr.prototype,"_id",2);Li([a({attribute:"aria-hidden",type:String})],hr.prototype,"_hidden",2);hr=Li([p("pont-command-group")],hr);var gf=Object.defineProperty,ff=Object.getOwnPropertyDescriptor,Xa=(e,t,r,o)=>{for(var n=o>1?void 0:o?ff(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&gf(t,r,n),n};let li=class extends f{constructor(){super(...arguments),this.placeholder="Type a command or search...",this._value=""}get identifier(){const e=this.parentElement;return e?`${e.getAttribute("id")}i`:"rtgcmdrxi"}filterItems(){const e=this.parentElement;if(e){let t=!0;const r=e.querySelectorAll("pont-command-group");r&&r.forEach(n=>{var c,m;let i=!0;const s=n.querySelectorAll("pont-command-item");s&&s.forEach(v=>{(v.value||"").toLowerCase().includes(this._value.toLowerCase())?(i=!1,t=!1,v._hidden="false"):v._hidden="true"}),n._hidden=i?"true":"false";let d=n.previousElementSibling;d&&(d._hidden=i||((c=d.previousElementSibling)==null?void 0:c.getAttribute("aria-hidden"))==="true"?"true":"false"),d=n.nextElementSibling,d&&(d._hidden=i||((m=d.nextElementSibling)==null?void 0:m.getAttribute("aria-hidden"))==="true"?"true":"false")});const o=e.querySelector("pont-command-empty");o&&o.setAttribute("aria-hidden",t?"false":"true")}}handleChange(e){const t=e.target;t&&(this._value=t.value,this.filterItems())}createRenderRoot(){return this}render(){return l`
747
+ `}};ur._counter=0;Li([a({type:String})],ur.prototype,"heading",2);Li([a({attribute:"id",type:String})],ur.prototype,"_id",2);Li([a({attribute:"aria-hidden",type:String})],ur.prototype,"_hidden",2);ur=Li([p("pont-command-group")],ur);var gf=Object.defineProperty,ff=Object.getOwnPropertyDescriptor,Xa=(e,t,r,o)=>{for(var n=o>1?void 0:o?ff(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&gf(t,r,n),n};let li=class extends f{constructor(){super(...arguments),this.placeholder="Type a command or search...",this._value=""}get identifier(){const e=this.parentElement;return e?`${e.getAttribute("id")}i`:"rtgcmdrxi"}filterItems(){const e=this.parentElement;if(e){let t=!0;const r=e.querySelectorAll("pont-command-group");r&&r.forEach(n=>{var c,m;let i=!0;const s=n.querySelectorAll("pont-command-item");s&&s.forEach(v=>{(v.value||"").toLowerCase().includes(this._value.toLowerCase())?(i=!1,t=!1,v._hidden="false"):v._hidden="true"}),n._hidden=i?"true":"false";let d=n.previousElementSibling;d&&(d._hidden=i||((c=d.previousElementSibling)==null?void 0:c.getAttribute("aria-hidden"))==="true"?"true":"false"),d=n.nextElementSibling,d&&(d._hidden=i||((m=d.nextElementSibling)==null?void 0:m.getAttribute("aria-hidden"))==="true"?"true":"false")});const o=e.querySelector("pont-command-empty");o&&o.setAttribute("aria-hidden",t?"false":"true")}}handleChange(e){const t=e.target;t&&(this._value=t.value,this.filterItems())}createRenderRoot(){return this}render(){return l`
748
748
  <div
749
749
  part="command-input"
750
750
  class=${u($e.input.wrapper,this.className)}
@@ -1216,7 +1216,7 @@
1216
1216
  @click="${this.handleClickDefault}"
1217
1217
  class=${u(Tt.item,this.className)}
1218
1218
  ></div>
1219
- `}`}};Bn([a({type:String})],zr.prototype,"_id",2);Bn([a({attribute:"aria-hidden",type:String})],zr.prototype,"_hidden",2);Bn([a({attribute:"data-value",type:String})],zr.prototype,"value",1);Bn([a({type:Boolean})],zr.prototype,"selected",2);Bn([a({attribute:"data-disabled",type:Boolean})],zr.prototype,"disabled",2);zr=Bn([p("pont-dropdown-menu-item")],zr);var jv=Object.defineProperty,qv=Object.getOwnPropertyDescriptor,Yr=(e,t,r,o)=>{for(var n=o>1?void 0:o?qv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&jv(t,r,n),n};let ur=class extends y{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=dropdown-menu-radio-item-container]")}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
1219
+ `}`}};Bn([a({type:String})],zr.prototype,"_id",2);Bn([a({attribute:"aria-hidden",type:String})],zr.prototype,"_hidden",2);Bn([a({attribute:"data-value",type:String})],zr.prototype,"value",1);Bn([a({type:Boolean})],zr.prototype,"selected",2);Bn([a({attribute:"data-disabled",type:Boolean})],zr.prototype,"disabled",2);zr=Bn([p("pont-dropdown-menu-item")],zr);var jv=Object.defineProperty,qv=Object.getOwnPropertyDescriptor,Yr=(e,t,r,o)=>{for(var n=o>1?void 0:o?qv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&jv(t,r,n),n};let mr=class extends y{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=dropdown-menu-radio-item-container]")}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
1220
1220
  <div
1221
1221
  rtgcmd-item
1222
1222
  part="dropdown-menu-radio"
@@ -1251,7 +1251,7 @@
1251
1251
  </span>
1252
1252
  <div part="dropdown-menu-radio-item-container"></div>
1253
1253
  </div>
1254
- `}};Yr([a({type:String})],ur.prototype,"_id",2);Yr([a({attribute:"aria-hidden",type:String})],ur.prototype,"_hidden",2);Yr([a({attribute:"data-value",type:String})],ur.prototype,"value",1);Yr([a({type:Boolean})],ur.prototype,"selected",2);Yr([a({type:Boolean})],ur.prototype,"checked",2);Yr([a({attribute:"data-disabled",type:Boolean})],ur.prototype,"disabled",2);ur=Yr([p("pont-dropdown-menu-radio-item")],ur);var zv=Object.getOwnPropertyDescriptor,Vv=(e,t,r,o)=>{for(var n=o>1?void 0:o?zv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let kd=class extends y{get _containerElement(){return this.querySelector("div[part=dropdown-menu-seperator]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`<div
1254
+ `}};Yr([a({type:String})],mr.prototype,"_id",2);Yr([a({attribute:"aria-hidden",type:String})],mr.prototype,"_hidden",2);Yr([a({attribute:"data-value",type:String})],mr.prototype,"value",1);Yr([a({type:Boolean})],mr.prototype,"selected",2);Yr([a({type:Boolean})],mr.prototype,"checked",2);Yr([a({attribute:"data-disabled",type:Boolean})],mr.prototype,"disabled",2);mr=Yr([p("pont-dropdown-menu-radio-item")],mr);var zv=Object.getOwnPropertyDescriptor,Vv=(e,t,r,o)=>{for(var n=o>1?void 0:o?zv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let kd=class extends y{get _containerElement(){return this.querySelector("div[part=dropdown-menu-seperator]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`<div
1255
1255
  rtgcmd-separator
1256
1256
  part="dropdown-menu-seperator"
1257
1257
  role="separator"
@@ -1598,7 +1598,7 @@
1598
1598
  `:h}
1599
1599
  </span>
1600
1600
  </div>
1601
- `}};ie._counter=0;Qr([a({type:String})],ie.prototype,"_id",2);Qr([a({attribute:"aria-hidden",type:String})],ie.prototype,"_hidden",2);Qr([a({attribute:"data-value",type:String})],ie.prototype,"value",1);Qr([a({type:Boolean})],ie.prototype,"selected",2);Qr([a({type:Boolean})],ie.prototype,"checked",2);Qr([a({type:Boolean})],ie.prototype,"disabled",2);ie=Qr([p("pont-menubar-checkbox-item")],ie);var o_=Object.defineProperty,i_=Object.getOwnPropertyDescriptor,jn=(e,t,r,o)=>{for(var n=o>1?void 0:o?i_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&o_(t,r,n),n};let mr=class extends y{constructor(){super(...arguments),this.isOpen=!1,this.uniqueIds=[],this.selectedMenu="",this.isHovering=!1,this.id="",this.closeTimeout=null,this.toggleMenubar=e=>{e.stopPropagation(),document.querySelectorAll("pont-menubar-menu").forEach(r=>{r!==this&&(r.isOpen=!1)}),this.isOpen=!this.isOpen},this.handleClickOutside=e=>{const t=e.target;this.contains(t)||(this.isOpen=!1)},this.handleMenuMouseEnter=()=>{this.clearCloseTimeout(),this.closeAllMenus(),this.isOpen=!0,this.isHovering=!0},this.handleMenuMouseLeave=e=>{const t=e.relatedTarget;if(this.isDescendant(t,"pont-menubar-content")){this.clearCloseTimeout();return}this.scheduleClose()}}get _content(){return this.querySelector("pont-menubar-content")}get _button(){return this.querySelector("pont-menubar-trigger")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),this.clearCloseTimeout(),super.disconnectedCallback()}clearCloseTimeout(){this.closeTimeout!==null&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"close")}_handleRadioSelected(e){this.querySelectorAll("pont-menubar-radio-item").forEach(t=>{const r=t;t!==e.target&&(r.checked=!1)})}firstUpdated(){this.setupContentListeners();const e=this.querySelector("div[part=menubar-menu-slot]"),t=this.querySelector("div[part=button-slot]");e&&this._content&&e.appendChild(this._content),t&&this._button&&t.appendChild(this._button)}raiseEvent(){const e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}closeAllMenus(){document.querySelectorAll("pont-menubar-menu").forEach(t=>{t.isOpen=!1,t.isHovering=!1})}scheduleClose(){this.clearCloseTimeout(),this.closeTimeout=window.setTimeout(()=>{this.isOpen=!1,this.isHovering=!1,this.closeTimeout=null},150)}isDescendant(e,t){let r=e.parentElement;for(;r;){if(r.tagName.toLowerCase()===t.toLowerCase())return!0;r=r.parentElement}return!1}setupContentListeners(){const e=this._content;e&&(e.addEventListener("mouseenter",()=>{this.clearCloseTimeout(),this.isOpen=!0}),e.addEventListener("mouseleave",()=>{this.scheduleClose()}))}render(){return l`
1601
+ `}};ie._counter=0;Qr([a({type:String})],ie.prototype,"_id",2);Qr([a({attribute:"aria-hidden",type:String})],ie.prototype,"_hidden",2);Qr([a({attribute:"data-value",type:String})],ie.prototype,"value",1);Qr([a({type:Boolean})],ie.prototype,"selected",2);Qr([a({type:Boolean})],ie.prototype,"checked",2);Qr([a({type:Boolean})],ie.prototype,"disabled",2);ie=Qr([p("pont-menubar-checkbox-item")],ie);var o_=Object.defineProperty,i_=Object.getOwnPropertyDescriptor,jn=(e,t,r,o)=>{for(var n=o>1?void 0:o?i_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&o_(t,r,n),n};let gr=class extends y{constructor(){super(...arguments),this.isOpen=!1,this.uniqueIds=[],this.selectedMenu="",this.isHovering=!1,this.id="",this.closeTimeout=null,this.toggleMenubar=e=>{e.stopPropagation(),document.querySelectorAll("pont-menubar-menu").forEach(r=>{r!==this&&(r.isOpen=!1)}),this.isOpen=!this.isOpen},this.handleClickOutside=e=>{const t=e.target;this.contains(t)||(this.isOpen=!1)},this.handleMenuMouseEnter=()=>{this.clearCloseTimeout(),this.closeAllMenus(),this.isOpen=!0,this.isHovering=!0},this.handleMenuMouseLeave=e=>{const t=e.relatedTarget;if(this.isDescendant(t,"pont-menubar-content")){this.clearCloseTimeout();return}this.scheduleClose()}}get _content(){return this.querySelector("pont-menubar-content")}get _button(){return this.querySelector("pont-menubar-trigger")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),this.clearCloseTimeout(),super.disconnectedCallback()}clearCloseTimeout(){this.closeTimeout!==null&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"close")}_handleRadioSelected(e){this.querySelectorAll("pont-menubar-radio-item").forEach(t=>{const r=t;t!==e.target&&(r.checked=!1)})}firstUpdated(){this.setupContentListeners();const e=this.querySelector("div[part=menubar-menu-slot]"),t=this.querySelector("div[part=button-slot]");e&&this._content&&e.appendChild(this._content),t&&this._button&&t.appendChild(this._button)}raiseEvent(){const e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}closeAllMenus(){document.querySelectorAll("pont-menubar-menu").forEach(t=>{t.isOpen=!1,t.isHovering=!1})}scheduleClose(){this.clearCloseTimeout(),this.closeTimeout=window.setTimeout(()=>{this.isOpen=!1,this.isHovering=!1,this.closeTimeout=null},150)}isDescendant(e,t){let r=e.parentElement;for(;r;){if(r.tagName.toLowerCase()===t.toLowerCase())return!0;r=r.parentElement}return!1}setupContentListeners(){const e=this._content;e&&(e.addEventListener("mouseenter",()=>{this.clearCloseTimeout(),this.isOpen=!0}),e.addEventListener("mouseleave",()=>{this.scheduleClose()}))}render(){return l`
1602
1602
  <div class=${u(Ct.menu,this.className)}>
1603
1603
  <div
1604
1604
  id="${this.id}"
@@ -1617,7 +1617,7 @@
1617
1617
 
1618
1618
  <div part="menubar-menu-slot"></div>
1619
1619
  </div>
1620
- `}};jn([g()],mr.prototype,"isOpen",2);jn([g()],mr.prototype,"uniqueIds",2);jn([g()],mr.prototype,"selectedMenu",2);jn([g()],mr.prototype,"isHovering",2);jn([a({type:String})],mr.prototype,"id",2);mr=jn([p("pont-menubar-menu")],mr);var s_=Object.defineProperty,a_=Object.getOwnPropertyDescriptor,Ao=(e,t,r,o)=>{for(var n=o>1?void 0:o?a_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&s_(t,r,n),n};let xn=class extends y{constructor(){super(...arguments),this.state=il,this.id="",this.side="bottom",this.isOpen=!1}get _menubarMenu(){let e=this.parentElement;for(;e&&!(e instanceof mr);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=menubar-content]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){requestAnimationFrame(()=>{this.moveLightDomChildrenInto(this._containerElement)})}connectedCallback(){super.connectedCallback(),this.isOpen&&document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1,e.has("isOpen")&&(this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}handleClickOutside(e){const t=this.querySelector("button");this&&!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&(this.isOpen=!1)}render(){return l`
1620
+ `}};jn([g()],gr.prototype,"isOpen",2);jn([g()],gr.prototype,"uniqueIds",2);jn([g()],gr.prototype,"selectedMenu",2);jn([g()],gr.prototype,"isHovering",2);jn([a({type:String})],gr.prototype,"id",2);gr=jn([p("pont-menubar-menu")],gr);var s_=Object.defineProperty,a_=Object.getOwnPropertyDescriptor,Ao=(e,t,r,o)=>{for(var n=o>1?void 0:o?a_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&s_(t,r,n),n};let xn=class extends y{constructor(){super(...arguments),this.state=il,this.id="",this.side="bottom",this.isOpen=!1}get _menubarMenu(){let e=this.parentElement;for(;e&&!(e instanceof gr);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=menubar-content]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){requestAnimationFrame(()=>{this.moveLightDomChildrenInto(this._containerElement)})}connectedCallback(){super.connectedCallback(),this.isOpen&&document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1,e.has("isOpen")&&(this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}handleClickOutside(e){const t=this.querySelector("button");this&&!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&(this.isOpen=!1)}render(){return l`
1621
1621
  <div
1622
1622
  class=${u(Ct.content,this.className)}
1623
1623
  id="${this.id}"
@@ -1631,7 +1631,7 @@
1631
1631
  dir="ltr"
1632
1632
  style="display: ${this.isOpen?"block":"none"};"
1633
1633
  ></div>
1634
- `}};Ao([a({attribute:"data-state",type:String})],xn.prototype,"state",2);Ao([a({type:String})],xn.prototype,"id",2);Ao([a({type:String})],xn.prototype,"side",2);Ao([g()],xn.prototype,"isOpen",2);xn=Ao([p("pont-menubar-content")],xn);var l_=Object.defineProperty,d_=Object.getOwnPropertyDescriptor,Ni=(e,t,r,o)=>{for(var n=o>1?void 0:o?d_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&l_(t,r,n),n};let gr=class extends y{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-group-slot]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var t,r;if(this._id!=="")return this._id;const e=(r=(t=this.parentElement)==null?void 0:t.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}g${gr._counter++}`:this._id=`rtgcmdrxlxg${gr._counter++}`,this._id}render(){return l`${this._hidden==="true"?h:l`
1634
+ `}};Ao([a({attribute:"data-state",type:String})],xn.prototype,"state",2);Ao([a({type:String})],xn.prototype,"id",2);Ao([a({type:String})],xn.prototype,"side",2);Ao([g()],xn.prototype,"isOpen",2);xn=Ao([p("pont-menubar-content")],xn);var l_=Object.defineProperty,d_=Object.getOwnPropertyDescriptor,Ni=(e,t,r,o)=>{for(var n=o>1?void 0:o?d_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&l_(t,r,n),n};let fr=class extends y{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-group-slot]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var t,r;if(this._id!=="")return this._id;const e=(r=(t=this.parentElement)==null?void 0:t.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}g${fr._counter++}`:this._id=`rtgcmdrxlxg${fr._counter++}`,this._id}render(){return l`${this._hidden==="true"?h:l`
1635
1635
  <div
1636
1636
  class=${u(Ct.group,this.className)}
1637
1637
  id="${this.identifier}"
@@ -1652,7 +1652,7 @@
1652
1652
  aria-labelledby="${this.identifier}h"
1653
1653
  ></div>
1654
1654
  </div>
1655
- `}`}};gr._counter=0;Ni([a({type:String})],gr.prototype,"heading",2);Ni([a({attribute:"id",type:String})],gr.prototype,"_id",2);Ni([a({attribute:"aria-hidden",type:String})],gr.prototype,"_hidden",2);gr=Ni([p("pont-menubar-group")],gr);var c_=Object.defineProperty,p_=Object.getOwnPropertyDescriptor,qn=(e,t,r,o)=>{for(var n=o>1?void 0:o?p_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&c_(t,r,n),n};let Oe=class extends y{constructor(){super(...arguments),this._id="",this._hidden="",this.disabled=!1,this.selected=!1}get _containerElement(){return this.querySelector("div[part=menubar-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var t,r;if(this._id!=="")return this._id;const e=(r=(t=this.parentElement)==null?void 0:t.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${Oe._counter++}`:this._id=`rtgcmdrxgxli${Oe._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}render(){return l` ${this._hidden==="true"?h:l`
1655
+ `}`}};fr._counter=0;Ni([a({type:String})],fr.prototype,"heading",2);Ni([a({attribute:"id",type:String})],fr.prototype,"_id",2);Ni([a({attribute:"aria-hidden",type:String})],fr.prototype,"_hidden",2);fr=Ni([p("pont-menubar-group")],fr);var c_=Object.defineProperty,p_=Object.getOwnPropertyDescriptor,qn=(e,t,r,o)=>{for(var n=o>1?void 0:o?p_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&c_(t,r,n),n};let Oe=class extends y{constructor(){super(...arguments),this._id="",this._hidden="",this.disabled=!1,this.selected=!1}get _containerElement(){return this.querySelector("div[part=menubar-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var t,r;if(this._id!=="")return this._id;const e=(r=(t=this.parentElement)==null?void 0:t.shadowRoot)==null?void 0:r.querySelector("div[rtgcmd-group]");return e?this._id=`${e.getAttribute("id")}li${Oe._counter++}`:this._id=`rtgcmdrxgxli${Oe._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}render(){return l` ${this._hidden==="true"?h:l`
1656
1656
  <div
1657
1657
  part="menubar-item"
1658
1658
  class=${u(Ct.item,this.disabled&&"pont-opacity-menubar-item-opacity-disabled pont-pointer-events-none",this.className)}
@@ -1738,7 +1738,7 @@
1738
1738
  ></ul>
1739
1739
  <div></div>
1740
1740
  </div>
1741
- `}};uc=P_([p("pont-navigation-menu-list")],uc);var C_=Object.defineProperty,S_=Object.getOwnPropertyDescriptor,zn=(e,t,r,o)=>{for(var n=o>1?void 0:o?S_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&C_(t,r,n),n};let fr=class extends y{constructor(){super(...arguments),this.value="",this.navigationLink=!0,this.isOpen=!1,this.uniqueIds=[],this.isHovering=!1,this.handleClickOutside=e=>{const t=e.target;this.contains(t)||(this.isOpen=!1)}}raiseEvent(){const e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}firstUpdated(){this.moveLightDomChildrenInto(this.querySelector("div[part=content-slot]"),[this._content]),this.moveLightDomChildrenInto(this.querySelector("div[part=button-slot]"),[this._button])}closeAllMenus(){document.querySelectorAll("pont-navigation-menu-item").forEach(t=>{t.isOpen=!1,t.isHovering=!1})}toggleMenubar(e){e.stopPropagation(),document.querySelectorAll("pont-navigation-menu-item").forEach(r=>{r!==this&&(r.isOpen=!1)}),this.isOpen=!this.isOpen}get _content(){return this.querySelector("pont-navigation-menu-content")}get _button(){return this.querySelector("pont-navigation-menu-trigger")}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"close")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}handleHover(){this.closeAllMenus(),this.isHovering||(this.isHovering=!0,this.isOpen=!0)}handleMouseLeave(){this.isHovering=!1,this.isOpen=!1}createRenderRoot(){return this}render(){return l`
1741
+ `}};uc=P_([p("pont-navigation-menu-list")],uc);var C_=Object.defineProperty,S_=Object.getOwnPropertyDescriptor,zn=(e,t,r,o)=>{for(var n=o>1?void 0:o?S_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&C_(t,r,n),n};let vr=class extends y{constructor(){super(...arguments),this.value="",this.navigationLink=!0,this.isOpen=!1,this.uniqueIds=[],this.isHovering=!1,this.handleClickOutside=e=>{const t=e.target;this.contains(t)||(this.isOpen=!1)}}raiseEvent(){const e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}firstUpdated(){this.moveLightDomChildrenInto(this.querySelector("div[part=content-slot]"),[this._content]),this.moveLightDomChildrenInto(this.querySelector("div[part=button-slot]"),[this._button])}closeAllMenus(){document.querySelectorAll("pont-navigation-menu-item").forEach(t=>{t.isOpen=!1,t.isHovering=!1})}toggleMenubar(e){e.stopPropagation(),document.querySelectorAll("pont-navigation-menu-item").forEach(r=>{r!==this&&(r.isOpen=!1)}),this.isOpen=!this.isOpen}get _content(){return this.querySelector("pont-navigation-menu-content")}get _button(){return this.querySelector("pont-navigation-menu-trigger")}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"close")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}handleHover(){this.closeAllMenus(),this.isHovering||(this.isHovering=!0,this.isOpen=!0)}handleMouseLeave(){this.isHovering=!1,this.isOpen=!1}createRenderRoot(){return this}render(){return l`
1742
1742
  <li
1743
1743
  @mouseenter="${this.handleHover}"
1744
1744
  @mouseleave="${this.handleMouseLeave}"
@@ -1768,7 +1768,7 @@
1768
1768
  </div>
1769
1769
  <div part="content-slot" style="position:absolute"></div>`:""}
1770
1770
  </li>
1771
- `}};zn([a({type:String})],fr.prototype,"value",2);zn([a({type:Boolean})],fr.prototype,"navigationLink",2);zn([g()],fr.prototype,"isOpen",2);zn([g()],fr.prototype,"uniqueIds",2);zn([g()],fr.prototype,"isHovering",2);fr=zn([p("pont-navigation-menu-item")],fr);var E_=Object.defineProperty,x_=Object.getOwnPropertyDescriptor,To=(e,t,r,o)=>{for(var n=o>1?void 0:o?x_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&E_(t,r,n),n};let On=class extends y{constructor(){super(...arguments),this.state="close",this.id="",this.side="bottom",this.isOpen=!0}get _menubarMenu(){let e=this.parentElement;for(;e&&!(e instanceof fr);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=navigation-menu-content-container]")}getAttributesToExclude(){return["data-testid"]}connectedCallback(){super.connectedCallback(),this.isOpen&&document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1,e.has("isOpen")&&(this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}handleClickOutside(e){const t=this.querySelector("button");this&&!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&(this.isOpen=!1)}createRenderRoot(){return this}firstUpdated(e){requestAnimationFrame(()=>{this.moveLightDomChildrenInto(this._containerElement)})}render(){return l`
1771
+ `}};zn([a({type:String})],vr.prototype,"value",2);zn([a({type:Boolean})],vr.prototype,"navigationLink",2);zn([g()],vr.prototype,"isOpen",2);zn([g()],vr.prototype,"uniqueIds",2);zn([g()],vr.prototype,"isHovering",2);vr=zn([p("pont-navigation-menu-item")],vr);var E_=Object.defineProperty,x_=Object.getOwnPropertyDescriptor,To=(e,t,r,o)=>{for(var n=o>1?void 0:o?x_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&E_(t,r,n),n};let On=class extends y{constructor(){super(...arguments),this.state="close",this.id="",this.side="bottom",this.isOpen=!0}get _menubarMenu(){let e=this.parentElement;for(;e&&!(e instanceof vr);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=navigation-menu-content-container]")}getAttributesToExclude(){return["data-testid"]}connectedCallback(){super.connectedCallback(),this.isOpen&&document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1,e.has("isOpen")&&(this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}handleClickOutside(e){const t=this.querySelector("button");this&&!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&(this.isOpen=!1)}createRenderRoot(){return this}firstUpdated(e){requestAnimationFrame(()=>{this.moveLightDomChildrenInto(this._containerElement)})}render(){return l`
1772
1772
  <div
1773
1773
  class="${u(Hr.content,this.className)}"
1774
1774
  style="display: ${this.isOpen?"block":"none"};top:0px;left:0px;"
@@ -2022,7 +2022,7 @@
2022
2022
  style="transform: translateX(-${100-(this.value||0)}%);"
2023
2023
  ></div>
2024
2024
  </div>
2025
- `}};$h([a({type:Number})],$a.prototype,"value",2);$a=$h([p("pont-progress")],$a);const oo={root:["pont-grid","pont-gap-radio-group-space-gap"],item:{wrapper:["pont-inline-flex","pont-justify-center pont-items-center","pont-size-radio-group-item-space-size"],item:["pont-aspect-square","pont-shrink-0","pont-size-radio-group-item-space-size","pont-bg-radio-group-item-color-bg","pont-rounded-radio-group-item-radius pont-border-radio-group-item-width-border pont-border-radio-group-item-color-border pont-outline-none","pont-transition-[color,box-shadow]","focus-visible:pont-border-radio-group-item-color-border-focus focus-visible:pont-ring-radio-group-item-width-ring-focus focus-visible:pont-ring-radio-group-item-color-ring-focus","disabled:pont-opacity-radio-group-item-opacity-disabled disabled:pont-cursor-not-allowed","aria-invalid:pont-border-radio-group-item-color-border-invalid aria-invalid:pont-ring-radio-group-item-width-ring-invalid aria-invalid:pont-ring-radio-group-item-color-ring-invalid"],indicator:["pont-flex pont-relative","pont-justify-center pont-items-center"],icon:["pont-absolute pont-top-1/2 pont-left-1/2","pont-size-radio-group-indicator-space-size","pont--translate-x-1/2 pont--translate-y-1/2","pont-fill-radio-group-indicator-color-fill"]}},J_="unChecked";var X_=Object.defineProperty,tw=Object.getOwnPropertyDescriptor,_r=(e,t,r,o)=>{for(var n=o>1?void 0:o?tw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&X_(t,r,n),n};let Ye=class extends y{constructor(){super(...arguments),this.checked=!1,this.tabindex=0,this.value="",this.id="radio-group-item",this.state=J_,this.disabled=!1,this.invalid=!1}get _containerElement(){return this.querySelector("button[part=radio-group-item]")}_onClick(e){e.defaultPrevented||this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}createRenderRoot(){return this.classList=u(oo.item.wrapper),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
2025
+ `}};$h([a({type:Number})],$a.prototype,"value",2);$a=$h([p("pont-progress")],$a);const oo={root:["pont-grid","pont-gap-radio-group-space-gap"],item:{wrapper:["pont-inline-flex","pont-justify-center pont-items-center","pont-size-radio-group-item-space-size"],item:["pont-aspect-square","pont-shrink-0","pont-size-radio-group-item-space-size","pont-bg-radio-group-item-color-bg","pont-rounded-radio-group-item-radius pont-border-radio-group-item-width-border pont-border-radio-group-item-color-border pont-outline-none","pont-transition-[color,box-shadow]","focus-visible:pont-border-radio-group-item-color-border-focus focus-visible:pont-ring-radio-group-item-width-ring-focus focus-visible:pont-ring-radio-group-item-color-ring-focus","disabled:pont-opacity-radio-group-item-opacity-disabled disabled:pont-cursor-not-allowed","aria-invalid:pont-border-radio-group-item-color-border-invalid aria-invalid:pont-ring-radio-group-item-width-ring-invalid aria-invalid:pont-ring-radio-group-item-color-ring-invalid"],indicator:["pont-flex pont-relative","pont-justify-center pont-items-center"],icon:["pont-absolute pont-top-1/2 pont-left-1/2","pont-size-radio-group-indicator-space-size","pont--translate-x-1/2 pont--translate-y-1/2","pont-fill-radio-group-indicator-color-fill"]}},J_="unChecked";var X_=Object.defineProperty,tw=Object.getOwnPropertyDescriptor,wr=(e,t,r,o)=>{for(var n=o>1?void 0:o?tw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&X_(t,r,n),n};let Ye=class extends y{constructor(){super(...arguments),this.checked=!1,this.tabindex=0,this.value="",this.id="radio-group-item",this.state=J_,this.disabled=!1,this.invalid=!1}get _containerElement(){return this.querySelector("button[part=radio-group-item]")}_onClick(e){e.defaultPrevented||this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}createRenderRoot(){return this.classList=u(oo.item.wrapper),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
2026
2026
  <button
2027
2027
  type="button"
2028
2028
  part="radio-group-item"
@@ -2058,7 +2058,7 @@
2058
2058
  </svg>
2059
2059
  </span>`:h}
2060
2060
  </button>
2061
- `}};_r([a({type:Boolean,reflect:!0})],Ye.prototype,"checked",2);_r([a({type:Number})],Ye.prototype,"tabindex",2);_r([a({type:String})],Ye.prototype,"value",2);_r([a({type:String})],Ye.prototype,"id",2);_r([a({attribute:"data-state",type:String})],Ye.prototype,"state",2);_r([a({type:Boolean})],Ye.prototype,"disabled",2);_r([a({attribute:"aria-invalid",type:Boolean})],Ye.prototype,"invalid",2);Ye=_r([p("pont-radio-group-item")],Ye);var ew=Object.defineProperty,rw=Object.getOwnPropertyDescriptor,Ph=(e,t,r,o)=>{for(var n=o>1?void 0:o?rw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&ew(t,r,n),n};let Pa=class extends y{constructor(){super(...arguments),this.defaultValue=""}get _containerElement(){return this.querySelector("div[part=radio-group]")}connectedCallback(){super.connectedCallback(),this.addEventListener("radio-selected",this._handleRadioSelected)}_handleRadioSelected(e){this.querySelectorAll("pont-radio-group-item").forEach(t=>{t!==e.target&&(t.checked=!1)})}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return this.querySelectorAll("pont-radio-group-item").forEach(e=>{e.checked=e.value==this.defaultValue}),l`
2061
+ `}};wr([a({type:Boolean,reflect:!0})],Ye.prototype,"checked",2);wr([a({type:Number})],Ye.prototype,"tabindex",2);wr([a({type:String})],Ye.prototype,"value",2);wr([a({type:String})],Ye.prototype,"id",2);wr([a({attribute:"data-state",type:String})],Ye.prototype,"state",2);wr([a({type:Boolean})],Ye.prototype,"disabled",2);wr([a({attribute:"aria-invalid",type:Boolean})],Ye.prototype,"invalid",2);Ye=wr([p("pont-radio-group-item")],Ye);var ew=Object.defineProperty,rw=Object.getOwnPropertyDescriptor,Ph=(e,t,r,o)=>{for(var n=o>1?void 0:o?rw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&ew(t,r,n),n};let Pa=class extends y{constructor(){super(...arguments),this.defaultValue=""}get _containerElement(){return this.querySelector("div[part=radio-group]")}connectedCallback(){super.connectedCallback(),this.addEventListener("radio-selected",this._handleRadioSelected)}_handleRadioSelected(e){this.querySelectorAll("pont-radio-group-item").forEach(t=>{t!==e.target&&(t.checked=!1)})}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return this.querySelectorAll("pont-radio-group-item").forEach(e=>{e.checked=e.value==this.defaultValue}),l`
2062
2062
  <div
2063
2063
  part="radio-group"
2064
2064
  class=${u(oo.root,this.className)}
@@ -2100,17 +2100,17 @@
2100
2100
  style="overflow: hidden scroll;"
2101
2101
  ></div>
2102
2102
  </div>
2103
- `}};Ch([Co("[data-radix-scroll-area-viewport]")],Ca.prototype,"viewportEl",2);Ca=Ch([p("pont-scroll-area")],Ca);class sw{constructor(){this.state={isOpen:!1,selectedValue:"",selectedText:""},this.listeners=new Set}subscribe(t){this.listeners.add(t)}unsubscribe(t){this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t())}get isOpen(){return this.state.isOpen}get selectedValue(){return this.state.selectedValue}get selectedText(){return this.state.selectedText}open(){this.state.isOpen||(this.state.isOpen=!0,this.notify())}close(){this.state.isOpen&&(this.state.isOpen=!1,this.notify())}toggle(){this.state.isOpen=!this.state.isOpen,this.notify()}select(t,r,o){this.state.selectedValue=t,this.state.selectedText=r,this.state.isOpen=!1,this.notify()}}const ne={root:["pont-font-select-font-family"],value:["pont-flex","pont-gap-select-value-space-gap pont-items-center","pont-line-clamp-1"],trigger:{trigger:["pont-flex","pont-gap-select-trigger-space-gap pont-justify-between pont-items-center","pont-px-select-trigger-space-px pont-py-select-trigger-space-py","pont-w-full pont-h-select-trigger-space-h","pont-text-select-trigger-font pont-whitespace-nowrap","pont-bg-select-trigger-color-bg","pont-rounded-select-trigger-radius pont-border-select-trigger-width-border pont-border-select-trigger-color-border pont-outline-none","pont-transition-[color,box-shadow]","hover:pont-bg-select-trigger-color-bg-hover","focus-visible:pont-border-select-trigger-color-border-focus focus-visible:pont-ring-select-trigger-width-ring-focus focus-visible:pont-ring-select-trigger-color-ring-focus","pont-select-disabled:pont-opacity-select-trigger-opacity-disabled pont-select-disabled:pont-cursor-not-allowed","aria-invalid:pont-border-select-trigger-color-border-invalid aria-invalid:pont-ring-select-trigger-width-ring-invalid aria-invalid:pont-ring-select-trigger-color-ring-invalid","data-[placeholder]:pont-text-select-trigger-placeholder-color-text"],icon:["pont-shrink-0","pont-size-select-trigger-icon-space-size","pont-text-select-trigger-icon-color-text","pont-opacity-select-trigger-icon-opacity","pont-pointer-events-none"]},content:{content:["pont-fixed pont-overflow-x-hidden pont-overflow-y-auto pont-z-50","pont-w-fit","pont-text-select-content-color-text","pont-bg-select-content-color-bg","pont-rounded-select-content-radius pont-border-select-content-width-border pont-border-select-content-color-border","pont-shadow-select-content-shadow","pont-slide-in-from-top-2","pont-translate-y-1","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0 data-[state=open]:pont-zoom-in-95","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0 data-[state=closed]:pont-zoom-out-95"],viewport:["pont-p-select-content-viewport-space-p","pont-w-full","pont-scroll-my-1"]},label:["pont-px-select-label-space-px pont-py-select-label-space-py","pont-text-select-label-font pont-text-select-label-color-text"],item:{item:["pont-flex pont-relative","pont-gap-select-item-space-gap pont-items-center","pont-pl-select-item-space-pl pont-pr-select-item-space-pr pont-py-select-item-space-py","pont-w-full","pont-text-select-item-font","pont-rounded-select-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","hover:pont-text-select-item-color-text-hover hover:pont-bg-select-item-color-bg-hover","focus:pont-text-select-item-color-text-focus focus:pont-bg-select-item-color-bg-focus","data-[disabled]:pont-opacity-select-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],indicator:["pont-flex pont-absolute pont-right-2","pont-justify-center pont-items-center","pont-size-select-item-indicator-space-size"],icon:["pont-shrink-0","pont-size-select-item-icon-space-size","pont-text-select-item-icon-color-text","pont-pointer-events-none"]},separator:["pont-mx-select-separator-space-mx pont-my-select-separator-space-my","pont-h-select-separator-space-h","pont-bg-select-separator-color-bg","pont-pointer-events-none"]};var aw=Object.defineProperty,lw=Object.getOwnPropertyDescriptor,fl=(e,t,r,o)=>{for(var n=o>1?void 0:o?lw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&aw(t,r,n),n};let vr=class extends y{constructor(){super(...arguments),this.uuid=za(),this.selectStore=new sw,this.value="",this.disabled=!1,this.handleClickOutside=e=>{const t=this.querySelector("[data-select-uuid]"),r=e.target;t!=null&&t.contains(r)||this.selectStore.close()}}updated(e){super.updated(e),e.has("value")&&this.value!==this.selectStore.selectedValue&&this.syncValueToStore()}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}firstUpdated(){const e=this.querySelector("div[part=select]");this.moveLightDomChildrenInto(e),this.syncValueToStore()}syncValueToStore(){var e;if(this.value){const t=this.querySelector(`pont-select-item[value="${this.value}"]`),r=((e=t==null?void 0:t.textContent)==null?void 0:e.trim())||this.value;this.selectStore.select(this.value,r)}else this.selectStore.select("","")}createRenderRoot(){return this}render(){return l`
2103
+ `}};Ch([Co("[data-radix-scroll-area-viewport]")],Ca.prototype,"viewportEl",2);Ca=Ch([p("pont-scroll-area")],Ca);class sw{constructor(){this.state={isOpen:!1,selectedValue:"",selectedText:""},this.listeners=new Set}subscribe(t){this.listeners.add(t)}unsubscribe(t){this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t())}get isOpen(){return this.state.isOpen}get selectedValue(){return this.state.selectedValue}get selectedText(){return this.state.selectedText}open(){this.state.isOpen||(this.state.isOpen=!0,this.notify())}close(){this.state.isOpen&&(this.state.isOpen=!1,this.notify())}toggle(){this.state.isOpen=!this.state.isOpen,this.notify()}select(t,r,o){this.state.selectedValue=t,this.state.selectedText=r,this.state.isOpen=!1,this.notify()}}const ne={root:["pont-font-select-font-family"],value:["pont-flex","pont-gap-select-value-space-gap pont-items-center","pont-line-clamp-1"],trigger:{trigger:["pont-flex","pont-gap-select-trigger-space-gap pont-justify-between pont-items-center","pont-px-select-trigger-space-px pont-py-select-trigger-space-py","pont-w-full pont-h-select-trigger-space-h","pont-text-select-trigger-font pont-whitespace-nowrap","pont-bg-select-trigger-color-bg","pont-rounded-select-trigger-radius pont-border-select-trigger-width-border pont-border-select-trigger-color-border pont-outline-none","pont-transition-[color,box-shadow]","hover:pont-bg-select-trigger-color-bg-hover","focus-visible:pont-border-select-trigger-color-border-focus focus-visible:pont-ring-select-trigger-width-ring-focus focus-visible:pont-ring-select-trigger-color-ring-focus","pont-select-disabled:pont-opacity-select-trigger-opacity-disabled pont-select-disabled:pont-cursor-not-allowed","aria-invalid:pont-border-select-trigger-color-border-invalid aria-invalid:pont-ring-select-trigger-width-ring-invalid aria-invalid:pont-ring-select-trigger-color-ring-invalid","data-[placeholder]:pont-text-select-trigger-placeholder-color-text"],icon:["pont-shrink-0","pont-size-select-trigger-icon-space-size","pont-text-select-trigger-icon-color-text","pont-opacity-select-trigger-icon-opacity","pont-pointer-events-none"]},content:{content:["pont-fixed pont-overflow-x-hidden pont-overflow-y-auto pont-z-50","pont-w-fit","pont-text-select-content-color-text","pont-bg-select-content-color-bg","pont-rounded-select-content-radius pont-border-select-content-width-border pont-border-select-content-color-border","pont-shadow-select-content-shadow","pont-slide-in-from-top-2","pont-translate-y-1","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0 data-[state=open]:pont-zoom-in-95","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0 data-[state=closed]:pont-zoom-out-95"],viewport:["pont-p-select-content-viewport-space-p","pont-w-full","pont-scroll-my-1"]},label:["pont-px-select-label-space-px pont-py-select-label-space-py","pont-text-select-label-font pont-text-select-label-color-text"],item:{item:["pont-flex pont-relative","pont-gap-select-item-space-gap pont-items-center","pont-pl-select-item-space-pl pont-pr-select-item-space-pr pont-py-select-item-space-py","pont-w-full","pont-text-select-item-font","pont-rounded-select-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","hover:pont-text-select-item-color-text-hover hover:pont-bg-select-item-color-bg-hover","focus:pont-text-select-item-color-text-focus focus:pont-bg-select-item-color-bg-focus","data-[disabled]:pont-opacity-select-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],indicator:["pont-flex pont-absolute pont-right-2","pont-justify-center pont-items-center","pont-size-select-item-indicator-space-size"],icon:["pont-shrink-0","pont-size-select-item-icon-space-size","pont-text-select-item-icon-color-text","pont-pointer-events-none"]},separator:["pont-mx-select-separator-space-mx pont-my-select-separator-space-my","pont-h-select-separator-space-h","pont-bg-select-separator-color-bg","pont-pointer-events-none"]};var aw=Object.defineProperty,lw=Object.getOwnPropertyDescriptor,fl=(e,t,r,o)=>{for(var n=o>1?void 0:o?lw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&aw(t,r,n),n};let br=class extends y{constructor(){super(...arguments),this.uuid=za(),this.selectStore=new sw,this.value="",this.disabled=!1,this.handleClickOutside=e=>{const t=this.querySelector("[data-select-uuid]"),r=e.target;t!=null&&t.contains(r)||this.selectStore.close()}}updated(e){super.updated(e),e.has("value")&&this.value!==this.selectStore.selectedValue&&this.syncValueToStore()}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}firstUpdated(){const e=this.querySelector("div[part=select]");this.moveLightDomChildrenInto(e),this.syncValueToStore()}syncValueToStore(){var e;if(this.value){const t=this.querySelector(`pont-select-item[value="${this.value}"]`),r=((e=t==null?void 0:t.textContent)==null?void 0:e.trim())||this.value;this.selectStore.select(this.value,r)}else this.selectStore.select("","")}createRenderRoot(){return this}render(){return l`
2104
2104
  <div
2105
2105
  part="select"
2106
2106
  data-select-uuid=${this.uuid}
2107
2107
  class=${u(ne.root,this.className)}
2108
2108
  ></div>
2109
- `}};fl([a({type:String})],vr.prototype,"value",2);fl([a({type:Boolean,reflect:!0})],vr.prototype,"disabled",2);vr=fl([p("pont-select")],vr);/**
2109
+ `}};fl([a({type:String})],br.prototype,"value",2);fl([a({type:Boolean,reflect:!0})],br.prototype,"disabled",2);br=fl([p("pont-select")],br);/**
2110
2110
  * @license
2111
2111
  * Copyright 2018 Google LLC
2112
2112
  * SPDX-License-Identifier: BSD-3-Clause
2113
- */const Sh="important",dw=" !"+Sh,cw=An(class extends Ti{constructor(e){var t;if(super(e),e.type!==Ga.ATTRIBUTE||e.name!=="style"||((t=e.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,r)=>{const o=e[r];return o==null?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(e,[t]){const{style:r}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?r.removeProperty(o):r[o]=null);for(const o in t){const n=t[o];if(n!=null){this.ft.add(o);const i=typeof n=="string"&&n.endsWith(dw);o.includes("-")||i?r.setProperty(o,i?n.slice(0,-11):n,i?Sh:""):r[o]=n}}return pr}});var pw=Object.defineProperty,hw=Object.getOwnPropertyDescriptor,vl=(e,t,r,o)=>{for(var n=o>1?void 0:o?hw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&pw(t,r,n),n};let wi=class extends y{constructor(){super(...arguments),this.focusedIndex=0,this._dropdownStyle={display:"none",top:"0px",left:"0px",minWidth:"128px"},this.childrenArray=[],this._handleScrollResize=()=>{this._select.selectStore.isOpen&&this._updateDropdownPosition()},this.onStoreChange=()=>{const e=this._containerElement;e&&(e.style.display=this._select.selectStore.isOpen?"block":"none"),this._select.selectStore.isOpen?(requestAnimationFrame(()=>{this._updateDropdownPosition()}),window.addEventListener("scroll",this._handleScrollResize,!0),window.addEventListener("resize",this._handleScrollResize)):(window.removeEventListener("scroll",this._handleScrollResize,!0),window.removeEventListener("resize",this._handleScrollResize),this._dropdownStyle={...this._dropdownStyle,display:"none"}),this._select.selectStore.isOpen&&this._select.selectStore.selectedValue&&(this.focusedIndex=this.childrenArray.findIndex(t=>t.value===this._select.selectStore.selectedValue)),this.updateFocusedItem(),this.requestUpdate()},this.handleKeyDown=e=>{var t;if(this._select.selectStore.isOpen)switch(e.preventDefault(),e.key){case"ArrowDown":this.focusedIndex=(this.focusedIndex+1)%this.childrenArray.length,this.updateFocusedItem();break;case"ArrowUp":this.focusedIndex=(this.focusedIndex-1+this.childrenArray.length)%this.childrenArray.length,this.updateFocusedItem();break;case"Enter":const r=this.childrenArray[this.focusedIndex],o=r.value,n=((t=r.textContent)==null?void 0:t.trim())||"";this._select.selectStore.select(o,n);break}}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof vr);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),document.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){this._select.selectStore.unsubscribe(this.onStoreChange),document.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("scroll",this._handleScrollResize,!0),window.removeEventListener("resize",this._handleScrollResize),super.disconnectedCallback()}getTriggerButton(){const e=this._select;return e?e.querySelector("button[part=select-trigger]"):null}_updateDropdownPosition(){const e=this.getTriggerButton();if(!e)return;const t=e.getBoundingClientRect(),r=Math.max(128,t.width);this._dropdownStyle={display:this._select.selectStore.isOpen?"block":"none",top:`${t.bottom}px`,left:`${t.left}px`,minWidth:`${r}px`}}get _containerElement(){return this.querySelector("div[part=select-viewport]")}firstUpdated(){const e=Array.from(this.children).filter(t=>t.tagName.toLowerCase()==="pont-select-item");this.childrenArray=e,e.forEach((t,r)=>{t.tabIndex=r,t.selectItemIndex=r,t.isFocus=r===this.focusedIndex||t.value===this._select.selectStore.selectedValue,t.addEventListener("mouseover",o=>this.handleMouseOver(o,r))}),this.moveLightDomChildrenInto(this._containerElement),this._select.selectStore.isOpen&&requestAnimationFrame(()=>{this._updateDropdownPosition()})}updateFocusedItem(){this.childrenArray.forEach((e,t)=>{var r;e.isFocus=t===this.focusedIndex,(r=e.requestUpdate)==null||r.call(e)})}handleMouseOver(e,t){e.preventDefault(),this.focusedIndex=t}createRenderRoot(){return this}render(){return l`
2113
+ */const Sh="important",dw=" !"+Sh,cw=An(class extends Ti{constructor(e){var t;if(super(e),e.type!==Ga.ATTRIBUTE||e.name!=="style"||((t=e.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,r)=>{const o=e[r];return o==null?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(e,[t]){const{style:r}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?r.removeProperty(o):r[o]=null);for(const o in t){const n=t[o];if(n!=null){this.ft.add(o);const i=typeof n=="string"&&n.endsWith(dw);o.includes("-")||i?r.setProperty(o,i?n.slice(0,-11):n,i?Sh:""):r[o]=n}}return hr}});var pw=Object.defineProperty,hw=Object.getOwnPropertyDescriptor,vl=(e,t,r,o)=>{for(var n=o>1?void 0:o?hw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&pw(t,r,n),n};let wi=class extends y{constructor(){super(...arguments),this.focusedIndex=0,this._dropdownStyle={display:"none",top:"0px",left:"0px",minWidth:"128px"},this.childrenArray=[],this._handleScrollResize=()=>{this._select.selectStore.isOpen&&this._updateDropdownPosition()},this.onStoreChange=()=>{const e=this._containerElement;e&&(e.style.display=this._select.selectStore.isOpen?"block":"none"),this._select.selectStore.isOpen?(requestAnimationFrame(()=>{this._updateDropdownPosition()}),window.addEventListener("scroll",this._handleScrollResize,!0),window.addEventListener("resize",this._handleScrollResize)):(window.removeEventListener("scroll",this._handleScrollResize,!0),window.removeEventListener("resize",this._handleScrollResize),this._dropdownStyle={...this._dropdownStyle,display:"none"}),this._select.selectStore.isOpen&&this._select.selectStore.selectedValue&&(this.focusedIndex=this.childrenArray.findIndex(t=>t.value===this._select.selectStore.selectedValue)),this.updateFocusedItem(),this.requestUpdate()},this.handleKeyDown=e=>{var t;if(this._select.selectStore.isOpen)switch(e.preventDefault(),e.key){case"ArrowDown":this.focusedIndex=(this.focusedIndex+1)%this.childrenArray.length,this.updateFocusedItem();break;case"ArrowUp":this.focusedIndex=(this.focusedIndex-1+this.childrenArray.length)%this.childrenArray.length,this.updateFocusedItem();break;case"Enter":const r=this.childrenArray[this.focusedIndex],o=r.value,n=((t=r.textContent)==null?void 0:t.trim())||"";this._select.selectStore.select(o,n);break}}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof br);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),document.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){this._select.selectStore.unsubscribe(this.onStoreChange),document.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("scroll",this._handleScrollResize,!0),window.removeEventListener("resize",this._handleScrollResize),super.disconnectedCallback()}getTriggerButton(){const e=this._select;return e?e.querySelector("button[part=select-trigger]"):null}_updateDropdownPosition(){const e=this.getTriggerButton();if(!e)return;const t=e.getBoundingClientRect(),r=Math.max(128,t.width);this._dropdownStyle={display:this._select.selectStore.isOpen?"block":"none",top:`${t.bottom}px`,left:`${t.left}px`,minWidth:`${r}px`}}get _containerElement(){return this.querySelector("div[part=select-viewport]")}firstUpdated(){const e=Array.from(this.children).filter(t=>t.tagName.toLowerCase()==="pont-select-item");this.childrenArray=e,e.forEach((t,r)=>{t.tabIndex=r,t.selectItemIndex=r,t.isFocus=r===this.focusedIndex||t.value===this._select.selectStore.selectedValue,t.addEventListener("mouseover",o=>this.handleMouseOver(o,r))}),this.moveLightDomChildrenInto(this._containerElement),this._select.selectStore.isOpen&&requestAnimationFrame(()=>{this._updateDropdownPosition()})}updateFocusedItem(){this.childrenArray.forEach((e,t)=>{var r;e.isFocus=t===this.focusedIndex,(r=e.requestUpdate)==null||r.call(e)})}handleMouseOver(e,t){e.preventDefault(),this.focusedIndex=t}createRenderRoot(){return this}render(){return l`
2114
2114
  <div
2115
2115
  part="select-group"
2116
2116
  data-slot="select-content"
@@ -2122,7 +2122,7 @@
2122
2122
  class="${u(ne.content.viewport)}"
2123
2123
  ></div>
2124
2124
  </div>
2125
- `}};vl([g()],wi.prototype,"focusedIndex",2);vl([g()],wi.prototype,"_dropdownStyle",2);wi=vl([p("pont-select-group")],wi);var uw=Object.defineProperty,mw=Object.getOwnPropertyDescriptor,Jr=(e,t,r,o)=>{for(var n=o>1?void 0:o?mw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&uw(t,r,n),n};let br=class extends y{constructor(){super(...arguments),this.value="",this.isSelected=!1,this.isFocus=!1,this.selectItemIndex=-1,this.onSelect=(e,t)=>{},this.class="",this._onStoreChange=()=>{var e,t;this.isSelected=this.value.toLowerCase()===((t=(e=this._select.selectStore.selectedValue)==null?void 0:e.toLowerCase)==null?void 0:t.call(e)),this.requestUpdate()},this.handleClick=e=>{e.stopPropagation();const t=this.getTextContent();this._select.selectStore.select(this.value,t),this.onSelect(this.value,this.selectItemIndex),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof vr);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this._onStoreChange)}disconnectedCallback(){this._select.selectStore.unsubscribe(this._onStoreChange),super.disconnectedCallback()}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get _containerElement(){return this.querySelector("div[part=select-item-container]")}createRenderRoot(){return this}getTextContent(){var o;const e=this._containerElement;if(e&&e.textContent)return e.textContent.trim();const t=this.querySelector("[part=select-item-indicator]"),r=this.cloneNode(!0);if(t){const n=r.querySelector("[part=select-item-indicator]");n==null||n.remove()}return((o=r.textContent)==null?void 0:o.trim())||""}render(){const e=this.getFilteredAttributes();return l`
2125
+ `}};vl([g()],wi.prototype,"focusedIndex",2);vl([g()],wi.prototype,"_dropdownStyle",2);wi=vl([p("pont-select-group")],wi);var uw=Object.defineProperty,mw=Object.getOwnPropertyDescriptor,Jr=(e,t,r,o)=>{for(var n=o>1?void 0:o?mw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&uw(t,r,n),n};let yr=class extends y{constructor(){super(...arguments),this.value="",this.isSelected=!1,this.isFocus=!1,this.selectItemIndex=-1,this.onSelect=(e,t)=>{},this.class="",this._onStoreChange=()=>{var e,t;this.isSelected=this.value.toLowerCase()===((t=(e=this._select.selectStore.selectedValue)==null?void 0:e.toLowerCase)==null?void 0:t.call(e)),this.requestUpdate()},this.handleClick=e=>{e.stopPropagation();const t=this.getTextContent();this._select.selectStore.select(this.value,t),this.onSelect(this.value,this.selectItemIndex),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof br);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this._onStoreChange)}disconnectedCallback(){this._select.selectStore.unsubscribe(this._onStoreChange),super.disconnectedCallback()}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get _containerElement(){return this.querySelector("div[part=select-item-container]")}createRenderRoot(){return this}getTextContent(){var o;const e=this._containerElement;if(e&&e.textContent)return e.textContent.trim();const t=this.querySelector("[part=select-item-indicator]"),r=this.cloneNode(!0);if(t){const n=r.querySelector("[part=select-item-indicator]");n==null||n.remove()}return((o=r.textContent)==null?void 0:o.trim())||""}render(){const e=this.getFilteredAttributes();return l`
2126
2126
  <div
2127
2127
  ${St(e)}
2128
2128
  part="select-item"
@@ -2156,7 +2156,7 @@
2156
2156
 
2157
2157
  <div part="select-item-container"></div>
2158
2158
  </div>
2159
- `}};Jr([a()],br.prototype,"value",2);Jr([a()],br.prototype,"isSelected",2);Jr([a()],br.prototype,"isFocus",2);Jr([a()],br.prototype,"selectItemIndex",2);Jr([a({type:Function})],br.prototype,"onSelect",2);Jr([a()],br.prototype,"class",2);br=Jr([p("pont-select-item")],br);var gw=Object.getOwnPropertyDescriptor,fw=(e,t,r,o)=>{for(var n=o>1?void 0:o?gw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let _c=class extends y{get _containerElement(){return this.querySelector("div[part=select-label]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l`
2159
+ `}};Jr([a()],yr.prototype,"value",2);Jr([a()],yr.prototype,"isSelected",2);Jr([a()],yr.prototype,"isFocus",2);Jr([a()],yr.prototype,"selectItemIndex",2);Jr([a({type:Function})],yr.prototype,"onSelect",2);Jr([a()],yr.prototype,"class",2);yr=Jr([p("pont-select-item")],yr);var gw=Object.getOwnPropertyDescriptor,fw=(e,t,r,o)=>{for(var n=o>1?void 0:o?gw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let _c=class extends y{get _containerElement(){return this.querySelector("div[part=select-label]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l`
2160
2160
  <div
2161
2161
  part="select-label"
2162
2162
  class=${u(ne.label,this.className)}
@@ -2176,7 +2176,7 @@
2176
2176
  role="separator"
2177
2177
  class=${u(ne.separator,this.className)}
2178
2178
  ></div>
2179
- `}};yl([a({type:String})],Pi.prototype,"_id",2);yl([a({attribute:"aria-hidden",type:String})],Pi.prototype,"_hidden",2);Pi=yl([p("pont-select-separator")],Pi);var ww=Object.defineProperty,$w=Object.getOwnPropertyDescriptor,Eh=(e,t,r,o)=>{for(var n=o>1?void 0:o?$w(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&ww(t,r,n),n};let Sa=class extends y{constructor(){super(...arguments),this.id="",this._triggerId="",this.onStoreChange=()=>{this.requestUpdate()},this.handleClick=e=>{e.stopPropagation(),!(this._select&&this._select.disabled)&&this._select&&this._select.selectStore.toggle()}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof vr);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),this.classObserver=new MutationObserver(()=>{this.requestUpdate()}),this.classObserver.observe(this,{attributes:!0,attributeFilter:["class"]}),this._select&&(this.parentObserver=new MutationObserver(()=>{this.requestUpdate()}),this.parentObserver.observe(this._select,{attributes:!0,attributeFilter:["disabled"]}))}disconnectedCallback(){var e,t;this._select.selectStore.unsubscribe(this.onStoreChange),(e=this.classObserver)==null||e.disconnect(),(t=this.parentObserver)==null||t.disconnect()}get _containerElement(){return this.querySelector("span[part=select-trigger-container]")}firstUpdated(e){var t;super.firstUpdated(e),this._adoptId(),this.moveLightDomChildrenInto(this._containerElement),(t=this._containerElement)==null||t.addEventListener("click",this.handleClick)}updated(e){var t;(t=super.updated)==null||t.call(this,e),e.has("id")&&this._adoptId()}_adoptId(){this.id&&(this._triggerId=this.id),this.removeAttribute("id")}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}getClassAttribute(){const e=this.getAttribute("class")||"",t=this.customClass||"",r=this.className||"";return e||t||r||""}filterConflictingWidthClasses(e,t){const r=/pont-w-[\w-[\]]+/;return r.test(t)?e.map(n=>n.split(/\s+/).filter(i=>!r.test(i)).join(" ")):e}render(){var o;const e=this.getClassAttribute(),t=this.filterConflictingWidthClasses(ne.trigger.trigger,e),r=((o=this._select)==null?void 0:o.disabled)||!1;return l`
2179
+ `}};yl([a({type:String})],Pi.prototype,"_id",2);yl([a({attribute:"aria-hidden",type:String})],Pi.prototype,"_hidden",2);Pi=yl([p("pont-select-separator")],Pi);var ww=Object.defineProperty,$w=Object.getOwnPropertyDescriptor,Eh=(e,t,r,o)=>{for(var n=o>1?void 0:o?$w(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&ww(t,r,n),n};let Sa=class extends y{constructor(){super(...arguments),this.id="",this._triggerId="",this.onStoreChange=()=>{this.requestUpdate()},this.handleClick=e=>{e.stopPropagation(),!(this._select&&this._select.disabled)&&this._select&&this._select.selectStore.toggle()}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof br);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),this.classObserver=new MutationObserver(()=>{this.requestUpdate()}),this.classObserver.observe(this,{attributes:!0,attributeFilter:["class"]}),this._select&&(this.parentObserver=new MutationObserver(()=>{this.requestUpdate()}),this.parentObserver.observe(this._select,{attributes:!0,attributeFilter:["disabled"]}))}disconnectedCallback(){var e,t;this._select.selectStore.unsubscribe(this.onStoreChange),(e=this.classObserver)==null||e.disconnect(),(t=this.parentObserver)==null||t.disconnect()}get _containerElement(){return this.querySelector("span[part=select-trigger-container]")}firstUpdated(e){var t;super.firstUpdated(e),this._adoptId(),this.moveLightDomChildrenInto(this._containerElement),(t=this._containerElement)==null||t.addEventListener("click",this.handleClick)}updated(e){var t;(t=super.updated)==null||t.call(this,e),e.has("id")&&this._adoptId()}_adoptId(){this.id&&(this._triggerId=this.id),this.removeAttribute("id")}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}getClassAttribute(){const e=this.getAttribute("class")||"",t=this.customClass||"",r=this.className||"";return e||t||r||""}filterConflictingWidthClasses(e,t){const r=/pont-w-[\w-[\]]+/;return r.test(t)?e.map(n=>n.split(/\s+/).filter(i=>!r.test(i)).join(" ")):e}render(){var o;const e=this.getClassAttribute(),t=this.filterConflictingWidthClasses(ne.trigger.trigger,e),r=((o=this._select)==null?void 0:o.disabled)||!1;return l`
2180
2180
  <button
2181
2181
  type="button"
2182
2182
  id=${this._triggerId!==""?this._triggerId:h}
@@ -2207,7 +2207,7 @@
2207
2207
  <path d="m6 9 6 6 6-6" />
2208
2208
  </svg>
2209
2209
  </button>
2210
- `}};Eh([a({type:String})],Sa.prototype,"id",2);Sa=Eh([p("pont-select-trigger")],Sa);var Pw=Object.defineProperty,Cw=Object.getOwnPropertyDescriptor,xh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Cw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Pw(t,r,n),n};let Ea=class extends y{constructor(){super(...arguments),this.placeholder="select a value",this.onStoreChange=()=>{this.requestUpdate()},this.renderLabel=()=>{var t;const e=(t=this._select)==null?void 0:t.selectStore;return e&&e.selectedValue!==void 0&&e.selectedValue!==""?e.selectedText||e.selectedValue:this.placeholder}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof vr);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),document.addEventListener("clicked-select-item",()=>{this.requestUpdate()})}disconnectedCallback(){this._select.selectStore.unsubscribe(this.onStoreChange)}createRenderRoot(){return this}render(){return l`
2210
+ `}};Eh([a({type:String})],Sa.prototype,"id",2);Sa=Eh([p("pont-select-trigger")],Sa);var Pw=Object.defineProperty,Cw=Object.getOwnPropertyDescriptor,xh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Cw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Pw(t,r,n),n};let Ea=class extends y{constructor(){super(...arguments),this.placeholder="select a value",this.onStoreChange=()=>{this.requestUpdate()},this.renderLabel=()=>{var t;const e=(t=this._select)==null?void 0:t.selectStore;return e&&e.selectedValue!==void 0&&e.selectedValue!==""?e.selectedText||e.selectedValue:this.placeholder}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof br);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),document.addEventListener("clicked-select-item",()=>{this.requestUpdate()})}disconnectedCallback(){this._select.selectStore.unsubscribe(this.onStoreChange)}createRenderRoot(){return this}render(){return l`
2211
2211
  <span part="select-value" class=${u(ne.value,this.className)}>
2212
2212
  ${this.renderLabel()}
2213
2213
  </span>
@@ -2349,13 +2349,13 @@
2349
2349
  </table>
2350
2350
  </div>
2351
2351
  </div>
2352
- `}};Mi([a({type:Array})],_o.prototype,"dataTable",2);Mi([a({type:Array})],_o.prototype,"footerData",2);Mi([a({type:String})],_o.prototype,"captionText",2);_o=Mi([p("pont-table")],_o);const Lw="pont-account-settings-dashboard-width",Fw="pont-account-settings-modal-width",kw="pont-account-settings-dashboard",Nw="pont-account-settings-page-reset-margin",Mw="pont-account-settings-modal-root",nt="pont",Pc={xs:640,sm:768};function Bw(){const e=Date.now().toString(36),t=Math.random().toString(36).substring(2,7);return`${nt}-${e}${t}`}function Uw(e,t){return`${e}-trigger-${t}`}function jw(e,t){return`${e}-content-${t}`}var qw=Object.defineProperty,zw=Object.getOwnPropertyDescriptor,wr=(e,t,r,o)=>{for(var n=o>1?void 0:o?zw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&qw(t,r,n),n};let Qe=class extends f{constructor(){super(...arguments),this._initialSyncDone=!1,this.orientation="horizontal",this.dir="ltr",this.activationMode="automatic",this._baseId=Bw(),this._onTriggerSelect=e=>{var r;const t=e.detail.value;this._isControlled?(r=this.onValueChange)==null||r.call(this,t):this._activeValue=t}}connectedCallback(){super.connectedCallback(),this._mutationObserver=new MutationObserver(()=>{this._sync()}),this._mutationObserver.observe(this,{childList:!0,subtree:!0})}disconnectedCallback(){var e;(e=this._mutationObserver)==null||e.disconnect(),super.disconnectedCallback()}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="tabs"]')}get _list(){return this.querySelector("pont-tabs-list")}get _triggers(){return Array.from(this.querySelectorAll("pont-tabs-trigger"))}get _contents(){return Array.from(this.querySelectorAll("pont-tabs-content"))}get _isControlled(){return this.value!==void 0}get _currentValue(){return this._isControlled?this.value:this._activeValue}_sync(){var r,o;if(!this._rootSlot)return;if((r=this._list)!=null&&r._listSlot){const n=this._list._listSlot;n.setAttribute("data-orientation",this.orientation),n.setAttribute("aria-orientation",this.orientation)}const e=this._triggers,t=this._contents;e.length!==0&&(!this._initialSyncDone&&!this._isControlled&&!this._activeValue&&(this._activeValue=this.defaultValue??((o=e[0])==null?void 0:o.value),this._initialSyncDone=!0),e.forEach(n=>{var c;const i=n._triggerSlot;if(!i)return;i.setAttribute("data-orientation",this.orientation),i.id||(i.id=Uw(this._baseId,n.value));const s=n.value===this._currentValue;i.setAttribute("data-state",s?"active":"inactive"),i.tabIndex=s?0:-1,i.setAttribute("aria-selected",String(s));const d=t.find(m=>m.value===n.value);d!=null&&d._contentSlot&&((c=d._contentSlot).id||(c.id=jw(this._baseId,d.value)),d._contentSlot.setAttribute("aria-labelledby",i.id),i.setAttribute("aria-controls",d._contentSlot.id))}),t.forEach(n=>{const i=n._contentSlot;if(!i)return;i.setAttribute("data-orientation",this.orientation);const s=n.value===this._currentValue;i.setAttribute("data-state",s?"active":"inactive"),i.toggleAttribute("hidden",!s)}))}async firstUpdated(){Array.from(this.childNodes).forEach(e=>{var t;e!==this._rootSlot&&((t=this._rootSlot)==null||t.appendChild(e))}),this.addEventListener("pont-tabs:trigger-select",this._onTriggerSelect),await this.updateComplete,await new Promise(e=>setTimeout(e,0)),this._sync()}updated(e){e.has("value")&&this._isControlled&&(this._activeValue=this.value),this._sync()}render(){return l`
2352
+ `}};Mi([a({type:Array})],_o.prototype,"dataTable",2);Mi([a({type:Array})],_o.prototype,"footerData",2);Mi([a({type:String})],_o.prototype,"captionText",2);_o=Mi([p("pont-table")],_o);const Lw="pont-account-settings-dashboard-width",Fw="pont-account-settings-modal-width",kw="pont-account-settings-dashboard",Nw="pont-account-settings-page-reset-margin",Mw="pont-account-settings-modal-root",nt="pont",Pc={xs:640,sm:768};function Bw(){const e=Date.now().toString(36),t=Math.random().toString(36).substring(2,7);return`${nt}-${e}${t}`}function Uw(e,t){return`${e}-trigger-${t}`}function jw(e,t){return`${e}-content-${t}`}var qw=Object.defineProperty,zw=Object.getOwnPropertyDescriptor,$r=(e,t,r,o)=>{for(var n=o>1?void 0:o?zw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&qw(t,r,n),n};let Qe=class extends f{constructor(){super(...arguments),this._initialSyncDone=!1,this.orientation="horizontal",this.dir="ltr",this.activationMode="automatic",this._baseId=Bw(),this._onTriggerSelect=e=>{var r;const t=e.detail.value;this._isControlled?(r=this.onValueChange)==null||r.call(this,t):this._activeValue=t}}connectedCallback(){super.connectedCallback(),this._mutationObserver=new MutationObserver(()=>{this._sync()}),this._mutationObserver.observe(this,{childList:!0,subtree:!0})}disconnectedCallback(){var e;(e=this._mutationObserver)==null||e.disconnect(),super.disconnectedCallback()}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="tabs"]')}get _list(){return this.querySelector("pont-tabs-list")}get _triggers(){return Array.from(this.querySelectorAll("pont-tabs-trigger"))}get _contents(){return Array.from(this.querySelectorAll("pont-tabs-content"))}get _isControlled(){return this.value!==void 0}get _currentValue(){return this._isControlled?this.value:this._activeValue}_sync(){var r,o;if(!this._rootSlot)return;if((r=this._list)!=null&&r._listSlot){const n=this._list._listSlot;n.setAttribute("data-orientation",this.orientation),n.setAttribute("aria-orientation",this.orientation)}const e=this._triggers,t=this._contents;e.length!==0&&(!this._initialSyncDone&&!this._isControlled&&!this._activeValue&&(this._activeValue=this.defaultValue??((o=e[0])==null?void 0:o.value),this._initialSyncDone=!0),e.forEach(n=>{var c;const i=n._triggerSlot;if(!i)return;i.setAttribute("data-orientation",this.orientation),i.id||(i.id=Uw(this._baseId,n.value));const s=n.value===this._currentValue;i.setAttribute("data-state",s?"active":"inactive"),i.tabIndex=s?0:-1,i.setAttribute("aria-selected",String(s));const d=t.find(m=>m.value===n.value);d!=null&&d._contentSlot&&((c=d._contentSlot).id||(c.id=jw(this._baseId,d.value)),d._contentSlot.setAttribute("aria-labelledby",i.id),i.setAttribute("aria-controls",d._contentSlot.id))}),t.forEach(n=>{const i=n._contentSlot;if(!i)return;i.setAttribute("data-orientation",this.orientation);const s=n.value===this._currentValue;i.setAttribute("data-state",s?"active":"inactive"),i.toggleAttribute("hidden",!s)}))}async firstUpdated(){Array.from(this.childNodes).forEach(e=>{var t;e!==this._rootSlot&&((t=this._rootSlot)==null||t.appendChild(e))}),this.addEventListener("pont-tabs:trigger-select",this._onTriggerSelect),await this.updateComplete,await new Promise(e=>setTimeout(e,0)),this._sync()}updated(e){e.has("value")&&this._isControlled&&(this._activeValue=this.value),this._sync()}render(){return l`
2353
2353
  <div
2354
2354
  data-slot="tabs"
2355
2355
  data-orientation=${this.orientation}
2356
2356
  dir=${this.dir}
2357
2357
  ></div>
2358
- `}};wr([a({attribute:"default-value",type:String})],Qe.prototype,"defaultValue",2);wr([a({type:String})],Qe.prototype,"value",2);wr([a({attribute:!1})],Qe.prototype,"onValueChange",2);wr([a({type:String})],Qe.prototype,"orientation",2);wr([a({type:String})],Qe.prototype,"dir",2);wr([a({attribute:"activation-mode",type:String})],Qe.prototype,"activationMode",2);wr([g()],Qe.prototype,"_activeValue",2);Qe=wr([p("pont-tabs")],Qe);var Vw=Object.defineProperty,Hw=Object.getOwnPropertyDescriptor,Rh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Hw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Vw(t,r,n),n};let Oa=class extends f{constructor(){super(...arguments),this.variant="default"}createRenderRoot(){return this}get _listSlot(){return this.querySelector('[data-slot="tabs-list"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._listSlot&&((r=this._listSlot)==null||r.appendChild(t))})}render(){return l`
2358
+ `}};$r([a({attribute:"default-value",type:String})],Qe.prototype,"defaultValue",2);$r([a({type:String})],Qe.prototype,"value",2);$r([a({attribute:!1})],Qe.prototype,"onValueChange",2);$r([a({type:String})],Qe.prototype,"orientation",2);$r([a({type:String})],Qe.prototype,"dir",2);$r([a({attribute:"activation-mode",type:String})],Qe.prototype,"activationMode",2);$r([g()],Qe.prototype,"_activeValue",2);Qe=$r([p("pont-tabs")],Qe);var Vw=Object.defineProperty,Hw=Object.getOwnPropertyDescriptor,Rh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Hw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Vw(t,r,n),n};let Oa=class extends f{constructor(){super(...arguments),this.variant="default"}createRenderRoot(){return this}get _listSlot(){return this.querySelector('[data-slot="tabs-list"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._listSlot&&((r=this._listSlot)==null||r.appendChild(t))})}render(){return l`
2359
2359
  <div
2360
2360
  data-slot="tabs-list"
2361
2361
  data-variant=${this.variant}
@@ -2645,8 +2645,8 @@
2645
2645
  </div>
2646
2646
  ${this.hasDefaultPagination&&this.hasDefaultSelect?this._renderPagination():h}
2647
2647
  </div>
2648
- `}};vt([a({type:String})],ct.prototype,"placeholder",2);vt([a({type:Array})],ct.prototype,"dataTable",2);vt([a({type:Boolean})],ct.prototype,"hasDefaultSelect",2);vt([a({type:Boolean})],ct.prototype,"hasDefaultPagination",2);vt([a({type:Boolean})],ct.prototype,"hasDefaultSearch",2);vt([a({type:Object})],ct.prototype,"checkedRows",2);vt([a({type:String})],ct.prototype,"searchTerm",2);vt([a({type:Object})],ct.prototype,"columnVisibility",2);vt([a({type:String})],ct.prototype,"sortColumn",2);vt([a({type:String})],ct.prototype,"sortDirection",2);vt([a({type:Object})],ct.prototype,"cellRenderers",2);vt([a({type:Object})],ct.prototype,"headerRenderers",2);vt([a({type:Array})],ct.prototype,"rowActions",2);vt([a({type:Array})],ct.prototype,"paginationLabels",2);vt([a({type:Number})],ct.prototype,"pageSize",2);vt([a({type:Number})],ct.prototype,"currentPage",2);vt([a({type:Array})],ct.prototype,"sortableColumns",2);vt([a({type:Array})],ct.prototype,"columnOrder",2);vt([a({type:Function})],ct.prototype,"isRowDisabled",2);ct=vt([p("pont-data-table")],ct);var G=class extends Error{constructor(t,r,o,n){super(r);S(this,"code");S(this,"details");S(this,"status");this.name="LoginflowError",this.code=t,this.details=o,this.status=n}};function Lh(e){const t=(e??"").trim();if(!t)throw new G("CONFIG_ERROR","domain is required");if(t.startsWith("/")){if(typeof location>"u")throw new G("CONFIG_ERROR",`domain "${t}" is relative to the page origin, and there is no page here`);return Nc(new URL(t,location.origin))}const r=/^https?:\/\//i.test(t)?"":`${U$(B$(t))?"http":"https"}://`;try{return Nc(new URL(`${r}${t}`))}catch{throw new G("CONFIG_ERROR",`domain "${t}" is not a hostname, an origin, or a path`)}}function Nc(e){return`${e.origin}${e.pathname}`.replace(/\/+$/,"")}function B$(e){return e.split("/")[0]}function U$(e){return/^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/i.test(e)}var ye,j$=(ye=class{constructor(){S(this,"data",new Map)}static get Instance(){return ye.instance||(ye.instance=new ye),ye.instance}get(t){return this.data.get(t)}set(t,r){this.data.set(t,r)}setConfig(t){this.data.set("config",t)}getConfig(){return this.data.get("config")}getApiBaseUrl(){return Lh(this.getConfig().domain)}apiIsSameOrigin(){if(typeof location>"u")return!1;try{return new URL(this.getApiBaseUrl()).host===location.host}catch{return!1}}remove(t){this.data.delete(t)}clear(){this.data.clear()}},S(ye,"instance"),ye),K=j$.Instance,_e,co=(_e=class{constructor(){}static get Instance(){return _e.instance||(_e.instance=new _e),_e.instance}async request(t,r={}){const o=K.getConfig(),n=`${K.getApiBaseUrl()}${t}`,i=5e4,s=new AbortController,d=setTimeout(()=>s.abort(),i);try{const c=await fetch(n,{...r,signal:s.signal,headers:{"Content-Type":"application/json",...o.headers,...r.headers}});if(clearTimeout(d),!c.ok){const m=await c.json().catch(()=>({}));throw new G(m.code||m.error||"API_ERROR",m.message||m.error_description||`HTTP ${c.status}: ${c.statusText}`,m.details,c.status)}return await c.json()}catch(c){throw clearTimeout(d),c instanceof G?c:c instanceof Error?c.name==="AbortError"?new G("TIMEOUT","Request timeout"):new G("NETWORK_ERROR",c.message):new G("UNKNOWN_ERROR","An unknown error occurred")}}async post(t,r){return this.request(t,{credentials:"include",method:"POST",body:r?JSON.stringify(r):void 0})}async get(t){return this.request(t,{credentials:"include",method:"GET"})}async getOptional(t){const r=K.getConfig(),o=await fetch(`${K.getApiBaseUrl()}${t}`,{credentials:"include",method:"GET",headers:{...r.headers}});if(o.status===204)return null;if(!o.ok)throw new G("API_ERROR",`HTTP ${o.status}: ${o.statusText}`,void 0,o.status);return await o.json()}async postForm(t,r){return this.request(t,{credentials:"include",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(r).toString()})}},S(_e,"instance"),_e),Fh="__Secure-pontive_session_state",ms="__Secure-pontive_session_probe";function q$(){return kh(Fh)?"present":z$()?"absent":"unknown"}function Aa(){if(!(typeof document>"u"||typeof location>"u"))for(const e of["",...G$(location.hostname)])Ta(Fh,"",e,0)}function z$(){if(typeof document>"u"||typeof location>"u")return!1;const e=H$();try{Ta(ms,"1",e,60);const t=kh(ms)==="1";return Ta(ms,"",e,0),t&&V$(e)}catch{return!1}}function V$(e){return e!==""||K.apiIsSameOrigin()}function H$(){let e;try{e=new URL(K.getApiBaseUrl()).hostname}catch{return""}const t=location.hostname;if(!e||!t||e.toLowerCase()===t.toLowerCase())return"";const r=t.split("."),o=e.split(".");let n=0;for(;n<r.length&&n<o.length&&r[r.length-1-n].toLowerCase()===o[o.length-1-n].toLowerCase();)n+=1;return n<2?"":o.slice(o.length-n).join(".")}function G$(e){const t=e.split("."),r=[];for(let o=1;o+2<=t.length;o+=1)r.push(t.slice(o).join("."));return r}function Ta(e,t,r,o){const n=K$()?"; Secure":"",i=r?`; Domain=${r}`:"";document.cookie=`${e}=${t}; Path=/; Max-Age=${o}; SameSite=Lax${i}${n}`}function K$(){return typeof globalThis.isSecureContext=="boolean"?globalThis.isSecureContext:location.protocol==="https:"}function kh(e){if(typeof document>"u"||!document.cookie)return null;for(const t of document.cookie.split(";")){const r=t.indexOf("=");if(!(r<0)&&t.slice(0,r).trim()===e)return t.slice(r+1).trim()||null}return null}var Pt,Et=(Pt=class{constructor(){S(this,"AUTH_SESSION_STORAGE_KEY","pontive_auth_session");S(this,"memorySession",null);S(this,"refreshTimeoutId",null);S(this,"refreshPromise",null);S(this,"refreshRetryCount",0);S(this,"refreshBlockedUntil",0);S(this,"sessionGeneration",0);S(this,"channel",null);S(this,"channelName","");S(this,"applyingBroadcast",!1);S(this,"restorePromise",null)}static get Instance(){return Pt.instance||(Pt.instance=new Pt),Pt.instance}setCurrentSession(t){this.sessionGeneration+=1,this.write(JSON.stringify(t)),this.publish({type:"session",session:t})}async withRefreshLock(t){const r=typeof navigator<"u"?navigator.locks:void 0;return r?r.request(this.channelKey("refresh"),t):t()}channelKey(t){const r=K.getConfig();return`pontive-${t}:${(r==null?void 0:r.domain)??""}:${(r==null?void 0:r.appId)??""}`}ensureChannel(){var r;if(typeof BroadcastChannel>"u")return null;const t=this.channelKey("session");return this.channel&&this.channelName===t?this.channel:((r=this.channel)==null||r.close(),this.channelName=t,this.channel=new BroadcastChannel(t),this.channel.onmessage=o=>this.receive(o.data),this.channel)}publish(t){var r;this.applyingBroadcast||(r=this.ensureChannel())==null||r.postMessage(t)}receive(t){this.applyingBroadcast=!0;try{if(t.type==="cleared"){this.clearSession();return}this.setCurrentSession(t.session),this.scheduleTokenRefresh()}finally{this.applyingBroadcast=!1}}isCurrentGeneration(t){return this.sessionGeneration===t}getCurrentSession(){const t=this.getStoredSession();return t?this.isSessionExpired(t)?(this.clearSession(),null):(this.shouldRefreshToken(t)&&this.triggerBackgroundRefresh(t),t):null}peekSession(){return this.getStoredSession()}isAuthenticated(){return this.getCurrentSession()!==null}getAuthenticatedUser(){const t=this.getCurrentSession();if(!t)return null;const r=t.id_token?this.decodeJWT(t.id_token):null;return r||(t.user??null)}cleanup(){var t;this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshPromise=null,(t=this.channel)==null||t.close(),this.channel=null,this.channelName=""}clearSession(){this.sessionGeneration+=1,this.memorySession=null,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY),this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.publish({type:"cleared"})}isSessionExpired(t){return!t||!t.expires_at?!0:Date.now()>=t.expires_at}cleanExpiredSession(){const t=this.getStoredSession();t&&this.isSessionExpired(t)&&this.clearSession()}getStoredSession(){const t=this.read();if(!t)return null;try{return JSON.parse(t)}catch{return this.clearSession(),null}}write(t){this.memorySession=t,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY)}read(){return this.memorySession}decodeJWT(t){try{const o=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(atob(o).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(n)}catch{return null}}shouldRefreshToken(t){if(!t||!t.expires_at)return!1;const r=Date.now(),o=t.expires_at,n=t.expires_in||3600,i=r+n*1e3*.2;return o<=i}scheduleTokenRefresh(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null);const t=this.getCurrentSession();if(!t||!t.expires_at)return;const r=Date.now(),o=t.expires_at,n=t.expires_in||3600,i=o-r-n*1e3*.2;i>0&&(this.refreshTimeoutId=setTimeout(()=>{this.triggerBackgroundRefresh(t)},i))}triggerBackgroundRefresh(t){this.refreshPromise||Date.now()<this.refreshBlockedUntil||(this.refreshPromise=this.withRefreshLock(()=>{const r=this.getStoredSession();return r&&!this.shouldRefreshToken(r)?(this.scheduleTokenRefresh(),Promise.resolve(null)):this.refreshTokens(r??t)}).then(r=>(r&&(this.setCurrentSession(r),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.scheduleTokenRefresh()),r)).catch(r=>(console.error("Background token refresh failed:",r),null)).finally(()=>{this.refreshPromise=null}))}async switchOrganization(t){if(!t)throw new G("INVALID_REQUEST","organizationId is required");return this.withRefreshLock(async()=>{const r=this.sessionGeneration,o=this.getCurrentSession(),n=await this.requestTokens(o,{organization_id:t});if(!this.isCurrentGeneration(r))throw new G("SESSION_CHANGED","the session changed while switching organization");return this.setCurrentSession(n),this.scheduleTokenRefresh(),n})}getOrganization(){const t=this.getCurrentSession(),r=t!=null&&t.access_token?this.decodeJWT(t.access_token):null,o=r==null?void 0:r.org_id;if(typeof o!="string"||o==="")return null;const n=i=>Array.isArray(i)?i.filter(s=>typeof s=="string"):[];return{id:o,roles:n(r==null?void 0:r.roles),permissions:n(r==null?void 0:r.permissions)}}async refreshTokens(t){const r=this.sessionGeneration;try{const o=await this.requestTokens(t);return this.isCurrentGeneration(r)?o:(console.warn("Token refresh returned after the session changed; discarding it"),null)}catch(o){return this.isCurrentGeneration(r)?W$(o)?(console.error("Token refresh rejected, signing out:",to(o)),Aa(),this.clearSession(),null):(console.warn("Token refresh failed, keeping session and retrying:",to(o)),this.scheduleRefreshRetry(t),null):(console.warn("Token refresh failed after the session changed; ignoring:",to(o)),null)}}async fetchUserInfo(t){try{return await co.Instance.request("/oauth2/userinfo",{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${t}`}})}catch(r){return console.debug("Could not read user info for the restored session:",to(r)),null}}async requestTokens(t,r={}){var i;const o={...r,grant_type:"refresh_token",client_id:(i=K.getConfig())==null?void 0:i.appId};t!=null&&t.refresh_token&&(o.refresh_token=t.refresh_token);const n=await co.Instance.postForm("/oauth2/token",o);return{id_token:n.id_token??(t==null?void 0:t.id_token)??"",access_token:n.access_token,refresh_token:n.refresh_token??(t==null?void 0:t.refresh_token),expires_in:n.expires_in,expires_at:Date.now()+n.expires_in*1e3}}async readCurrentToken(){var r;const t=(r=K.getConfig())==null?void 0:r.appId;if(!t)return null;try{const o=await co.Instance.getOptional(`/oauth2/session/token?client_id=${encodeURIComponent(t)}`);return!(o!=null&&o.access_token)||!(o.expires_in>0)?null:{id_token:"",access_token:o.access_token,expires_in:o.expires_in,expires_at:Date.now()+o.expires_in*1e3}}catch{return null}}async restoreSession(){const t=this.getStoredSession();return t&&!this.isSessionExpired(t)?t:q$()==="absent"?null:this.restorePromise?this.restorePromise:(this.restorePromise=this.withRefreshLock(async()=>{const r=this.getStoredSession();if(r&&!this.isSessionExpired(r))return r;try{const o=await this.readCurrentToken()??await this.requestTokens(null);return o.id_token||(o.user=await this.fetchUserInfo(o.access_token)??void 0),this.setCurrentSession(o),this.scheduleTokenRefresh(),o}catch(o){return Q$(o)&&Aa(),console.debug("No session to restore:",to(o)),null}}).finally(()=>{this.restorePromise=null}),this.restorePromise)}scheduleRefreshRetry(t){if(this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount>=Pt.MAX_REFRESH_RETRIES){console.warn("Token refresh gave up after",this.refreshRetryCount,"attempts"),this.refreshRetryCount=0,this.refreshBlockedUntil=0;return}const r=Math.min(Pt.REFRESH_RETRY_BASE_MS*2**this.refreshRetryCount,Pt.MAX_REFRESH_RETRY_DELAY_MS);this.refreshRetryCount+=1,this.refreshBlockedUntil=Date.now()+r,this.refreshTimeoutId=setTimeout(()=>{this.refreshBlockedUntil=0,this.triggerBackgroundRefresh(t)},r)}},S(Pt,"MAX_REFRESH_RETRIES",5),S(Pt,"REFRESH_RETRY_BASE_MS",5e3),S(Pt,"MAX_REFRESH_RETRY_DELAY_MS",6e4),S(Pt,"instance"),Pt);function W$(e){return!(e instanceof G)||e.status===void 0?!1:e.status===401?!0:e.status===400&&Y$.has(e.code)}var Y$=new Set(["invalid_grant","invalid_client"]);function Q$(e){return e instanceof G&&e.status!==void 0&&e.status>=400&&e.status<500}function to(e){return e instanceof G?`${e.code} (status ${e.status??"none"}): ${e.message}`:String(e)}var Nh=class{constructor(e=sessionStorage){S(this,"storage");S(this,"FLOW_STATE_KEY","pontive_loginflow_state");S(this,"FLOW_EXPIRY_MS",540*1e3);this.storage=e}getFlowState(){const e=this.storage.getItem(this.FLOW_STATE_KEY);if(!e)return null;try{const t=JSON.parse(e);return this.isExpired(t)?(this.clearFlowState(),null):t}catch{return this.clearFlowState(),null}}saveFlowState(e,t,r){const o=Date.now(),n=this.getFlowState(),i={flowType:e,flow_id:t,state:r.state,startedAt:(n==null?void 0:n.startedAt)||o,lastUpdatedAt:o,render_spec:r.render_spec};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(i))}restoreFromHistory(e){const t={flowType:e.flowType,flow_id:e.flow_id,state:e.state,startedAt:e.timestamp,lastUpdatedAt:e.timestamp,render_spec:void 0};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(t))}clearFlowState(){this.storage.removeItem(this.FLOW_STATE_KEY)}isExpired(e){return Date.now()-e.lastUpdatedAt>this.FLOW_EXPIRY_MS}get expiryMs(){return this.FLOW_EXPIRY_MS}},lr,Ii=(lr=class{static detect(t,r=window.location){if(lr.hasInviteToken(r))return"invitation";const o=r.pathname.toLowerCase();return t.invitationUrl&&o.includes(t.invitationUrl)?"invitation":o.includes(t.signinUrl)?"signin":o.includes(t.signupUrl)?"signup":"custom"}static hasInviteToken(t){try{return new URLSearchParams(t.search).has(lr.INVITE_TOKEN_PARAM)}catch{return!1}}},S(lr,"INVITE_TOKEN_PARAM","invite_token"),lr),Mh=class{constructor(){S(this,"listeners",new Map)}on(e,t){this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t)}off(e,t){var r;(r=this.listeners.get(e))==null||r.delete(t)}emit(e,t){const r=this.listeners.get(e);r&&r.forEach(o=>{try{o(t)}catch(n){console.error(`[FlowEventBus] Error in event handler for ${e}:`,n)}})}clear(){this.listeners.clear()}clearEvent(e){this.listeners.delete(e)}},Z$=class{getNavigationType(){const e=performance.getEntriesByType("navigation");if(e.length>0)return e[0].type;const t=performance.navigation;if(t)switch(t.type){case 1:return"reload";case 2:return"back_forward";default:return"navigate"}return"navigate"}},zt,J$=(zt=class{constructor(t,r,o=window.location,n,i){S(this,"httpClient",co.Instance);S(this,"flowId");S(this,"redirectTimeoutId",null);S(this,"flowStateManager");S(this,"flowEventBus");S(this,"location");S(this,"navigationTypeDetector");S(this,"eventHandlers",new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)],["continue_here",this.handleContinueHere.bind(this)]]));S(this,"linkWatchTimer",null);S(this,"linkWatchGeneration",0);S(this,"waitingForLink",!1);const s=K.getConfig();if(!s.domain)throw new G("CONFIG_ERROR","Domain is required");if(!s.appId)throw new G("CONFIG_ERROR","App ID is required");this.flowId=t,this.location=o,this.flowStateManager=n||new Nh,this.flowEventBus=r||new Mh,this.navigationTypeDetector=i||new Z$,Et.Instance.cleanExpiredSession(),Et.Instance.scheduleTokenRefresh()}static async init(t,r,o,n,i){const s=new zt(t,r,o,n,i),d=await s.initializeFlowInternal();return{sdk:s,flowType:d.flowType,isResumed:d.isResumed,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}async startFlow(t,r){if(!r.app_id)throw new G("VALIDATION_ERROR","Client ID is required");const o=`/auth/v1/authflows/${t}/start`;return this.executeFlowRequest(()=>this.httpClient.post(o,r),"START_FLOW_ERROR","Failed to start flow")}async resumeFlow(t,r){const o=r?`?continue=${encodeURIComponent(r)}`:"",n=`/auth/v1/authflows/${t}/resume${o}`;return this.executeFlowRequest(()=>this.httpClient.post(n),"RESUME_FLOW_ERROR","Failed to resume flow")}async processEvent(t,r){if(!t.event)throw new G("VALIDATION_ERROR","Event type is required");const o=this.eventHandlers.get(t.event);return o?await o():await this.processServerEvent(t,r)}async executeFlowRequest(t,r,o,n){try{const i=await t();return n&&await n(i),this.processAuthResult(i.auth_result),i.redirection&&this.redirect(i.redirection),i}catch(i){throw i instanceof G?i:new G(r,o,i instanceof Error?{originalError:i.message,stack:i.stack}:i)}}async processServerEvent(t,r){let o=this.flowStateManager.getFlowState();if(!o&&(console.warn("Flow state expired, restarting flow before processing event"),await this.initializeFlowInternal(),o=this.flowStateManager.getFlowState(),!o))throw new G("FLOW_RESTART_ERROR","Failed to restart flow - no flow state after initialization");const n=o.state,i=`/auth/v1/authflows/${o.flowType}/events`,s=this.waitingForLink;this.stopWatchingForLink();let d;try{d=await this.executeFlowRequest(()=>this.httpClient.post(i,t),"PROCESS_EVENT_ERROR","Failed to process event",r)}catch(c){if(s&&zt.flowIsGone(c))return this.announceContinuedElsewhere(o.flowType,""),{state:""};throw c}if(this.watchForLink(o.flowType,d),!d.auth_result){this.flowStateManager.saveFlowState(o.flowType,o.flow_id,d);const c=this.flowStateManager.getFlowState();if(c){const m=n!==d.state;this.flowEventBus.emit("flow:updated",{flowState:c,isNewStep:m})}}return d}processAuthResult(t){if(t){const r={id_token:t.id_token,access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,expires_at:Date.now()+t.expires_in*1e3};Et.Instance.setCurrentSession(r),Et.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState();const{onAuthenticated:o}=K.getConfig();if(o){o(r);return}console.warn("pontive: signed in, but no onAuthenticated was supplied, so the SDK cannot route the user. Supply onAuthenticated to handle the handoff.")}}async initializeFlowInternal(){const t=K.getConfig(),r=Ii.detect(t,this.location);this.validateFlowType(r);const o=this.flowStateManager.getFlowState();return this.shouldResumeFlow(o,r)?await this.resumeExistingFlow(o,r):await this.startNewFlow(r)}validateFlowType(t){if(t==="custom"&&!this.flowId)throw new G("FLOW_ID_ERROR","Flow ID is required for custom flows")}shouldResumeFlow(t,r){const n=new URLSearchParams(this.location.search).get("resume")==="true";if(!t)return n;const i=this.navigationTypeDetector.getNavigationType();if(i==="navigate"&&!n)return this.flowStateManager.clearFlowState(),console.log(`Fresh navigation detected (type: ${i}), starting new flow`),!1;if(t.flowType!==r)return this.flowStateManager.clearFlowState(),console.log(`Flow type changed from ${t.flowType} to ${r}, starting new flow, flow_id: ${this.flowId}`),!1;if(r==="custom"&&t.flow_id!==this.flowId)return this.flowStateManager.clearFlowState(),console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`),!1;const s=n?"explicit resume=true":`navigation type: ${i}`;return console.log(`Resuming existing flow (${s})`),!0}async resumeExistingFlow(t,r){try{const o=await this.resumeFlow(r,this.continueParam());if(this.watchForLink(r,o),!o.auth_result){this.flowStateManager.saveFlowState(r,(t==null?void 0:t.flow_id)??this.determineFlowId(r),o);const n=this.flowStateManager.getFlowState();n&&this.flowEventBus.emit("flow:resumed",{flowState:n})}return{flowType:r,isResumed:!0,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result}}catch(o){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",o),await this.startNewFlow(r)}}async startNewFlow(t){const r=K.getConfig(),o=new URLSearchParams(this.location.search),n={};o.forEach((c,m)=>{n[m]=c}),r.organizationId&&!n.organization_id&&(n.organization_id=r.organizationId),console.log("metadata",n);const i=o.get("locales")||r.locales||void 0,s={app_id:r.appId,origin_url:this.location.href,signin_url:r.signinUrl,signup_url:r.signupUrl,locales:i,flow_id:this.determineFlowId(t),metadata:n},d=await this.startFlow(t,s);if(this.watchForLink(t,d),!d.auth_result){this.flowStateManager.saveFlowState(t,s.flow_id,d);const c=this.flowStateManager.getFlowState();c&&this.flowEventBus.emit("flow:started",{flowState:c})}return{flowType:t,isResumed:!1,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}determineFlowId(t){switch(t){case"signin":return this.flowId||"signin-flow";case"signup":return this.flowId||"signup-flow";case"invitation":return this.flowId||"invitation-flow";case"custom":if(!this.flowId)throw new G("FLOW_ID_ERROR","Flow ID is required for custom flows");return this.flowId}}continueParam(){const t=new URLSearchParams(this.location.search);if(t.get("resume")==="true")return t.get("continue")??void 0}watchForLink(t,r){if(this.stopWatchingForLink(),this.waitingForLink=r.waiting_for_link===!0,!this.waitingForLink)return;const o=this.linkWatchGeneration,n=Date.now()+zt.LINK_POLL_LIMIT_MS,i=()=>{this.linkWatchTimer=setTimeout(s,zt.LINK_POLL_INTERVAL_MS)},s=async()=>{if(o!==this.linkWatchGeneration||Date.now()>n)return;if(typeof document<"u"&&document.hidden){i();return}let d;try{d=await this.httpClient.post(`/auth/v1/authflows/${t}/resume`)}catch(c){o===this.linkWatchGeneration&&zt.flowIsGone(c)&&this.announceContinuedElsewhere(t,"");return}if(o===this.linkWatchGeneration){if(d.waiting_for_link){i();return}this.announceContinuedElsewhere(t,d.state)}};i()}announceContinuedElsewhere(t,r){var o,n;this.stopWatchingForLink(),this.flowStateManager.clearFlowState(),(n=(o=K.getConfig()).onFlowStateChange)==null||n.call(o,{eventType:"flow_continued_elsewhere",flowType:t,state:r})}static flowIsGone(t){return t instanceof G&&t.status===401}stopWatchingForLink(){this.waitingForLink=!1,this.linkWatchGeneration++,this.linkWatchTimer!==null&&(clearTimeout(this.linkWatchTimer),this.linkWatchTimer=null)}async handleContinueHere(){const{continueHereUrl:t}=K.getConfig();this.flowStateManager.clearFlowState();let r=t;if(!r){const o=new URL(this.location.href);o.searchParams.delete("resume"),o.searchParams.delete("continue"),r=o.toString()}return this.redirect({url:r,redirect_delay:0}),{state:"End"}}async handleSwitchToSignin(){const t=K.getConfig();return this.redirect({url:this.withCurrentQuery(t.signinUrl),redirect_delay:0}),{state:"End"}}async handleSwitchToSignup(){const t=K.getConfig();return this.redirect({url:this.withCurrentQuery(t.signupUrl),redirect_delay:0}),{state:"End"}}withCurrentQuery(t){const r=this.location.search;return!r||r==="?"?t:t.includes("?")?`${t}&${r.slice(1)}`:`${t}${r}`}redirect(t){t.url&&(this.redirectTimeoutId!==null&&(console.log("Clearing existing redirect timeout before scheduling new redirect to:",t.url),clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.redirectTimeoutId=setTimeout(()=>{this.location.href=t.url},t.redirect_delay*1e3))}reloadPage(){setTimeout(()=>{this.location.reload()},0)}getEventBus(){return this.flowEventBus}cleanup(){this.stopWatchingForLink(),this.redirectTimeoutId&&(clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.flowEventBus.clear()}},S(zt,"LINK_POLL_INTERVAL_MS",3e3),S(zt,"LINK_POLL_LIMIT_MS",900*1e3),zt),X$=class{constructor(e){S(this,"delayMs");S(this,"timerId",null);this.delayMs=e}debounce(e){this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{e(),this.timerId=null},this.delayMs)}cancel(){this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}isPending(){return this.timerId!==null}},tP=class{pushState(e,t,r){history.pushState(e,t,r)}replaceState(e,t,r){history.replaceState(e,t,r)}get state(){return history.state}},eP=class{constructor(e,t,r=!1,o=window.location,n,i){S(this,"popstateListener",null);S(this,"pageshowListener",null);S(this,"debouncer");S(this,"isProcessing",!1);S(this,"isHandlingNavigationEvent",!1);S(this,"onFlowRestartNeeded",null);S(this,"skipHistoryTracking");S(this,"flowStateManager");S(this,"historyAdapter");S(this,"location");this.onFlowRestartNeeded=t,this.skipHistoryTracking=r,this.debouncer=new X$(200),this.location=o,this.flowStateManager=n||new Nh,this.historyAdapter=i||new tP,this.subscribeToFlowEvents(e),this.initializeListener()}subscribeToFlowEvents(e){e.on("flow:started",this.handleFlowStart.bind(this)),e.on("flow:updated",this.handleFlowUpdate.bind(this)),e.on("flow:resumed",this.handleFlowResume.bind(this))}initializeListener(){this.popstateListener=e=>{console.log("[NavigationManager] popstate event received"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Debounce timeout fired, handling popstate"),this.handlePopState(e)})},this.pageshowListener=e=>{e.persisted&&(console.log("[NavigationManager] Page restored from bfcache"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Handling bfcache restoration"),this.handleBfcacheRestoration()}))},window.addEventListener("popstate",this.popstateListener),window.addEventListener("pageshow",this.pageshowListener)}async handlePopState(e){if(this.isProcessing){console.log("[NavigationManager] Already processing popstate, skipping");return}console.log("[NavigationManager] Starting popstate processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const t=e.state,r=this.flowStateManager.getFlowState(),o=K.getConfig(),n=Ii.detect(o,this.location);if(t&&this.restoreHistoryStateToSession(t),this.shouldRestartFlow(t,r,n)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from history")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}async handleBfcacheRestoration(){if(this.isProcessing){console.log("[NavigationManager] Already processing bfcache restoration, skipping");return}console.log("[NavigationManager] Starting bfcache restoration processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const e=this.historyAdapter.state,t=this.flowStateManager.getFlowState(),r=K.getConfig(),o=Ii.detect(r,this.location);if(e&&this.restoreHistoryStateToSession(e),this.shouldRestartFlow(e,t,o)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from bfcache")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}restoreHistoryStateToSession(e){console.log("[NavigationManager] Restoring history state to session storage:",e),this.flowStateManager.restoreFromHistory(e)}shouldRestartFlow(e,t,r){return e&&e.flowType!==r?(console.log("[NavigationManager] Flow type changed via navigation:",e.flowType,"→",r),this.flowStateManager.clearFlowState(),!0):e?Date.now()-e.timestamp>this.flowStateManager.expiryMs?(console.log("[NavigationManager] History state expired, clearing and restarting flow"),this.flowStateManager.clearFlowState(),!0):(console.log("[NavigationManager] Valid history state restored, triggering restart to resume flow"),!0):(console.log("[NavigationManager] No history state, skipping"),!1)}async triggerFlowRestart(){this.onFlowRestartNeeded&&await this.onFlowRestartNeeded()}createHistoryState(e){return{flowType:e.flowType,flow_id:e.flow_id,state:e.state,timestamp:Date.now()}}updateBrowserHistory(e,t){if(this.skipHistoryTracking){console.log("[NavigationManager] Skipping history tracking (created from navigation)");return}const r=this.createHistoryState(e);try{t==="push"?(this.historyAdapter.pushState(r,"",this.location.href),console.log("[NavigationManager] Pushed state to history")):(this.historyAdapter.replaceState(r,"",this.location.href),console.log("[NavigationManager] Replaced state in history"))}catch(o){console.error("[NavigationManager] Failed to update history:",o)}}handleFlowStart(e){this.updateBrowserHistory(e.flowState,"replace")}handleFlowUpdate(e){const t=this.isHandlingNavigationEvent||!e.isNewStep?"replace":"push";this.updateBrowserHistory(e.flowState,t)}handleFlowResume(e){this.updateBrowserHistory(e.flowState,"replace")}destroy(){this.debouncer.cancel(),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.onFlowRestartNeeded=null}},Rr=new AbortController,rP=class{constructor(){S(this,"httpClient",co.Instance);S(this,"capabilities",{webauthn:!1});S(this,"capabilitiesDetected",!1)}async detectCapabilities(){if(!this.capabilitiesDetected)try{if(typeof window.PublicKeyCredential=="function"?this.capabilities.webauthn=!0:this.capabilities.webauthn=!1,typeof PublicKeyCredential.getClientCapabilities=="function"){const e=await PublicKeyCredential.getClientCapabilities();this.capabilities={...this.capabilities,...e};return}typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable=="function"&&(this.capabilities.userVerifyingPlatformAuthenticator=await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()),(PublicKeyCredential==null?void 0:PublicKeyCredential.isConditionalMediationAvailable)!==void 0&&typeof PublicKeyCredential.isConditionalMediationAvailable=="function"?this.capabilities.conditionalGet=await PublicKeyCredential.isConditionalMediationAvailable():this.capabilities.conditionalGet=!1}finally{this.capabilitiesDetected=!0}}async fetchPublicKeyCredentialRequestOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/login/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async fetchPublicKeyCredentialCreationOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/register/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async startRegistration(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialCreationOptionsJSON provided"),null;Rr.abort(),Rr=new AbortController;const r=this.toPublicKeyCredentialCreationOptions(e),o={signal:Rr.signal,publicKey:r};if(t){if(!this.isConditionalCreateAvailable())return console.error("Conditional create mediation not supported in this browser"),null;o.mediation="conditional"}try{const n=await navigator.credentials.create(o);if(!n){console.error("no credential returned by authenticator");return}const{id:i,rawId:s,response:d,type:c}=n;let m;typeof d.getTransports=="function"&&(m=d.getTransports());let v;if(typeof d.getPublicKeyAlgorithm=="function")try{v=d.getPublicKeyAlgorithm()}catch(_){gs("getPublicKeyAlgorithm()",_)}let b;if(typeof d.getPublicKey=="function")try{const _=d.getPublicKey();_!==null&&(b=this.bufferToBase64URLString(_))}catch(_){gs("getPublicKey()",_)}let w;if(typeof d.getAuthenticatorData=="function")try{w=this.bufferToBase64URLString(d.getAuthenticatorData())}catch(_){gs("getAuthenticatorData()",_)}return{id:i,rawId:this.bufferToBase64URLString(s),response:{attestationObject:this.bufferToBase64URLString(d.attestationObject),clientDataJSON:this.bufferToBase64URLString(d.clientDataJSON),transports:m,publicKeyAlgorithm:v,publicKey:b,authenticatorData:w},type:c,clientExtensionResults:n.getClientExtensionResults(),authenticatorAttachment:this.toAuthenticatorAttachment(n.authenticatorAttachment)}}catch(n){const i=this.identifyAuthenticationError({error:n,options:o});return i instanceof Ir?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",n),null}}async startAuthentication(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialRequestOptionsJSON provided"),null;if(!this.isWebAuthnAvailable())return console.error("WebAuthn not supported in this browser"),null;Rr.abort(),Rr=new AbortController;const r=this.toPublicKeyCredentialRequestOptions(e),o={signal:Rr.signal,publicKey:r};if(t){if(!this.isConditionalGetAvailable())return console.error("Conditional mediation not supported in this browser"),null;o.mediation="conditional",o.publicKey&&(o.publicKey.allowCredentials=[])}try{const n=await navigator.credentials.get(o);return this.toPublicKeyCredentialJSON(n)}catch(n){const i=this.identifyAuthenticationError({error:n,options:o});return i instanceof Ir?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",n),null}}async signalUnknownCredential(e,t){if(await this.detectCapabilities(),this.isSignalUnknownCredentialAvailable())try{await PublicKeyCredential.signalUnknownCredential({rpId:e,credentialId:t})}catch(r){console.error("Failed to signal unknown credential:",r)}else console.warn("signalUnknownCredential not supported in this browser")}async signalCurrentUserDetails(e){if(await this.detectCapabilities(),this.isSignalCurrentUserDetailsAvailable())try{await PublicKeyCredential.signalCurrentUserDetails(e)}catch(t){console.error("Failed to signal current user details:",t)}else console.warn("signalCurrentUserDetails not supported. Ask user to update manually.")}toPublicKeyCredentialDescriptor(e){const{id:t}=e;return{...e,id:this.base64URLStringToBuffer(t),type:e.type,transports:e.transports}}toAuthenticatorAttachment(e){const t=["cross-platform","platform"];if(e&&!(t.indexOf(e)<0))return e}bufferToBase64URLString(e){const t=new Uint8Array(e);let r="";for(const n of t)r+=String.fromCharCode(n);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}base64URLStringToBuffer(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-t.length%4)%4,o=t.padEnd(t.length+r,"="),n=atob(o),i=new ArrayBuffer(n.length),s=new Uint8Array(i);for(let d=0;d<n.length;d++)s[d]=n.charCodeAt(d);return i}toPublicKeyCredentialJSON(e){if(typeof e.toJSON=="function")return e.toJSON();const t=e.response;return{id:e.id,type:e.type,rawId:this.bufferToBase64URLString(e.rawId),authenticatorAttachment:this.toAuthenticatorAttachment(e.authenticatorAttachment),clientExtensionResults:e==null?void 0:e.getClientExtensionResults(),response:{clientDataJSON:this.bufferToBase64URLString(t.clientDataJSON),authenticatorData:this.bufferToBase64URLString(t.authenticatorData),signature:this.bufferToBase64URLString(t.signature),userHandle:t.userHandle?this.bufferToBase64URLString(t.userHandle):void 0}}}toPublicKeyCredentialCreationOptions(e){var r;if(typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge),rp:{id:e.rp.id,name:e.rp.name},user:{displayName:e.user.displayName,id:this.base64URLStringToBuffer(e.user.id),name:e.user.name},pubKeyCredParams:e.pubKeyCredParams.map(o=>({alg:o.alg,type:o.type})),timeout:e.timeout};if(e.attestation&&(t.attestation=e.attestation),e.extensions!==void 0&&(t.extensions=e.extensions),e.authenticatorSelection){const o={};e.authenticatorSelection.authenticatorAttachment&&(o.authenticatorAttachment=e.authenticatorSelection.authenticatorAttachment),e.authenticatorSelection.requireResidentKey&&(o.requireResidentKey=e.authenticatorSelection.requireResidentKey),e.authenticatorSelection.residentKey&&(o.residentKey=e.authenticatorSelection.residentKey),e.authenticatorSelection.userVerification&&(o.userVerification=e.authenticatorSelection.userVerification),t.authenticatorSelection=o}return(r=e.excludeCredentials)!=null&&r.length&&(t.excludeCredentials=e.excludeCredentials.map(o=>this.toPublicKeyCredentialDescriptor(o))),t}toPublicKeyCredentialRequestOptions(e){var r;if(typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge)};return e.rpId!==void 0&&(t.rpId=e.rpId),e.timeout!==void 0&&(t.timeout=e.timeout),e.userVerification!==void 0&&(t.userVerification=e.userVerification),e.extensions!==void 0&&(t.extensions=e.extensions),(r=e.allowCredentials)!=null&&r.length&&(t.allowCredentials=e.allowCredentials.map(o=>this.toPublicKeyCredentialDescriptor(o))),t}identifyAuthenticationError({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ir({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Ir({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(nP(o)){if(r.rpId!==o)return new Ir({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ir({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Ir({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}isPublicKeyCredentialRequestOptionsJSON(e){return typeof e=="object"&&e!==null&&"challenge"in e}isWebAuthnAvailable(){return this.capabilities.webauthn}isSignalAllAcceptedCredentialsAvailable(){return!!this.capabilities.signalAllAcceptedCredentials}isSignalCurrentUserDetailsAvailable(){return!!this.capabilities.signalCurrentUserDetails}isSignalUnknownCredentialAvailable(){return!!this.capabilities.signalUnknownCredential}isConditionalGetAvailable(){return!!this.capabilities.conditionalGet}isConditionalCreateAvailable(){return!!this.capabilities.conditionalCreate}isHybridTransportAvailable(){return!!this.capabilities.hybridTransport}destroy(){Rr.abort()}};function gs(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
2649
- `,t)}var Ir=class extends Error{constructor({message:t,code:r,cause:o,name:n}){super(t);S(this,"code");this.name=n??o.name,this.code=r}};function nP(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var we,oP=(we=class{constructor(){S(this,"configured",!1);S(this,"configuredResolve");S(this,"configuredPromise",new Promise(t=>{this.configuredResolve=t}));S(this,"loginflow",null);S(this,"navigationManager",null);S(this,"flowEventBus",null);S(this,"webauthnService",null)}static get Instance(){return we.instance||(we.instance=new we),we.instance}ensureConfigured(){if(!this.configured)throw new G("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new G("LOGINFLOW_NOT_INITIALIZED","Call Auth.startLoginflow() first")}async startLoginflowInternal(t,r=!1){this.ensureConfigured(),this.webauthnService&&(console.log("[AuthService] Cleaning up and aborting ongoing webauthn flows"),this.webauthnService.destroy(),this.webauthnService=null),this.loginflow&&(console.log("[AuthService] Cleaning up old loginflow instance"),this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(console.log("[AuthService] Cleaning up old navigation manager instance"),this.navigationManager.destroy(),this.navigationManager=null),this.webauthnService=new rP,this.webauthnService.detectCapabilities(),this.flowEventBus=new Mh,this.navigationManager=new eP(this.flowEventBus,async()=>{console.log("[AuthService] Navigation restart triggered, restarting loginflow"),await this.startLoginflowInternal(void 0,!1)},r);const o=await J$.init(t,this.flowEventBus),n=K.getConfig();this.startPasskeyAuthentication(o.flowType,!0),this.loginflow=o.sdk;const i={flowType:o.flowType,isResumed:o.isResumed,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result};return n.onFlowStateChange&&n.onFlowStateChange({eventType:o.isResumed?"flow_resumed":"flow_started",flowType:o.flowType,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result,isResumed:o.isResumed}),i}configure(t){if(!t.domain||!t.appId)throw new G("CONFIG_ERROR","domain and appId are required");K.setConfig(t),this.configured=!0,this.configuredResolve()}whenConfigured(){return this.configuredPromise}isAuthenticated(){return this.ensureConfigured(),Et.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),Et.Instance.getCurrentSession()}async restoreSession(){return this.ensureConfigured(),Et.Instance.restoreSession()}getAuthenticatedUser(){return this.ensureConfigured(),Et.Instance.getAuthenticatedUser()}getOrganization(){return this.ensureConfigured(),Et.Instance.getOrganization()}async switchOrganization(t){return this.ensureConfigured(),Et.Instance.switchOrganization(t)}async startLoginflow(t){return this.startLoginflowInternal(t,!1)}async processLoginflowEvent(t){var i,s;this.ensureConfigured(),this.ensureLoginflowInitialized();const r=K.getConfig(),o=Ii.detect(r,location);if(t.event==="signin_with_passkey"&&!((i=t.data)!=null&&i.credential_request)){const d=await this.getPasskeyCredential(o,!1);if(!d||!d.cred)return console.error("no credential returned by browser"),{state:""};t.data={credential_request:d.cred}}if(t.event==="register_passkey"&&!((s=t.data)!=null&&s.conditional)){console.log("attempt to register a passkey");const d=await this.createPasskeyCredential(o,!1);if(!d)return console.error("no credential created by browser"),{state:""};t.data={credential_creation_response:d,conditional:!1}}const n=await this.loginflow.processEvent(t,async d=>{var c;if((c=d.data)!=null&&c.conditional_create_enabled){console.log("attempt to register a passkey conditionally");const m=await this.registerPasskey(o,!0);m&&(m.render_spec=void 0,d.render_spec=void 0)}});if(console.log("render spec",n.render_spec),r.onFlowStateChange){const d=sessionStorage.getItem("pontive_loginflow_state");let c="custom";if(d)try{c=JSON.parse(d).flowType}catch(m){console.error("Failed to parse flow state:",m)}r.onFlowStateChange({eventType:"flow_updated",flowType:c,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result})}return n}async getPasskeyCredential(t,r){var n,i;const o=await((n=this.webauthnService)==null?void 0:n.fetchPublicKeyCredentialRequestOptions(t,r));if(!o)return console.error("failed to fetch public key request options"),null;try{return{cred:await((i=this.webauthnService)==null?void 0:i.startAuthentication(o,r)),options:o}}catch(s){return console.error("error starting authentication",s),null}}async startPasskeyAuthentication(t,r=!1){var s,d;const o=await this.getPasskeyCredential(t,r);if(!o||!o.cred){console.error("no credential found");return}const{cred:n,options:i}=o;try{((s=(await this.processLoginflowEvent({event:"signin_with_passkey",data:{credential_request:n}})).data)==null?void 0:s.error)==="CredentialNotFound"&&(i.rpId&&n.id?(d=this.webauthnService)==null||d.signalUnknownCredential(i.rpId,n.id):console.log("missing rpId or credential id for signalUnknownCredential"))}catch(c){console.error("failed to signin with passkey",c)}}async createPasskeyCredential(t,r){var o,n;try{const i=await((o=this.webauthnService)==null?void 0:o.fetchPublicKeyCredentialCreationOptions(t,r));if(!i){console.warn("no credential creation option returned by webauthn service"),console.log("skipping conditional passkey registration...");return}return(n=this.webauthnService)==null?void 0:n.startRegistration(i,r)}catch(i){console.log("error",i)}}async registerPasskey(t,r=!1){try{const o=await this.createPasskeyCredential(t,r),n=await this.processLoginflowEvent({event:"register_passkey",data:{credential_creation_response:o,conditional:r}});return console.log("passkey creation res",n),n}catch(o){console.log("error",o)}}invalidateSession(){Et.Instance.clearSession()}async signOut(t){var n;this.ensureConfigured();const r=iP(Et.Instance.peekSession()),o=((n=K.getConfig())==null?void 0:n.appId)??"";if(Aa(),Et.Instance.clearSession(),Et.Instance.cleanup(),this.loginflow&&(this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(this.navigationManager.destroy(),this.navigationManager=null),this.flowEventBus&&(this.flowEventBus.clear(),this.flowEventBus=null),!K.apiIsSameOrigin()){window.location.assign(this.logoutUrl(r,o,t==null?void 0:t.returnTo));return}await this.endServerSession(r,o),window.location.reload()}async endServerSession(t,r){try{await fetch(`${K.getApiBaseUrl()}/oauth2/logout`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:r,...t?{logout_hint:t}:{}}).toString()})}catch(o){console.warn("Could not end the session at the authorization server:",o)}}logoutUrl(t,r,o){const n=new URLSearchParams({post_logout_redirect_uri:o??`${window.location.origin}${window.location.pathname}`,client_id:r});return t&&n.set("logout_hint",t),`${K.getApiBaseUrl()}/oauth2/logout?${n.toString()}`}},S(we,"instance"),we);function iP(e){for(const t of[e==null?void 0:e.id_token,e==null?void 0:e.access_token]){if(!t)continue;const r=Et.Instance.decodeJWT(t);if(typeof(r==null?void 0:r.sid)=="string"&&r.sid)return r.sid}}var H=oP.Instance,sP=Object.defineProperty,aP=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&sP(t,r,n),n};class jt extends f{constructor(){super(),this.shadow=!1,this.__initialAttributesCache=null}parseJsonAttribute(t){try{const r=this.getAttribute(t);return r?JSON.parse(r):{}}catch{return{}}}get sbStyle(){return this.parseJsonAttribute("pont-style")}getAttributesToExclude(){return[]}getFilteredAttributes(){const t={};return Array.from(this.attributes).forEach(r=>{this.getAttributesToExclude().includes(r.name)||(t[r.name]=r.value??"")}),t}isCustomPropertySet(t){const r=getComputedStyle(this).getPropertyValue(t).trim();return r!=="inherit"&&r.length>0}applyCustomClass(t,r,o=""){var n,i;t.some(s=>this.isCustomPropertySet(s))&&((i=(n=this.shadowRoot)==null?void 0:n.querySelector(r))==null||i.classList.add(o))}moveAttributesToElement(t,r=["id","class"]){t&&r.forEach(o=>{const n=this.getAttribute(o);n!==null&&(t.setAttribute(o,n),this.removeAttribute(o))})}removeAttributesFromHost(t=["id","class"]){t.forEach(r=>{this.hasAttribute(r)&&this.removeAttribute(r)})}captureHostAttributes(){if(this.__initialAttributesCache)return this.__initialAttributesCache;const t={};return Array.from(this.attributes).forEach(r=>{t[r.name]=r.value}),this.__initialAttributesCache=t,t}getHostClass(){return this.captureHostAttributes().class??""}removeDuplicateContent(){var i;const t=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{var d;return s.nodeType===Node.COMMENT_NODE||s.nodeType===Node.TEXT_NODE&&!((d=s.textContent)!=null&&d.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=new Map,o=[];let n;for(;n=t.nextNode();){let s;if(n.nodeType===Node.TEXT_NODE){const d=(i=n.textContent)==null?void 0:i.trim();if(!d)continue;s=`text:${d}`}else if(n instanceof HTMLElement){const d=Array.from(n.attributes).map(c=>`${c.name}=${c.value}`).sort().join(":");s=`element:${n.tagName}:${d}`}else continue;if(r.has(s)){const d=r.get(s);d!=null&&d.parentNode&&o.push(d),r.set(s,n)}else r.set(s,n)}o.forEach(s=>{var d;return(d=s.parentNode)==null?void 0:d.removeChild(s)})}moveLightDomChildrenInto(t,r){let o;r!=null&&r.length?(o=r.filter(n=>this.contains(n)&&n!==t&&!n.contains(t)),o.forEach(n=>{const i=Array.from(t.childNodes).find(s=>{var d;return(d=s.isEqualNode)==null?void 0:d.call(s,n)});i&&t.removeChild(i)})):o=Array.from(this.childNodes).filter(n=>n!==t&&!t.contains(n)&&!n.contains(t)),o.forEach(n=>t.appendChild(n))}}aP([a({type:Boolean})],jt.prototype,"shadow");const $r="pont:auth",en={showWatermark:!0},Hn="pont:branding";class lP{constructor(t){this.consumer=new ui(t,{context:Hn,subscribe:!0})}get showWatermark(){var t;return((t=this.consumer.value)==null?void 0:t.showWatermark)??en.showWatermark}}const Bh="pont:design-mode";class Fo{constructor(t){this.host=t,this.consumer=new ui(t,{context:Bh,subscribe:!0})}get active(){return this.host.hasAttribute("design-mode")?this.host.getAttribute("design-mode")!=="false":this.consumer.value??!1}}const Uh="pont:env",Bi=Symbol("renderSpecContext"),ko="pont-user-context",Ui="";var dP=Object.defineProperty,cP=Object.getOwnPropertyDescriptor,No=(e,t,r,o)=>{for(var n=o>1?void 0:o?cP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&dP(t,r,n),n};exports.PontKitLayout=class extends f{constructor(){super(...arguments),this.spec="",this.designMode=!1,this.branding=en,this.handleError=t=>{var r;return console.error("pont-form error",(r=t.detail)==null?void 0:r.message)}}set renderSpec(t){this.spec=t,this.requestUpdate()}createRenderRoot(){return this}updated(){this.renderDynamicContent()}renderDynamicContent(){if(!this.spec)return;const r=(this.shadowRoot||this).querySelector("#dynamic-content");r&&(r.innerHTML=this.spec,r.querySelectorAll("*").forEach(o=>{o.localName.includes("-")&&!customElements.get(o.localName)?exports.PontKitLayout.reportUnregistered(o.localName):customElements.upgrade(o)}))}static reportUnregistered(t){exports.PontKitLayout.reportedUnregistered.has(t)||(exports.PontKitLayout.reportedUnregistered.add(t),console.warn(`pontive: <${t}> is in the rendered spec but this core-elements bundle does not define it`),document.dispatchEvent(new CustomEvent(exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT,{detail:{tag:t}})))}render(){return l`
2648
+ `}};vt([a({type:String})],ct.prototype,"placeholder",2);vt([a({type:Array})],ct.prototype,"dataTable",2);vt([a({type:Boolean})],ct.prototype,"hasDefaultSelect",2);vt([a({type:Boolean})],ct.prototype,"hasDefaultPagination",2);vt([a({type:Boolean})],ct.prototype,"hasDefaultSearch",2);vt([a({type:Object})],ct.prototype,"checkedRows",2);vt([a({type:String})],ct.prototype,"searchTerm",2);vt([a({type:Object})],ct.prototype,"columnVisibility",2);vt([a({type:String})],ct.prototype,"sortColumn",2);vt([a({type:String})],ct.prototype,"sortDirection",2);vt([a({type:Object})],ct.prototype,"cellRenderers",2);vt([a({type:Object})],ct.prototype,"headerRenderers",2);vt([a({type:Array})],ct.prototype,"rowActions",2);vt([a({type:Array})],ct.prototype,"paginationLabels",2);vt([a({type:Number})],ct.prototype,"pageSize",2);vt([a({type:Number})],ct.prototype,"currentPage",2);vt([a({type:Array})],ct.prototype,"sortableColumns",2);vt([a({type:Array})],ct.prototype,"columnOrder",2);vt([a({type:Function})],ct.prototype,"isRowDisabled",2);ct=vt([p("pont-data-table")],ct);var G=class extends Error{constructor(t,r,o,n){super(r);S(this,"code");S(this,"details");S(this,"status");this.name="LoginflowError",this.code=t,this.details=o,this.status=n}};function Lh(e){const t=(e??"").trim();if(!t)throw new G("CONFIG_ERROR","domain is required");if(t.startsWith("/")){if(typeof location>"u")throw new G("CONFIG_ERROR",`domain "${t}" is relative to the page origin, and there is no page here`);return Nc(new URL(t,location.origin))}const r=/^https?:\/\//i.test(t)?"":`${U$(B$(t))?"http":"https"}://`;try{return Nc(new URL(`${r}${t}`))}catch{throw new G("CONFIG_ERROR",`domain "${t}" is not a hostname, an origin, or a path`)}}function Nc(e){return`${e.origin}${e.pathname}`.replace(/\/+$/,"")}function B$(e){return e.split("/")[0]}function U$(e){return/^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/i.test(e)}var ye,j$=(ye=class{constructor(){S(this,"data",new Map)}static get Instance(){return ye.instance||(ye.instance=new ye),ye.instance}get(t){return this.data.get(t)}set(t,r){this.data.set(t,r)}setConfig(t){this.data.set("config",t)}getConfig(){return this.data.get("config")}getApiBaseUrl(){return Lh(this.getConfig().domain)}apiIsSameOrigin(){if(typeof location>"u")return!1;try{return new URL(this.getApiBaseUrl()).host===location.host}catch{return!1}}remove(t){this.data.delete(t)}clear(){this.data.clear()}},S(ye,"instance"),ye),K=j$.Instance,_e,co=(_e=class{constructor(){}static get Instance(){return _e.instance||(_e.instance=new _e),_e.instance}async request(t,r={}){const o=K.getConfig(),n=`${K.getApiBaseUrl()}${t}`,i=5e4,s=new AbortController,d=setTimeout(()=>s.abort(),i);try{const c=await fetch(n,{...r,signal:s.signal,headers:{"Content-Type":"application/json",...o.headers,...r.headers}});if(clearTimeout(d),!c.ok){const m=await c.json().catch(()=>({}));throw new G(m.code||m.error||"API_ERROR",m.message||m.error_description||`HTTP ${c.status}: ${c.statusText}`,m.details,c.status)}return await c.json()}catch(c){throw clearTimeout(d),c instanceof G?c:c instanceof Error?c.name==="AbortError"?new G("TIMEOUT","Request timeout"):new G("NETWORK_ERROR",c.message):new G("UNKNOWN_ERROR","An unknown error occurred")}}async post(t,r){return this.request(t,{credentials:"include",method:"POST",body:r?JSON.stringify(r):void 0})}async get(t){return this.request(t,{credentials:"include",method:"GET"})}async getOptional(t){const r=K.getConfig(),o=await fetch(`${K.getApiBaseUrl()}${t}`,{credentials:"include",method:"GET",headers:{...r.headers}});if(o.status===204)return null;if(!o.ok)throw new G("API_ERROR",`HTTP ${o.status}: ${o.statusText}`,void 0,o.status);return await o.json()}async postForm(t,r){return this.request(t,{credentials:"include",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(r).toString()})}},S(_e,"instance"),_e),Fh="__Secure-pontive_session_state",ms="__Secure-pontive_session_probe";function q$(){return kh(Fh)?"present":z$()?"absent":"unknown"}function Aa(){if(!(typeof document>"u"||typeof location>"u"))for(const e of["",...G$(location.hostname)])Ta(Fh,"",e,0)}function z$(){if(typeof document>"u"||typeof location>"u")return!1;const e=H$();try{Ta(ms,"1",e,60);const t=kh(ms)==="1";return Ta(ms,"",e,0),t&&V$(e)}catch{return!1}}function V$(e){return e!==""||K.apiIsSameOrigin()}function H$(){let e;try{e=new URL(K.getApiBaseUrl()).hostname}catch{return""}const t=location.hostname;if(!e||!t||e.toLowerCase()===t.toLowerCase())return"";const r=t.split("."),o=e.split(".");let n=0;for(;n<r.length&&n<o.length&&r[r.length-1-n].toLowerCase()===o[o.length-1-n].toLowerCase();)n+=1;return n<2?"":o.slice(o.length-n).join(".")}function G$(e){const t=e.split("."),r=[];for(let o=1;o+2<=t.length;o+=1)r.push(t.slice(o).join("."));return r}function Ta(e,t,r,o){const n=K$()?"; Secure":"",i=r?`; Domain=${r}`:"";document.cookie=`${e}=${t}; Path=/; Max-Age=${o}; SameSite=Lax${i}${n}`}function K$(){return typeof globalThis.isSecureContext=="boolean"?globalThis.isSecureContext:location.protocol==="https:"}function kh(e){if(typeof document>"u"||!document.cookie)return null;for(const t of document.cookie.split(";")){const r=t.indexOf("=");if(!(r<0)&&t.slice(0,r).trim()===e)return t.slice(r+1).trim()||null}return null}var Pt,Et=(Pt=class{constructor(){S(this,"AUTH_SESSION_STORAGE_KEY","pontive_auth_session");S(this,"memorySession",null);S(this,"refreshTimeoutId",null);S(this,"refreshPromise",null);S(this,"refreshRetryCount",0);S(this,"refreshBlockedUntil",0);S(this,"sessionGeneration",0);S(this,"channel",null);S(this,"channelName","");S(this,"applyingBroadcast",!1);S(this,"restorePromise",null)}static get Instance(){return Pt.instance||(Pt.instance=new Pt),Pt.instance}setCurrentSession(t){this.sessionGeneration+=1,this.write(JSON.stringify(t)),this.publish({type:"session",session:t})}async withRefreshLock(t){const r=typeof navigator<"u"?navigator.locks:void 0;return r?r.request(this.channelKey("refresh"),t):t()}channelKey(t){const r=K.getConfig();return`pontive-${t}:${(r==null?void 0:r.domain)??""}:${(r==null?void 0:r.appId)??""}`}ensureChannel(){var r;if(typeof BroadcastChannel>"u")return null;const t=this.channelKey("session");return this.channel&&this.channelName===t?this.channel:((r=this.channel)==null||r.close(),this.channelName=t,this.channel=new BroadcastChannel(t),this.channel.onmessage=o=>this.receive(o.data),this.channel)}publish(t){var r;this.applyingBroadcast||(r=this.ensureChannel())==null||r.postMessage(t)}receive(t){this.applyingBroadcast=!0;try{if(t.type==="cleared"){this.clearSession();return}this.setCurrentSession(t.session),this.scheduleTokenRefresh()}finally{this.applyingBroadcast=!1}}isCurrentGeneration(t){return this.sessionGeneration===t}getCurrentSession(){const t=this.getStoredSession();return t?this.isSessionExpired(t)?(this.clearSession(),null):(this.shouldRefreshToken(t)&&this.triggerBackgroundRefresh(t),t):null}peekSession(){return this.getStoredSession()}isAuthenticated(){return this.getCurrentSession()!==null}getAuthenticatedUser(){const t=this.getCurrentSession();if(!t)return null;const r=t.id_token?this.decodeJWT(t.id_token):null;return r||(t.user??null)}cleanup(){var t;this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshPromise=null,(t=this.channel)==null||t.close(),this.channel=null,this.channelName=""}clearSession(){this.sessionGeneration+=1,this.memorySession=null,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY),this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.publish({type:"cleared"})}isSessionExpired(t){return!t||!t.expires_at?!0:Date.now()>=t.expires_at}cleanExpiredSession(){const t=this.getStoredSession();t&&this.isSessionExpired(t)&&this.clearSession()}getStoredSession(){const t=this.read();if(!t)return null;try{return JSON.parse(t)}catch{return this.clearSession(),null}}write(t){this.memorySession=t,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY)}read(){return this.memorySession}decodeJWT(t){try{const o=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(atob(o).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(n)}catch{return null}}shouldRefreshToken(t){if(!t||!t.expires_at)return!1;const r=Date.now(),o=t.expires_at,n=t.expires_in||3600,i=r+n*1e3*.2;return o<=i}scheduleTokenRefresh(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null);const t=this.getCurrentSession();if(!t||!t.expires_at)return;const r=Date.now(),o=t.expires_at,n=t.expires_in||3600,i=o-r-n*1e3*.2;i>0&&(this.refreshTimeoutId=setTimeout(()=>{this.triggerBackgroundRefresh(t)},i))}triggerBackgroundRefresh(t){this.refreshPromise||Date.now()<this.refreshBlockedUntil||(this.refreshPromise=this.withRefreshLock(()=>{const r=this.getStoredSession();return r&&!this.shouldRefreshToken(r)?(this.scheduleTokenRefresh(),Promise.resolve(null)):this.refreshTokens(r??t)}).then(r=>(r&&(this.setCurrentSession(r),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.scheduleTokenRefresh()),r)).catch(r=>(console.error("Background token refresh failed:",r),null)).finally(()=>{this.refreshPromise=null}))}async switchOrganization(t){if(!t)throw new G("INVALID_REQUEST","organizationId is required");return this.withRefreshLock(async()=>{const r=this.sessionGeneration,o=this.getCurrentSession(),n=await this.requestTokens(o,{organization_id:t});if(!this.isCurrentGeneration(r))throw new G("SESSION_CHANGED","the session changed while switching organization");return this.setCurrentSession(n),this.scheduleTokenRefresh(),n})}getOrganization(){const t=this.getCurrentSession(),r=t!=null&&t.access_token?this.decodeJWT(t.access_token):null,o=r==null?void 0:r.org_id;if(typeof o!="string"||o==="")return null;const n=i=>Array.isArray(i)?i.filter(s=>typeof s=="string"):[];return{id:o,roles:n(r==null?void 0:r.roles),permissions:n(r==null?void 0:r.permissions)}}async refreshTokens(t){const r=this.sessionGeneration;try{const o=await this.requestTokens(t);return this.isCurrentGeneration(r)?o:(console.warn("Token refresh returned after the session changed; discarding it"),null)}catch(o){return this.isCurrentGeneration(r)?W$(o)?(console.error("Token refresh rejected, signing out:",to(o)),Aa(),this.clearSession(),null):(console.warn("Token refresh failed, keeping session and retrying:",to(o)),this.scheduleRefreshRetry(t),null):(console.warn("Token refresh failed after the session changed; ignoring:",to(o)),null)}}async fetchUserInfo(t){try{return await co.Instance.request("/oauth2/userinfo",{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${t}`}})}catch(r){return console.debug("Could not read user info for the restored session:",to(r)),null}}async requestTokens(t,r={}){var i;const o={...r,grant_type:"refresh_token",client_id:(i=K.getConfig())==null?void 0:i.appId};t!=null&&t.refresh_token&&(o.refresh_token=t.refresh_token);const n=await co.Instance.postForm("/oauth2/token",o);return{id_token:n.id_token??(t==null?void 0:t.id_token)??"",access_token:n.access_token,refresh_token:n.refresh_token??(t==null?void 0:t.refresh_token),expires_in:n.expires_in,expires_at:Date.now()+n.expires_in*1e3}}async readCurrentToken(){var r;const t=(r=K.getConfig())==null?void 0:r.appId;if(!t)return null;try{const o=await co.Instance.getOptional(`/oauth2/session/token?client_id=${encodeURIComponent(t)}`);return!(o!=null&&o.access_token)||!(o.expires_in>0)?null:{id_token:"",access_token:o.access_token,expires_in:o.expires_in,expires_at:Date.now()+o.expires_in*1e3}}catch{return null}}async restoreSession(){const t=this.getStoredSession();return t&&!this.isSessionExpired(t)?t:q$()==="absent"?null:this.restorePromise?this.restorePromise:(this.restorePromise=this.withRefreshLock(async()=>{const r=this.getStoredSession();if(r&&!this.isSessionExpired(r))return r;try{const o=await this.readCurrentToken()??await this.requestTokens(null);return o.id_token||(o.user=await this.fetchUserInfo(o.access_token)??void 0),this.setCurrentSession(o),this.scheduleTokenRefresh(),o}catch(o){return Q$(o)&&Aa(),console.debug("No session to restore:",to(o)),null}}).finally(()=>{this.restorePromise=null}),this.restorePromise)}scheduleRefreshRetry(t){if(this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount>=Pt.MAX_REFRESH_RETRIES){console.warn("Token refresh gave up after",this.refreshRetryCount,"attempts"),this.refreshRetryCount=0,this.refreshBlockedUntil=0;return}const r=Math.min(Pt.REFRESH_RETRY_BASE_MS*2**this.refreshRetryCount,Pt.MAX_REFRESH_RETRY_DELAY_MS);this.refreshRetryCount+=1,this.refreshBlockedUntil=Date.now()+r,this.refreshTimeoutId=setTimeout(()=>{this.refreshBlockedUntil=0,this.triggerBackgroundRefresh(t)},r)}},S(Pt,"MAX_REFRESH_RETRIES",5),S(Pt,"REFRESH_RETRY_BASE_MS",5e3),S(Pt,"MAX_REFRESH_RETRY_DELAY_MS",6e4),S(Pt,"instance"),Pt);function W$(e){return!(e instanceof G)||e.status===void 0?!1:e.status===401?!0:e.status===400&&Y$.has(e.code)}var Y$=new Set(["invalid_grant","invalid_client"]);function Q$(e){return e instanceof G&&e.status!==void 0&&e.status>=400&&e.status<500}function to(e){return e instanceof G?`${e.code} (status ${e.status??"none"}): ${e.message}`:String(e)}var Nh=class{constructor(e=sessionStorage){S(this,"storage");S(this,"FLOW_STATE_KEY","pontive_loginflow_state");S(this,"FLOW_EXPIRY_MS",540*1e3);this.storage=e}getFlowState(){const e=this.storage.getItem(this.FLOW_STATE_KEY);if(!e)return null;try{const t=JSON.parse(e);return this.isExpired(t)?(this.clearFlowState(),null):t}catch{return this.clearFlowState(),null}}saveFlowState(e,t,r){const o=Date.now(),n=this.getFlowState(),i={flowType:e,flow_id:t,state:r.state,startedAt:(n==null?void 0:n.startedAt)||o,lastUpdatedAt:o,render_spec:r.render_spec};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(i))}restoreFromHistory(e){const t={flowType:e.flowType,flow_id:e.flow_id,state:e.state,startedAt:e.timestamp,lastUpdatedAt:e.timestamp,render_spec:void 0};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(t))}clearFlowState(){this.storage.removeItem(this.FLOW_STATE_KEY)}isExpired(e){return Date.now()-e.lastUpdatedAt>this.FLOW_EXPIRY_MS}get expiryMs(){return this.FLOW_EXPIRY_MS}},dr,Ii=(dr=class{static detect(t,r=window.location){if(dr.hasInviteToken(r))return"invitation";const o=r.pathname.toLowerCase();return t.invitationUrl&&o.includes(t.invitationUrl)?"invitation":o.includes(t.signinUrl)?"signin":o.includes(t.signupUrl)?"signup":"custom"}static hasInviteToken(t){try{return new URLSearchParams(t.search).has(dr.INVITE_TOKEN_PARAM)}catch{return!1}}},S(dr,"INVITE_TOKEN_PARAM","invite_token"),dr),Mh=class{constructor(){S(this,"listeners",new Map)}on(e,t){this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t)}off(e,t){var r;(r=this.listeners.get(e))==null||r.delete(t)}emit(e,t){const r=this.listeners.get(e);r&&r.forEach(o=>{try{o(t)}catch(n){console.error(`[FlowEventBus] Error in event handler for ${e}:`,n)}})}clear(){this.listeners.clear()}clearEvent(e){this.listeners.delete(e)}},Z$=class{getNavigationType(){const e=performance.getEntriesByType("navigation");if(e.length>0)return e[0].type;const t=performance.navigation;if(t)switch(t.type){case 1:return"reload";case 2:return"back_forward";default:return"navigate"}return"navigate"}},zt,J$=(zt=class{constructor(t,r,o=window.location,n,i){S(this,"httpClient",co.Instance);S(this,"flowId");S(this,"redirectTimeoutId",null);S(this,"flowStateManager");S(this,"flowEventBus");S(this,"location");S(this,"navigationTypeDetector");S(this,"eventHandlers",new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)],["continue_here",this.handleContinueHere.bind(this)]]));S(this,"linkWatchTimer",null);S(this,"linkWatchGeneration",0);S(this,"waitingForLink",!1);const s=K.getConfig();if(!s.domain)throw new G("CONFIG_ERROR","Domain is required");if(!s.appId)throw new G("CONFIG_ERROR","App ID is required");this.flowId=t,this.location=o,this.flowStateManager=n||new Nh,this.flowEventBus=r||new Mh,this.navigationTypeDetector=i||new Z$,Et.Instance.cleanExpiredSession(),Et.Instance.scheduleTokenRefresh()}static async init(t,r,o,n,i){const s=new zt(t,r,o,n,i),d=await s.initializeFlowInternal();return{sdk:s,flowType:d.flowType,isResumed:d.isResumed,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}async startFlow(t,r){if(!r.app_id)throw new G("VALIDATION_ERROR","Client ID is required");const o=`/auth/v1/authflows/${t}/start`;return this.executeFlowRequest(()=>this.httpClient.post(o,r),"START_FLOW_ERROR","Failed to start flow")}async resumeFlow(t,r){const o=r?`?continue=${encodeURIComponent(r)}`:"",n=`/auth/v1/authflows/${t}/resume${o}`;return this.executeFlowRequest(()=>this.httpClient.post(n),"RESUME_FLOW_ERROR","Failed to resume flow")}async processEvent(t,r){if(!t.event)throw new G("VALIDATION_ERROR","Event type is required");const o=this.eventHandlers.get(t.event);return o?await o():await this.processServerEvent(t,r)}async executeFlowRequest(t,r,o,n){try{const i=await t();return n&&await n(i),this.processAuthResult(i.auth_result),i.redirection&&this.redirect(i.redirection),i}catch(i){throw i instanceof G?i:new G(r,o,i instanceof Error?{originalError:i.message,stack:i.stack}:i)}}async processServerEvent(t,r){let o=this.flowStateManager.getFlowState();if(!o&&(console.warn("Flow state expired, restarting flow before processing event"),await this.initializeFlowInternal(),o=this.flowStateManager.getFlowState(),!o))throw new G("FLOW_RESTART_ERROR","Failed to restart flow - no flow state after initialization");const n=o.state,i=`/auth/v1/authflows/${o.flowType}/events`,s=this.waitingForLink;this.stopWatchingForLink();let d;try{d=await this.executeFlowRequest(()=>this.httpClient.post(i,t),"PROCESS_EVENT_ERROR","Failed to process event",r)}catch(c){if(s&&zt.flowIsGone(c))return this.announceContinuedElsewhere(o.flowType,""),{state:""};throw c}if(this.watchForLink(o.flowType,d),!d.auth_result){this.flowStateManager.saveFlowState(o.flowType,o.flow_id,d);const c=this.flowStateManager.getFlowState();if(c){const m=n!==d.state;this.flowEventBus.emit("flow:updated",{flowState:c,isNewStep:m})}}return d}processAuthResult(t){if(t){const r={id_token:t.id_token,access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,expires_at:Date.now()+t.expires_in*1e3};Et.Instance.setCurrentSession(r),Et.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState();const{onAuthenticated:o}=K.getConfig();if(o){o(r);return}console.warn("pontive: signed in, but no onAuthenticated was supplied, so the SDK cannot route the user. Supply onAuthenticated to handle the handoff.")}}async initializeFlowInternal(){const t=K.getConfig(),r=Ii.detect(t,this.location);this.validateFlowType(r);const o=this.flowStateManager.getFlowState();return this.shouldResumeFlow(o,r)?await this.resumeExistingFlow(o,r):await this.startNewFlow(r)}validateFlowType(t){if(t==="custom"&&!this.flowId)throw new G("FLOW_ID_ERROR","Flow ID is required for custom flows")}shouldResumeFlow(t,r){const n=new URLSearchParams(this.location.search).get("resume")==="true";if(!t)return n;const i=this.navigationTypeDetector.getNavigationType();if(i==="navigate"&&!n)return this.flowStateManager.clearFlowState(),console.log(`Fresh navigation detected (type: ${i}), starting new flow`),!1;if(t.flowType!==r)return this.flowStateManager.clearFlowState(),console.log(`Flow type changed from ${t.flowType} to ${r}, starting new flow, flow_id: ${this.flowId}`),!1;if(r==="custom"&&t.flow_id!==this.flowId)return this.flowStateManager.clearFlowState(),console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`),!1;const s=n?"explicit resume=true":`navigation type: ${i}`;return console.log(`Resuming existing flow (${s})`),!0}async resumeExistingFlow(t,r){try{const o=await this.resumeFlow(r,this.continueParam());if(this.watchForLink(r,o),!o.auth_result){this.flowStateManager.saveFlowState(r,(t==null?void 0:t.flow_id)??this.determineFlowId(r),o);const n=this.flowStateManager.getFlowState();n&&this.flowEventBus.emit("flow:resumed",{flowState:n})}return{flowType:r,isResumed:!0,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result}}catch(o){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",o),await this.startNewFlow(r)}}async startNewFlow(t){const r=K.getConfig(),o=new URLSearchParams(this.location.search),n={};o.forEach((c,m)=>{n[m]=c}),r.organizationId&&!n.organization_id&&(n.organization_id=r.organizationId),console.log("metadata",n);const i=o.get("locales")||r.locales||void 0,s={app_id:r.appId,origin_url:this.location.href,signin_url:r.signinUrl,signup_url:r.signupUrl,locales:i,flow_id:this.determineFlowId(t),metadata:n},d=await this.startFlow(t,s);if(this.watchForLink(t,d),!d.auth_result){this.flowStateManager.saveFlowState(t,s.flow_id,d);const c=this.flowStateManager.getFlowState();c&&this.flowEventBus.emit("flow:started",{flowState:c})}return{flowType:t,isResumed:!1,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}determineFlowId(t){switch(t){case"signin":return this.flowId||"signin-flow";case"signup":return this.flowId||"signup-flow";case"invitation":return this.flowId||"invitation-flow";case"custom":if(!this.flowId)throw new G("FLOW_ID_ERROR","Flow ID is required for custom flows");return this.flowId}}continueParam(){const t=new URLSearchParams(this.location.search);if(t.get("resume")==="true")return t.get("continue")??void 0}watchForLink(t,r){if(this.stopWatchingForLink(),this.waitingForLink=r.waiting_for_link===!0,!this.waitingForLink)return;const o=this.linkWatchGeneration,n=Date.now()+zt.LINK_POLL_LIMIT_MS,i=()=>{this.linkWatchTimer=setTimeout(s,zt.LINK_POLL_INTERVAL_MS)},s=async()=>{if(o!==this.linkWatchGeneration||Date.now()>n)return;if(typeof document<"u"&&document.hidden){i();return}let d;try{d=await this.httpClient.post(`/auth/v1/authflows/${t}/resume`)}catch(c){o===this.linkWatchGeneration&&zt.flowIsGone(c)&&this.announceContinuedElsewhere(t,"");return}if(o===this.linkWatchGeneration){if(d.waiting_for_link){i();return}this.announceContinuedElsewhere(t,d.state)}};i()}announceContinuedElsewhere(t,r){var o,n;this.stopWatchingForLink(),this.flowStateManager.clearFlowState(),(n=(o=K.getConfig()).onFlowStateChange)==null||n.call(o,{eventType:"flow_continued_elsewhere",flowType:t,state:r})}static flowIsGone(t){return t instanceof G&&t.status===401}stopWatchingForLink(){this.waitingForLink=!1,this.linkWatchGeneration++,this.linkWatchTimer!==null&&(clearTimeout(this.linkWatchTimer),this.linkWatchTimer=null)}async handleContinueHere(){const{continueHereUrl:t}=K.getConfig();this.flowStateManager.clearFlowState();let r=t;if(!r){const o=new URL(this.location.href);o.searchParams.delete("resume"),o.searchParams.delete("continue"),r=o.toString()}return this.redirect({url:r,redirect_delay:0}),{state:"End"}}async handleSwitchToSignin(){const t=K.getConfig();return this.redirect({url:this.withCurrentQuery(t.signinUrl),redirect_delay:0}),{state:"End"}}async handleSwitchToSignup(){const t=K.getConfig();return this.redirect({url:this.withCurrentQuery(t.signupUrl),redirect_delay:0}),{state:"End"}}withCurrentQuery(t){const r=this.location.search;return!r||r==="?"?t:t.includes("?")?`${t}&${r.slice(1)}`:`${t}${r}`}redirect(t){t.url&&(this.redirectTimeoutId!==null&&(console.log("Clearing existing redirect timeout before scheduling new redirect to:",t.url),clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.redirectTimeoutId=setTimeout(()=>{this.location.href=t.url},t.redirect_delay*1e3))}reloadPage(){setTimeout(()=>{this.location.reload()},0)}getEventBus(){return this.flowEventBus}cleanup(){this.stopWatchingForLink(),this.redirectTimeoutId&&(clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.flowEventBus.clear()}},S(zt,"LINK_POLL_INTERVAL_MS",3e3),S(zt,"LINK_POLL_LIMIT_MS",900*1e3),zt),X$=class{constructor(e){S(this,"delayMs");S(this,"timerId",null);this.delayMs=e}debounce(e){this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{e(),this.timerId=null},this.delayMs)}cancel(){this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}isPending(){return this.timerId!==null}},tP=class{pushState(e,t,r){history.pushState(e,t,r)}replaceState(e,t,r){history.replaceState(e,t,r)}get state(){return history.state}},eP=class{constructor(e,t,r=!1,o=window.location,n,i){S(this,"popstateListener",null);S(this,"pageshowListener",null);S(this,"debouncer");S(this,"isProcessing",!1);S(this,"isHandlingNavigationEvent",!1);S(this,"onFlowRestartNeeded",null);S(this,"skipHistoryTracking");S(this,"flowStateManager");S(this,"historyAdapter");S(this,"location");this.onFlowRestartNeeded=t,this.skipHistoryTracking=r,this.debouncer=new X$(200),this.location=o,this.flowStateManager=n||new Nh,this.historyAdapter=i||new tP,this.subscribeToFlowEvents(e),this.initializeListener()}subscribeToFlowEvents(e){e.on("flow:started",this.handleFlowStart.bind(this)),e.on("flow:updated",this.handleFlowUpdate.bind(this)),e.on("flow:resumed",this.handleFlowResume.bind(this))}initializeListener(){this.popstateListener=e=>{console.log("[NavigationManager] popstate event received"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Debounce timeout fired, handling popstate"),this.handlePopState(e)})},this.pageshowListener=e=>{e.persisted&&(console.log("[NavigationManager] Page restored from bfcache"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Handling bfcache restoration"),this.handleBfcacheRestoration()}))},window.addEventListener("popstate",this.popstateListener),window.addEventListener("pageshow",this.pageshowListener)}async handlePopState(e){if(this.isProcessing){console.log("[NavigationManager] Already processing popstate, skipping");return}console.log("[NavigationManager] Starting popstate processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const t=e.state,r=this.flowStateManager.getFlowState(),o=K.getConfig(),n=Ii.detect(o,this.location);if(t&&this.restoreHistoryStateToSession(t),this.shouldRestartFlow(t,r,n)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from history")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}async handleBfcacheRestoration(){if(this.isProcessing){console.log("[NavigationManager] Already processing bfcache restoration, skipping");return}console.log("[NavigationManager] Starting bfcache restoration processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const e=this.historyAdapter.state,t=this.flowStateManager.getFlowState(),r=K.getConfig(),o=Ii.detect(r,this.location);if(e&&this.restoreHistoryStateToSession(e),this.shouldRestartFlow(e,t,o)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from bfcache")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}restoreHistoryStateToSession(e){console.log("[NavigationManager] Restoring history state to session storage:",e),this.flowStateManager.restoreFromHistory(e)}shouldRestartFlow(e,t,r){return e&&e.flowType!==r?(console.log("[NavigationManager] Flow type changed via navigation:",e.flowType,"→",r),this.flowStateManager.clearFlowState(),!0):e?Date.now()-e.timestamp>this.flowStateManager.expiryMs?(console.log("[NavigationManager] History state expired, clearing and restarting flow"),this.flowStateManager.clearFlowState(),!0):(console.log("[NavigationManager] Valid history state restored, triggering restart to resume flow"),!0):(console.log("[NavigationManager] No history state, skipping"),!1)}async triggerFlowRestart(){this.onFlowRestartNeeded&&await this.onFlowRestartNeeded()}createHistoryState(e){return{flowType:e.flowType,flow_id:e.flow_id,state:e.state,timestamp:Date.now()}}updateBrowserHistory(e,t){if(this.skipHistoryTracking){console.log("[NavigationManager] Skipping history tracking (created from navigation)");return}const r=this.createHistoryState(e);try{t==="push"?(this.historyAdapter.pushState(r,"",this.location.href),console.log("[NavigationManager] Pushed state to history")):(this.historyAdapter.replaceState(r,"",this.location.href),console.log("[NavigationManager] Replaced state in history"))}catch(o){console.error("[NavigationManager] Failed to update history:",o)}}handleFlowStart(e){this.updateBrowserHistory(e.flowState,"replace")}handleFlowUpdate(e){const t=this.isHandlingNavigationEvent||!e.isNewStep?"replace":"push";this.updateBrowserHistory(e.flowState,t)}handleFlowResume(e){this.updateBrowserHistory(e.flowState,"replace")}destroy(){this.debouncer.cancel(),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.onFlowRestartNeeded=null}},Rr=new AbortController,rP=class{constructor(){S(this,"httpClient",co.Instance);S(this,"capabilities",{webauthn:!1});S(this,"capabilitiesDetected",!1)}async detectCapabilities(){if(!this.capabilitiesDetected)try{if(typeof window.PublicKeyCredential=="function"?this.capabilities.webauthn=!0:this.capabilities.webauthn=!1,typeof PublicKeyCredential.getClientCapabilities=="function"){const e=await PublicKeyCredential.getClientCapabilities();this.capabilities={...this.capabilities,...e};return}typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable=="function"&&(this.capabilities.userVerifyingPlatformAuthenticator=await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()),(PublicKeyCredential==null?void 0:PublicKeyCredential.isConditionalMediationAvailable)!==void 0&&typeof PublicKeyCredential.isConditionalMediationAvailable=="function"?this.capabilities.conditionalGet=await PublicKeyCredential.isConditionalMediationAvailable():this.capabilities.conditionalGet=!1}finally{this.capabilitiesDetected=!0}}async fetchPublicKeyCredentialRequestOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/login/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async fetchPublicKeyCredentialCreationOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/register/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async startRegistration(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialCreationOptionsJSON provided"),null;Rr.abort(),Rr=new AbortController;const r=this.toPublicKeyCredentialCreationOptions(e),o={signal:Rr.signal,publicKey:r};if(t){if(!this.isConditionalCreateAvailable())return console.error("Conditional create mediation not supported in this browser"),null;o.mediation="conditional"}try{const n=await navigator.credentials.create(o);if(!n){console.error("no credential returned by authenticator");return}const{id:i,rawId:s,response:d,type:c}=n;let m;typeof d.getTransports=="function"&&(m=d.getTransports());let v;if(typeof d.getPublicKeyAlgorithm=="function")try{v=d.getPublicKeyAlgorithm()}catch(_){gs("getPublicKeyAlgorithm()",_)}let b;if(typeof d.getPublicKey=="function")try{const _=d.getPublicKey();_!==null&&(b=this.bufferToBase64URLString(_))}catch(_){gs("getPublicKey()",_)}let w;if(typeof d.getAuthenticatorData=="function")try{w=this.bufferToBase64URLString(d.getAuthenticatorData())}catch(_){gs("getAuthenticatorData()",_)}return{id:i,rawId:this.bufferToBase64URLString(s),response:{attestationObject:this.bufferToBase64URLString(d.attestationObject),clientDataJSON:this.bufferToBase64URLString(d.clientDataJSON),transports:m,publicKeyAlgorithm:v,publicKey:b,authenticatorData:w},type:c,clientExtensionResults:n.getClientExtensionResults(),authenticatorAttachment:this.toAuthenticatorAttachment(n.authenticatorAttachment)}}catch(n){const i=this.identifyAuthenticationError({error:n,options:o});return i instanceof Ir?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",n),null}}async startAuthentication(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialRequestOptionsJSON provided"),null;if(!this.isWebAuthnAvailable())return console.error("WebAuthn not supported in this browser"),null;Rr.abort(),Rr=new AbortController;const r=this.toPublicKeyCredentialRequestOptions(e),o={signal:Rr.signal,publicKey:r};if(t){if(!this.isConditionalGetAvailable())return console.error("Conditional mediation not supported in this browser"),null;o.mediation="conditional",o.publicKey&&(o.publicKey.allowCredentials=[])}try{const n=await navigator.credentials.get(o);return this.toPublicKeyCredentialJSON(n)}catch(n){const i=this.identifyAuthenticationError({error:n,options:o});return i instanceof Ir?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",n),null}}async signalUnknownCredential(e,t){if(await this.detectCapabilities(),this.isSignalUnknownCredentialAvailable())try{await PublicKeyCredential.signalUnknownCredential({rpId:e,credentialId:t})}catch(r){console.error("Failed to signal unknown credential:",r)}else console.warn("signalUnknownCredential not supported in this browser")}async signalCurrentUserDetails(e){if(await this.detectCapabilities(),this.isSignalCurrentUserDetailsAvailable())try{await PublicKeyCredential.signalCurrentUserDetails(e)}catch(t){console.error("Failed to signal current user details:",t)}else console.warn("signalCurrentUserDetails not supported. Ask user to update manually.")}toPublicKeyCredentialDescriptor(e){const{id:t}=e;return{...e,id:this.base64URLStringToBuffer(t),type:e.type,transports:e.transports}}toAuthenticatorAttachment(e){const t=["cross-platform","platform"];if(e&&!(t.indexOf(e)<0))return e}bufferToBase64URLString(e){const t=new Uint8Array(e);let r="";for(const n of t)r+=String.fromCharCode(n);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}base64URLStringToBuffer(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-t.length%4)%4,o=t.padEnd(t.length+r,"="),n=atob(o),i=new ArrayBuffer(n.length),s=new Uint8Array(i);for(let d=0;d<n.length;d++)s[d]=n.charCodeAt(d);return i}toPublicKeyCredentialJSON(e){if(typeof e.toJSON=="function")return e.toJSON();const t=e.response;return{id:e.id,type:e.type,rawId:this.bufferToBase64URLString(e.rawId),authenticatorAttachment:this.toAuthenticatorAttachment(e.authenticatorAttachment),clientExtensionResults:e==null?void 0:e.getClientExtensionResults(),response:{clientDataJSON:this.bufferToBase64URLString(t.clientDataJSON),authenticatorData:this.bufferToBase64URLString(t.authenticatorData),signature:this.bufferToBase64URLString(t.signature),userHandle:t.userHandle?this.bufferToBase64URLString(t.userHandle):void 0}}}toPublicKeyCredentialCreationOptions(e){var r;if(typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge),rp:{id:e.rp.id,name:e.rp.name},user:{displayName:e.user.displayName,id:this.base64URLStringToBuffer(e.user.id),name:e.user.name},pubKeyCredParams:e.pubKeyCredParams.map(o=>({alg:o.alg,type:o.type})),timeout:e.timeout};if(e.attestation&&(t.attestation=e.attestation),e.extensions!==void 0&&(t.extensions=e.extensions),e.authenticatorSelection){const o={};e.authenticatorSelection.authenticatorAttachment&&(o.authenticatorAttachment=e.authenticatorSelection.authenticatorAttachment),e.authenticatorSelection.requireResidentKey&&(o.requireResidentKey=e.authenticatorSelection.requireResidentKey),e.authenticatorSelection.residentKey&&(o.residentKey=e.authenticatorSelection.residentKey),e.authenticatorSelection.userVerification&&(o.userVerification=e.authenticatorSelection.userVerification),t.authenticatorSelection=o}return(r=e.excludeCredentials)!=null&&r.length&&(t.excludeCredentials=e.excludeCredentials.map(o=>this.toPublicKeyCredentialDescriptor(o))),t}toPublicKeyCredentialRequestOptions(e){var r;if(typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge)};return e.rpId!==void 0&&(t.rpId=e.rpId),e.timeout!==void 0&&(t.timeout=e.timeout),e.userVerification!==void 0&&(t.userVerification=e.userVerification),e.extensions!==void 0&&(t.extensions=e.extensions),(r=e.allowCredentials)!=null&&r.length&&(t.allowCredentials=e.allowCredentials.map(o=>this.toPublicKeyCredentialDescriptor(o))),t}identifyAuthenticationError({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ir({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Ir({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(nP(o)){if(r.rpId!==o)return new Ir({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ir({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Ir({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}isPublicKeyCredentialRequestOptionsJSON(e){return typeof e=="object"&&e!==null&&"challenge"in e}isWebAuthnAvailable(){return this.capabilities.webauthn}isSignalAllAcceptedCredentialsAvailable(){return!!this.capabilities.signalAllAcceptedCredentials}isSignalCurrentUserDetailsAvailable(){return!!this.capabilities.signalCurrentUserDetails}isSignalUnknownCredentialAvailable(){return!!this.capabilities.signalUnknownCredential}isConditionalGetAvailable(){return!!this.capabilities.conditionalGet}isConditionalCreateAvailable(){return!!this.capabilities.conditionalCreate}isHybridTransportAvailable(){return!!this.capabilities.hybridTransport}destroy(){Rr.abort()}};function gs(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
2649
+ `,t)}var Ir=class extends Error{constructor({message:t,code:r,cause:o,name:n}){super(t);S(this,"code");this.name=n??o.name,this.code=r}};function nP(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var we,oP=(we=class{constructor(){S(this,"configured",!1);S(this,"configuredResolve");S(this,"configuredPromise",new Promise(t=>{this.configuredResolve=t}));S(this,"loginflow",null);S(this,"navigationManager",null);S(this,"flowEventBus",null);S(this,"webauthnService",null)}static get Instance(){return we.instance||(we.instance=new we),we.instance}ensureConfigured(){if(!this.configured)throw new G("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new G("LOGINFLOW_NOT_INITIALIZED","Call Auth.startLoginflow() first")}async startLoginflowInternal(t,r=!1){this.ensureConfigured(),this.webauthnService&&(console.log("[AuthService] Cleaning up and aborting ongoing webauthn flows"),this.webauthnService.destroy(),this.webauthnService=null),this.loginflow&&(console.log("[AuthService] Cleaning up old loginflow instance"),this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(console.log("[AuthService] Cleaning up old navigation manager instance"),this.navigationManager.destroy(),this.navigationManager=null),this.webauthnService=new rP,this.webauthnService.detectCapabilities(),this.flowEventBus=new Mh,this.navigationManager=new eP(this.flowEventBus,async()=>{console.log("[AuthService] Navigation restart triggered, restarting loginflow"),await this.startLoginflowInternal(void 0,!1)},r);const o=await J$.init(t,this.flowEventBus),n=K.getConfig();this.startPasskeyAuthentication(o.flowType,!0),this.loginflow=o.sdk;const i={flowType:o.flowType,isResumed:o.isResumed,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result};return n.onFlowStateChange&&n.onFlowStateChange({eventType:o.isResumed?"flow_resumed":"flow_started",flowType:o.flowType,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result,isResumed:o.isResumed}),i}configure(t){if(!t.domain||!t.appId)throw new G("CONFIG_ERROR","domain and appId are required");K.setConfig(t),this.configured=!0,this.configuredResolve()}whenConfigured(){return this.configuredPromise}isAuthenticated(){return this.ensureConfigured(),Et.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),Et.Instance.getCurrentSession()}async restoreSession(){return this.ensureConfigured(),Et.Instance.restoreSession()}getAuthenticatedUser(){return this.ensureConfigured(),Et.Instance.getAuthenticatedUser()}getOrganization(){return this.ensureConfigured(),Et.Instance.getOrganization()}async switchOrganization(t){return this.ensureConfigured(),Et.Instance.switchOrganization(t)}async startLoginflow(t){return this.startLoginflowInternal(t,!1)}async processLoginflowEvent(t){var i,s;this.ensureConfigured(),this.ensureLoginflowInitialized();const r=K.getConfig(),o=Ii.detect(r,location);if(t.event==="signin_with_passkey"&&!((i=t.data)!=null&&i.credential_request)){const d=await this.getPasskeyCredential(o,!1);if(!d||!d.cred)return console.error("no credential returned by browser"),{state:""};t.data={credential_request:d.cred}}if(t.event==="register_passkey"&&!((s=t.data)!=null&&s.conditional)){console.log("attempt to register a passkey");const d=await this.createPasskeyCredential(o,!1);if(!d)return console.error("no credential created by browser"),{state:""};t.data={credential_creation_response:d,conditional:!1}}const n=await this.loginflow.processEvent(t,async d=>{var c;if((c=d.data)!=null&&c.conditional_create_enabled){console.log("attempt to register a passkey conditionally");const m=await this.registerPasskey(o,!0);m&&(m.render_spec=void 0,d.render_spec=void 0)}});if(console.log("render spec",n.render_spec),r.onFlowStateChange){const d=sessionStorage.getItem("pontive_loginflow_state");let c="custom";if(d)try{c=JSON.parse(d).flowType}catch(m){console.error("Failed to parse flow state:",m)}r.onFlowStateChange({eventType:"flow_updated",flowType:c,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result})}return n}async getPasskeyCredential(t,r){var n,i;const o=await((n=this.webauthnService)==null?void 0:n.fetchPublicKeyCredentialRequestOptions(t,r));if(!o)return console.error("failed to fetch public key request options"),null;try{return{cred:await((i=this.webauthnService)==null?void 0:i.startAuthentication(o,r)),options:o}}catch(s){return console.error("error starting authentication",s),null}}async startPasskeyAuthentication(t,r=!1){var s,d;const o=await this.getPasskeyCredential(t,r);if(!o||!o.cred){console.error("no credential found");return}const{cred:n,options:i}=o;try{((s=(await this.processLoginflowEvent({event:"signin_with_passkey",data:{credential_request:n}})).data)==null?void 0:s.error)==="CredentialNotFound"&&(i.rpId&&n.id?(d=this.webauthnService)==null||d.signalUnknownCredential(i.rpId,n.id):console.log("missing rpId or credential id for signalUnknownCredential"))}catch(c){console.error("failed to signin with passkey",c)}}async createPasskeyCredential(t,r){var o,n;try{const i=await((o=this.webauthnService)==null?void 0:o.fetchPublicKeyCredentialCreationOptions(t,r));if(!i){console.warn("no credential creation option returned by webauthn service"),console.log("skipping conditional passkey registration...");return}return(n=this.webauthnService)==null?void 0:n.startRegistration(i,r)}catch(i){console.log("error",i)}}async registerPasskey(t,r=!1){try{const o=await this.createPasskeyCredential(t,r),n=await this.processLoginflowEvent({event:"register_passkey",data:{credential_creation_response:o,conditional:r}});return console.log("passkey creation res",n),n}catch(o){console.log("error",o)}}invalidateSession(){Et.Instance.clearSession()}async signOut(t){var n;this.ensureConfigured();const r=iP(Et.Instance.peekSession()),o=((n=K.getConfig())==null?void 0:n.appId)??"";if(Aa(),Et.Instance.clearSession(),Et.Instance.cleanup(),this.loginflow&&(this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(this.navigationManager.destroy(),this.navigationManager=null),this.flowEventBus&&(this.flowEventBus.clear(),this.flowEventBus=null),!K.apiIsSameOrigin()){window.location.assign(this.logoutUrl(r,o,t==null?void 0:t.returnTo));return}await this.endServerSession(r,o),window.location.reload()}async endServerSession(t,r){try{await fetch(`${K.getApiBaseUrl()}/oauth2/logout`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:r,...t?{logout_hint:t}:{}}).toString()})}catch(o){console.warn("Could not end the session at the authorization server:",o)}}logoutUrl(t,r,o){const n=new URLSearchParams({post_logout_redirect_uri:o??`${window.location.origin}${window.location.pathname}`,client_id:r});return t&&n.set("logout_hint",t),`${K.getApiBaseUrl()}/oauth2/logout?${n.toString()}`}},S(we,"instance"),we);function iP(e){for(const t of[e==null?void 0:e.id_token,e==null?void 0:e.access_token]){if(!t)continue;const r=Et.Instance.decodeJWT(t);if(typeof(r==null?void 0:r.sid)=="string"&&r.sid)return r.sid}}var H=oP.Instance,sP=Object.defineProperty,aP=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&sP(t,r,n),n};class jt extends f{constructor(){super(),this.shadow=!1,this.__initialAttributesCache=null}parseJsonAttribute(t){try{const r=this.getAttribute(t);return r?JSON.parse(r):{}}catch{return{}}}get sbStyle(){return this.parseJsonAttribute("pont-style")}getAttributesToExclude(){return[]}getFilteredAttributes(){const t={};return Array.from(this.attributes).forEach(r=>{this.getAttributesToExclude().includes(r.name)||(t[r.name]=r.value??"")}),t}isCustomPropertySet(t){const r=getComputedStyle(this).getPropertyValue(t).trim();return r!=="inherit"&&r.length>0}applyCustomClass(t,r,o=""){var n,i;t.some(s=>this.isCustomPropertySet(s))&&((i=(n=this.shadowRoot)==null?void 0:n.querySelector(r))==null||i.classList.add(o))}moveAttributesToElement(t,r=["id","class"]){t&&r.forEach(o=>{const n=this.getAttribute(o);n!==null&&(t.setAttribute(o,n),this.removeAttribute(o))})}removeAttributesFromHost(t=["id","class"]){t.forEach(r=>{this.hasAttribute(r)&&this.removeAttribute(r)})}captureHostAttributes(){if(this.__initialAttributesCache)return this.__initialAttributesCache;const t={};return Array.from(this.attributes).forEach(r=>{t[r.name]=r.value}),this.__initialAttributesCache=t,t}getHostClass(){return this.captureHostAttributes().class??""}removeDuplicateContent(){var i;const t=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{var d;return s.nodeType===Node.COMMENT_NODE||s.nodeType===Node.TEXT_NODE&&!((d=s.textContent)!=null&&d.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=new Map,o=[];let n;for(;n=t.nextNode();){let s;if(n.nodeType===Node.TEXT_NODE){const d=(i=n.textContent)==null?void 0:i.trim();if(!d)continue;s=`text:${d}`}else if(n instanceof HTMLElement){const d=Array.from(n.attributes).map(c=>`${c.name}=${c.value}`).sort().join(":");s=`element:${n.tagName}:${d}`}else continue;if(r.has(s)){const d=r.get(s);d!=null&&d.parentNode&&o.push(d),r.set(s,n)}else r.set(s,n)}o.forEach(s=>{var d;return(d=s.parentNode)==null?void 0:d.removeChild(s)})}moveLightDomChildrenInto(t,r){let o;r!=null&&r.length?(o=r.filter(n=>this.contains(n)&&n!==t&&!n.contains(t)),o.forEach(n=>{const i=Array.from(t.childNodes).find(s=>{var d;return(d=s.isEqualNode)==null?void 0:d.call(s,n)});i&&t.removeChild(i)})):o=Array.from(this.childNodes).filter(n=>n!==t&&!t.contains(n)&&!n.contains(t)),o.forEach(n=>t.appendChild(n))}}aP([a({type:Boolean})],jt.prototype,"shadow");const Pr="pont:auth",en={showWatermark:!0},Hn="pont:branding";class lP{constructor(t){this.consumer=new ui(t,{context:Hn,subscribe:!0})}get showWatermark(){var t;return((t=this.consumer.value)==null?void 0:t.showWatermark)??en.showWatermark}}const Bh="pont:design-mode";class Fo{constructor(t){this.host=t,this.consumer=new ui(t,{context:Bh,subscribe:!0})}get active(){return this.host.hasAttribute("design-mode")?this.host.getAttribute("design-mode")!=="false":this.consumer.value??!1}}const Uh="pont:env",Bi=Symbol("renderSpecContext"),ko="pont-user-context",Ui="";var dP=Object.defineProperty,cP=Object.getOwnPropertyDescriptor,No=(e,t,r,o)=>{for(var n=o>1?void 0:o?cP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&dP(t,r,n),n};exports.PontKitLayout=class extends f{constructor(){super(...arguments),this.spec="",this.designMode=!1,this.branding=en,this.handleError=t=>{var r;return console.error("pont-form error",(r=t.detail)==null?void 0:r.message)}}set renderSpec(t){this.spec=t,this.requestUpdate()}createRenderRoot(){return this}updated(){this.renderDynamicContent()}renderDynamicContent(){if(!this.spec)return;const r=(this.shadowRoot||this).querySelector("#dynamic-content");r&&(r.innerHTML=this.spec,r.querySelectorAll("*").forEach(o=>{o.localName.includes("-")&&!customElements.get(o.localName)?exports.PontKitLayout.reportUnregistered(o.localName):customElements.upgrade(o)}))}static reportUnregistered(t){exports.PontKitLayout.reportedUnregistered.has(t)||(exports.PontKitLayout.reportedUnregistered.add(t),console.warn(`pontive: <${t}> is in the rendered spec but this core-elements bundle does not define it`),document.dispatchEvent(new CustomEvent(exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT,{detail:{tag:t}})))}render(){return l`
2650
2650
  <pont-form
2651
2651
  custom-id="pont-layout-form"
2652
2652
  @pont-form:error=${this.handleError}
@@ -2655,13 +2655,13 @@
2655
2655
  <div id="dynamic-content"></div>
2656
2656
  </div>
2657
2657
  </pont-form>
2658
- `}};exports.PontKitLayout.reportedUnregistered=new Set;exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT="pont:unregistered-element";No([g()],exports.PontKitLayout.prototype,"spec",2);No([a({attribute:!1})],exports.PontKitLayout.prototype,"renderSpec",1);No([a({type:Boolean,attribute:"design-mode"}),Wt({context:Bh})],exports.PontKitLayout.prototype,"designMode",2);No([a({attribute:!1}),Wt({context:Hn})],exports.PontKitLayout.prototype,"branding",2);exports.PontKitLayout=No([p("pont-layout")],exports.PontKitLayout);let Da=null;function pP(e){Da=e}function hP(){return Da||console.warn("SDK environment not initialized. Call initSdk({...}) before using <pont-provider>."),Da}function uP({pathname:e,search:t,env:r}){const o=new URLSearchParams(t),n=o.get("redirect_url")||r.signinRedirectUrl;return[r.signinUrl,r.signupUrl,r.invitationUrl].filter(s=>!!s).some(s=>e.includes(s))?n||"/":o.has("invite_token")&&n?n:null}function Vt(...e){return Lp(Va(e))}function mP(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function gP(e){document.documentElement.setAttribute("data-theme",e)}function fP(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&gP("light")}function vP(e,t){return e?e.includes("{{theme}}")?e.replace("{{theme}}",t):e:""}function La(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}const Mc="abcdefghijklmnopqrstuvwxyz0123456789",bP=6;function yP(e){let t="";for(let r=0;r<bP;r++)t+=Mc.charAt(Math.floor(Math.random()*Mc.length));return t}const _t=()=>yP();function ji(e){const t=document.createElement("pont-toast"),r=document.createElement("pont-toast-view-port");r.part="user-profile-toast",r.setAttribute("variant","destructive"),t.dataset.state="open";const o=document.createElement("div");o.className="pont-grid pont-gap-1";const n=document.createElement("pont-toast-title");n.textContent="Uh oh! Something went wrong.";const i=document.createElement("pont-toast-description");i.textContent=e,o.appendChild(n),o.appendChild(i),r.appendChild(o),t.appendChild(r),document.body.appendChild(t),setTimeout(()=>{t.dataset.state="open",r.dataset.state="open"},10),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},3.5*1e3)}async function Pl(e,t=5e3){if(!e)return;let r;const o=new Promise(n=>{r=setTimeout(()=>n("timeout"),t)});try{await Promise.race([e.whenConfigured(),o])==="timeout"&&console.warn(`pontive: Auth.configure() has not been called after ${t}ms. Is this widget mounted inside <pont-provider>?`)}finally{clearTimeout(r)}}function _P(e){if(!(e!=null&&e.startsWith("data:image/svg+xml;base64,")))return null;try{const t=e.replace("data:image/svg+xml;base64,","");return atob(t)}catch(t){return console.error("Invalid base64 SVG:",t),null}}function wP(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function de(){var e;return(e=H.getCurrentSession())==null?void 0:e.access_token}function Fa(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);if(isNaN(r.getTime()))return"Invalid Date";const o=new Date,n=new Date(o.getFullYear(),o.getMonth(),o.getDate()),i=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=Math.floor((n.getTime()-i.getTime())/(1e3*60*60*24));return s===0?"Today":s===1?"Yesterday":s>1&&s<=6?r.toLocaleDateString("en-US",{weekday:"long"}):r.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function ka(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);return isNaN(r.getTime())?"Invalid Time":r.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})}function qi(e){if(!e)return"";const r=(e.includes("@")?e.split("@")[0]:e).split(/[\s._-]+/).filter(Boolean);return r.length===0?"":r.length===1?r[0].slice(0,2).toUpperCase():`${r[0][0]}${r[r.length-1][0]}`.toUpperCase()}function $P(e){return e instanceof Error&&"status"in e}function zi(e,t){var r,o;return $P(e)?((o=(r=e.data)==null?void 0:r.error)==null?void 0:o.message)??e.message??t:e instanceof Error&&e.message||t}var PP=Object.defineProperty,CP=Object.getOwnPropertyDescriptor,Pr=(e,t,r,o)=>{for(var n=o>1?void 0:o?CP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&PP(t,r,n),n};const SP=`<pont-block>
2658
+ `}};exports.PontKitLayout.reportedUnregistered=new Set;exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT="pont:unregistered-element";No([g()],exports.PontKitLayout.prototype,"spec",2);No([a({attribute:!1})],exports.PontKitLayout.prototype,"renderSpec",1);No([a({type:Boolean,attribute:"design-mode"}),Wt({context:Bh})],exports.PontKitLayout.prototype,"designMode",2);No([a({attribute:!1}),Wt({context:Hn})],exports.PontKitLayout.prototype,"branding",2);exports.PontKitLayout=No([p("pont-layout")],exports.PontKitLayout);let Da=null;function pP(e){Da=e}function hP(){return Da||console.warn("SDK environment not initialized. Call initSdk({...}) before using <pont-provider>."),Da}function uP({pathname:e,search:t,env:r}){const o=new URLSearchParams(t),n=o.get("redirect_url")||r.signinRedirectUrl;return[r.signinUrl,r.signupUrl,r.invitationUrl].filter(s=>!!s).some(s=>e.includes(s))?n||"/":o.has("invite_token")&&n?n:null}function Vt(...e){return Lp(Va(e))}function mP(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function gP(e){document.documentElement.setAttribute("data-theme",e)}function fP(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&gP("light")}function vP(e,t){return e?e.includes("{{theme}}")?e.replace("{{theme}}",t):e:""}function La(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}const Mc="abcdefghijklmnopqrstuvwxyz0123456789",bP=6;function yP(e){let t="";for(let r=0;r<bP;r++)t+=Mc.charAt(Math.floor(Math.random()*Mc.length));return t}const _t=()=>yP();function ji(e){const t=document.createElement("pont-toast"),r=document.createElement("pont-toast-view-port");r.part="user-profile-toast",r.setAttribute("variant","destructive"),t.dataset.state="open";const o=document.createElement("div");o.className="pont-grid pont-gap-1";const n=document.createElement("pont-toast-title");n.textContent="Uh oh! Something went wrong.";const i=document.createElement("pont-toast-description");i.textContent=e,o.appendChild(n),o.appendChild(i),r.appendChild(o),t.appendChild(r),document.body.appendChild(t),setTimeout(()=>{t.dataset.state="open",r.dataset.state="open"},10),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},3.5*1e3)}async function Pl(e,t=5e3){if(!e)return;let r;const o=new Promise(n=>{r=setTimeout(()=>n("timeout"),t)});try{await Promise.race([e.whenConfigured(),o])==="timeout"&&console.warn(`pontive: Auth.configure() has not been called after ${t}ms. Is this widget mounted inside <pont-provider>?`)}finally{clearTimeout(r)}}function _P(e){if(!(e!=null&&e.startsWith("data:image/svg+xml;base64,")))return null;try{const t=e.replace("data:image/svg+xml;base64,","");return atob(t)}catch(t){return console.error("Invalid base64 SVG:",t),null}}function wP(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function de(){var e;return(e=H.getCurrentSession())==null?void 0:e.access_token}function Fa(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);if(isNaN(r.getTime()))return"Invalid Date";const o=new Date,n=new Date(o.getFullYear(),o.getMonth(),o.getDate()),i=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=Math.floor((n.getTime()-i.getTime())/(1e3*60*60*24));return s===0?"Today":s===1?"Yesterday":s>1&&s<=6?r.toLocaleDateString("en-US",{weekday:"long"}):r.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function ka(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);return isNaN(r.getTime())?"Invalid Time":r.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})}function qi(e){if(!e)return"";const r=(e.includes("@")?e.split("@")[0]:e).split(/[\s._-]+/).filter(Boolean);return r.length===0?"":r.length===1?r[0].slice(0,2).toUpperCase():`${r[0][0]}${r[r.length-1][0]}`.toUpperCase()}function $P(e){return e instanceof Error&&"status"in e}function zi(e,t){var r,o;return $P(e)?((o=(r=e.data)==null?void 0:r.error)==null?void 0:o.message)??e.message??t:e instanceof Error&&e.message||t}var PP=Object.defineProperty,CP=Object.getOwnPropertyDescriptor,Cr=(e,t,r,o)=>{for(var n=o>1?void 0:o?CP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&PP(t,r,n),n};const SP=`<pont-block>
2659
2659
  <pont-header>
2660
2660
  <pont-title content="You continued in another tab"></pont-title>
2661
2661
  <pont-subtitle content="You can close this one."></pont-subtitle>
2662
2662
  </pont-header>
2663
2663
  <pont-link label="Continue here instead" event="continue_here"></pont-link>
2664
- </pont-block>`;exports.PontProvider=class extends f{constructor(){var t,r;super(...arguments),this.env=null,this.locales=(t=this.env)==null?void 0:t.locales,this.effectiveLocales=(r=this.env)==null?void 0:r.locales,this.auth={isAuthenticated:!1,resolved:!1},this.renderSpec=null,this.branding=en,this.autoRedirect=!0,this._handleLocaleEvent=o=>{var s;const i=(s=o.detail)==null?void 0:s.locales;i&&this.setLocale(i)},this.BRANDING_LINK_ID="pont-branding-css",this.REDIRECT_ATTEMPT_KEY="sb_auth_redirect_attempt",this.REDIRECT_BOUNCE_WINDOW_MS=1e4}createRenderRoot(){return this}setLocale(t){this.locales!==t&&(this.locales=t,this.dispatchLocaleChangedEvent(t))}dispatchLocaleChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:locale-changed",{detail:{locales:t},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),fP(),document.addEventListener("pont:set-locales",this._handleLocaleEvent),(async()=>{for(;!this.env||!this.env.domain;)await new Promise(r=>setTimeout(r,20));this.updateLocaleAndAuth()})().catch(r=>console.error("Error initializing PontProvider:",r))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pont:set-locales",this._handleLocaleEvent)}getBrandingCssUrl(){if(!this.env)return null;let t;try{t=Lh(this.env.domain)}catch(r){return console.warn("Could not resolve the auth base URL for branding:",r),null}return`${t}/auth/v1/apps/${this.env.appId}/branding.css`}loadBrandingCss(t){const r=document.head.querySelector(`link#${this.BRANDING_LINK_ID}`);if(r&&r.remove(),!t)return;const o=document.createElement("link");o.id=this.BRANDING_LINK_ID,o.rel="stylesheet";const n=Date.now(),i=t.includes("?")?"&":"?";o.href=`${t}${i}v=${n}`,o.onerror=s=>{console.warn("Failed to load branding CSS:",t,s)},document.head.appendChild(o)}configureAuth(t){H.configure({domain:t.domain,appId:t.appId,locales:this.effectiveLocales||this.locales||t.locales,signinUrl:t.signinUrl,signupUrl:t.signupUrl,invitationUrl:t.invitationUrl,onFlowStateChange:r=>{if(r.eventType==="flow_continued_elsewhere"){this.renderSpec=SP;return}r.render_spec&&(this.renderSpec=r.render_spec)},continueHereUrl:t.signinRedirectUrl,onAuthenticated:()=>{this.refreshAuthState()}})}updateLocaleAndAuth(){if(!this.env)return;const t=this.locales||this.env.locales||"";this.effectiveLocales!==t&&(this.effectiveLocales=t,this.dispatchLocaleChangedEvent(t)),this.configureAuth(this.env),pP(this.env),this.restoreThenRefreshAuthState(),this.loadBrandingCss(this.getBrandingCssUrl())}updated(t){var r;super.updated(t),(t.has("env")||t.has("locales"))&&(r=this.env)!=null&&r.domain&&this.updateLocaleAndAuth(),t.has("auth")&&this.handleAuthStateChange()}handleAuthStateChange(){if(!this.autoRedirect||!this.auth.isAuthenticated||!this.env)return;const t=uP({pathname:window.location.pathname,search:window.location.search,env:this.env});if(t){if(this.wasBouncedBackFrom(t)){this.clearRedirectAttempt(),H.invalidateSession(),this.refreshAuthState();return}this.recordRedirectAttempt(t),window.location.href=t}}recordRedirectAttempt(t){try{sessionStorage.setItem(this.REDIRECT_ATTEMPT_KEY,JSON.stringify({target:t,at:Date.now()}))}catch{}}clearRedirectAttempt(){try{sessionStorage.removeItem(this.REDIRECT_ATTEMPT_KEY)}catch{}}wasBouncedBackFrom(t){let r=null;try{r=sessionStorage.getItem(this.REDIRECT_ATTEMPT_KEY)}catch{return!1}if(!r||(this.clearRedirectAttempt(),this.getNavigationType()!=="navigate"))return!1;try{const o=JSON.parse(r);return o.target!==t||typeof o.at!="number"?!1:Date.now()-o.at<this.REDIRECT_BOUNCE_WINDOW_MS}catch{return!1}}getNavigationType(){try{const[t]=performance.getEntriesByType("navigation");return(t==null?void 0:t.type)??"navigate"}catch{return"navigate"}}refreshAuthState(){this.auth={isAuthenticated:H.isAuthenticated(),resolved:!0},this.dispatchAuthChangedEvent(this.auth)}dispatchAuthChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:auth-changed",{detail:{...t},bubbles:!0,composed:!0}))}async restoreThenRefreshAuthState(){try{await H.restoreSession()}catch{}this.refreshAuthState()}};Pr([a({type:Object}),Wt({context:Uh})],exports.PontProvider.prototype,"env",2);Pr([a({type:String})],exports.PontProvider.prototype,"locales",2);Pr([g(),Wt({context:Ui})],exports.PontProvider.prototype,"effectiveLocales",2);Pr([g(),Wt({context:$r})],exports.PontProvider.prototype,"auth",2);Pr([g(),Wt({context:Bi})],exports.PontProvider.prototype,"renderSpec",2);Pr([g(),Wt({context:Hn})],exports.PontProvider.prototype,"branding",2);Pr([a({type:Boolean})],exports.PontProvider.prototype,"autoRedirect",2);exports.PontProvider=Pr([p("pont-provider")],exports.PontProvider);var EP=Object.defineProperty,xP=Object.getOwnPropertyDescriptor,jh=(e,t,r,o)=>{for(var n=o>1?void 0:o?xP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&EP(t,r,n),n};exports.SignedOut=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};jh([J({context:$r,subscribe:!0}),a({attribute:!1})],exports.SignedOut.prototype,"auth",2);exports.SignedOut=jh([p("pont-signed-out")],exports.SignedOut);var OP=Object.defineProperty,RP=Object.getOwnPropertyDescriptor,qh=(e,t,r,o)=>{for(var n=o>1?void 0:o?RP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&OP(t,r,n),n};exports.SignedIn=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};qh([J({context:$r,subscribe:!0}),a({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=qh([p("pont-signed-in")],exports.SignedIn);var IP=Object.defineProperty,AP=Object.getOwnPropertyDescriptor,Vi=(e,t,r,o)=>{for(var n=o>1?void 0:o?AP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&IP(t,r,n),n};exports.PontAuthenticated=class extends f{constructor(){super(...arguments),this._cachedChildren=[],this._loadingChildren=[],this._captured=!1,this.redirectUrl="",this.env=null}createRenderRoot(){return this}connectedCallback(){if(super.connectedCallback(),this._captured)return;this._captured=!0;const t=Array.from(this.childNodes);t.forEach(r=>this.removeChild(r));for(const r of t)r instanceof Element&&r.getAttribute("slot")==="loading"?this._loadingChildren.push(r):this._cachedChildren.push(r)}render(){var t;return this.auth?this.auth.resolved?this.auth.isAuthenticated?l`${this._cachedChildren}`:(window.location.href=this.redirectUrl||((t=this.env)==null?void 0:t.signinUrl),h):l`${this._loadingChildren}`:h}};Vi([a({type:String})],exports.PontAuthenticated.prototype,"redirectUrl",2);Vi([J({context:Uh}),a({attribute:!1})],exports.PontAuthenticated.prototype,"env",2);Vi([J({context:$r,subscribe:!0}),a({attribute:!1})],exports.PontAuthenticated.prototype,"auth",2);exports.PontAuthenticated=Vi([p("pont-authenticated")],exports.PontAuthenticated);var TP=Object.defineProperty,DP=Object.getOwnPropertyDescriptor,zh=(e,t,r,o)=>{for(var n=o>1?void 0:o?DP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&TP(t,r,n),n};exports.AuthStateElement=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}syncAuthChildren(){this.auth&&(this.auth.isAuthenticated?this.querySelectorAll("pont-signed-out").forEach(t=>t.remove()):this.querySelectorAll("pont-signed-in").forEach(t=>t.remove()))}updated(t){var r;t.has("auth")&&(r=this.auth)!=null&&r.resolved&&(this.syncAuthChildren(),this.tryRemoveFallback())}render(){var t;return(t=this.auth)!=null&&t.resolved?l` <div>${this._cachedChildren}</div> `:l``}};zh([J({context:$r,subscribe:!0}),a({attribute:!1})],exports.AuthStateElement.prototype,"auth",2);exports.AuthStateElement=zh([p("pont-auth-state")],exports.AuthStateElement);var ve=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(ve||{}),cr=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(cr||{}),Ke=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(Ke||{}),Lr=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(Lr||{}),ot=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(ot||{});function Hi(){return U`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2664
+ </pont-block>`;exports.PontProvider=class extends f{constructor(){var t,r;super(...arguments),this.env=null,this.locales=(t=this.env)==null?void 0:t.locales,this.effectiveLocales=(r=this.env)==null?void 0:r.locales,this.auth={isAuthenticated:!1,resolved:!1},this.renderSpec=null,this.branding=en,this.autoRedirect=!0,this._handleLocaleEvent=o=>{var s;const i=(s=o.detail)==null?void 0:s.locales;i&&this.setLocale(i)},this.BRANDING_LINK_ID="pont-branding-css",this.REDIRECT_ATTEMPT_KEY="sb_auth_redirect_attempt",this.REDIRECT_BOUNCE_WINDOW_MS=1e4}createRenderRoot(){return this}setLocale(t){this.locales!==t&&(this.locales=t,this.dispatchLocaleChangedEvent(t))}dispatchLocaleChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:locale-changed",{detail:{locales:t},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),fP(),document.addEventListener("pont:set-locales",this._handleLocaleEvent),(async()=>{for(;!this.env||!this.env.domain;)await new Promise(r=>setTimeout(r,20));this.updateLocaleAndAuth()})().catch(r=>console.error("Error initializing PontProvider:",r))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pont:set-locales",this._handleLocaleEvent)}getBrandingCssUrl(){if(!this.env)return null;let t;try{t=Lh(this.env.domain)}catch(r){return console.warn("Could not resolve the auth base URL for branding:",r),null}return`${t}/auth/v1/apps/${this.env.appId}/branding.css`}loadBrandingCss(t){const r=document.head.querySelector(`link#${this.BRANDING_LINK_ID}`);if(r&&r.remove(),!t)return;const o=document.createElement("link");o.id=this.BRANDING_LINK_ID,o.rel="stylesheet";const n=Date.now(),i=t.includes("?")?"&":"?";o.href=`${t}${i}v=${n}`,o.onerror=s=>{console.warn("Failed to load branding CSS:",t,s)},document.head.appendChild(o)}configureAuth(t){H.configure({domain:t.domain,appId:t.appId,locales:this.effectiveLocales||this.locales||t.locales,signinUrl:t.signinUrl,signupUrl:t.signupUrl,invitationUrl:t.invitationUrl,onFlowStateChange:r=>{if(r.eventType==="flow_continued_elsewhere"){this.renderSpec=SP;return}r.render_spec&&(this.renderSpec=r.render_spec)},continueHereUrl:t.signinRedirectUrl,onAuthenticated:()=>{this.refreshAuthState()}})}updateLocaleAndAuth(){if(!this.env)return;const t=this.locales||this.env.locales||"";this.effectiveLocales!==t&&(this.effectiveLocales=t,this.dispatchLocaleChangedEvent(t)),this.configureAuth(this.env),pP(this.env),this.restoreThenRefreshAuthState(),this.loadBrandingCss(this.getBrandingCssUrl())}updated(t){var r;super.updated(t),(t.has("env")||t.has("locales"))&&(r=this.env)!=null&&r.domain&&this.updateLocaleAndAuth(),t.has("auth")&&this.handleAuthStateChange()}handleAuthStateChange(){if(!this.autoRedirect||!this.auth.isAuthenticated||!this.env)return;const t=uP({pathname:window.location.pathname,search:window.location.search,env:this.env});if(t){if(this.wasBouncedBackFrom(t)){this.clearRedirectAttempt(),H.invalidateSession(),this.refreshAuthState();return}this.recordRedirectAttempt(t),window.location.href=t}}recordRedirectAttempt(t){try{sessionStorage.setItem(this.REDIRECT_ATTEMPT_KEY,JSON.stringify({target:t,at:Date.now()}))}catch{}}clearRedirectAttempt(){try{sessionStorage.removeItem(this.REDIRECT_ATTEMPT_KEY)}catch{}}wasBouncedBackFrom(t){let r=null;try{r=sessionStorage.getItem(this.REDIRECT_ATTEMPT_KEY)}catch{return!1}if(!r||(this.clearRedirectAttempt(),this.getNavigationType()!=="navigate"))return!1;try{const o=JSON.parse(r);return o.target!==t||typeof o.at!="number"?!1:Date.now()-o.at<this.REDIRECT_BOUNCE_WINDOW_MS}catch{return!1}}getNavigationType(){try{const[t]=performance.getEntriesByType("navigation");return(t==null?void 0:t.type)??"navigate"}catch{return"navigate"}}refreshAuthState(){this.auth={isAuthenticated:H.isAuthenticated(),resolved:!0},this.dispatchAuthChangedEvent(this.auth)}dispatchAuthChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:auth-changed",{detail:{...t},bubbles:!0,composed:!0}))}async restoreThenRefreshAuthState(){try{await H.restoreSession()}catch{}this.refreshAuthState()}};Cr([a({type:Object}),Wt({context:Uh})],exports.PontProvider.prototype,"env",2);Cr([a({type:String})],exports.PontProvider.prototype,"locales",2);Cr([g(),Wt({context:Ui})],exports.PontProvider.prototype,"effectiveLocales",2);Cr([g(),Wt({context:Pr})],exports.PontProvider.prototype,"auth",2);Cr([g(),Wt({context:Bi})],exports.PontProvider.prototype,"renderSpec",2);Cr([g(),Wt({context:Hn})],exports.PontProvider.prototype,"branding",2);Cr([a({type:Boolean})],exports.PontProvider.prototype,"autoRedirect",2);exports.PontProvider=Cr([p("pont-provider")],exports.PontProvider);var EP=Object.defineProperty,xP=Object.getOwnPropertyDescriptor,jh=(e,t,r,o)=>{for(var n=o>1?void 0:o?xP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&EP(t,r,n),n};exports.SignedOut=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};jh([J({context:Pr,subscribe:!0}),a({attribute:!1})],exports.SignedOut.prototype,"auth",2);exports.SignedOut=jh([p("pont-signed-out")],exports.SignedOut);var OP=Object.defineProperty,RP=Object.getOwnPropertyDescriptor,qh=(e,t,r,o)=>{for(var n=o>1?void 0:o?RP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&OP(t,r,n),n};exports.SignedIn=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};qh([J({context:Pr,subscribe:!0}),a({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=qh([p("pont-signed-in")],exports.SignedIn);var IP=Object.defineProperty,AP=Object.getOwnPropertyDescriptor,Vi=(e,t,r,o)=>{for(var n=o>1?void 0:o?AP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&IP(t,r,n),n};exports.PontAuthenticated=class extends f{constructor(){super(...arguments),this._cachedChildren=[],this._loadingChildren=[],this._captured=!1,this.redirectUrl="",this.env=null}createRenderRoot(){return this}connectedCallback(){if(super.connectedCallback(),this._captured)return;this._captured=!0;const t=Array.from(this.childNodes);t.forEach(r=>this.removeChild(r));for(const r of t)r instanceof Element&&r.getAttribute("slot")==="loading"?this._loadingChildren.push(r):this._cachedChildren.push(r)}render(){var t;return this.auth?this.auth.resolved?this.auth.isAuthenticated?l`${this._cachedChildren}`:(window.location.href=this.redirectUrl||((t=this.env)==null?void 0:t.signinUrl),h):l`${this._loadingChildren}`:h}};Vi([a({type:String})],exports.PontAuthenticated.prototype,"redirectUrl",2);Vi([J({context:Uh}),a({attribute:!1})],exports.PontAuthenticated.prototype,"env",2);Vi([J({context:Pr,subscribe:!0}),a({attribute:!1})],exports.PontAuthenticated.prototype,"auth",2);exports.PontAuthenticated=Vi([p("pont-authenticated")],exports.PontAuthenticated);var TP=Object.defineProperty,DP=Object.getOwnPropertyDescriptor,zh=(e,t,r,o)=>{for(var n=o>1?void 0:o?DP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&TP(t,r,n),n};exports.AuthStateElement=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}syncAuthChildren(){this.auth&&(this.auth.isAuthenticated?this.querySelectorAll("pont-signed-out").forEach(t=>t.remove()):this.querySelectorAll("pont-signed-in").forEach(t=>t.remove()))}updated(t){var r;t.has("auth")&&(r=this.auth)!=null&&r.resolved&&(this.syncAuthChildren(),this.tryRemoveFallback())}render(){var t;return(t=this.auth)!=null&&t.resolved?l` <div>${this._cachedChildren}</div> `:l``}};zh([J({context:Pr,subscribe:!0}),a({attribute:!1})],exports.AuthStateElement.prototype,"auth",2);exports.AuthStateElement=zh([p("pont-auth-state")],exports.AuthStateElement);var ve=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(ve||{}),pr=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(pr||{}),Ke=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(Ke||{}),Lr=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(Lr||{}),ot=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(ot||{});function Hi(){return U`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2665
2665
  <path d="M6.66501 1.32926H1.99834C1.64472 1.32926 1.30558 1.46974 1.05553 1.71979C0.805484 1.96984 0.665009 2.30898 0.665009 2.6626V11.9959C0.665009 12.3496 0.805484 12.6887 1.05553 12.9387C1.30558 13.1888 1.64472 13.3293 1.99834 13.3293H11.3317C11.6853 13.3293 12.0244 13.1888 12.2745 12.9387C12.5245 12.6887 12.665 12.3496 12.665 11.9959V7.32926M10.9151 1.07925C11.1803 0.814036 11.54 0.665039 11.9151 0.665039C12.2901 0.665039 12.6499 0.814036 12.9151 1.07925C13.1803 1.34447 13.3293 1.70418 13.3293 2.07925C13.3293 2.45433 13.1803 2.81404 12.9151 3.07925L6.90641 9.08859C6.7481 9.24675 6.55254 9.36253 6.33774 9.42525L4.4224 9.98525C4.36504 10.002 4.30423 10.003 4.24634 9.98816C4.18846 9.97333 4.13562 9.94321 4.09337 9.90096C4.05112 9.8587 4.021 9.80587 4.00617 9.74798C3.99134 9.69009 3.99234 9.62929 4.00907 9.57192L4.56907 7.65659C4.63209 7.44195 4.74809 7.24662 4.9064 7.08859L10.9151 1.07925Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
2666
2666
  </svg>
2667
2667
  `}function Mt(){return U`
@@ -3312,7 +3312,7 @@
3312
3312
  ${this.isEditing?this.renderFooter():null}
3313
3313
  </div>
3314
3314
  </pont-card>
3315
- `}};Le([a({type:Object})],exports.PontUrlsInfo.prototype,"URLsInfo",2);Le([a({type:Boolean})],exports.PontUrlsInfo.prototype,"showIcons",2);Le([a({type:String})],exports.PontUrlsInfo.prototype,"layout",2);Le([a({type:Object})],exports.PontUrlsInfo.prototype,"content",2);Le([J({context:ko,subscribe:!0})],exports.PontUrlsInfo.prototype,"userContextValue",2);Le([g()],exports.PontUrlsInfo.prototype,"isEditing",2);Le([g()],exports.PontUrlsInfo.prototype,"isSaving",2);Le([g()],exports.PontUrlsInfo.prototype,"formData",2);Le([g()],exports.PontUrlsInfo.prototype,"errors",2);exports.PontUrlsInfo=Le([p("pont-urls-info")],exports.PontUrlsInfo);var p1=Object.defineProperty,h1=Object.getOwnPropertyDescriptor,Ot=(e,t,r,o)=>{for(var n=o>1?void 0:o?h1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&p1(t,r,n),n};exports.Profile=class extends f{constructor(){super(...arguments),this.showAvatarMenu=!1,this.orientation=Lr.HORIZONTAL,this.sidebarDisplayType=Ke.REGULAR,this.mode=cr==null?void 0:cr.PAGE,this.widgetsLayout=ot.ROW,this.content=null}createRenderRoot(){return this}render(){var t,r,o,n;return l`
3315
+ `}};Le([a({type:Object})],exports.PontUrlsInfo.prototype,"URLsInfo",2);Le([a({type:Boolean})],exports.PontUrlsInfo.prototype,"showIcons",2);Le([a({type:String})],exports.PontUrlsInfo.prototype,"layout",2);Le([a({type:Object})],exports.PontUrlsInfo.prototype,"content",2);Le([J({context:ko,subscribe:!0})],exports.PontUrlsInfo.prototype,"userContextValue",2);Le([g()],exports.PontUrlsInfo.prototype,"isEditing",2);Le([g()],exports.PontUrlsInfo.prototype,"isSaving",2);Le([g()],exports.PontUrlsInfo.prototype,"formData",2);Le([g()],exports.PontUrlsInfo.prototype,"errors",2);exports.PontUrlsInfo=Le([p("pont-urls-info")],exports.PontUrlsInfo);var p1=Object.defineProperty,h1=Object.getOwnPropertyDescriptor,Ot=(e,t,r,o)=>{for(var n=o>1?void 0:o?h1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&p1(t,r,n),n};exports.Profile=class extends f{constructor(){super(...arguments),this.showAvatarMenu=!1,this.orientation=Lr.HORIZONTAL,this.sidebarDisplayType=Ke.REGULAR,this.mode=pr==null?void 0:pr.PAGE,this.widgetsLayout=ot.ROW,this.content=null}createRenderRoot(){return this}render(){var t,r,o,n;return l`
3316
3316
  <div class="pont-account-settings-section-stack">
3317
3317
  <pont-account-info
3318
3318
  .content=${(t=this.content)==null?void 0:t.account}
@@ -3342,7 +3342,7 @@
3342
3342
  * @license
3343
3343
  * Copyright 2021 Google LLC
3344
3344
  * SPDX-License-Identifier: BSD-3-Clause
3345
- */const Gh=An(class extends Ti{constructor(){super(...arguments),this.key=h}render(e,t){return this.key=e,t}update(e,[t,r]){return t!==this.key&&(dm(e),this.key=t),r}});var f1=Object.defineProperty,v1=Object.getOwnPropertyDescriptor,rn=(e,t,r,o)=>{for(var n=o>1?void 0:o?v1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&f1(t,r,n),n};let yr=class extends f{constructor(){super(...arguments),this.orientation=Lr.HORIZONTAL,this.displayType=Ke.REGULAR,this.mode=cr.PAGE,this.config={showIcons:!0},this.activeTab=ve.PROFILE,this.isMenuOpen=!1}get isBurger(){return this.displayType===Ke.BURGER}get isVertical(){return this.orientation===Lr.VERTICAL}get isModal(){return this.mode===cr.MODAL}get sidebarKey(){return`${this.orientation}|${this.displayType}`}createRenderRoot(){return this}toggleMenu(){const e=this.closest('div[role="tab"]');e&&e.classList.toggle("pont-rotate-0"),this.isMenuOpen=!this.isMenuOpen,this.requestUpdate()}renderTabs(e){return Gh(this.sidebarKey,l`
3345
+ */const Gh=An(class extends Ti{constructor(){super(...arguments),this.key=h}render(e,t){return this.key=e,t}update(e,[t,r]){return t!==this.key&&(dm(e),this.key=t),r}});var f1=Object.defineProperty,v1=Object.getOwnPropertyDescriptor,rn=(e,t,r,o)=>{for(var n=o>1?void 0:o?v1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&f1(t,r,n),n};let _r=class extends f{constructor(){super(...arguments),this.orientation=Lr.HORIZONTAL,this.displayType=Ke.REGULAR,this.mode=pr.PAGE,this.config={showIcons:!0},this.activeTab=ve.PROFILE,this.isMenuOpen=!1}get isBurger(){return this.displayType===Ke.BURGER}get isVertical(){return this.orientation===Lr.VERTICAL}get isModal(){return this.mode===pr.MODAL}get sidebarKey(){return`${this.orientation}|${this.displayType}`}createRenderRoot(){return this}toggleMenu(){const e=this.closest('div[role="tab"]');e&&e.classList.toggle("pont-rotate-0"),this.isMenuOpen=!this.isMenuOpen,this.requestUpdate()}renderTabs(e){return Gh(this.sidebarKey,l`
3346
3346
  <pont-tabs-list
3347
3347
  data-burger=${this.isBurger}
3348
3348
  data-orientation=${e?"vertical":"horizontal"}
@@ -3419,7 +3419,7 @@
3419
3419
  </div>
3420
3420
 
3421
3421
  ${this.isBurger?this.renderMobileDrawer():null}
3422
- `}};rn([a({type:String})],yr.prototype,"orientation",2);rn([a({type:String})],yr.prototype,"displayType",2);rn([a({type:String})],yr.prototype,"mode",2);rn([a({type:Object})],yr.prototype,"config",2);rn([a({type:String})],yr.prototype,"activeTab",2);rn([g()],yr.prototype,"isMenuOpen",2);yr=rn([p("pont-profile-sidebar")],yr);function Sl(){document.dispatchEvent(new CustomEvent("open-user-profile",{bubbles:!0,composed:!0}))}function El(){document.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}function Kh(){document.dispatchEvent(new CustomEvent("open-member-management",{bubbles:!0,composed:!0}))}function Wh(){document.dispatchEvent(new CustomEvent("close-member-management",{bubbles:!0,composed:!0}))}function Yh(e){document.dispatchEvent(new CustomEvent("pont:set-locales",{detail:{locales:e},bubbles:!0,composed:!0}))}typeof window<"u"&&(window.__pontCoreSdk||(window.__pontCoreSdk={}),window.__pontCoreSdk.openAccountSettingsModal=Sl,window.__pontCoreSdk.closeAccountSettingsModal=El,window.__pontCoreSdk.openMemberManagementModal=Kh,window.__pontCoreSdk.closeMemberManagementModal=Wh,window.__pontCoreSdk.setLocales=Yh);var b1=Object.defineProperty,qt=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&b1(t,r,n),n};class Rt extends f{constructor(){super(),this.showAvatarMenu=!1,this.orientation=Lr.HORIZONTAL,this.mobileDisplay=Ke.REGULAR,this.mode=cr.PAGE,this.widgetsLayout=ot.ROW,this.content=null,this.isOpen=!1,this.currentBreakpoint="md",this.activeTab=ve.PROFILE,this._userLoaded=!1,this._userLoading=!1,this.userContextValue={user:null,identifier:null},this.__initialized=!1,this.account={email:"",phone:"",avatar:""},this.personal={username:"",first:"",middle:"",last:"",nickname:"",gender:"",bio:""},this.location={location:"",zoneInfo:""},this.urls={website:""},this._handleResize=()=>{this._updateBreakpoint()},this._handleCloseProfile=()=>{this.isModal&&(this.isOpen=!1)},this._handleOpenProfile=()=>{this.isModal&&(this.isOpen=!0)},this._toggleAvatarMenu=t=>{t.stopPropagation(),this.showAvatarMenu=!this.showAvatarMenu},this._handleAvatarChange=()=>{const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=r=>{var i;const o=(i=r.target.files)==null?void 0:i[0];if(!o)return;const n=new FileReader;n.onload=()=>{this.account.avatar=n.result,this.requestUpdate()},n.readAsDataURL(o)},t.click()},this._handleAvatarRemove=()=>{this.account.avatar="https://via.placeholder.com/80",this.showAvatarMenu=!1},this._handleClickOutside=t=>{if(!this.showAvatarMenu)return;const r=t.target,o=this.querySelector("pont-account-info"),n=this.querySelector("pont-card");o!=null&&o.contains(r)||n!=null&&n.contains(r)||(this.showAvatarMenu=!1)},this._handleOpenProfile=this._handleOpenProfile.bind(this),this._handleCloseProfile=this._handleCloseProfile.bind(this),window.addEventListener("open-user-profile",this._handleOpenProfile),window.addEventListener("close-user-profile",this._handleCloseProfile)}get isModal(){return this.mode===cr.MODAL}get isVerticalOrientation(){return this.orientation===Lr.VERTICAL}get isHorizontalOrientation(){return this.orientation===Lr.HORIZONTAL}get isBurger(){return this.sidebarDisplayType===Ke.BURGER}get sidebarDisplayType(){return this.isVerticalOrientation||this.currentBreakpoint==="md"?Ke.REGULAR:Ke.BURGER}get layoutKey(){return`${this.orientation}|${this.mode}|${this.widgetsLayout}|${this.mobileDisplay}`}get containerClasses(){const t=this.isBurger||this.isVerticalOrientation;return Vt(kw,this.isModal?Mw:Nw,this.isModal?Fw:Lw,t?"!pont-flex-col":"!pont-flex-row")}get contentClasses(){return Vt("pont-flex-grow",this.isModal?`pont-account-settings-modal-content ${this.isHorizontalOrientation?"pont-account-settings-modal-content-horizontal":""}`:"pont-account-settings-content-md-max-height-full",this.isVerticalOrientation?"pont-account-settings-vertical-margin":"")}connectedCallback(){super.connectedCallback(),this._updateBreakpoint(),window.addEventListener("resize",this._handleResize),document.addEventListener("remove-avatar",this._handleAvatarRemove),document.addEventListener("click",this._handleClickOutside),document.addEventListener("close-user-profile",this._handleCloseProfile),document.addEventListener("open-user-profile",this._handleOpenProfile),document.addEventListener("change-avatar",this._handleAvatarChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),document.removeEventListener("remove-avatar",this._handleAvatarRemove),document.removeEventListener("click",this._handleClickOutside),document.removeEventListener("close-user-profile",this._handleCloseProfile),document.removeEventListener("open-user-profile",this._handleOpenProfile),document.removeEventListener("change-avatar",this._handleAvatarChange)}updated(t){t.has("mode")&&(this.isModal?this.isOpen=!1:this.isOpen=!0),t.has("userContextValue")&&this.userContextValue.user&&this.tryRemoveFallback(),t.has("auth")&&this.loadUser()}firstUpdated(){this.__initialized||(this.__initialized=!0,this.style.width="100%",this.style.display="flex",this.style.justifyContent="center",this.style.flexDirection="column")}fillProfileData(t){var r;this.account={...this.account,avatar:t.picture||"",email:t.email||"",phone:t.phone||""},this.personal={...this.personal,bio:t.profile||"",first:t.given_name||"",last:t.family_name||"",username:t.username||"",gender:t.gender||"",middle:t.middle_name||"",nickname:t.nickname||""},this.location={...this.location,location:((r=t.address)==null?void 0:r.locality)||"",zoneInfo:t.zoneinfo||""},this.urls={...this.urls,website:t.website||""}}async loadUser(){var t,r;if(!(!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated)&&!(this._userLoaded||this._userLoading)&&(this.userContextValue.identifier=((r=H.getAuthenticatedUser())==null?void 0:r.email)??"",!!this.userContextValue.identifier)){this._userLoading=!0;try{this.userContextValue.user=await YP(),this.tryRemoveFallback(),this.fillProfileData(this.userContextValue.user),this._userLoaded=!0}catch(o){console.error("[pont-account-settings] Failed loading user:",o)}finally{this._userLoading=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}_updateBreakpoint(){const t=window.innerWidth;this.currentBreakpoint=t<Pc.xs?"xs":t<Pc.sm?"sm":"md"}renderWatermark(){return this.isVerticalOrientation?l`
3422
+ `}};rn([a({type:String})],_r.prototype,"orientation",2);rn([a({type:String})],_r.prototype,"displayType",2);rn([a({type:String})],_r.prototype,"mode",2);rn([a({type:Object})],_r.prototype,"config",2);rn([a({type:String})],_r.prototype,"activeTab",2);rn([g()],_r.prototype,"isMenuOpen",2);_r=rn([p("pont-profile-sidebar")],_r);function Sl(){document.dispatchEvent(new CustomEvent("open-user-profile",{bubbles:!0,composed:!0}))}function El(){document.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}function Kh(){document.dispatchEvent(new CustomEvent("open-member-management",{bubbles:!0,composed:!0}))}function Wh(){document.dispatchEvent(new CustomEvent("close-member-management",{bubbles:!0,composed:!0}))}function Yh(e){document.dispatchEvent(new CustomEvent("pont:set-locales",{detail:{locales:e},bubbles:!0,composed:!0}))}typeof window<"u"&&(window.__pontCoreSdk||(window.__pontCoreSdk={}),window.__pontCoreSdk.openAccountSettingsModal=Sl,window.__pontCoreSdk.closeAccountSettingsModal=El,window.__pontCoreSdk.openMemberManagementModal=Kh,window.__pontCoreSdk.closeMemberManagementModal=Wh,window.__pontCoreSdk.setLocales=Yh);var b1=Object.defineProperty,qt=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&b1(t,r,n),n};class Rt extends f{constructor(){super(),this.showAvatarMenu=!1,this.orientation=Lr.HORIZONTAL,this.mobileDisplay=Ke.REGULAR,this.mode=pr.PAGE,this.widgetsLayout=ot.ROW,this.content=null,this.isOpen=!1,this.currentBreakpoint="md",this.activeTab=ve.PROFILE,this._userLoaded=!1,this._userLoading=!1,this.userContextValue={user:null,identifier:null},this.__initialized=!1,this.account={email:"",phone:"",avatar:""},this.personal={username:"",first:"",middle:"",last:"",nickname:"",gender:"",bio:""},this.location={location:"",zoneInfo:""},this.urls={website:""},this._handleResize=()=>{this._updateBreakpoint()},this._handleCloseProfile=()=>{this.isModal&&(this.isOpen=!1)},this._handleOpenProfile=()=>{this.isModal&&(this.isOpen=!0)},this._toggleAvatarMenu=t=>{t.stopPropagation(),this.showAvatarMenu=!this.showAvatarMenu},this._handleAvatarChange=()=>{const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=r=>{var i;const o=(i=r.target.files)==null?void 0:i[0];if(!o)return;const n=new FileReader;n.onload=()=>{this.account.avatar=n.result,this.requestUpdate()},n.readAsDataURL(o)},t.click()},this._handleAvatarRemove=()=>{this.account.avatar="https://via.placeholder.com/80",this.showAvatarMenu=!1},this._handleClickOutside=t=>{if(!this.showAvatarMenu)return;const r=t.target,o=this.querySelector("pont-account-info"),n=this.querySelector("pont-card");o!=null&&o.contains(r)||n!=null&&n.contains(r)||(this.showAvatarMenu=!1)},this._handleOpenProfile=this._handleOpenProfile.bind(this),this._handleCloseProfile=this._handleCloseProfile.bind(this),window.addEventListener("open-user-profile",this._handleOpenProfile),window.addEventListener("close-user-profile",this._handleCloseProfile)}get isModal(){return this.mode===pr.MODAL}get isVerticalOrientation(){return this.orientation===Lr.VERTICAL}get isHorizontalOrientation(){return this.orientation===Lr.HORIZONTAL}get isBurger(){return this.sidebarDisplayType===Ke.BURGER}get sidebarDisplayType(){return this.isVerticalOrientation||this.currentBreakpoint==="md"?Ke.REGULAR:Ke.BURGER}get layoutKey(){return`${this.orientation}|${this.mode}|${this.widgetsLayout}|${this.mobileDisplay}`}get containerClasses(){const t=this.isBurger||this.isVerticalOrientation;return Vt(kw,this.isModal?Mw:Nw,this.isModal?Fw:Lw,t?"!pont-flex-col":"!pont-flex-row")}get contentClasses(){return Vt("pont-flex-grow",this.isModal?`pont-account-settings-modal-content ${this.isHorizontalOrientation?"pont-account-settings-modal-content-horizontal":""}`:"pont-account-settings-content-md-max-height-full",this.isVerticalOrientation?"pont-account-settings-vertical-margin":"")}connectedCallback(){super.connectedCallback(),this._updateBreakpoint(),window.addEventListener("resize",this._handleResize),document.addEventListener("remove-avatar",this._handleAvatarRemove),document.addEventListener("click",this._handleClickOutside),document.addEventListener("close-user-profile",this._handleCloseProfile),document.addEventListener("open-user-profile",this._handleOpenProfile),document.addEventListener("change-avatar",this._handleAvatarChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),document.removeEventListener("remove-avatar",this._handleAvatarRemove),document.removeEventListener("click",this._handleClickOutside),document.removeEventListener("close-user-profile",this._handleCloseProfile),document.removeEventListener("open-user-profile",this._handleOpenProfile),document.removeEventListener("change-avatar",this._handleAvatarChange)}updated(t){t.has("mode")&&(this.isModal?this.isOpen=!1:this.isOpen=!0),t.has("userContextValue")&&this.userContextValue.user&&this.tryRemoveFallback(),t.has("auth")&&this.loadUser()}firstUpdated(){this.__initialized||(this.__initialized=!0,this.style.width="100%",this.style.display="flex",this.style.justifyContent="center",this.style.flexDirection="column")}fillProfileData(t){var r;this.account={...this.account,avatar:t.picture||"",email:t.email||"",phone:t.phone||""},this.personal={...this.personal,bio:t.profile||"",first:t.given_name||"",last:t.family_name||"",username:t.username||"",gender:t.gender||"",middle:t.middle_name||"",nickname:t.nickname||""},this.location={...this.location,location:((r=t.address)==null?void 0:r.locality)||"",zoneInfo:t.zoneinfo||""},this.urls={...this.urls,website:t.website||""}}async loadUser(){var t,r;if(!(!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated)&&!(this._userLoaded||this._userLoading)&&(this.userContextValue.identifier=((r=H.getAuthenticatedUser())==null?void 0:r.email)??"",!!this.userContextValue.identifier)){this._userLoading=!0;try{this.userContextValue.user=await YP(),this.tryRemoveFallback(),this.fillProfileData(this.userContextValue.user),this._userLoaded=!0}catch(o){console.error("[pont-account-settings] Failed loading user:",o)}finally{this._userLoading=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}_updateBreakpoint(){const t=window.innerWidth;this.currentBreakpoint=t<Pc.xs?"xs":t<Pc.sm?"sm":"md"}renderWatermark(){return this.isVerticalOrientation?l`
3423
3423
  <div class="pont-account-settings-watermark-container">
3424
3424
  <pont-watermark custom-id="pont-watermark"></pont-watermark>
3425
3425
  </div>
@@ -3500,7 +3500,7 @@
3500
3500
  ${this.renderMainContent()}
3501
3501
  </div>
3502
3502
  </pont-modal>
3503
- `:this.renderMainContent():h:this.isModal?h:this.renderLoadingSkeleton()}createRenderRoot(){return this}}qt([a({type:Boolean})],Rt.prototype,"showAvatarMenu");qt([a({type:String})],Rt.prototype,"orientation");qt([a({type:String})],Rt.prototype,"mobileDisplay");qt([a({type:String,reflect:!0})],Rt.prototype,"mode");qt([a({type:String})],Rt.prototype,"widgetsLayout");qt([a({type:Object})],Rt.prototype,"content");qt([g()],Rt.prototype,"isOpen");qt([g()],Rt.prototype,"currentBreakpoint");qt([g()],Rt.prototype,"activeTab");qt([J({context:$r,subscribe:!0}),a({attribute:!1})],Rt.prototype,"auth");qt([g()],Rt.prototype,"_userLoaded");qt([g()],Rt.prototype,"_userLoading");qt([Wt({context:ko}),g()],Rt.prototype,"userContextValue");customElements.define("pont-account-settings",Rt);var y1=Object.defineProperty,_1=Object.getOwnPropertyDescriptor,Qh=(e,t,r,o)=>{for(var n=o>1?void 0:o?_1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&y1(t,r,n),n};exports.PontSecuritySettings=class extends f{constructor(){super(...arguments),this.loading=!1}render(){return this.loading?l`<div class="pont-account-settings-security-loading">
3503
+ `:this.renderMainContent():h:this.isModal?h:this.renderLoadingSkeleton()}createRenderRoot(){return this}}qt([a({type:Boolean})],Rt.prototype,"showAvatarMenu");qt([a({type:String})],Rt.prototype,"orientation");qt([a({type:String})],Rt.prototype,"mobileDisplay");qt([a({type:String,reflect:!0})],Rt.prototype,"mode");qt([a({type:String})],Rt.prototype,"widgetsLayout");qt([a({type:Object})],Rt.prototype,"content");qt([g()],Rt.prototype,"isOpen");qt([g()],Rt.prototype,"currentBreakpoint");qt([g()],Rt.prototype,"activeTab");qt([J({context:Pr,subscribe:!0}),a({attribute:!1})],Rt.prototype,"auth");qt([g()],Rt.prototype,"_userLoaded");qt([g()],Rt.prototype,"_userLoading");qt([Wt({context:ko}),g()],Rt.prototype,"userContextValue");customElements.define("pont-account-settings",Rt);var y1=Object.defineProperty,_1=Object.getOwnPropertyDescriptor,Qh=(e,t,r,o)=>{for(var n=o>1?void 0:o?_1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&y1(t,r,n),n};exports.PontSecuritySettings=class extends f{constructor(){super(...arguments),this.loading=!1}render(){return this.loading?l`<div class="pont-account-settings-security-loading">
3504
3504
  Loading security settings...
3505
3505
  </div>`:l`
3506
3506
  <div class="pont-account-settings-security-panel">
@@ -4333,7 +4333,7 @@
4333
4333
  </div>
4334
4334
  </div>
4335
4335
  `}
4336
- `}};Qt([a({attribute:!1})],Ut.prototype,"invitations",2);Qt([a({type:Boolean,attribute:!1})],Ut.prototype,"invitationsLoading",2);Qt([a({type:String})],Ut.prototype,"searchTerm",2);Qt([a({type:Object,attribute:!1})],Ut.prototype,"invitationFilters",2);Qt([a({type:Array,attribute:!1})],Ut.prototype,"availableRoles",2);Qt([a({type:Array,attribute:!1})],Ut.prototype,"statusOptions",2);Qt([a({type:Number})],Ut.prototype,"invitationsPage",2);Qt([a({type:Number})],Ut.prototype,"invitationsTotalPages",2);Qt([a({type:Number})],Ut.prototype,"invitationsTotal",2);Qt([a({type:Number})],Ut.prototype,"rowsPerPage",2);Qt([g()],Ut.prototype,"_searchDebounceTimer",2);Ut=Qt([p("pont-member-management-invitations-panel")],Ut);var sr=(e=>(e.MEMBERS="Members",e.INVITATIONS="Invitations",e))(sr||{});function F1(e){const t=[{key:"admin",name:"Admin",description:"Full access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["*"],permission_count:10,assignment_count:2,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"manager",name:"Manager",description:"Can manage projects and members",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects","write:projects","read:members"],permission_count:3,assignment_count:4,inheritance:{parent_role_keys:["admin"],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"developer",name:"Developer",description:"Can read and write code",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:repos","write:repos"],permission_count:2,assignment_count:6,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"viewer",name:"Viewer",description:"Read-only access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects"],permission_count:1,assignment_count:8,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3}];return{data:t,object:"list",pagination:{page:1,limit:20,total:t.length,total_pages:1}}}const Vo="2026-08-05T10:00:00Z",Ho="2026-08-04T10:00:00Z",k1=[{id:"mem_1",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"admin",name:"Admin"}],joined_at:"2026-08-04T10:00:00Z",last_active_at:"2024-12-01T08:30:00Z",created_at:"2024-01-15T10:00:00Z",updated_at:"2024-12-01T08:30:00Z",object:"member",user:{id:"user_1",email:"alice@example.com",email_verified:!0,family_name:"Smith",given_name:"Alice",name:"Alice Smith",picture:"",status:"active",username:"alice"}},{id:"mem_2",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"manager",name:"Manager"}],joined_at:"2024-02-10T11:00:00Z",last_active_at:"2024-11-28T14:20:00Z",created_at:"2024-02-10T11:00:00Z",updated_at:"2024-11-28T14:20:00Z",object:"member",user:{id:"user_2",email:"bob@example.com",email_verified:!0,family_name:"Johnson",given_name:"Bob",name:"Bob Johnson",picture:"",status:"active",username:"bob"}},{id:"mem_3",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-03-20T09:00:00Z",last_active_at:"2024-12-02T16:45:00Z",created_at:"2024-03-20T09:00:00Z",updated_at:"2024-12-02T16:45:00Z",object:"member",user:{id:"user_3",email:"charlie@example.com",email_verified:!0,family_name:"Davis",given_name:"Charlie",name:"Charlie Davis",picture:"",status:"active",username:"charlie"}},{id:"mem_4",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:"2024-04-05T13:30:00Z",last_active_at:"2024-11-20T10:00:00Z",created_at:"2024-04-05T13:30:00Z",updated_at:"2024-11-20T10:00:00Z",object:"member",user:{id:"user_4",email:"diana@example.com",email_verified:!0,family_name:"Evans",given_name:"Diana",name:"Diana Evans",picture:"https://ui-avatars.com/api/?name=Diana+Evans&background=random",status:"active",username:"diana"}},{id:"mem_5",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-05-12T08:00:00Z",last_active_at:"2024-12-03T09:15:00Z",created_at:"2024-05-12T08:00:00Z",updated_at:"2024-12-03T09:15:00Z",object:"member",user:{id:"user_5",email:"eve@example.com",email_verified:!0,family_name:"Foster",given_name:"Eve",name:"Eve Foster",picture:"https://ui-avatars.com/api/?name=Eve+Foster&background=random",status:"active",username:"eve"}},{id:"mem_6",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"manager",name:"Manager"}],joined_at:Vo,last_active_at:Vo,created_at:Vo,updated_at:Vo,object:"member",user:{id:"user_6",email:"fiona@example.com",email_verified:!0,family_name:"Green",given_name:"Fiona",name:"Fiona Green",picture:"https://ui-avatars.com/api/?name=Fiona+Green&background=random",status:"active",username:"fiona"}},{id:"mem_7",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:Ho,last_active_at:Ho,created_at:Ho,updated_at:Ho,object:"member",user:{id:"user_7",email:"george@example.com",email_verified:!0,family_name:"Hughes",given_name:"George",name:"George Hughes",picture:"https://ui-avatars.com/api/?name=George+Hughes&background=random",status:"active",username:"george"}}];function N1(e){let t=[...k1];if(e!=null&&e.search){const d=e.search.toLowerCase();t=t.filter(c=>c.user.name.toLowerCase().includes(d)||c.user.email.toLowerCase().includes(d))}if(e!=null&&e.roles){const d=e.roles.split(",");t=t.filter(c=>c.roles.some(m=>d.includes(m.key)))}const r=(e==null?void 0:e.page)||1,o=(e==null?void 0:e.limit)||5,n=(r-1)*o,i=n+o;return{data:t.slice(n,i),object:"list",pagination:{page:r,limit:o,total:t.length,total_pages:Math.ceil(t.length/o)}}}const M1=[{id:"inv_1",organization_id:"org_123",invitee_email:"frank@example.com",roles:[{key:"viewer",name:"Viewer"}],status:"pending",invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*2,updated_at:Date.now()/1e3-86400*2,expires_at:Date.now()/1e3+86400*5,last_sent_at:Date.now()/1e3-86400*2,resend_count:0,object:"invitation"},{id:"inv_2",organization_id:"org_123",invitee_email:"grace@example.com",roles:[{key:"manager",name:"Manager"}],status:"pending",invited_by:{id:"user_2",name:"Bob Johnson"},created_at:Date.now()/1e3-86400*10,updated_at:Date.now()/1e3-86400*10,expires_at:Date.now()/1e3+86400*1,last_sent_at:Date.now()/1e3-86400*3,resend_count:2,object:"invitation"},{id:"inv_3",organization_id:"org_123",invitee_email:"henry@example.com",roles:[{key:"developer",name:"Developer"}],status:"accepted",invited_by:{id:"user_3",name:"Charlie Davis"},created_at:Date.now()/1e3-86400*30,updated_at:Date.now()/1e3-86400*28,expires_at:Date.now()/1e3-86400*10,last_sent_at:Date.now()/1e3-86400*30,resend_count:0,accepted_at:Date.now()/1e3-86400*28,object:"invitation"},{id:"inv_4",organization_id:"org_123",invitee_email:"irene@example.com",roles:[{key:"viewer",name:"Viewer"}],status:"expired",invited_by:{id:"user_4",name:"Diana Evans"},created_at:Date.now()/1e3-86400*15,updated_at:Date.now()/1e3-86400*15,expires_at:Date.now()/1e3-86400*5,last_sent_at:Date.now()/1e3-86400*15,resend_count:1,object:"invitation"},{id:"inv_5",organization_id:"org_123",invitee_email:"jack@example.com",roles:[{key:"admin",name:"Admin"}],status:"pending",invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*1,updated_at:Date.now()/1e3-86400*1,expires_at:Date.now()/1e3+86400*7,last_sent_at:Date.now()/1e3-86400*1,resend_count:0,object:"invitation"}];function B1(e){let t=[...M1];if(e!=null&&e.search){const c=e.search.toLowerCase();t=t.filter(m=>m.invitee_email.toLowerCase().includes(c))}if(e!=null&&e.roles){const c=e.roles.split(",");t=t.filter(m=>m.roles.some(v=>c.includes(v.key)))}let r=e!=null&&e.status?e.status.split(","):["pending"];r.length>0&&r[0]!==""&&(t=t.filter(c=>r.includes(c.status)));const o=(e==null?void 0:e.page)||1,n=(e==null?void 0:e.limit)||5,i=(o-1)*n,s=i+n;return{data:t.slice(i,s),object:"list",pagination:{page:o,limit:n,total:t.length,total_pages:Math.ceil(t.length/n)}}}var U1=Object.defineProperty,V=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&U1(t,r,n),n};class j extends f{constructor(){super(...arguments),this.mode="PAGE",this.title="Member Management",this.description="Manage member access, roles, and invitations",this.organizationId="",this.isOpen=!1,this.monitoringFlag=!1,this.membersSearchTerm="",this.invitationsSearchTerm="",this.members=[],this.invitations=[],this.membersLoading=!1,this.invitationsLoading=!1,this.useMockData=!1,this.membersPage=1,this.membersTotalPages=0,this.invitationsPage=1,this.invitationsTotalPages=0,this.membersTotal=0,this.invitationsTotal=0,this.rowsPerPage=5,this.inviteDrawerId="pont-member-invite",this.availableRoles=[],this.isLoadingRoles=!1,this._rolesLoaded=!1,this.memberFilters={roles:[]},this.invitationFilters={roles:[],status:[]},this.invitationStatusOptions=[{value:"pending",label:"Pending"},{value:"accepted",label:"Accepted"},{value:"expired",label:"Expired"}],this.selectedMember=null,this.actionModalOpen=!1,this.actionModalConfig={title:"",description:"",confirmLabel:"Confirm",cancelLabel:"Cancel",variant:"default",onConfirm:()=>{},onCancel:()=>{},warningText:""},this.manageRolesDrawerId="pont-manage-roles",this._handleOpen=()=>{this.mode==="MODAL"&&(this.isOpen=!0)},this._handleClose=()=>{this.mode==="MODAL"&&(this.isOpen=!1)},this.loadData=async()=>{this.organizationId&&(await this.loadMembers(),await this.loadInvitations(),this.tryRemoveFallback())}}async openActionModal(t){this.actionModalConfig={...this.actionModalConfig,...t},this.actionModalOpen=!1,this.requestUpdate(),await this.updateComplete,this.actionModalOpen=!0}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r?r.remove():console.warn("fallback not found")})}connectedCallback(){super.connectedCallback(),window.addEventListener("open-member-management",this._handleOpen),window.addEventListener("close-member-management",this._handleClose),document.addEventListener("open-member-management",this._handleOpen),document.addEventListener("close-member-management",this._handleClose),window.addEventListener("invite-members-success",this.loadData),window.addEventListener("update-members-role",this.loadData)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("open-member-management",this._handleOpen),window.removeEventListener("close-member-management",this._handleClose),document.removeEventListener("open-member-management",this._handleOpen),document.removeEventListener("close-member-management",this._handleClose),window.removeEventListener("invite-members-success",this.loadData),window.removeEventListener("update-members-role",this.loadData),this._membersSearchDebounceTimer&&window.clearTimeout(this._membersSearchDebounceTimer),this._invitationsSearchDebounceTimer&&window.clearTimeout(this._invitationsSearchDebounceTimer)}firstUpdated(){this.isOpen=this.mode==="PAGE",this.loadData(),this.organizationId&&!this._rolesLoaded&&this.loadRoles()}updated(t){t.has("mode")&&(this.isOpen=this.mode==="PAGE"),t.has("organizationId")&&this.organizationId&&!this._rolesLoaded&&this.loadRoles()}async loadRoles(){if(!(!this.organizationId||this._rolesLoaded))try{this.isLoadingRoles=!0;let t;if(this.useMockData)t=F1({resource_id:this.organizationId,resource_type:"organization"});else{const r={resource_id:this.organizationId,resource_type:"organization"};t=await Cl(r)}this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name})),this._rolesLoaded=!0}catch(t){console.error("Failed to load roles:",t)}finally{this.isLoadingRoles=!1}}async loadMembers(t=1,r=this.rowsPerPage,o,n){try{this.membersLoading=!0;const i={page:t,limit:r};o&&(i.search=o);const s=n||this.memberFilters;s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let d;this.useMockData?d=N1(i):d=await QP(this.organizationId,i),this.members=d.data,this.membersPage=d.pagination.page,this.membersTotalPages=d.pagination.total_pages,this.membersTotal=d.pagination.total,this.useMockData=!1}catch(i){console.error("[pont-member-management] Failed loading members:",i)}finally{this.membersLoading=!1}}async loadInvitations(t=1,r=this.rowsPerPage,o,n){try{this.invitationsLoading=!0;const i={page:t,limit:r};o&&(i.search=o);const s=n||this.invitationFilters;let d="pending";s.status&&s.status.length>0&&(d=s.status.join(",")),i.status=d,s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let c;this.useMockData?c=B1(i):c=await r1(this.organizationId,i),this.invitations=c.data,this.invitationsPage=c.pagination.page,this.invitationsTotalPages=c.pagination.total_pages,this.invitationsTotal=c.pagination.total}catch(i){console.error("[pont-member-management] Failed loading invitations:",i)}finally{this.invitationsLoading=!1}}handleMembersPageChange(t){const r=t.detail.page;this.loadMembers(r,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsPageChange(t){const r=t.detail.page;this.loadInvitations(r,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersSearchChange(t){this.membersSearchTerm=t.detail.searchTerm||"",this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm.trim()?this.membersSearchTerm:void 0,this.memberFilters)}handleInvitationsSearchChange(t){this.invitationsSearchTerm=t.detail.searchTerm||"",this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm.trim()?this.invitationsSearchTerm:void 0,this.invitationFilters)}handleMembersFilterChange(t){const r=t.detail.roles||[];this.memberFilters={roles:r},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsFilterChange(t){const r=t.detail||{};this.invitationFilters={roles:r.roles||[],status:r.status||[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersClearFilters(){this.memberFilters={roles:[]},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsClearFilters(){this.invitationFilters={roles:[],status:[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRemoveFilter(t){const r=t.detail.filterValue;this.memberFilters={...this.memberFilters,roles:this.memberFilters.roles.filter(o=>o!==r)},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsRemoveFilter(t){const r=t.detail.filterValue;this.invitationFilters={...this.invitationFilters,roles:this.invitationFilters.roles.filter(o=>o!==r),status:this.invitationFilters.status.filter(o=>o!==r)},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadMembers(1,r,this.membersSearchTerm,this.memberFilters)}handleInvitationsRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadInvitations(1,r,this.invitationsSearchTerm,this.invitationFilters)}handleRefresh(t){t==="members"?this.loadMembers(this.membersPage,this.rowsPerPage,this.membersSearchTerm,this.memberFilters):this.loadInvitations(this.invitationsPage,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}openManageRoles(t){const r=t.detail;this.selectedMember=r,setTimeout(()=>{document.dispatchEvent(new CustomEvent("open-sidedrawer",{detail:{id:this.manageRolesDrawerId,side:"right"},bubbles:!0,composed:!0}))},50)}handleSuspendMember(t){var o,n;const r=t.detail;this.openActionModal({title:"Suspend User",description:l`
4336
+ `}};Qt([a({attribute:!1})],Ut.prototype,"invitations",2);Qt([a({type:Boolean,attribute:!1})],Ut.prototype,"invitationsLoading",2);Qt([a({type:String})],Ut.prototype,"searchTerm",2);Qt([a({type:Object,attribute:!1})],Ut.prototype,"invitationFilters",2);Qt([a({type:Array,attribute:!1})],Ut.prototype,"availableRoles",2);Qt([a({type:Array,attribute:!1})],Ut.prototype,"statusOptions",2);Qt([a({type:Number})],Ut.prototype,"invitationsPage",2);Qt([a({type:Number})],Ut.prototype,"invitationsTotalPages",2);Qt([a({type:Number})],Ut.prototype,"invitationsTotal",2);Qt([a({type:Number})],Ut.prototype,"rowsPerPage",2);Qt([g()],Ut.prototype,"_searchDebounceTimer",2);Ut=Qt([p("pont-member-management-invitations-panel")],Ut);var ar=(e=>(e.MEMBERS="Members",e.INVITATIONS="Invitations",e))(ar||{});function F1(e){const t=[{key:"admin",name:"Admin",description:"Full access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["*"],permission_count:10,assignment_count:2,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"manager",name:"Manager",description:"Can manage projects and members",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects","write:projects","read:members"],permission_count:3,assignment_count:4,inheritance:{parent_role_keys:["admin"],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"developer",name:"Developer",description:"Can read and write code",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:repos","write:repos"],permission_count:2,assignment_count:6,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"viewer",name:"Viewer",description:"Read-only access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects"],permission_count:1,assignment_count:8,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3}];return{data:t,object:"list",pagination:{page:1,limit:20,total:t.length,total_pages:1}}}const Vo="2026-08-05T10:00:00Z",Ho="2026-08-04T10:00:00Z",k1=[{id:"mem_1",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"admin",name:"Admin"}],joined_at:"2026-08-04T10:00:00Z",last_active_at:"2024-12-01T08:30:00Z",created_at:"2024-01-15T10:00:00Z",updated_at:"2024-12-01T08:30:00Z",object:"member",user:{id:"user_1",email:"alice@example.com",email_verified:!0,family_name:"Smith",given_name:"Alice",name:"Alice Smith",picture:"",status:"active",username:"alice"}},{id:"mem_2",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"manager",name:"Manager"}],joined_at:"2024-02-10T11:00:00Z",last_active_at:"2024-11-28T14:20:00Z",created_at:"2024-02-10T11:00:00Z",updated_at:"2024-11-28T14:20:00Z",object:"member",user:{id:"user_2",email:"bob@example.com",email_verified:!0,family_name:"Johnson",given_name:"Bob",name:"Bob Johnson",picture:"",status:"active",username:"bob"}},{id:"mem_3",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-03-20T09:00:00Z",last_active_at:"2024-12-02T16:45:00Z",created_at:"2024-03-20T09:00:00Z",updated_at:"2024-12-02T16:45:00Z",object:"member",user:{id:"user_3",email:"charlie@example.com",email_verified:!0,family_name:"Davis",given_name:"Charlie",name:"Charlie Davis",picture:"",status:"active",username:"charlie"}},{id:"mem_4",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:"2024-04-05T13:30:00Z",last_active_at:"2024-11-20T10:00:00Z",created_at:"2024-04-05T13:30:00Z",updated_at:"2024-11-20T10:00:00Z",object:"member",user:{id:"user_4",email:"diana@example.com",email_verified:!0,family_name:"Evans",given_name:"Diana",name:"Diana Evans",picture:"https://ui-avatars.com/api/?name=Diana+Evans&background=random",status:"active",username:"diana"}},{id:"mem_5",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-05-12T08:00:00Z",last_active_at:"2024-12-03T09:15:00Z",created_at:"2024-05-12T08:00:00Z",updated_at:"2024-12-03T09:15:00Z",object:"member",user:{id:"user_5",email:"eve@example.com",email_verified:!0,family_name:"Foster",given_name:"Eve",name:"Eve Foster",picture:"https://ui-avatars.com/api/?name=Eve+Foster&background=random",status:"active",username:"eve"}},{id:"mem_6",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"manager",name:"Manager"}],joined_at:Vo,last_active_at:Vo,created_at:Vo,updated_at:Vo,object:"member",user:{id:"user_6",email:"fiona@example.com",email_verified:!0,family_name:"Green",given_name:"Fiona",name:"Fiona Green",picture:"https://ui-avatars.com/api/?name=Fiona+Green&background=random",status:"active",username:"fiona"}},{id:"mem_7",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",instance_id:"inst_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:Ho,last_active_at:Ho,created_at:Ho,updated_at:Ho,object:"member",user:{id:"user_7",email:"george@example.com",email_verified:!0,family_name:"Hughes",given_name:"George",name:"George Hughes",picture:"https://ui-avatars.com/api/?name=George+Hughes&background=random",status:"active",username:"george"}}];function N1(e){let t=[...k1];if(e!=null&&e.search){const d=e.search.toLowerCase();t=t.filter(c=>c.user.name.toLowerCase().includes(d)||c.user.email.toLowerCase().includes(d))}if(e!=null&&e.roles){const d=e.roles.split(",");t=t.filter(c=>c.roles.some(m=>d.includes(m.key)))}const r=(e==null?void 0:e.page)||1,o=(e==null?void 0:e.limit)||5,n=(r-1)*o,i=n+o;return{data:t.slice(n,i),object:"list",pagination:{page:r,limit:o,total:t.length,total_pages:Math.ceil(t.length/o)}}}const M1=[{id:"inv_1",organization_id:"org_123",invitee_email:"frank@example.com",roles:[{key:"viewer",name:"Viewer"}],status:"pending",invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*2,updated_at:Date.now()/1e3-86400*2,expires_at:Date.now()/1e3+86400*5,last_sent_at:Date.now()/1e3-86400*2,resend_count:0,object:"invitation"},{id:"inv_2",organization_id:"org_123",invitee_email:"grace@example.com",roles:[{key:"manager",name:"Manager"}],status:"pending",invited_by:{id:"user_2",name:"Bob Johnson"},created_at:Date.now()/1e3-86400*10,updated_at:Date.now()/1e3-86400*10,expires_at:Date.now()/1e3+86400*1,last_sent_at:Date.now()/1e3-86400*3,resend_count:2,object:"invitation"},{id:"inv_3",organization_id:"org_123",invitee_email:"henry@example.com",roles:[{key:"developer",name:"Developer"}],status:"accepted",invited_by:{id:"user_3",name:"Charlie Davis"},created_at:Date.now()/1e3-86400*30,updated_at:Date.now()/1e3-86400*28,expires_at:Date.now()/1e3-86400*10,last_sent_at:Date.now()/1e3-86400*30,resend_count:0,accepted_at:Date.now()/1e3-86400*28,object:"invitation"},{id:"inv_4",organization_id:"org_123",invitee_email:"irene@example.com",roles:[{key:"viewer",name:"Viewer"}],status:"expired",invited_by:{id:"user_4",name:"Diana Evans"},created_at:Date.now()/1e3-86400*15,updated_at:Date.now()/1e3-86400*15,expires_at:Date.now()/1e3-86400*5,last_sent_at:Date.now()/1e3-86400*15,resend_count:1,object:"invitation"},{id:"inv_5",organization_id:"org_123",invitee_email:"jack@example.com",roles:[{key:"admin",name:"Admin"}],status:"pending",invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*1,updated_at:Date.now()/1e3-86400*1,expires_at:Date.now()/1e3+86400*7,last_sent_at:Date.now()/1e3-86400*1,resend_count:0,object:"invitation"}];function B1(e){let t=[...M1];if(e!=null&&e.search){const c=e.search.toLowerCase();t=t.filter(m=>m.invitee_email.toLowerCase().includes(c))}if(e!=null&&e.roles){const c=e.roles.split(",");t=t.filter(m=>m.roles.some(v=>c.includes(v.key)))}let r=e!=null&&e.status?e.status.split(","):["pending"];r.length>0&&r[0]!==""&&(t=t.filter(c=>r.includes(c.status)));const o=(e==null?void 0:e.page)||1,n=(e==null?void 0:e.limit)||5,i=(o-1)*n,s=i+n;return{data:t.slice(i,s),object:"list",pagination:{page:o,limit:n,total:t.length,total_pages:Math.ceil(t.length/n)}}}var U1=Object.defineProperty,V=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&U1(t,r,n),n};class j extends f{constructor(){super(...arguments),this.mode="PAGE",this.title="Member Management",this.description="Manage member access, roles, and invitations",this.organizationId="",this.isOpen=!1,this.monitoringFlag=!1,this.membersSearchTerm="",this.invitationsSearchTerm="",this.members=[],this.invitations=[],this.membersLoading=!1,this.invitationsLoading=!1,this.useMockData=!1,this.membersPage=1,this.membersTotalPages=0,this.invitationsPage=1,this.invitationsTotalPages=0,this.membersTotal=0,this.invitationsTotal=0,this.rowsPerPage=5,this.inviteDrawerId="pont-member-invite",this.availableRoles=[],this.isLoadingRoles=!1,this._rolesLoaded=!1,this.memberFilters={roles:[]},this.invitationFilters={roles:[],status:[]},this.invitationStatusOptions=[{value:"pending",label:"Pending"},{value:"accepted",label:"Accepted"},{value:"expired",label:"Expired"}],this.selectedMember=null,this.actionModalOpen=!1,this.actionModalConfig={title:"",description:"",confirmLabel:"Confirm",cancelLabel:"Cancel",variant:"default",onConfirm:()=>{},onCancel:()=>{},warningText:""},this.manageRolesDrawerId="pont-manage-roles",this._handleOpen=()=>{this.mode==="MODAL"&&(this.isOpen=!0)},this._handleClose=()=>{this.mode==="MODAL"&&(this.isOpen=!1)},this.loadData=async()=>{this.organizationId&&(await this.loadMembers(),await this.loadInvitations(),this.tryRemoveFallback())}}async openActionModal(t){this.actionModalConfig={...this.actionModalConfig,...t},this.actionModalOpen=!1,this.requestUpdate(),await this.updateComplete,this.actionModalOpen=!0}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r?r.remove():console.warn("fallback not found")})}connectedCallback(){super.connectedCallback(),window.addEventListener("open-member-management",this._handleOpen),window.addEventListener("close-member-management",this._handleClose),document.addEventListener("open-member-management",this._handleOpen),document.addEventListener("close-member-management",this._handleClose),window.addEventListener("invite-members-success",this.loadData),window.addEventListener("update-members-role",this.loadData)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("open-member-management",this._handleOpen),window.removeEventListener("close-member-management",this._handleClose),document.removeEventListener("open-member-management",this._handleOpen),document.removeEventListener("close-member-management",this._handleClose),window.removeEventListener("invite-members-success",this.loadData),window.removeEventListener("update-members-role",this.loadData),this._membersSearchDebounceTimer&&window.clearTimeout(this._membersSearchDebounceTimer),this._invitationsSearchDebounceTimer&&window.clearTimeout(this._invitationsSearchDebounceTimer)}firstUpdated(){this.isOpen=this.mode==="PAGE",this.loadData(),this.organizationId&&!this._rolesLoaded&&this.loadRoles()}updated(t){t.has("mode")&&(this.isOpen=this.mode==="PAGE"),t.has("organizationId")&&this.organizationId&&!this._rolesLoaded&&this.loadRoles()}async loadRoles(){if(!(!this.organizationId||this._rolesLoaded))try{this.isLoadingRoles=!0;let t;if(this.useMockData)t=F1({resource_id:this.organizationId,resource_type:"organization"});else{const r={resource_id:this.organizationId,resource_type:"organization"};t=await Cl(r)}this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name})),this._rolesLoaded=!0}catch(t){console.error("Failed to load roles:",t)}finally{this.isLoadingRoles=!1}}async loadMembers(t=1,r=this.rowsPerPage,o,n){try{this.membersLoading=!0;const i={page:t,limit:r};o&&(i.search=o);const s=n||this.memberFilters;s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let d;this.useMockData?d=N1(i):d=await QP(this.organizationId,i),this.members=d.data,this.membersPage=d.pagination.page,this.membersTotalPages=d.pagination.total_pages,this.membersTotal=d.pagination.total,this.useMockData=!1}catch(i){console.error("[pont-member-management] Failed loading members:",i)}finally{this.membersLoading=!1}}async loadInvitations(t=1,r=this.rowsPerPage,o,n){try{this.invitationsLoading=!0;const i={page:t,limit:r};o&&(i.search=o);const s=n||this.invitationFilters;let d="pending";s.status&&s.status.length>0&&(d=s.status.join(",")),i.status=d,s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let c;this.useMockData?c=B1(i):c=await r1(this.organizationId,i),this.invitations=c.data,this.invitationsPage=c.pagination.page,this.invitationsTotalPages=c.pagination.total_pages,this.invitationsTotal=c.pagination.total}catch(i){console.error("[pont-member-management] Failed loading invitations:",i)}finally{this.invitationsLoading=!1}}handleMembersPageChange(t){const r=t.detail.page;this.loadMembers(r,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsPageChange(t){const r=t.detail.page;this.loadInvitations(r,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersSearchChange(t){this.membersSearchTerm=t.detail.searchTerm||"",this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm.trim()?this.membersSearchTerm:void 0,this.memberFilters)}handleInvitationsSearchChange(t){this.invitationsSearchTerm=t.detail.searchTerm||"",this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm.trim()?this.invitationsSearchTerm:void 0,this.invitationFilters)}handleMembersFilterChange(t){const r=t.detail.roles||[];this.memberFilters={roles:r},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsFilterChange(t){const r=t.detail||{};this.invitationFilters={roles:r.roles||[],status:r.status||[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersClearFilters(){this.memberFilters={roles:[]},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsClearFilters(){this.invitationFilters={roles:[],status:[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRemoveFilter(t){const r=t.detail.filterValue;this.memberFilters={...this.memberFilters,roles:this.memberFilters.roles.filter(o=>o!==r)},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsRemoveFilter(t){const r=t.detail.filterValue;this.invitationFilters={...this.invitationFilters,roles:this.invitationFilters.roles.filter(o=>o!==r),status:this.invitationFilters.status.filter(o=>o!==r)},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadMembers(1,r,this.membersSearchTerm,this.memberFilters)}handleInvitationsRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadInvitations(1,r,this.invitationsSearchTerm,this.invitationFilters)}handleRefresh(t){t==="members"?this.loadMembers(this.membersPage,this.rowsPerPage,this.membersSearchTerm,this.memberFilters):this.loadInvitations(this.invitationsPage,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}openManageRoles(t){const r=t.detail;this.selectedMember=r,setTimeout(()=>{document.dispatchEvent(new CustomEvent("open-sidedrawer",{detail:{id:this.manageRolesDrawerId,side:"right"},bubbles:!0,composed:!0}))},50)}handleSuspendMember(t){var o,n;const r=t.detail;this.openActionModal({title:"Suspend User",description:l`
4337
4337
  <p part="description">
4338
4338
  Are you sure you want to suspend
4339
4339
  <span part="highlight-name"
@@ -4386,16 +4386,16 @@
4386
4386
  ${this.monitoringFlag?l`<div>
4387
4387
  <pont-monitoring-cards></pont-monitoring-cards>
4388
4388
  </div>`:h}
4389
- <pont-tabs defaultValue=${sr.MEMBERS}>
4389
+ <pont-tabs defaultValue=${ar.MEMBERS}>
4390
4390
  <div
4391
4391
  class="pont-flex pont-flex-col-reverse pont-items-start pont-gap-2 md:pont-flex-row md:pont-items-center md:pont-justify-between"
4392
4392
  >
4393
4393
  <pont-tabs-list variant="line">
4394
- <pont-tabs-trigger value=${sr.MEMBERS}
4395
- >${sr.MEMBERS}</pont-tabs-trigger
4394
+ <pont-tabs-trigger value=${ar.MEMBERS}
4395
+ >${ar.MEMBERS}</pont-tabs-trigger
4396
4396
  >
4397
- <pont-tabs-trigger value=${sr.INVITATIONS}
4398
- >${sr.INVITATIONS}</pont-tabs-trigger
4397
+ <pont-tabs-trigger value=${ar.INVITATIONS}
4398
+ >${ar.INVITATIONS}</pont-tabs-trigger
4399
4399
  >
4400
4400
  </pont-tabs-list>
4401
4401
  <pont-button
@@ -4408,7 +4408,7 @@
4408
4408
  </pont-button>
4409
4409
  </div>
4410
4410
  <div class="pont-mt-6">
4411
- <pont-tabs-content value=${sr.MEMBERS}>
4411
+ <pont-tabs-content value=${ar.MEMBERS}>
4412
4412
  <pont-member-management-members-panel
4413
4413
  .members=${this.members}
4414
4414
  .membersLoading=${this.membersLoading}
@@ -4433,7 +4433,7 @@
4433
4433
  ></pont-member-management-members-panel>
4434
4434
  </pont-tabs-content>
4435
4435
 
4436
- <pont-tabs-content value=${sr.INVITATIONS}>
4436
+ <pont-tabs-content value=${ar.INVITATIONS}>
4437
4437
  <pont-member-management-invitations-panel
4438
4438
  .invitations=${this.invitations}
4439
4439
  .invitationsLoading=${this.invitationsLoading}
@@ -4630,7 +4630,7 @@
4630
4630
  </pont-dropdown-menu-group>
4631
4631
  </pont-dropdown-menu-content>
4632
4632
  </pont-dropdown-menu>
4633
- `}_navigate(t){const r=new URL(t,window.location.href);r.pathname===window.location.pathname&&r.search===window.location.search||(window.location.href=t)}_handleMenuItemClick(t,r){t.stopPropagation();try{if(r&&typeof r.onClick=="function"){r.onClick(t,r),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}if(r&&r.href){this._navigate(r.href),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}}catch(o){console.error("[pont-account-menu] menu item click handler failed",o)}}}ke([a({type:String})],Ne.prototype,"accountSettingsPath");ke([a({attribute:!1})],Ne.prototype,"menuItems");ke([J({context:$r,subscribe:!0}),a({attribute:!1})],Ne.prototype,"auth");ke([g()],Ne.prototype,"user");ke([g()],Ne.prototype,"signedIn");ke([g()],Ne.prototype,"isLoading");ke([g()],Ne.prototype,"_itemStates");ke([g()],Ne.prototype,"_subMenuOpen");customElements.define("pont-account-menu",Ne);var Q1=Object.defineProperty,Me=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&Q1(t,r,n),n};const Xo="pont-organization-changed",Zh="pont-organization-switch-failed";class Zt extends f{constructor(){super(...arguments),this.reloadOnSwitch=!1,this.emptyLabel="Select organization",this.organizations=[],this.currentId=null,this.loaded=!1,this.switching=null,this.error=null,this.onFocus=()=>this.readCurrent(),this.onChangedElsewhere=t=>{t.target!==this&&this.readCurrent()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),window.addEventListener("focus",this.onFocus),document.addEventListener(Xo,this.onChangedElsewhere)}disconnectedCallback(){window.removeEventListener("focus",this.onFocus),document.removeEventListener(Xo,this.onChangedElsewhere),super.disconnectedCallback()}updated(t){t.has("auth")&&this.load()}readCurrent(){var t;this.currentId=((t=H.getOrganization())==null?void 0:t.id)??null}async load(){var t;if(!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated){this.organizations=[],this.loaded=!1;return}this.readCurrent();try{this.organizations=await WP()}catch(r){console.error("[pont-organization-switcher] Failed to list organizations:",r),this.organizations=[]}finally{this.loaded=!0}}async select(t){var r,o;if(!(t===this.currentId||this.switching)){this.switching=t,this.error=null;try{await H.switchOrganization(t),this.readCurrent();const n=H.getOrganization(),i={organizationId:t,roles:(n==null?void 0:n.roles)??[],permissions:(n==null?void 0:n.permissions)??[]};this.dispatchEvent(new CustomEvent(Xo,{detail:i,bubbles:!0,composed:!0})),(r=this.onOrganizationChanged)==null||r.call(this,i),this.reloadOnSwitch&&window.location.reload()}catch(n){this.error="You can't switch to that organization.",this.dispatchEvent(new CustomEvent(Zh,{detail:{organizationId:t,error:n},bubbles:!0,composed:!0})),(o=this.onSwitchFailed)==null||o.call(this,{organizationId:t,error:n})}finally{this.switching=null}}}nameOf(t){var r;return t?((r=this.organizations.find(o=>o.resource_id===t))==null?void 0:r.resource_name)||t:this.emptyLabel}render(){if(!this.loaded||this.organizations.length===0)return l``;const t=this.nameOf(this.currentId);return l`
4633
+ `}_navigate(t){const r=new URL(t,window.location.href);r.pathname===window.location.pathname&&r.search===window.location.search||(window.location.href=t)}_handleMenuItemClick(t,r){t.stopPropagation();try{if(r&&typeof r.onClick=="function"){r.onClick(t,r),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}if(r&&r.href){this._navigate(r.href),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}}catch(o){console.error("[pont-account-menu] menu item click handler failed",o)}}}ke([a({type:String})],Ne.prototype,"accountSettingsPath");ke([a({attribute:!1})],Ne.prototype,"menuItems");ke([J({context:Pr,subscribe:!0}),a({attribute:!1})],Ne.prototype,"auth");ke([g()],Ne.prototype,"user");ke([g()],Ne.prototype,"signedIn");ke([g()],Ne.prototype,"isLoading");ke([g()],Ne.prototype,"_itemStates");ke([g()],Ne.prototype,"_subMenuOpen");customElements.define("pont-account-menu",Ne);var Q1=Object.defineProperty,Me=(e,t,r,o)=>{for(var n=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(t,r,n)||n);return n&&Q1(t,r,n),n};const Xo="pont-organization-changed",Zh="pont-organization-switch-failed";class Zt extends f{constructor(){super(...arguments),this.reloadOnSwitch=!1,this.emptyLabel="Select organization",this.organizations=[],this.currentId=null,this.loaded=!1,this.switching=null,this.error=null,this.onFocus=()=>this.readCurrent(),this.onChangedElsewhere=t=>{t.target!==this&&this.readCurrent()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),window.addEventListener("focus",this.onFocus),document.addEventListener(Xo,this.onChangedElsewhere)}disconnectedCallback(){window.removeEventListener("focus",this.onFocus),document.removeEventListener(Xo,this.onChangedElsewhere),super.disconnectedCallback()}updated(t){t.has("auth")&&this.load()}readCurrent(){var t;this.currentId=((t=H.getOrganization())==null?void 0:t.id)??null}async load(){var t;if(!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated){this.organizations=[],this.loaded=!1;return}this.readCurrent();try{this.organizations=await WP()}catch(r){console.error("[pont-organization-switcher] Failed to list organizations:",r),this.organizations=[]}finally{this.loaded=!0}}async select(t){var r,o;if(!(t===this.currentId||this.switching)){this.switching=t,this.error=null;try{await H.switchOrganization(t),this.readCurrent();const n=H.getOrganization(),i={organizationId:t,roles:(n==null?void 0:n.roles)??[],permissions:(n==null?void 0:n.permissions)??[]};this.dispatchEvent(new CustomEvent(Xo,{detail:i,bubbles:!0,composed:!0})),(r=this.onOrganizationChanged)==null||r.call(this,i),this.reloadOnSwitch&&window.location.reload()}catch(n){this.error="You can't switch to that organization.",this.dispatchEvent(new CustomEvent(Zh,{detail:{organizationId:t,error:n},bubbles:!0,composed:!0})),(o=this.onSwitchFailed)==null||o.call(this,{organizationId:t,error:n})}finally{this.switching=null}}}nameOf(t){var r;return t?((r=this.organizations.find(o=>o.resource_id===t))==null?void 0:r.resource_name)||t:this.emptyLabel}render(){if(!this.loaded||this.organizations.length===0)return l``;const t=this.nameOf(this.currentId);return l`
4634
4634
  <pont-dropdown-menu>
4635
4635
  <pont-dropdown-menu-trigger as-child>
4636
4636
  <pont-button part="trigger-button" variant="secondary" ?disabled=${!!this.switching}>
@@ -4662,7 +4662,7 @@
4662
4662
  </div>`:""}
4663
4663
  </pont-dropdown-menu-content>
4664
4664
  </pont-dropdown-menu>
4665
- `}}Me([a({type:Boolean,attribute:"reload-on-switch"})],Zt.prototype,"reloadOnSwitch");Me([a({type:String,attribute:"empty-label"})],Zt.prototype,"emptyLabel");Me([a({attribute:!1})],Zt.prototype,"onOrganizationChanged");Me([a({attribute:!1})],Zt.prototype,"onSwitchFailed");Me([J({context:$r,subscribe:!0}),a({attribute:!1})],Zt.prototype,"auth");Me([g()],Zt.prototype,"organizations");Me([g()],Zt.prototype,"currentId");Me([g()],Zt.prototype,"loaded");Me([g()],Zt.prototype,"switching");Me([g()],Zt.prototype,"error");customElements.define("pont-organization-switcher",Zt);var Z1=Object.defineProperty,J1=Object.getOwnPropertyDescriptor,Jh=(e,t,r,o)=>{for(var n=o>1?void 0:o?J1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Z1(t,r,n),n};exports.PontHint=class extends f{constructor(){super(...arguments),this.content=""}createRenderRoot(){return this}render(){return l`<p class="pont-mt-2">${this.content}</p>`}};Jh([a({type:String})],exports.PontHint.prototype,"content",2);exports.PontHint=Jh([p("pont-hint")],exports.PontHint);var X1=Object.defineProperty,t0=Object.getOwnPropertyDescriptor,Be=(e,t,r,o)=>{for(var n=o>1?void 0:o?t0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&X1(t,r,n),n};const e0=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;exports.MultiEmailInput=class extends f{constructor(){super(...arguments),this.label="",this.value=[],this.placeholder="Enter email addresses",this.disabled=!1,this.maxEmails=50,this.className="",this.inputValue="",this.error=null}createRenderRoot(){return this}validateEmail(t){return e0.test(t.trim())}addEmails(t){const r=[],o=[];for(const n of t){const i=n.trim();i&&(this.validateEmail(i)?!this.value.includes(i)&&!r.includes(i)&&r.push(i):o.push(i))}if(r.length>0){const n=[...this.value,...r].slice(0,this.maxEmails);this.value=n,this.inputValue="",this.error=null,n.length>=this.maxEmails&&(this.error=`Maximum ${this.maxEmails} emails allowed`),this.notifyChange(n)}o.length>0&&(this.error=`Invalid email${o.length>1?"s":""}: ${o.join(", ")}`)}notifyChange(t){var r;(r=this.onChange)==null||r.call(this,t),this.dispatchEvent(new CustomEvent("emails-changed",{detail:{emails:t},bubbles:!0,composed:!0}))}handleKeyDown(t){if(this.error&&this.inputValue!==""&&(this.error=null),["Enter",",",";"," "].includes(t.key)){t.preventDefault(),this.inputValue.trim()&&this.addEmails([this.inputValue]);return}if(t.key==="Backspace"&&!this.inputValue&&this.value.length>0){const r=this.value.slice(0,-1);this.value=r,this.error=null,this.notifyChange(r)}}handlePaste(t){var n;t.preventDefault();const o=(((n=t.clipboardData)==null?void 0:n.getData("text"))??"").split(/[;,\n\s]+/).map(i=>i.trim()).filter(Boolean);this.addEmails(o)}handleBlur(){this.inputValue.trim()&&this.addEmails([this.inputValue])}removeEmail(t){const r=this.value.filter(o=>o!==t);this.value=r,this.error=null,this.notifyChange(r)}render(){const t=this.disabled||this.value.length>=this.maxEmails;return l`
4665
+ `}}Me([a({type:Boolean,attribute:"reload-on-switch"})],Zt.prototype,"reloadOnSwitch");Me([a({type:String,attribute:"empty-label"})],Zt.prototype,"emptyLabel");Me([a({attribute:!1})],Zt.prototype,"onOrganizationChanged");Me([a({attribute:!1})],Zt.prototype,"onSwitchFailed");Me([J({context:Pr,subscribe:!0}),a({attribute:!1})],Zt.prototype,"auth");Me([g()],Zt.prototype,"organizations");Me([g()],Zt.prototype,"currentId");Me([g()],Zt.prototype,"loaded");Me([g()],Zt.prototype,"switching");Me([g()],Zt.prototype,"error");customElements.define("pont-organization-switcher",Zt);var Z1=Object.defineProperty,J1=Object.getOwnPropertyDescriptor,Jh=(e,t,r,o)=>{for(var n=o>1?void 0:o?J1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Z1(t,r,n),n};exports.PontHint=class extends f{constructor(){super(...arguments),this.content=""}createRenderRoot(){return this}render(){return l`<p class="pont-mt-2">${this.content}</p>`}};Jh([a({type:String})],exports.PontHint.prototype,"content",2);exports.PontHint=Jh([p("pont-hint")],exports.PontHint);var X1=Object.defineProperty,t0=Object.getOwnPropertyDescriptor,Be=(e,t,r,o)=>{for(var n=o>1?void 0:o?t0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&X1(t,r,n),n};const e0=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;exports.MultiEmailInput=class extends f{constructor(){super(...arguments),this.label="",this.value=[],this.placeholder="Enter email addresses",this.disabled=!1,this.maxEmails=50,this.className="",this.inputValue="",this.error=null}createRenderRoot(){return this}validateEmail(t){return e0.test(t.trim())}addEmails(t){const r=[],o=[];for(const n of t){const i=n.trim();i&&(this.validateEmail(i)?!this.value.includes(i)&&!r.includes(i)&&r.push(i):o.push(i))}if(r.length>0){const n=[...this.value,...r].slice(0,this.maxEmails);this.value=n,this.inputValue="",this.error=null,n.length>=this.maxEmails&&(this.error=`Maximum ${this.maxEmails} emails allowed`),this.notifyChange(n)}o.length>0&&(this.error=`Invalid email${o.length>1?"s":""}: ${o.join(", ")}`)}notifyChange(t){var r;(r=this.onChange)==null||r.call(this,t),this.dispatchEvent(new CustomEvent("emails-changed",{detail:{emails:t},bubbles:!0,composed:!0}))}handleKeyDown(t){if(this.error&&this.inputValue!==""&&(this.error=null),["Enter",",",";"," "].includes(t.key)){t.preventDefault(),this.inputValue.trim()&&this.addEmails([this.inputValue]);return}if(t.key==="Backspace"&&!this.inputValue&&this.value.length>0){const r=this.value.slice(0,-1);this.value=r,this.error=null,this.notifyChange(r)}}handlePaste(t){var n;t.preventDefault();const o=(((n=t.clipboardData)==null?void 0:n.getData("text"))??"").split(/[;,\n\s]+/).map(i=>i.trim()).filter(Boolean);this.addEmails(o)}handleBlur(){this.inputValue.trim()&&this.addEmails([this.inputValue])}removeEmail(t){const r=this.value.filter(o=>o!==t);this.value=r,this.error=null,this.notifyChange(r)}render(){const t=this.disabled||this.value.length>=this.maxEmails;return l`
4666
4666
  <div class="pont-space-y-2 ${this.className}">
4667
4667
  ${this.label?l`<pont-label part="label">${this.label}</pont-label>`:h}
4668
4668
 
@@ -5391,7 +5391,7 @@
5391
5391
  </pont-button>
5392
5392
  </div>
5393
5393
  `:h}
5394
- `}};exports.PontOtp.ROOT="otp";exports.PontOtp.TAG=`${nt}-${exports.PontOtp.ROOT}`;yt([a({type:Boolean,attribute:"exclude-from-form",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"excludeFromForm",2);yt([a({type:Boolean})],exports.PontOtp.prototype,"required",2);yt([a({attribute:"required-error"})],exports.PontOtp.prototype,"requiredError",2);yt([a({attribute:"incomplete-error"})],exports.PontOtp.prototype,"incompleteError",2);yt([a()],exports.PontOtp.prototype,"variant",2);yt([a({type:Number})],exports.PontOtp.prototype,"length",2);yt([a({type:Number})],exports.PontOtp.prototype,"timeout",2);yt([a({attribute:"data-key"})],exports.PontOtp.prototype,"dataKey",2);yt([a()],exports.PontOtp.prototype,"name",2);yt([a({type:Boolean})],exports.PontOtp.prototype,"disabled",2);yt([a({type:Boolean,attribute:"auto-submit",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"autoSubmit",2);yt([a()],exports.PontOtp.prototype,"event",2);yt([a({attribute:"resend-text"})],exports.PontOtp.prototype,"resendText",2);yt([a({attribute:"resend-button-text"})],exports.PontOtp.prototype,"resendButtonText",2);yt([a({attribute:"resend-event"})],exports.PontOtp.prototype,"resendEvent",2);yt([a()],exports.PontOtp.prototype,"id",2);yt([g()],exports.PontOtp.prototype,"_invalid",2);yt([g()],exports.PontOtp.prototype,"_error",2);yt([g()],exports.PontOtp.prototype,"_value",2);exports.PontOtp=yt([p("pont-otp")],exports.PontOtp);const Go={duration:60,resend_event:"",resend_button_label:"Resend code",count_down_text:"Resend code in "};var N0=Object.defineProperty,M0=Object.getOwnPropertyDescriptor,Cr=(e,t,r,o)=>{for(var n=o>1?void 0:o?M0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&N0(t,r,n),n};exports.PontOtpResend=class extends f{constructor(){super(...arguments),this.seed=_t(),this.duration=Go.duration,this.resend_event=Go.resend_event,this.resend_button_label=Go.resend_button_label,this.count_down_text=Go.count_down_text,this._remaining=0,this._handleResendClick=()=>{H.processLoginflowEvent({event:this.resend_event}),this._startCountdown()}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontOtpResend.TAG}-${this.seed}`}get countdownId(){return`${this.rootId}-${exports.PontOtpResend.COUNTDOWN}`}get resendButtonId(){return`${this.rootId}-${exports.PontOtpResend.RESEND_BUTTON}`}connectedCallback(){super.connectedCallback(),this._startCountdown()}disconnectedCallback(){super.disconnectedCallback(),this._clearTimer()}updated(t){t.has("duration")&&this._startCountdown()}_startCountdown(){this._clearTimer();const t=this.duration;if(t<=0){this._remaining=0;return}this._remaining=t,this._timer=window.setInterval(()=>{this._remaining=Math.max(0,this._remaining-1),this._remaining<=0&&this._clearTimer()},1e3)}_clearTimer(){this._timer&&(clearInterval(this._timer),this._timer=void 0)}render(){const t=this._remaining>0;return l`
5394
+ `}};exports.PontOtp.ROOT="otp";exports.PontOtp.TAG=`${nt}-${exports.PontOtp.ROOT}`;yt([a({type:Boolean,attribute:"exclude-from-form",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"excludeFromForm",2);yt([a({type:Boolean})],exports.PontOtp.prototype,"required",2);yt([a({attribute:"required-error"})],exports.PontOtp.prototype,"requiredError",2);yt([a({attribute:"incomplete-error"})],exports.PontOtp.prototype,"incompleteError",2);yt([a()],exports.PontOtp.prototype,"variant",2);yt([a({type:Number})],exports.PontOtp.prototype,"length",2);yt([a({type:Number})],exports.PontOtp.prototype,"timeout",2);yt([a({attribute:"data-key"})],exports.PontOtp.prototype,"dataKey",2);yt([a()],exports.PontOtp.prototype,"name",2);yt([a({type:Boolean})],exports.PontOtp.prototype,"disabled",2);yt([a({type:Boolean,attribute:"auto-submit",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"autoSubmit",2);yt([a()],exports.PontOtp.prototype,"event",2);yt([a({attribute:"resend-text"})],exports.PontOtp.prototype,"resendText",2);yt([a({attribute:"resend-button-text"})],exports.PontOtp.prototype,"resendButtonText",2);yt([a({attribute:"resend-event"})],exports.PontOtp.prototype,"resendEvent",2);yt([a()],exports.PontOtp.prototype,"id",2);yt([g()],exports.PontOtp.prototype,"_invalid",2);yt([g()],exports.PontOtp.prototype,"_error",2);yt([g()],exports.PontOtp.prototype,"_value",2);exports.PontOtp=yt([p("pont-otp")],exports.PontOtp);const Go={duration:60,resend_event:"",resend_button_label:"Resend code",count_down_text:"Resend code in "};var N0=Object.defineProperty,M0=Object.getOwnPropertyDescriptor,Sr=(e,t,r,o)=>{for(var n=o>1?void 0:o?M0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&N0(t,r,n),n};exports.PontOtpResend=class extends f{constructor(){super(...arguments),this.seed=_t(),this.duration=Go.duration,this.resend_event=Go.resend_event,this.resend_button_label=Go.resend_button_label,this.count_down_text=Go.count_down_text,this._remaining=0,this._handleResendClick=()=>{H.processLoginflowEvent({event:this.resend_event}),this._startCountdown()}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontOtpResend.TAG}-${this.seed}`}get countdownId(){return`${this.rootId}-${exports.PontOtpResend.COUNTDOWN}`}get resendButtonId(){return`${this.rootId}-${exports.PontOtpResend.RESEND_BUTTON}`}connectedCallback(){super.connectedCallback(),this._startCountdown()}disconnectedCallback(){super.disconnectedCallback(),this._clearTimer()}updated(t){t.has("duration")&&this._startCountdown()}_startCountdown(){this._clearTimer();const t=this.duration;if(t<=0){this._remaining=0;return}this._remaining=t,this._timer=window.setInterval(()=>{this._remaining=Math.max(0,this._remaining-1),this._remaining<=0&&this._clearTimer()},1e3)}_clearTimer(){this._timer&&(clearInterval(this._timer),this._timer=void 0)}render(){const t=this._remaining>0;return l`
5395
5395
  <div part=${exports.PontOtpResend.PARTS.root} id=${this.rootId}>
5396
5396
  ${t?l`
5397
5397
  <pont-typography-muted
@@ -5411,7 +5411,7 @@
5411
5411
  </pont-button>
5412
5412
  `}
5413
5413
  </div>
5414
- `}};exports.PontOtpResend.ROOT="otp-resend";exports.PontOtpResend.COUNTDOWN="countdown";exports.PontOtpResend.RESEND_BUTTON="resend-button";exports.PontOtpResend.TAG=`${nt}-${exports.PontOtpResend.ROOT}`;exports.PontOtpResend.PARTS={root:exports.PontOtpResend.ROOT,countdown:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.COUNTDOWN}`,resendButton:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.RESEND_BUTTON}`};Cr([a({type:String})],exports.PontOtpResend.prototype,"seed",2);Cr([a({type:String,attribute:"custom-id"})],exports.PontOtpResend.prototype,"customId",2);Cr([a({type:Number})],exports.PontOtpResend.prototype,"duration",2);Cr([a({type:String,attribute:"resend-event"})],exports.PontOtpResend.prototype,"resend_event",2);Cr([a({type:String,attribute:"resend-button-label"})],exports.PontOtpResend.prototype,"resend_button_label",2);Cr([a({type:String,attribute:"count-down-text"})],exports.PontOtpResend.prototype,"count_down_text",2);Cr([g()],exports.PontOtpResend.prototype,"_remaining",2);exports.PontOtpResend=Cr([p("pont-otp-resend")],exports.PontOtpResend);const B0=[exports.PontEmailField,exports.PontPhoneField,exports.PontUsernameField,exports.PontIdentifierField,exports.PontNameField,exports.PontPasswordField,exports.PontConfirmField,exports.PontOtp],U0=[exports.PontPasskeyButton,exports.PontProviderButton,exports.PontLink];var j0=Object.defineProperty,q0=Object.getOwnPropertyDescriptor,Bo=(e,t,r,o)=>{for(var n=o>1?void 0:o?q0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&j0(t,r,n),n};exports.PontForm=class extends f{constructor(){super(...arguments),this.seed=_t(),this._loading=!1,this._handleSubmitClick=t=>{var r;this._pendingEvent=(r=t.detail)==null?void 0:r.event},this._handleSubmit=async t=>{if(t.preventDefault(),this._loading)return;const r=this._fields;if(!r.map(b=>b.validate()).every(Boolean))return;const i={};r.forEach(b=>{i[b.name]=b.value});const s=this._pendingEvent;if(this.onSubmit){this.onSubmit(i,s);return}if(!s)return;const d=new CustomEvent(exports.PontForm.SUBMIT_EVENT,{detail:{id:this.rootId,data:i,event:s},bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(d),d.defaultPrevented)return;const c=this._interactives,m=r.map(b=>!!b.disabled),v=c.map(b=>!!b.disabled);this._setLoading(!0,r,m,c,v);try{const b=await H.processLoginflowEvent({event:s,...Object.keys(i).length?{data:i}:{}});this._dispatch(exports.PontForm.SUCCESS_EVENT,{id:this.rootId,data:i,event:s,result:b})}catch(b){const w=b instanceof Error?b.message:String(b);this._dispatch(exports.PontForm.ERROR_EVENT,{id:this.rootId,data:i,event:s,message:w})}finally{this._setLoading(!1,r,m,c,v),this._pendingEvent=void 0}},this._handleReset=t=>{this._pendingEvent=void 0,this.onReset&&this.onReset(t),this._dispatch(exports.PontForm.RESET_EVENT,{id:this.rootId})}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontForm.TAG}-${this.seed}`}get _form(){const t=`form[part="${exports.PontForm.PARTS.root}"]`;return this.querySelector(t)}get _fields(){const t=this._form;return t?Array.from(t.querySelectorAll(B0.map(o=>o.TAG).join(", "))).filter(o=>typeof o.isFormField>"u"?!0:o.isFormField):[]}get _submit(){const t=this._form;if(!t)return null;const r=exports.PontSubmitButton.TAG;return t.querySelector(r)}get _interactives(){const t=this._form;if(!t)return[];const r=U0.map(o=>o.TAG).join(", ");return Array.from(t.querySelectorAll(r))}connectedCallback(){super.connectedCallback();const t=exports.PontSubmitButton.CLICK_EVENT;this.addEventListener(t,this._handleSubmitClick)}disconnectedCallback(){super.disconnectedCallback();const t=exports.PontSubmitButton.CLICK_EVENT;this.removeEventListener(t,this._handleSubmitClick)}firstUpdated(){const t=this._form;if(!t)return;Array.from(this.childNodes).filter(o=>o!==t).forEach(o=>t.appendChild(o))}_dispatch(t,r={}){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_setLoading(t,r,o,n,i){r.forEach((d,c)=>{d.disabled=t?!0:o[c]}),n.forEach((d,c)=>{d.disabled=t?!0:i[c]});const s=this._submit;s&&(s.loading=t),this._loading=t}render(){return l`
5414
+ `}};exports.PontOtpResend.ROOT="otp-resend";exports.PontOtpResend.COUNTDOWN="countdown";exports.PontOtpResend.RESEND_BUTTON="resend-button";exports.PontOtpResend.TAG=`${nt}-${exports.PontOtpResend.ROOT}`;exports.PontOtpResend.PARTS={root:exports.PontOtpResend.ROOT,countdown:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.COUNTDOWN}`,resendButton:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.RESEND_BUTTON}`};Sr([a({type:String})],exports.PontOtpResend.prototype,"seed",2);Sr([a({type:String,attribute:"custom-id"})],exports.PontOtpResend.prototype,"customId",2);Sr([a({type:Number})],exports.PontOtpResend.prototype,"duration",2);Sr([a({type:String,attribute:"resend-event"})],exports.PontOtpResend.prototype,"resend_event",2);Sr([a({type:String,attribute:"resend-button-label"})],exports.PontOtpResend.prototype,"resend_button_label",2);Sr([a({type:String,attribute:"count-down-text"})],exports.PontOtpResend.prototype,"count_down_text",2);Sr([g()],exports.PontOtpResend.prototype,"_remaining",2);exports.PontOtpResend=Sr([p("pont-otp-resend")],exports.PontOtpResend);const B0=[exports.PontEmailField,exports.PontPhoneField,exports.PontUsernameField,exports.PontIdentifierField,exports.PontNameField,exports.PontPasswordField,exports.PontConfirmField,exports.PontOtp],U0=[exports.PontPasskeyButton,exports.PontProviderButton,exports.PontLink];var j0=Object.defineProperty,q0=Object.getOwnPropertyDescriptor,Bo=(e,t,r,o)=>{for(var n=o>1?void 0:o?q0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&j0(t,r,n),n};exports.PontForm=class extends f{constructor(){super(...arguments),this.seed=_t(),this._loading=!1,this._handleSubmitClick=t=>{var r;this._pendingEvent=(r=t.detail)==null?void 0:r.event},this._handleSubmit=async t=>{if(t.preventDefault(),this._loading)return;const r=this._fields;if(!r.map(b=>b.validate()).every(Boolean))return;const i={};r.forEach(b=>{i[b.name]=b.value});const s=this._pendingEvent;if(this.onSubmit){this.onSubmit(i,s);return}if(!s)return;const d=new CustomEvent(exports.PontForm.SUBMIT_EVENT,{detail:{id:this.rootId,data:i,event:s},bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(d),d.defaultPrevented)return;const c=this._interactives,m=r.map(b=>!!b.disabled),v=c.map(b=>!!b.disabled);this._setLoading(!0,r,m,c,v);try{const b=await H.processLoginflowEvent({event:s,...Object.keys(i).length?{data:i}:{}});this._dispatch(exports.PontForm.SUCCESS_EVENT,{id:this.rootId,data:i,event:s,result:b})}catch(b){const w=b instanceof Error?b.message:String(b);this._dispatch(exports.PontForm.ERROR_EVENT,{id:this.rootId,data:i,event:s,message:w})}finally{this._setLoading(!1,r,m,c,v),this._pendingEvent=void 0}},this._handleReset=t=>{this._pendingEvent=void 0,this.onReset&&this.onReset(t),this._dispatch(exports.PontForm.RESET_EVENT,{id:this.rootId})}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontForm.TAG}-${this.seed}`}get _form(){const t=`form[part="${exports.PontForm.PARTS.root}"]`;return this.querySelector(t)}get _fields(){const t=this._form;return t?Array.from(t.querySelectorAll(B0.map(o=>o.TAG).join(", "))).filter(o=>typeof o.isFormField>"u"?!0:o.isFormField):[]}get _submit(){const t=this._form;if(!t)return null;const r=exports.PontSubmitButton.TAG;return t.querySelector(r)}get _interactives(){const t=this._form;if(!t)return[];const r=U0.map(o=>o.TAG).join(", ");return Array.from(t.querySelectorAll(r))}connectedCallback(){super.connectedCallback();const t=exports.PontSubmitButton.CLICK_EVENT;this.addEventListener(t,this._handleSubmitClick)}disconnectedCallback(){super.disconnectedCallback();const t=exports.PontSubmitButton.CLICK_EVENT;this.removeEventListener(t,this._handleSubmitClick)}firstUpdated(){const t=this._form;if(!t)return;Array.from(this.childNodes).filter(o=>o!==t).forEach(o=>t.appendChild(o))}_dispatch(t,r={}){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_setLoading(t,r,o,n,i){r.forEach((d,c)=>{d.disabled=t?!0:o[c]}),n.forEach((d,c)=>{d.disabled=t?!0:i[c]});const s=this._submit;s&&(s.loading=t),this._loading=t}render(){return l`
5415
5415
  <form
5416
5416
  id="${this.rootId}"
5417
5417
  part="${exports.PontForm.PARTS.root}"
@@ -5452,7 +5452,7 @@
5452
5452
  >
5453
5453
  </div>
5454
5454
  </div>
5455
- `}};exports.PontEditIdentifier.ROOT="edit-identifier";exports.PontEditIdentifier.ICON="icon";exports.PontEditIdentifier.TAG=`${nt}-${exports.PontEditIdentifier.ROOT}`;exports.PontEditIdentifier.CLICK_EVENT=`${exports.PontEditIdentifier.TAG}:click`;exports.PontEditIdentifier.PARTS={root:exports.PontEditIdentifier.ROOT,icon:`${exports.PontEditIdentifier.ROOT}-${exports.PontEditIdentifier.ICON}`};Uo([a({type:String})],exports.PontEditIdentifier.prototype,"seed",2);Uo([a({type:String,attribute:"custom-id"})],exports.PontEditIdentifier.prototype,"customId",2);Uo([a({type:String})],exports.PontEditIdentifier.prototype,"identifier",2);Uo([a({type:String})],exports.PontEditIdentifier.prototype,"event",2);exports.PontEditIdentifier=Uo([p("pont-edit-identifier")],exports.PontEditIdentifier);function W0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vn={},bs,Vc;function Y0(){return Vc||(Vc=1,bs=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),bs}var ys={},ir={},Hc;function on(){if(Hc)return ir;Hc=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return ir.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17},ir.getSymbolTotalCodewords=function(o){return t[o]},ir.getBCHDigit=function(r){let o=0;for(;r!==0;)o++,r>>>=1;return o},ir.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');e=o},ir.isKanjiModeEnabled=function(){return typeof e<"u"},ir.toSJIS=function(o){return e(o)},ir}var _s={},Gc;function Ol(){return Gc||(Gc=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},e.from=function(o,n){if(e.isValid(o))return o;try{return t(o)}catch{return n}}})(_s)),_s}var ws,Kc;function Q0(){if(Kc)return ws;Kc=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const r=Math.floor(t/8);return(this.buffer[r]>>>7-t%8&1)===1},put:function(t,r){for(let o=0;o<r;o++)this.putBit((t>>>r-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}},ws=e,ws}var $s,Wc;function Z0(){if(Wc)return $s;Wc=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,r,o,n){const i=t*this.size+r;this.data[i]=o,n&&(this.reservedBit[i]=!0)},e.prototype.get=function(t,r){return this.data[t*this.size+r]},e.prototype.xor=function(t,r,o){this.data[t*this.size+r]^=o},e.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]},$s=e,$s}var Ps={},Yc;function J0(){return Yc||(Yc=1,(function(e){const t=on().getSymbolSize;e.getRowColCoords=function(o){if(o===1)return[];const n=Math.floor(o/7)+2,i=t(o),s=i===145?26:Math.ceil((i-13)/(2*n-2))*2,d=[i-7];for(let c=1;c<n-1;c++)d[c]=d[c-1]-s;return d.push(6),d.reverse()},e.getPositions=function(o){const n=[],i=e.getRowColCoords(o),s=i.length;for(let d=0;d<s;d++)for(let c=0;c<s;c++)d===0&&c===0||d===0&&c===s-1||d===s-1&&c===0||n.push([i[d],i[c]]);return n}})(Ps)),Ps}var Cs={},Qc;function X0(){if(Qc)return Cs;Qc=1;const e=on().getSymbolSize,t=7;return Cs.getPositions=function(o){const n=e(o);return[[0,0],[n-t,0],[0,n-t]]},Cs}var Ss={},Zc;function t2(){return Zc||(Zc=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const i=n.size;let s=0,d=0,c=0,m=null,v=null;for(let b=0;b<i;b++){d=c=0,m=v=null;for(let w=0;w<i;w++){let _=n.get(b,w);_===m?d++:(d>=5&&(s+=t.N1+(d-5)),m=_,d=1),_=n.get(w,b),_===v?c++:(c>=5&&(s+=t.N1+(c-5)),v=_,c=1)}d>=5&&(s+=t.N1+(d-5)),c>=5&&(s+=t.N1+(c-5))}return s},e.getPenaltyN2=function(n){const i=n.size;let s=0;for(let d=0;d<i-1;d++)for(let c=0;c<i-1;c++){const m=n.get(d,c)+n.get(d,c+1)+n.get(d+1,c)+n.get(d+1,c+1);(m===4||m===0)&&s++}return s*t.N2},e.getPenaltyN3=function(n){const i=n.size;let s=0,d=0,c=0;for(let m=0;m<i;m++){d=c=0;for(let v=0;v<i;v++)d=d<<1&2047|n.get(m,v),v>=10&&(d===1488||d===93)&&s++,c=c<<1&2047|n.get(v,m),v>=10&&(c===1488||c===93)&&s++}return s*t.N3},e.getPenaltyN4=function(n){let i=0;const s=n.data.length;for(let c=0;c<s;c++)i+=n.data[c];return Math.abs(Math.ceil(i*100/s/5)-10)*t.N4};function r(o,n,i){switch(o){case e.Patterns.PATTERN000:return(n+i)%2===0;case e.Patterns.PATTERN001:return n%2===0;case e.Patterns.PATTERN010:return i%3===0;case e.Patterns.PATTERN011:return(n+i)%3===0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(i/3))%2===0;case e.Patterns.PATTERN101:return n*i%2+n*i%3===0;case e.Patterns.PATTERN110:return(n*i%2+n*i%3)%2===0;case e.Patterns.PATTERN111:return(n*i%3+(n+i)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}e.applyMask=function(n,i){const s=i.size;for(let d=0;d<s;d++)for(let c=0;c<s;c++)i.isReserved(c,d)||i.xor(c,d,r(n,c,d))},e.getBestMask=function(n,i){const s=Object.keys(e.Patterns).length;let d=0,c=1/0;for(let m=0;m<s;m++){i(m),e.applyMask(m,n);const v=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(m,n),v<c&&(c=v,d=m)}return d}})(Ss)),Ss}var Ko={},Jc;function tu(){if(Jc)return Ko;Jc=1;const e=Ol(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Ko.getBlocksCount=function(n,i){switch(i){case e.L:return t[(n-1)*4+0];case e.M:return t[(n-1)*4+1];case e.Q:return t[(n-1)*4+2];case e.H:return t[(n-1)*4+3];default:return}},Ko.getTotalCodewordsCount=function(n,i){switch(i){case e.L:return r[(n-1)*4+0];case e.M:return r[(n-1)*4+1];case e.Q:return r[(n-1)*4+2];case e.H:return r[(n-1)*4+3];default:return}},Ko}var Es={},ro={},Xc;function e2(){if(Xc)return ro;Xc=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let o=1;for(let n=0;n<255;n++)e[n]=o,t[o]=n,o<<=1,o&256&&(o^=285);for(let n=255;n<512;n++)e[n]=e[n-255]})(),ro.log=function(o){if(o<1)throw new Error("log("+o+")");return t[o]},ro.exp=function(o){return e[o]},ro.mul=function(o,n){return o===0||n===0?0:e[t[o]+t[n]]},ro}var tp;function r2(){return tp||(tp=1,(function(e){const t=e2();e.mul=function(o,n){const i=new Uint8Array(o.length+n.length-1);for(let s=0;s<o.length;s++)for(let d=0;d<n.length;d++)i[s+d]^=t.mul(o[s],n[d]);return i},e.mod=function(o,n){let i=new Uint8Array(o);for(;i.length-n.length>=0;){const s=i[0];for(let c=0;c<n.length;c++)i[c]^=t.mul(n[c],s);let d=0;for(;d<i.length&&i[d]===0;)d++;i=i.slice(d)}return i},e.generateECPolynomial=function(o){let n=new Uint8Array([1]);for(let i=0;i<o;i++)n=e.mul(n,new Uint8Array([1,t.exp(i)]));return n}})(Es)),Es}var xs,ep;function n2(){if(ep)return xs;ep=1;const e=r2();function t(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(o){this.degree=o,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(o.length+this.degree);n.set(o);const i=e.mod(n,this.genPoly),s=this.degree-i.length;if(s>0){const d=new Uint8Array(this.degree);return d.set(i,s),d}return i},xs=t,xs}var Os={},Rs={},Is={},rp;function eu(){return rp||(rp=1,Is.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Is}var ge={},np;function ru(){if(np)return ge;np=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
5455
+ `}};exports.PontEditIdentifier.ROOT="edit-identifier";exports.PontEditIdentifier.ICON="icon";exports.PontEditIdentifier.TAG=`${nt}-${exports.PontEditIdentifier.ROOT}`;exports.PontEditIdentifier.CLICK_EVENT=`${exports.PontEditIdentifier.TAG}:click`;exports.PontEditIdentifier.PARTS={root:exports.PontEditIdentifier.ROOT,icon:`${exports.PontEditIdentifier.ROOT}-${exports.PontEditIdentifier.ICON}`};Uo([a({type:String})],exports.PontEditIdentifier.prototype,"seed",2);Uo([a({type:String,attribute:"custom-id"})],exports.PontEditIdentifier.prototype,"customId",2);Uo([a({type:String})],exports.PontEditIdentifier.prototype,"identifier",2);Uo([a({type:String})],exports.PontEditIdentifier.prototype,"event",2);exports.PontEditIdentifier=Uo([p("pont-edit-identifier")],exports.PontEditIdentifier);function W0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vn={},bs,Vc;function Y0(){return Vc||(Vc=1,bs=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),bs}var ys={},sr={},Hc;function on(){if(Hc)return sr;Hc=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return sr.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17},sr.getSymbolTotalCodewords=function(o){return t[o]},sr.getBCHDigit=function(r){let o=0;for(;r!==0;)o++,r>>>=1;return o},sr.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');e=o},sr.isKanjiModeEnabled=function(){return typeof e<"u"},sr.toSJIS=function(o){return e(o)},sr}var _s={},Gc;function Ol(){return Gc||(Gc=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},e.from=function(o,n){if(e.isValid(o))return o;try{return t(o)}catch{return n}}})(_s)),_s}var ws,Kc;function Q0(){if(Kc)return ws;Kc=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const r=Math.floor(t/8);return(this.buffer[r]>>>7-t%8&1)===1},put:function(t,r){for(let o=0;o<r;o++)this.putBit((t>>>r-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}},ws=e,ws}var $s,Wc;function Z0(){if(Wc)return $s;Wc=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,r,o,n){const i=t*this.size+r;this.data[i]=o,n&&(this.reservedBit[i]=!0)},e.prototype.get=function(t,r){return this.data[t*this.size+r]},e.prototype.xor=function(t,r,o){this.data[t*this.size+r]^=o},e.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]},$s=e,$s}var Ps={},Yc;function J0(){return Yc||(Yc=1,(function(e){const t=on().getSymbolSize;e.getRowColCoords=function(o){if(o===1)return[];const n=Math.floor(o/7)+2,i=t(o),s=i===145?26:Math.ceil((i-13)/(2*n-2))*2,d=[i-7];for(let c=1;c<n-1;c++)d[c]=d[c-1]-s;return d.push(6),d.reverse()},e.getPositions=function(o){const n=[],i=e.getRowColCoords(o),s=i.length;for(let d=0;d<s;d++)for(let c=0;c<s;c++)d===0&&c===0||d===0&&c===s-1||d===s-1&&c===0||n.push([i[d],i[c]]);return n}})(Ps)),Ps}var Cs={},Qc;function X0(){if(Qc)return Cs;Qc=1;const e=on().getSymbolSize,t=7;return Cs.getPositions=function(o){const n=e(o);return[[0,0],[n-t,0],[0,n-t]]},Cs}var Ss={},Zc;function t2(){return Zc||(Zc=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const i=n.size;let s=0,d=0,c=0,m=null,v=null;for(let b=0;b<i;b++){d=c=0,m=v=null;for(let w=0;w<i;w++){let _=n.get(b,w);_===m?d++:(d>=5&&(s+=t.N1+(d-5)),m=_,d=1),_=n.get(w,b),_===v?c++:(c>=5&&(s+=t.N1+(c-5)),v=_,c=1)}d>=5&&(s+=t.N1+(d-5)),c>=5&&(s+=t.N1+(c-5))}return s},e.getPenaltyN2=function(n){const i=n.size;let s=0;for(let d=0;d<i-1;d++)for(let c=0;c<i-1;c++){const m=n.get(d,c)+n.get(d,c+1)+n.get(d+1,c)+n.get(d+1,c+1);(m===4||m===0)&&s++}return s*t.N2},e.getPenaltyN3=function(n){const i=n.size;let s=0,d=0,c=0;for(let m=0;m<i;m++){d=c=0;for(let v=0;v<i;v++)d=d<<1&2047|n.get(m,v),v>=10&&(d===1488||d===93)&&s++,c=c<<1&2047|n.get(v,m),v>=10&&(c===1488||c===93)&&s++}return s*t.N3},e.getPenaltyN4=function(n){let i=0;const s=n.data.length;for(let c=0;c<s;c++)i+=n.data[c];return Math.abs(Math.ceil(i*100/s/5)-10)*t.N4};function r(o,n,i){switch(o){case e.Patterns.PATTERN000:return(n+i)%2===0;case e.Patterns.PATTERN001:return n%2===0;case e.Patterns.PATTERN010:return i%3===0;case e.Patterns.PATTERN011:return(n+i)%3===0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(i/3))%2===0;case e.Patterns.PATTERN101:return n*i%2+n*i%3===0;case e.Patterns.PATTERN110:return(n*i%2+n*i%3)%2===0;case e.Patterns.PATTERN111:return(n*i%3+(n+i)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}e.applyMask=function(n,i){const s=i.size;for(let d=0;d<s;d++)for(let c=0;c<s;c++)i.isReserved(c,d)||i.xor(c,d,r(n,c,d))},e.getBestMask=function(n,i){const s=Object.keys(e.Patterns).length;let d=0,c=1/0;for(let m=0;m<s;m++){i(m),e.applyMask(m,n);const v=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(m,n),v<c&&(c=v,d=m)}return d}})(Ss)),Ss}var Ko={},Jc;function tu(){if(Jc)return Ko;Jc=1;const e=Ol(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Ko.getBlocksCount=function(n,i){switch(i){case e.L:return t[(n-1)*4+0];case e.M:return t[(n-1)*4+1];case e.Q:return t[(n-1)*4+2];case e.H:return t[(n-1)*4+3];default:return}},Ko.getTotalCodewordsCount=function(n,i){switch(i){case e.L:return r[(n-1)*4+0];case e.M:return r[(n-1)*4+1];case e.Q:return r[(n-1)*4+2];case e.H:return r[(n-1)*4+3];default:return}},Ko}var Es={},ro={},Xc;function e2(){if(Xc)return ro;Xc=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let o=1;for(let n=0;n<255;n++)e[n]=o,t[o]=n,o<<=1,o&256&&(o^=285);for(let n=255;n<512;n++)e[n]=e[n-255]})(),ro.log=function(o){if(o<1)throw new Error("log("+o+")");return t[o]},ro.exp=function(o){return e[o]},ro.mul=function(o,n){return o===0||n===0?0:e[t[o]+t[n]]},ro}var tp;function r2(){return tp||(tp=1,(function(e){const t=e2();e.mul=function(o,n){const i=new Uint8Array(o.length+n.length-1);for(let s=0;s<o.length;s++)for(let d=0;d<n.length;d++)i[s+d]^=t.mul(o[s],n[d]);return i},e.mod=function(o,n){let i=new Uint8Array(o);for(;i.length-n.length>=0;){const s=i[0];for(let c=0;c<n.length;c++)i[c]^=t.mul(n[c],s);let d=0;for(;d<i.length&&i[d]===0;)d++;i=i.slice(d)}return i},e.generateECPolynomial=function(o){let n=new Uint8Array([1]);for(let i=0;i<o;i++)n=e.mul(n,new Uint8Array([1,t.exp(i)]));return n}})(Es)),Es}var xs,ep;function n2(){if(ep)return xs;ep=1;const e=r2();function t(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(o){this.degree=o,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(o.length+this.degree);n.set(o);const i=e.mod(n,this.genPoly),s=this.degree-i.length;if(s>0){const d=new Uint8Array(this.degree);return d.set(i,s),d}return i},xs=t,xs}var Os={},Rs={},Is={},rp;function eu(){return rp||(rp=1,Is.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Is}var ge={},np;function ru(){if(np)return ge;np=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
5456
5456
  ]))+`;ge.KANJI=new RegExp(r,"g"),ge.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),ge.BYTE=new RegExp(o,"g"),ge.NUMERIC=new RegExp(e,"g"),ge.ALPHANUMERIC=new RegExp(t,"g");const n=new RegExp("^"+r+"$"),i=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return ge.testKanji=function(c){return n.test(c)},ge.testNumeric=function(c){return i.test(c)},ge.testAlphanumeric=function(c){return s.test(c)},ge}var op;function sn(){return op||(op=1,(function(e){const t=eu(),r=ru();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return r.testNumeric(i)?e.NUMERIC:r.testAlphanumeric(i)?e.ALPHANUMERIC:r.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function o(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}e.from=function(i,s){if(e.isValid(i))return i;try{return o(i)}catch{return s}}})(Rs)),Rs}var ip;function o2(){return ip||(ip=1,(function(e){const t=on(),r=tu(),o=Ol(),n=sn(),i=eu(),s=7973,d=t.getBCHDigit(s);function c(w,_,C){for(let P=1;P<=40;P++)if(_<=e.getCapacity(P,C,w))return P}function m(w,_){return n.getCharCountIndicator(w,_)+4}function v(w,_){let C=0;return w.forEach(function(P){const O=m(P.mode,_);C+=O+P.getBitsLength()}),C}function b(w,_){for(let C=1;C<=40;C++)if(v(w,C)<=e.getCapacity(C,_,n.MIXED))return C}e.from=function(_,C){return i.isValid(_)?parseInt(_,10):C},e.getCapacity=function(_,C,P){if(!i.isValid(_))throw new Error("Invalid QR Code version");typeof P>"u"&&(P=n.BYTE);const O=t.getSymbolTotalCodewords(_),E=r.getTotalCodewordsCount(_,C),D=(O-E)*8;if(P===n.MIXED)return D;const L=D-m(P,_);switch(P){case n.NUMERIC:return Math.floor(L/10*3);case n.ALPHANUMERIC:return Math.floor(L/11*2);case n.KANJI:return Math.floor(L/13);case n.BYTE:default:return Math.floor(L/8)}},e.getBestVersionForData=function(_,C){let P;const O=o.from(C,o.M);if(Array.isArray(_)){if(_.length>1)return b(_,O);if(_.length===0)return 1;P=_[0]}else P=_;return c(P.mode,P.getLength(),O)},e.getEncodedBits=function(_){if(!i.isValid(_)||_<7)throw new Error("Invalid QR Code version");let C=_<<12;for(;t.getBCHDigit(C)-d>=0;)C^=s<<t.getBCHDigit(C)-d;return _<<12|C}})(Os)),Os}var As={},sp;function i2(){if(sp)return As;sp=1;const e=on(),t=1335,r=21522,o=e.getBCHDigit(t);return As.getEncodedBits=function(i,s){const d=i.bit<<3|s;let c=d<<10;for(;e.getBCHDigit(c)-o>=0;)c^=t<<e.getBCHDigit(c)-o;return(d<<10|c)^r},As}var Ts={},Ds,ap;function s2(){if(ap)return Ds;ap=1;const e=sn();function t(r){this.mode=e.NUMERIC,this.data=r.toString()}return t.getBitsLength=function(o){return 10*Math.floor(o/3)+(o%3?o%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(o){let n,i,s;for(n=0;n+3<=this.data.length;n+=3)i=this.data.substr(n,3),s=parseInt(i,10),o.put(s,10);const d=this.data.length-n;d>0&&(i=this.data.substr(n),s=parseInt(i,10),o.put(s,d*3+1))},Ds=t,Ds}var Ls,lp;function a2(){if(lp)return Ls;lp=1;const e=sn(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(o){this.mode=e.ALPHANUMERIC,this.data=o}return r.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(n){let i;for(i=0;i+2<=this.data.length;i+=2){let s=t.indexOf(this.data[i])*45;s+=t.indexOf(this.data[i+1]),n.put(s,11)}this.data.length%2&&n.put(t.indexOf(this.data[i]),6)},Ls=r,Ls}var Fs,dp;function l2(){if(dp)return Fs;dp=1;const e=sn();function t(r){this.mode=e.BYTE,typeof r=="string"?this.data=new TextEncoder().encode(r):this.data=new Uint8Array(r)}return t.getBitsLength=function(o){return o*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){for(let o=0,n=this.data.length;o<n;o++)r.put(this.data[o],8)},Fs=t,Fs}var ks,cp;function d2(){if(cp)return ks;cp=1;const e=sn(),t=on();function r(o){this.mode=e.KANJI,this.data=o}return r.getBitsLength=function(n){return n*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(o){let n;for(n=0;n<this.data.length;n++){let i=t.toSJIS(this.data[n]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+`
5457
5457
  Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),o.put(i,13)}},ks=r,ks}var Ns={exports:{}},pp;function c2(){return pp||(pp=1,(function(e){var t={single_source_shortest_paths:function(r,o,n){var i={},s={};s[o]=0;var d=t.PriorityQueue.make();d.push(o,0);for(var c,m,v,b,w,_,C,P,O;!d.empty();){c=d.pop(),m=c.value,b=c.cost,w=r[m]||{};for(v in w)w.hasOwnProperty(v)&&(_=w[v],C=b+_,P=s[v],O=typeof s[v]>"u",(O||P>C)&&(s[v]=C,d.push(v,C),i[v]=m))}if(typeof n<"u"&&typeof s[n]>"u"){var E=["Could not find a path from ",o," to ",n,"."].join("");throw new Error(E)}return i},extract_shortest_path_from_predecessor_list:function(r,o){for(var n=[],i=o;i;)n.push(i),r[i],i=r[i];return n.reverse(),n},find_path:function(r,o,n){var i=t.single_source_shortest_paths(r,o,n);return t.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(r){var o=t.PriorityQueue,n={},i;r=r||{};for(i in o)o.hasOwnProperty(i)&&(n[i]=o[i]);return n.queue=[],n.sorter=r.sorter||o.default_sorter,n},default_sorter:function(r,o){return r.cost-o.cost},push:function(r,o){var n={value:r,cost:o};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Ns)),Ns.exports}var hp;function p2(){return hp||(hp=1,(function(e){const t=sn(),r=s2(),o=a2(),n=l2(),i=d2(),s=ru(),d=on(),c=c2();function m(E){return unescape(encodeURIComponent(E)).length}function v(E,D,L){const I=[];let Q;for(;(Q=E.exec(L))!==null;)I.push({data:Q[0],index:Q.index,mode:D,length:Q[0].length});return I}function b(E){const D=v(s.NUMERIC,t.NUMERIC,E),L=v(s.ALPHANUMERIC,t.ALPHANUMERIC,E);let I,Q;return d.isKanjiModeEnabled()?(I=v(s.BYTE,t.BYTE,E),Q=v(s.KANJI,t.KANJI,E)):(I=v(s.BYTE_KANJI,t.BYTE,E),Q=[]),D.concat(L,I,Q).sort(function(A,T){return A.index-T.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function w(E,D){switch(D){case t.NUMERIC:return r.getBitsLength(E);case t.ALPHANUMERIC:return o.getBitsLength(E);case t.KANJI:return i.getBitsLength(E);case t.BYTE:return n.getBitsLength(E)}}function _(E){return E.reduce(function(D,L){const I=D.length-1>=0?D[D.length-1]:null;return I&&I.mode===L.mode?(D[D.length-1].data+=L.data,D):(D.push(L),D)},[])}function C(E){const D=[];for(let L=0;L<E.length;L++){const I=E[L];switch(I.mode){case t.NUMERIC:D.push([I,{data:I.data,mode:t.ALPHANUMERIC,length:I.length},{data:I.data,mode:t.BYTE,length:I.length}]);break;case t.ALPHANUMERIC:D.push([I,{data:I.data,mode:t.BYTE,length:I.length}]);break;case t.KANJI:D.push([I,{data:I.data,mode:t.BYTE,length:m(I.data)}]);break;case t.BYTE:D.push([{data:I.data,mode:t.BYTE,length:m(I.data)}])}}return D}function P(E,D){const L={},I={start:{}};let Q=["start"];for(let R=0;R<E.length;R++){const A=E[R],T=[];for(let x=0;x<A.length;x++){const N=A[x],F=""+R+x;T.push(F),L[F]={node:N,lastCount:0},I[F]={};for(let $=0;$<Q.length;$++){const k=Q[$];L[k]&&L[k].node.mode===N.mode?(I[k][F]=w(L[k].lastCount+N.length,N.mode)-w(L[k].lastCount,N.mode),L[k].lastCount+=N.length):(L[k]&&(L[k].lastCount=N.length),I[k][F]=w(N.length,N.mode)+4+t.getCharCountIndicator(N.mode,D))}}Q=T}for(let R=0;R<Q.length;R++)I[Q[R]].end=0;return{map:I,table:L}}function O(E,D){let L;const I=t.getBestModeForData(E);if(L=t.from(D,I),L!==t.BYTE&&L.bit<I.bit)throw new Error('"'+E+'" cannot be encoded with mode '+t.toString(L)+`.
5458
5458
  Suggested mode is: `+t.toString(I));switch(L===t.KANJI&&!d.isKanjiModeEnabled()&&(L=t.BYTE),L){case t.NUMERIC:return new r(E);case t.ALPHANUMERIC:return new o(E);case t.KANJI:return new i(E);case t.BYTE:return new n(E)}}e.fromArray=function(D){return D.reduce(function(L,I){return typeof I=="string"?L.push(O(I,null)):I.data&&L.push(O(I.data,I.mode)),L},[])},e.fromString=function(D,L){const I=b(D,d.isKanjiModeEnabled()),Q=C(I),R=P(Q,L),A=c.find_path(R.map,"start","end"),T=[];for(let x=1;x<A.length-1;x++)T.push(R.table[A[x]].node);return e.fromArray(_(T))},e.rawSplit=function(D){return e.fromArray(b(D,d.isKanjiModeEnabled()))}})(Ts)),Ts}var up;function h2(){if(up)return ys;up=1;const e=on(),t=Ol(),r=Q0(),o=Z0(),n=J0(),i=X0(),s=t2(),d=tu(),c=n2(),m=o2(),v=i2(),b=sn(),w=p2();function _(R,A){const T=R.size,x=i.getPositions(A);for(let N=0;N<x.length;N++){const F=x[N][0],$=x[N][1];for(let k=-1;k<=7;k++)if(!(F+k<=-1||T<=F+k))for(let M=-1;M<=7;M++)$+M<=-1||T<=$+M||(k>=0&&k<=6&&(M===0||M===6)||M>=0&&M<=6&&(k===0||k===6)||k>=2&&k<=4&&M>=2&&M<=4?R.set(F+k,$+M,!0,!0):R.set(F+k,$+M,!1,!0))}}function C(R){const A=R.size;for(let T=8;T<A-8;T++){const x=T%2===0;R.set(T,6,x,!0),R.set(6,T,x,!0)}}function P(R,A){const T=n.getPositions(A);for(let x=0;x<T.length;x++){const N=T[x][0],F=T[x][1];for(let $=-2;$<=2;$++)for(let k=-2;k<=2;k++)$===-2||$===2||k===-2||k===2||$===0&&k===0?R.set(N+$,F+k,!0,!0):R.set(N+$,F+k,!1,!0)}}function O(R,A){const T=R.size,x=m.getEncodedBits(A);let N,F,$;for(let k=0;k<18;k++)N=Math.floor(k/3),F=k%3+T-8-3,$=(x>>k&1)===1,R.set(N,F,$,!0),R.set(F,N,$,!0)}function E(R,A,T){const x=R.size,N=v.getEncodedBits(A,T);let F,$;for(F=0;F<15;F++)$=(N>>F&1)===1,F<6?R.set(F,8,$,!0):F<8?R.set(F+1,8,$,!0):R.set(x-15+F,8,$,!0),F<8?R.set(8,x-F-1,$,!0):F<9?R.set(8,15-F-1+1,$,!0):R.set(8,15-F-1,$,!0);R.set(x-8,8,1,!0)}function D(R,A){const T=R.size;let x=-1,N=T-1,F=7,$=0;for(let k=T-1;k>0;k-=2)for(k===6&&k--;;){for(let M=0;M<2;M++)if(!R.isReserved(N,k-M)){let te=!1;$<A.length&&(te=(A[$]>>>F&1)===1),R.set(N,k-M,te),F--,F===-1&&($++,F=7)}if(N+=x,N<0||T<=N){N-=x,x=-x;break}}}function L(R,A,T){const x=new r;T.forEach(function(M){x.put(M.mode.bit,4),x.put(M.getLength(),b.getCharCountIndicator(M.mode,R)),M.write(x)});const N=e.getSymbolTotalCodewords(R),F=d.getTotalCodewordsCount(R,A),$=(N-F)*8;for(x.getLengthInBits()+4<=$&&x.put(0,4);x.getLengthInBits()%8!==0;)x.putBit(0);const k=($-x.getLengthInBits())/8;for(let M=0;M<k;M++)x.put(M%2?17:236,8);return I(x,R,A)}function I(R,A,T){const x=e.getSymbolTotalCodewords(A),N=d.getTotalCodewordsCount(A,T),F=x-N,$=d.getBlocksCount(A,T),k=x%$,M=$-k,te=Math.floor(x/$),me=Math.floor(F/$),jo=me+1,an=te-me,xr=new c(an);let ln=0;const It=new Array($),Fl=new Array($);let os=0;const ou=new Uint8Array(R.buffer);for(let dn=0;dn<$;dn++){const ss=dn<M?me:jo;It[dn]=ou.slice(ln,ln+ss),Fl[dn]=xr.encode(It[dn]),ln+=ss,os=Math.max(os,ss)}const is=new Uint8Array(x);let kl=0,qe,ze;for(qe=0;qe<os;qe++)for(ze=0;ze<$;ze++)qe<It[ze].length&&(is[kl++]=It[ze][qe]);for(qe=0;qe<an;qe++)for(ze=0;ze<$;ze++)is[kl++]=Fl[ze][qe];return is}function Q(R,A,T,x){let N;if(Array.isArray(R))N=w.fromArray(R);else if(typeof R=="string"){let te=A;if(!te){const me=w.rawSplit(R);te=m.getBestVersionForData(me,T)}N=w.fromString(R,te||40)}else throw new Error("Invalid data");const F=m.getBestVersionForData(N,T);if(!F)throw new Error("The amount of data is too big to be stored in a QR Code");if(!A)A=F;else if(A<F)throw new Error(`
@@ -5492,7 +5492,7 @@ Minimum version required to store current data is: `+F+`.
5492
5492
  `:h}
5493
5493
  </div>
5494
5494
  </div>
5495
- `}_getReappearButtonVariant(){return getComputedStyle(this).getPropertyValue("--pont-qr-code-reappear-button-variant").trim()||"primary"}};exports.PontQrCode.ROOT="qr-code";exports.PontQrCode.QR_CANVAS="canvas";exports.PontQrCode.OVERLAY="overlay";exports.PontQrCode.REAPPEAR_BUTTON="reappear-button";exports.PontQrCode.TAG=`${nt}-${exports.PontQrCode.ROOT}`;exports.PontQrCode.PARTS={root:exports.PontQrCode.ROOT,canvas:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.QR_CANVAS}`,overlay:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.OVERLAY}`,reappearButton:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.REAPPEAR_BUTTON}`};er([a({type:String})],exports.PontQrCode.prototype,"seed",2);er([a({type:String,attribute:"custom-id"})],exports.PontQrCode.prototype,"customId",2);er([a({type:String})],exports.PontQrCode.prototype,"url",2);er([a({type:Number})],exports.PontQrCode.prototype,"timeout",2);er([a({type:String,attribute:"reappear-button-text"})],exports.PontQrCode.prototype,"reappearButtonText",2);er([a({type:Boolean})],exports.PontQrCode.prototype,"disabled",2);er([a({type:String,attribute:"error-correction"})],exports.PontQrCode.prototype,"errorCorrection",2);er([g()],exports.PontQrCode.prototype,"_obscured",2);exports.PontQrCode=er([p("pont-qr-code")],exports.PontQrCode);const no={title:"Can't scan?",secret:"",issuer:"",account:"",secretLabel:"Manual secret"};var _2=Object.defineProperty,w2=Object.getOwnPropertyDescriptor,Sr=(e,t,r,o)=>{for(var n=o>1?void 0:o?w2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&_2(t,r,n),n};exports.PontSecret=class extends jt{constructor(){super(...arguments),this.title=no.title,this.secret=no.secret,this.issuer=no.issuer,this.account=no.account,this.secretLabel=no.secretLabel,this.disabled=!1,this._copied=!1,this._handleCopy=async()=>{if(!(!this.secret||this.disabled))try{await navigator.clipboard.writeText(this.secret),this.emit("pont-secret:copied",{secret:this.secret}),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=window.setTimeout(()=>{this._copied=!1,this._copyTimeout=void 0},2e3)}catch(t){console.warn("Failed to copy secret:",t),this.emit("pont-secret:copy-error",{error:t})}}}createRenderRoot(){return this}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){return l`
5495
+ `}_getReappearButtonVariant(){return getComputedStyle(this).getPropertyValue("--pont-qr-code-reappear-button-variant").trim()||"primary"}};exports.PontQrCode.ROOT="qr-code";exports.PontQrCode.QR_CANVAS="canvas";exports.PontQrCode.OVERLAY="overlay";exports.PontQrCode.REAPPEAR_BUTTON="reappear-button";exports.PontQrCode.TAG=`${nt}-${exports.PontQrCode.ROOT}`;exports.PontQrCode.PARTS={root:exports.PontQrCode.ROOT,canvas:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.QR_CANVAS}`,overlay:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.OVERLAY}`,reappearButton:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.REAPPEAR_BUTTON}`};er([a({type:String})],exports.PontQrCode.prototype,"seed",2);er([a({type:String,attribute:"custom-id"})],exports.PontQrCode.prototype,"customId",2);er([a({type:String})],exports.PontQrCode.prototype,"url",2);er([a({type:Number})],exports.PontQrCode.prototype,"timeout",2);er([a({type:String,attribute:"reappear-button-text"})],exports.PontQrCode.prototype,"reappearButtonText",2);er([a({type:Boolean})],exports.PontQrCode.prototype,"disabled",2);er([a({type:String,attribute:"error-correction"})],exports.PontQrCode.prototype,"errorCorrection",2);er([g()],exports.PontQrCode.prototype,"_obscured",2);exports.PontQrCode=er([p("pont-qr-code")],exports.PontQrCode);const no={title:"Can't scan?",secret:"",issuer:"",account:"",secretLabel:"Manual secret"};var _2=Object.defineProperty,w2=Object.getOwnPropertyDescriptor,Er=(e,t,r,o)=>{for(var n=o>1?void 0:o?w2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&_2(t,r,n),n};exports.PontSecret=class extends jt{constructor(){super(...arguments),this.title=no.title,this.secret=no.secret,this.issuer=no.issuer,this.account=no.account,this.secretLabel=no.secretLabel,this.disabled=!1,this._copied=!1,this._handleCopy=async()=>{if(!(!this.secret||this.disabled))try{await navigator.clipboard.writeText(this.secret),this.emit("pont-secret:copied",{secret:this.secret}),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=window.setTimeout(()=>{this._copied=!1,this._copyTimeout=void 0},2e3)}catch(t){console.warn("Failed to copy secret:",t),this.emit("pont-secret:copy-error",{error:t})}}}createRenderRoot(){return this}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){return l`
5496
5496
  <div part=${exports.PontSecret.PARTS.root} class="pont-secret-root">
5497
5497
  <div part=${exports.PontSecret.PARTS.card} class="pont-secret-card">
5498
5498
  <div part=${exports.PontSecret.PARTS.title} class="pont-secret-title">
@@ -5548,7 +5548,7 @@ Minimum version required to store current data is: `+F+`.
5548
5548
  </div>
5549
5549
  </div>
5550
5550
  </div>
5551
- `}};exports.PontSecret.ROOT="secret";exports.PontSecret.CARD="card";exports.PontSecret.TITLE="title";exports.PontSecret.INPUT_GROUP="input-group";exports.PontSecret.COPY_BUTTON="copy-button";exports.PontSecret.METADATA="metadata";exports.PontSecret.ISSUER="issuer";exports.PontSecret.ACCOUNT="account";exports.PontSecret.TOOLTIP="tooltip";exports.PontSecret.TAG=`${nt}-${exports.PontSecret.ROOT}`;exports.PontSecret.PARTS={root:exports.PontSecret.ROOT,card:`${exports.PontSecret.ROOT}-${exports.PontSecret.CARD}`,title:`${exports.PontSecret.ROOT}-${exports.PontSecret.TITLE}`,inputGroup:`${exports.PontSecret.ROOT}-${exports.PontSecret.INPUT_GROUP}`,copyButton:`${exports.PontSecret.ROOT}-${exports.PontSecret.COPY_BUTTON}`,metadata:`${exports.PontSecret.ROOT}-${exports.PontSecret.METADATA}`,issuer:`${exports.PontSecret.ROOT}-${exports.PontSecret.ISSUER}`,account:`${exports.PontSecret.ROOT}-${exports.PontSecret.ACCOUNT}`,tooltip:`${exports.PontSecret.ROOT}-${exports.PontSecret.TOOLTIP}`};Sr([a({type:String})],exports.PontSecret.prototype,"title",2);Sr([a({type:String})],exports.PontSecret.prototype,"secret",2);Sr([a({type:String})],exports.PontSecret.prototype,"issuer",2);Sr([a({type:String})],exports.PontSecret.prototype,"account",2);Sr([a({type:String,attribute:"secret-label"})],exports.PontSecret.prototype,"secretLabel",2);Sr([a({type:Boolean})],exports.PontSecret.prototype,"disabled",2);Sr([g()],exports.PontSecret.prototype,"_copied",2);exports.PontSecret=Sr([p("pont-secret")],exports.PontSecret);const js={title:"Recovery codes",subtitle:"Use these codes if you lose access to your authenticator app.",codes:[]};var $2=Object.defineProperty,P2=Object.getOwnPropertyDescriptor,Wn=(e,t,r,o)=>{for(var n=o>1?void 0:o?P2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&$2(t,r,n),n};exports.PontRecoveryCodes=class extends jt{constructor(){super(...arguments),this.title=js.title,this.subtitle=js.subtitle,this.codes=js.codes,this.disabled=!1,this._copied=!1,this._handleCopyAll=async()=>{if(!this.codes.length||this.disabled)return;const t=this.codes.join(`
5551
+ `}};exports.PontSecret.ROOT="secret";exports.PontSecret.CARD="card";exports.PontSecret.TITLE="title";exports.PontSecret.INPUT_GROUP="input-group";exports.PontSecret.COPY_BUTTON="copy-button";exports.PontSecret.METADATA="metadata";exports.PontSecret.ISSUER="issuer";exports.PontSecret.ACCOUNT="account";exports.PontSecret.TOOLTIP="tooltip";exports.PontSecret.TAG=`${nt}-${exports.PontSecret.ROOT}`;exports.PontSecret.PARTS={root:exports.PontSecret.ROOT,card:`${exports.PontSecret.ROOT}-${exports.PontSecret.CARD}`,title:`${exports.PontSecret.ROOT}-${exports.PontSecret.TITLE}`,inputGroup:`${exports.PontSecret.ROOT}-${exports.PontSecret.INPUT_GROUP}`,copyButton:`${exports.PontSecret.ROOT}-${exports.PontSecret.COPY_BUTTON}`,metadata:`${exports.PontSecret.ROOT}-${exports.PontSecret.METADATA}`,issuer:`${exports.PontSecret.ROOT}-${exports.PontSecret.ISSUER}`,account:`${exports.PontSecret.ROOT}-${exports.PontSecret.ACCOUNT}`,tooltip:`${exports.PontSecret.ROOT}-${exports.PontSecret.TOOLTIP}`};Er([a({type:String})],exports.PontSecret.prototype,"title",2);Er([a({type:String})],exports.PontSecret.prototype,"secret",2);Er([a({type:String})],exports.PontSecret.prototype,"issuer",2);Er([a({type:String})],exports.PontSecret.prototype,"account",2);Er([a({type:String,attribute:"secret-label"})],exports.PontSecret.prototype,"secretLabel",2);Er([a({type:Boolean})],exports.PontSecret.prototype,"disabled",2);Er([g()],exports.PontSecret.prototype,"_copied",2);exports.PontSecret=Er([p("pont-secret")],exports.PontSecret);const js={title:"Recovery codes",subtitle:"Use these codes if you lose access to your authenticator app.",codes:[]};var $2=Object.defineProperty,P2=Object.getOwnPropertyDescriptor,Wn=(e,t,r,o)=>{for(var n=o>1?void 0:o?P2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&$2(t,r,n),n};exports.PontRecoveryCodes=class extends jt{constructor(){super(...arguments),this.title=js.title,this.subtitle=js.subtitle,this.codes=js.codes,this.disabled=!1,this._copied=!1,this._handleCopyAll=async()=>{if(!this.codes.length||this.disabled)return;const t=this.codes.join(`
5552
5552
  `);try{await navigator.clipboard.writeText(t),this.emit("pont-recovery-codes:copied",{codes:this.codes}),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=window.setTimeout(()=>{this._copied=!1,this._copyTimeout=void 0},2e3)}catch(r){console.warn("Failed to copy codes:",r),this.emit("pont-recovery-codes:copy-error",{error:r})}},this._handleDownload=()=>{if(!this.codes.length||this.disabled)return;const t=this.codes.join(`
5553
5553
  `),r=new Blob([t],{type:"text/plain"}),o=URL.createObjectURL(r),n=document.createElement("a");n.href=o,n.download="recovery-codes.txt",document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(o),this.emit("pont-recovery-codes:downloaded",{codes:this.codes})}}createRenderRoot(){return this}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){const t=this.codes&&this.codes.length>0;return l`
5554
5554
  <div part=${exports.PontRecoveryCodes.PARTS.root} class="pont-recovery-codes-root">
@@ -5729,7 +5729,7 @@ Minimum version required to store current data is: `+F+`.
5729
5729
  * @license
5730
5730
  * Copyright 2017 Google LLC
5731
5731
  * SPDX-License-Identifier: BSD-3-Clause
5732
- */class Ma extends ni{}Ma.directiveName="unsafeSVG",Ma.resultType=2;const bp=An(Ma);var H2=Object.defineProperty,G2=Object.getOwnPropertyDescriptor,Er=(e,t,r,o)=>{for(var n=o>1?void 0:o?G2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&H2(t,r,n),n};const K2=`
5732
+ */class Ma extends ni{}Ma.directiveName="unsafeSVG",Ma.resultType=2;const bp=An(Ma);var H2=Object.defineProperty,G2=Object.getOwnPropertyDescriptor,nr=(e,t,r,o)=>{for(var n=o>1?void 0:o?G2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&H2(t,r,n),n};const K2=`
5733
5733
  <svg viewBox="0 0 120 32" role="img" aria-label="Logo placeholder"
5734
5734
  xmlns="http://www.w3.org/2000/svg" width="120" height="32">
5735
5735
  <rect x="0.75" y="0.75" width="118.5" height="30.5" rx="6"
@@ -5740,21 +5740,21 @@ Minimum version required to store current data is: `+F+`.
5740
5740
  fill="currentColor" fill-opacity="0.3"/>
5741
5741
  <rect x="32" y="19" width="34" height="4" rx="2"
5742
5742
  fill="currentColor" fill-opacity="0.18"/>
5743
- </svg>`;exports.PontLogo=class extends jt{constructor(){super(...arguments),this.align="center",this.width="",this.height="",this.theme=this.getTheme(),this.isSvg=!1,this.design=new Fo(this)}get _containerElement(){return this.querySelector(".pont-logo-wrapper")}connectedCallback(){super.connectedCallback(),this.style.display="grid",this.updateLayoutFromProps(),this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}updated(t){super.updated(t),(t.has("align")||t.has("width")||t.has("height"))&&this.updateLayoutFromProps()}updateLayoutFromProps(){const t=this._containerElement;t&&(this.align&&(t.style.justifySelf=this.align),this.width&&(t.style.width=this.width),this.height&&(t.style.height=this.height))}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")??"light"}createRenderRoot(){return this}render(){const t=vP(this.imageUrl,this.theme);if(!t&&this.design.active)return this.isSvg=!0,l`
5743
+ </svg>`;exports.PontLogo=class extends jt{constructor(){super(...arguments),this.align="center",this.width="",this.height="",this.theme=this.getTheme(),this.isSvg=!1,this.design=new Fo(this)}get _containerElement(){return this.querySelector(".pont-logo-wrapper")}connectedCallback(){super.connectedCallback(),this.style.display="grid",this.updateLayoutFromProps(),this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}updated(t){super.updated(t),(t.has("align")||t.has("width")||t.has("height"))&&this.updateLayoutFromProps()}updateLayoutFromProps(){const t=this._containerElement;t&&(this.align&&(t.style.justifySelf=this.align),this.width&&(t.style.width=this.width),this.height&&(t.style.height=this.height))}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")??"light"}createRenderRoot(){return this}render(){const t=this.theme==="dark"&&this.imageUrlDark?this.imageUrlDark:this.imageUrl,r=vP(t,this.theme);if(!r&&this.design.active)return this.isSvg=!0,l`
5744
5744
  <div class="pont-logo-wrapper" part=${this.id?this.id:"logo"}>
5745
5745
  ${bp(K2)}
5746
5746
  </div>
5747
- `;const r=t?_P(t):null;return this.isSvg=!!r,l`
5747
+ `;const o=r?_P(r):null;return this.isSvg=!!o,l`
5748
5748
  <div class="pont-logo-wrapper">
5749
- ${r?bp(r):l`
5749
+ ${o?bp(o):l`
5750
5750
  <img
5751
5751
  part=${this.id?this.id:"logo"}
5752
- src=${wP(t)}
5752
+ src=${wP(r)}
5753
5753
  alt="Logo"
5754
5754
  />
5755
5755
  `}
5756
5756
  </div>
5757
- `}};Er([a({type:String})],exports.PontLogo.prototype,"id",2);Er([a({type:String,attribute:"image-url"})],exports.PontLogo.prototype,"imageUrl",2);Er([a({type:String,reflect:!0})],exports.PontLogo.prototype,"align",2);Er([a({type:String,reflect:!0})],exports.PontLogo.prototype,"width",2);Er([a({type:String,reflect:!0})],exports.PontLogo.prototype,"height",2);Er([g()],exports.PontLogo.prototype,"theme",2);Er([g()],exports.PontLogo.prototype,"isSvg",2);exports.PontLogo=Er([p("pont-logo")],exports.PontLogo);const Yo={variant:"brand",logoAlign:"end",label:"Powered by"};var W2=Object.defineProperty,Y2=Object.getOwnPropertyDescriptor,Qn=(e,t,r,o)=>{for(var n=o>1?void 0:o?Y2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&W2(t,r,n),n};exports.PontWatermark=class extends f{constructor(){super(...arguments),this.seed=_t(),this.variant=Yo.variant,this.logoAlign=Yo.logoAlign,this._label=Yo.label}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:Yo.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontWatermark.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontWatermark.LABEL}`}get logoId(){return`${this.rootId}-${exports.PontWatermark.LOGO}`}_renderLabel(){return l`
5757
+ `}};nr([a({type:String})],exports.PontLogo.prototype,"id",2);nr([a({type:String,attribute:"image-url"})],exports.PontLogo.prototype,"imageUrl",2);nr([a({type:String,attribute:"image-url-dark"})],exports.PontLogo.prototype,"imageUrlDark",2);nr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"align",2);nr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"width",2);nr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"height",2);nr([g()],exports.PontLogo.prototype,"theme",2);nr([g()],exports.PontLogo.prototype,"isSvg",2);exports.PontLogo=nr([p("pont-logo")],exports.PontLogo);const Yo={variant:"brand",logoAlign:"end",label:"Powered by"};var W2=Object.defineProperty,Y2=Object.getOwnPropertyDescriptor,Qn=(e,t,r,o)=>{for(var n=o>1?void 0:o?Y2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&W2(t,r,n),n};exports.PontWatermark=class extends f{constructor(){super(...arguments),this.seed=_t(),this.variant=Yo.variant,this.logoAlign=Yo.logoAlign,this._label=Yo.label}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:Yo.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontWatermark.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontWatermark.LABEL}`}get logoId(){return`${this.rootId}-${exports.PontWatermark.LOGO}`}_renderLabel(){return l`
5758
5758
  <span id="${this.labelId}" part="${exports.PontWatermark.PARTS.label}">
5759
5759
  ${this.label}
5760
5760
  </span>