@pontive/pontkit-core 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog.json +1 -1
- package/custom-elements.json +1 -1
- package/dist/index.js +274 -268
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +985 -982
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +2025 -477
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -486,21 +486,6 @@
|
|
|
486
486
|
<path d="m12 5 7 7-7 7"></path>
|
|
487
487
|
</svg>
|
|
488
488
|
`}function Ng(e){return l`
|
|
489
|
-
<svg
|
|
490
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
491
|
-
width="24"
|
|
492
|
-
height="24"
|
|
493
|
-
viewBox="0 0 24 24"
|
|
494
|
-
fill="none"
|
|
495
|
-
stroke="currentColor"
|
|
496
|
-
stroke-width="2"
|
|
497
|
-
stroke-linecap="round"
|
|
498
|
-
stroke-linejoin="round"
|
|
499
|
-
class=${m("lucide lucide-check-icon lucide-check","")}
|
|
500
|
-
>
|
|
501
|
-
<path d="M20 6 9 17l-5-5"/>
|
|
502
|
-
</svg>
|
|
503
|
-
`}function Mg(e){return l`
|
|
504
489
|
<svg
|
|
505
490
|
xmlns="http://www.w3.org/2000/svg"
|
|
506
491
|
width="24"
|
|
@@ -515,7 +500,7 @@
|
|
|
515
500
|
>
|
|
516
501
|
<path d="M5 12h14"/>
|
|
517
502
|
</svg>
|
|
518
|
-
`}function
|
|
503
|
+
`}function Mg(e){return l`
|
|
519
504
|
<svg
|
|
520
505
|
xmlns="http://www.w3.org/2000/svg"
|
|
521
506
|
width="24"
|
|
@@ -531,7 +516,7 @@
|
|
|
531
516
|
<path d="m21 21-4.34-4.34"/>
|
|
532
517
|
<circle cx="11" cy="11" r="8"/>
|
|
533
518
|
</svg>
|
|
534
|
-
`}function
|
|
519
|
+
`}function Bg(e){return l`
|
|
535
520
|
<svg
|
|
536
521
|
xmlns="http://www.w3.org/2000/svg"
|
|
537
522
|
width="24"
|
|
@@ -550,7 +535,7 @@
|
|
|
550
535
|
<path d="M12 8v4" />
|
|
551
536
|
<path d="M12 16h.01" />
|
|
552
537
|
</svg>
|
|
553
|
-
`}function
|
|
538
|
+
`}function Ug(){return U`
|
|
554
539
|
<svg
|
|
555
540
|
class="pont-shrink-0 pont-size-3.5 pont-text-primary"
|
|
556
541
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -570,11 +555,11 @@
|
|
|
570
555
|
<path d="M0.565616 3.3941L3.39404 0.565674L6.22247 3.3941" stroke="currentColor" stroke-width="0.8" stroke-linecap="square"/>
|
|
571
556
|
</svg>
|
|
572
557
|
|
|
573
|
-
`}function
|
|
558
|
+
`}function jg(){return U`
|
|
574
559
|
<svg width="7" height="4" viewBox="0 0 7 4" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
575
560
|
<path d="M0.565616 0.565674L3.39404 3.3941L6.22247 0.565674" stroke="currentColor" stroke-width="0.8" stroke-linecap="square"/>
|
|
576
561
|
</svg>
|
|
577
|
-
`}const Nt={root:["pont-relative pont-mx-carousel-space-mx pont-h-carousel-space-h pont-w-carousel-space-w"],viewport:["pont-w-carousel-viewport-space-w pont-h-carousel-viewport-space-h pont-overflow-hidden"],slidesWrapper:{base:["pont-flex pont-transition-transform pont-duration-carousel-motion-duration pont-ease-carousel-motion-fn"],orientation:{horizontal:["pont-flex-row"],vertical:["pont-flex-col"]}},slide:{base:["pont-min-w-0 pont-basis-full pont-h-carousel-slide-space-h pont-flex-shrink-0 pont-flex-grow-0 pont-transition-transform pont-duration-carousel-motion-duration pont-px-carousel-slide-space-px pont-py-carousel-slide-space-py"],size:{true:["lg:pont-basis-1/3 lg:pont-h-1/2 md:pont-basis-1/2 md:pont-h-1/2"],false:[""]}},controls:{base:["pont-absolute pont-z-10 pont-flex"],orientation:{horizontal:["pont-top-1/2 pont-left-carousel-control-horizontal-space-left pont-right-carousel-control-horizontal-space-right pont-justify-between"],vertical:["pont-w-carousel-control-vertical-space-w pont-h-carousel-control-vertical-space-h pont-top-0 pont-flex-col pont-justify-between pont-items-center"]}},controlButton:{base:["pont-bg-carousel-button-color-bg pont-text-carousel-button-color-text pont-border-none pont-px-carousel-button-space-px pont-py-carousel-button-space-py pont-cursor-pointer pont-z-10 pont-rounded-carousel-button-radius pont-w-carousel-button-space-w pont-h-carousel-button-space-h pont-flex pont-items-center pont-justify-center hover:pont-bg-carousel-button-color-bg-hover disabled:pont-opacity-carousel-button-opacity-disabled"],orientation:{verticalPrev:["pont-relative pont-top-carousel-button-vertical-prev-space-top pont-rotate-90"],verticalNext:["pont-relative pont-top-carousel-button-vertical-next-space-top pont-rotate-90"]}}};var
|
|
562
|
+
`}const Nt={root:["pont-relative pont-mx-carousel-space-mx pont-h-carousel-space-h pont-w-carousel-space-w"],viewport:["pont-w-carousel-viewport-space-w pont-h-carousel-viewport-space-h pont-overflow-hidden"],slidesWrapper:{base:["pont-flex pont-transition-transform pont-duration-carousel-motion-duration pont-ease-carousel-motion-fn"],orientation:{horizontal:["pont-flex-row"],vertical:["pont-flex-col"]}},slide:{base:["pont-min-w-0 pont-basis-full pont-h-carousel-slide-space-h pont-flex-shrink-0 pont-flex-grow-0 pont-transition-transform pont-duration-carousel-motion-duration pont-px-carousel-slide-space-px pont-py-carousel-slide-space-py"],size:{true:["lg:pont-basis-1/3 lg:pont-h-1/2 md:pont-basis-1/2 md:pont-h-1/2"],false:[""]}},controls:{base:["pont-absolute pont-z-10 pont-flex"],orientation:{horizontal:["pont-top-1/2 pont-left-carousel-control-horizontal-space-left pont-right-carousel-control-horizontal-space-right pont-justify-between"],vertical:["pont-w-carousel-control-vertical-space-w pont-h-carousel-control-vertical-space-h pont-top-0 pont-flex-col pont-justify-between pont-items-center"]}},controlButton:{base:["pont-bg-carousel-button-color-bg pont-text-carousel-button-color-text pont-border-none pont-px-carousel-button-space-px pont-py-carousel-button-space-py pont-cursor-pointer pont-z-10 pont-rounded-carousel-button-radius pont-w-carousel-button-space-w pont-h-carousel-button-space-h pont-flex pont-items-center pont-justify-center hover:pont-bg-carousel-button-color-bg-hover disabled:pont-opacity-carousel-button-opacity-disabled"],orientation:{verticalPrev:["pont-relative pont-top-carousel-button-vertical-prev-space-top pont-rotate-90"],verticalNext:["pont-relative pont-top-carousel-button-vertical-next-space-top pont-rotate-90"]}}};var qg=Object.defineProperty,zg=Object.getOwnPropertyDescriptor,Dn=(e,t,r,o)=>{for(var n=o>1?void 0:o?zg(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&&qg(t,r,n),n};let kr=class extends f{constructor(){super(...arguments),this.currentIndex=0,this.items=[],this.orientation="horizontal",this.size=!1,this.handleResize=()=>{this.updateSlides(),this.currentIndex=0,this.querySelectorAll(".slide").forEach(t=>{t.className=this.getSlideClasses()})}}createRenderRoot(){return this}firstUpdated(){this.restructureSlides()}restructureSlides(){const e=this.querySelector(".slides");if(e)for(let t=0;t<this.items.length;t++){const r=`slide-${t}`,o=this.querySelector(`[slot="${r}"]`);if(o&&o.parentElement!==e){const n=document.createElement("div");n.className=this.getSlideClasses(),e.appendChild(n),n.appendChild(o)}}}getSlideClasses(){return m(Nt.slide.base,this.size?Nt.slide.size.true:Nt.slide.size.false)}nextSlide(){this.currentIndex<this.items.length-1&&(this.currentIndex+=1,this.updateSlides())}prevSlide(){this.currentIndex>0&&(this.currentIndex-=1,this.updateSlides())}updateSlides(){let e;this.size?window.innerWidth>=1024?e=33.3333:window.innerWidth>=768?e=50:e=100:e=100;const t=this.orientation==="vertical"?100/this.items.length:100;this.slides&&(this.slides.style.transform=this.orientation==="horizontal"?`translateX(-${this.currentIndex*e}%)`:`translateY(-${this.currentIndex*t}%)`)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.handleResize)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.handleResize)}render(){const e=this.currentIndex===0,t=this.size?window.innerWidth>=1024?3:window.innerWidth>=768?2:1:1,r=this.currentIndex>=this.items.length-t,o=m(Nt.slidesWrapper.base,Nt.slidesWrapper.orientation[this.orientation]),n=m(Nt.controls.base,Nt.controls.orientation[this.orientation]),i=m(Nt.controlButton.base,this.orientation==="vertical"&&Nt.controlButton.orientation.verticalPrev),s=m(Nt.controlButton.base,this.orientation==="vertical"&&Nt.controlButton.orientation.verticalNext);return l`
|
|
578
563
|
<div
|
|
579
564
|
part="pont-carousel"
|
|
580
565
|
class="${m(Nt.root,this.className)}"
|
|
@@ -603,16 +588,30 @@
|
|
|
603
588
|
</div>
|
|
604
589
|
</div>
|
|
605
590
|
</div>
|
|
606
|
-
`}};Dn([a({type:Number})],kr.prototype,"currentIndex",2);Dn([a({type:Array})],kr.prototype,"items",2);Dn([a({type:String})],kr.prototype,"orientation",2);Dn([a({type:Boolean})],kr.prototype,"size",2);Dn([Po(".slides")],kr.prototype,"slides",2);kr=Dn([p("pont-carousel")],kr);var
|
|
591
|
+
`}};Dn([a({type:Number})],kr.prototype,"currentIndex",2);Dn([a({type:Array})],kr.prototype,"items",2);Dn([a({type:String})],kr.prototype,"orientation",2);Dn([a({type:Boolean})],kr.prototype,"size",2);Dn([Po(".slides")],kr.prototype,"slides",2);kr=Dn([p("pont-carousel")],kr);var Vg=Object.defineProperty,Hg=Object.getOwnPropertyDescriptor,Ie=(e,t,r,o)=>{for(var n=o>1?void 0:o?Hg(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&&Vg(t,r,n),n};let ne=class extends f{constructor(){super(...arguments),this.value="on"}createRenderRoot(){return this}_isControlled(){return this.checked!==void 0}_getState(){return this._checked?"checked":"unchecked"}updated(e){e.has("checked")&&this._isControlled()&&(this._checked=this.checked)}firstUpdated(e){this._checked=this.defaultChecked||this.checked}_handleClick(){if(this.disabled)return;const e=!this._checked;this._isControlled()||(this._checked=e),this.dispatchEvent(new CustomEvent("pont-checkbox:checked-change",{detail:{checked:e},bubbles:!0,composed:!0})),this.onCheckedChange!==void 0&&this.onCheckedChange(e)}_renderIndicator(){return this._checked?l`
|
|
607
592
|
<span
|
|
593
|
+
data-pont-checkbox-indicator
|
|
608
594
|
data-slot="checkbox-indicator"
|
|
609
595
|
data-state=${this._getState()}
|
|
610
596
|
?data-disabled=${this.disabled}
|
|
611
597
|
>
|
|
612
|
-
|
|
598
|
+
<svg
|
|
599
|
+
data-pont-checkbox-icon
|
|
600
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
601
|
+
viewBox="0 0 24 24"
|
|
602
|
+
fill="none"
|
|
603
|
+
stroke="currentColor"
|
|
604
|
+
stroke-width="2"
|
|
605
|
+
stroke-linecap="round"
|
|
606
|
+
stroke-linejoin="round"
|
|
607
|
+
class="lucide lucide-check-icon lucide-check"
|
|
608
|
+
>
|
|
609
|
+
<path d="M20 6 9 17l-5-5"/>
|
|
610
|
+
</svg>
|
|
613
611
|
</span>
|
|
614
612
|
`:null}_renderInput(){return this.name===void 0?null:l`
|
|
615
613
|
<input
|
|
614
|
+
data-pont-checkbox-input
|
|
616
615
|
data-slot="checkbox-input"
|
|
617
616
|
type="checkbox"
|
|
618
617
|
name=${this.name}
|
|
@@ -625,6 +624,7 @@
|
|
|
625
624
|
/>
|
|
626
625
|
`}render(){return l`
|
|
627
626
|
<button
|
|
627
|
+
data-pont-checkbox
|
|
628
628
|
data-slot="checkbox"
|
|
629
629
|
data-state=${this._getState()}
|
|
630
630
|
?data-disabled=${this.disabled}
|
|
@@ -641,26 +641,26 @@
|
|
|
641
641
|
</button>
|
|
642
642
|
|
|
643
643
|
${this._renderInput()}
|
|
644
|
-
`}};Ie([a({attribute:"default-checked",type:Boolean})],ne.prototype,"defaultChecked",2);Ie([a({attribute:!0,type:Boolean})],ne.prototype,"checked",2);Ie([a({attribute:!1,type:Function})],ne.prototype,"onCheckedChange",2);Ie([a({type:Boolean})],ne.prototype,"disabled",2);Ie([a({type:Boolean})],ne.prototype,"required",2);Ie([a({type:Boolean})],ne.prototype,"invalid",2);Ie([a({type:String})],ne.prototype,"name",2);Ie([a({type:String})],ne.prototype,"value",2);Ie([g()],ne.prototype,"_checked",2);ne=Ie([p("pont-checkbox")],ne);var
|
|
644
|
+
`}};Ie([a({attribute:"default-checked",type:Boolean})],ne.prototype,"defaultChecked",2);Ie([a({attribute:!0,type:Boolean})],ne.prototype,"checked",2);Ie([a({attribute:!1,type:Function})],ne.prototype,"onCheckedChange",2);Ie([a({type:Boolean})],ne.prototype,"disabled",2);Ie([a({type:Boolean})],ne.prototype,"required",2);Ie([a({type:Boolean})],ne.prototype,"invalid",2);Ie([a({type:String})],ne.prototype,"name",2);Ie([a({type:String})],ne.prototype,"value",2);Ie([g()],ne.prototype,"_checked",2);ne=Ie([p("pont-checkbox")],ne);var Gg=Object.getOwnPropertyDescriptor,Kg=(e,t,r,o)=>{for(var n=o>1?void 0:o?Gg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let fd=class extends y{getAttributesToExclude(){return[""]}get _containerElement(){return this.querySelector("div[part=collapsible-trigger]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}get _collapsible(){let e=this.parentElement;for(;e&&!(e instanceof si);)e=e.parentElement;return e}onTrigger(){const e=this._collapsible;e&&(e.open=!e.open,this.dispatchEvent(new CustomEvent("click-collapsible-event",{bubbles:!0,composed:!0})))}render(){const e=this.getFilteredAttributes();return l`
|
|
645
645
|
<div
|
|
646
646
|
@click=${this.onTrigger}
|
|
647
647
|
${Et(e)}
|
|
648
648
|
part="collapsible-trigger"
|
|
649
649
|
></div>
|
|
650
|
-
`}};fd=
|
|
650
|
+
`}};fd=Kg([p("pont-collapsible-trigger")],fd);var Wg=Object.getOwnPropertyDescriptor,Yg=(e,t,r,o)=>{for(var n=o>1?void 0:o?Wg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let vd=class extends y{constructor(){super(...arguments),this._toggleHandler=e=>{const t=e;requestAnimationFrame(()=>{const r=this._containerElement;r&&(r.style.display=t.detail.open?"block":"none")})}}get _containerElement(){return this.querySelector("div[part=collapsible-content]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}getAttributesToExclude(){return[""]}connectedCallback(){super.connectedCallback(),this.addEventListener("toggle-collapsible-content",this._toggleHandler)}disconnectedCallback(){this.removeEventListener("toggle-collapsible-content",this._toggleHandler),super.disconnectedCallback()}render(){const e=this.getFilteredAttributes();return l`
|
|
651
651
|
<div
|
|
652
652
|
${Et(e)}
|
|
653
653
|
class="${m("",this.className)}"
|
|
654
654
|
style="display: none;--radix-collapsible-content-height: 100px; --radix-collapsible-content-width: 350px;"
|
|
655
655
|
part="collapsible-content"
|
|
656
656
|
></div>
|
|
657
|
-
`}};vd=
|
|
657
|
+
`}};vd=Yg([p("pont-collapsible-content")],vd);var Qg=Object.defineProperty,Zg=Object.getOwnPropertyDescriptor,Vp=(e,t,r,o)=>{for(var n=o>1?void 0:o?Zg(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&&Qg(t,r,n),n};let si=class extends y{constructor(){super(...arguments),this.open=!1,this._clickHandler=()=>{var e;(e=this.querySelector("pont-collapsible-content"))==null||e.dispatchEvent(new CustomEvent("toggle-collapsible-content",{detail:{open:this.open}}))}}getAttributesToExclude(){return[""]}createRenderRoot(){return this}get _containerElement(){return this.querySelector("div[part=collapsible]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}connectedCallback(){super.connectedCallback(),this.addEventListener("click-collapsible-event",this._clickHandler)}disconnectedCallback(){this.removeEventListener("click-collapsible-event",this._clickHandler),super.disconnectedCallback()}render(){const e=this.getFilteredAttributes();return l`
|
|
658
658
|
<div
|
|
659
659
|
${Et(e)}
|
|
660
660
|
class="${m("",this.className)}"
|
|
661
661
|
part="collapsible"
|
|
662
662
|
></div>
|
|
663
|
-
`}};Vp([a({type:Boolean})],si.prototype,"open",2);si=Vp([p("pont-collapsible")],si);const Ln={empty:["pont-py-combo-box-empty-space-py","pont-text-center","pont-text-combo-box-empty-font"],group:{base:["pont-pointer-events-none","pont-invisible","pont-absolute","pont-z-50","pont-mt-combo-box-group-space-mt","pont-max-h-combo-box-group-space-max-h","pont-w-combo-box-group-space-w","pont-origin-top","pont-scale-y-0","pont-transform","pont-overflow-hidden","pont-overflow-y-auto","pont-rounded-combo-box-group-radius","pont-border-combo-box-group-width-border","pont-border-combo-box-group-color-border","pont-bg-combo-box-group-color-bg","pont-px-combo-box-group-space-px","pont-py-combo-box-group-space-py","pont-opacity-0","pont-shadow-combo-box-group-shadow","pont-transition-opacity","pont-duration-combo-box-group-motion-duration","pont-ease-combo-box-group-motion-fn","[&::-webkit-scrollbar]:pont-w-0"]},input:["pont-flex","pont-h-combo-box-input-space-h","pont-w-combo-box-input-space-w","pont-rounded-combo-box-input-radius","pont-border-0","pont-bg-combo-box-input-color-bg","pont-px-combo-box-input-space-px","pont-py-combo-box-input-space-py","pont-text-combo-box-input-font","pont-text-combo-box-input-color-text","pont-shadow-none","placeholder:pont-text-combo-box-input-color-text-placeholder","focus:pont-outline-none","focus-visible:pont-ring-0"],trigger:{base:["pont-z-20","pont-flex","pont-h-combo-box-trigger-space-h","pont-flex-row-reverse","pont-items-center","pont-justify-between","pont-rounded-combo-box-trigger-radius","pont-border-combo-box-trigger-width-border","pont-border-combo-box-trigger-color-border","pont-bg-combo-box-trigger-color-bg","pont-px-combo-box-trigger-space-px","pont-py-combo-box-trigger-space-py","pont-text-combo-box-trigger-font","focus:pont-outline-none","focus:pont-ring-combo-box-trigger-width-ring-focus","focus:pont-ring-combo-box-trigger-color-ring-focus","focus:pont-ring-offset-combo-box-trigger-width-ring-offset-focus","disabled:pont-cursor-not-allowed","disabled:pont-opacity-combo-box-trigger-opacity-disabled"]},value:["pont-line-clamp-1","pont-flex","pont-w-combo-box-value-space-w"],item:{base:["pont-flex","pont-w-combo-box-item-space-w","pont-cursor-pointer","pont-flex-row-reverse","pont-items-center","pont-justify-between","pont-rounded-combo-box-item-radius","pont-px-combo-box-item-space-px","pont-py-combo-box-item-space-py","hover:pont-bg-accent","focus:pont-bg-combo-box-item-color-bg-hover","focus:pont-outline-none"]}};var
|
|
663
|
+
`}};Vp([a({type:Boolean})],si.prototype,"open",2);si=Vp([p("pont-collapsible")],si);const Ln={empty:["pont-py-combo-box-empty-space-py","pont-text-center","pont-text-combo-box-empty-font"],group:{base:["pont-pointer-events-none","pont-invisible","pont-absolute","pont-z-50","pont-mt-combo-box-group-space-mt","pont-max-h-combo-box-group-space-max-h","pont-w-combo-box-group-space-w","pont-origin-top","pont-scale-y-0","pont-transform","pont-overflow-hidden","pont-overflow-y-auto","pont-rounded-combo-box-group-radius","pont-border-combo-box-group-width-border","pont-border-combo-box-group-color-border","pont-bg-combo-box-group-color-bg","pont-px-combo-box-group-space-px","pont-py-combo-box-group-space-py","pont-opacity-0","pont-shadow-combo-box-group-shadow","pont-transition-opacity","pont-duration-combo-box-group-motion-duration","pont-ease-combo-box-group-motion-fn","[&::-webkit-scrollbar]:pont-w-0"]},input:["pont-flex","pont-h-combo-box-input-space-h","pont-w-combo-box-input-space-w","pont-rounded-combo-box-input-radius","pont-border-0","pont-bg-combo-box-input-color-bg","pont-px-combo-box-input-space-px","pont-py-combo-box-input-space-py","pont-text-combo-box-input-font","pont-text-combo-box-input-color-text","pont-shadow-none","placeholder:pont-text-combo-box-input-color-text-placeholder","focus:pont-outline-none","focus-visible:pont-ring-0"],trigger:{base:["pont-z-20","pont-flex","pont-h-combo-box-trigger-space-h","pont-flex-row-reverse","pont-items-center","pont-justify-between","pont-rounded-combo-box-trigger-radius","pont-border-combo-box-trigger-width-border","pont-border-combo-box-trigger-color-border","pont-bg-combo-box-trigger-color-bg","pont-px-combo-box-trigger-space-px","pont-py-combo-box-trigger-space-py","pont-text-combo-box-trigger-font","focus:pont-outline-none","focus:pont-ring-combo-box-trigger-width-ring-focus","focus:pont-ring-combo-box-trigger-color-ring-focus","focus:pont-ring-offset-combo-box-trigger-width-ring-offset-focus","disabled:pont-cursor-not-allowed","disabled:pont-opacity-combo-box-trigger-opacity-disabled"]},value:["pont-line-clamp-1","pont-flex","pont-w-combo-box-value-space-w"],item:{base:["pont-flex","pont-w-combo-box-item-space-w","pont-cursor-pointer","pont-flex-row-reverse","pont-items-center","pont-justify-between","pont-rounded-combo-box-item-radius","pont-px-combo-box-item-space-px","pont-py-combo-box-item-space-py","hover:pont-bg-accent","focus:pont-bg-combo-box-item-color-bg-hover","focus:pont-outline-none"]}};var Jg=Object.defineProperty,Xg=Object.getOwnPropertyDescriptor,Hp=(e,t,r,o)=>{for(var n=o>1?void 0:o?Xg(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&&Jg(t,r,n),n};let Zs=class extends y{constructor(){super(...arguments),this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("pont-combo-box")].forEach(t=>{var r;t.uuid!==((r=this._comboBox)==null?void 0:r.uuid)&&(t.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)}}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof Dt);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this.buttonElement),this.addEventListener("click",t=>{t.stopPropagation()})}render(){return l`
|
|
664
664
|
<button
|
|
665
665
|
type="button"
|
|
666
666
|
part="combo-box-trigger-button"
|
|
@@ -673,21 +673,21 @@
|
|
|
673
673
|
>
|
|
674
674
|
${Lg()}
|
|
675
675
|
</button>
|
|
676
|
-
`}};Hp([Po("button")],Zs.prototype,"buttonElement",2);Zs=Hp([p("pont-combo-box-trigger")],Zs);var
|
|
676
|
+
`}};Hp([Po("button")],Zs.prototype,"buttonElement",2);Zs=Hp([p("pont-combo-box-trigger")],Zs);var tf=Object.defineProperty,ef=Object.getOwnPropertyDescriptor,Gp=(e,t,r,o)=>{for(var n=o>1?void 0:o?ef(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&&tf(t,r,n),n};let Js=class extends f{constructor(){super(...arguments),this.placeholder="select a value",this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("pont-combo-box")].forEach(t=>{var r;t.uuid!==((r=this._comboBox)==null?void 0:r.uuid)&&(t.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)},this.renderLabel=()=>this._comboBox&&this._comboBox.selectedValue.length>0?this._comboBox.selectedValue:this.placeholder}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof Dt);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",()=>{this.requestUpdate()})}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",t=>{t.stopPropagation()})}createRenderRoot(){return this}render(){return l`
|
|
677
677
|
<span
|
|
678
678
|
part="combo-box-value"
|
|
679
679
|
class="${m(Ln.value,this.className)}"
|
|
680
680
|
@click=${this.handleClick}
|
|
681
681
|
>${this.renderLabel()}</span
|
|
682
682
|
>
|
|
683
|
-
`}};Gp([a({type:String})],Js.prototype,"placeholder",2);Js=Gp([p("pont-combo-box-value")],Js);var
|
|
683
|
+
`}};Gp([a({type:String})],Js.prototype,"placeholder",2);Js=Gp([p("pont-combo-box-value")],Js);var rf=Object.defineProperty,nf=Object.getOwnPropertyDescriptor,Ya=(e,t,r,o)=>{for(var n=o>1?void 0:o?nf(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&&rf(t,r,n),n};let ai=class extends f{constructor(){super(...arguments),this.orientation="horizontal"}createRenderRoot(){return this}render(){return l`
|
|
684
684
|
<div
|
|
685
685
|
data-slot="separator"
|
|
686
686
|
data-orientation=${this.orientation}
|
|
687
687
|
role=${this.decorative?"none":"separator"}
|
|
688
688
|
aria-orientation=${this.decorative?h:this.orientation}
|
|
689
689
|
></div>
|
|
690
|
-
`}};Ya([a({type:String})],ai.prototype,"orientation",2);Ya([a({type:Boolean})],ai.prototype,"decorative",2);ai=Ya([p("pont-separator")],ai);var
|
|
690
|
+
`}};Ya([a({type:String})],ai.prototype,"orientation",2);Ya([a({type:Boolean})],ai.prototype,"decorative",2);ai=Ya([p("pont-separator")],ai);var of=Object.defineProperty,sf=Object.getOwnPropertyDescriptor,So=(e,t,r,o)=>{for(var n=o>1?void 0:o?sf(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&&of(t,r,n),n};let Nr=class extends y{constructor(){super(...arguments),this.searchKey="",this.focusedIndex=0,this.selectedValue="",this.isOpen=!1,this.handleItemClicked=()=>{this.requestUpdate()},this.handleTriggerComboBox=e=>{var t,r;e.detail.isOpen!==((t=this._comboBox)==null?void 0:t.isOpen)&&this.requestUpdate(),e.detail.isOpen&&((r=this._comboBox)!=null&&r.selectedValue)&&(this.focusedIndex=this.comboBoxItems.findIndex(o=>{var n;return o.getAttribute("value")===((n=this._comboBox)==null?void 0:n.selectedValue)}),this.requestUpdate())},this.handleKeyDown=e=>{var r;if(!((r=this._comboBox)!=null&&r.isOpen))return;e.preventDefault();const t=this.filteredItems;switch(e.key){case"ArrowDown":if(t.length===0)return;this.focusedIndex=(this.focusedIndex+1)%t.length;break;case"ArrowUp":if(t.length===0)return;this.focusedIndex=(this.focusedIndex-1+t.length)%t.length;break;case"Enter":if(this.focusedIndex>=0&&this.focusedIndex<t.length){const o=t[this.focusedIndex].getAttribute("value");this.dispatchEvent(new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:o}}))}break}},this.handleMouseOver=(e,t)=>{e.preventDefault(),this.focusedIndex=t},this.onSelectedValue=(e,t)=>{this.focusedIndex=t,this.selectedValue=e},this.boundHandleComboBoxStateChanged=this.handleComboBoxStateChanged.bind(this),this.boundHandleKeyDown=this.handleKeyDown.bind(this)}get comboBoxItems(){return Array.from(this.querySelectorAll('[data-managed="true"][tag="pont-combo-box-item"], pont-combo-box-item')).filter(e=>e.hasAttribute("value"))}get comboBoxInput(){return this.querySelector("pont-combo-box-input")}get comboBoxEmpty(){return this.querySelector("pont-combo-box-empty")}get hasResults(){return!this.filteredItems.length}get filteredItems(){var t;const e=(t=this.searchKey)==null?void 0:t.toLowerCase();return this.comboBoxItems.filter(r=>{var o;return(o=r.getAttribute("value"))==null?void 0:o.toLowerCase().includes(e)})}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof Dt);)e=e.parentElement;return e}handleComboBoxStateChanged(e){var n;const{isOpen:t,targetComboBoxId:r}=e.detail;if(this.isOpen=t,r!==((n=this._comboBox)==null?void 0:n.uuid))return;const o=this.renderRoot.querySelector('[part="select-group"]');o&&(t?(clearTimeout(o._hideTimeout),o.classList.remove("pont-scale-y-0","pont-opacity-0"),o.classList.add("pont-scale-y-100","pont-opacity-100"),o.classList.remove("pont-invisible","pont-pointer-events-none"),o.classList.add("pont-visible","pont-pointer-events-auto")):(o.classList.remove("pont-opacity-100"),o.classList.add("pont-opacity-0"),o._hideTimeout=setTimeout(()=>{o.classList.remove("pont-visible","pont-pointer-events-auto","pont-scale-y-100"),o.classList.add("pont-invisible","pont-pointer-events-none","pont-scale-y-0")},300)))}moveChildren(){const e=this.renderRoot.querySelector('[part="select-group"]');if(!e)return;const t={top:e.querySelector("#topSlot"),empty:e.querySelector("#emptySlot"),list:e.querySelector("#listSlot")},r={"pont-combo-box-input":"top","pont-combo-box-empty":"empty","pont-combo-box-item":"list"};Array.from(this.children).forEach(o=>{var s;const n=o.tagName.toLowerCase(),i=r[n];i&&(o.setAttribute("data-managed","true"),(s=t[i])==null||s.appendChild(o))})}renderFilteredItems(){return this.comboBoxItems.forEach(e=>e.setAttribute("hidden","true")),this.filteredItems.map((e,t)=>{var i;const r=e.getAttribute("value")??"",o=t===this.focusedIndex,n=r.toLowerCase()===((i=this._comboBox)==null?void 0:i.selectedValue.toLowerCase());return l`
|
|
691
691
|
<pont-combo-box-item
|
|
692
692
|
@mouseover="${s=>this.handleMouseOver(s,t)}"
|
|
693
693
|
.value=${r}
|
|
@@ -714,7 +714,7 @@
|
|
|
714
714
|
${this.renderFilteredItems()}
|
|
715
715
|
</div>
|
|
716
716
|
</div>
|
|
717
|
-
`}};So([g()],Nr.prototype,"searchKey",2);So([g()],Nr.prototype,"focusedIndex",2);So([g()],Nr.prototype,"selectedValue",2);So([g()],Nr.prototype,"isOpen",2);Nr=So([p("pont-combo-box-group")],Nr);var
|
|
717
|
+
`}};So([g()],Nr.prototype,"searchKey",2);So([g()],Nr.prototype,"focusedIndex",2);So([g()],Nr.prototype,"selectedValue",2);So([g()],Nr.prototype,"isOpen",2);Nr=So([p("pont-combo-box-group")],Nr);var af=Object.defineProperty,lf=Object.getOwnPropertyDescriptor,ae=(e,t,r,o)=>{for(var n=o>1?void 0:o?lf(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&&af(t,r,n),n};let Vt=class extends y{constructor(){super(...arguments),this.value="",this.key="",this.tabindex=0,this.isSelected=!1,this.isFocus=!1,this.class="",this.selectItemIndex=-1,this.onSelect=(e,t)=>{},this.onMouseOver=(e,t)=>{},this.handleClick=e=>{this.onSelect(this.value,this.selectItemIndex),e.stopPropagation();const t=new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:this.value}});this.dispatchEvent(t)}}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(e){this.moveLightDomChildrenInto(this.itemDivContainer)}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return l`
|
|
718
718
|
<div
|
|
719
719
|
${Et(e)}
|
|
720
720
|
@click=${this.handleClick}
|
|
@@ -727,12 +727,12 @@
|
|
|
727
727
|
<span
|
|
728
728
|
class="${this.isSelected?"pont-visible":"pont-invisible"} data-hs-combo-box-value pont-mr-2"
|
|
729
729
|
>
|
|
730
|
-
${
|
|
730
|
+
${Ug()}
|
|
731
731
|
</span>
|
|
732
732
|
</div>
|
|
733
|
-
`}};ae([a({type:String})],Vt.prototype,"value",2);ae([a({type:String})],Vt.prototype,"key",2);ae([a({type:Number})],Vt.prototype,"tabindex",2);ae([a({type:Boolean})],Vt.prototype,"isSelected",2);ae([a({type:Boolean})],Vt.prototype,"isFocus",2);ae([a({type:String})],Vt.prototype,"class",2);ae([a({type:Number})],Vt.prototype,"selectItemIndex",2);ae([a({type:Function})],Vt.prototype,"onSelect",2);ae([a({type:Function})],Vt.prototype,"onMouseOver",2);ae([Po("#pont-combo-box-item")],Vt.prototype,"itemDivContainer",2);Vt=ae([p("pont-combo-box-item")],Vt);var
|
|
733
|
+
`}};ae([a({type:String})],Vt.prototype,"value",2);ae([a({type:String})],Vt.prototype,"key",2);ae([a({type:Number})],Vt.prototype,"tabindex",2);ae([a({type:Boolean})],Vt.prototype,"isSelected",2);ae([a({type:Boolean})],Vt.prototype,"isFocus",2);ae([a({type:String})],Vt.prototype,"class",2);ae([a({type:Number})],Vt.prototype,"selectItemIndex",2);ae([a({type:Function})],Vt.prototype,"onSelect",2);ae([a({type:Function})],Vt.prototype,"onMouseOver",2);ae([Po("#pont-combo-box-item")],Vt.prototype,"itemDivContainer",2);Vt=ae([p("pont-combo-box-item")],Vt);var df=Object.defineProperty,cf=Object.getOwnPropertyDescriptor,Qa=(e,t,r,o)=>{for(var n=o>1?void 0:o?cf(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&&df(t,r,n),n};let li=class extends f{constructor(){super(...arguments),this.placeholder="Search Item ...",this.searchValue=""}get _comboBoxGroup(){let e=this.parentElement;for(;e&&!(e instanceof Nr);)e=e.parentElement;return e}handleSearch(e){e.stopPropagation();const t=e.target;this.searchValue=t.value,this._comboBoxGroup&&(this._comboBoxGroup.searchKey=this.searchValue)}handleKeyDown(e){e.stopPropagation()}createRenderRoot(){return this}render(){return l`
|
|
734
734
|
<div class="pont-flex pont-items-center pont-px-2">
|
|
735
|
-
${
|
|
735
|
+
${Mg()}
|
|
736
736
|
<input
|
|
737
737
|
part="combo-box-input"
|
|
738
738
|
type="text"
|
|
@@ -748,21 +748,21 @@
|
|
|
748
748
|
@keydown="${this.handleKeyDown}"
|
|
749
749
|
/>
|
|
750
750
|
</div>
|
|
751
|
-
`}};Qa([a({type:String})],li.prototype,"placeholder",2);Qa([g()],li.prototype,"searchValue",2);li=Qa([p("pont-combo-box-input")],li);var
|
|
751
|
+
`}};Qa([a({type:String})],li.prototype,"placeholder",2);Qa([g()],li.prototype,"searchValue",2);li=Qa([p("pont-combo-box-input")],li);var pf=Object.getOwnPropertyDescriptor,hf=(e,t,r,o)=>{for(var n=o>1?void 0:o?pf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let bd=class extends y{createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.removeDuplicateContent()}render(){return l`
|
|
752
752
|
<div
|
|
753
753
|
class="${m(Ln.empty,this.className)}"
|
|
754
754
|
role="presentation"
|
|
755
755
|
>
|
|
756
756
|
${Array.from(this.childNodes)[0].textContent}
|
|
757
757
|
</div>
|
|
758
|
-
`}};bd=
|
|
758
|
+
`}};bd=hf([p("pont-combo-box-empty")],bd);var uf=Object.defineProperty,mf=Object.getOwnPropertyDescriptor,Ae=(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 Dt=class extends y{constructor(){super(),this.isOpen=!1,this.selectedValue="",this.searchTerm="",this.focusedIndex=-1,this.filteredItems=[],this.uuid=qa(),this.label="Select an item",this.items=[],this.handleClickOutside=e=>{var o;const t=(o=this.renderRoot)==null?void 0:o.querySelector("[data-combo-box-uuid]"),r=e.target;if(!r.tagName.includes("RTG-COMBO")&&!(r.shadowRoot&&r.shadowRoot.innerHTML.includes(t==null?void 0:t.innerHTML))){if(this.isOpen&&!t||!(t!=null&&t.contains(r)))this.isOpen=!1;else if(!(r==null?void 0:r.firstElementChild))return}}}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",e=>{this.isOpen&&(this.selectedValue=e.detail.selectedItem,this.isOpen=!1,this.requestUpdate())})}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this.parentDiveElement),this.items&&this.items.length>0&&(this.filteredItems=this.items.filter(t=>t.toLowerCase().includes(this.searchTerm)))}updated(e){super.updated(e),e.has("isOpen")&&(this.dispatchEvent(new CustomEvent("pont-combo-box-state-changed",{detail:{isOpen:this.isOpen,targetComboBoxId:this.uuid},bubbles:!0,composed:!0})),this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}selectItem(e){const t=e.target;if(t instanceof HTMLElement){const r=t.closest("pont-combo-box-item");r?(this.selectedValue=r.getAttribute("data-hs-combo-box-value")||"",this.isOpen=!1):console.log("No valid pont-combo-box-item found")}else console.log("Event target is not an HTMLElement")}render(){return l`
|
|
759
759
|
<div
|
|
760
760
|
class="${m("pont-relative",this.className)}"
|
|
761
761
|
data-hs-combo-box=""
|
|
762
762
|
data-combo-box-uuid=${this.uuid}
|
|
763
763
|
part="combo-box"
|
|
764
764
|
></div>
|
|
765
|
-
`}};Ae([a({type:Boolean})],Dt.prototype,"isOpen",2);Ae([g()],Dt.prototype,"selectedValue",2);Ae([g()],Dt.prototype,"searchTerm",2);Ae([g()],Dt.prototype,"focusedIndex",2);Ae([g()],Dt.prototype,"filteredItems",2);Ae([g()],Dt.prototype,"uuid",2);Ae([a({type:String})],Dt.prototype,"label",2);Ae([a({type:Array})],Dt.prototype,"items",2);Ae([Po('[part="combo-box"]')],Dt.prototype,"parentDiveElement",2);Dt=Ae([p("pont-combo-box")],Dt);const $e={root:["pont-flex pont-overflow-hidden","pont-flex-col","pont-w-command-space-w pont-h-command-space-h","pont-text-command-color-text","pont-bg-command-color-bg","pont-rounded-command-radius"],input:{wrapper:["pont-flex","pont-gap-command-input-wrapper-space-gap pont-items-center","pont-px-command-input-wrapper-space-px","pont-h-command-input-wrapper-space-h","pont-border-b-command-input-wrapper-width-border pont-border-b-command-input-wrapper-color-border"],icon:["pont-shrink-0","pont-size-command-input-icon-space-size","pont-opacity-command-input-icon-opacity"],input:["pont-flex","pont-py-command-input-space-py","pont-w-command-input-space-w pont-h-command-input-space-h","pont-text-command-input-font","pont-bg-command-input-color-bg","pont-rounded-command-input-radius pont-outline-hidden","focus:pont-outline-none","disabled:pont-opacity-command-input-opacity-disabled disabled:pont-cursor-not-allowed","placeholder:pont-text-command-input-placeholder-color-text"]},list:["pont-overflow-x-hidden pont-overflow-y-auto","pont-max-h-command-list-space-max-h","pont-scroll-py-1"],empty:["pont-py-command-empty-space-py","pont-text-command-empty-font pont-text-center"],group:["pont-overflow-hidden","pont-p-command-group-space-p","pont-text-command-group-color-text"],heading:["pont-px-command-heading-space-px pont-py-command-heading-space-py","pont-text-command-heading-font pont-font-command-heading-font-weight pont-text-command-heading-color-text"],separator:["pont-command-separator-space-mx","pont-h-command-separator-space-h","pont-bg-command-separator-color-bg"],item:["pont-flex pont-relative","pont-gap-command-item-space-gap pont-items-center","pont-px-command-item-space-px pont-py-command-item-space-py","pont-text-command-item-font","pont-rounded-command-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","hover:pont-text-command-item-color-text-hover hover:pont-bg-command-item-color-bg-hover","aria-selected:pont-text-command-item-color-text-selected aria-selected:pont-bg-command-item-color-bg-selected",'data-[disabled="true"]:pont-opacity-command-item-opacity-disabled data-[disabled="true"]:pont-pointer-events-none','[&_svg]:pont-shrink-0 [&_svg:not([class*="pont-size-"])]:pont-size-command-item-icon-space-size [&_svg:not([class*="pont-text-"])]:pont-text-command-item-icon-color-text [&_svg]:pont-pointer-events-none']};var
|
|
765
|
+
`}};Ae([a({type:Boolean})],Dt.prototype,"isOpen",2);Ae([g()],Dt.prototype,"selectedValue",2);Ae([g()],Dt.prototype,"searchTerm",2);Ae([g()],Dt.prototype,"focusedIndex",2);Ae([g()],Dt.prototype,"filteredItems",2);Ae([g()],Dt.prototype,"uuid",2);Ae([a({type:String})],Dt.prototype,"label",2);Ae([a({type:Array})],Dt.prototype,"items",2);Ae([Po('[part="combo-box"]')],Dt.prototype,"parentDiveElement",2);Dt=Ae([p("pont-combo-box")],Dt);const $e={root:["pont-flex pont-overflow-hidden","pont-flex-col","pont-w-command-space-w pont-h-command-space-h","pont-text-command-color-text","pont-bg-command-color-bg","pont-rounded-command-radius"],input:{wrapper:["pont-flex","pont-gap-command-input-wrapper-space-gap pont-items-center","pont-px-command-input-wrapper-space-px","pont-h-command-input-wrapper-space-h","pont-border-b-command-input-wrapper-width-border pont-border-b-command-input-wrapper-color-border"],icon:["pont-shrink-0","pont-size-command-input-icon-space-size","pont-opacity-command-input-icon-opacity"],input:["pont-flex","pont-py-command-input-space-py","pont-w-command-input-space-w pont-h-command-input-space-h","pont-text-command-input-font","pont-bg-command-input-color-bg","pont-rounded-command-input-radius pont-outline-hidden","focus:pont-outline-none","disabled:pont-opacity-command-input-opacity-disabled disabled:pont-cursor-not-allowed","placeholder:pont-text-command-input-placeholder-color-text"]},list:["pont-overflow-x-hidden pont-overflow-y-auto","pont-max-h-command-list-space-max-h","pont-scroll-py-1"],empty:["pont-py-command-empty-space-py","pont-text-command-empty-font pont-text-center"],group:["pont-overflow-hidden","pont-p-command-group-space-p","pont-text-command-group-color-text"],heading:["pont-px-command-heading-space-px pont-py-command-heading-space-py","pont-text-command-heading-font pont-font-command-heading-font-weight pont-text-command-heading-color-text"],separator:["pont-command-separator-space-mx","pont-h-command-separator-space-h","pont-bg-command-separator-color-bg"],item:["pont-flex pont-relative","pont-gap-command-item-space-gap pont-items-center","pont-px-command-item-space-px pont-py-command-item-space-py","pont-text-command-item-font","pont-rounded-command-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","hover:pont-text-command-item-color-text-hover hover:pont-bg-command-item-color-bg-hover","aria-selected:pont-text-command-item-color-text-selected aria-selected:pont-bg-command-item-color-bg-selected",'data-[disabled="true"]:pont-opacity-command-item-opacity-disabled data-[disabled="true"]:pont-pointer-events-none','[&_svg]:pont-shrink-0 [&_svg:not([class*="pont-size-"])]:pont-size-command-item-icon-space-size [&_svg:not([class*="pont-text-"])]:pont-text-command-item-icon-color-text [&_svg]:pont-pointer-events-none']};var gf=Object.defineProperty,ff=Object.getOwnPropertyDescriptor,Za=(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 Mr=class extends y{constructor(){super(...arguments),this._id="",this._hidden="true"}get containerElement(){return this.querySelector(`#${this.identifier}`)}get identifier(){if(this._id!=="")return this._id;const e=this.parentElement;return e?this._id=`${e.getAttribute("id")}e${Mr._counter++}`:this._id=`rtgcmdrxlxe${Mr._counter++}`,this._id}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this.containerElement)}render(){return l`
|
|
766
766
|
<div
|
|
767
767
|
rtgcmd-empty
|
|
768
768
|
id="${this.identifier}"
|
|
@@ -770,7 +770,7 @@
|
|
|
770
770
|
role="presentation"
|
|
771
771
|
class=${m($e.empty,this._hidden==="true"&&"pont-hidden",this.className)}
|
|
772
772
|
></div>
|
|
773
|
-
`}};Mr._counter=0;Za([a({type:String})],Mr.prototype,"_id",2);Za([a({attribute:"aria-hidden",type:String})],Mr.prototype,"_hidden",2);Mr=Za([p("pont-command-empty")],Mr);var
|
|
773
|
+
`}};Mr._counter=0;Za([a({type:String})],Mr.prototype,"_id",2);Za([a({attribute:"aria-hidden",type:String})],Mr.prototype,"_hidden",2);Mr=Za([p("pont-command-empty")],Mr);var vf=Object.defineProperty,bf=Object.getOwnPropertyDescriptor,Fi=(e,t,r,o)=>{for(var n=o>1?void 0:o?bf(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&&vf(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`
|
|
774
774
|
<div
|
|
775
775
|
rtgcmd-group
|
|
776
776
|
id="${this.identifier}"
|
|
@@ -793,7 +793,7 @@
|
|
|
793
793
|
aria-labelledby="${this.identifier}h"
|
|
794
794
|
></div>
|
|
795
795
|
</div>
|
|
796
|
-
`}};ur._counter=0;Fi([a({type:String})],ur.prototype,"heading",2);Fi([a({attribute:"id",type:String})],ur.prototype,"_id",2);Fi([a({attribute:"aria-hidden",type:String})],ur.prototype,"_hidden",2);ur=Fi([p("pont-command-group")],ur);var
|
|
796
|
+
`}};ur._counter=0;Fi([a({type:String})],ur.prototype,"heading",2);Fi([a({attribute:"id",type:String})],ur.prototype,"_id",2);Fi([a({attribute:"aria-hidden",type:String})],ur.prototype,"_hidden",2);ur=Fi([p("pont-command-group")],ur);var yf=Object.defineProperty,_f=Object.getOwnPropertyDescriptor,Ja=(e,t,r,o)=>{for(var n=o>1?void 0:o?_f(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&&yf(t,r,n),n};let di=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,u;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||((u=d.nextElementSibling)==null?void 0:u.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`
|
|
797
797
|
<div
|
|
798
798
|
part="command-input"
|
|
799
799
|
class=${m($e.input.wrapper,this.className)}
|
|
@@ -834,7 +834,7 @@
|
|
|
834
834
|
class=${m($e.input.input)}
|
|
835
835
|
/>
|
|
836
836
|
</div>
|
|
837
|
-
`}};Ja([a({type:String})],di.prototype,"placeholder",2);Ja([a({attribute:"value",type:String})],di.prototype,"_value",2);di=Ja([p("pont-command-input")],di);var
|
|
837
|
+
`}};Ja([a({type:String})],di.prototype,"placeholder",2);Ja([a({attribute:"value",type:String})],di.prototype,"_value",2);di=Ja([p("pont-command-input")],di);var wf=Object.defineProperty,$f=Object.getOwnPropertyDescriptor,Fn=(e,t,r,o)=>{for(var n=o>1?void 0:o?$f(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&&wf(t,r,n),n};let Ee=class extends y{constructor(){super(...arguments),this.selected=!1,this._id="",this._hidden="false",this.onSelect=()=>{},this.disabled="false"}get containerElement(){return this.querySelector(`#${this.identifier}`)}get identifier(){if(this._id!=="")return this._id;const e=this.parentElement;return e?this._id=`${e.getAttribute("id")}li${Ee._counter++}`:this._id=`rtgcmdrxgxli${Ee._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)}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.moveLightDomChildrenInto(this.containerElement)}updated(e){}render(){return l`
|
|
838
838
|
<div
|
|
839
839
|
rtgcmd-item
|
|
840
840
|
id="${this.identifier}"
|
|
@@ -851,7 +851,7 @@
|
|
|
851
851
|
@click="${this.onSelect}"
|
|
852
852
|
class=${m($e.item,this._hidden==="true"&&"pont-hidden",this.className)}
|
|
853
853
|
></div>
|
|
854
|
-
`}};Ee._counter=0;Fn([a({type:String})],Ee.prototype,"_id",2);Fn([a({attribute:"aria-hidden",type:String})],Ee.prototype,"_hidden",2);Fn([a({type:Function})],Ee.prototype,"onSelect",2);Fn([a({attribute:"data-value",type:String}),a({type:Boolean})],Ee.prototype,"containerElement",1);Fn([a({attribute:"data-disabled",type:String})],Ee.prototype,"disabled",2);Ee=Fn([p("pont-command-item")],Ee);var
|
|
854
|
+
`}};Ee._counter=0;Fn([a({type:String})],Ee.prototype,"_id",2);Fn([a({attribute:"aria-hidden",type:String})],Ee.prototype,"_hidden",2);Fn([a({type:Function})],Ee.prototype,"onSelect",2);Fn([a({attribute:"data-value",type:String}),a({type:Boolean})],Ee.prototype,"containerElement",1);Fn([a({attribute:"data-disabled",type:String})],Ee.prototype,"disabled",2);Ee=Fn([p("pont-command-item")],Ee);var Pf=Object.getOwnPropertyDescriptor,Cf=(e,t,r,o)=>{for(var n=o>1?void 0:o?Pf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let yd=class extends y{get identifier(){const e=this.parentElement;return e?`${e.getAttribute("id")}l`:"rtgcmdrxl"}get containerElement(){return this.querySelector("div[rtgcmd-list]")}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.moveLightDomChildrenInto(this.containerElement)}render(){return l`
|
|
855
855
|
<div
|
|
856
856
|
rtgcmd-list
|
|
857
857
|
id="${this.identifier}"
|
|
@@ -861,7 +861,7 @@
|
|
|
861
861
|
>
|
|
862
862
|
<div></div>
|
|
863
863
|
</div>
|
|
864
|
-
`}};yd=
|
|
864
|
+
`}};yd=Cf([p("pont-command-list")],yd);var Ef=Object.defineProperty,Sf=Object.getOwnPropertyDescriptor,Xa=(e,t,r,o)=>{for(var n=o>1?void 0:o?Sf(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&&Ef(t,r,n),n};let Br=class extends f{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){if(this._id!=="")return this._id;const e=this.parentElement;return e?this._id=`${e.getAttribute("id")}s${Br._counter++}`:this._id=`rtgcmdrxlxs${Br._counter++}`,this._id}createRenderRoot(){return this}render(){return l`${this._hidden==="true"?h:l`
|
|
865
865
|
<div
|
|
866
866
|
rtgcmd-separator
|
|
867
867
|
id="${this.identifier}"
|
|
@@ -869,7 +869,7 @@
|
|
|
869
869
|
role="separator"
|
|
870
870
|
class=${m($e.separator,this.className)}
|
|
871
871
|
></div>
|
|
872
|
-
`}`}};Br._counter=0;Xa([a({type:String})],Br.prototype,"_id",2);Xa([a({attribute:"aria-hidden",type:String})],Br.prototype,"_hidden",2);Br=Xa([p("pont-command-separator")],Br);var
|
|
872
|
+
`}`}};Br._counter=0;Xa([a({type:String})],Br.prototype,"_id",2);Xa([a({attribute:"aria-hidden",type:String})],Br.prototype,"_hidden",2);Br=Xa([p("pont-command-separator")],Br);var xf=Object.getOwnPropertyDescriptor,Of=(e,t,r,o)=>{for(var n=o>1?void 0:o?xf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let _d=class extends y{get containerElement(){return this.querySelector("div[rtgcmd-root]")}getAttributesToExclude(){return[]}getAttributesToRemoveFromParent(){return["class","style"]}createRenderRoot(){return this}firstUpdated(e){this.removeParentAttributes(),this.moveLightDomChildrenInto(this.containerElement),this.containerElement&&this.observeStyleAndClassSync(this.containerElement)}render(){const e=this.customClass||"",t=this.customStyle||"";return l`
|
|
873
873
|
<div
|
|
874
874
|
part="command"
|
|
875
875
|
class="${m($e.root,e)}"
|
|
@@ -877,7 +877,7 @@
|
|
|
877
877
|
id="rtgcmdr1"
|
|
878
878
|
rtgcmd-root
|
|
879
879
|
></div>
|
|
880
|
-
`}};_d=
|
|
880
|
+
`}};_d=Of([p("pont-command")],_d);const At={root:[""],content:["pont-overflow-x-hidden pont-overflow-y-auto pont-z-50","pont-p-context-menu-content-space-p","pont-min-w-context-menu-content-space-min-w","pont-text-context-menu-content-color-text","pont-bg-context-menu-content-color-bg","pont-rounded-context-menu-content-radius pont-border-context-menu-content-width-border pont-border-context-menu-content-color-border","pont-shadow-context-menu-content-shadow","pont-translate-y-0.5","pont-slide-in-from-top-2","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"],group:[""],item:["pont-flex pont-relative","pont-gap-context-menu-item-space-gap pont-items-center","pont-px-context-menu-item-space-px pont-py-context-menu-item-space-py","pont-text-context-menu-item-font","pont-rounded-context-menu-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","hover:pont-bg-context-menu-item-color-bg-hover hover:pont-text-context-menu-item-color-text-hover","focus:pont-bg-context-menu-item-color-bg-focus focus:pont-text-context-menu-item-color-text-focus","data-[disabled]:pont-opacity-context-menu-item-opacity-disabled data-[disabled]:pont-pointer-events-none",'[&_svg]:pont-shrink-0 [&_svg:not([class*="pont-size-"])]:pont-size-context-menu-item-icon-space-size [&_svg:not([class*="pont-text-"])]:pont-text-context-menu-item-icon-color-text [&_svg]:pont-pointer-events-none'],checkboxItem:{base:["pont-flex pont-relative","pont-gap-context-menu-checkbox-item-space-gap pont-items-center","pont-pl-context-menu-checkbox-item-space-pl pont-pr-context-menu-checkbox-item-space-pr pont-py-context-menu-checkbox-item-space-py","pont-text-context-menu-checkbox-item-font","pont-rounded-context-menu-checkbox-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","aria-selected:pont-bg-context-menu-checkbox-item-color-bg-focus aria-selected:pont-text-context-menu-checkbox-item-color-text-focus","data-[disabled]:pont-opacity-context-menu-checkbox-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],span:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-context-menu-checkbox-item-icon-container-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-context-menu-checkbox-item-icon-space-size","pont-pointer-events-none"]},radioItem:{base:["pont-flex pont-relative","pont-gap-context-menu-radio-item-space-gap pont-items-center","pont-pl-context-menu-radio-item-space-pl pont-pr-context-menu-radio-item-space-pr pont-py-context-menu-radio-item-space-py","pont-text-context-menu-radio-item-font","pont-rounded-context-menu-radio-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","aria-selected:pont-bg-context-menu-radio-item-color-bg-focus aria-selected:pont-text-context-menu-radio-item-color-text-focus","data-[disabled]:pont-opacity-context-menu-radio-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],span:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-context-menu-radio-item-icon-container-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-context-menu-radio-item-icon-space-size","pont-pointer-events-none","pont-fill-current"]},label:["pont-px-context-menu-label-space-px pont-py-context-menu-label-space-py","pont-text-context-menu-label-font pont-font-context-menu-label-font-weight"],separator:["pont-mx-context-menu-separator-space-mx pont-my-context-menu-separator-space-my","pont-h-context-menu-separator-space-h","pont-bg-context-menu-separator-color-bg"],shortcut:["pont-ml-auto","pont-text-context-menu-shortcut-font pont-text-context-menu-shortcut-color-text"]};var Rf=Object.defineProperty,If=Object.getOwnPropertyDescriptor,kn=(e,t,r,o)=>{for(var n=o>1?void 0:o?If(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&&Rf(t,r,n),n};let Ur=class extends y{constructor(){super(...arguments),this._id="",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=context-menu-checkbox-item-container]")}getAttributesToExclude(){return["data-testid"]}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked=!this.checked}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
881
881
|
<div
|
|
882
882
|
rtgcmd-item
|
|
883
883
|
part="context-menu-checkbox"
|
|
@@ -912,12 +912,12 @@
|
|
|
912
912
|
</span>
|
|
913
913
|
<div part="context-menu-checkbox-item-container"></div>
|
|
914
914
|
</div>
|
|
915
|
-
`}};kn([a({type:String})],Ur.prototype,"_id",2);kn([a({attribute:"data-value",type:String})],Ur.prototype,"value",1);kn([a({type:Boolean})],Ur.prototype,"selected",2);kn([a({type:Boolean})],Ur.prototype,"checked",2);kn([a({attribute:"data-disabled",type:Boolean})],Ur.prototype,"disabled",2);Ur=kn([p("pont-context-menu-checkbox-item")],Ur);var
|
|
915
|
+
`}};kn([a({type:String})],Ur.prototype,"_id",2);kn([a({attribute:"data-value",type:String})],Ur.prototype,"value",1);kn([a({type:Boolean})],Ur.prototype,"selected",2);kn([a({type:Boolean})],Ur.prototype,"checked",2);kn([a({attribute:"data-disabled",type:Boolean})],Ur.prototype,"disabled",2);Ur=kn([p("pont-context-menu-checkbox-item")],Ur);var Af=Object.defineProperty,Tf=Object.getOwnPropertyDescriptor,Kp=(e,t,r,o)=>{for(var n=o>1?void 0:o?Tf(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&&Af(t,r,n),n};let Xs=class extends y{constructor(){super(),this.isOpen=!1,this.handleClickOutside=this.handleClickOutside.bind(this)}get _containerElement(){return this.querySelector("div[part=context-menu-content")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}handleClickOutside(e){const t=this==null?void 0:this.querySelector("button");!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&requestAnimationFrame(()=>{this._containerElement.style.display="none",this._containerElement.style.position="absolute",this._containerElement.dataset.state="closed",this.isOpen=!1})}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
916
916
|
<div
|
|
917
917
|
part="context-menu-content"
|
|
918
918
|
class=${m(At.content,this.className)}
|
|
919
919
|
></div>
|
|
920
|
-
`}};Kp([g()],Xs.prototype,"isOpen",2);Xs=Kp([p("pont-context-menu-content")],Xs);var
|
|
920
|
+
`}};Kp([g()],Xs.prototype,"isOpen",2);Xs=Kp([p("pont-context-menu-content")],Xs);var Df=Object.defineProperty,Lf=Object.getOwnPropertyDescriptor,Wp=(e,t,r,o)=>{for(var n=o>1?void 0:o?Lf(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&&Df(t,r,n),n};let ta=class extends y{constructor(){super(...arguments),this.heading=""}get _containerElement(){return this.querySelector("div[ rtgcontext-group-items]")}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
921
921
|
<div
|
|
922
922
|
rtgcmd-group
|
|
923
923
|
part="context-menu-group"
|
|
@@ -930,7 +930,7 @@
|
|
|
930
930
|
|
|
931
931
|
<div rtgcontext-group-items role="group"></div>
|
|
932
932
|
</div>
|
|
933
|
-
`}};Wp([a({type:String})],ta.prototype,"heading",2);ta=Wp([p("pont-context-menu-group")],ta);var
|
|
933
|
+
`}};Wp([a({type:String})],ta.prototype,"heading",2);ta=Wp([p("pont-context-menu-group")],ta);var Ff=Object.defineProperty,kf=Object.getOwnPropertyDescriptor,tl=(e,t,r,o)=>{for(var n=o>1?void 0:o?kf(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&&Ff(t,r,n),n};let ci=class extends y{constructor(){super(...arguments),this.disabled=!1}get _containerElement(){return this.querySelector("div[part=context-menu-item]")}getAttributesToExclude(){return[]}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}firstUpdated(e){var t;this.moveLightDomChildrenInto(this._containerElement),(t=this._containerElement)==null||t.addEventListener("click",()=>{this.dispatchEvent(new MouseEvent("click",{bubbles:!0,composed:!0,cancelable:!0})),this.dispatchEvent(new CustomEvent("close-context-menu",{bubbles:!0,composed:!0}))})}connectedCallback(){super.connectedCallback()}disconnectedCallback(){}createRenderRoot(){return this}render(){return l`
|
|
934
934
|
<div
|
|
935
935
|
part="context-menu-item"
|
|
936
936
|
role="option"
|
|
@@ -938,7 +938,7 @@
|
|
|
938
938
|
?data-disabled=${this.disabled}
|
|
939
939
|
class=${m(At.item,this.className)}
|
|
940
940
|
></div>
|
|
941
|
-
`}};tl([a({attribute:"data-value",type:String})],ci.prototype,"value",1);tl([a({attribute:"data-disabled",type:Boolean})],ci.prototype,"disabled",2);ci=tl([p("pont-context-menu-item")],ci);var
|
|
941
|
+
`}};tl([a({attribute:"data-value",type:String})],ci.prototype,"value",1);tl([a({attribute:"data-disabled",type:Boolean})],ci.prototype,"disabled",2);ci=tl([p("pont-context-menu-item")],ci);var Nf=Object.defineProperty,Mf=Object.getOwnPropertyDescriptor,Nn=(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&&Nf(t,r,n),n};let jr=class extends y{constructor(){super(...arguments),this._id="",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=context-menu-radio-item-container]")}getAttributesToExclude(){return["data-testid"]}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`
|
|
942
942
|
<div
|
|
943
943
|
rtgcmd-item
|
|
944
944
|
part="context-menu-radio"
|
|
@@ -971,39 +971,39 @@
|
|
|
971
971
|
</span>
|
|
972
972
|
<div part="context-menu-radio-item-container"></div>
|
|
973
973
|
</div>
|
|
974
|
-
`}};Nn([a({type:String})],jr.prototype,"_id",2);Nn([a({attribute:"data-value",type:String})],jr.prototype,"value",1);Nn([a({type:Boolean})],jr.prototype,"selected",2);Nn([a({type:Boolean})],jr.prototype,"checked",2);Nn([a({attribute:"data-disabled",type:Boolean})],jr.prototype,"disabled",2);jr=Nn([p("pont-context-menu-radio-item")],jr);var
|
|
974
|
+
`}};Nn([a({type:String})],jr.prototype,"_id",2);Nn([a({attribute:"data-value",type:String})],jr.prototype,"value",1);Nn([a({type:Boolean})],jr.prototype,"selected",2);Nn([a({type:Boolean})],jr.prototype,"checked",2);Nn([a({attribute:"data-disabled",type:Boolean})],jr.prototype,"disabled",2);jr=Nn([p("pont-context-menu-radio-item")],jr);var Bf=Object.defineProperty,Uf=Object.getOwnPropertyDescriptor,Yp=(e,t,r,o)=>{for(var n=o>1?void 0:o?Uf(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&&Bf(t,r,n),n};let ea=class extends f{constructor(){super(...arguments),this._id=""}createRenderRoot(){return this}render(){return l`
|
|
975
975
|
<div
|
|
976
976
|
rtgcmd-separator
|
|
977
977
|
part="context-menu-separator"
|
|
978
978
|
role="separator"
|
|
979
979
|
class=${m(At.separator,this.className)}
|
|
980
980
|
></div>
|
|
981
|
-
`}};Yp([a({type:String})],ea.prototype,"_id",2);ea=Yp([p("pont-context-menu-separator")],ea);var
|
|
981
|
+
`}};Yp([a({type:String})],ea.prototype,"_id",2);ea=Yp([p("pont-context-menu-separator")],ea);var jf=Object.getOwnPropertyDescriptor,qf=(e,t,r,o)=>{for(var n=o>1?void 0:o?jf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let wd=class extends y{get _containerElement(){return this.querySelector("span[part=context-menu-shortcut]")}getAttributesToExclude(){return[]}createRenderRoot(){return this.classList=m(At.shortcut),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
982
982
|
<span
|
|
983
983
|
part="context-menu-shortcut"
|
|
984
984
|
class=${m(At.shortcut,this.className)}
|
|
985
985
|
>
|
|
986
986
|
</span>
|
|
987
|
-
`}};wd=
|
|
987
|
+
`}};wd=qf([p("pont-context-menu-shortcut")],wd);var zf=Object.getOwnPropertyDescriptor,Vf=(e,t,r,o)=>{for(var n=o>1?void 0:o?zf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let $d=class extends f{createRenderRoot(){return this}render(){return l``}};$d=Vf([p("pont-context-menu-trigger")],$d);var Hf=Object.defineProperty,Gf=Object.getOwnPropertyDescriptor,Qp=(e,t,r,o)=>{for(var n=o>1?void 0:o?Gf(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&&Hf(t,r,n),n};let ra=class extends y{constructor(){super(...arguments),this.isOpen=!1,this.handleClickOutside=e=>{const t=e.target;this!=null&&this.contains(t)||(this.isOpen=!1)}}get _containerElement(){return this.querySelector("div[part=context-menu]")}get _triggerElement(){return this.querySelector("pont-context-menu-trigger")}get _content(){return this==null?void 0:this.querySelector("div[part=context-menu-content]")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected),this.addEventListener("close-context-menu",()=>{this.isOpen=!1,requestAnimationFrame(()=>{const e=this._content;e&&(e.style.display="none")})})}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}toggleDropdown(e){e.preventDefault(),e.stopPropagation();const{clientX:t,clientY:r}=e,o=e.target.getBoundingClientRect();requestAnimationFrame(()=>{const n=this._content;n&&(n.style.display="",n.style.position="absolute",n.style.left=`${t-o.left}px`,n.style.top=`${r-o.top}px`,n.dataset.state="open",this.isOpen=!0)})}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}_handleRadioSelected(e){this.querySelectorAll("pont-context-menu-radio-item").forEach(t=>{t!==e.target&&(t.checked=!1)})}getAttributesToExclude(){return[]}firstUpdated(e){var t;this.moveLightDomChildrenInto(this._containerElement),(t=this._triggerElement)==null||t.addEventListener("contextmenu",r=>{this.toggleDropdown(r)}),this.style.position="relative"}createRenderRoot(){return this}render(){return l`
|
|
988
988
|
<div
|
|
989
989
|
part="context-menu"
|
|
990
990
|
class=${m(At.root,this.className)}
|
|
991
991
|
></div>
|
|
992
|
-
`}};Qp([g()],ra.prototype,"isOpen",2);ra=Qp([p("pont-context-menu")],ra);const el={root:["pont-relative"],trigger:[""],content:["pont-fixed pont-z-50","pont-p-popover-content-space-p","pont-w-popover-content-space-w","pont-text-popover-content-color-text","pont-bg-popover-content-color-bg","pont-rounded-popover-content-radius pont-border-popover-content-width-border pont-border-popover-content-color-border pont-outline-hidden","pont-shadow-popover-content-shadow",'data-[state="open"]:pont-block data-[state="closed"]:pont-hidden','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',"pont-translate-y-0.5"]};var
|
|
992
|
+
`}};Qp([g()],ra.prototype,"isOpen",2);ra=Qp([p("pont-context-menu")],ra);const el={root:["pont-relative"],trigger:[""],content:["pont-fixed pont-z-50","pont-p-popover-content-space-p","pont-w-popover-content-space-w","pont-text-popover-content-color-text","pont-bg-popover-content-color-bg","pont-rounded-popover-content-radius pont-border-popover-content-width-border pont-border-popover-content-color-border pont-outline-hidden","pont-shadow-popover-content-shadow",'data-[state="open"]:pont-block data-[state="closed"]:pont-hidden','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',"pont-translate-y-0.5"]};var Kf=Object.defineProperty,Wf=Object.getOwnPropertyDescriptor,xo=(e,t,r,o)=>{for(var n=o>1?void 0:o?Wf(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&&Kf(t,r,n),n};let Cn=class extends y{constructor(){super(...arguments),this.enableDefaultStyle=!0,this.styleContent=!0,this.side="bottom",this.state="closed"}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof go);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=popover-content]")}handleClickOutside(e){const t=this._popover;t&&!t.contains(e.target)&&(t.isOpen=!1)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement),window.addEventListener("click",this.handleClickOutside.bind(this))}updated(e){var t;(t=this._popover)!=null&&t.isOpen||window.removeEventListener("click",this.handleClickOutside.bind(this))}preventClickPropagation(e){e.stopPropagation()}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return l`
|
|
993
993
|
<div
|
|
994
994
|
part="popover-content"
|
|
995
995
|
data-state=${this.state}
|
|
996
996
|
class=${m(el.content,this.className)}
|
|
997
997
|
@click="${this.preventClickPropagation}"
|
|
998
998
|
></div>
|
|
999
|
-
`}};xo([a({type:Boolean})],Cn.prototype,"enableDefaultStyle",2);xo([a({type:Boolean})],Cn.prototype,"styleContent",2);xo([a({type:String})],Cn.prototype,"side",2);xo([a({attribute:"data-state",type:String})],Cn.prototype,"state",2);Cn=xo([p("pont-popover-content")],Cn);var
|
|
999
|
+
`}};xo([a({type:Boolean})],Cn.prototype,"enableDefaultStyle",2);xo([a({type:Boolean})],Cn.prototype,"styleContent",2);xo([a({type:String})],Cn.prototype,"side",2);xo([a({attribute:"data-state",type:String})],Cn.prototype,"state",2);Cn=xo([p("pont-popover-content")],Cn);var Yf=Object.getOwnPropertyDescriptor,Qf=(e,t,r,o)=>{for(var n=o>1?void 0:o?Yf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Pd=class extends y{constructor(){super(...arguments),this.handleClick=()=>{const e=this._popover;e&&(e.isOpen=!e.isOpen)}}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof go);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=popover-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{this.handleClick(),t.stopPropagation()})}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}render(){return l`
|
|
1000
1000
|
<div
|
|
1001
1001
|
part="popover-trigger"
|
|
1002
1002
|
class=${m(el.trigger,this.className)}
|
|
1003
1003
|
></div>
|
|
1004
|
-
`}};Pd=
|
|
1004
|
+
`}};Pd=Qf([p("pont-popover-trigger")],Pd);var Zf=Object.defineProperty,Jf=Object.getOwnPropertyDescriptor,Zp=(e,t,r,o)=>{for(var n=o>1?void 0:o?Jf(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&&Zf(t,r,n),n};let go=class extends y{constructor(){super(...arguments),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=popover]")}get _contentElement(){return this.querySelector("pont-popover-content")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){this._contentElement.state=this.isOpen?"open":"closed",this._contentElement.requestUpdate()}render(){return l`
|
|
1005
1005
|
<div part="popover" class=${m(el.root,this.className)}></div>
|
|
1006
|
-
`}};Zp([g()],go.prototype,"isOpen",2);go=Zp([p("pont-popover")],go);const qo={root:[""],trigger:[""],triggerButton:[ao({variant:"outline"}).replace("pont-justify-center",""),"pont-justify-start","pont-w-date-picker-trigger-button-space-w","pont-text-left pont-font-date-picker-trigger-button-font-weight","data-[empty=true]:pont-text-date-picker-trigger-button-color-text-empty"],content:["pont-p-date-picker-content-space-p","pont-w-auto"]};var
|
|
1006
|
+
`}};Zp([g()],go.prototype,"isOpen",2);go=Zp([p("pont-popover")],go);const qo={root:[""],trigger:[""],triggerButton:[ao({variant:"outline"}).replace("pont-justify-center",""),"pont-justify-start","pont-w-date-picker-trigger-button-space-w","pont-text-left pont-font-date-picker-trigger-button-font-weight","data-[empty=true]:pont-text-date-picker-trigger-button-color-text-empty"],content:["pont-p-date-picker-content-space-p","pont-w-auto"]};var Xf=Object.defineProperty,tv=Object.getOwnPropertyDescriptor,Jp=(e,t,r,o)=>{for(var n=o>1?void 0:o?tv(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&&Xf(t,r,n),n};let na=class extends f{constructor(){super(...arguments),this.selectedDate=null}handleDateSelected(e){this.selectedDate=e.detail.startDate,this.requestUpdate()}createRenderRoot(){return this}render(){return l`
|
|
1007
1007
|
<pont-popover
|
|
1008
1008
|
class=${m("date-picker",qo.root,this.className)}
|
|
1009
1009
|
@date-selected=${this.handleDateSelected}
|
|
@@ -1046,12 +1046,12 @@
|
|
|
1046
1046
|
<pont-calendar mode="single"></pont-calendar>
|
|
1047
1047
|
</pont-popover-content>
|
|
1048
1048
|
</pont-popover>
|
|
1049
|
-
`}};Jp([a({type:Object})],na.prototype,"selectedDate",2);na=Jp([p("pont-date-picker")],na);const te={root:[""],trigger:[""],close:[""],overlay:["pont-fixed pont-inset-0 pont-z-50","pont-bg-dialog-overlay-color-bg","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0"],content:{base:["pont-fixed pont-top-[50%] pont-left-[50%] pont-z-50","pont-grid pont-gap-dialog-content-space-gap","pont-p-dialog-content-space-p","pont-w-dialog-content-space-w pont-max-w-dialog-content-space-max-w-sm sm:pont-max-w-dialog-content-space-max-w","pont-bg-dialog-content-color-bg","pont-rounded-dialog-content-radius pont-border-dialog-content-width-border pont-border-dialog-content-color-border pont-outline-none","pont-shadow-dialog-content-shadow","pont-duration-200","pont-translate-x-[-50%] pont-translate-y-[-50%]","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"],close:{base:["pont-absolute pont-top-4 pont-right-4","pont-rounded-dialog-close-radius","pont-ring-offset-dialog-close-color-ring-offset","pont-transition-opacity","focus:pont-ring-dialog-close-width-ring-focus focus:pont-ring-dialog-close-color-ring-focus focus:pont-ring-offset-dialog-close-width-ring-offset focus:pont-outline-hidden","disabled:pont-pointer-events-none","data-[state=open]:pont-bg-dialog-close-color-bg data-[state=open]:pont-text-dialog-close-color-text"],icon:["pont-shrink-0","pont-size-dialog-close-icon-space-size","pont-pointer-events-none"]}},header:["pont-flex pont-flex-col pont-gap-dialog-header-space-gap","pont-text-center","sm:pont-text-left"],footer:["pont-flex pont-flex-col-reverse pont-gap-dialog-footer-space-gap","sm:pont-flex-row sm:pont-justify-end"],title:["pont-text-dialog-title-font pont-font-dialog-title-font-weight"],description:["pont-text-dialog-description-font pont-font-dialog-description-font-weight pont-text-dialog-description-color-text"]};var
|
|
1049
|
+
`}};Jp([a({type:Object})],na.prototype,"selectedDate",2);na=Jp([p("pont-date-picker")],na);const te={root:[""],trigger:[""],close:[""],overlay:["pont-fixed pont-inset-0 pont-z-50","pont-bg-dialog-overlay-color-bg","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0"],content:{base:["pont-fixed pont-top-[50%] pont-left-[50%] pont-z-50","pont-grid pont-gap-dialog-content-space-gap","pont-p-dialog-content-space-p","pont-w-dialog-content-space-w pont-max-w-dialog-content-space-max-w-sm sm:pont-max-w-dialog-content-space-max-w","pont-bg-dialog-content-color-bg","pont-rounded-dialog-content-radius pont-border-dialog-content-width-border pont-border-dialog-content-color-border pont-outline-none","pont-shadow-dialog-content-shadow","pont-duration-200","pont-translate-x-[-50%] pont-translate-y-[-50%]","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"],close:{base:["pont-absolute pont-top-4 pont-right-4","pont-rounded-dialog-close-radius","pont-ring-offset-dialog-close-color-ring-offset","pont-transition-opacity","focus:pont-ring-dialog-close-width-ring-focus focus:pont-ring-dialog-close-color-ring-focus focus:pont-ring-offset-dialog-close-width-ring-offset focus:pont-outline-hidden","disabled:pont-pointer-events-none","data-[state=open]:pont-bg-dialog-close-color-bg data-[state=open]:pont-text-dialog-close-color-text"],icon:["pont-shrink-0","pont-size-dialog-close-icon-space-size","pont-pointer-events-none"]}},header:["pont-flex pont-flex-col pont-gap-dialog-header-space-gap","pont-text-center","sm:pont-text-left"],footer:["pont-flex pont-flex-col-reverse pont-gap-dialog-footer-space-gap","sm:pont-flex-row sm:pont-justify-end"],title:["pont-text-dialog-title-font pont-font-dialog-title-font-weight"],description:["pont-text-dialog-description-font pont-font-dialog-description-font-weight pont-text-dialog-description-color-text"]};var ev=Object.getOwnPropertyDescriptor,rv=(e,t,r,o)=>{for(var n=o>1?void 0:o?ev(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};const nv="closed";let Cd=class extends y{get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof En)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=dialog-close]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",()=>{const t=this._dialog;t&&(t.dataset.state=nv)})}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return l`
|
|
1050
1050
|
<div
|
|
1051
1051
|
part="dialog-close"
|
|
1052
1052
|
class=${m(te.close,this.className)}
|
|
1053
1053
|
></div>
|
|
1054
|
-
`}};Cd=
|
|
1054
|
+
`}};Cd=rv([p("pont-dialog-close")],Cd);var ov=Object.defineProperty,iv=Object.getOwnPropertyDescriptor,rl=(e,t,r,o)=>{for(var n=o>1?void 0:o?iv(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&&ov(t,r,n),n};const cs="closed";let pi=class extends y{constructor(){super(...arguments),this.state=cs,this.showCloseButton=!1,this.handleCloseButtonClick=()=>{const e=this._dialog;e&&(e.dataset.state=cs)}}get _containerElement(){return this.querySelector("div[part=dialog-content-slot]")}get ـcomponentElement(){return this.querySelector("div[part=dialog-content]")}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof En)return e;e=e.parentElement}return e}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){requestAnimationFrame(()=>{e.get("state")===cs?this.ـcomponentElement.style.display="grid":this.ـcomponentElement.style.display="none"})}render(){return l`
|
|
1055
1055
|
<div
|
|
1056
1056
|
rtgdlg-content
|
|
1057
1057
|
part="dialog-content"
|
|
@@ -1086,12 +1086,12 @@
|
|
|
1086
1086
|
</button>
|
|
1087
1087
|
`:""}
|
|
1088
1088
|
</div>
|
|
1089
|
-
`}};rl([a({attribute:"data-state",type:String})],pi.prototype,"state",2);rl([a({attribute:"show-close-button",type:Boolean})],pi.prototype,"showCloseButton",2);pi=rl([p("pont-dialog-content")],pi);var
|
|
1089
|
+
`}};rl([a({attribute:"data-state",type:String})],pi.prototype,"state",2);rl([a({attribute:"show-close-button",type:Boolean})],pi.prototype,"showCloseButton",2);pi=rl([p("pont-dialog-content")],pi);var sv=Object.getOwnPropertyDescriptor,av=(e,t,r,o)=>{for(var n=o>1?void 0:o?sv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Ed=class extends y{get _containerElement(){return this.querySelector("div[part=dialog-footer]")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1090
1090
|
<div
|
|
1091
1091
|
part="dialog-footer"
|
|
1092
1092
|
class=${m(te.footer,this.className)}
|
|
1093
1093
|
></div>
|
|
1094
|
-
`}};Ed=
|
|
1094
|
+
`}};Ed=av([p("pont-dialog-footer")],Ed);var lv=Object.defineProperty,dv=Object.getOwnPropertyDescriptor,nl=(e,t,r,o)=>{for(var n=o>1?void 0:o?dv(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&&lv(t,r,n),n};let hi=class extends f{constructor(){super(...arguments),this._title="",this.description=""}createRenderRoot(){return this}render(){return l`
|
|
1095
1095
|
<div
|
|
1096
1096
|
part="dialog-header"
|
|
1097
1097
|
class=${m(te.header,this.className)}
|
|
@@ -1102,30 +1102,30 @@
|
|
|
1102
1102
|
${this.description}
|
|
1103
1103
|
</p>
|
|
1104
1104
|
</div>
|
|
1105
|
-
`}};nl([a({attribute:"title",type:String})],hi.prototype,"_title",2);nl([a({type:String})],hi.prototype,"description",2);hi=nl([p("pont-dialog-header")],hi);var
|
|
1105
|
+
`}};nl([a({attribute:"title",type:String})],hi.prototype,"_title",2);nl([a({type:String})],hi.prototype,"description",2);hi=nl([p("pont-dialog-header")],hi);var cv=Object.getOwnPropertyDescriptor,pv=(e,t,r,o)=>{for(var n=o>1?void 0:o?cv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Sd=class extends f{createRenderRoot(){return this}render(){return l`
|
|
1106
1106
|
<div
|
|
1107
1107
|
part="dialog-overly"
|
|
1108
1108
|
class=${m(te.overlay,this.className)}
|
|
1109
1109
|
></div>
|
|
1110
|
-
`}};Sd=
|
|
1110
|
+
`}};Sd=pv([p("pont-dialog-overlay")],Sd);var hv=Object.getOwnPropertyDescriptor,uv=(e,t,r,o)=>{for(var n=o>1?void 0:o?hv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};const mv="open";let xd=class extends y{constructor(){super(...arguments),this.handleClick=()=>{const e=this._dialog;e&&(e.dataset.state=mv)}}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof En)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=dialog-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{t.stopPropagation(),this.handleClick()})}getAttributesToExclude(){return[]}createRenderRoot(){return this}render(){return l`
|
|
1111
1111
|
<div
|
|
1112
1112
|
part="dialog-trigger"
|
|
1113
1113
|
class=${m(te.trigger,this.className)}
|
|
1114
1114
|
></div>
|
|
1115
|
-
`}};xd=
|
|
1115
|
+
`}};xd=uv([p("pont-dialog-trigger")],xd);var gv=Object.defineProperty,fv=Object.getOwnPropertyDescriptor,Xp=(e,t,r,o)=>{for(var n=o>1?void 0:o?fv(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&&gv(t,r,n),n};const vv="open",bv="closed";let En=class extends y{constructor(){super(...arguments),this.state=bv}get _containerElement(){return this.querySelector("div[rtgdlg-root]")}get _content(){const e=this.querySelector("pont-dialog-content");return e||null}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.state)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}getAttributesToExclude(){return[]}render(){return l`
|
|
1116
1116
|
<div
|
|
1117
1117
|
rtgdlg-root
|
|
1118
1118
|
part="dialog"
|
|
1119
1119
|
class=${m(te.root,this.className)}
|
|
1120
1120
|
>
|
|
1121
|
-
${this.state===
|
|
1121
|
+
${this.state===vv?l` <pont-dialog-overlay></pont-dialog-overlay>`:h}
|
|
1122
1122
|
</div>
|
|
1123
|
-
`}};Xp([a({attribute:"data-state",type:String})],En.prototype,"state",2);En=Xp([p("pont-dialog")],En);const fe={open:"open",closed:"closed"},Se={root:[""],trigger:[""],close:[""],overlay:["pont-fixed pont-inset-0 pont-z-50","pont-bg-drawer-overlay-color-bg","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0"],content:{base:["pont-fixed pont-inset-x-0 pont-bottom-0 pont-z-50","pont-flex pont-flex-col","pont-mt-drawer-content-space-mt","pont-h-auto pont-max-h-[80vh]","pont-bg-drawer-content-color-bg","pont-rounded-t-drawer-content-radius pont-border-t-drawer-content-width-border pont-border-t-drawer-content-color-border"],thumb:["pont-shrink-0","pont-mx-auto pont-mt-drawer-thumb-space-mt","pont-w-drawer-thumb-space-w pont-h-drawer-thumb-space-h","pont-bg-drawer-thumb-color-bg","pont-rounded-drawer-thumb-radius"]},header:["pont-flex pont-flex-col pont-gap-drawer-header-space-gap-sm md:pont-gap-drawer-header-space-gap","pont-p-drawer-header-space-p","pont-text-center"],footer:["pont-flex pont-flex-col pont-gap-drawer-footer-space-gap","pont-p-drawer-footer-space-p pont-mt-auto"],title:["pont-text-drawer-title-font pont-font-drawer-title-font-weight pont-text-drawer-title-color-text"],description:["pont-text-drawer-description-font pont-font-drawer-description-font-weight pont-text-drawer-description-color-text"]};var
|
|
1123
|
+
`}};Xp([a({attribute:"data-state",type:String})],En.prototype,"state",2);En=Xp([p("pont-dialog")],En);const fe={open:"open",closed:"closed"},Se={root:[""],trigger:[""],close:[""],overlay:["pont-fixed pont-inset-0 pont-z-50","pont-bg-drawer-overlay-color-bg","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0"],content:{base:["pont-fixed pont-inset-x-0 pont-bottom-0 pont-z-50","pont-flex pont-flex-col","pont-mt-drawer-content-space-mt","pont-h-auto pont-max-h-[80vh]","pont-bg-drawer-content-color-bg","pont-rounded-t-drawer-content-radius pont-border-t-drawer-content-width-border pont-border-t-drawer-content-color-border"],thumb:["pont-shrink-0","pont-mx-auto pont-mt-drawer-thumb-space-mt","pont-w-drawer-thumb-space-w pont-h-drawer-thumb-space-h","pont-bg-drawer-thumb-color-bg","pont-rounded-drawer-thumb-radius"]},header:["pont-flex pont-flex-col pont-gap-drawer-header-space-gap-sm md:pont-gap-drawer-header-space-gap","pont-p-drawer-header-space-p","pont-text-center"],footer:["pont-flex pont-flex-col pont-gap-drawer-footer-space-gap","pont-p-drawer-footer-space-p pont-mt-auto"],title:["pont-text-drawer-title-font pont-font-drawer-title-font-weight pont-text-drawer-title-color-text"],description:["pont-text-drawer-description-font pont-font-drawer-description-font-weight pont-text-drawer-description-color-text"]};var yv=Object.getOwnPropertyDescriptor,_v=(e,t,r,o)=>{for(var n=o>1?void 0:o?yv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Od=class extends y{get _drawer(){let e=this.parentElement;for(;e;){if(e instanceof fo)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=drawer-close]")}async firstUpdated(e){super.firstUpdated(e),await this.updateComplete;const t=this._containerElement;if(t){this.moveLightDomChildrenInto(t);const r=t.querySelector("button, [data-close], [role=button]");r&&r.addEventListener("click",o=>{o.stopPropagation();const n=this._drawer;n&&(n.dataset.state=fe.closed)})}}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return l`
|
|
1124
1124
|
<div
|
|
1125
1125
|
part="drawer-close"
|
|
1126
1126
|
class=${m(Se.close,this.className)}
|
|
1127
1127
|
></div>
|
|
1128
|
-
`}};Od=
|
|
1128
|
+
`}};Od=_v([p("pont-drawer-close")],Od);var wv=Object.defineProperty,$v=Object.getOwnPropertyDescriptor,th=(e,t,r,o)=>{for(var n=o>1?void 0:o?$v(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&&wv(t,r,n),n};let oa=class extends y{constructor(){super(...arguments),this.state=fe.closed}connectedCallback(){super.connectedCallback();const e=document.createElement("style");e.textContent=`
|
|
1129
1129
|
@keyframes slideInUp {
|
|
1130
1130
|
from { transform: translateY(100%); }
|
|
1131
1131
|
to { transform: translateY(0); }
|
|
@@ -1154,37 +1154,37 @@
|
|
|
1154
1154
|
<div part="drawer-thumb" class=${m(Se.content.thumb)}></div>
|
|
1155
1155
|
<div part="drawer-content-slot"></div>
|
|
1156
1156
|
</div>
|
|
1157
|
-
`}};th([a({attribute:"data-state",type:String})],oa.prototype,"state",2);oa=th([p("pont-drawer-content")],oa);var
|
|
1157
|
+
`}};th([a({attribute:"data-state",type:String})],oa.prototype,"state",2);oa=th([p("pont-drawer-content")],oa);var Pv=Object.getOwnPropertyDescriptor,Cv=(e,t,r,o)=>{for(var n=o>1?void 0:o?Pv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Rd=class extends y{get _containerElement(){return this.querySelector("p[part=drawer-description")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1158
1158
|
<p
|
|
1159
1159
|
part="drawer-description"
|
|
1160
1160
|
class=${m(Se.description,this.className)}
|
|
1161
1161
|
></p>
|
|
1162
|
-
`}};Rd=
|
|
1162
|
+
`}};Rd=Cv([p("pont-drawer-description")],Rd);var Ev=Object.getOwnPropertyDescriptor,Sv=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ev(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Id=class extends y{get _containerElement(){return this.querySelector("div[part=drawer-footer]")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1163
1163
|
<div
|
|
1164
1164
|
part="drawer-footer"
|
|
1165
1165
|
class=${m(Se.footer,this.className)}
|
|
1166
1166
|
></div>
|
|
1167
|
-
`}};Id=
|
|
1167
|
+
`}};Id=Sv([p("pont-drawer-footer")],Id);var xv=Object.getOwnPropertyDescriptor,Ov=(e,t,r,o)=>{for(var n=o>1?void 0:o?xv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Ad=class extends y{get _containerElement(){return this.querySelector("div[part=drawer-header")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1168
1168
|
<div
|
|
1169
1169
|
part="drawer-header"
|
|
1170
1170
|
class=${m(Se.header,this.className)}
|
|
1171
1171
|
></div>
|
|
1172
|
-
`}};Ad=
|
|
1172
|
+
`}};Ad=Ov([p("pont-drawer-header")],Ad);var Rv=Object.getOwnPropertyDescriptor,Iv=(e,t,r,o)=>{for(var n=o>1?void 0:o?Rv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Td=class extends f{createRenderRoot(){return this}render(){return l`
|
|
1173
1173
|
<div
|
|
1174
1174
|
part="drawer-overly"
|
|
1175
1175
|
class=${m(Se.overlay,this.className)}
|
|
1176
1176
|
></div>
|
|
1177
|
-
`}};Td=
|
|
1177
|
+
`}};Td=Iv([p("pont-drawer-overlay")],Td);var Av=Object.getOwnPropertyDescriptor,Tv=(e,t,r,o)=>{for(var n=o>1?void 0:o?Av(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Dd=class extends y{get _containerElement(){return this.querySelector("h2[part=drawer-title")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1178
1178
|
<h2
|
|
1179
1179
|
part="drawer-title"
|
|
1180
1180
|
class=${m(Se.title,this.className)}
|
|
1181
1181
|
></h2>
|
|
1182
|
-
`}};Dd=
|
|
1182
|
+
`}};Dd=Tv([p("pont-drawer-title")],Dd);var Dv=Object.getOwnPropertyDescriptor,Lv=(e,t,r,o)=>{for(var n=o>1?void 0:o?Dv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Ld=class extends y{constructor(){super(...arguments),this.handleClick=()=>{const e=this._drawer;e&&(e.dataset.state=fe.open)}}get _drawer(){let e=this.parentElement;for(;e;){if(e instanceof fo)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=drawer-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{t.stopPropagation(),this.handleClick()})}getAttributesToExclude(){return[]}createRenderRoot(){return this}render(){return l`
|
|
1183
1183
|
<div
|
|
1184
1184
|
part="drawer-trigger"
|
|
1185
1185
|
class=${m(Se.trigger,this.className)}
|
|
1186
1186
|
></div>
|
|
1187
|
-
`}};Ld=
|
|
1187
|
+
`}};Ld=Lv([p("pont-drawer-trigger")],Ld);var Fv=Object.defineProperty,kv=Object.getOwnPropertyDescriptor,eh=(e,t,r,o)=>{for(var n=o>1?void 0:o?kv(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&&Fv(t,r,n),n};let fo=class extends y{constructor(){super(...arguments),this.state=fe.closed,this.handleOutsideClick=e=>{const t=this._content;this.state===fe.open&&t&&(t.contains(e.target)||(this.state=fe.closed,this.dispatchEvent(new CustomEvent("drawer-close"))))}}get _containerElement(){return this.querySelector("div[rtgdlg-root]")}get _content(){const e=this.querySelector("pont-drawer-content");return e||null}connectedCallback(){super.connectedCallback(),this.setupOutsideClickHandler()}disconnectedCallback(){super.disconnectedCallback(),this.removeOutsideClickHandler()}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.state),e.has("state")&&this.setupOutsideClickHandler()}setupOutsideClickHandler(){this.state===fe.open?document.addEventListener("click",this.handleOutsideClick):this.removeOutsideClickHandler()}removeOutsideClickHandler(){document.removeEventListener("click",this.handleOutsideClick)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}getAttributesToExclude(){return[]}render(){return l`
|
|
1188
1188
|
<div
|
|
1189
1189
|
rtgdlg-root
|
|
1190
1190
|
part="drawer"
|
|
@@ -1192,7 +1192,7 @@
|
|
|
1192
1192
|
>
|
|
1193
1193
|
${this.state===fe.open?l` <pont-drawer-overlay></pont-drawer-overlay>`:h}
|
|
1194
1194
|
</div>
|
|
1195
|
-
`}};eh([a({attribute:"data-state",type:String})],fo.prototype,"state",2);fo=eh([p("pont-drawer")],fo);const Tt={root:["pont-relative"],content:["pont-overflow-x-hidden pont-overflow-y-auto pont-z-50 pont-absolute","pont-p-dropdown-menu-content-space-p","pont-min-w-dropdown-menu-content-space-min-w","pont-text-dropdown-menu-content-color-text","pont-bg-dropdown-menu-content-color-bg","pont-rounded-dropdown-menu-content-radius pont-border-dropdown-menu-content-width-border pont-border-dropdown-menu-content-color-border","pont-shadow-dropdown-menu-content-shadow","pont-translate-y-0.5","pont-slide-in-from-top-2","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"],group:[""],item:["pont-flex pont-relative","pont-gap-dropdown-menu-item-space-gap pont-items-center","pont-px-dropdown-menu-item-space-px pont-py-dropdown-menu-item-space-py","pont-text-dropdown-menu-item-font","pont-rounded-dropdown-menu-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","hover:pont-bg-dropdown-menu-item-color-bg-hover hover:pont-text-dropdown-menu-item-color-text-hover","focus:pont-bg-dropdown-menu-item-color-bg-focus focus:pont-text-dropdown-menu-item-color-text-focus","data-[disabled]:pont-opacity-dropdown-menu-item-opacity-disabled data-[disabled]:pont-pointer-events-none",'[&_svg]:pont-shrink-0 [&_svg:not([class*="pont-size-"])]:pont-size-dropdown-menu-item-icon-space-size [&_svg:not([class*="pont-text-"])]:pont-text-dropdown-menu-item-icon-color-text [&_svg]:pont-pointer-events-none'],checkboxItem:{base:["pont-flex pont-relative","pont-gap-dropdown-menu-checkbox-item-space-gap pont-items-center","pont-pl-dropdown-menu-checkbox-item-space-pl pont-pr-dropdown-menu-checkbox-item-space-pr pont-py-dropdown-menu-checkbox-item-space-py","pont-text-dropdown-menu-checkbox-item-font","pont-rounded-dropdown-menu-checkbox-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","aria-selected:pont-bg-dropdown-menu-checkbox-item-color-bg-focus aria-selected:pont-text-dropdown-menu-checkbox-item-color-text-focus","data-[disabled]:pont-opacity-dropdown-menu-checkbox-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],span:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-dropdown-menu-checkbox-item-icon-container-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-dropdown-menu-checkbox-item-icon-space-size","pont-pointer-events-none"]},radioItem:{base:["pont-flex pont-relative","pont-gap-dropdown-menu-radio-item-space-gap pont-items-center","pont-pl-dropdown-menu-radio-item-space-pl pont-pr-dropdown-menu-radio-item-space-pr pont-py-dropdown-menu-radio-item-space-py","pont-text-dropdown-menu-radio-item-font","pont-rounded-dropdown-menu-radio-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","aria-selected:pont-bg-dropdown-menu-radio-item-color-bg-focus aria-selected:pont-text-dropdown-menu-radio-item-color-text-focus","data-[disabled]:pont-opacity-dropdown-menu-radio-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],span:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-dropdown-menu-radio-item-icon-container-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-dropdown-menu-radio-item-icon-space-size","pont-pointer-events-none","pont-fill-current"]},label:["pont-px-dropdown-menu-label-space-px pont-py-dropdown-menu-label-space-py","pont-text-dropdown-menu-label-font pont-font-dropdown-menu-label-font-weight"],separator:["pont-mx-dropdown-menu-separator-space-mx pont-my-dropdown-menu-separator-space-my","pont-h-dropdown-menu-separator-space-h","pont-bg-dropdown-menu-separator-color-bg"],shortcut:["pont-ml-auto","pont-text-dropdown-menu-shortcut-font pont-text-dropdown-menu-shortcut-color-text"]};var
|
|
1195
|
+
`}};eh([a({attribute:"data-state",type:String})],fo.prototype,"state",2);fo=eh([p("pont-drawer")],fo);const Tt={root:["pont-relative"],content:["pont-overflow-x-hidden pont-overflow-y-auto pont-z-50 pont-absolute","pont-p-dropdown-menu-content-space-p","pont-min-w-dropdown-menu-content-space-min-w","pont-text-dropdown-menu-content-color-text","pont-bg-dropdown-menu-content-color-bg","pont-rounded-dropdown-menu-content-radius pont-border-dropdown-menu-content-width-border pont-border-dropdown-menu-content-color-border","pont-shadow-dropdown-menu-content-shadow","pont-translate-y-0.5","pont-slide-in-from-top-2","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"],group:[""],item:["pont-flex pont-relative","pont-gap-dropdown-menu-item-space-gap pont-items-center","pont-px-dropdown-menu-item-space-px pont-py-dropdown-menu-item-space-py","pont-text-dropdown-menu-item-font","pont-rounded-dropdown-menu-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","hover:pont-bg-dropdown-menu-item-color-bg-hover hover:pont-text-dropdown-menu-item-color-text-hover","focus:pont-bg-dropdown-menu-item-color-bg-focus focus:pont-text-dropdown-menu-item-color-text-focus","data-[disabled]:pont-opacity-dropdown-menu-item-opacity-disabled data-[disabled]:pont-pointer-events-none",'[&_svg]:pont-shrink-0 [&_svg:not([class*="pont-size-"])]:pont-size-dropdown-menu-item-icon-space-size [&_svg:not([class*="pont-text-"])]:pont-text-dropdown-menu-item-icon-color-text [&_svg]:pont-pointer-events-none'],checkboxItem:{base:["pont-flex pont-relative","pont-gap-dropdown-menu-checkbox-item-space-gap pont-items-center","pont-pl-dropdown-menu-checkbox-item-space-pl pont-pr-dropdown-menu-checkbox-item-space-pr pont-py-dropdown-menu-checkbox-item-space-py","pont-text-dropdown-menu-checkbox-item-font","pont-rounded-dropdown-menu-checkbox-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","aria-selected:pont-bg-dropdown-menu-checkbox-item-color-bg-focus aria-selected:pont-text-dropdown-menu-checkbox-item-color-text-focus","data-[disabled]:pont-opacity-dropdown-menu-checkbox-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],span:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-dropdown-menu-checkbox-item-icon-container-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-dropdown-menu-checkbox-item-icon-space-size","pont-pointer-events-none"]},radioItem:{base:["pont-flex pont-relative","pont-gap-dropdown-menu-radio-item-space-gap pont-items-center","pont-pl-dropdown-menu-radio-item-space-pl pont-pr-dropdown-menu-radio-item-space-pr pont-py-dropdown-menu-radio-item-space-py","pont-text-dropdown-menu-radio-item-font","pont-rounded-dropdown-menu-radio-item-radius pont-outline-hidden","pont-cursor-default","pont-select-none","aria-selected:pont-bg-dropdown-menu-radio-item-color-bg-focus aria-selected:pont-text-dropdown-menu-radio-item-color-text-focus","data-[disabled]:pont-opacity-dropdown-menu-radio-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],span:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-dropdown-menu-radio-item-icon-container-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-dropdown-menu-radio-item-icon-space-size","pont-pointer-events-none","pont-fill-current"]},label:["pont-px-dropdown-menu-label-space-px pont-py-dropdown-menu-label-space-py","pont-text-dropdown-menu-label-font pont-font-dropdown-menu-label-font-weight"],separator:["pont-mx-dropdown-menu-separator-space-mx pont-my-dropdown-menu-separator-space-my","pont-h-dropdown-menu-separator-space-h","pont-bg-dropdown-menu-separator-color-bg"],shortcut:["pont-ml-auto","pont-text-dropdown-menu-shortcut-font pont-text-dropdown-menu-shortcut-color-text"]};var Nv=Object.defineProperty,Mv=Object.getOwnPropertyDescriptor,Mn=(e,t,r,o)=>{for(var n=o>1?void 0:o?Mv(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&&Nv(t,r,n),n};let qr=class extends y{constructor(){super(...arguments),this._id="",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-checkbox-item-container]")}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof $t);)e=e.parentElement;return e}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this._dropdownMenu.isOpen=!1,this.checked=!this.checked}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1196
1196
|
<div
|
|
1197
1197
|
rtgcmd-item
|
|
1198
1198
|
part="dropdown-menu-item"
|
|
@@ -1229,14 +1229,14 @@
|
|
|
1229
1229
|
</span>
|
|
1230
1230
|
<div part="dropdown-menu-checkbox-item-container"></div>
|
|
1231
1231
|
</div>
|
|
1232
|
-
`}};Mn([a({type:String})],qr.prototype,"_id",2);Mn([a({attribute:"data-value",type:String})],qr.prototype,"value",1);Mn([a({type:Boolean})],qr.prototype,"selected",2);Mn([a({type:Boolean})],qr.prototype,"checked",2);Mn([a({attribute:"data-disabled",type:Boolean})],qr.prototype,"disabled",2);qr=Mn([p("pont-dropdown-menu-checkbox-item")],qr);const ol="closed";var
|
|
1232
|
+
`}};Mn([a({type:String})],qr.prototype,"_id",2);Mn([a({attribute:"data-value",type:String})],qr.prototype,"value",1);Mn([a({type:Boolean})],qr.prototype,"selected",2);Mn([a({type:Boolean})],qr.prototype,"checked",2);Mn([a({attribute:"data-disabled",type:Boolean})],qr.prototype,"disabled",2);qr=Mn([p("pont-dropdown-menu-checkbox-item")],qr);const ol="closed";var Bv=Object.defineProperty,Uv=Object.getOwnPropertyDescriptor,il=(e,t,r,o)=>{for(var n=o>1?void 0:o?Uv(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&&Bv(t,r,n),n};let ui=class extends y{constructor(){super(),this.state=ol,this.isOpen=!1,this.handleWindowChange=this.handleWindowChange.bind(this)}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof $t);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=dropdown-menu-content]")}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.handleWindowChange),window.addEventListener("scroll",this.handleWindowChange,!0)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowChange),window.removeEventListener("scroll",this.handleWindowChange,!0),super.disconnectedCallback()}handleWindowChange(){this.isOpen&&requestAnimationFrame(()=>this.positionContent())}updated(e){super.updated(e),this.state==="open"?(this.isOpen=!0,requestAnimationFrame(()=>this.positionContent())):this.isOpen=!1}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}positionContent(){const e=this._dropdownMenu,t=this._containerElement,r=e==null?void 0:e._triggerElement;if(!e||!t||!r||!this.isOpen)return;const o=document.documentElement.clientWidth,n=document.documentElement.clientHeight,i=8,s=r.getBoundingClientRect();t.style.position="fixed",t.style.minWidth=`${Math.max(s.width,t.offsetWidth)}px`,t.style.maxWidth=`${Math.min(t.offsetWidth,o-i*2)}px`;let d=s.left,c=s.bottom;const u=t.getBoundingClientRect(),v=o-d>=u.width+i,b=s.right>=u.width+i,w=n-c>=u.height+i,_=s.top>=u.height+i;v||!b&&w?(t.style.left=`${d}px`,t.style.right="auto"):(t.style.left="auto",t.style.right=`${o-s.right}px`),w||!_&&v?(t.style.top=`${c}px`,t.style.bottom="auto"):(t.style.top="auto",t.style.bottom=`${n-s.top}px`),requestAnimationFrame(()=>{const C=t.getBoundingClientRect();if(C.right>o-i){const P=C.right-(o-i),O=parseFloat(t.style.left||"0");Number.isNaN(O)||(t.style.left=`${Math.max(0,O-P)}px`)}if(C.left<i){const P=i-C.left,O=parseFloat(t.style.left||"0");Number.isNaN(O)||(t.style.left=`${Math.max(0,O+P)}px`)}if(C.bottom>n-i){const P=C.bottom-(n-i),O=parseFloat(t.style.bottom||"0");Number.isNaN(O)||(t.style.bottom=`${Math.max(0,O+P)}px`)}if(C.top<i){const P=i-C.top,O=parseFloat(t.style.top||"0");Number.isNaN(O)||(t.style.top=`${Math.max(0,O+P)}px`)}})}render(){return l`
|
|
1233
1233
|
<div
|
|
1234
1234
|
data-slot="dropdown-menu-content"
|
|
1235
1235
|
part="dropdown-menu-content"
|
|
1236
1236
|
style="display: ${this.isOpen?"block":"none"};"
|
|
1237
1237
|
class=${m(Tt.content,this.className)}
|
|
1238
1238
|
></div>
|
|
1239
|
-
`}};il([a({attribute:"data-state",type:String})],ui.prototype,"state",2);il([g()],ui.prototype,"isOpen",2);ui=il([p("pont-dropdown-menu-content")],ui);var
|
|
1239
|
+
`}};il([a({attribute:"data-state",type:String})],ui.prototype,"state",2);il([g()],ui.prototype,"isOpen",2);ui=il([p("pont-dropdown-menu-content")],ui);var jv=Object.defineProperty,qv=Object.getOwnPropertyDescriptor,ki=(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 vo=class extends y{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[rtgcmd-group-items]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`${this._hidden==="true"?h:l`
|
|
1240
1240
|
<div
|
|
1241
1241
|
rtgcmd-group
|
|
1242
1242
|
part="dropdown-menu-group"
|
|
@@ -1249,7 +1249,7 @@
|
|
|
1249
1249
|
|
|
1250
1250
|
<div rtgcmd-group-items role="group"></div>
|
|
1251
1251
|
</div>
|
|
1252
|
-
`}`}};ki([a({type:String})],vo.prototype,"heading",2);ki([a({attribute:"id",type:String})],vo.prototype,"_id",2);ki([a({attribute:"aria-hidden",type:String})],vo.prototype,"_hidden",2);vo=ki([p("pont-dropdown-menu-group")],vo);var
|
|
1252
|
+
`}`}};ki([a({type:String})],vo.prototype,"heading",2);ki([a({attribute:"id",type:String})],vo.prototype,"_id",2);ki([a({attribute:"aria-hidden",type:String})],vo.prototype,"_hidden",2);vo=ki([p("pont-dropdown-menu-group")],vo);var zv=Object.defineProperty,Vv=Object.getOwnPropertyDescriptor,Bn=(e,t,r,o)=>{for(var n=o>1?void 0:o?Vv(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&&zv(t,r,n),n};let zr=class extends y{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=dropdown-menu-item]")}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof $t);)e=e.parentElement;return e}handleMouseEvent(e){console.log(e,this.value),(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}handleClickDefault(){this._dropdownMenu.isOpen=!1}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l` ${this._hidden==="true"?h:l`
|
|
1253
1253
|
<div
|
|
1254
1254
|
rtgcmd-item
|
|
1255
1255
|
part="dropdown-menu-item"
|
|
@@ -1265,7 +1265,7 @@
|
|
|
1265
1265
|
@click="${this.handleClickDefault}"
|
|
1266
1266
|
class=${m(Tt.item,this.className)}
|
|
1267
1267
|
></div>
|
|
1268
|
-
`}`}};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
|
|
1268
|
+
`}`}};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 Hv=Object.defineProperty,Gv=Object.getOwnPropertyDescriptor,Yr=(e,t,r,o)=>{for(var n=o>1?void 0:o?Gv(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&&Hv(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`
|
|
1269
1269
|
<div
|
|
1270
1270
|
rtgcmd-item
|
|
1271
1271
|
part="dropdown-menu-radio"
|
|
@@ -1300,90 +1300,95 @@
|
|
|
1300
1300
|
</span>
|
|
1301
1301
|
<div part="dropdown-menu-radio-item-container"></div>
|
|
1302
1302
|
</div>
|
|
1303
|
-
`}};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
|
|
1303
|
+
`}};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 Kv=Object.getOwnPropertyDescriptor,Wv=(e,t,r,o)=>{for(var n=o>1?void 0:o?Kv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Fd=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
|
|
1304
1304
|
rtgcmd-separator
|
|
1305
1305
|
part="dropdown-menu-seperator"
|
|
1306
1306
|
role="separator"
|
|
1307
1307
|
class=${m(Tt.separator,this.className)}
|
|
1308
|
-
></div>`}};Fd=
|
|
1308
|
+
></div>`}};Fd=Wv([p("pont-dropdown-menu-separator")],Fd);var Yv=Object.getOwnPropertyDescriptor,Qv=(e,t,r,o)=>{for(var n=o>1?void 0:o?Yv(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("span[part=dropdown-menu-shortcut]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this.classList=m(Tt.shortcut),this}render(){return l`
|
|
1309
1309
|
<span
|
|
1310
1310
|
part="dropdown-menu-shortcut"
|
|
1311
1311
|
class=${m(Tt.shortcut,this.className)}
|
|
1312
1312
|
>
|
|
1313
1313
|
</span>
|
|
1314
|
-
`}};kd=
|
|
1314
|
+
`}};kd=Qv([p("pont-dropdown-menu-shortcut")],kd);var Zv=Object.getOwnPropertyDescriptor,Jv=(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 Nd=class extends f{createRenderRoot(){return this}render(){return l``}};Nd=Jv([p("pont-dropdown-menu-trigger")],Nd);var Xv=Object.defineProperty,tb=Object.getOwnPropertyDescriptor,rh=(e,t,r,o)=>{for(var n=o>1?void 0:o?tb(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&&Xv(t,r,n),n};let $t=class extends y{constructor(){super(...arguments),this.isOpen=!1,this.handleClickOutside=e=>{var r,o;const t=e.target;!((r=this._containerElement)!=null&&r.contains(t))&&!((o=this._triggerElement)!=null&&o.contains(t))&&(this.isOpen=!1,$t._openInstance===this&&($t._openInstance=null))}}get _triggerElement(){return this.querySelector("pont-dropdown-menu-trigger")}get _containerElement(){return this.querySelector("div[part=dropdown-menu]")}get _content(){return this.querySelector("pont-dropdown-menu-content")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected)}toggleDropdown(e){e.stopPropagation();const t=this.isOpen;this.isOpen=!this.isOpen,this.isOpen?($t._openInstance&&$t._openInstance!==this&&($t._openInstance.isOpen=!1),$t._openInstance=this):t&&$t._openInstance===this&&($t._openInstance=null)}disconnectedCallback(){$t._openInstance===this&&($t._openInstance=null),document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"close")}firstUpdated(e){var t;this.moveLightDomChildrenInto(this._containerElement),(t=this._triggerElement)==null||t.addEventListener("click",r=>this.toggleDropdown(r))}_handleRadioSelected(e){this.isOpen=!1,this.querySelectorAll("pont-dropdown-menu-radio-item").forEach(t=>{t!==e.target&&(t.checked=!1)})}createRenderRoot(){return this}render(){return l`
|
|
1315
1315
|
<div
|
|
1316
1316
|
part="dropdown-menu"
|
|
1317
1317
|
class=${m(Tt.root,this.className)}
|
|
1318
1318
|
></div>
|
|
1319
|
-
`}};$t._openInstance=null;rh([g()],$t.prototype,"isOpen",2);$t=rh([p("pont-dropdown-menu")],$t);var
|
|
1319
|
+
`}};$t._openInstance=null;rh([g()],$t.prototype,"isOpen",2);$t=rh([p("pont-dropdown-menu")],$t);var eb=Object.defineProperty,rb=Object.getOwnPropertyDescriptor,nh=(e,t,r,o)=>{for(var n=o>1?void 0:o?rb(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&&eb(t,r,n),n};let ia=class extends f{createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="empty"]')}firstUpdated(){const e=this._rootSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="empty" ?data-border="${this.border}"></div>`}};nh([a({type:Boolean})],ia.prototype,"border",2);ia=nh([p("pont-empty")],ia);var nb=Object.getOwnPropertyDescriptor,ob=(e,t,r,o)=>{for(var n=o>1?void 0:o?nb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Md=class extends f{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="empty-content"]')}firstUpdated(){const e=this._contentSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="empty-content"></div>`}};Md=ob([p("pont-empty-content")],Md);var ib=Object.getOwnPropertyDescriptor,sb=(e,t,r,o)=>{for(var n=o>1?void 0:o?ib(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Bd=class extends f{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="empty-description"]')}firstUpdated(){const e=this._descriptionSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="empty-description"></div>`}};Bd=sb([p("pont-empty-description")],Bd);var ab=Object.getOwnPropertyDescriptor,lb=(e,t,r,o)=>{for(var n=o>1?void 0:o?ab(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Ud=class extends f{createRenderRoot(){return this}get _headerSlot(){return this.querySelector('[data-slot="empty-header"]')}firstUpdated(){const e=this._headerSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="empty-header"></div>`}};Ud=lb([p("pont-empty-header")],Ud);var db=Object.defineProperty,cb=Object.getOwnPropertyDescriptor,oh=(e,t,r,o)=>{for(var n=o>1?void 0:o?cb(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&&db(t,r,n),n};let sa=class extends f{constructor(){super(...arguments),this.variant="default"}createRenderRoot(){return this}get _mediaSlot(){return this.querySelector('[data-slot="empty-media"]')}firstUpdated(){const e=this._mediaSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1320
1320
|
<div data-slot="empty-media" data-variant="${this.variant}"></div>
|
|
1321
|
-
`}};oh([a({type:String})],sa.prototype,"variant",2);sa=oh([p("pont-empty-media")],sa);var
|
|
1321
|
+
`}};oh([a({type:String})],sa.prototype,"variant",2);sa=oh([p("pont-empty-media")],sa);var pb=Object.getOwnPropertyDescriptor,hb=(e,t,r,o)=>{for(var n=o>1?void 0:o?pb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let jd=class extends f{createRenderRoot(){return this}get _titleSlot(){return this.querySelector('[data-slot="empty-title"]')}firstUpdated(){const e=this._titleSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="empty-title"></div>`}};jd=hb([p("pont-empty-title")],jd);var ub=Object.getOwnPropertyDescriptor,mb=(e,t,r,o)=>{for(var n=o>1?void 0:o?ub(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let qd=class extends f{createRenderRoot(){return this}get _setSlot(){return this.querySelector('[data-slot="field-set"]')}firstUpdated(){const e=this._setSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<fieldset data-slot="field-set"></fieldset>`}};qd=mb([p("pont-field-set")],qd);var gb=Object.defineProperty,fb=Object.getOwnPropertyDescriptor,ih=(e,t,r,o)=>{for(var n=o>1?void 0:o?fb(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&&gb(t,r,n),n};let aa=class extends f{constructor(){super(...arguments),this.variant="legend"}createRenderRoot(){return this}get _legendSlot(){return this.querySelector('[data-slot="field-legend"]')}firstUpdated(){const e=this._legendSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1322
1322
|
<legend data-slot="field-legend" data-variant=${this.variant}></legend>
|
|
1323
|
-
`}};ih([a({type:String})],aa.prototype,"variant",2);aa=ih([p("pont-field-legend")],aa);var
|
|
1323
|
+
`}};ih([a({type:String})],aa.prototype,"variant",2);aa=ih([p("pont-field-legend")],aa);var vb=Object.defineProperty,bb=Object.getOwnPropertyDescriptor,sh=(e,t,r,o)=>{for(var n=o>1?void 0:o?bb(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&&vb(t,r,n),n};let la=class extends f{constructor(){super(...arguments),this.type="field"}createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="field-group"]')}firstUpdated(){const e=this._groupSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="field-group" data-type=${this.type}></div>`}};sh([a({type:String})],la.prototype,"type",2);la=sh([p("pont-field-group")],la);var yb=Object.defineProperty,_b=Object.getOwnPropertyDescriptor,Ni=(e,t,r,o)=>{for(var n=o>1?void 0:o?_b(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&&yb(t,r,n),n};let bo=class extends f{constructor(){super(...arguments),this.orientation="vertical"}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="field"]')}firstUpdated(){const e=this._rootSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1324
1324
|
<div
|
|
1325
|
+
data-pont-field
|
|
1325
1326
|
data-slot="field"
|
|
1326
1327
|
data-orientation=${this.orientation}
|
|
1327
1328
|
data-disabled=${this.disabled?"true":h}
|
|
1328
1329
|
data-invalid=${this.invalid?"true":h}
|
|
1329
1330
|
role="group"
|
|
1330
1331
|
></div>
|
|
1331
|
-
`}};Ni([a({type:String})],bo.prototype,"orientation",2);Ni([a({type:Boolean})],bo.prototype,"disabled",2);Ni([a({type:Boolean})],bo.prototype,"invalid",2);bo=Ni([p("pont-field")],bo);var
|
|
1332
|
-
<pont-label
|
|
1333
|
-
|
|
1332
|
+
`}};Ni([a({type:String})],bo.prototype,"orientation",2);Ni([a({type:Boolean})],bo.prototype,"disabled",2);Ni([a({type:Boolean})],bo.prototype,"invalid",2);bo=Ni([p("pont-field")],bo);var wb=Object.getOwnPropertyDescriptor,$b=(e,t,r,o)=>{for(var n=o>1?void 0:o?wb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let zd=class extends f{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="field-content"]')}firstUpdated(){const e=this._contentSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="field-content"></div>`}};zd=$b([p("pont-field-content")],zd);var Pb=Object.defineProperty,Cb=Object.getOwnPropertyDescriptor,ah=(e,t,r,o)=>{for(var n=o>1?void 0:o?Cb(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&&Pb(t,r,n),n};let da=class extends f{get _rootSlot(){return this.querySelector('[data-slot="label"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<label data-slot="label" for=${this.for??h}></label>`}};ah([a({type:String})],da.prototype,"for",2);da=ah([p("pont-label")],da);var Eb=Object.defineProperty,Sb=Object.getOwnPropertyDescriptor,lh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Sb(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&&Eb(t,r,n),n};let ca=class extends f{createRenderRoot(){return this}get _labelSlot(){return this.querySelector('[data-slot="field-label"]')}firstUpdated(){const e=this._labelSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1333
|
+
<pont-label
|
|
1334
|
+
data-pont-field-label
|
|
1335
|
+
data-slot="field-label"
|
|
1336
|
+
data-for=${this.for??h}
|
|
1337
|
+
></pont-label>
|
|
1338
|
+
`}};lh([a({type:String})],ca.prototype,"for",2);ca=lh([p("pont-field-label")],ca);var xb=Object.getOwnPropertyDescriptor,Ob=(e,t,r,o)=>{for(var n=o>1?void 0:o?xb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Vd=class extends f{createRenderRoot(){return this}get _titleSlot(){return this.querySelector('[data-slot="field-label"]')}firstUpdated(){const e=this._titleSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="field-label"></div>`}};Vd=Ob([p("pont-field-title")],Vd);var Rb=Object.getOwnPropertyDescriptor,Ib=(e,t,r,o)=>{for(var n=o>1?void 0:o?Rb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Hd=class extends f{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="field-description"]')}firstUpdated(){const e=this._descriptionSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="field-description"></p>`}};Hd=Ib([p("pont-field-description")],Hd);var Ab=Object.getOwnPropertyDescriptor,Tb=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ab(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Gd=class extends f{constructor(){super(...arguments),this._observer=null}createRenderRoot(){return this}get _separatorSlot(){return this.querySelector('[data-slot="field-separator"]')}get _contentSlot(){return this.querySelector('[data-slot="field-separator-content"]')}_getExternalNodes(){const e=this._separatorSlot;return Array.from(this.childNodes).filter(t=>{var r;return!(t===e||t.nodeType===Node.COMMENT_NODE||t.nodeType===Node.TEXT_NODE&&!((r=t.textContent)!=null&&r.trim()))})}_processChildren(){const e=this._separatorSlot;if(!e)return;const t=this._getExternalNodes();if(t.length>0){let r=this._contentSlot;r||(r=document.createElement("span"),r.setAttribute("data-slot","field-separator-content"),e.appendChild(r)),t.forEach(o=>r.appendChild(o)),e.setAttribute("data-content","true")}else{const r=this._contentSlot;r&&e.removeChild(r),e.setAttribute("data-content","false")}}firstUpdated(){this._processChildren(),this._observer=new MutationObserver(()=>{this._observer.disconnect(),this._processChildren(),this._observer.observe(this,{childList:!0})}),this._observer.observe(this,{childList:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._observer)==null||e.disconnect(),this._observer=null}render(){return l`
|
|
1334
1339
|
<div data-slot="field-separator">
|
|
1335
1340
|
<pont-separator></pont-separator>
|
|
1336
1341
|
<span data-slot="field-separator-content"></span>
|
|
1337
1342
|
</div>
|
|
1338
|
-
`}};Gd=
|
|
1343
|
+
`}};Gd=Tb([p("pont-field-separator")],Gd);var Db=Object.defineProperty,Lb=Object.getOwnPropertyDescriptor,dh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Lb(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&&Db(t,r,n),n};let pa=class extends f{constructor(){super(...arguments),this._hasUserContent=!1}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._hasUserContent=this.innerHTML.trim().length>0}_renderContent(){var t,r;if(!((t=this.errors)!=null&&t.length))return null;const e=[...new Map(this.errors.map(o=>[o==null?void 0:o.message,o])).values()];return e.length===1?(r=e[0])!=null&&r.message?e[0].message:null:l`
|
|
1339
1344
|
<ul data-slot="field-error-content">
|
|
1340
1345
|
${e.map((o,n)=>o!=null&&o.message?l`<li key=${n}>${o.message}</li>`:h)}
|
|
1341
1346
|
</ul>
|
|
1342
|
-
`}render(){const e=this._hasUserContent,t=this._renderContent();if(e){const r=Array.from(this.childNodes);return l` <div data-slot="field-error" role="alert">${r}</div>`}return t?l` <div data-slot="field-error" role="alert">${t}</div>`:(this.style.display="none",h)}};dh([a({type:Array})],pa.prototype,"errors",2);pa=dh([p("pont-field-error")],pa);class ch{constructor(){this.values={},this.errors={},this.validators={},this.subscribers=new Set}registerField({name:t,defaultValue:r="",validator:o}){t in this.values||(this.values[t]=r),o&&(this.validators[t]=o)}unregisterField(t){delete this.values[t],delete this.errors[t],delete this.validators[t]}setValue(t,r){t in this.validators||console.warn(`[FormController] setValue called before validator was registered for "${t}"`),this.values[t]=r,this.validateField(t),this.notify()}getValue(t){return this.values[t]}getError(t){return this.errors[t]??null}validateField(t){const r=this.validators[t],o=this.values[t],n=r?r(o):null;return this.errors[t]=n,this.notify(),!n}validateAll(){let t=!0;return Object.keys(this.validators).forEach(r=>{this.validateField(r)||(t=!1)}),t}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}notify(){this.subscribers.forEach(t=>t())}getValues(){return{...this.values}}getErrors(){return{...this.errors}}}const Oo="pont-form-context",ps=new WeakMap,
|
|
1347
|
+
`}render(){const e=this._hasUserContent,t=this._renderContent();if(e){const r=Array.from(this.childNodes);return l` <div data-slot="field-error" role="alert">${r}</div>`}return t?l` <div data-slot="field-error" role="alert">${t}</div>`:(this.style.display="none",h)}};dh([a({type:Array})],pa.prototype,"errors",2);pa=dh([p("pont-field-error")],pa);class ch{constructor(){this.values={},this.errors={},this.validators={},this.subscribers=new Set}registerField({name:t,defaultValue:r="",validator:o}){t in this.values||(this.values[t]=r),o&&(this.validators[t]=o)}unregisterField(t){delete this.values[t],delete this.errors[t],delete this.validators[t]}setValue(t,r){t in this.validators||console.warn(`[FormController] setValue called before validator was registered for "${t}"`),this.values[t]=r,this.validateField(t),this.notify()}getValue(t){return this.values[t]}getError(t){return this.errors[t]??null}validateField(t){const r=this.validators[t],o=this.values[t],n=r?r(o):null;return this.errors[t]=n,this.notify(),!n}validateAll(){let t=!0;return Object.keys(this.validators).forEach(r=>{this.validateField(r)||(t=!1)}),t}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}notify(){this.subscribers.forEach(t=>t())}getValues(){return{...this.values}}getErrors(){return{...this.errors}}}const Oo="pont-form-context",ps=new WeakMap,Fb=An(class extends Fp{render(e){return h}update(e,[t]){var o;const r=t!==this.G;return r&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=t,this.ht=(o=e.options)==null?void 0:o.host,this.rt(this.ct=e.element)),h}rt(e){if(this.G!==void 0)if(this.isConnected||(e=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let r=ps.get(t);r===void 0&&(r=new WeakMap,ps.set(t,r)),r.get(this.G)!==void 0&&this.G.call(this.ht,void 0),r.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){var e,t;return typeof this.G=="function"?(e=ps.get(this.ht??globalThis))==null?void 0:e.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var kb=Object.defineProperty,Nb=Object.getOwnPropertyDescriptor,ph=(e,t,r,o)=>{for(var n=o>1?void 0:o?Nb(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&&kb(t,r,n),n};let ha=class extends y{constructor(){super(...arguments),this.form=new ch,this.handleSubmit=e=>{if(e.preventDefault(),this.form.validateAll()){const r=this.form.getValues();alert(JSON.stringify(r,null,2))}}}createRenderRoot(){return this}async firstUpdated(e){await this.updateComplete,Array.from(this.childNodes).forEach(t=>{t!==this.formElement&&this.formElement.appendChild(t)}),this.querySelectorAll("pont-form-field").forEach(t=>{const r=t.getAttribute("name"),o=t.validators,n=o==null?void 0:o[0];this.form.registerField({name:r,validator:n})})}render(){return l`
|
|
1343
1348
|
<form
|
|
1344
1349
|
part="form-controller"
|
|
1345
1350
|
class="${m("",this.className)}"
|
|
1346
1351
|
@submit=${this.handleSubmit}
|
|
1347
|
-
${
|
|
1352
|
+
${Fb(e=>this.formElement=e)}
|
|
1348
1353
|
></form>
|
|
1349
|
-
`}};ph([g(),Wt({context:Oo})],ha.prototype,"form",2);ha=ph([p("pont-form-controller")],ha);const hh="pont-form-item-context",
|
|
1354
|
+
`}};ph([g(),Wt({context:Oo})],ha.prototype,"form",2);ha=ph([p("pont-form-controller")],ha);const hh="pont-form-item-context",Mb="pont-space-form-space-y",Bb="pont-text-form-description-font pont-text-form-description-color-text pont-mt-form-description-space-mt",Ub="pont-space-y-form-field-space-y",jb="pont-space-y-form-item-space-y",qb="pont-text-form-label-font pont-mb-form-label-space-mb pont-font-form-label-font-weight pont-peer-disabled:pont-cursor-not-allowed peer-disabled:pont-opacity-form-label-opacity-peer-disabled",zb="pont-text-form-label-color-text-error",Vb="pont-text-form-message-font-size pont-text-form-message-color-text";var Hb=Object.defineProperty,Gb=Object.getOwnPropertyDescriptor,uh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Gb(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&&Hb(t,r,n),n};let ua=class extends y{createRenderRoot(){return this}get _desc(){return this.querySelector("p[part=form-description]")}firstUpdated(){this.moveLightDomChildrenInto(this._desc)}render(){return l`
|
|
1350
1355
|
<p
|
|
1351
1356
|
id="${this.itemContext.id}-description"
|
|
1352
1357
|
part="form-description"
|
|
1353
|
-
class="${m(
|
|
1358
|
+
class="${m(Bb,this.className)}"
|
|
1354
1359
|
></p>
|
|
1355
|
-
`}};uh([yt({context:hh})],ua.prototype,"itemContext",2);ua=uh([p("pont-form-description")],ua);const
|
|
1360
|
+
`}};uh([yt({context:hh})],ua.prototype,"itemContext",2);ua=uh([p("pont-form-description")],ua);const Kb="pont-form-field-context";var Wb=Object.defineProperty,Yb=Object.getOwnPropertyDescriptor,Un=(e,t,r,o)=>{for(var n=o>1?void 0:o?Yb(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&&Wb(t,r,n),n};let We=class extends y{constructor(){super(...arguments),this.name="",this.validators=[],this.defaultValue="",this.fieldName="",this.registered=!1}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-field]")}updated(){var t;if(this.registered||!this.form||!this.name)return;this.form.registerField({name:this.name,validator:r=>{for(const o of this.validators??[]){const n=o(r);if(n)return n}return null},defaultValue:this.defaultValue}),this.registered=!0,this.moveLightDomChildrenInto(this._container);const e=(t=this._container)==null?void 0:t.querySelector("pont-input, input, textarea, select");e&&(e.value=this.defaultValue??"",this.form.setValue(this.name,this.defaultValue??""),e.addEventListener("input",()=>{this.form.setValue(this.name,e.value)}))}disconnectedCallback(){var e;super.disconnectedCallback(),this.isConnected||(e=this.form)==null||e.unregisterField(this.name)}render(){return l`<div
|
|
1356
1361
|
part="form-field"
|
|
1357
|
-
class="${m(
|
|
1358
|
-
></div>`}};Un([yt({context:Oo})],We.prototype,"form",2);Un([a({type:String})],We.prototype,"name",2);Un([a({type:Array})],We.prototype,"validators",2);Un([a({type:String})],We.prototype,"defaultValue",2);Un([Wt({context:
|
|
1362
|
+
class="${m(Ub,this.className)}"
|
|
1363
|
+
></div>`}};Un([yt({context:Oo})],We.prototype,"form",2);Un([a({type:String})],We.prototype,"name",2);Un([a({type:Array})],We.prototype,"validators",2);Un([a({type:String})],We.prototype,"defaultValue",2);Un([Wt({context:Kb})],We.prototype,"fieldName",2);We=Un([p("pont-form-field")],We);var Qb=Object.defineProperty,Zb=Object.getOwnPropertyDescriptor,mh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Zb(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&&Qb(t,r,n),n};let ma=class extends y{constructor(){super(...arguments),this._generatedId=crypto.randomUUID(),this.itemContext={id:this._generatedId}}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-item]")}firstUpdated(){this.moveLightDomChildrenInto(this._container)}render(){return l`<div
|
|
1359
1364
|
part="form-item"
|
|
1360
|
-
class="${m(
|
|
1361
|
-
></div>`}};mh([Wt({context:hh})],ma.prototype,"itemContext",2);ma=mh([p("pont-form-item")],ma);var
|
|
1365
|
+
class="${m(jb,this.className)}"
|
|
1366
|
+
></div>`}};mh([Wt({context:hh})],ma.prototype,"itemContext",2);ma=mh([p("pont-form-item")],ma);var Jb=Object.defineProperty,Xb=Object.getOwnPropertyDescriptor,sl=(e,t,r,o)=>{for(var n=o>1?void 0:o?Xb(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&&Jb(t,r,n),n};let mi=class extends y{constructor(){super(...arguments),this.hasError=!1,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof We);)e=e.parentElement;return e}createRenderRoot(){return this}get _label(){return this.querySelector("label[part=form-label]")}firstUpdated(){this.moveLightDomChildrenInto(this._label)}connectedCallback(){super.connectedCallback();const e=this._field.name;this.hasError=!!this.form.getError(e),this.unsubscribe=this.form.subscribe(()=>{const t=this.form.getError(e);this.hasError=!!t,this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return l`
|
|
1362
1367
|
<label
|
|
1363
1368
|
part="form-label"
|
|
1364
1369
|
for="${this._field.name}"
|
|
1365
|
-
class="${m(
|
|
1370
|
+
class="${m(qb,this.hasError&&zb,this.className)}"
|
|
1366
1371
|
></label>
|
|
1367
|
-
`}};sl([yt({context:Oo})],mi.prototype,"form",2);sl([g()],mi.prototype,"hasError",2);mi=sl([p("pont-form-label")],mi);var
|
|
1372
|
+
`}};sl([yt({context:Oo})],mi.prototype,"form",2);sl([g()],mi.prototype,"hasError",2);mi=sl([p("pont-form-label")],mi);var ty=Object.defineProperty,ey=Object.getOwnPropertyDescriptor,al=(e,t,r,o)=>{for(var n=o>1?void 0:o?ey(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&&ty(t,r,n),n};let gi=class extends f{constructor(){super(...arguments),this.error=null,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof We);)e=e.parentElement;return e}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.error=this.form.getError(this._field.name),this.unsubscribe=this.form.subscribe(()=>{this.error=this.form.getErrors()[this._field.name],this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return this.error?l`<p
|
|
1368
1373
|
id="${this._field.name}-message"
|
|
1369
|
-
class="${m(
|
|
1374
|
+
class="${m(Vb,this.className)}"
|
|
1370
1375
|
>
|
|
1371
1376
|
${this.error}
|
|
1372
|
-
</p>`:null}};al([yt({context:Oo})],gi.prototype,"form",2);al([g()],gi.prototype,"error",2);gi=al([p("pont-form-message")],gi);var
|
|
1377
|
+
</p>`:null}};al([yt({context:Oo})],gi.prototype,"form",2);al([g()],gi.prototype,"error",2);gi=al([p("pont-form-message")],gi);var ry=Object.defineProperty,ny=Object.getOwnPropertyDescriptor,ll=(e,t,r,o)=>{for(var n=o>1?void 0:o?ny(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&&ry(t,r,n),n};let fi=class extends y{constructor(){super(...arguments),this.form=new ch,this.onSubmit=()=>{},this.handleSubmit=t=>{t.preventDefault(),this.form.validateAll()&&this.onSubmit(this.form.getValues())}}createRenderRoot(){return this}get _formElement(){return this.querySelector("form[part=form-root]")}firstUpdated(){this.moveLightDomChildrenInto(this._formElement)}render(){return l`
|
|
1373
1378
|
<form
|
|
1374
1379
|
part="form-root"
|
|
1375
1380
|
id="pont-form-root"
|
|
1376
1381
|
@submit=${this.handleSubmit}
|
|
1377
|
-
class="${m(
|
|
1382
|
+
class="${m(Mb,this.className)}"
|
|
1378
1383
|
></form>
|
|
1379
|
-
`}};ll([Wt({context:Oo})],fi.prototype,"form",2);ll([a({type:Function})],fi.prototype,"onSubmit",2);fi=ll([p("pont-form-root")],fi);const dl={root:[""],trigger:[""],content:["pont-fixed pont-z-50","pont-p-hover-card-content-space-p","pont-w-hover-card-content-space-w","pont-text-hover-card-content-color-text","pont-bg-hover-card-content-color-bg","pont-rounded-hover-card-content-radius pont-border-hover-card-content-width-border pont-border-hover-card-content-color-border pont-outline-hidden","pont-shadow-hover-card-content-shadow","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","data-[side=bottom]:pont-slide-in-from-top-2 data-[side=left]:pont-slide-in-from-right-2 data-[side=right]:pont-slide-in-from-left-2 data-[side=top]:pont-slide-in-from-bottom-2"]};var
|
|
1384
|
+
`}};ll([Wt({context:Oo})],fi.prototype,"form",2);ll([a({type:Function})],fi.prototype,"onSubmit",2);fi=ll([p("pont-form-root")],fi);const dl={root:[""],trigger:[""],content:["pont-fixed pont-z-50","pont-p-hover-card-content-space-p","pont-w-hover-card-content-space-w","pont-text-hover-card-content-color-text","pont-bg-hover-card-content-color-bg","pont-rounded-hover-card-content-radius pont-border-hover-card-content-width-border pont-border-hover-card-content-color-border pont-outline-hidden","pont-shadow-hover-card-content-shadow","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","data-[side=bottom]:pont-slide-in-from-top-2 data-[side=left]:pont-slide-in-from-right-2 data-[side=right]:pont-slide-in-from-left-2 data-[side=top]:pont-slide-in-from-bottom-2"]};var oy=Object.defineProperty,iy=Object.getOwnPropertyDescriptor,cl=(e,t,r,o)=>{for(var n=o>1?void 0:o?iy(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&&oy(t,r,n),n};let vi=class extends y{constructor(){super(...arguments),this.state="closed",this.isOpen=!1,this.onStateChange=e=>{const t=e.detail.isOpen;this.state=t?"open":"closed"},this.handlePointerLeaveCheck=e=>{this.contains(e.relatedTarget)||(this.isOpen=!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("hover-card-state-change",this.onStateChange),this.addEventListener("mouseenter",this.handlePointerLeaveCheck),this.addEventListener("mouseleave",this.handlePointerLeaveCheck)}disconnectedCallback(){document.removeEventListener("hover-card-state-change",this.onStateChange),this.removeEventListener("mouseenter",this.handlePointerLeaveCheck),this.removeEventListener("mouseleave",this.handlePointerLeaveCheck),super.disconnectedCallback()}updated(e){super.updated(e),this.isOpen=this.state==="open"}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.moveLightDomChildrenInto(this.renderRoot.querySelector("#pont-hover-card-content"))}render(){return l`
|
|
1380
1385
|
<div
|
|
1381
1386
|
id="pont-hover-card-content"
|
|
1382
1387
|
part="hover-card-content"
|
|
1383
1388
|
class=${m(dl.content,this.className)}
|
|
1384
1389
|
style="display: ${this.isOpen?"block":"none"};"
|
|
1385
1390
|
></div>
|
|
1386
|
-
`}};cl([a({attribute:"data-state",type:String})],vi.prototype,"state",2);cl([g()],vi.prototype,"isOpen",2);vi=cl([p("pont-hover-card-content")],vi);var
|
|
1391
|
+
`}};cl([a({attribute:"data-state",type:String})],vi.prototype,"state",2);cl([g()],vi.prototype,"isOpen",2);vi=cl([p("pont-hover-card-content")],vi);var sy=Object.getOwnPropertyDescriptor,ay=(e,t,r,o)=>{for(var n=o>1?void 0:o?sy(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{getAttributesToExclude(){return["value","defaultValue"]}createRenderRoot(){return this}firstUpdated(e){this.removeDuplicateContent()}render(){return l`
|
|
1387
1392
|
<div
|
|
1388
1393
|
id="pont-hover-card-trigger"
|
|
1389
1394
|
part="pont-hover-card-trigger"
|
|
@@ -1391,20 +1396,20 @@
|
|
|
1391
1396
|
>
|
|
1392
1397
|
${Array.from(this.children)}
|
|
1393
1398
|
</div>
|
|
1394
|
-
`}};Kd=
|
|
1399
|
+
`}};Kd=ay([p("pont-hover-card-trigger")],Kd);var ly=Object.defineProperty,dy=Object.getOwnPropertyDescriptor,gh=(e,t,r,o)=>{for(var n=o>1?void 0:o?dy(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&&ly(t,r,n),n};let ga=class extends y{constructor(){super(...arguments),this.isOpen=!1,this.hoverTimeout=null,this.openCard=()=>{var e;this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null),this.isOpen||(this.isOpen=!0,(e=this._content)==null||e.dispatchEvent(new CustomEvent("hover-card-state-change",{detail:{isOpen:!0}})))},this.closeCard=()=>{this.hoverTimeout=setTimeout(()=>{var e;this.isOpen=!1,(e=this._content)==null||e.dispatchEvent(new CustomEvent("hover-card-state-change",{detail:{isOpen:!1}}))},150)}}get _containerElement(){return this.renderRoot.querySelector("#pont-hover-card-container")}get _content(){return this.renderRoot.querySelector("pont-hover-card-content")}get _trigger(){return this.renderRoot.querySelector("pont-hover-card-trigger")}getAttributesToExclude(){return[]}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}connectedCallback(){super.connectedCallback()}disconnectedCallback(){const e=this._trigger,t=this._content;e==null||e.removeEventListener("mouseenter",this.openCard),e==null||e.removeEventListener("mouseleave",this.closeCard),t==null||t.removeEventListener("mouseenter",this.openCard),t==null||t.removeEventListener("mouseleave",this.closeCard),this.hoverTimeout&&clearTimeout(this.hoverTimeout),super.disconnectedCallback()}createRenderRoot(){return this}firstUpdated(e){const t=this._containerElement;this.moveLightDomChildrenInto(t);const r=this._trigger,o=this._content;r==null||r.addEventListener("mouseenter",this.openCard),r==null||r.addEventListener("mouseleave",this.closeCard),o==null||o.addEventListener("mouseenter",this.openCard),o==null||o.addEventListener("mouseleave",this.closeCard)}render(){return l`
|
|
1395
1400
|
<div
|
|
1396
1401
|
id="pont-hover-card-container"
|
|
1397
1402
|
part="hover-card"
|
|
1398
1403
|
class=${m(dl.root,this.className)}
|
|
1399
1404
|
></div>
|
|
1400
|
-
`}};gh([g()],ga.prototype,"isOpen",2);ga=gh([p("pont-hover-card")],ga);var
|
|
1405
|
+
`}};gh([g()],ga.prototype,"isOpen",2);ga=gh([p("pont-hover-card")],ga);var cy=Object.getOwnPropertyDescriptor,py=(e,t,r,o)=>{for(var n=o>1?void 0:o?cy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Wd=class extends f{createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="input-group"]')}firstUpdated(){const e=this._rootSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="input-group" role="group"></div>`}};Wd=py([p("pont-input-group")],Wd);var hy=Object.defineProperty,uy=Object.getOwnPropertyDescriptor,pl=(e,t,r,o)=>{for(var n=o>1?void 0:o?uy(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&&hy(t,r,n),n};let bi=class extends f{constructor(){super(...arguments),this.align="inline-start"}createRenderRoot(){return this}get _addonSlot(){return this.querySelector('[data-slot="input-group-addon"]')}firstUpdated(){const e=this._addonSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1401
1406
|
<div
|
|
1402
1407
|
data-slot="input-group-addon"
|
|
1403
1408
|
data-align="${this.align}"
|
|
1404
1409
|
?data-border="${this.border}"
|
|
1405
1410
|
role="group"
|
|
1406
1411
|
></div>
|
|
1407
|
-
`}};pl([a({type:String})],bi.prototype,"align",2);pl([a({type:Boolean})],bi.prototype,"border",2);bi=pl([p("pont-input-group-addon")],bi);var
|
|
1412
|
+
`}};pl([a({type:String})],bi.prototype,"align",2);pl([a({type:Boolean})],bi.prototype,"border",2);bi=pl([p("pont-input-group-addon")],bi);var my=Object.defineProperty,gy=Object.getOwnPropertyDescriptor,tr=(e,t,r,o)=>{for(var n=o>1?void 0:o?gy(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&&my(t,r,n),n};let xe=class extends f{constructor(){super(...arguments),this.variant="ghost",this.size="xs",this.type="button"}createRenderRoot(){return this}get _buttonSlot(){return this.querySelector('[data-slot="input-group-button"]')}firstUpdated(){const e=this._buttonSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1408
1413
|
<pont-button
|
|
1409
1414
|
data-slot="input-group-button"
|
|
1410
1415
|
.variant=${this.variant}
|
|
@@ -1416,7 +1421,7 @@
|
|
|
1416
1421
|
.target=${this.target}
|
|
1417
1422
|
.onclick=${this.onClick}
|
|
1418
1423
|
></pont-button>
|
|
1419
|
-
`}};tr([a({type:String})],xe.prototype,"variant",2);tr([a({type:String})],xe.prototype,"size",2);tr([a({type:String})],xe.prototype,"type",2);tr([a({type:Boolean})],xe.prototype,"disabled",2);tr([a({type:Boolean})],xe.prototype,"invalid",2);tr([a({type:String})],xe.prototype,"href",2);tr([a({type:String})],xe.prototype,"target",2);tr([a({attribute:!1,type:Function})],xe.prototype,"onClick",2);xe=tr([p("pont-input-group-button")],xe);var
|
|
1424
|
+
`}};tr([a({type:String})],xe.prototype,"variant",2);tr([a({type:String})],xe.prototype,"size",2);tr([a({type:String})],xe.prototype,"type",2);tr([a({type:Boolean})],xe.prototype,"disabled",2);tr([a({type:Boolean})],xe.prototype,"invalid",2);tr([a({type:String})],xe.prototype,"href",2);tr([a({type:String})],xe.prototype,"target",2);tr([a({attribute:!1,type:Function})],xe.prototype,"onClick",2);xe=tr([p("pont-input-group-button")],xe);var fy=Object.defineProperty,vy=Object.getOwnPropertyDescriptor,J=(e,t,r,o)=>{for(var n=o>1?void 0:o?vy(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&&fy(t,r,n),n};let W=class extends f{constructor(){super(...arguments),this.id="",this.type="text",this._onClick=e=>{this.onClick&&this.onClick(e)},this._onInput=e=>{const t=e.target;this.value=t.value,this.onInput&&this.onInput(e)},this._onChange=e=>{const t=e.target;this.value=t.value,this.onChange&&this.onChange(e)},this._onFocus=e=>{this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),this.onFocus&&this.onFocus(e)},this._onBlur=e=>{this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),this.onBlur&&this.onBlur(e)}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id"))}firstUpdated(){this._inputId=this.id,this.removeAttribute("id")}render(){return l`
|
|
1420
1425
|
<input
|
|
1421
1426
|
data-slot="input"
|
|
1422
1427
|
accept=${this.type==="file"&&this.accept?this.accept:h}
|
|
@@ -1446,7 +1451,7 @@
|
|
|
1446
1451
|
@focus=${this._onFocus}
|
|
1447
1452
|
@blur=${this._onBlur}
|
|
1448
1453
|
/>
|
|
1449
|
-
`}};J([a({type:String})],W.prototype,"accept",2);J([a({type:String})],W.prototype,"autocomplete",2);J([a({type:Boolean})],W.prototype,"disabled",2);J([a({type:String})],W.prototype,"form",2);J([a({type:String})],W.prototype,"id",2);J([a({type:Boolean})],W.prototype,"invalid",2);J([a({type:Number})],W.prototype,"max",2);J([a({type:Number})],W.prototype,"maxlength",2);J([a({type:Number})],W.prototype,"min",2);J([a({type:Number})],W.prototype,"minlength",2);J([a({type:Boolean})],W.prototype,"multiple",2);J([a({type:String})],W.prototype,"name",2);J([a({type:String})],W.prototype,"pattern",2);J([a({type:String})],W.prototype,"placeholder",2);J([a({type:Boolean})],W.prototype,"readonly",2);J([a({type:Boolean})],W.prototype,"required",2);J([a({type:Number})],W.prototype,"step",2);J([a({type:String})],W.prototype,"type",2);J([a({type:String})],W.prototype,"value",2);J([a({attribute:!1})],W.prototype,"onClick",2);J([a({attribute:!1})],W.prototype,"onInput",2);J([a({attribute:!1})],W.prototype,"onChange",2);J([a({attribute:!1})],W.prototype,"onFocus",2);J([a({attribute:!1})],W.prototype,"onBlur",2);W=J([p("pont-input")],W);var
|
|
1454
|
+
`}};J([a({type:String})],W.prototype,"accept",2);J([a({type:String})],W.prototype,"autocomplete",2);J([a({type:Boolean})],W.prototype,"disabled",2);J([a({type:String})],W.prototype,"form",2);J([a({type:String})],W.prototype,"id",2);J([a({type:Boolean})],W.prototype,"invalid",2);J([a({type:Number})],W.prototype,"max",2);J([a({type:Number})],W.prototype,"maxlength",2);J([a({type:Number})],W.prototype,"min",2);J([a({type:Number})],W.prototype,"minlength",2);J([a({type:Boolean})],W.prototype,"multiple",2);J([a({type:String})],W.prototype,"name",2);J([a({type:String})],W.prototype,"pattern",2);J([a({type:String})],W.prototype,"placeholder",2);J([a({type:Boolean})],W.prototype,"readonly",2);J([a({type:Boolean})],W.prototype,"required",2);J([a({type:Number})],W.prototype,"step",2);J([a({type:String})],W.prototype,"type",2);J([a({type:String})],W.prototype,"value",2);J([a({attribute:!1})],W.prototype,"onClick",2);J([a({attribute:!1})],W.prototype,"onInput",2);J([a({attribute:!1})],W.prototype,"onChange",2);J([a({attribute:!1})],W.prototype,"onFocus",2);J([a({attribute:!1})],W.prototype,"onBlur",2);W=J([p("pont-input")],W);var by=Object.defineProperty,yy=Object.getOwnPropertyDescriptor,X=(e,t,r,o)=>{for(var n=o>1?void 0:o?yy(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&&by(t,r,n),n};let Y=class extends f{constructor(){super(...arguments),this.id="",this.type="text"}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id"))}firstUpdated(){this._inputId=this.id,this.removeAttribute("id")}render(){return l`
|
|
1450
1455
|
<pont-input
|
|
1451
1456
|
data-slot="input-group-input"
|
|
1452
1457
|
.accept=${this.accept}
|
|
@@ -1474,8 +1479,9 @@
|
|
|
1474
1479
|
.onFocus=${this.onFocus}
|
|
1475
1480
|
.onBlur=${this.onBlur}
|
|
1476
1481
|
></pont-input>
|
|
1477
|
-
`}};X([a({type:String})],Y.prototype,"accept",2);X([a({type:String})],Y.prototype,"autocomplete",2);X([a({type:Boolean})],Y.prototype,"disabled",2);X([a({type:String})],Y.prototype,"form",2);X([a({type:String})],Y.prototype,"id",2);X([a({type:Boolean})],Y.prototype,"invalid",2);X([a({type:Number})],Y.prototype,"max",2);X([a({type:Number})],Y.prototype,"maxlength",2);X([a({type:Number})],Y.prototype,"min",2);X([a({type:Number})],Y.prototype,"minlength",2);X([a({type:Boolean})],Y.prototype,"multiple",2);X([a({type:String})],Y.prototype,"name",2);X([a({type:String})],Y.prototype,"pattern",2);X([a({type:String})],Y.prototype,"placeholder",2);X([a({type:Boolean})],Y.prototype,"readonly",2);X([a({type:Boolean})],Y.prototype,"required",2);X([a({type:Number})],Y.prototype,"step",2);X([a({type:String})],Y.prototype,"type",2);X([a({type:String})],Y.prototype,"value",2);X([a({attribute:!1})],Y.prototype,"onClick",2);X([a({attribute:!1})],Y.prototype,"onInput",2);X([a({attribute:!1})],Y.prototype,"onChange",2);X([a({attribute:!1})],Y.prototype,"onFocus",2);X([a({attribute:!1})],Y.prototype,"onBlur",2);Y=X([p("pont-input-group-input")],Y);var
|
|
1482
|
+
`}};X([a({type:String})],Y.prototype,"accept",2);X([a({type:String})],Y.prototype,"autocomplete",2);X([a({type:Boolean})],Y.prototype,"disabled",2);X([a({type:String})],Y.prototype,"form",2);X([a({type:String})],Y.prototype,"id",2);X([a({type:Boolean})],Y.prototype,"invalid",2);X([a({type:Number})],Y.prototype,"max",2);X([a({type:Number})],Y.prototype,"maxlength",2);X([a({type:Number})],Y.prototype,"min",2);X([a({type:Number})],Y.prototype,"minlength",2);X([a({type:Boolean})],Y.prototype,"multiple",2);X([a({type:String})],Y.prototype,"name",2);X([a({type:String})],Y.prototype,"pattern",2);X([a({type:String})],Y.prototype,"placeholder",2);X([a({type:Boolean})],Y.prototype,"readonly",2);X([a({type:Boolean})],Y.prototype,"required",2);X([a({type:Number})],Y.prototype,"step",2);X([a({type:String})],Y.prototype,"type",2);X([a({type:String})],Y.prototype,"value",2);X([a({attribute:!1})],Y.prototype,"onClick",2);X([a({attribute:!1})],Y.prototype,"onInput",2);X([a({attribute:!1})],Y.prototype,"onChange",2);X([a({attribute:!1})],Y.prototype,"onFocus",2);X([a({attribute:!1})],Y.prototype,"onBlur",2);Y=X([p("pont-input-group-input")],Y);var _y=Object.getOwnPropertyDescriptor,wy=(e,t,r,o)=>{for(var n=o>1?void 0:o?_y(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Yd=class extends f{createRenderRoot(){return this}get _textSlot(){return this.querySelector('[data-slot="input-group-text"]')}firstUpdated(){const e=this._textSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<span data-slot="input-group-text"></span>`}};Yd=wy([p("pont-input-group-text")],Yd);var $y=Object.defineProperty,Py=Object.getOwnPropertyDescriptor,ut=(e,t,r,o)=>{for(var n=o>1?void 0:o?Py(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&&$y(t,r,n),n};let st=class extends f{constructor(){super(...arguments),this.id="",this._onInput=e=>{const t=e.target;this.value=t.value,this.onInput&&this.onInput(e)},this._onChange=e=>{const t=e.target;this.value=t.value,this.onChange&&this.onChange(e)},this._onFocus=e=>{this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),this.onFocus&&this.onFocus(e)},this._onBlur=e=>{this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),this.onBlur&&this.onBlur(e)}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._textareaId=this.id),this.removeAttribute("id"))}firstUpdated(){this._textareaId=this.id,this.removeAttribute("id")}render(){return l`
|
|
1478
1483
|
<textarea
|
|
1484
|
+
data-pont-textarea
|
|
1479
1485
|
data-slot="textarea"
|
|
1480
1486
|
autocapitalize=${this.autocapitalize?this.autocapitalize:h}
|
|
1481
1487
|
autocomplete=${this.autocomplete??h}
|
|
@@ -1503,7 +1509,7 @@
|
|
|
1503
1509
|
@focus=${this._onFocus}
|
|
1504
1510
|
@blur=${this._onBlur}
|
|
1505
1511
|
></textarea>
|
|
1506
|
-
`}};ut([a({type:String})],st.prototype,"autocomplete",2);ut([a({type:Number})],st.prototype,"cols",2);ut([a({type:Boolean})],st.prototype,"disabled",2);ut([a({type:String})],st.prototype,"form",2);ut([a({type:String})],st.prototype,"id",2);ut([a({type:Boolean})],st.prototype,"invalid",2);ut([a({type:Number})],st.prototype,"maxlength",2);ut([a({type:Number})],st.prototype,"minlength",2);ut([a({type:String})],st.prototype,"name",2);ut([a({type:String})],st.prototype,"placeholder",2);ut([a({type:Boolean})],st.prototype,"readonly",2);ut([a({type:Boolean})],st.prototype,"required",2);ut([a({type:Number})],st.prototype,"rows",2);ut([a({type:String})],st.prototype,"wrap",2);ut([a({type:String})],st.prototype,"value",2);ut([a({attribute:!1})],st.prototype,"onInput",2);ut([a({attribute:!1})],st.prototype,"onChange",2);ut([a({attribute:!1})],st.prototype,"onFocus",2);ut([a({attribute:!1})],st.prototype,"onBlur",2);st=ut([p("pont-textarea")],st);var
|
|
1512
|
+
`}};ut([a({type:String})],st.prototype,"autocomplete",2);ut([a({type:Number})],st.prototype,"cols",2);ut([a({type:Boolean})],st.prototype,"disabled",2);ut([a({type:String})],st.prototype,"form",2);ut([a({type:String})],st.prototype,"id",2);ut([a({type:Boolean})],st.prototype,"invalid",2);ut([a({type:Number})],st.prototype,"maxlength",2);ut([a({type:Number})],st.prototype,"minlength",2);ut([a({type:String})],st.prototype,"name",2);ut([a({type:String})],st.prototype,"placeholder",2);ut([a({type:Boolean})],st.prototype,"readonly",2);ut([a({type:Boolean})],st.prototype,"required",2);ut([a({type:Number})],st.prototype,"rows",2);ut([a({type:String})],st.prototype,"wrap",2);ut([a({type:String})],st.prototype,"value",2);ut([a({attribute:!1})],st.prototype,"onInput",2);ut([a({attribute:!1})],st.prototype,"onChange",2);ut([a({attribute:!1})],st.prototype,"onFocus",2);ut([a({attribute:!1})],st.prototype,"onBlur",2);st=ut([p("pont-textarea")],st);var Cy=Object.defineProperty,Ey=Object.getOwnPropertyDescriptor,mt=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ey(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&&Cy(t,r,n),n};let at=class extends f{constructor(){super(...arguments),this.id=""}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._textareaId=this.id),this.removeAttribute("id"))}firstUpdated(){this._textareaId=this.id,this.removeAttribute("id")}render(){return l`
|
|
1507
1513
|
<pont-textarea
|
|
1508
1514
|
data-slot="input-group-textarea"
|
|
1509
1515
|
autocapitalize=${this.autocapitalize?this.autocapitalize:h}
|
|
@@ -1530,7 +1536,7 @@
|
|
|
1530
1536
|
.onfocus=${this.onFocus}
|
|
1531
1537
|
.onblur=${this.onBlur}
|
|
1532
1538
|
></pont-textarea>
|
|
1533
|
-
`}};mt([a({type:String})],at.prototype,"autocomplete",2);mt([a({type:Number})],at.prototype,"cols",2);mt([a({type:Boolean})],at.prototype,"disabled",2);mt([a({type:String})],at.prototype,"form",2);mt([a({type:String})],at.prototype,"id",2);mt([a({type:Boolean})],at.prototype,"invalid",2);mt([a({type:Number})],at.prototype,"maxlength",2);mt([a({type:Number})],at.prototype,"minlength",2);mt([a({type:String})],at.prototype,"name",2);mt([a({type:String})],at.prototype,"placeholder",2);mt([a({type:Boolean})],at.prototype,"readonly",2);mt([a({type:Boolean})],at.prototype,"required",2);mt([a({type:Number})],at.prototype,"rows",2);mt([a({type:String})],at.prototype,"wrap",2);mt([a({type:String})],at.prototype,"value",2);mt([a({attribute:!1})],at.prototype,"onInput",2);mt([a({attribute:!1})],at.prototype,"onChange",2);mt([a({attribute:!1})],at.prototype,"onFocus",2);mt([a({attribute:!1})],at.prototype,"onBlur",2);at=mt([p("pont-input-group-textarea")],at);var
|
|
1539
|
+
`}};mt([a({type:String})],at.prototype,"autocomplete",2);mt([a({type:Number})],at.prototype,"cols",2);mt([a({type:Boolean})],at.prototype,"disabled",2);mt([a({type:String})],at.prototype,"form",2);mt([a({type:String})],at.prototype,"id",2);mt([a({type:Boolean})],at.prototype,"invalid",2);mt([a({type:Number})],at.prototype,"maxlength",2);mt([a({type:Number})],at.prototype,"minlength",2);mt([a({type:String})],at.prototype,"name",2);mt([a({type:String})],at.prototype,"placeholder",2);mt([a({type:Boolean})],at.prototype,"readonly",2);mt([a({type:Boolean})],at.prototype,"required",2);mt([a({type:Number})],at.prototype,"rows",2);mt([a({type:String})],at.prototype,"wrap",2);mt([a({type:String})],at.prototype,"value",2);mt([a({attribute:!1})],at.prototype,"onInput",2);mt([a({attribute:!1})],at.prototype,"onChange",2);mt([a({attribute:!1})],at.prototype,"onFocus",2);mt([a({attribute:!1})],at.prototype,"onBlur",2);at=mt([p("pont-input-group-textarea")],at);var Sy=Object.defineProperty,xy=Object.getOwnPropertyDescriptor,ct=(e,t,r,o)=>{for(var n=o>1?void 0:o?xy(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&&Sy(t,r,n),n};let ot=class extends f{constructor(){super(),this.autocomplete="one-time-code",this.id="",this.inputmode="numeric",this._activeSlot=null,this._hasFocus=!1,this._value="",this._children=[],this._handleBlur=e=>{var t;this._hasFocus=!1,this._activeSlot=null,this._sync(),this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),(t=this.onBlur)==null||t.call(this,e)},this._handleFocus=e=>{var t;this._hasFocus=!0,this._activeSlot===null&&(this._activeSlot=this._computeInitialActiveSlot()),this._sync(),this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),(t=this.onFocus)==null||t.call(this,e)},this._handleKeyDown=e=>{if(this.disabled||!this._hasFocus)return;this._activeSlot===null&&(this._activeSlot=this._computeInitialActiveSlot());const t=e.key,r=this._currentValue??"";if(t==="ArrowLeft"){e.preventDefault(),this._activeSlot=this._clampIndex(this._activeSlot-1),this._sync();return}if(t==="ArrowRight"){e.preventDefault(),this._activeSlot=this._clampIndex(this._activeSlot+1),this._sync();return}if(t==="Home"){e.preventDefault(),this._activeSlot=0,this._sync();return}if(t==="End"){e.preventDefault(),this._activeSlot=Math.max(0,r.length-1),this._sync();return}if(t==="Backspace"){e.preventDefault(),this._deleteChar();return}if(t==="Delete"){if(e.preventDefault(),this._activeSlot!==null){const n=r.split("");n[this._activeSlot]="",this._updateValue(n.join("")),this._sync()}return}if(e.ctrlKey||e.metaKey||t.length!==1)return;const o=this._regex();o&&!o.test(t)||(e.preventDefault(),this._insertChar(t))},this._handlePaste=e=>{var c,u;if(this.disabled)return;e.preventDefault();let t=((c=e.clipboardData)==null?void 0:c.getData("text"))??"";this.pasteTransformer&&(t=this.pasteTransformer(t));const r=this._regex(),o=Array.from(t).filter(v=>r?r.test(v):!0);if(!o.length)return;const n=(this._currentValue??"").split("").slice(0,this.maxlength);for(;n.length<this.maxlength;)n.push("");let s=this._activeSlot??this._computeInitialActiveSlot();for(const v of o){if(s>=this.maxlength)break;n[s]=v,s++}const d=n.join("");this._updateValue(d),this._activeSlot=Math.min(s,this.maxlength-1),this._checkComplete(),this._sync(),(u=this.onPaste)==null||u.call(this,e)},this._children=Array.from(this.childNodes)}createRenderRoot(){return this}get _containerSlot(){return this.querySelector('[data-slot="input-otp-container"]')}get _wrapperSlot(){return this.querySelector('[data-slot="input-otp-wrapper"]')}get _slots(){return Array.from(this.querySelectorAll("pont-input-otp-slot"))}get _isControlled(){return this.value!==void 0}get _currentValue(){return this._isControlled?this.value:this._value}_inputEl(){return this.querySelector('[data-slot="input-otp"]')}_regex(){return this.pattern?new RegExp(this.pattern):null}_clampIndex(e){return Math.max(0,Math.min(e,this.maxlength-1))}_computeInitialActiveSlot(){const e=(this._currentValue??"").length;return e>=this.maxlength?this.maxlength-1:e}_createCaret(){const e=document.createElement("div");e.dataset.slot="input-otp-slot-caret-wrapper";const t=document.createElement("div");return t.dataset.slot="input-otp-slot-caret",e.appendChild(t),e}_sync(){const e=this._currentValue??"";this._slots.forEach(t=>{const r=t._slotSlot;if(!r)return;const o=e[t.index]??"",n=this._hasFocus&&!this.disabled&&t.index===this._activeSlot;r.dataset.state=n?"active":"inactive",o?r.textContent=o:r.textContent="";const i=n&&!o,s=r.querySelector('[data-slot="input-otp-caret-wrapper"]');i&&!s&&r.appendChild(this._createCaret()),!i&&s&&s.remove()})}_updateValue(e){var t;this._isControlled||(this._value=e),(t=this.onChange)==null||t.call(this,e)}_checkComplete(){var e,t;((e=this._currentValue)==null?void 0:e.length)===this.maxlength&&((t=this.onComplete)==null||t.call(this,this._currentValue))}_insertChar(e){if(this._activeSlot===null)return;const t=this._activeSlot,r=(this._currentValue??"").split("");r[t]=e;const o=r.join("").slice(0,this.maxlength);this._updateValue(o),this._activeSlot=this._clampIndex(this._activeSlot+1),this._checkComplete()}_deleteChar(){if(this._activeSlot===null)return;let e=this._activeSlot;const t=(this._currentValue??"").split("");e>0&&!t[e]&&e--,t[e]="",this._activeSlot=e,this._updateValue(t.join(""))}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id")),e.has("value")&&this._isControlled&&(this._value=this.value??""),this._sync()}firstUpdated(){this._inputId=this.id,this.removeAttribute("id"),this._value=this.value??this.defaultValue??"";const e=this._containerSlot,t=this._wrapperSlot;!e||!t||(this._children.forEach(r=>{e.insertBefore(r,t)}),this.addEventListener("pont-input-otp-slot:focus",r=>{var n;if(this.disabled)return;const{index:o}=r.detail;this._activeSlot=o,this._hasFocus=!0,(n=this._inputEl())==null||n.focus(),this._sync()}))}render(){return l`
|
|
1534
1540
|
<div data-slot="input-otp-container">
|
|
1535
1541
|
<div data-slot="input-otp-wrapper">
|
|
1536
1542
|
<input
|
|
@@ -1553,17 +1559,17 @@
|
|
|
1553
1559
|
/>
|
|
1554
1560
|
</div>
|
|
1555
1561
|
</div>
|
|
1556
|
-
`}};ct([a({type:String})],ot.prototype,"autocomplete",2);ct([a({attribute:"default-value",type:String})],ot.prototype,"defaultValue",2);ct([a({type:Boolean})],ot.prototype,"disabled",2);ct([a({type:String})],ot.prototype,"form",2);ct([a({type:String})],ot.prototype,"id",2);ct([a({type:String})],ot.prototype,"inputmode",2);ct([a({type:Number})],ot.prototype,"maxlength",2);ct([a({type:String})],ot.prototype,"name",2);ct([a({type:String})],ot.prototype,"pattern",2);ct([a({type:Boolean})],ot.prototype,"required",2);ct([a({type:String})],ot.prototype,"value",2);ct([a({attribute:!1})],ot.prototype,"onChange",2);ct([a({attribute:!1})],ot.prototype,"onComplete",2);ct([a({attribute:!1})],ot.prototype,"onBlur",2);ct([a({attribute:!1})],ot.prototype,"onFocus",2);ct([a({attribute:!1})],ot.prototype,"onPaste",2);ct([a({attribute:!1})],ot.prototype,"pasteTransformer",2);ct([g()],ot.prototype,"_activeSlot",2);ct([g()],ot.prototype,"_hasFocus",2);ct([g()],ot.prototype,"_value",2);ot=ct([p("pont-input-otp")],ot);var
|
|
1562
|
+
`}};ct([a({type:String})],ot.prototype,"autocomplete",2);ct([a({attribute:"default-value",type:String})],ot.prototype,"defaultValue",2);ct([a({type:Boolean})],ot.prototype,"disabled",2);ct([a({type:String})],ot.prototype,"form",2);ct([a({type:String})],ot.prototype,"id",2);ct([a({type:String})],ot.prototype,"inputmode",2);ct([a({type:Number})],ot.prototype,"maxlength",2);ct([a({type:String})],ot.prototype,"name",2);ct([a({type:String})],ot.prototype,"pattern",2);ct([a({type:Boolean})],ot.prototype,"required",2);ct([a({type:String})],ot.prototype,"value",2);ct([a({attribute:!1})],ot.prototype,"onChange",2);ct([a({attribute:!1})],ot.prototype,"onComplete",2);ct([a({attribute:!1})],ot.prototype,"onBlur",2);ct([a({attribute:!1})],ot.prototype,"onFocus",2);ct([a({attribute:!1})],ot.prototype,"onPaste",2);ct([a({attribute:!1})],ot.prototype,"pasteTransformer",2);ct([g()],ot.prototype,"_activeSlot",2);ct([g()],ot.prototype,"_hasFocus",2);ct([g()],ot.prototype,"_value",2);ot=ct([p("pont-input-otp")],ot);var Oy=Object.getOwnPropertyDescriptor,Ry=(e,t,r,o)=>{for(var n=o>1?void 0:o?Oy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Qd=class extends f{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="input-otp-group"]')}firstUpdated(){const e=this._groupSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="input-otp-group"></div>`}};Qd=Ry([p("pont-input-otp-group")],Qd);var Iy=Object.defineProperty,Ay=Object.getOwnPropertyDescriptor,hl=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ay(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&&Iy(t,r,n),n};let yi=class extends f{constructor(){super(...arguments),this._handleClick=()=>{this.dispatchEvent(new CustomEvent("pont-input-otp-slot:focus",{detail:{index:this.index},bubbles:!0}))}}createRenderRoot(){return this}get _slotSlot(){return this.querySelector('[data-slot="input-otp-slot"]')}render(){return l`
|
|
1557
1563
|
<div
|
|
1558
1564
|
data-slot="input-otp-slot"
|
|
1559
1565
|
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":h}
|
|
1560
1566
|
@click=${this._handleClick}
|
|
1561
1567
|
></div>
|
|
1562
|
-
`}};hl([a({type:Number})],yi.prototype,"index",2);hl([a({type:Boolean})],yi.prototype,"invalid",2);yi=hl([p("pont-input-otp-slot")],yi);var
|
|
1568
|
+
`}};hl([a({type:Number})],yi.prototype,"index",2);hl([a({type:Boolean})],yi.prototype,"invalid",2);yi=hl([p("pont-input-otp-slot")],yi);var Ty=Object.getOwnPropertyDescriptor,Dy=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ty(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Zd=class extends f{createRenderRoot(){return this}render(){return l`
|
|
1563
1569
|
<div data-slot="input-otp-separator" role="separator">
|
|
1564
|
-
${
|
|
1570
|
+
${Ng()}
|
|
1565
1571
|
</div>
|
|
1566
|
-
`}};Zd=
|
|
1572
|
+
`}};Zd=Dy([p("pont-input-otp-separator")],Zd);var Ly=Object.defineProperty,Fy=Object.getOwnPropertyDescriptor,Ro=(e,t,r,o)=>{for(var n=o>1?void 0:o?Fy(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&&Ly(t,r,n),n};let Sn=class extends f{constructor(){super(...arguments),this.variant="default",this.size="default"}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="item"]')}firstUpdated(){const e=this._rootSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return this.href?l`
|
|
1567
1573
|
<a
|
|
1568
1574
|
data-slot="item"
|
|
1569
1575
|
data-variant="${this.variant}"
|
|
@@ -1577,14 +1583,14 @@
|
|
|
1577
1583
|
data-variant="${this.variant}"
|
|
1578
1584
|
data-size="${this.size}"
|
|
1579
1585
|
></div>
|
|
1580
|
-
`}};Ro([a({type:String})],Sn.prototype,"variant",2);Ro([a({type:String})],Sn.prototype,"size",2);Ro([a({type:String})],Sn.prototype,"href",2);Ro([a({type:String})],Sn.prototype,"target",2);Sn=Ro([p("pont-item")],Sn);var
|
|
1586
|
+
`}};Ro([a({type:String})],Sn.prototype,"variant",2);Ro([a({type:String})],Sn.prototype,"size",2);Ro([a({type:String})],Sn.prototype,"href",2);Ro([a({type:String})],Sn.prototype,"target",2);Sn=Ro([p("pont-item")],Sn);var ky=Object.getOwnPropertyDescriptor,Ny=(e,t,r,o)=>{for(var n=o>1?void 0:o?ky(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Jd=class extends f{createRenderRoot(){return this}get _actionsSlot(){return this.querySelector('[data-slot="item-actions"]')}firstUpdated(){const e=this._actionsSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-actions"></div>`}};Jd=Ny([p("pont-item-actions")],Jd);var My=Object.getOwnPropertyDescriptor,By=(e,t,r,o)=>{for(var n=o>1?void 0:o?My(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Xd=class extends f{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="item-content"]')}firstUpdated(){const e=this._contentSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-content"></div>`}};Xd=By([p("pont-item-content")],Xd);var Uy=Object.getOwnPropertyDescriptor,jy=(e,t,r,o)=>{for(var n=o>1?void 0:o?Uy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let tc=class extends f{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="item-description"]')}firstUpdated(){const e=this._descriptionSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="item-description"></p>`}};tc=jy([p("pont-item-description")],tc);var qy=Object.getOwnPropertyDescriptor,zy=(e,t,r,o)=>{for(var n=o>1?void 0:o?qy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let ec=class extends f{createRenderRoot(){return this}get _footerSlot(){return this.querySelector('[data-slot="item-footer"]')}firstUpdated(){const e=this._footerSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-footer"></div>`}};ec=zy([p("pont-item-footer")],ec);var Vy=Object.getOwnPropertyDescriptor,Hy=(e,t,r,o)=>{for(var n=o>1?void 0:o?Vy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let rc=class extends f{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="item-group"]')}firstUpdated(){const e=this._groupSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-group" role="list"></div>`}};rc=Hy([p("pont-item-group")],rc);var Gy=Object.getOwnPropertyDescriptor,Ky=(e,t,r,o)=>{for(var n=o>1?void 0:o?Gy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let nc=class extends f{createRenderRoot(){return this}get _headerSlot(){return this.querySelector('[data-slot="item-header"]')}firstUpdated(){const e=this._headerSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-header"></div>`}};nc=Ky([p("pont-item-header")],nc);var Wy=Object.defineProperty,Yy=Object.getOwnPropertyDescriptor,fh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Yy(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&&Wy(t,r,n),n};let fa=class extends f{constructor(){super(...arguments),this.variant="default"}createRenderRoot(){return this}get _mediaSlot(){return this.querySelector('[data-slot="item-media"]')}firstUpdated(){const e=this._mediaSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1581
1587
|
<div data-slot="item-media" data-variant="${this.variant}"></div>
|
|
1582
|
-
`}};fh([a({type:String})],fa.prototype,"variant",2);fa=fh([p("pont-item-media")],fa);var
|
|
1588
|
+
`}};fh([a({type:String})],fa.prototype,"variant",2);fa=fh([p("pont-item-media")],fa);var Qy=Object.getOwnPropertyDescriptor,Zy=(e,t,r,o)=>{for(var n=o>1?void 0:o?Qy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let oc=class extends f{createRenderRoot(){return this}get _separatorSlot(){return this.querySelector('[data-slot="item-separator"]')}firstUpdated(){const e=this._separatorSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1583
1589
|
<pont-separator
|
|
1584
1590
|
data-slot="item-separator"
|
|
1585
1591
|
orientation="horizontal"
|
|
1586
1592
|
></pont-separator>
|
|
1587
|
-
`}};oc=
|
|
1593
|
+
`}};oc=Zy([p("pont-item-separator")],oc);var Jy=Object.getOwnPropertyDescriptor,Xy=(e,t,r,o)=>{for(var n=o>1?void 0:o?Jy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let ic=class extends f{createRenderRoot(){return this}get _titleSlot(){return this.querySelector('[data-slot="item-title"]')}firstUpdated(){const e=this._titleSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-title"></div>`}};ic=Xy([p("pont-item-title")],ic);var t_=Object.getOwnPropertyDescriptor,e_=(e,t,r,o)=>{for(var n=o>1?void 0:o?t_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let sc=class extends f{createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="kbd"]')}firstUpdated(){const e=this._rootSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<kbd data-slot="kbd"></kbd>`}};sc=e_([p("pont-kbd")],sc);var r_=Object.getOwnPropertyDescriptor,n_=(e,t,r,o)=>{for(var n=o>1?void 0:o?r_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let ac=class extends f{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="kbd-group"]')}firstUpdated(){const e=this._groupSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<kbd data-slot="kbd-group"></kbd>`}};ac=n_([p("pont-kbd-group")],ac);const Ct={root:["pont-flex","pont-gap-menubar-space-gap pont-items-center","pont-p-menubar-space-p","pont-h-menubar-space-h","pont-bg-menubar-color-bg","pont-rounded-menubar-radius pont-border-menubar-width-border pont-border-menubar-color-border"],menu:[""],group:[""],trigger:["pont-flex","pont-items-center","pont-px-menubar-trigger-space-px pont-py-menubar-trigger-space-py","pont-text-menubar-trigger-font pont-font-menubar-trigger-font-weight","pont-rounded-menubar-trigger-radius pont-outline-hidden","pont-select-none","focus:pont-text-menubar-trigger-color-text-focus focus:pont-bg-menubar-trigger-color-bg-focus","hover:pont-text-menubar-trigger-color-text-active hover:pont-bg-menubar-trigger-color-bg-active"],content:["pont-absolute pont-overflow-hidden pont-z-50","pont-p-menubar-content-space-p","pont-min-w-menubar-content-space-min-w","pont-text-menubar-content-color-text","pont-bg-menubar-content-color-bg","pont-rounded-menubar-content-radius pont-border-menubar-content-width-border pont-border-menubar-content-color-border","pont-shadow-menubar-content-shadow","pont-translate-y-2","pont-slide-in-from-top-2","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"],item:["pont-flex pont-relative","pont-gap-menubar-item-space-gap pont-items-center","pont-px-menubar-item-space-px pont-py-menubar-item-space-py","pont-text-menubar-item-font","pont-rounded-menubar-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","aria-selected:pont-text-menubar-item-color-text-active aria-selected:pont-bg-menubar-item-color-bg-active","data-[disabled]:pont-opacity-menubar-item-opacity-disabled data-[disabled]:pont-pointer-events-none",'[&_svg]:pont-shrink-0 [&_svg:not([class*="pont-size-"])]:pont-size-menubar-item-icon-space-size [&_svg:not([class*="pont-text-"])]:pont-text-menubar-item-icon-color-text [&_svg]:pont-pointer-events-none'],checkboxItem:{base:["pont-flex pont-relative","pont-gap-menubar-checkbox-item-space-gap pont-items-center","pont-pl-menubar-checkbox-item-space-pl pont-pr-menubar-checkbox-item-space-pr pont-py-menubar-checkbox-item-space-py","pont-text-menubar-checkbox-item-font","pont-rounded-menubar-checkbox-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","aria-selected:pont-text-menubar-checkbox-item-color-text-active aria-selected:pont-bg-menubar-checkbox-item-color-bg-active","data-[disabled]:pont-opacity-menubar-checkbox-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],indicator:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-menubar-checkbox-item-indicator-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-menubar-checkbox-item-icon-space-size","pont-pointer-events-none"]},radioItem:{base:["pont-flex pont-relative","pont-gap-menubar-radio-item-space-gap pont-items-center","pont-pl-menubar-radio-item-space-pl pont-pr-menubar-radio-item-space-pr pont-py-menubar-radio-item-space-py","pont-text-menubar-radio-item-font","pont-rounded-menubar-radio-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","aria-selected:pont-text-menubar-radio-item-color-text-active aria-selected:pont-bg-menubar-radio-item-color-bg-active","data-[disabled]:pont-opacity-menubar-radio-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],indicator:["pont-flex pont-absolute pont-left-2","pont-justify-center pont-items-center","pont-size-menubar-radio-item-indicator-space-size","pont-pointer-events-none"],icon:["pont-shrink-0","pont-size-menubar-radio-item-icon-space-size","pont-pointer-events-none","pont-fill-current"]},label:["pont-px-menubar-label-space-px pont-py-menubar-label-space-py","pont-text-menubar-label-font pont-font-menubar-label-font-weight"],separator:["pont-mx-menubar-separator-space-mx pont-my-menubar-separator-space-my","pont-h-menubar-separator-space-h","pont-bg-menubar-separator-color-bg"],shortcut:["pont-ml-auto","pont-text-menubar-shortcut-font pont-text-menubar-shortcut-color-text"]};var o_=Object.defineProperty,i_=Object.getOwnPropertyDescriptor,Qr=(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 oe=class extends y{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=menubar-checkbox-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)}toggleChecked(){this.checked=!this.checked}render(){return l`
|
|
1588
1594
|
<div
|
|
1589
1595
|
part="menubar-checkbox-item"
|
|
1590
1596
|
class=${m(Ct.checkboxItem.base,this.disabled&&"pont-opacity-menubar-item-opacity-disabled pont-pointer-events-none",this.className)}
|
|
@@ -1619,7 +1625,7 @@
|
|
|
1619
1625
|
`:h}
|
|
1620
1626
|
</span>
|
|
1621
1627
|
</div>
|
|
1622
|
-
`}};oe._counter=0;Qr([a({type:String})],oe.prototype,"_id",2);Qr([a({attribute:"aria-hidden",type:String})],oe.prototype,"_hidden",2);Qr([a({attribute:"data-value",type:String})],oe.prototype,"value",1);Qr([a({type:Boolean})],oe.prototype,"selected",2);Qr([a({type:Boolean})],oe.prototype,"checked",2);Qr([a({type:Boolean})],oe.prototype,"disabled",2);oe=Qr([p("pont-menubar-checkbox-item")],oe);var
|
|
1628
|
+
`}};oe._counter=0;Qr([a({type:String})],oe.prototype,"_id",2);Qr([a({attribute:"aria-hidden",type:String})],oe.prototype,"_hidden",2);Qr([a({attribute:"data-value",type:String})],oe.prototype,"value",1);Qr([a({type:Boolean})],oe.prototype,"selected",2);Qr([a({type:Boolean})],oe.prototype,"checked",2);Qr([a({type:Boolean})],oe.prototype,"disabled",2);oe=Qr([p("pont-menubar-checkbox-item")],oe);var s_=Object.defineProperty,a_=Object.getOwnPropertyDescriptor,jn=(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 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`
|
|
1623
1629
|
<div class=${m(Ct.menu,this.className)}>
|
|
1624
1630
|
<div
|
|
1625
1631
|
id="${this.id}"
|
|
@@ -1638,7 +1644,7 @@
|
|
|
1638
1644
|
|
|
1639
1645
|
<div part="menubar-menu-slot"></div>
|
|
1640
1646
|
</div>
|
|
1641
|
-
`}};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
|
|
1647
|
+
`}};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 l_=Object.defineProperty,d_=Object.getOwnPropertyDescriptor,Io=(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 xn=class extends y{constructor(){super(...arguments),this.state=ol,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`
|
|
1642
1648
|
<div
|
|
1643
1649
|
class=${m(Ct.content,this.className)}
|
|
1644
1650
|
id="${this.id}"
|
|
@@ -1652,7 +1658,7 @@
|
|
|
1652
1658
|
dir="ltr"
|
|
1653
1659
|
style="display: ${this.isOpen?"block":"none"};"
|
|
1654
1660
|
></div>
|
|
1655
|
-
`}};Io([a({attribute:"data-state",type:String})],xn.prototype,"state",2);Io([a({type:String})],xn.prototype,"id",2);Io([a({type:String})],xn.prototype,"side",2);Io([g()],xn.prototype,"isOpen",2);xn=Io([p("pont-menubar-content")],xn);var
|
|
1661
|
+
`}};Io([a({attribute:"data-state",type:String})],xn.prototype,"state",2);Io([a({type:String})],xn.prototype,"id",2);Io([a({type:String})],xn.prototype,"side",2);Io([g()],xn.prototype,"isOpen",2);xn=Io([p("pont-menubar-content")],xn);var c_=Object.defineProperty,p_=Object.getOwnPropertyDescriptor,Mi=(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 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`
|
|
1656
1662
|
<div
|
|
1657
1663
|
class=${m(Ct.group,this.className)}
|
|
1658
1664
|
id="${this.identifier}"
|
|
@@ -1673,7 +1679,7 @@
|
|
|
1673
1679
|
aria-labelledby="${this.identifier}h"
|
|
1674
1680
|
></div>
|
|
1675
1681
|
</div>
|
|
1676
|
-
`}`}};fr._counter=0;Mi([a({type:String})],fr.prototype,"heading",2);Mi([a({attribute:"id",type:String})],fr.prototype,"_id",2);Mi([a({attribute:"aria-hidden",type:String})],fr.prototype,"_hidden",2);fr=Mi([p("pont-menubar-group")],fr);var
|
|
1682
|
+
`}`}};fr._counter=0;Mi([a({type:String})],fr.prototype,"heading",2);Mi([a({attribute:"id",type:String})],fr.prototype,"_id",2);Mi([a({attribute:"aria-hidden",type:String})],fr.prototype,"_hidden",2);fr=Mi([p("pont-menubar-group")],fr);var h_=Object.defineProperty,u_=Object.getOwnPropertyDescriptor,qn=(e,t,r,o)=>{for(var n=o>1?void 0:o?u_(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&&h_(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`
|
|
1677
1683
|
<div
|
|
1678
1684
|
part="menubar-item"
|
|
1679
1685
|
class=${m(Ct.item,this.disabled&&"pont-opacity-menubar-item-opacity-disabled pont-pointer-events-none",this.className)}
|
|
@@ -1687,7 +1693,7 @@
|
|
|
1687
1693
|
id="${this.identifier}"
|
|
1688
1694
|
aria-hidden="${this.hidden}"
|
|
1689
1695
|
></div>
|
|
1690
|
-
`}`}};Oe._counter=0;qn([a({type:String})],Oe.prototype,"_id",2);qn([a({attribute:"aria-hidden",type:String})],Oe.prototype,"_hidden",2);qn([a({type:Boolean})],Oe.prototype,"disabled",2);qn([a({attribute:"data-value",type:String})],Oe.prototype,"value",1);qn([a({type:Boolean})],Oe.prototype,"selected",2);Oe=qn([p("pont-menubar-item")],Oe);var
|
|
1696
|
+
`}`}};Oe._counter=0;qn([a({type:String})],Oe.prototype,"_id",2);qn([a({attribute:"aria-hidden",type:String})],Oe.prototype,"_hidden",2);qn([a({type:Boolean})],Oe.prototype,"disabled",2);qn([a({attribute:"data-value",type:String})],Oe.prototype,"value",1);qn([a({type:Boolean})],Oe.prototype,"selected",2);Oe=qn([p("pont-menubar-item")],Oe);var m_=Object.defineProperty,g_=Object.getOwnPropertyDescriptor,Zr=(e,t,r,o)=>{for(var n=o>1?void 0:o?g_(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&&m_(t,r,n),n};let ie=class extends y{constructor(){super(...arguments),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=menubar-radio-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${ie._counter++}`:this._id=`rtgcmdrxgxli${ie._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)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}render(){return l`
|
|
1691
1697
|
<div
|
|
1692
1698
|
part="menubar-radio-item"
|
|
1693
1699
|
class=${m(Ct.radioItem.base,this.disabled&&"pont-opacity-menubar-item-opacity-disabled pont-pointer-events-none",this.className)}
|
|
@@ -1720,7 +1726,7 @@
|
|
|
1720
1726
|
</svg>`:h}
|
|
1721
1727
|
</span>
|
|
1722
1728
|
</div>
|
|
1723
|
-
`}};ie._counter=0;Zr([a({type:String})],ie.prototype,"_id",2);Zr([a({attribute:"aria-hidden",type:String})],ie.prototype,"_hidden",2);Zr([a({attribute:"data-value",type:String})],ie.prototype,"value",1);Zr([a({type:Boolean})],ie.prototype,"selected",2);Zr([a({type:Boolean})],ie.prototype,"checked",2);Zr([a({type:Boolean})],ie.prototype,"disabled",2);ie=Zr([p("pont-menubar-radio-item")],ie);var
|
|
1729
|
+
`}};ie._counter=0;Zr([a({type:String})],ie.prototype,"_id",2);Zr([a({attribute:"aria-hidden",type:String})],ie.prototype,"_hidden",2);Zr([a({attribute:"data-value",type:String})],ie.prototype,"value",1);Zr([a({type:Boolean})],ie.prototype,"selected",2);Zr([a({type:Boolean})],ie.prototype,"checked",2);Zr([a({type:Boolean})],ie.prototype,"disabled",2);ie=Zr([p("pont-menubar-radio-item")],ie);var f_=Object.defineProperty,v_=Object.getOwnPropertyDescriptor,ul=(e,t,r,o)=>{for(var n=o>1?void 0:o?v_(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&&f_(t,r,n),n};let Vr=class extends y{constructor(){super(...arguments),this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-separator]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}get identifier(){var t;if(this._id!=="")return this._id;const e=(t=this.parentElement)==null?void 0:t.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}s${Vr._counter++}`:this._id=`rtgcmdrxlxs${Vr._counter++}`,this._id}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`${this._hidden==="true"?h:l`
|
|
1724
1730
|
<div
|
|
1725
1731
|
class=${m(Ct.separator,this.className)}
|
|
1726
1732
|
id="${this.identifier}"
|
|
@@ -1728,20 +1734,20 @@
|
|
|
1728
1734
|
part="menubar-separator"
|
|
1729
1735
|
rtgcmd-separator
|
|
1730
1736
|
></div>
|
|
1731
|
-
`}`}};Vr._counter=0;ul([a({type:String})],Vr.prototype,"_id",2);ul([a({attribute:"aria-hidden",type:String})],Vr.prototype,"_hidden",2);Vr=ul([p("pont-menubar-separator")],Vr);var
|
|
1737
|
+
`}`}};Vr._counter=0;ul([a({type:String})],Vr.prototype,"_id",2);ul([a({attribute:"aria-hidden",type:String})],Vr.prototype,"_hidden",2);Vr=ul([p("pont-menubar-separator")],Vr);var b_=Object.getOwnPropertyDescriptor,y_=(e,t,r,o)=>{for(var n=o>1?void 0:o?b_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let lc=class extends y{get _containerElement(){return this.querySelector("span[part=menubar-shortcut]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this.classList=m(Ct.shortcut),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1732
1738
|
<span
|
|
1733
1739
|
class=${m(Ct.shortcut,this.className)}
|
|
1734
1740
|
part="menubar-shortcut"
|
|
1735
1741
|
>
|
|
1736
1742
|
</span>
|
|
1737
|
-
`}};lc=
|
|
1743
|
+
`}};lc=y_([p("pont-menubar-shortcut")],lc);var __=Object.getOwnPropertyDescriptor,w_=(e,t,r,o)=>{for(var n=o>1?void 0:o?__(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let dc=class extends y{get _containerElement(){return this.querySelector("button[part=menubar-trigger]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}getAttributesToExclude(){return["data-testid"]}render(){return l`
|
|
1738
1744
|
<button
|
|
1739
1745
|
class=${m(Ct.trigger,this.className)}
|
|
1740
1746
|
type="button"
|
|
1741
1747
|
role="menuitem"
|
|
1742
1748
|
part="menubar-trigger"
|
|
1743
1749
|
></button>
|
|
1744
|
-
`}};dc
|
|
1750
|
+
`}};dc=w_([p("pont-menubar-trigger")],dc);var $_=Object.getOwnPropertyDescriptor,P_=(e,t,r,o)=>{for(var n=o>1?void 0:o?$_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let cc=class extends y{get _containerElement(){return this.querySelector("div[part=menubar]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1745
1751
|
<div
|
|
1746
1752
|
role="menubar"
|
|
1747
1753
|
part="menubar"
|
|
@@ -1749,7 +1755,7 @@
|
|
|
1749
1755
|
tabindex="0"
|
|
1750
1756
|
data-orientation="horizontal"
|
|
1751
1757
|
></div>
|
|
1752
|
-
`}};cc=
|
|
1758
|
+
`}};cc=P_([p("pont-menubar")],cc);const Hr={content:["pont-absolute","pont-top-navigation-menu-content-space-top","pont-flex","pont-justify-center"],menu:["pont-relative","pont-z-10","pont-flex","pont-max-w-navigation-menu-space-max-w","pont-flex-1","pont-items-center","pont-justify-center"],menuList:["pont-flex","pont-flex-1","pont-list-none","pont-items-center","pont-justify-center","pont-space-x-navigation-menu-list-space-x","group"],menuItem:["pont-flex","pont-cursor-pointer","pont-items-center","pont-rounded-navigation-menu-item-radius","pont-bg-navigation-menu-item-color-bg","pont-py-navigation-menu-list-space-py","pont-px-navigation-menu-list-space-px","hover:pont-bg-navigation-menu-item-color-bg-hover"],menuItemIcon:["lucide","lucide-chevron-down","pont-relative","pont-ml-navigation-menu-item-icon-space-ml","pont-h-navigation-menu-item-icon-space-h","pont-w-navigation-menu-item-icon-space-w","pont-transition-transform","pont-duration-navigation-menu-item-icon-motion-duration"],link:["pont-flex","pont-h-navigation-menu-link-space-h","pont-bg-navigation-menu-link-color-bg","hover:pont-bg-navigation-menu-link-color-bg-hover","pont-rounded-navigation-menu-link-radius","pont-px-navigation-menu-link-space-px","pont-py-navigation-menu-link-space-py","pont-w-navigation-menu-link-space-w","pont-select-none","pont-flex-col","pont-justify-end","pont-no-underline","pont-outline-none"],contentContainer:["pont-bg-navigation-menu-content-container-color-bg","origin-top-center","pont-relative","pont-mt-navigation-menu-content-container-space-mt","pont-w-navigation-menu-content-container-space-w","pont-overflow-hidden","pont-rounded-navigation-menu-content-container-radius","pont-border-navigation-menu-content-container-width-border","pont-border-navigation-menu-content-container-color-border","pont-navigation-menu-content-container-shadow"]};var C_=Object.getOwnPropertyDescriptor,E_=(e,t,r,o)=>{for(var n=o>1?void 0:o?C_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let pc=class extends y{get _containerElement(){return this.querySelector("ul[part=navigation-menu-list]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1753
1759
|
<div class="${m("relative",this.className)}">
|
|
1754
1760
|
<ul
|
|
1755
1761
|
part="navigation-menu-list"
|
|
@@ -1759,7 +1765,7 @@
|
|
|
1759
1765
|
></ul>
|
|
1760
1766
|
<div></div>
|
|
1761
1767
|
</div>
|
|
1762
|
-
`}};pc=
|
|
1768
|
+
`}};pc=E_([p("pont-navigation-menu-list")],pc);var S_=Object.defineProperty,x_=Object.getOwnPropertyDescriptor,zn=(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&&S_(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`
|
|
1763
1769
|
<li
|
|
1764
1770
|
@mouseenter="${this.handleHover}"
|
|
1765
1771
|
@mouseleave="${this.handleMouseLeave}"
|
|
@@ -1789,7 +1795,7 @@
|
|
|
1789
1795
|
</div>
|
|
1790
1796
|
<div part="content-slot" style="position:absolute"></div>`:""}
|
|
1791
1797
|
</li>
|
|
1792
|
-
`}};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
|
|
1798
|
+
`}};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 O_=Object.defineProperty,R_=Object.getOwnPropertyDescriptor,Ao=(e,t,r,o)=>{for(var n=o>1?void 0:o?R_(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 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`
|
|
1793
1799
|
<div
|
|
1794
1800
|
class="${m(Hr.content,this.className)}"
|
|
1795
1801
|
style="display: ${this.isOpen?"block":"none"};top:0px;left:0px;"
|
|
@@ -1809,7 +1815,7 @@
|
|
|
1809
1815
|
></div>
|
|
1810
1816
|
</div>
|
|
1811
1817
|
</div>
|
|
1812
|
-
`}};Ao([a({attribute:"data-state",type:String})],On.prototype,"state",2);Ao([a({type:String})],On.prototype,"id",2);Ao([a({type:String})],On.prototype,"side",2);Ao([g()],On.prototype,"isOpen",2);On=Ao([p("pont-navigation-menu-content")],On);var
|
|
1818
|
+
`}};Ao([a({attribute:"data-state",type:String})],On.prototype,"state",2);Ao([a({type:String})],On.prototype,"id",2);Ao([a({type:String})],On.prototype,"side",2);Ao([g()],On.prototype,"isOpen",2);On=Ao([p("pont-navigation-menu-content")],On);var I_=Object.defineProperty,A_=Object.getOwnPropertyDescriptor,vh=(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&&I_(t,r,n),n};let va=class extends y{constructor(){super(...arguments),this.href="/"}get _containerElement(){return this.querySelector("a[part=navigation-menu-link]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1813
1819
|
<a
|
|
1814
1820
|
part="navigation-menu-link"
|
|
1815
1821
|
class="${m(Hr.link,this.className)}"
|
|
@@ -1819,9 +1825,9 @@
|
|
|
1819
1825
|
tabindex="-1"
|
|
1820
1826
|
>
|
|
1821
1827
|
</a>
|
|
1822
|
-
`}};vh([a({type:String})],va.prototype,"href",2);va=vh([p("pont-navigation-menu-link")],va);var
|
|
1828
|
+
`}};vh([a({type:String})],va.prototype,"href",2);va=vh([p("pont-navigation-menu-link")],va);var T_=Object.getOwnPropertyDescriptor,D_=(e,t,r,o)=>{for(var n=o>1?void 0:o?T_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let hc=class extends y{get _containerElement(){return this.querySelector("div[part=navigation-menu-trigger]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}getAttributesToExclude(){return["data-testid"]}render(){return l`
|
|
1823
1829
|
<div part="navigation-menu-trigger" class="${m(this.className)}"></div>
|
|
1824
|
-
`}};hc=
|
|
1830
|
+
`}};hc=D_([p("pont-navigation-menu-trigger")],hc);var L_=Object.getOwnPropertyDescriptor,F_=(e,t,r,o)=>{for(var n=o>1?void 0:o?L_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let uc=class extends y{get _containerElement(){return this.querySelector("nav[part=navigation-menu]")}createRenderRoot(){return this}firstUpdated(e){}render(){return l`
|
|
1825
1831
|
<nav
|
|
1826
1832
|
part="navigation-menu"
|
|
1827
1833
|
aria-label="Main"
|
|
@@ -1829,13 +1835,13 @@
|
|
|
1829
1835
|
dir="ltr"
|
|
1830
1836
|
class="${m(Hr.menu,this.className)}"
|
|
1831
1837
|
></nav>
|
|
1832
|
-
`}};uc=
|
|
1838
|
+
`}};uc=F_([p("pont-navigation-menu")],uc);const ee={root:["pont-flex","pont-justify-center","pont-mx-auto","pont-w-full"],content:["pont-flex","pont-flex-row pont-gap-pagination-content-space-gap pont-items-center"],item:[""],link:ao,previous:{base:["pont-gap-pagination-previous-space-gap","pont-px-pagination-previous-space-px sm:pont-pl-pagination-previous-space-px"],span:["pont-hidden sm:pont-block"]},next:{base:["pont-gap-pagination-next-space-gap","pont-px-pagination-next-space-px sm:pont-pr-pagination-next-space-px"],span:["pont-hidden sm:pont-block"]},ellipsis:{base:["pont-flex pont-justify-center pont-items-center","pont-size-pagination-ellipsis-space-size"],icon:["pont-size-pagination-ellipsis-icon-space-size"],span:["pont-sr-only"]}};var k_=Object.getOwnPropertyDescriptor,N_=(e,t,r,o)=>{for(var n=o>1?void 0:o?k_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let mc=class extends y{get _containerElement(){return this.querySelector("ul[part=pagination-content]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1833
1839
|
<ul
|
|
1834
1840
|
data-slot="pagination-content"
|
|
1835
1841
|
part="pagination-content"
|
|
1836
1842
|
class=${m(ee.content,this.className)}
|
|
1837
1843
|
></ul>
|
|
1838
|
-
`}};mc=
|
|
1844
|
+
`}};mc=N_([p("pont-pagination-content")],mc);var M_=Object.getOwnPropertyDescriptor,B_=(e,t,r,o)=>{for(var n=o>1?void 0:o?M_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let gc=class extends y{get _containerElement(){return this.querySelector("span[part=pagination-ellipsis]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1839
1845
|
<span
|
|
1840
1846
|
aria-hidden
|
|
1841
1847
|
data-slot="pagination-ellipsis"
|
|
@@ -1861,7 +1867,7 @@
|
|
|
1861
1867
|
|
|
1862
1868
|
<span class=${m(ee.ellipsis.span)}>More pages</span>
|
|
1863
1869
|
</span>
|
|
1864
|
-
`}};gc=
|
|
1870
|
+
`}};gc=B_([p("pont-pagination-ellipsis")],gc);var U_=Object.defineProperty,j_=Object.getOwnPropertyDescriptor,To=(e,t,r,o)=>{for(var n=o>1?void 0:o?j_(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&&U_(t,r,n),n};let Gr=class extends y{constructor(){super(...arguments),this.state="close",this.isActive=!1,this.size="icon",this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("a[part=pagination-link]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){super.updated(e),this.state==="open"?this.isActive=!0:this.isActive=!1}render(){return l`
|
|
1865
1871
|
<a
|
|
1866
1872
|
aria-current=${this.isActive?"page":void 0}
|
|
1867
1873
|
data-slot="pagination-link"
|
|
@@ -1872,14 +1878,14 @@
|
|
|
1872
1878
|
class=${m(ee.link({variant:this.isActive?"outline":"ghost",size:this.size}),this.className)}
|
|
1873
1879
|
>
|
|
1874
1880
|
</a>
|
|
1875
|
-
`}};To([a({attribute:"data-state",type:String})],Gr.prototype,"state",2);To([a({type:Boolean})],Gr.prototype,"isActive",2);To([a({type:String})],Gr.prototype,"size",2);To([a({type:String})],Gr.prototype,"href",2);Gr=To([p("pont-pagination-link")],Gr);var
|
|
1881
|
+
`}};To([a({attribute:"data-state",type:String})],Gr.prototype,"state",2);To([a({type:Boolean})],Gr.prototype,"isActive",2);To([a({type:String})],Gr.prototype,"size",2);To([a({type:String})],Gr.prototype,"href",2);Gr=To([p("pont-pagination-link")],Gr);var q_=Object.defineProperty,z_=Object.getOwnPropertyDescriptor,ml=(e,t,r,o)=>{for(var n=o>1?void 0:o?z_(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&&q_(t,r,n),n};let _i=class extends y{constructor(){super(...arguments),this.uniqueIds=[],this.isActive=!1}get _containerElement(){return this.querySelector("li[part=pagination-item]")}get _content(){var t;const e=(t=this._containerElement)==null?void 0:t.children;if(e){for(let r=0;r<e.length;r++)if(e[r]instanceof Gr)return e[r]}return null}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isActive?"open":"close")}handleClick(e){e.stopPropagation(),document.querySelectorAll("pont-pagination-item").forEach(r=>{r!==this&&(r.isActive=!1)}),this.isActive=!this.isActive}firstUpdated(){var r;this.moveLightDomChildrenInto(this._containerElement);const e=(r=this._containerElement)==null?void 0:r.children,t=[];for(let o=0;o<e.length-1;o+=1){const n=e[o],i=crypto.randomUUID();t.push(i),n.dataset.pairId=i}this.uniqueIds=t,this._content&&this._content.removeEventListener("unique-ids-generated",()=>{this.requestUpdate()})}raiseEvent(){const e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}createRenderRoot(){return this}render(){return l`
|
|
1876
1882
|
<li
|
|
1877
1883
|
data-slot="pagination-item"
|
|
1878
1884
|
part="pagination-item"
|
|
1879
1885
|
class=${m(ee.item,this.className)}
|
|
1880
1886
|
@click="${this.handleClick}"
|
|
1881
1887
|
></li>
|
|
1882
|
-
`}};ml([g()],_i.prototype,"uniqueIds",2);ml([a({type:Boolean})],_i.prototype,"isActive",2);_i=ml([p("pont-pagination-item")],_i);var
|
|
1888
|
+
`}};ml([g()],_i.prototype,"uniqueIds",2);ml([a({type:Boolean})],_i.prototype,"isActive",2);_i=ml([p("pont-pagination-item")],_i);var V_=Object.defineProperty,H_=Object.getOwnPropertyDescriptor,bh=(e,t,r,o)=>{for(var n=o>1?void 0:o?H_(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&&V_(t,r,n),n};let ba=class extends y{constructor(){super(...arguments),this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("div[part=pagination-next]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1883
1889
|
<pont-pagination-link
|
|
1884
1890
|
aria-label="Go to next page"
|
|
1885
1891
|
size="default"
|
|
@@ -1905,7 +1911,7 @@
|
|
|
1905
1911
|
|
|
1906
1912
|
<div part="pagination-next"></div>
|
|
1907
1913
|
</pont-pagination-link>
|
|
1908
|
-
`}};bh([a({type:String})],ba.prototype,"href",2);ba=bh([p("pont-pagination-next")],ba);var
|
|
1914
|
+
`}};bh([a({type:String})],ba.prototype,"href",2);ba=bh([p("pont-pagination-next")],ba);var G_=Object.defineProperty,K_=Object.getOwnPropertyDescriptor,yh=(e,t,r,o)=>{for(var n=o>1?void 0:o?K_(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&&G_(t,r,n),n};let ya=class extends y{constructor(){super(...arguments),this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("div[part=pagination-previous]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1909
1915
|
<pont-pagination-link
|
|
1910
1916
|
aria-label="Go to previous page"
|
|
1911
1917
|
size="default"
|
|
@@ -1931,7 +1937,7 @@
|
|
|
1931
1937
|
|
|
1932
1938
|
<div part="pagination-previous"></div>
|
|
1933
1939
|
</pont-pagination-link>
|
|
1934
|
-
`}};yh([a({type:String})],ya.prototype,"href",2);ya=yh([p("pont-pagination-previous")],ya);var
|
|
1940
|
+
`}};yh([a({type:String})],ya.prototype,"href",2);ya=yh([p("pont-pagination-previous")],ya);var W_=Object.getOwnPropertyDescriptor,Y_=(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=s(n)||n);return n};let fc=class extends y{get _containerElement(){return this.querySelector("nav[part=pagination]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1935
1941
|
<nav
|
|
1936
1942
|
role="navigation"
|
|
1937
1943
|
aria-label="pagination"
|
|
@@ -1939,7 +1945,7 @@
|
|
|
1939
1945
|
part="pagination"
|
|
1940
1946
|
class=${m(ee.root,this.className)}
|
|
1941
1947
|
></nav>
|
|
1942
|
-
`}};fc=
|
|
1948
|
+
`}};fc=Y_([p("pont-pagination")],fc);var Q_=Object.defineProperty,Z_=Object.getOwnPropertyDescriptor,gt=(e,t,r,o)=>{for(var n=o>1?void 0:o?Z_(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&&Q_(t,r,n),n};let lt=class extends f{constructor(){super(...arguments),this.id="",this._showPassword=!1,this._handleToggle=()=>{this._showPassword=!this._showPassword}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id"))}firstUpdated(){this._inputId=this.id,this.removeAttribute("id")}_renderIcon(){return this._showPassword?l`
|
|
1943
1949
|
<svg
|
|
1944
1950
|
data-slot="password-input-icon"
|
|
1945
1951
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -2025,7 +2031,7 @@
|
|
|
2025
2031
|
</pont-input-group-button>
|
|
2026
2032
|
</pont-input-group-addon>
|
|
2027
2033
|
</pont-input-group>
|
|
2028
|
-
`}};gt([a({type:String})],lt.prototype,"autocomplete",2);gt([a({type:Boolean})],lt.prototype,"disabled",2);gt([a({type:String})],lt.prototype,"form",2);gt([a({type:String})],lt.prototype,"id",2);gt([a({type:Boolean})],lt.prototype,"invalid",2);gt([a({type:Number})],lt.prototype,"maxlength",2);gt([a({type:Number})],lt.prototype,"minlength",2);gt([a({type:String})],lt.prototype,"name",2);gt([a({type:String})],lt.prototype,"pattern",2);gt([a({type:String})],lt.prototype,"placeholder",2);gt([a({type:Boolean})],lt.prototype,"readonly",2);gt([a({type:Boolean})],lt.prototype,"required",2);gt([a({type:String})],lt.prototype,"value",2);gt([a({attribute:!1})],lt.prototype,"onClick",2);gt([a({attribute:!1})],lt.prototype,"onInput",2);gt([a({attribute:!1})],lt.prototype,"onChange",2);gt([a({attribute:!1})],lt.prototype,"onFocus",2);gt([a({attribute:!1})],lt.prototype,"onBlur",2);gt([g()],lt.prototype,"_showPassword",2);lt=gt([p("pont-password-input")],lt);const vc={root:["pont-relative pont-overflow-hidden","pont-w-progress-space-w pont-h-progress-space-h","pont-bg-progress-color-bg","pont-rounded-progress-radius"],indicator:["pont-flex-1","pont-w-progress-indicator-space-w pont-h-progress-indicator-space-h","pont-bg-progress-indicator-color-bg","pont-transition-all"]};var
|
|
2034
|
+
`}};gt([a({type:String})],lt.prototype,"autocomplete",2);gt([a({type:Boolean})],lt.prototype,"disabled",2);gt([a({type:String})],lt.prototype,"form",2);gt([a({type:String})],lt.prototype,"id",2);gt([a({type:Boolean})],lt.prototype,"invalid",2);gt([a({type:Number})],lt.prototype,"maxlength",2);gt([a({type:Number})],lt.prototype,"minlength",2);gt([a({type:String})],lt.prototype,"name",2);gt([a({type:String})],lt.prototype,"pattern",2);gt([a({type:String})],lt.prototype,"placeholder",2);gt([a({type:Boolean})],lt.prototype,"readonly",2);gt([a({type:Boolean})],lt.prototype,"required",2);gt([a({type:String})],lt.prototype,"value",2);gt([a({attribute:!1})],lt.prototype,"onClick",2);gt([a({attribute:!1})],lt.prototype,"onInput",2);gt([a({attribute:!1})],lt.prototype,"onChange",2);gt([a({attribute:!1})],lt.prototype,"onFocus",2);gt([a({attribute:!1})],lt.prototype,"onBlur",2);gt([g()],lt.prototype,"_showPassword",2);lt=gt([p("pont-password-input")],lt);const vc={root:["pont-relative pont-overflow-hidden","pont-w-progress-space-w pont-h-progress-space-h","pont-bg-progress-color-bg","pont-rounded-progress-radius"],indicator:["pont-flex-1","pont-w-progress-indicator-space-w pont-h-progress-indicator-space-h","pont-bg-progress-indicator-color-bg","pont-transition-all"]};var J_=Object.defineProperty,X_=Object.getOwnPropertyDescriptor,_h=(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&&J_(t,r,n),n};let _a=class extends f{constructor(){super(...arguments),this.value=15}createRenderRoot(){return this}render(){return l`
|
|
2029
2035
|
<div
|
|
2030
2036
|
part="progress"
|
|
2031
2037
|
aria-valuenow="${this.value}"
|
|
@@ -2043,7 +2049,7 @@
|
|
|
2043
2049
|
style="transform: translateX(-${100-(this.value||0)}%);"
|
|
2044
2050
|
></div>
|
|
2045
2051
|
</div>
|
|
2046
|
-
`}};_h([a({type:Number})],_a.prototype,"value",2);_a=_h([p("pont-progress")],_a);const no={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"]}},
|
|
2052
|
+
`}};_h([a({type:Number})],_a.prototype,"value",2);_a=_h([p("pont-progress")],_a);const no={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"]}},tw="unChecked";var ew=Object.defineProperty,rw=Object.getOwnPropertyDescriptor,wr=(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 Ye=class extends y{constructor(){super(...arguments),this.checked=!1,this.tabindex=0,this.value="",this.id="radio-group-item",this.state=tw,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=m(no.item.wrapper),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
2047
2053
|
<button
|
|
2048
2054
|
type="button"
|
|
2049
2055
|
part="radio-group-item"
|
|
@@ -2079,16 +2085,16 @@
|
|
|
2079
2085
|
</svg>
|
|
2080
2086
|
</span>`:h}
|
|
2081
2087
|
</button>
|
|
2082
|
-
`}};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
|
|
2088
|
+
`}};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 nw=Object.defineProperty,ow=Object.getOwnPropertyDescriptor,wh=(e,t,r,o)=>{for(var n=o>1?void 0:o?ow(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&&nw(t,r,n),n};let wa=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`
|
|
2083
2089
|
<div
|
|
2084
2090
|
part="radio-group"
|
|
2085
2091
|
class=${m(no.root,this.className)}
|
|
2086
2092
|
></div>
|
|
2087
|
-
`}};wh([a({type:String})],wa.prototype,"defaultValue",2);wa=wh([p("pont-radio-group")],wa);const
|
|
2093
|
+
`}};wh([a({type:String})],wa.prototype,"defaultValue",2);wa=wh([p("pont-radio-group")],wa);const iw=["pont-relative","pont-border pont-border-scrollarea-color-border","pont-bg-scrollarea-color-bg"];var sw=Object.defineProperty,aw=Object.getOwnPropertyDescriptor,$h=(e,t,r,o)=>{for(var n=o>1?void 0:o?aw(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&&sw(t,r,n),n};let $a=class extends y{createRenderRoot(){return this}firstUpdated(){this.moveLightDomChildrenInto(this.viewportEl)}render(){return l`
|
|
2088
2094
|
<div
|
|
2089
2095
|
dir="ltr"
|
|
2090
2096
|
data-slot="scroll-area"
|
|
2091
|
-
class=${m(
|
|
2097
|
+
class=${m(iw,this.className)}
|
|
2092
2098
|
>
|
|
2093
2099
|
<style>
|
|
2094
2100
|
[data-radix-scroll-area-viewport] {
|
|
@@ -2121,7 +2127,7 @@
|
|
|
2121
2127
|
style="overflow: hidden scroll;"
|
|
2122
2128
|
></div>
|
|
2123
2129
|
</div>
|
|
2124
|
-
`}};$h([Po("[data-radix-scroll-area-viewport]")],$a.prototype,"viewportEl",2);$a=$h([p("pont-scroll-area")],$a);class
|
|
2130
|
+
`}};$h([Po("[data-radix-scroll-area-viewport]")],$a.prototype,"viewportEl",2);$a=$h([p("pont-scroll-area")],$a);class lw{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 re={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 dw=Object.defineProperty,cw=Object.getOwnPropertyDescriptor,gl=(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&&dw(t,r,n),n};let br=class extends y{constructor(){super(...arguments),this.uuid=qa(),this.selectStore=new lw,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`
|
|
2125
2131
|
<div
|
|
2126
2132
|
part="select"
|
|
2127
2133
|
data-select-uuid=${this.uuid}
|
|
@@ -2131,19 +2137,19 @@
|
|
|
2131
2137
|
* @license
|
|
2132
2138
|
* Copyright 2018 Google LLC
|
|
2133
2139
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2134
|
-
*/const Ph="important",
|
|
2140
|
+
*/const Ph="important",pw=" !"+Ph,hw=An(class extends Di{constructor(e){var t;if(super(e),e.type!==Ha.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(pw);o.includes("-")||i?r.setProperty(o,i?n.slice(0,-11):n,i?Ph:""):r[o]=n}}return hr}});var uw=Object.defineProperty,mw=Object.getOwnPropertyDescriptor,fl=(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 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`
|
|
2135
2141
|
<div
|
|
2136
2142
|
part="select-group"
|
|
2137
2143
|
data-slot="select-content"
|
|
2138
2144
|
class="${m(re.content.content,this.className)}"
|
|
2139
|
-
style="${
|
|
2145
|
+
style="${hw(this._dropdownStyle)}"
|
|
2140
2146
|
>
|
|
2141
2147
|
<div
|
|
2142
2148
|
part="select-viewport"
|
|
2143
2149
|
class="${m(re.content.viewport)}"
|
|
2144
2150
|
></div>
|
|
2145
2151
|
</div>
|
|
2146
|
-
`}};fl([g()],wi.prototype,"focusedIndex",2);fl([g()],wi.prototype,"_dropdownStyle",2);wi=fl([p("pont-select-group")],wi);var
|
|
2152
|
+
`}};fl([g()],wi.prototype,"focusedIndex",2);fl([g()],wi.prototype,"_dropdownStyle",2);wi=fl([p("pont-select-group")],wi);var gw=Object.defineProperty,fw=Object.getOwnPropertyDescriptor,Jr=(e,t,r,o)=>{for(var n=o>1?void 0:o?fw(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&&gw(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`
|
|
2147
2153
|
<div
|
|
2148
2154
|
${Et(e)}
|
|
2149
2155
|
part="select-item"
|
|
@@ -2177,12 +2183,12 @@
|
|
|
2177
2183
|
|
|
2178
2184
|
<div part="select-item-container"></div>
|
|
2179
2185
|
</div>
|
|
2180
|
-
`}};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
|
|
2186
|
+
`}};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 vw=Object.getOwnPropertyDescriptor,bw=(e,t,r,o)=>{for(var n=o>1?void 0:o?vw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let bc=class extends y{get _containerElement(){return this.querySelector("div[part=select-label]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l`
|
|
2181
2187
|
<div
|
|
2182
2188
|
part="select-label"
|
|
2183
2189
|
class=${m(re.label,this.className)}
|
|
2184
2190
|
></div>
|
|
2185
|
-
`}};bc=
|
|
2191
|
+
`}};bc=bw([p("pont-select-label")],bc);var yw=Object.defineProperty,_w=Object.getOwnPropertyDescriptor,vl=(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&&yw(t,r,n),n};let $i=class extends y{constructor(){super(...arguments),this.state=ol,this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=select-list]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l`
|
|
2186
2192
|
<div
|
|
2187
2193
|
part="select-list"
|
|
2188
2194
|
class="${m("pont-absolute pont-z-50 pont-max-h-72 pont-w-full pont-overflow-hidden pont-overflow-y-auto pont-rounded-lg pont-border pont-border-input pont-bg-background p-1 [&::-webkit-scrollbar-thumb]:pont-rounded-full [&::-webkit-scrollbar-thumb]:pont-bg-accent [&::-webkit-scrollbar-track]:pont-bg-gray-100 [&::-webkit-scrollbar]:pont-w-2",this.className)}"
|
|
@@ -2190,14 +2196,14 @@
|
|
|
2190
2196
|
data-state="${this.state}"
|
|
2191
2197
|
style="display: ${this.isOpen?"block":"none"}; top:115%"
|
|
2192
2198
|
></div>
|
|
2193
|
-
`}};vl([a({attribute:"data-state",type:String})],$i.prototype,"state",2);vl([g()],$i.prototype,"isOpen",2);$i=vl([p("pont-select-list")],$i);var
|
|
2199
|
+
`}};vl([a({attribute:"data-state",type:String})],$i.prototype,"state",2);vl([g()],$i.prototype,"isOpen",2);$i=vl([p("pont-select-list")],$i);var ww=Object.defineProperty,$w=Object.getOwnPropertyDescriptor,bl=(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 Pi=class extends f{constructor(){super(...arguments),this._id="",this._hidden=""}createRenderRoot(){return this}render(){return l`
|
|
2194
2200
|
<div
|
|
2195
2201
|
rtgcmd-separator
|
|
2196
2202
|
part="select-separator"
|
|
2197
2203
|
role="separator"
|
|
2198
2204
|
class=${m(re.separator,this.className)}
|
|
2199
2205
|
></div>
|
|
2200
|
-
`}};bl([a({type:String})],Pi.prototype,"_id",2);bl([a({attribute:"aria-hidden",type:String})],Pi.prototype,"_hidden",2);Pi=bl([p("pont-select-separator")],Pi);var
|
|
2206
|
+
`}};bl([a({type:String})],Pi.prototype,"_id",2);bl([a({attribute:"aria-hidden",type:String})],Pi.prototype,"_hidden",2);Pi=bl([p("pont-select-separator")],Pi);var Pw=Object.defineProperty,Cw=Object.getOwnPropertyDescriptor,Ch=(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 Pa=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(re.trigger.trigger,e),r=((o=this._select)==null?void 0:o.disabled)||!1;return l`
|
|
2201
2207
|
<button
|
|
2202
2208
|
type="button"
|
|
2203
2209
|
id=${this._triggerId!==""?this._triggerId:h}
|
|
@@ -2228,11 +2234,11 @@
|
|
|
2228
2234
|
<path d="m6 9 6 6 6-6" />
|
|
2229
2235
|
</svg>
|
|
2230
2236
|
</button>
|
|
2231
|
-
`}};Ch([a({type:String})],Pa.prototype,"id",2);Pa=Ch([p("pont-select-trigger")],Pa);var
|
|
2237
|
+
`}};Ch([a({type:String})],Pa.prototype,"id",2);Pa=Ch([p("pont-select-trigger")],Pa);var Ew=Object.defineProperty,Sw=Object.getOwnPropertyDescriptor,Eh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Sw(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 Ca=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`
|
|
2232
2238
|
<span part="select-value" class=${m(re.value,this.className)}>
|
|
2233
2239
|
${this.renderLabel()}
|
|
2234
2240
|
</span>
|
|
2235
|
-
`}};Eh([a({type:String})],Ca.prototype,"placeholder",2);Ca=Eh([p("pont-select-value")],Ca);const
|
|
2241
|
+
`}};Eh([a({type:String})],Ca.prototype,"placeholder",2);Ca=Eh([p("pont-select-value")],Ca);const xw="pont-bg-skeleton-color-bg pont-animate-skeleton-animate pont-rounded-skeleton-radius";var Ow=Object.getOwnPropertyDescriptor,Rw=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ow(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let yc=class extends y{createRenderRoot(){return this}render(){return l` <div class=${m(xw,this.className)}></div> `}};yc=Rw([p("pont-skeleton")],yc);var Iw=Object.defineProperty,Aw=Object.getOwnPropertyDescriptor,Sh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Aw(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&&Iw(t,r,n),n};let Ea=class extends f{constructor(){super(...arguments),this.variant="circle"}createRenderRoot(){return this}render(){return this.variant==="basic"?l`
|
|
2236
2242
|
<svg
|
|
2237
2243
|
data-slot="spinner"
|
|
2238
2244
|
data-variant="basic"
|
|
@@ -2299,7 +2305,7 @@
|
|
|
2299
2305
|
>
|
|
2300
2306
|
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
|
|
2301
2307
|
</svg>
|
|
2302
|
-
`}};Sh([a({type:String})],Ea.prototype,"variant",2);Ea=Sh([p("pont-spinner")],Ea);const _c={root:["pont-inline-flex","pont-shrink-0 pont-items-center","pont-w-switch-space-w pont-h-switch-space-h","pont-rounded-switch-radius pont-border-switch-width-border pont-border-switch-color-border pont-outline-none","pont-transition-all","focus-visible:pont-border-switch-color-border-focus focus-visible:pont-ring-switch-width-ring-focus focus-visible:pont-ring-switch-color-ring-focus",'data-[state="checked"]:pont-bg-switch-color-bg-checked data-[state="unchecked"]:pont-bg-switch-color-bg-unchecked','data-[disabled="true"]:pont-opacity-switch-opacity-disabled data-[disabled="true"]:pont-cursor-not-allowed'],thumb:["pont-pointer-events-none","pont-block","pont-size-switch-thumb-space-size","pont-rounded-switch-thumb-radius","pont-ring-0","pont-transition-transform",'data-[state="checked"]:pont-bg-switch-thumb-color-bg-checked data-[state="unchecked"]:pont-bg-switch-thumb-color-bg-unchecked','data-[state="checked"]:pont-translate-x-[calc(100%-2px)] data-[state="unchecked"]:pont-translate-x-0']};var
|
|
2308
|
+
`}};Sh([a({type:String})],Ea.prototype,"variant",2);Ea=Sh([p("pont-spinner")],Ea);const _c={root:["pont-inline-flex","pont-shrink-0 pont-items-center","pont-w-switch-space-w pont-h-switch-space-h","pont-rounded-switch-radius pont-border-switch-width-border pont-border-switch-color-border pont-outline-none","pont-transition-all","focus-visible:pont-border-switch-color-border-focus focus-visible:pont-ring-switch-width-ring-focus focus-visible:pont-ring-switch-color-ring-focus",'data-[state="checked"]:pont-bg-switch-color-bg-checked data-[state="unchecked"]:pont-bg-switch-color-bg-unchecked','data-[disabled="true"]:pont-opacity-switch-opacity-disabled data-[disabled="true"]:pont-cursor-not-allowed'],thumb:["pont-pointer-events-none","pont-block","pont-size-switch-thumb-space-size","pont-rounded-switch-thumb-radius","pont-ring-0","pont-transition-transform",'data-[state="checked"]:pont-bg-switch-thumb-color-bg-checked data-[state="unchecked"]:pont-bg-switch-thumb-color-bg-unchecked','data-[state="checked"]:pont-translate-x-[calc(100%-2px)] data-[state="unchecked"]:pont-translate-x-0']};var Tw=Object.defineProperty,Dw=Object.getOwnPropertyDescriptor,yl=(e,t,r,o)=>{for(var n=o>1?void 0:o?Dw(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&&Tw(t,r,n),n};let Ci=class extends f{constructor(){super(...arguments),this.disabled="false",this.state="unchecked"}_toggleChecked(){this.disabled==="false"&&(this.state=this.state==="checked"?"unchecked":"checked",this.dispatchEvent(new CustomEvent("change",{detail:this.state})))}createRenderRoot(){return this.classList="pont-w-switch-space-w pont-h-switch-space-h",this}render(){return l`
|
|
2303
2309
|
<div
|
|
2304
2310
|
part="switch"
|
|
2305
2311
|
role="switch"
|
|
@@ -2315,7 +2321,7 @@
|
|
|
2315
2321
|
class=${m(_c.thumb)}
|
|
2316
2322
|
></div>
|
|
2317
2323
|
</div>
|
|
2318
|
-
`}};yl([a({attribute:"data-disabled",type:String})],Ci.prototype,"disabled",2);yl([a({attribute:"data-state",type:String})],Ci.prototype,"state",2);Ci=yl([p("pont-switch")],Ci);const wt={preview:["pont-flex pont-bg-table-preview-color-bg pont-w-table-preview-space-w pont-items-center pont-justify-center pont-px-table-preview-space-px pont-py-table-preview-space-py"],container:["pont-relative pont-w-table-container-space-w pont-overflow-auto"],table:["pont-w-table-space-w pont-caption-bottom pont-text-table-font"],caption:["pont-mt-table-caption-space-mt pont-text-table-caption-font pont-text-table-caption-color-text"],head:{root:["[&_tr]:pont-border-table-head-color-border [&_tr]:pont-border-b-table-head-width-border"],row:["pont-border-b-table-head-width-border pont-border-table-head-color-border pont-transition-colors hover:pont-bg-table-head-row-color-bg-hover"],cell:{base:["pont-h-table-head-cell-space-h pont-px-table-head-cell-space-px pont-align-middle pont-font-table-head-cell-font-weight pont-text-table-head-cell-color-text"],align:{left:"pont-text-left",right:"pont-text-right"}}},body:{root:["[&_tr:last-child]:pont-border-0"],row:["pont-border-b-table-body-width-border pont-border-table-body-color-border pont-transition-colors hover:pont-bg-table-body-row-color-bg-hover"],cell:{base:["pont-px-table-body-cell-space-px pont-py-table-body-cell-space-py pont-align-middle"],align:{right:"pont-text-right"}}},footer:{root:["pont-border-t-table-footer-width-border pont-border-table-footer-color-border pont-bg-table-footer-color-bg pont-font-table-footer-font-weight [&>tr]:pont-last:border-b-0"],row:["pont-border-b-table-footer-width-border pont-border-table-footer-color-border pont-transition-colors hover:pont-bg-table-footer-row-color-bg-hover"],cell:{base:["pont-px-table-footer-cell-space-px pont-py-table-footer-cell-space-py pont-align-middle"],align:{right:"pont-text-right"}}}};var
|
|
2324
|
+
`}};yl([a({attribute:"data-disabled",type:String})],Ci.prototype,"disabled",2);yl([a({attribute:"data-state",type:String})],Ci.prototype,"state",2);Ci=yl([p("pont-switch")],Ci);const wt={preview:["pont-flex pont-bg-table-preview-color-bg pont-w-table-preview-space-w pont-items-center pont-justify-center pont-px-table-preview-space-px pont-py-table-preview-space-py"],container:["pont-relative pont-w-table-container-space-w pont-overflow-auto"],table:["pont-w-table-space-w pont-caption-bottom pont-text-table-font"],caption:["pont-mt-table-caption-space-mt pont-text-table-caption-font pont-text-table-caption-color-text"],head:{root:["[&_tr]:pont-border-table-head-color-border [&_tr]:pont-border-b-table-head-width-border"],row:["pont-border-b-table-head-width-border pont-border-table-head-color-border pont-transition-colors hover:pont-bg-table-head-row-color-bg-hover"],cell:{base:["pont-h-table-head-cell-space-h pont-px-table-head-cell-space-px pont-align-middle pont-font-table-head-cell-font-weight pont-text-table-head-cell-color-text"],align:{left:"pont-text-left",right:"pont-text-right"}}},body:{root:["[&_tr:last-child]:pont-border-0"],row:["pont-border-b-table-body-width-border pont-border-table-body-color-border pont-transition-colors hover:pont-bg-table-body-row-color-bg-hover"],cell:{base:["pont-px-table-body-cell-space-px pont-py-table-body-cell-space-py pont-align-middle"],align:{right:"pont-text-right"}}},footer:{root:["pont-border-t-table-footer-width-border pont-border-table-footer-color-border pont-bg-table-footer-color-bg pont-font-table-footer-font-weight [&>tr]:pont-last:border-b-0"],row:["pont-border-b-table-footer-width-border pont-border-table-footer-color-border pont-transition-colors hover:pont-bg-table-footer-row-color-bg-hover"],cell:{base:["pont-px-table-footer-cell-space-px pont-py-table-footer-cell-space-py pont-align-middle"],align:{right:"pont-text-right"}}}};var Lw=Object.defineProperty,Fw=Object.getOwnPropertyDescriptor,Bi=(e,t,r,o)=>{for(var n=o>1?void 0:o?Fw(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&&Lw(t,r,n),n};let yo=class extends y{constructor(){super(...arguments),this.dataTable=[],this.footerData=[],this.captionText=""}get _containerElement(){return this.querySelector("table[part=table]")}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get columnKeys(){var t;const e=(t=this.dataTable)==null?void 0:t[0];return e?Object.keys(e).filter(r=>r!=="id"):[]}capitalizeLabel(e){return e.charAt(0).toUpperCase()+e.slice(1)}render(){const e=this.columnKeys;return l`
|
|
2319
2325
|
<div class=${m(wt.preview)}>
|
|
2320
2326
|
<div class=${m(wt.container)}>
|
|
2321
2327
|
<table part="table" class=${m(wt.table)}>
|
|
@@ -2370,20 +2376,20 @@
|
|
|
2370
2376
|
</table>
|
|
2371
2377
|
</div>
|
|
2372
2378
|
</div>
|
|
2373
|
-
`}};Bi([a({type:Array})],yo.prototype,"dataTable",2);Bi([a({type:Array})],yo.prototype,"footerData",2);Bi([a({type:String})],yo.prototype,"captionText",2);yo=Bi([p("pont-table")],yo);const
|
|
2379
|
+
`}};Bi([a({type:Array})],yo.prototype,"dataTable",2);Bi([a({type:Array})],yo.prototype,"footerData",2);Bi([a({type:String})],yo.prototype,"captionText",2);yo=Bi([p("pont-table")],yo);const kw="pont-account-settings-dashboard-width",Nw="pont-account-settings-modal-width",Mw="pont-account-settings-dashboard",Bw="pont-account-settings-page-reset-margin",Uw="pont-account-settings-modal-root",rt="pont",wc={xs:640,sm:768};function jw(){const e=Date.now().toString(36),t=Math.random().toString(36).substring(2,7);return`${rt}-${e}${t}`}function qw(e,t){return`${e}-trigger-${t}`}function zw(e,t){return`${e}-content-${t}`}var Vw=Object.defineProperty,Hw=Object.getOwnPropertyDescriptor,$r=(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 Qe=class extends f{constructor(){super(...arguments),this._initialSyncDone=!1,this.orientation="horizontal",this.dir="ltr",this.activationMode="automatic",this._baseId=jw(),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=qw(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(u=>u.value===n.value);d!=null&&d._contentSlot&&((c=d._contentSlot).id||(c.id=zw(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`
|
|
2374
2380
|
<div
|
|
2375
2381
|
data-slot="tabs"
|
|
2376
2382
|
data-orientation=${this.orientation}
|
|
2377
2383
|
dir=${this.dir}
|
|
2378
2384
|
></div>
|
|
2379
|
-
`}};$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
|
|
2385
|
+
`}};$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 Gw=Object.defineProperty,Kw=Object.getOwnPropertyDescriptor,xh=(e,t,r,o)=>{for(var n=o>1?void 0:o?Kw(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&&Gw(t,r,n),n};let Sa=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`
|
|
2380
2386
|
<div
|
|
2381
2387
|
data-slot="tabs-list"
|
|
2382
2388
|
data-variant=${this.variant}
|
|
2383
2389
|
role="tablist"
|
|
2384
2390
|
tabindex="0"
|
|
2385
2391
|
></div>
|
|
2386
|
-
`}};xh([a({type:String})],Sa.prototype,"variant",2);Sa=xh([p("pont-tabs-list")],Sa);var
|
|
2392
|
+
`}};xh([a({type:String})],Sa.prototype,"variant",2);Sa=xh([p("pont-tabs-list")],Sa);var Ww=Object.defineProperty,Yw=Object.getOwnPropertyDescriptor,_l=(e,t,r,o)=>{for(var n=o>1?void 0:o?Yw(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 Ei=class extends f{constructor(){super(...arguments),this.value="",this._onClick=()=>{this._emitSelect()},this._onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._emitSelect())}}createRenderRoot(){return this}get _triggerSlot(){return this.querySelector('[data-slot="tabs-trigger"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._triggerSlot&&((r=this._triggerSlot)==null||r.appendChild(t))})}_emitSelect(){this.disabled||this.dispatchEvent(new CustomEvent("pont-tabs:trigger-select",{detail:{value:this.value},bubbles:!0}))}render(){return l`
|
|
2387
2393
|
<button
|
|
2388
2394
|
data-slot="tabs-trigger"
|
|
2389
2395
|
?data-disabled=${this.disabled}
|
|
@@ -2393,14 +2399,14 @@
|
|
|
2393
2399
|
@click=${this._onClick}
|
|
2394
2400
|
@keydown=${this._onKeyDown}
|
|
2395
2401
|
></button>
|
|
2396
|
-
`}};_l([a({type:String})],Ei.prototype,"value",2);_l([a({type:Boolean})],Ei.prototype,"disabled",2);Ei=_l([p("pont-tabs-trigger")],Ei);var
|
|
2402
|
+
`}};_l([a({type:String})],Ei.prototype,"value",2);_l([a({type:Boolean})],Ei.prototype,"disabled",2);Ei=_l([p("pont-tabs-trigger")],Ei);var Qw=Object.defineProperty,Zw=Object.getOwnPropertyDescriptor,Oh=(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 xa=class extends f{constructor(){super(...arguments),this.value=""}createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="tabs-content"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._contentSlot&&((r=this._contentSlot)==null||r.appendChild(t))})}render(){return l`
|
|
2397
2403
|
<div
|
|
2398
2404
|
data-slot="tabs-content"
|
|
2399
2405
|
role="tabpanel"
|
|
2400
2406
|
tabindex="0"
|
|
2401
2407
|
hidden
|
|
2402
2408
|
></div>
|
|
2403
|
-
`}};Oh([a({type:String})],xa.prototype,"value",2);xa=Oh([p("pont-tabs-content")],xa);const Do={viewportRoot:["pont-fixed pont-top-0 pont-z-[100] pont-flex pont-max-h-screen pont-w-toast-viewport-root-space-w pont-flex-col-reverse pont-px-toast-viewport-root-space-px pont-py-toast-viewport-root-space-py sm:pont-bottom-0 sm:pont-right-0 sm:pont-top-auto sm:pont-flex-col md:pont-max-w-toast-viewport-root-space-w-md"],viewportItem:{base:["group pont-pointer-events-auto pont-relative pont-flex pont-w-toast-viewport-item-space-w pont-items-center pont-justify-between pont-gap-toast-viewport-item-space-gap pont-overflow-hidden pont-rounded-toast-viewport-item-radius pont-px-toast-viewport-item-space-px pont-py-toast-viewport-item-space-py pont-shadow-toast-viewport-item-shadow pont-transition-all","data-[swipe=cancel]:pont-translate-x-0","data-[swipe=end]:pont-translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=move]:pont-translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=move]:pont-transition-none","data-[state=open]:pont-animate-toast-animate-in","data-[state=closed]:pont-animate-toast-animate-out","data-[swipe=end]:pont-animate-toast-animate-out","data-[state=closed]:pont-opacity-80","data-[state=open]:pont-translate-y-toast-viewport-item-translate-y-enter-desktop","data-[state=open]:sm:pont-translate-y-toast-viewport-item-translate-y-enter-mobile","data-[state=closed]:pont-translate-x-toast-viewport-item-translate-x-exit"],variants:{default:["pont-border pont-border-toast-viewport-default-color-border pont-bg-toast-viewport-default-color-bg pont-text-toast-viewport-default-color-text"],destructive:["pont-bg-toast-viewport-destructive-color-bg pont-text-toast-viewport-destructive-color-text"]}},action:{base:["pont-text-toast-action-font pont-font-toast-action-font-weight pont-text-toast-action-color-text","pont-h-toast-action-space-h pont-px-toast-action-space-px pont-py-toast-action-space-py","pont-inline-flex pont-border pont-border-toast-action-color-border pont-shrink-0 pont-items-center pont-justify-center pont-rounded-toast-action-radius pont-transition-colors","focus:pont-outline-none focus:pont-ring-toast-action-width-ring-focus focus:pont-ring-toast-action-color-ring-focus","disabled:pont-pointer-events-none disabled:pont-opacity-toast-action-opacity-disabled"],variants:{default:["pont-bg-toast-action-default-color-bg hover:pont-bg-toast-action-default-color-bg-hover"],destructive:["pont-bg-toast-action-destructive-color-bg hover:pont-bg-toast-action-destructive-color-bg-hover pont-text-toast-action-destructive-color-text focus:pont-ring-toast-action-destructive-color-ring-focus"]}},title:["pont-text-toast-title-font pont-font-toast-title-font-weight [&+div]:pont-text-toast-title-font"],description:["pont-text-toast-description-font pont-opacity-toast-description-opacity"]};var
|
|
2409
|
+
`}};Oh([a({type:String})],xa.prototype,"value",2);xa=Oh([p("pont-tabs-content")],xa);const Do={viewportRoot:["pont-fixed pont-top-0 pont-z-[100] pont-flex pont-max-h-screen pont-w-toast-viewport-root-space-w pont-flex-col-reverse pont-px-toast-viewport-root-space-px pont-py-toast-viewport-root-space-py sm:pont-bottom-0 sm:pont-right-0 sm:pont-top-auto sm:pont-flex-col md:pont-max-w-toast-viewport-root-space-w-md"],viewportItem:{base:["group pont-pointer-events-auto pont-relative pont-flex pont-w-toast-viewport-item-space-w pont-items-center pont-justify-between pont-gap-toast-viewport-item-space-gap pont-overflow-hidden pont-rounded-toast-viewport-item-radius pont-px-toast-viewport-item-space-px pont-py-toast-viewport-item-space-py pont-shadow-toast-viewport-item-shadow pont-transition-all","data-[swipe=cancel]:pont-translate-x-0","data-[swipe=end]:pont-translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=move]:pont-translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=move]:pont-transition-none","data-[state=open]:pont-animate-toast-animate-in","data-[state=closed]:pont-animate-toast-animate-out","data-[swipe=end]:pont-animate-toast-animate-out","data-[state=closed]:pont-opacity-80","data-[state=open]:pont-translate-y-toast-viewport-item-translate-y-enter-desktop","data-[state=open]:sm:pont-translate-y-toast-viewport-item-translate-y-enter-mobile","data-[state=closed]:pont-translate-x-toast-viewport-item-translate-x-exit"],variants:{default:["pont-border pont-border-toast-viewport-default-color-border pont-bg-toast-viewport-default-color-bg pont-text-toast-viewport-default-color-text"],destructive:["pont-bg-toast-viewport-destructive-color-bg pont-text-toast-viewport-destructive-color-text"]}},action:{base:["pont-text-toast-action-font pont-font-toast-action-font-weight pont-text-toast-action-color-text","pont-h-toast-action-space-h pont-px-toast-action-space-px pont-py-toast-action-space-py","pont-inline-flex pont-border pont-border-toast-action-color-border pont-shrink-0 pont-items-center pont-justify-center pont-rounded-toast-action-radius pont-transition-colors","focus:pont-outline-none focus:pont-ring-toast-action-width-ring-focus focus:pont-ring-toast-action-color-ring-focus","disabled:pont-pointer-events-none disabled:pont-opacity-toast-action-opacity-disabled"],variants:{default:["pont-bg-toast-action-default-color-bg hover:pont-bg-toast-action-default-color-bg-hover"],destructive:["pont-bg-toast-action-destructive-color-bg hover:pont-bg-toast-action-destructive-color-bg-hover pont-text-toast-action-destructive-color-text focus:pont-ring-toast-action-destructive-color-ring-focus"]}},title:["pont-text-toast-title-font pont-font-toast-title-font-weight [&+div]:pont-text-toast-title-font"],description:["pont-text-toast-description-font pont-opacity-toast-description-opacity"]};var Jw=Object.defineProperty,Xw=Object.getOwnPropertyDescriptor,wl=(e,t,r,o)=>{for(var n=o>1?void 0:o?Xw(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&&Jw(t,r,n),n};const $c="closed";let Kr=class extends y{constructor(){super(...arguments),this.variant="default",this.state=$c}get _containerElement(){return this.querySelector("li[part=toast-view-port-li]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l` <ol
|
|
2404
2410
|
part="toast-view-port"
|
|
2405
2411
|
tabindex="-1"
|
|
2406
2412
|
@click="${e=>e.stopPropagation()}"
|
|
@@ -2418,32 +2424,32 @@
|
|
|
2418
2424
|
data-radix-collection-item=""
|
|
2419
2425
|
style="user-select: none; touch-action: none;"
|
|
2420
2426
|
></li>
|
|
2421
|
-
</ol>`}};Kr.toastVariants=Do.viewportItem;wl([a({type:String})],Kr.prototype,"variant",2);wl([a({attribute:"data-state",type:String})],Kr.prototype,"state",2);Kr=wl([p("pont-toast-view-port")],Kr);var
|
|
2427
|
+
</ol>`}};Kr.toastVariants=Do.viewportItem;wl([a({type:String})],Kr.prototype,"variant",2);wl([a({attribute:"data-state",type:String})],Kr.prototype,"state",2);Kr=wl([p("pont-toast-view-port")],Kr);var t$=Object.defineProperty,e$=Object.getOwnPropertyDescriptor,Rh=(e,t,r,o)=>{for(var n=o>1?void 0:o?e$(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&&t$(t,r,n),n};let Rn=class extends y{constructor(){super(...arguments),this.variant="default"}get _containerElement(){return this.querySelector("button[part=toast-action]")}getAttributesToExclude(){return["click","type","variant"]}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}getFilteredAttributes(){const e=this.getAttributesToExclude(),t={};for(const r of this.attributes)e.includes(r.name)||(t[r.name]=r.value);return t}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return l`
|
|
2422
2428
|
<button
|
|
2423
2429
|
${Et(e)}
|
|
2424
2430
|
part="toast-action"
|
|
2425
2431
|
type="button"
|
|
2426
2432
|
class="${m(Rn.toastVariants.base,Rn.toastVariants.variants[this.variant],this.className,"pont-w-max")}"
|
|
2427
2433
|
></button>
|
|
2428
|
-
`}};Rn.toastVariants=Do.action;Rh([a({type:String})],Rn.prototype,"variant",2);Rn=Rh([p("pont-toast-action")],Rn);var
|
|
2434
|
+
`}};Rn.toastVariants=Do.action;Rh([a({type:String})],Rn.prototype,"variant",2);Rn=Rh([p("pont-toast-action")],Rn);var r$=Object.getOwnPropertyDescriptor,n$=(e,t,r,o)=>{for(var n=o>1?void 0:o?r$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Pc=class extends y{get _containerElement(){return this.querySelector("div[part=toast-description]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
2429
2435
|
<div
|
|
2430
2436
|
class="${m(Do.description,this.className)}"
|
|
2431
2437
|
part="toast-description"
|
|
2432
2438
|
>
|
|
2433
2439
|
<slot></slot>
|
|
2434
2440
|
</div>
|
|
2435
|
-
`}};Pc=
|
|
2441
|
+
`}};Pc=n$([p("pont-toast-description")],Pc);var o$=Object.getOwnPropertyDescriptor,i$=(e,t,r,o)=>{for(var n=o>1?void 0:o?o$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Cc=class extends y{get _containerElement(){return this.querySelector("div[part=toast-title]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
2436
2442
|
<div
|
|
2437
2443
|
part="toast-title"
|
|
2438
2444
|
class="${m(Do.title,this.className)}"
|
|
2439
2445
|
></div>
|
|
2440
|
-
`}};Cc=
|
|
2446
|
+
`}};Cc=i$([p("pont-toast-title")],Cc);var s$=Object.getOwnPropertyDescriptor,a$=(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=s(n)||n);return n};let Ec=class extends y{constructor(){super(),this.handleClick=this.handleClick.bind(this)}get _containerElement(){return this.querySelector("div[part=toast-trigger]")}get _toast(){let e=this.parentElement;for(;e&&!(e instanceof Si);)e=e.parentElement;return e}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}handleClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("open-toast",{bubbles:!0})),this._toast.isOpen=!0}render(){return l`
|
|
2441
2447
|
<div
|
|
2442
2448
|
@click=${this.handleClick}
|
|
2443
2449
|
part="toast-trigger"
|
|
2444
2450
|
class="${m(this.className)}"
|
|
2445
2451
|
></div>
|
|
2446
|
-
`}};Ec=
|
|
2452
|
+
`}};Ec=a$([p("pont-toast-trigger")],Ec);var l$=Object.defineProperty,d$=Object.getOwnPropertyDescriptor,Ih=(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 Si=class extends y{constructor(){super(...arguments),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=toast]")}onClick(){this.isOpen=!this.isOpen}connectedCallback(){super.connectedCallback(),this.addEventListener("close-toast",()=>{this.isOpen=!1}),this.addEventListener("open-toast",()=>{this.isOpen=!0})}get _content(){return this.querySelector("pont-toast-view-port")}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l` <div class="${m("",this.className)}" part="toast"></div> `}};Ih([g()],Si.prototype,"isOpen",2);Si=Ih([p("pont-toast")],Si);var xi=(e=>(e.MULTIPLE="multiple",e.SINGLE="single",e))(xi||{}),Oi=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(Oi||{}),Ri=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))(Ri||{});const c$=Wa("pont-inline-flex pont-items-center pont-justify-center pont-rounded-toggle-group-item-radius pont-text-toggle-group-item-font pont-font-toggle-group-item-font-weight pont-transition-colors focus-visible:pont-outline-none focus-visible:pont-ring-toggle-group-item-width-ring-focus focus-visible:pont-ring-toggle-group-item-color-ring-focus focus-visible:pont-ring-offset-toggle-group-item-width-ring-offset-focus disabled:pont-pointer-events-none disabled:pont-opacity-toggle-group-item-opacity-disabled data-[state=on]:pont-bg-toggle-group-item-color-bg-on data-[state=on]:pont-text-toggle-group-item-color-text-on pont-bg-transparent",{variants:{variant:{default:"hover:pont-bg-toggle-group-item-default-color-bg-hover hover:pont-text-toggle-group-item-default-color-text-hover",outline:"pont-border pont-border-toggle-group-item-outline-color-border hover:pont-bg-toggle-group-item-outline-color-bg-hover hover:pont-text-toggle-group-item-outline-color-text-hover"},size:{sm:"pont-h-toggle-group-item-space-h-sm pont-px-toggle-group-item-space-px-sm",md:"pont-h-toggle-group-item-space-h-md pont-px-toggle-group-item-space-px-md",lg:"pont-h-toggle-group-item-space-h-lg pont-px-toggle-group-item-space-px-lg"}}}),p$="pont-flex pont-items-center pont-justify-center pont-gap-toggle-group-space-gap";var h$=Object.defineProperty,u$=Object.getOwnPropertyDescriptor,Xr=(e,t,r,o)=>{for(var n=o>1?void 0:o?u$(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&&h$(t,r,n),n};let Re=class extends y{constructor(){super(),this.checked=!1,this.id=qa(),this.variant=Oi.DEFAULT,this.size=Ri.SMALL,this.disabled=!1,this.type=xi.SINGLE,this.variant=Oi.DEFAULT,this.size=Ri.SMALL}get _parent(){let e=this.parentElement;for(;e&&!(e instanceof Ze);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("button[part=toggle-group-item]")}get _siblings(){var e;return Array.from(((e=this.parentElement)==null?void 0:e.children)||[]).filter(t=>t!==this)}getAttributesToExclude(){return["disabled","type"]}createRenderRoot(){return this}firstUpdated(e){this.syncFromParent(),this.moveLightDomChildrenInto(this._containerElement)}syncFromParent(){const e=this._parent;if(!e)return;this.variant!==e.variant&&(this.variant=e.variant),this.size!==e.size&&(this.size=e.size);const t=e.selectedItems.includes(this.id);this.checked!==t&&(this.checked=t),this.type!==e.type&&(this.type=e.type)}syncSelection(){const e=this._parent;if(!e)return;const t=e.selectedItems.includes(this.id);this.checked!==t&&(this.checked=t)}toggleSelection(e){if(this.disabled||!this._parent)return;const t=this._parent,r=t.selectedItems.indexOf(e);this.type===xi.SINGLE?(r!==-1?t.selectedItems.splice(r,1):t.selectedItems[0]=e,this._siblings.forEach(o=>o.syncSelection())):r!==-1?t.selectedItems.splice(r,1):t.selectedItems.push(e),this.syncSelection()}render(){return console.log({variant:this.variant,size:this.size,className:this.className}),l`
|
|
2447
2453
|
<button
|
|
2448
2454
|
part="toggle-group-item"
|
|
2449
2455
|
id=${this.id}
|
|
@@ -2454,15 +2460,15 @@
|
|
|
2454
2460
|
?disabled=${this.disabled}
|
|
2455
2461
|
@click=${()=>this.toggleSelection(this.id)}
|
|
2456
2462
|
></button>
|
|
2457
|
-
`}};Re.toggleGroupVariants=
|
|
2463
|
+
`}};Re.toggleGroupVariants=c$;Xr([a({attribute:!0,type:Boolean,reflect:!0})],Re.prototype,"checked",2);Xr([a({attribute:!0,type:String,reflect:!0})],Re.prototype,"id",2);Xr([a()],Re.prototype,"variant",2);Xr([a()],Re.prototype,"size",2);Xr([a({type:Boolean})],Re.prototype,"disabled",2);Xr([a({type:String})],Re.prototype,"type",2);Re=Xr([p("pont-toggle-group-item")],Re);var m$=Object.defineProperty,g$=Object.getOwnPropertyDescriptor,tn=(e,t,r,o)=>{for(var n=o>1?void 0:o?g$(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&&m$(t,r,n),n};let Ze=class extends y{constructor(){super(...arguments),this.disabled=!1,this.type=xi.SINGLE,this.required=!1,this.variant=Oi.DEFAULT,this.size=Ri.SMALL,this.selectedItems=[]}get _containerElement(){return this.querySelector("div[part=toggle-group]")}getAttributesToExclude(){return["disabled","type","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement)}updated(e){(e.has("variant")||e.has("size")||e.has("disabled")||e.has("type"))&&this.querySelectorAll("pont-toggle-group-item").forEach(t=>{t.variant=this.variant,t.size=this.size,t.disabled=this.disabled,t.type=this.type})}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return console.log({variant:this.variant,size:this.size,className:this.className}),l`
|
|
2458
2464
|
<div
|
|
2459
2465
|
part="toggle-group"
|
|
2460
2466
|
role="group"
|
|
2461
2467
|
${Et(e)}
|
|
2462
|
-
class="${m(
|
|
2468
|
+
class="${m(p$,this.className)}"
|
|
2463
2469
|
?disable="${this.disabled}"
|
|
2464
2470
|
></div>
|
|
2465
|
-
`}};tn([a({type:Boolean})],Ze.prototype,"disabled",2);tn([a({type:String})],Ze.prototype,"type",2);tn([a({attribute:!0,type:Boolean,reflect:!0})],Ze.prototype,"required",2);tn([a()],Ze.prototype,"variant",2);tn([a()],Ze.prototype,"size",2);tn([a({type:Array})],Ze.prototype,"selectedItems",2);Ze=tn([p("pont-toggle-group")],Ze);var Zo=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))(Zo||{}),Jo=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(Jo||{});const
|
|
2471
|
+
`}};tn([a({type:Boolean})],Ze.prototype,"disabled",2);tn([a({type:String})],Ze.prototype,"type",2);tn([a({attribute:!0,type:Boolean,reflect:!0})],Ze.prototype,"required",2);tn([a()],Ze.prototype,"variant",2);tn([a()],Ze.prototype,"size",2);tn([a({type:Array})],Ze.prototype,"selectedItems",2);Ze=tn([p("pont-toggle-group")],Ze);var Zo=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))(Zo||{}),Jo=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(Jo||{});const f$=Wa("pont-inline-flex pont-items-center pont-justify-center pont-rounded-toggle-radius pont-text-toggle-font pont-font-toggle-font-weight pont-transition-colors focus-visible:pont-outline-none focus-visible:pont-ring-toggle-width-ring-focus focus-visible:pont-ring-toggle-color-ring-focus focus-visible:pont-ring-offset-toggle-width-ring-offset-focus disabled:pont-pointer-events-none disabled:pont-opacity-toggle-opacity-disabled data-[state=on]:pont-bg-toggle-color-bg-on data-[state=on]:pont-text-toggle-color-text-on pont-bg-transparent",{variants:{variant:{default:"hover:pont-bg-toggle-default-color-bg-hover hover:pont-text-toggle-default-color-text-hover",outline:"pont-border pont-border-toggle-outline-color-border hover:pont-bg-toggle-outline-color-bg-hover hover:pont-text-toggle-outline-color-text-hover"},size:{sm:"pont-h-toggle-space-h-sm pont-px-toggle-space-px-sm",md:"pont-h-toggle-space-h-md pont-px-toggle-space-px-md",lg:"pont-h-toggle-space-h-lg pont-px-toggle-space-px-lg"}}});var v$=Object.defineProperty,b$=Object.getOwnPropertyDescriptor,Vn=(e,t,r,o)=>{for(var n=o>1?void 0:o?b$(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&&v$(t,r,n),n};let Je=class extends y{constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.required=!1,this.variant=Jo.DEFAULT,this.size=Zo.SMALL}willUpdate(e){e.has("variant")&&(this.variant=this.normalizeEnum(this.variant,Jo,Jo.DEFAULT)),e.has("size")&&(this.size=this.normalizeEnum(this.size,Zo,Zo.SMALL))}get _containerElement(){return this.querySelector("button[part=toggle]")}getAttributesToExclude(){return["disabled","checked","variant","size","required","data-testid"]}toggle(){this.disabled||(this.checked=!this.checked)}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){const e=this.getFilteredAttributes();return l`
|
|
2466
2472
|
<button
|
|
2467
2473
|
type="button"
|
|
2468
2474
|
part="toggle"
|
|
@@ -2475,13 +2481,13 @@
|
|
|
2475
2481
|
?disabled=${this.disabled}
|
|
2476
2482
|
${Et(e)}
|
|
2477
2483
|
></button>
|
|
2478
|
-
`}};Je.toggleVariants=
|
|
2484
|
+
`}};Je.toggleVariants=f$;Vn([a({type:Boolean})],Je.prototype,"disabled",2);Vn([a({attribute:!0,type:Boolean,reflect:!0})],Je.prototype,"checked",2);Vn([a({attribute:!0,type:Boolean,reflect:!0})],Je.prototype,"required",2);Vn([a({attribute:!0,type:String})],Je.prototype,"variant",2);Vn([a({attribute:!0,type:String})],Je.prototype,"size",2);Je=Vn([p("pont-toggle")],Je);var y$=Object.getOwnPropertyDescriptor,_$=(e,t,r,o)=>{for(var n=o>1?void 0:o?y$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Sc=class extends f{createRenderRoot(){return this}get _blockquoteSlot(){return this.querySelector('[data-slot="typography-blockquote"]')}firstUpdated(){const e=this._blockquoteSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<blockquote data-slot="typography-blockquote"></blockquote>`}};Sc=_$([p("pont-typography-blockquote")],Sc);var w$=Object.getOwnPropertyDescriptor,$$=(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=s(n)||n);return n};let xc=class extends f{createRenderRoot(){return this}get _codeSlot(){return this.querySelector('[data-slot="typography-code"]')}firstUpdated(){const e=this._codeSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<code data-slot="typography-code"></code>`}};xc=$$([p("pont-typography-code")],xc);var P$=Object.defineProperty,C$=Object.getOwnPropertyDescriptor,Ah=(e,t,r,o)=>{for(var n=o>1?void 0:o?C$(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&&P$(t,r,n),n};let Oa=class extends f{constructor(){super(...arguments),this.level="h1"}createRenderRoot(){return this}get _hSlot(){return this.querySelector('[data-slot="typography-h"]')}firstUpdated(){const e=this._hSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return this.level==="h2"?l`
|
|
2479
2485
|
<h2 data-slot="typography-h" data-level="${this.level}"></h2>
|
|
2480
2486
|
`:this.level==="h3"?l`
|
|
2481
2487
|
<h3 data-slot="typography-h" data-level="${this.level}"></h3>
|
|
2482
2488
|
`:this.level==="h4"?l`
|
|
2483
2489
|
<h4 data-slot="typography-h" data-level="${this.level}"></h4>
|
|
2484
|
-
`:l`<h1 data-slot="typography-h" data-level="${this.level}"></h1>`}};Ah([a({type:String})],Oa.prototype,"level",2);Oa=Ah([p("pont-typography-h")],Oa);var
|
|
2490
|
+
`:l`<h1 data-slot="typography-h" data-level="${this.level}"></h1>`}};Ah([a({type:String})],Oa.prototype,"level",2);Oa=Ah([p("pont-typography-h")],Oa);var E$=Object.getOwnPropertyDescriptor,S$=(e,t,r,o)=>{for(var n=o>1?void 0:o?E$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Oc=class extends f{createRenderRoot(){return this}get _largeSlot(){return this.querySelector('[data-slot="typography-large"]')}firstUpdated(){const e=this._largeSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="typography-large"></div>`}};Oc=S$([p("pont-typography-large")],Oc);var x$=Object.getOwnPropertyDescriptor,O$=(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=s(n)||n);return n};let Rc=class extends f{createRenderRoot(){return this}get _leadSlot(){return this.querySelector('[data-slot="typography-lead"]')}firstUpdated(){const e=this._leadSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="typography-lead"></p>`}};Rc=O$([p("pont-typography-lead")],Rc);var R$=Object.getOwnPropertyDescriptor,I$=(e,t,r,o)=>{for(var n=o>1?void 0:o?R$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Ic=class extends f{createRenderRoot(){return this}get _listSlot(){return this.querySelector('[data-slot="typography-list"]')}firstUpdated(){const e=this._listSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<ul data-slot="typography-list"></ul>`}};Ic=I$([p("pont-typography-list")],Ic);var A$=Object.getOwnPropertyDescriptor,T$=(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=s(n)||n);return n};let Ac=class extends f{createRenderRoot(){return this}get _mutedSlot(){return this.querySelector('[data-slot="typography-muted"]')}firstUpdated(){const e=this._mutedSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="typography-muted"></p>`}};Ac=T$([p("pont-typography-muted")],Ac);var D$=Object.getOwnPropertyDescriptor,L$=(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=s(n)||n);return n};let Tc=class extends f{createRenderRoot(){return this}get _pSlot(){return this.querySelector('[data-slot="typography-p"]')}firstUpdated(){const e=this._pSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="typography-p"></p>`}};Tc=L$([p("pont-typography-p")],Tc);var F$=Object.getOwnPropertyDescriptor,k$=(e,t,r,o)=>{for(var n=o>1?void 0:o?F$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Dc=class extends f{createRenderRoot(){return this}get _smallSlot(){return this.querySelector('[data-slot="typography-small"]')}firstUpdated(){const e=this._smallSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<small data-slot="typography-small"></small>`}};Dc=k$([p("pont-typography-small")],Dc);var N$=Object.getOwnPropertyDescriptor,M$=(e,t,r,o)=>{for(var n=o>1?void 0:o?N$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};let Lc=class extends f{createRenderRoot(){return this}};Lc=M$([p("pont-typography-table")],Lc);var B$=Object.defineProperty,U$=Object.getOwnPropertyDescriptor,ft=(e,t,r,o)=>{for(var n=o>1?void 0:o?U$(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&&B$(t,r,n),n};let dt=class extends y{constructor(){super(...arguments),this.placeholder="Filter emails...",this.dataTable=[],this.hasDefaultSelect=!0,this.hasDefaultPagination=!0,this.hasDefaultSearch=!0,this.checkedRows={},this.searchTerm="",this.columnVisibility={},this.sortColumn=null,this.sortDirection="asc",this.cellRenderers={},this.rowActions=[],this.paginationLabels=["Previous","Next"],this.pageSize=5,this.currentPage=1,this.sortableColumns=["email"],this.columnOrder=[]}get _chevronDownIcon(){return l`
|
|
2485
2491
|
<svg
|
|
2486
2492
|
xmlns="http://www.w3.org/2000/svg"
|
|
2487
2493
|
width="24"
|
|
@@ -2551,7 +2557,7 @@
|
|
|
2551
2557
|
@pont-checkbox:checked-change=${this._handleHeaderCheckboxChange}
|
|
2552
2558
|
></pont-checkbox>
|
|
2553
2559
|
</th>`:h}
|
|
2554
|
-
${this.visibleKeys.map((t,r,o)=>{var v;const n=r===0,i=r===o.length-1,s=(v=this.headerRenderers)==null?void 0:v[t],d=this.sortableColumns.includes(t),c=this.sortColumn===t;let u=null;return d&&(c?u=this.sortDirection==="asc"?gd():
|
|
2560
|
+
${this.visibleKeys.map((t,r,o)=>{var v;const n=r===0,i=r===o.length-1,s=(v=this.headerRenderers)==null?void 0:v[t],d=this.sortableColumns.includes(t),c=this.sortColumn===t;let u=null;return d&&(c?u=this.sortDirection==="asc"?gd():jg():u=l`
|
|
2555
2561
|
<div part="sort-icon-wrapper">
|
|
2556
2562
|
<div part="sort-icon-default">${gd()}</div>
|
|
2557
2563
|
</div>
|
|
@@ -2666,8 +2672,8 @@
|
|
|
2666
2672
|
</div>
|
|
2667
2673
|
${this.hasDefaultPagination&&this.hasDefaultSelect?this._renderPagination():h}
|
|
2668
2674
|
</div>
|
|
2669
|
-
`}};ft([a({type:String})],dt.prototype,"placeholder",2);ft([a({type:Array})],dt.prototype,"dataTable",2);ft([a({type:Boolean})],dt.prototype,"hasDefaultSelect",2);ft([a({type:Boolean})],dt.prototype,"hasDefaultPagination",2);ft([a({type:Boolean})],dt.prototype,"hasDefaultSearch",2);ft([a({type:Object})],dt.prototype,"checkedRows",2);ft([a({type:String})],dt.prototype,"searchTerm",2);ft([a({type:Object})],dt.prototype,"columnVisibility",2);ft([a({type:String})],dt.prototype,"sortColumn",2);ft([a({type:String})],dt.prototype,"sortDirection",2);ft([a({type:Object})],dt.prototype,"cellRenderers",2);ft([a({type:Object})],dt.prototype,"headerRenderers",2);ft([a({type:Array})],dt.prototype,"rowActions",2);ft([a({type:Array})],dt.prototype,"paginationLabels",2);ft([a({type:Number})],dt.prototype,"pageSize",2);ft([a({type:Number})],dt.prototype,"currentPage",2);ft([a({type:Array})],dt.prototype,"sortableColumns",2);ft([a({type:Array})],dt.prototype,"columnOrder",2);ft([a({type:Function})],dt.prototype,"isRowDisabled",2);dt=ft([p("pont-data-table")],dt);var H=class extends Error{constructor(t,r,o,n){super(r);E(this,"code");E(this,"details");E(this,"status");this.name="LoginflowError",this.code=t,this.details=o,this.status=n}};function Th(e){const t=(e??"").trim();if(!t)throw new H("CONFIG_ERROR","domain is required");if(t.startsWith("/")){if(typeof location>"u")throw new H("CONFIG_ERROR",`domain "${t}" is relative to the page origin, and there is no page here`);return Fc(new URL(t,location.origin))}const r=/^https?:\/\//i.test(t)?"":`${z$(q$(t))?"http":"https"}://`;try{return Fc(new URL(`${r}${t}`))}catch{throw new H("CONFIG_ERROR",`domain "${t}" is not a hostname, an origin, or a path`)}}function Fc(e){return`${e.origin}${e.pathname}`.replace(/\/+$/,"")}function q$(e){return e.split("/")[0]}function z$(e){return/^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/i.test(e)}var ye,V$=(ye=class{constructor(){E(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 Th(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()}},E(ye,"instance"),ye),G=V$.Instance,_e,lo=(_e=class{constructor(){}static get Instance(){return _e.instance||(_e.instance=new _e),_e.instance}async request(t,r={}){const o=G.getConfig(),n=`${G.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 u=await c.json().catch(()=>({}));throw new H(u.code||u.error||"API_ERROR",u.message||u.error_description||`HTTP ${c.status}: ${c.statusText}`,u.details,c.status)}return await c.json()}catch(c){throw clearTimeout(d),c instanceof H?c:c instanceof Error?c.name==="AbortError"?new H("TIMEOUT","Request timeout"):new H("NETWORK_ERROR",c.message):new H("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=G.getConfig(),o=await fetch(`${G.getApiBaseUrl()}${t}`,{credentials:"include",method:"GET",headers:{...r.headers}});if(o.status===204)return null;if(!o.ok)throw new H("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()})}},E(_e,"instance"),_e),Dh="__Secure-pontive_session_state",hs="__Secure-pontive_session_probe";function H$(){return Lh(Dh)?"present":G$()?"absent":"unknown"}function Ra(){if(!(typeof document>"u"||typeof location>"u"))for(const e of["",...Y$(location.hostname)])Ia(Dh,"",e,0)}function G$(){if(typeof document>"u"||typeof location>"u")return!1;const e=W$();try{Ia(hs,"1",e,60);const t=Lh(hs)==="1";return Ia(hs,"",e,0),t&&K$(e)}catch{return!1}}function K$(e){return e!==""||G.apiIsSameOrigin()}function W$(){let e;try{e=new URL(G.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 Y$(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 Ia(e,t,r,o){const n=Q$()?"; Secure":"",i=r?`; Domain=${r}`:"";document.cookie=`${e}=${t}; Path=/; Max-Age=${o}; SameSite=Lax${i}${n}`}function Q$(){return typeof globalThis.isSecureContext=="boolean"?globalThis.isSecureContext:location.protocol==="https:"}function Lh(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,St=(Pt=class{constructor(){E(this,"AUTH_SESSION_STORAGE_KEY","pontive_auth_session");E(this,"memorySession",null);E(this,"refreshTimeoutId",null);E(this,"refreshPromise",null);E(this,"refreshRetryCount",0);E(this,"refreshBlockedUntil",0);E(this,"sessionGeneration",0);E(this,"channel",null);E(this,"channelName","");E(this,"applyingBroadcast",!1);E(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=G.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 H("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 H("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)?Z$(o)?(console.error("Token refresh rejected, signing out:",Xn(o)),Ra(),this.clearSession(),null):(console.warn("Token refresh failed, keeping session and retrying:",Xn(o)),this.scheduleRefreshRetry(t),null):(console.warn("Token refresh failed after the session changed; ignoring:",Xn(o)),null)}}async fetchUserInfo(t){try{return await lo.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:",Xn(r)),null}}async requestTokens(t,r={}){var i;const o={...r,grant_type:"refresh_token",client_id:(i=G.getConfig())==null?void 0:i.appId};t!=null&&t.refresh_token&&(o.refresh_token=t.refresh_token);const n=await lo.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=G.getConfig())==null?void 0:r.appId;if(!t)return null;try{const o=await lo.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:H$()==="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 X$(o)&&Ra(),console.debug("No session to restore:",Xn(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)}},E(Pt,"MAX_REFRESH_RETRIES",5),E(Pt,"REFRESH_RETRY_BASE_MS",5e3),E(Pt,"MAX_REFRESH_RETRY_DELAY_MS",6e4),E(Pt,"instance"),Pt);function Z$(e){return!(e instanceof H)||e.status===void 0?!1:e.status===401?!0:e.status===400&&J$.has(e.code)}var J$=new Set(["invalid_grant","invalid_client"]);function X$(e){return e instanceof H&&e.status!==void 0&&e.status>=400&&e.status<500}function Xn(e){return e instanceof H?`${e.code} (status ${e.status??"none"}): ${e.message}`:String(e)}var Fh=class{constructor(e=sessionStorage){E(this,"storage");E(this,"FLOW_STATE_KEY","pontive_loginflow_state");E(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}}},E(dr,"INVITE_TOKEN_PARAM","invite_token"),dr),kh=class{constructor(){E(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)}},tP=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"}},qt,eP=(qt=class{constructor(t,r,o=window.location,n,i){E(this,"httpClient",lo.Instance);E(this,"flowId");E(this,"redirectTimeoutId",null);E(this,"flowStateManager");E(this,"flowEventBus");E(this,"location");E(this,"navigationTypeDetector");E(this,"eventHandlers",new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)],["continue_here",this.handleContinueHere.bind(this)]]));E(this,"linkWatchTimer",null);E(this,"linkWatchGeneration",0);E(this,"waitingForLink",!1);const s=G.getConfig();if(!s.domain)throw new H("CONFIG_ERROR","Domain is required");if(!s.appId)throw new H("CONFIG_ERROR","App ID is required");this.flowId=t,this.location=o,this.flowStateManager=n||new Fh,this.flowEventBus=r||new kh,this.navigationTypeDetector=i||new tP,St.Instance.cleanExpiredSession(),St.Instance.scheduleTokenRefresh()}static async init(t,r,o,n,i){const s=new qt(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 H("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 H("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 H?i:new H(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 H("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&&qt.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 u=n!==d.state;this.flowEventBus.emit("flow:updated",{flowState:c,isNewStep:u})}}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};St.Instance.setCurrentSession(r),St.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState();const{onAuthenticated:o}=G.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=G.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 H("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=G.getConfig(),o=new URLSearchParams(this.location.search),n={};o.forEach((c,u)=>{n[u]=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,auth_base_url:G.getApiBaseUrl()},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 H("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()+qt.LINK_POLL_LIMIT_MS,i=()=>{this.linkWatchTimer=setTimeout(s,qt.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&&qt.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=G.getConfig()).onFlowStateChange)==null||n.call(o,{eventType:"flow_continued_elsewhere",flowType:t,state:r})}static flowIsGone(t){return t instanceof H&&t.status===401}stopWatchingForLink(){this.waitingForLink=!1,this.linkWatchGeneration++,this.linkWatchTimer!==null&&(clearTimeout(this.linkWatchTimer),this.linkWatchTimer=null)}async handleContinueHere(){const{continueHereUrl:t}=G.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=G.getConfig();return this.redirect({url:this.withCurrentQuery(t.signinUrl),redirect_delay:0}),{state:"End"}}async handleSwitchToSignup(){const t=G.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()}},E(qt,"LINK_POLL_INTERVAL_MS",3e3),E(qt,"LINK_POLL_LIMIT_MS",900*1e3),qt),rP=class{constructor(e){E(this,"delayMs");E(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}},nP=class{pushState(e,t,r){history.pushState(e,t,r)}replaceState(e,t,r){history.replaceState(e,t,r)}get state(){return history.state}},oP=class{constructor(e,t,r=!1,o=window.location,n,i){E(this,"popstateListener",null);E(this,"pageshowListener",null);E(this,"debouncer");E(this,"isProcessing",!1);E(this,"isHandlingNavigationEvent",!1);E(this,"onFlowRestartNeeded",null);E(this,"skipHistoryTracking");E(this,"flowStateManager");E(this,"historyAdapter");E(this,"location");this.onFlowRestartNeeded=t,this.skipHistoryTracking=r,this.debouncer=new rP(200),this.location=o,this.flowStateManager=n||new Fh,this.historyAdapter=i||new nP,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=G.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=G.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,iP=class{constructor(){E(this,"httpClient",lo.Instance);E(this,"capabilities",{webauthn:!1});E(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 u;typeof d.getTransports=="function"&&(u=d.getTransports());let v;if(typeof d.getPublicKeyAlgorithm=="function")try{v=d.getPublicKeyAlgorithm()}catch(_){us("getPublicKeyAlgorithm()",_)}let b;if(typeof d.getPublicKey=="function")try{const _=d.getPublicKey();_!==null&&(b=this.bufferToBase64URLString(_))}catch(_){us("getPublicKey()",_)}let w;if(typeof d.getAuthenticatorData=="function")try{w=this.bufferToBase64URLString(d.getAuthenticatorData())}catch(_){us("getAuthenticatorData()",_)}return{id:i,rawId:this.bufferToBase64URLString(s),response:{attestationObject:this.bufferToBase64URLString(d.attestationObject),clientDataJSON:this.bufferToBase64URLString(d.clientDataJSON),transports:u,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(sP(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 us(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
2670
|
-
`,t)}var Ir=class extends Error{constructor({message:t,code:r,cause:o,name:n}){super(t);E(this,"code");this.name=n??o.name,this.code=r}};function sP(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var we,aP=(we=class{constructor(){E(this,"configured",!1);E(this,"configuredResolve");E(this,"configuredPromise",new Promise(t=>{this.configuredResolve=t}));E(this,"loginflow",null);E(this,"navigationManager",null);E(this,"flowEventBus",null);E(this,"webauthnService",null)}static get Instance(){return we.instance||(we.instance=new we),we.instance}ensureConfigured(){if(!this.configured)throw new H("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new H("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 iP,this.webauthnService.detectCapabilities(),this.flowEventBus=new kh,this.navigationManager=new oP(this.flowEventBus,async()=>{console.log("[AuthService] Navigation restart triggered, restarting loginflow"),await this.startLoginflowInternal(void 0,!1)},r);const o=await eP.init(t,this.flowEventBus),n=G.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 H("CONFIG_ERROR","domain and appId are required");G.setConfig(t),this.configured=!0,this.configuredResolve()}whenConfigured(){return this.configuredPromise}isAuthenticated(){return this.ensureConfigured(),St.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),St.Instance.getCurrentSession()}async restoreSession(){return this.ensureConfigured(),St.Instance.restoreSession()}getAuthenticatedUser(){return this.ensureConfigured(),St.Instance.getAuthenticatedUser()}getOrganization(){return this.ensureConfigured(),St.Instance.getOrganization()}async switchOrganization(t){return this.ensureConfigured(),St.Instance.switchOrganization(t)}async startLoginflow(t){return this.startLoginflowInternal(t,!1)}async processLoginflowEvent(t){var i,s;this.ensureConfigured(),this.ensureLoginflowInitialized();const r=G.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 u=await this.registerPasskey(o,!0);u&&(u.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(u){console.error("Failed to parse flow state:",u)}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(){St.Instance.clearSession()}async signOut(t){var n;this.ensureConfigured();const r=lP(St.Instance.peekSession()),o=((n=G.getConfig())==null?void 0:n.appId)??"";if(Ra(),St.Instance.clearSession(),St.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),!G.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(`${G.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),`${G.getApiBaseUrl()}/oauth2/logout?${n.toString()}`}},E(we,"instance"),we);function lP(e){for(const t of[e==null?void 0:e.id_token,e==null?void 0:e.access_token]){if(!t)continue;const r=St.Instance.decodeJWT(t);if(typeof(r==null?void 0:r.sid)=="string"&&r.sid)return r.sid}}var K=aP.Instance,dP=Object.defineProperty,cP=(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&&dP(t,r,n),n};class Ut 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))}}cP([a({type:Boolean})],Ut.prototype,"shadow");const Pr="pont:auth",Lo={showWatermark:!0},Ui="pont:branding";class pP{constructor(t){this.consumer=new ti(t,{context:Ui,subscribe:!0})}get showWatermark(){var t;return((t=this.consumer.value)==null?void 0:t.showWatermark)??Lo.showWatermark}}const Nh="pont:design-mode";class Fo{constructor(t){this.host=t,this.consumer=new ti(t,{context:Nh,subscribe:!0})}get active(){return this.host.hasAttribute("design-mode")?this.host.getAttribute("design-mode")!=="false":this.consumer.value??!1}}const Mh="pont:env",Bh=Symbol("renderSpecContext"),ko="pont-user-context",Uh="";function zt(...e){return Dp(za(e))}function hP(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function uP(e){document.documentElement.setAttribute("data-theme",e)}function mP(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&uP("light")}function gP(e,t){return e?e.includes("{{theme}}")?e.replace("{{theme}}",t):e:""}function Aa(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}const kc="abcdefghijklmnopqrstuvwxyz0123456789",fP=6;function vP(e){let t="";for(let r=0;r<fP;r++)t+=kc.charAt(Math.floor(Math.random()*kc.length));return t}const _t=()=>vP();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 bP(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 yP(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 _P(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function le(){var e;return(e=K.getCurrentSession())==null?void 0:e.access_token}function Ta(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 Da(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 wP(e){return e instanceof Error&&"status"in e}function zi(e,t){var r,o;return wP(e)?((o=(r=e.data)==null?void 0:r.error)==null?void 0:o.message)??e.message??t:e instanceof Error&&e.message||t}const cn={variant:"secondary",size:"default",content:"label",iconAlign:"start",label:"Continue with Passkey"},pn={variant:"outline",size:"default",content:"icon-label",iconAlign:"start",prompt:"Continue with"},hn={variant:"default",size:"default",content:"label",iconAlign:"end",label:"Submit"},$P={apple:"Apple",discord:"Discord",facebook:"Facebook",github:"GitHub",google:"Google",linkedin:"LinkedIn",meta:"Meta",microsoft:"Microsoft",x:"X"},PP={apple:U`<path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" />`,discord:U`<path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z" />`,facebook:U`<path d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z" />`,github:U`<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />`,google:U`<path d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z" />`,linkedin:U`<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" />`,meta:U`<path d="M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z" />`,microsoft:U`<path d="M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zM24 11.4H12.6V0H24v11.4z" />`,x:U`<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.763l7.726-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77z" />`};var CP=Object.defineProperty,EP=Object.getOwnPropertyDescriptor,Yt=(e,t,r,o)=>{for(var n=o>1?void 0:o?EP(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&&CP(t,r,n),n};exports.PontPasskeyButton=class extends f{constructor(){super(...arguments),this.seed=_t(),this.variant=cn.variant,this.size=cn.size,this.content=cn.content,this.iconAlign=cn.iconAlign,this._label=cn.label,this._loading=!1,this._handleClick=async()=>{if(!this.isDisabled){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}));try{if(this.event){const t=await K.processLoginflowEvent({event:this.event});this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.SUCCESS_EVENT,{detail:{id:this.rootId,event:this.event,result:t},bubbles:!0,composed:!0}))}}catch(t){const r=t instanceof Error?t.message:String(t);this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.ERROR_EVENT,{detail:{id:this.rootId,event:this.event,message:r,error:t},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:cn.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPasskeyButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontPasskeyButton.ICON}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.isLoading?l`
|
|
2675
|
+
`}};ft([a({type:String})],dt.prototype,"placeholder",2);ft([a({type:Array})],dt.prototype,"dataTable",2);ft([a({type:Boolean})],dt.prototype,"hasDefaultSelect",2);ft([a({type:Boolean})],dt.prototype,"hasDefaultPagination",2);ft([a({type:Boolean})],dt.prototype,"hasDefaultSearch",2);ft([a({type:Object})],dt.prototype,"checkedRows",2);ft([a({type:String})],dt.prototype,"searchTerm",2);ft([a({type:Object})],dt.prototype,"columnVisibility",2);ft([a({type:String})],dt.prototype,"sortColumn",2);ft([a({type:String})],dt.prototype,"sortDirection",2);ft([a({type:Object})],dt.prototype,"cellRenderers",2);ft([a({type:Object})],dt.prototype,"headerRenderers",2);ft([a({type:Array})],dt.prototype,"rowActions",2);ft([a({type:Array})],dt.prototype,"paginationLabels",2);ft([a({type:Number})],dt.prototype,"pageSize",2);ft([a({type:Number})],dt.prototype,"currentPage",2);ft([a({type:Array})],dt.prototype,"sortableColumns",2);ft([a({type:Array})],dt.prototype,"columnOrder",2);ft([a({type:Function})],dt.prototype,"isRowDisabled",2);dt=ft([p("pont-data-table")],dt);var H=class extends Error{constructor(t,r,o,n){super(r);E(this,"code");E(this,"details");E(this,"status");this.name="LoginflowError",this.code=t,this.details=o,this.status=n}};function Th(e){const t=(e??"").trim();if(!t)throw new H("CONFIG_ERROR","domain is required");if(t.startsWith("/")){if(typeof location>"u")throw new H("CONFIG_ERROR",`domain "${t}" is relative to the page origin, and there is no page here`);return Fc(new URL(t,location.origin))}const r=/^https?:\/\//i.test(t)?"":`${q$(j$(t))?"http":"https"}://`;try{return Fc(new URL(`${r}${t}`))}catch{throw new H("CONFIG_ERROR",`domain "${t}" is not a hostname, an origin, or a path`)}}function Fc(e){return`${e.origin}${e.pathname}`.replace(/\/+$/,"")}function j$(e){return e.split("/")[0]}function q$(e){return/^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/i.test(e)}var ye,z$=(ye=class{constructor(){E(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 Th(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()}},E(ye,"instance"),ye),G=z$.Instance,_e,lo=(_e=class{constructor(){}static get Instance(){return _e.instance||(_e.instance=new _e),_e.instance}async request(t,r={}){const o=G.getConfig(),n=`${G.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 u=await c.json().catch(()=>({}));throw new H(u.code||u.error||"API_ERROR",u.message||u.error_description||`HTTP ${c.status}: ${c.statusText}`,u.details,c.status)}return await c.json()}catch(c){throw clearTimeout(d),c instanceof H?c:c instanceof Error?c.name==="AbortError"?new H("TIMEOUT","Request timeout"):new H("NETWORK_ERROR",c.message):new H("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=G.getConfig(),o=await fetch(`${G.getApiBaseUrl()}${t}`,{credentials:"include",method:"GET",headers:{...r.headers}});if(o.status===204)return null;if(!o.ok)throw new H("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()})}},E(_e,"instance"),_e),Dh="__Secure-pontive_session_state",hs="__Secure-pontive_session_probe";function V$(){return Lh(Dh)?"present":H$()?"absent":"unknown"}function Ra(){if(!(typeof document>"u"||typeof location>"u"))for(const e of["",...W$(location.hostname)])Ia(Dh,"",e,0)}function H$(){if(typeof document>"u"||typeof location>"u")return!1;const e=K$();try{Ia(hs,"1",e,60);const t=Lh(hs)==="1";return Ia(hs,"",e,0),t&&G$(e)}catch{return!1}}function G$(e){return e!==""||G.apiIsSameOrigin()}function K$(){let e;try{e=new URL(G.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 W$(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 Ia(e,t,r,o){const n=Y$()?"; Secure":"",i=r?`; Domain=${r}`:"";document.cookie=`${e}=${t}; Path=/; Max-Age=${o}; SameSite=Lax${i}${n}`}function Y$(){return typeof globalThis.isSecureContext=="boolean"?globalThis.isSecureContext:location.protocol==="https:"}function Lh(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,St=(Pt=class{constructor(){E(this,"AUTH_SESSION_STORAGE_KEY","pontive_auth_session");E(this,"memorySession",null);E(this,"refreshTimeoutId",null);E(this,"refreshPromise",null);E(this,"refreshRetryCount",0);E(this,"refreshBlockedUntil",0);E(this,"sessionGeneration",0);E(this,"channel",null);E(this,"channelName","");E(this,"applyingBroadcast",!1);E(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=G.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 H("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 H("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)?Q$(o)?(console.error("Token refresh rejected, signing out:",Xn(o)),Ra(),this.clearSession(),null):(console.warn("Token refresh failed, keeping session and retrying:",Xn(o)),this.scheduleRefreshRetry(t),null):(console.warn("Token refresh failed after the session changed; ignoring:",Xn(o)),null)}}async fetchUserInfo(t){try{return await lo.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:",Xn(r)),null}}async requestTokens(t,r={}){var i;const o={...r,grant_type:"refresh_token",client_id:(i=G.getConfig())==null?void 0:i.appId};t!=null&&t.refresh_token&&(o.refresh_token=t.refresh_token);const n=await lo.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=G.getConfig())==null?void 0:r.appId;if(!t)return null;try{const o=await lo.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:V$()==="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 J$(o)&&Ra(),console.debug("No session to restore:",Xn(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)}},E(Pt,"MAX_REFRESH_RETRIES",5),E(Pt,"REFRESH_RETRY_BASE_MS",5e3),E(Pt,"MAX_REFRESH_RETRY_DELAY_MS",6e4),E(Pt,"instance"),Pt);function Q$(e){return!(e instanceof H)||e.status===void 0?!1:e.status===401?!0:e.status===400&&Z$.has(e.code)}var Z$=new Set(["invalid_grant","invalid_client"]);function J$(e){return e instanceof H&&e.status!==void 0&&e.status>=400&&e.status<500}function Xn(e){return e instanceof H?`${e.code} (status ${e.status??"none"}): ${e.message}`:String(e)}var Fh=class{constructor(e=sessionStorage){E(this,"storage");E(this,"FLOW_STATE_KEY","pontive_loginflow_state");E(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}}},E(dr,"INVITE_TOKEN_PARAM","invite_token"),dr),kh=class{constructor(){E(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)}},X$=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"}},qt,tP=(qt=class{constructor(t,r,o=window.location,n,i){E(this,"httpClient",lo.Instance);E(this,"flowId");E(this,"redirectTimeoutId",null);E(this,"flowStateManager");E(this,"flowEventBus");E(this,"location");E(this,"navigationTypeDetector");E(this,"eventHandlers",new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)],["continue_here",this.handleContinueHere.bind(this)]]));E(this,"linkWatchTimer",null);E(this,"linkWatchGeneration",0);E(this,"waitingForLink",!1);const s=G.getConfig();if(!s.domain)throw new H("CONFIG_ERROR","Domain is required");if(!s.appId)throw new H("CONFIG_ERROR","App ID is required");this.flowId=t,this.location=o,this.flowStateManager=n||new Fh,this.flowEventBus=r||new kh,this.navigationTypeDetector=i||new X$,St.Instance.cleanExpiredSession(),St.Instance.scheduleTokenRefresh()}static async init(t,r,o,n,i){const s=new qt(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 H("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 H("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 H?i:new H(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 H("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&&qt.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 u=n!==d.state;this.flowEventBus.emit("flow:updated",{flowState:c,isNewStep:u})}}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};St.Instance.setCurrentSession(r),St.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState();const{onAuthenticated:o}=G.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=G.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 H("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=G.getConfig(),o=new URLSearchParams(this.location.search),n={};o.forEach((c,u)=>{n[u]=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,auth_base_url:G.getApiBaseUrl()},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 H("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()+qt.LINK_POLL_LIMIT_MS,i=()=>{this.linkWatchTimer=setTimeout(s,qt.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&&qt.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=G.getConfig()).onFlowStateChange)==null||n.call(o,{eventType:"flow_continued_elsewhere",flowType:t,state:r})}static flowIsGone(t){return t instanceof H&&t.status===401}stopWatchingForLink(){this.waitingForLink=!1,this.linkWatchGeneration++,this.linkWatchTimer!==null&&(clearTimeout(this.linkWatchTimer),this.linkWatchTimer=null)}async handleContinueHere(){const{continueHereUrl:t}=G.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=G.getConfig();return this.redirect({url:this.withCurrentQuery(t.signinUrl),redirect_delay:0}),{state:"End"}}async handleSwitchToSignup(){const t=G.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()}},E(qt,"LINK_POLL_INTERVAL_MS",3e3),E(qt,"LINK_POLL_LIMIT_MS",900*1e3),qt),eP=class{constructor(e){E(this,"delayMs");E(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}},rP=class{pushState(e,t,r){history.pushState(e,t,r)}replaceState(e,t,r){history.replaceState(e,t,r)}get state(){return history.state}},nP=class{constructor(e,t,r=!1,o=window.location,n,i){E(this,"popstateListener",null);E(this,"pageshowListener",null);E(this,"debouncer");E(this,"isProcessing",!1);E(this,"isHandlingNavigationEvent",!1);E(this,"onFlowRestartNeeded",null);E(this,"skipHistoryTracking");E(this,"flowStateManager");E(this,"historyAdapter");E(this,"location");this.onFlowRestartNeeded=t,this.skipHistoryTracking=r,this.debouncer=new eP(200),this.location=o,this.flowStateManager=n||new Fh,this.historyAdapter=i||new rP,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=G.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=G.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,oP=class{constructor(){E(this,"httpClient",lo.Instance);E(this,"capabilities",{webauthn:!1});E(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 u;typeof d.getTransports=="function"&&(u=d.getTransports());let v;if(typeof d.getPublicKeyAlgorithm=="function")try{v=d.getPublicKeyAlgorithm()}catch(_){us("getPublicKeyAlgorithm()",_)}let b;if(typeof d.getPublicKey=="function")try{const _=d.getPublicKey();_!==null&&(b=this.bufferToBase64URLString(_))}catch(_){us("getPublicKey()",_)}let w;if(typeof d.getAuthenticatorData=="function")try{w=this.bufferToBase64URLString(d.getAuthenticatorData())}catch(_){us("getAuthenticatorData()",_)}return{id:i,rawId:this.bufferToBase64URLString(s),response:{attestationObject:this.bufferToBase64URLString(d.attestationObject),clientDataJSON:this.bufferToBase64URLString(d.clientDataJSON),transports:u,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(iP(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 us(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
2676
|
+
`,t)}var Ir=class extends Error{constructor({message:t,code:r,cause:o,name:n}){super(t);E(this,"code");this.name=n??o.name,this.code=r}};function iP(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var we,sP=(we=class{constructor(){E(this,"configured",!1);E(this,"configuredResolve");E(this,"configuredPromise",new Promise(t=>{this.configuredResolve=t}));E(this,"loginflow",null);E(this,"navigationManager",null);E(this,"flowEventBus",null);E(this,"webauthnService",null)}static get Instance(){return we.instance||(we.instance=new we),we.instance}ensureConfigured(){if(!this.configured)throw new H("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new H("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 oP,this.webauthnService.detectCapabilities(),this.flowEventBus=new kh,this.navigationManager=new nP(this.flowEventBus,async()=>{console.log("[AuthService] Navigation restart triggered, restarting loginflow"),await this.startLoginflowInternal(void 0,!1)},r);const o=await tP.init(t,this.flowEventBus),n=G.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 H("CONFIG_ERROR","domain and appId are required");G.setConfig(t),this.configured=!0,this.configuredResolve()}whenConfigured(){return this.configuredPromise}isAuthenticated(){return this.ensureConfigured(),St.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),St.Instance.getCurrentSession()}async restoreSession(){return this.ensureConfigured(),St.Instance.restoreSession()}getAuthenticatedUser(){return this.ensureConfigured(),St.Instance.getAuthenticatedUser()}getOrganization(){return this.ensureConfigured(),St.Instance.getOrganization()}async switchOrganization(t){return this.ensureConfigured(),St.Instance.switchOrganization(t)}async startLoginflow(t){return this.startLoginflowInternal(t,!1)}async processLoginflowEvent(t){var i,s;this.ensureConfigured(),this.ensureLoginflowInitialized();const r=G.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 u=await this.registerPasskey(o,!0);u&&(u.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(u){console.error("Failed to parse flow state:",u)}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(){St.Instance.clearSession()}async signOut(t){var n;this.ensureConfigured();const r=aP(St.Instance.peekSession()),o=((n=G.getConfig())==null?void 0:n.appId)??"";if(Ra(),St.Instance.clearSession(),St.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),!G.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(`${G.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),`${G.getApiBaseUrl()}/oauth2/logout?${n.toString()}`}},E(we,"instance"),we);function aP(e){for(const t of[e==null?void 0:e.id_token,e==null?void 0:e.access_token]){if(!t)continue;const r=St.Instance.decodeJWT(t);if(typeof(r==null?void 0:r.sid)=="string"&&r.sid)return r.sid}}var K=sP.Instance,lP=Object.defineProperty,dP=(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&&lP(t,r,n),n};class Ut 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))}}dP([a({type:Boolean})],Ut.prototype,"shadow");const Pr="pont:auth",Lo={showWatermark:!0},Ui="pont:branding";class cP{constructor(t){this.consumer=new ti(t,{context:Ui,subscribe:!0})}get showWatermark(){var t;return((t=this.consumer.value)==null?void 0:t.showWatermark)??Lo.showWatermark}}const Nh="pont:design-mode";class Fo{constructor(t){this.host=t,this.consumer=new ti(t,{context:Nh,subscribe:!0})}get active(){return this.host.hasAttribute("design-mode")?this.host.getAttribute("design-mode")!=="false":this.consumer.value??!1}}const Mh="pont:env",Bh=Symbol("renderSpecContext"),ko="pont-user-context",Uh="";function zt(...e){return Dp(za(e))}function pP(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function hP(e){document.documentElement.setAttribute("data-theme",e)}function uP(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&hP("light")}function mP(e,t){return e?e.includes("{{theme}}")?e.replace("{{theme}}",t):e:""}function Aa(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}const kc="abcdefghijklmnopqrstuvwxyz0123456789",gP=6;function fP(e){let t="";for(let r=0;r<gP;r++)t+=kc.charAt(Math.floor(Math.random()*kc.length));return t}const _t=()=>fP();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 vP(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 bP(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 yP(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function le(){var e;return(e=K.getCurrentSession())==null?void 0:e.access_token}function Ta(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 Da(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}const cn={variant:"secondary",size:"default",content:"label",iconAlign:"start",label:"Continue with Passkey"},pn={variant:"outline",size:"default",content:"icon-label",iconAlign:"start",prompt:"Continue with"},hn={variant:"default",size:"default",content:"label",iconAlign:"end",label:"Submit"},wP={apple:"Apple",discord:"Discord",facebook:"Facebook",github:"GitHub",google:"Google",linkedin:"LinkedIn",meta:"Meta",microsoft:"Microsoft",x:"X"},$P={apple:U`<path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" />`,discord:U`<path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z" />`,facebook:U`<path d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z" />`,github:U`<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />`,google:U`<path d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z" />`,linkedin:U`<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" />`,meta:U`<path d="M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z" />`,microsoft:U`<path d="M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zM24 11.4H12.6V0H24v11.4z" />`,x:U`<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.763l7.726-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77z" />`};var PP=Object.defineProperty,CP=Object.getOwnPropertyDescriptor,Yt=(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};exports.PontPasskeyButton=class extends f{constructor(){super(...arguments),this.seed=_t(),this.variant=cn.variant,this.size=cn.size,this.content=cn.content,this.iconAlign=cn.iconAlign,this._label=cn.label,this._loading=!1,this._handleClick=async()=>{if(!this.isDisabled){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}));try{if(this.event){const t=await K.processLoginflowEvent({event:this.event});this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.SUCCESS_EVENT,{detail:{id:this.rootId,event:this.event,result:t},bubbles:!0,composed:!0}))}}catch(t){const r=t instanceof Error?t.message:String(t);this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.ERROR_EVENT,{detail:{id:this.rootId,event:this.event,message:r,error:t},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:cn.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPasskeyButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontPasskeyButton.ICON}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.isLoading?l`
|
|
2671
2677
|
<pont-spinner
|
|
2672
2678
|
id="${this.iconId}"
|
|
2673
2679
|
part="${exports.PontPasskeyButton.PARTS.icon}"
|
|
@@ -2708,7 +2714,7 @@
|
|
|
2708
2714
|
${this.content.includes("label")?this.label:h}
|
|
2709
2715
|
${this.iconAlign==="end"?this._renderIcon():h}
|
|
2710
2716
|
</pont-button>
|
|
2711
|
-
`}};exports.PontPasskeyButton.ROOT="passkey-button";exports.PontPasskeyButton.ICON="icon";exports.PontPasskeyButton.TAG=`${rt}-${exports.PontPasskeyButton.ROOT}`;exports.PontPasskeyButton.CLICK_EVENT=`${exports.PontPasskeyButton.TAG}:click`;exports.PontPasskeyButton.SUCCESS_EVENT=`${exports.PontPasskeyButton.TAG}:success`;exports.PontPasskeyButton.ERROR_EVENT=`${exports.PontPasskeyButton.TAG}:error`;exports.PontPasskeyButton.PARTS={root:exports.PontPasskeyButton.ROOT,icon:`${exports.PontPasskeyButton.ROOT}-${exports.PontPasskeyButton.ICON}`};Yt([a({type:String})],exports.PontPasskeyButton.prototype,"seed",2);Yt([a({type:String,attribute:"custom-id"})],exports.PontPasskeyButton.prototype,"customId",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"variant",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"size",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"content",2);Yt([a({type:String,attribute:"icon-align"})],exports.PontPasskeyButton.prototype,"iconAlign",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"label",1);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"event",2);Yt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"disabled",2);Yt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"loading",2);Yt([g()],exports.PontPasskeyButton.prototype,"_loading",2);exports.PontPasskeyButton=Yt([p("pont-passkey-button")],exports.PontPasskeyButton);var
|
|
2717
|
+
`}};exports.PontPasskeyButton.ROOT="passkey-button";exports.PontPasskeyButton.ICON="icon";exports.PontPasskeyButton.TAG=`${rt}-${exports.PontPasskeyButton.ROOT}`;exports.PontPasskeyButton.CLICK_EVENT=`${exports.PontPasskeyButton.TAG}:click`;exports.PontPasskeyButton.SUCCESS_EVENT=`${exports.PontPasskeyButton.TAG}:success`;exports.PontPasskeyButton.ERROR_EVENT=`${exports.PontPasskeyButton.TAG}:error`;exports.PontPasskeyButton.PARTS={root:exports.PontPasskeyButton.ROOT,icon:`${exports.PontPasskeyButton.ROOT}-${exports.PontPasskeyButton.ICON}`};Yt([a({type:String})],exports.PontPasskeyButton.prototype,"seed",2);Yt([a({type:String,attribute:"custom-id"})],exports.PontPasskeyButton.prototype,"customId",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"variant",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"size",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"content",2);Yt([a({type:String,attribute:"icon-align"})],exports.PontPasskeyButton.prototype,"iconAlign",2);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"label",1);Yt([a({type:String})],exports.PontPasskeyButton.prototype,"event",2);Yt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"disabled",2);Yt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"loading",2);Yt([g()],exports.PontPasskeyButton.prototype,"_loading",2);exports.PontPasskeyButton=Yt([p("pont-passkey-button")],exports.PontPasskeyButton);var EP=Object.defineProperty,SP=Object.getOwnPropertyDescriptor,Lt=(e,t,r,o)=>{for(var n=o>1?void 0:o?SP(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.PontProviderButton=class extends f{constructor(){super(...arguments),this.seed=_t(),this.design=new Fo(this),this.variant=pn.variant,this.size=pn.size,this.content=pn.content,this.iconAlign=pn.iconAlign,this._prompt=pn.prompt,this._loading=!1,this._handleClick=async()=>{if(!this.isDisabled){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.PontProviderButton.CLICK_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event},bubbles:!0,composed:!0}));try{if(this.event){const t=await K.processLoginflowEvent({event:this.event});this.dispatchEvent(new CustomEvent(exports.PontProviderButton.SUCCESS_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event,result:t},bubbles:!0,composed:!0}))}}catch(t){const r=t instanceof Error?t.message:String(t);this.dispatchEvent(new CustomEvent(exports.PontProviderButton.ERROR_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event,message:r,error:t},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}}get _provider(){return!this.provider&&this.design.active?"google":this.provider}get prompt(){return this._prompt}set prompt(t){const r=this._prompt;this._prompt=t.length?t:pn.prompt,this.requestUpdate("prompt",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontProviderButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontProviderButton.ICON}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.isLoading?l`
|
|
2712
2718
|
<pont-spinner
|
|
2713
2719
|
id="${this.iconId}"
|
|
2714
2720
|
part="${exports.PontProviderButton.PARTS.icon}"
|
|
@@ -2723,9 +2729,9 @@
|
|
|
2723
2729
|
fill="currentColor"
|
|
2724
2730
|
class="simple-icons simple-icons-${this._provider} ${t}"
|
|
2725
2731
|
>
|
|
2726
|
-
${
|
|
2732
|
+
${$P[this._provider]}
|
|
2727
2733
|
</svg>
|
|
2728
|
-
`:h}render(){const t
|
|
2734
|
+
`:h}render(){const t=wP[this._provider],r=this.label??l`${this.prompt} ${t}`;return l`
|
|
2729
2735
|
<pont-button
|
|
2730
2736
|
id="${this.rootId}"
|
|
2731
2737
|
part="${exports.PontProviderButton.PARTS.root}"
|
|
@@ -2740,7 +2746,7 @@
|
|
|
2740
2746
|
${this.content.includes("label")?r:h}
|
|
2741
2747
|
${this.iconAlign==="end"?this._renderIcon():h}
|
|
2742
2748
|
</pont-button>
|
|
2743
|
-
`}};exports.PontProviderButton.ROOT="provider-button";exports.PontProviderButton.ICON="icon";exports.PontProviderButton.TAG=`${rt}-${exports.PontProviderButton.ROOT}`;exports.PontProviderButton.CLICK_EVENT=`${exports.PontProviderButton.TAG}:click`;exports.PontProviderButton.SUCCESS_EVENT=`${exports.PontProviderButton.TAG}:success`;exports.PontProviderButton.ERROR_EVENT=`${exports.PontProviderButton.TAG}:error`;exports.PontProviderButton.PARTS={root:exports.PontProviderButton.ROOT,icon:`${exports.PontProviderButton.ROOT}-${exports.PontProviderButton.ICON}`};Lt([a({type:String})],exports.PontProviderButton.prototype,"seed",2);Lt([a({type:String,attribute:"custom-id"})],exports.PontProviderButton.prototype,"customId",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"provider",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"variant",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"size",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"content",2);Lt([a({type:String,attribute:"icon-align"})],exports.PontProviderButton.prototype,"iconAlign",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"prompt",1);Lt([a({type:String})],exports.PontProviderButton.prototype,"label",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"event",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"disabled",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"loading",2);Lt([g()],exports.PontProviderButton.prototype,"_loading",2);exports.PontProviderButton=Lt([p("pont-provider-button")],exports.PontProviderButton);var
|
|
2749
|
+
`}};exports.PontProviderButton.ROOT="provider-button";exports.PontProviderButton.ICON="icon";exports.PontProviderButton.TAG=`${rt}-${exports.PontProviderButton.ROOT}`;exports.PontProviderButton.CLICK_EVENT=`${exports.PontProviderButton.TAG}:click`;exports.PontProviderButton.SUCCESS_EVENT=`${exports.PontProviderButton.TAG}:success`;exports.PontProviderButton.ERROR_EVENT=`${exports.PontProviderButton.TAG}:error`;exports.PontProviderButton.PARTS={root:exports.PontProviderButton.ROOT,icon:`${exports.PontProviderButton.ROOT}-${exports.PontProviderButton.ICON}`};Lt([a({type:String})],exports.PontProviderButton.prototype,"seed",2);Lt([a({type:String,attribute:"custom-id"})],exports.PontProviderButton.prototype,"customId",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"provider",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"variant",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"size",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"content",2);Lt([a({type:String,attribute:"icon-align"})],exports.PontProviderButton.prototype,"iconAlign",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"prompt",1);Lt([a({type:String})],exports.PontProviderButton.prototype,"label",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"event",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"disabled",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"loading",2);Lt([g()],exports.PontProviderButton.prototype,"_loading",2);exports.PontProviderButton=Lt([p("pont-provider-button")],exports.PontProviderButton);var xP=Object.defineProperty,OP=Object.getOwnPropertyDescriptor,de=(e,t,r,o)=>{for(var n=o>1?void 0:o?OP(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&&xP(t,r,n),n};exports.PontSubmitButton=class extends f{constructor(){super(...arguments),this.seed=_t(),this.variant=hn.variant,this.size=hn.size,this.content=hn.content,this.iconAlign=hn.iconAlign,this._label=hn.label,this._handleClick=()=>{this.isDisabled||this.dispatchEvent(new CustomEvent(exports.PontSubmitButton.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}))}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:hn.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontSubmitButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontSubmitButton.ICON}`}get isDisabled(){return this.disabled||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.loading?l`
|
|
2744
2750
|
<pont-spinner
|
|
2745
2751
|
id="${this.iconId}"
|
|
2746
2752
|
part="${exports.PontSubmitButton.PARTS.icon}"
|
|
@@ -2779,7 +2785,7 @@
|
|
|
2779
2785
|
${this.content.includes("label")?this.label:h}
|
|
2780
2786
|
${this.iconAlign==="end"?this._renderIcon():h}
|
|
2781
2787
|
</pont-button>
|
|
2782
|
-
`}};exports.PontSubmitButton.ROOT="submit-button";exports.PontSubmitButton.ICON="icon";exports.PontSubmitButton.TAG=`${rt}-${exports.PontSubmitButton.ROOT}`;exports.PontSubmitButton.CLICK_EVENT=`${exports.PontSubmitButton.TAG}:click`;exports.PontSubmitButton.PARTS={root:exports.PontSubmitButton.ROOT,icon:`${exports.PontSubmitButton.ROOT}-${exports.PontSubmitButton.ICON}`};de([a({type:String})],exports.PontSubmitButton.prototype,"seed",2);de([a({type:String,attribute:"custom-id"})],exports.PontSubmitButton.prototype,"customId",2);de([a({type:String})],exports.PontSubmitButton.prototype,"variant",2);de([a({type:String})],exports.PontSubmitButton.prototype,"size",2);de([a({type:String})],exports.PontSubmitButton.prototype,"content",2);de([a({type:String,attribute:"icon-align"})],exports.PontSubmitButton.prototype,"iconAlign",2);de([a({type:String})],exports.PontSubmitButton.prototype,"label",1);de([a({type:String})],exports.PontSubmitButton.prototype,"event",2);de([a({type:Boolean})],exports.PontSubmitButton.prototype,"disabled",2);de([a({type:Boolean})],exports.PontSubmitButton.prototype,"loading",2);exports.PontSubmitButton=de([p("pont-submit-button")],exports.PontSubmitButton);var
|
|
2788
|
+
`}};exports.PontSubmitButton.ROOT="submit-button";exports.PontSubmitButton.ICON="icon";exports.PontSubmitButton.TAG=`${rt}-${exports.PontSubmitButton.ROOT}`;exports.PontSubmitButton.CLICK_EVENT=`${exports.PontSubmitButton.TAG}:click`;exports.PontSubmitButton.PARTS={root:exports.PontSubmitButton.ROOT,icon:`${exports.PontSubmitButton.ROOT}-${exports.PontSubmitButton.ICON}`};de([a({type:String})],exports.PontSubmitButton.prototype,"seed",2);de([a({type:String,attribute:"custom-id"})],exports.PontSubmitButton.prototype,"customId",2);de([a({type:String})],exports.PontSubmitButton.prototype,"variant",2);de([a({type:String})],exports.PontSubmitButton.prototype,"size",2);de([a({type:String})],exports.PontSubmitButton.prototype,"content",2);de([a({type:String,attribute:"icon-align"})],exports.PontSubmitButton.prototype,"iconAlign",2);de([a({type:String})],exports.PontSubmitButton.prototype,"label",1);de([a({type:String})],exports.PontSubmitButton.prototype,"event",2);de([a({type:Boolean})],exports.PontSubmitButton.prototype,"disabled",2);de([a({type:Boolean})],exports.PontSubmitButton.prototype,"loading",2);exports.PontSubmitButton=de([p("pont-submit-button")],exports.PontSubmitButton);var RP=Object.defineProperty,IP=Object.getOwnPropertyDescriptor,z=(e,t,r,o)=>{for(var n=o>1?void 0:o?IP(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&&RP(t,r,n),n};exports.PontPasswordField=class extends f{constructor(){super(...arguments),this.seed=_t(),this._name=He.name,this._label=He.label,this.variant=He.variant,this.rules=He.rules,this.validation=He.validation,this._forgotLabel=He.forgotLabel,this._invalid=!1,this._errors=[],this._value="",this._loading=!1,this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontPasswordField.INPUT_SELECTORS} input`;r.matches(o)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontPasswordField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._errors=[],this._value="",this._dirty=!1},this._handleForgotClick=async()=>{if(this.isDisabled)return;this._loading=!0;const{rootId:t,forgotId:r,forgotEvent:o}=this;this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_CLICK_EVENT,{detail:{id:t,forgotId:r,event:o},bubbles:!0,composed:!0}));try{if(o){const n=await K.processLoginflowEvent({event:o});this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_SUCCESS_EVENT,{detail:{id:t,forgotId:r,event:o,result:n},bubbles:!0,composed:!0}))}}catch(n){const i=n instanceof Error?n.message:String(n);this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_ERROR_EVENT,{detail:{id:t,forgotId:r,event:o,message:i,error:n},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}get _defaultInputId(){return`${this.rootId}-${exports.PontPasswordField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:He.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:He.label,this.requestUpdate("label",r)}get minlength(){return this._minlength}set minlength(t){const r=this._minlength;this._minlength=t===void 0||t>0?t:void 0,this.requestUpdate("minlength",r)}get maxlength(){return this._maxlength}set maxlength(t){const r=this._maxlength;if(t===void 0||t<=0)this._maxlength=void 0;else{const{minlength:o}=this;this._maxlength=o?Math.max(t,o):t}this.requestUpdate("maxlength",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultMinlengthError(){return Hn(this.label,this.minlength)}get minlengthError(){return this._minlengthError??this._defaultMinlengthError}set minlengthError(t){const r=this.minlengthError;this._minlengthError=t||void 0,this.requestUpdate("minlengthError",r)}get _defaultMaxlengthError(){return Gn(this.label,this.maxlength)}get maxlengthError(){return this._maxlengthError??this._defaultMaxlengthError}set maxlengthError(t){const r=this.maxlengthError;this._maxlengthError=t||void 0,this.requestUpdate("maxlengthError",r)}get _defaultFormatError(){return Te(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}get forgotLabel(){return this._forgotLabel}set forgotLabel(t){const r=this._forgotLabel;this._forgotLabel=t.length?t:He.forgotLabel,this.requestUpdate("forgotLabel",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPasswordField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontPasswordField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontPasswordField.MARK}`}get forgotId(){return`${this.rootId}-${exports.PontPasswordField.FORGOT}`}get descriptionId(){return`${this.rootId}-${exports.PontPasswordField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontPasswordField.ERROR}`}get value(){const t=this.defaultValue??"";return this._dirty?this._value:t}get isDisabled(){return this.disabled||this._loading}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontPasswordField.INPUT_SELECTORS,o=this.querySelector(r);o&&(o.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,o){const{rootId:n,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontPasswordField.VALIDATE_EVENT,{detail:{id:n,inputId:i,name:s,value:d,valid:t,type:r,message:o},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._errors=[],this._dispatchValidate(!0,"success","Valid password.")}_onValidateError(t,r,o){this._invalid=!0,this._errors=o!=null&&o.length?o:[r],this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;if(this.required&&!t)return this._onValidateError("required",this.requiredError),!1;if(!t||this.validation==="simple")return this._onValidateSuccess(),!0;const{minlength:r}=this;if(r&&t.length<r)return this._onValidateError("minlength",this.minlengthError),!1;const{maxlength:o}=this;if(o&&t.length>o)return this._onValidateError("maxlength",this.maxlengthError),!1;let n=!0;const i=[];for(const s of this.rules)(s.name?exports.PontPasswordField.RULE_PATTERNS[s.name]:new RegExp(s.pattern)).test(t)||(n=!1,s.error&&i.push(s.error));if(!n){const s=i.length?i.join(" "):this.formatError;return this._onValidateError("format",s,i),!1}return this._onValidateSuccess(),!0}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
2783
2789
|
<span
|
|
2784
2790
|
id="${this.markId}"
|
|
2785
2791
|
part="${exports.PontPasswordField.PARTS.mark}"
|
|
@@ -2853,7 +2859,7 @@
|
|
|
2853
2859
|
</pont-field-description>
|
|
2854
2860
|
`:h}
|
|
2855
2861
|
</pont-field>
|
|
2856
|
-
`}};exports.PontPasswordField.ROOT="password-field";exports.PontPasswordField.LABEL="label";exports.PontPasswordField.MARK="mark";exports.PontPasswordField.FORGOT="forgot";exports.PontPasswordField.DESCRIPTION="description";exports.PontPasswordField.INPUT="input";exports.PontPasswordField.ERROR="error";exports.PontPasswordField.TAG=`${rt}-${exports.PontPasswordField.ROOT}`;exports.PontPasswordField.VALIDATE_EVENT=`${exports.PontPasswordField.TAG}:validate`;exports.PontPasswordField.FORGOT_CLICK_EVENT=`${exports.PontPasswordField.TAG}:forgot-click`;exports.PontPasswordField.FORGOT_SUCCESS_EVENT=`${exports.PontPasswordField.TAG}:forgot-success`;exports.PontPasswordField.FORGOT_ERROR_EVENT=`${exports.PontPasswordField.TAG}:forgot-error`;exports.PontPasswordField.PARTS={root:exports.PontPasswordField.ROOT,label:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.LABEL}`,mark:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.MARK}`,forgot:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.FORGOT}`,description:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.DESCRIPTION}`,input:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.INPUT}`,error:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.ERROR}`};exports.PontPasswordField.INPUT_SELECTORS=`pont-input[part="${exports.PontPasswordField.PARTS.input}"], pont-password-input[part="${exports.PontPasswordField.PARTS.input}"]`;exports.PontPasswordField.RULE_PATTERNS={uppercase:/[A-Z]/,lowercase:/[a-z]/,number:/[0-9]/,special:/[!@#$%^&*()_=+{}[\]|\\;:"<>,./?-]/};z([a({type:String})],exports.PontPasswordField.prototype,"seed",2);z([a({type:String,attribute:"custom-id"})],exports.PontPasswordField.prototype,"customId",2);z([a({type:String,attribute:"input-id"})],exports.PontPasswordField.prototype,"inputId",1);z([a({type:String})],exports.PontPasswordField.prototype,"name",1);z([a({type:String,attribute:"default-value"})],exports.PontPasswordField.prototype,"defaultValue",2);z([a({type:String})],exports.PontPasswordField.prototype,"label",1);z([a({type:String})],exports.PontPasswordField.prototype,"placeholder",2);z([a({type:String})],exports.PontPasswordField.prototype,"description",2);z([a({type:String})],exports.PontPasswordField.prototype,"variant",2);z([a({type:String})],exports.PontPasswordField.prototype,"mark",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"caret",2);z([a({type:String})],exports.PontPasswordField.prototype,"autocomplete",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"disabled",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"required",2);z([a({type:Number})],exports.PontPasswordField.prototype,"minlength",1);z([a({type:Number})],exports.PontPasswordField.prototype,"maxlength",1);z([a({type:Array})],exports.PontPasswordField.prototype,"rules",2);z([a({type:String})],exports.PontPasswordField.prototype,"validation",2);z([a({type:String,attribute:"required-error"})],exports.PontPasswordField.prototype,"requiredError",1);z([a({type:String,attribute:"minlength-error"})],exports.PontPasswordField.prototype,"minlengthError",1);z([a({type:String,attribute:"maxlength-error"})],exports.PontPasswordField.prototype,"maxlengthError",1);z([a({type:String,attribute:"format-error"})],exports.PontPasswordField.prototype,"formatError",1);z([a({type:Boolean})],exports.PontPasswordField.prototype,"forgot",2);z([a({type:String,attribute:"forgot-label"})],exports.PontPasswordField.prototype,"forgotLabel",1);z([a({type:String,attribute:"forgot-event"})],exports.PontPasswordField.prototype,"forgotEvent",2);z([g()],exports.PontPasswordField.prototype,"_invalid",2);z([g()],exports.PontPasswordField.prototype,"_errors",2);z([g()],exports.PontPasswordField.prototype,"_value",2);z([g()],exports.PontPasswordField.prototype,"_loading",2);exports.PontPasswordField=z([p("pont-password-field")],exports.PontPasswordField);const Ft=e=>`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} is a required field.`,Te=e=>`Please enter a valid ${e.toLowerCase()}.`,Hn=(e,t)=>t?`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} must be at least ${t} characters.`:`Please enter a longer ${e.toLowerCase()}.`,Gn=(e,t)=>t?`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} can have at most ${t} characters.`:`Please enter a shorter ${e.toLowerCase()}.`,un={name:"email",label:"Email",pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.source,validation:"default",requiredError:Ft("Email"),formatError:Te("Email")},mn={name:"phone",label:"Phone",pattern:/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/.source,validation:"default",requiredError:Ft("Phone"),formatError:Te("Phone")},gn={name:"username",label:"Username",pattern:/^[a-z0-9_]*$/.source,validation:"default",requiredError:Ft("Username"),minlengthError:Hn("Username"),maxlengthError:Gn("Username"),formatError:Te("Username")},fn={name:"name",label:"Name",pattern:/^[\p{L} .'-]*$/u.source,validation:"default",requiredError:Ft("Name"),minlengthError:Hn("Name"),maxlengthError:Gn("Name"),formatError:Te("Name")},to={name:"login_id",identifiers:[],label:"Identifier",validation:"default",requiredError:Ft("Identifier")},He={name:"password",label:"Password",variant:"toggle",rules:[{name:"uppercase",error:"Must contain an uppercase letter."},{name:"lowercase",error:"Must contain a lowercase letter."},{name:"number",error:"Must contain a number."},{name:"special",error:"Must contain a special character."}],validation:"default",requiredError:Ft("Password"),minlengthError:Hn("Password"),maxlengthError:Gn("Password"),formatError:Te("Password"),forgotLabel:"Forgot your password?"},Ge={name:"confirm",label:"Confirm Password",variant:"toggle",pair:exports.PontPasswordField.TAG,validation:"default",requiredError:Ft("Confirm Password"),matchError:"Passwords do not match."};var
|
|
2862
|
+
`}};exports.PontPasswordField.ROOT="password-field";exports.PontPasswordField.LABEL="label";exports.PontPasswordField.MARK="mark";exports.PontPasswordField.FORGOT="forgot";exports.PontPasswordField.DESCRIPTION="description";exports.PontPasswordField.INPUT="input";exports.PontPasswordField.ERROR="error";exports.PontPasswordField.TAG=`${rt}-${exports.PontPasswordField.ROOT}`;exports.PontPasswordField.VALIDATE_EVENT=`${exports.PontPasswordField.TAG}:validate`;exports.PontPasswordField.FORGOT_CLICK_EVENT=`${exports.PontPasswordField.TAG}:forgot-click`;exports.PontPasswordField.FORGOT_SUCCESS_EVENT=`${exports.PontPasswordField.TAG}:forgot-success`;exports.PontPasswordField.FORGOT_ERROR_EVENT=`${exports.PontPasswordField.TAG}:forgot-error`;exports.PontPasswordField.PARTS={root:exports.PontPasswordField.ROOT,label:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.LABEL}`,mark:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.MARK}`,forgot:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.FORGOT}`,description:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.DESCRIPTION}`,input:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.INPUT}`,error:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.ERROR}`};exports.PontPasswordField.INPUT_SELECTORS=`pont-input[part="${exports.PontPasswordField.PARTS.input}"], pont-password-input[part="${exports.PontPasswordField.PARTS.input}"]`;exports.PontPasswordField.RULE_PATTERNS={uppercase:/[A-Z]/,lowercase:/[a-z]/,number:/[0-9]/,special:/[!@#$%^&*()_=+{}[\]|\\;:"<>,./?-]/};z([a({type:String})],exports.PontPasswordField.prototype,"seed",2);z([a({type:String,attribute:"custom-id"})],exports.PontPasswordField.prototype,"customId",2);z([a({type:String,attribute:"input-id"})],exports.PontPasswordField.prototype,"inputId",1);z([a({type:String})],exports.PontPasswordField.prototype,"name",1);z([a({type:String,attribute:"default-value"})],exports.PontPasswordField.prototype,"defaultValue",2);z([a({type:String})],exports.PontPasswordField.prototype,"label",1);z([a({type:String})],exports.PontPasswordField.prototype,"placeholder",2);z([a({type:String})],exports.PontPasswordField.prototype,"description",2);z([a({type:String})],exports.PontPasswordField.prototype,"variant",2);z([a({type:String})],exports.PontPasswordField.prototype,"mark",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"caret",2);z([a({type:String})],exports.PontPasswordField.prototype,"autocomplete",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"disabled",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"required",2);z([a({type:Number})],exports.PontPasswordField.prototype,"minlength",1);z([a({type:Number})],exports.PontPasswordField.prototype,"maxlength",1);z([a({type:Array})],exports.PontPasswordField.prototype,"rules",2);z([a({type:String})],exports.PontPasswordField.prototype,"validation",2);z([a({type:String,attribute:"required-error"})],exports.PontPasswordField.prototype,"requiredError",1);z([a({type:String,attribute:"minlength-error"})],exports.PontPasswordField.prototype,"minlengthError",1);z([a({type:String,attribute:"maxlength-error"})],exports.PontPasswordField.prototype,"maxlengthError",1);z([a({type:String,attribute:"format-error"})],exports.PontPasswordField.prototype,"formatError",1);z([a({type:Boolean})],exports.PontPasswordField.prototype,"forgot",2);z([a({type:String,attribute:"forgot-label"})],exports.PontPasswordField.prototype,"forgotLabel",1);z([a({type:String,attribute:"forgot-event"})],exports.PontPasswordField.prototype,"forgotEvent",2);z([g()],exports.PontPasswordField.prototype,"_invalid",2);z([g()],exports.PontPasswordField.prototype,"_errors",2);z([g()],exports.PontPasswordField.prototype,"_value",2);z([g()],exports.PontPasswordField.prototype,"_loading",2);exports.PontPasswordField=z([p("pont-password-field")],exports.PontPasswordField);const Ft=e=>`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} is a required field.`,Te=e=>`Please enter a valid ${e.toLowerCase()}.`,Hn=(e,t)=>t?`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} must be at least ${t} characters.`:`Please enter a longer ${e.toLowerCase()}.`,Gn=(e,t)=>t?`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} can have at most ${t} characters.`:`Please enter a shorter ${e.toLowerCase()}.`,un={name:"email",label:"Email",pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.source,validation:"default",requiredError:Ft("Email"),formatError:Te("Email")},mn={name:"phone",label:"Phone",pattern:/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/.source,validation:"default",requiredError:Ft("Phone"),formatError:Te("Phone")},gn={name:"username",label:"Username",pattern:/^[a-z0-9_]*$/.source,validation:"default",requiredError:Ft("Username"),minlengthError:Hn("Username"),maxlengthError:Gn("Username"),formatError:Te("Username")},fn={name:"name",label:"Name",pattern:/^[\p{L} .'-]*$/u.source,validation:"default",requiredError:Ft("Name"),minlengthError:Hn("Name"),maxlengthError:Gn("Name"),formatError:Te("Name")},to={name:"login_id",identifiers:[],label:"Identifier",validation:"default",requiredError:Ft("Identifier")},He={name:"password",label:"Password",variant:"toggle",rules:[{name:"uppercase",error:"Must contain an uppercase letter."},{name:"lowercase",error:"Must contain a lowercase letter."},{name:"number",error:"Must contain a number."},{name:"special",error:"Must contain a special character."}],validation:"default",requiredError:Ft("Password"),minlengthError:Hn("Password"),maxlengthError:Gn("Password"),formatError:Te("Password"),forgotLabel:"Forgot your password?"},Ge={name:"confirm",label:"Confirm Password",variant:"toggle",pair:exports.PontPasswordField.TAG,validation:"default",requiredError:Ft("Confirm Password"),matchError:"Passwords do not match."};var AP=Object.defineProperty,TP=Object.getOwnPropertyDescriptor,it=(e,t,r,o)=>{for(var n=o>1?void 0:o?TP(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&&AP(t,r,n),n};exports.PontConfirmField=class extends f{constructor(){super(...arguments),this.seed=_t(),this._name=Ge.name,this._label=Ge.label,this.variant=Ge.variant,this.pair=Ge.pair,this.validation=Ge.validation,this._matchError=Ge.matchError,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontConfirmField.INPUT_SELECTORS} input`;r.matches(o)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontConfirmField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontConfirmField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:Ge.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:Ge.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get matchError(){return this._matchError}set matchError(t){const r=this._matchError;this._matchError=t.length?t:Ge.matchError,this.requestUpdate("matchError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontConfirmField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontConfirmField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontConfirmField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontConfirmField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontConfirmField.ERROR}`}get value(){const t=this.defaultValue??"";return this._dirty?this._value:t}get pairValue(){const r=(this._form??document).querySelector(this.pair);return r?r.value:""}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontConfirmField.INPUT_SELECTORS,o=this.querySelector(r);o&&(o.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,o){const{rootId:n,inputId:i,name:s,value:d}=this,c={selector:this.pair,value:this.pairValue};this.dispatchEvent(new CustomEvent(exports.PontConfirmField.VALIDATE_EVENT,{detail:{id:n,inputId:i,name:s,value:d,valid:t,type:r,pair:c,message:o},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid confirm.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):t!==this.pairValue?(this._onValidateError("match",this.matchError),!1):(this._onValidateSuccess(),!0)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
2857
2863
|
<span
|
|
2858
2864
|
id="${this.markId}"
|
|
2859
2865
|
part="${exports.PontConfirmField.PARTS.mark}"
|
|
@@ -2915,7 +2921,7 @@
|
|
|
2915
2921
|
</pont-field-description>
|
|
2916
2922
|
`:h}
|
|
2917
2923
|
</pont-field>
|
|
2918
|
-
`}};exports.PontConfirmField.ROOT="confirm-field";exports.PontConfirmField.LABEL="label";exports.PontConfirmField.MARK="mark";exports.PontConfirmField.DESCRIPTION="description";exports.PontConfirmField.INPUT="input";exports.PontConfirmField.ERROR="error";exports.PontConfirmField.TAG=`${rt}-${exports.PontConfirmField.ROOT}`;exports.PontConfirmField.VALIDATE_EVENT=`${exports.PontConfirmField.TAG}:validate`;exports.PontConfirmField.PARTS={root:exports.PontConfirmField.ROOT,label:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.LABEL}`,mark:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.MARK}`,description:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.DESCRIPTION}`,input:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.INPUT}`,error:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.ERROR}`};exports.PontConfirmField.INPUT_SELECTORS=`pont-input[part="${exports.PontConfirmField.PARTS.input}"], pont-password-input[part="${exports.PontConfirmField.PARTS.input}"]`;it([a({type:String})],exports.PontConfirmField.prototype,"seed",2);it([a({type:String,attribute:"custom-id"})],exports.PontConfirmField.prototype,"customId",2);it([a({type:String,attribute:"input-id"})],exports.PontConfirmField.prototype,"inputId",1);it([a({type:String})],exports.PontConfirmField.prototype,"name",1);it([a({type:String,attribute:"default-value"})],exports.PontConfirmField.prototype,"defaultValue",2);it([a({type:String})],exports.PontConfirmField.prototype,"label",1);it([a({type:String})],exports.PontConfirmField.prototype,"placeholder",2);it([a({type:String})],exports.PontConfirmField.prototype,"description",2);it([a({type:String})],exports.PontConfirmField.prototype,"variant",2);it([a({type:String})],exports.PontConfirmField.prototype,"mark",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"caret",2);it([a({type:String})],exports.PontConfirmField.prototype,"autocomplete",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"disabled",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"required",2);it([a({type:String})],exports.PontConfirmField.prototype,"pair",2);it([a({type:String})],exports.PontConfirmField.prototype,"validation",2);it([a({type:String,attribute:"required-error"})],exports.PontConfirmField.prototype,"requiredError",1);it([a({type:String,attribute:"match-error"})],exports.PontConfirmField.prototype,"matchError",1);it([g()],exports.PontConfirmField.prototype,"_invalid",2);it([g()],exports.PontConfirmField.prototype,"_error",2);it([g()],exports.PontConfirmField.prototype,"_value",2);exports.PontConfirmField=it([p("pont-confirm-field")],exports.PontConfirmField);function jh(e=
|
|
2924
|
+
`}};exports.PontConfirmField.ROOT="confirm-field";exports.PontConfirmField.LABEL="label";exports.PontConfirmField.MARK="mark";exports.PontConfirmField.DESCRIPTION="description";exports.PontConfirmField.INPUT="input";exports.PontConfirmField.ERROR="error";exports.PontConfirmField.TAG=`${rt}-${exports.PontConfirmField.ROOT}`;exports.PontConfirmField.VALIDATE_EVENT=`${exports.PontConfirmField.TAG}:validate`;exports.PontConfirmField.PARTS={root:exports.PontConfirmField.ROOT,label:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.LABEL}`,mark:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.MARK}`,description:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.DESCRIPTION}`,input:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.INPUT}`,error:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.ERROR}`};exports.PontConfirmField.INPUT_SELECTORS=`pont-input[part="${exports.PontConfirmField.PARTS.input}"], pont-password-input[part="${exports.PontConfirmField.PARTS.input}"]`;it([a({type:String})],exports.PontConfirmField.prototype,"seed",2);it([a({type:String,attribute:"custom-id"})],exports.PontConfirmField.prototype,"customId",2);it([a({type:String,attribute:"input-id"})],exports.PontConfirmField.prototype,"inputId",1);it([a({type:String})],exports.PontConfirmField.prototype,"name",1);it([a({type:String,attribute:"default-value"})],exports.PontConfirmField.prototype,"defaultValue",2);it([a({type:String})],exports.PontConfirmField.prototype,"label",1);it([a({type:String})],exports.PontConfirmField.prototype,"placeholder",2);it([a({type:String})],exports.PontConfirmField.prototype,"description",2);it([a({type:String})],exports.PontConfirmField.prototype,"variant",2);it([a({type:String})],exports.PontConfirmField.prototype,"mark",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"caret",2);it([a({type:String})],exports.PontConfirmField.prototype,"autocomplete",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"disabled",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"required",2);it([a({type:String})],exports.PontConfirmField.prototype,"pair",2);it([a({type:String})],exports.PontConfirmField.prototype,"validation",2);it([a({type:String,attribute:"required-error"})],exports.PontConfirmField.prototype,"requiredError",1);it([a({type:String,attribute:"match-error"})],exports.PontConfirmField.prototype,"matchError",1);it([g()],exports.PontConfirmField.prototype,"_invalid",2);it([g()],exports.PontConfirmField.prototype,"_error",2);it([g()],exports.PontConfirmField.prototype,"_value",2);exports.PontConfirmField=it([p("pont-confirm-field")],exports.PontConfirmField);function jh(e=DP()){var r;if(!e)return;const t=(r=new URLSearchParams(e).get("login_hint"))==null?void 0:r.trim();return t||void 0}function DP(){return typeof window>"u"?void 0:window.location.search}var LP=Object.defineProperty,FP=Object.getOwnPropertyDescriptor,pt=(e,t,r,o)=>{for(var n=o>1?void 0:o?FP(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&&LP(t,r,n),n};exports.PontEmailField=class extends f{constructor(){super(...arguments),this.seed=_t(),this._name=un.name,this._label=un.label,this.pattern=un.pattern,this.validation=un.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontEmailField.INPUT_SELECTORS} > input`;r.matches(o)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontEmailField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontEmailField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:un.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:un.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultFormatError(){return Te(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontEmailField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontEmailField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontEmailField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontEmailField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontEmailField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontEmailField.INPUT_SELECTORS,o=this.querySelector(r);o&&(o.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.defaultValue===void 0&&(this.defaultValue=jh()),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,o){const{rootId:n,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontEmailField.VALIDATE_EVENT,{detail:{id:n,inputId:i,name:s,value:d,valid:t,type:r,message:o},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid email.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
2919
2925
|
<span
|
|
2920
2926
|
id="${this.markId}"
|
|
2921
2927
|
part="${exports.PontEmailField.PARTS.mark}"
|
|
@@ -2965,7 +2971,7 @@
|
|
|
2965
2971
|
</pont-field-description>
|
|
2966
2972
|
`:h}
|
|
2967
2973
|
</pont-field>
|
|
2968
|
-
`}};exports.PontEmailField.ROOT="email-field";exports.PontEmailField.LABEL="label";exports.PontEmailField.MARK="mark";exports.PontEmailField.DESCRIPTION="description";exports.PontEmailField.INPUT="input";exports.PontEmailField.ERROR="error";exports.PontEmailField.TAG=`${rt}-${exports.PontEmailField.ROOT}`;exports.PontEmailField.VALIDATE_EVENT=`${exports.PontEmailField.TAG}:validate`;exports.PontEmailField.PARTS={root:exports.PontEmailField.ROOT,label:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.LABEL}`,mark:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.MARK}`,description:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.DESCRIPTION}`,input:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.INPUT}`,error:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.ERROR}`};exports.PontEmailField.INPUT_SELECTORS=`pont-input[part="${exports.PontEmailField.PARTS.input}"]`;pt([a({type:String})],exports.PontEmailField.prototype,"seed",2);pt([a({type:String,attribute:"custom-id"})],exports.PontEmailField.prototype,"customId",2);pt([a({type:String,attribute:"input-id"})],exports.PontEmailField.prototype,"inputId",1);pt([a({type:String})],exports.PontEmailField.prototype,"name",1);pt([a({type:String,attribute:"default-value"})],exports.PontEmailField.prototype,"defaultValue",2);pt([a({type:String})],exports.PontEmailField.prototype,"label",1);pt([a({type:String})],exports.PontEmailField.prototype,"placeholder",2);pt([a({type:String})],exports.PontEmailField.prototype,"description",2);pt([a({type:String})],exports.PontEmailField.prototype,"mark",2);pt([a({type:Boolean})],exports.PontEmailField.prototype,"caret",2);pt([a({type:String})],exports.PontEmailField.prototype,"autocomplete",2);pt([a({type:Boolean})],exports.PontEmailField.prototype,"disabled",2);pt([a({type:Boolean})],exports.PontEmailField.prototype,"required",2);pt([a({type:String})],exports.PontEmailField.prototype,"pattern",2);pt([a({type:String})],exports.PontEmailField.prototype,"validation",2);pt([a({type:String,attribute:"required-error"})],exports.PontEmailField.prototype,"requiredError",1);pt([a({type:String,attribute:"format-error"})],exports.PontEmailField.prototype,"formatError",1);pt([g()],exports.PontEmailField.prototype,"_invalid",2);pt([g()],exports.PontEmailField.prototype,"_error",2);pt([g()],exports.PontEmailField.prototype,"_value",2);exports.PontEmailField=pt([p("pont-email-field")],exports.PontEmailField);var
|
|
2974
|
+
`}};exports.PontEmailField.ROOT="email-field";exports.PontEmailField.LABEL="label";exports.PontEmailField.MARK="mark";exports.PontEmailField.DESCRIPTION="description";exports.PontEmailField.INPUT="input";exports.PontEmailField.ERROR="error";exports.PontEmailField.TAG=`${rt}-${exports.PontEmailField.ROOT}`;exports.PontEmailField.VALIDATE_EVENT=`${exports.PontEmailField.TAG}:validate`;exports.PontEmailField.PARTS={root:exports.PontEmailField.ROOT,label:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.LABEL}`,mark:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.MARK}`,description:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.DESCRIPTION}`,input:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.INPUT}`,error:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.ERROR}`};exports.PontEmailField.INPUT_SELECTORS=`pont-input[part="${exports.PontEmailField.PARTS.input}"]`;pt([a({type:String})],exports.PontEmailField.prototype,"seed",2);pt([a({type:String,attribute:"custom-id"})],exports.PontEmailField.prototype,"customId",2);pt([a({type:String,attribute:"input-id"})],exports.PontEmailField.prototype,"inputId",1);pt([a({type:String})],exports.PontEmailField.prototype,"name",1);pt([a({type:String,attribute:"default-value"})],exports.PontEmailField.prototype,"defaultValue",2);pt([a({type:String})],exports.PontEmailField.prototype,"label",1);pt([a({type:String})],exports.PontEmailField.prototype,"placeholder",2);pt([a({type:String})],exports.PontEmailField.prototype,"description",2);pt([a({type:String})],exports.PontEmailField.prototype,"mark",2);pt([a({type:Boolean})],exports.PontEmailField.prototype,"caret",2);pt([a({type:String})],exports.PontEmailField.prototype,"autocomplete",2);pt([a({type:Boolean})],exports.PontEmailField.prototype,"disabled",2);pt([a({type:Boolean})],exports.PontEmailField.prototype,"required",2);pt([a({type:String})],exports.PontEmailField.prototype,"pattern",2);pt([a({type:String})],exports.PontEmailField.prototype,"validation",2);pt([a({type:String,attribute:"required-error"})],exports.PontEmailField.prototype,"requiredError",1);pt([a({type:String,attribute:"format-error"})],exports.PontEmailField.prototype,"formatError",1);pt([g()],exports.PontEmailField.prototype,"_invalid",2);pt([g()],exports.PontEmailField.prototype,"_error",2);pt([g()],exports.PontEmailField.prototype,"_value",2);exports.PontEmailField=pt([p("pont-email-field")],exports.PontEmailField);var kP=Object.defineProperty,NP=Object.getOwnPropertyDescriptor,vt=(e,t,r,o)=>{for(var n=o>1?void 0:o?NP(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&&kP(t,r,n),n};exports.PontIdentifierField=class extends f{constructor(){super(...arguments),this.seed=_t(),this._name=to.name,this.identifiers=to.identifiers,this.design=new Fo(this),this.validation=to.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontIdentifierField.INPUT_SELECTORS} > input`;r.matches(o)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontIdentifierField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontIdentifierField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:to.name,this.requestUpdate("name",r)}get _identifiers(){return this.identifiers.length===0&&this.design.active?["email","username","phone"]:this.identifiers}get _defaultLabel(){const t=this._identifiers;if(t.length===0)return to.label;let r=t[0];if(t.length>1){const o=t.slice(0,-1).join(", "),n=t.length>2?", or ":" or ",i=t.slice(-1)[0];r=o+n+i}return r.charAt(0).toUpperCase()+r.slice(1)}get label(){return this._label??this._defaultLabel}set label(t){const r=this.label;this._label=t||void 0,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontIdentifierField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontIdentifierField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontIdentifierField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontIdentifierField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontIdentifierField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}get _type(){const t=this._identifiers.join();return t==="email"?"email":t==="phone"?"tel":"text"}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontIdentifierField.INPUT_SELECTORS,o=this.querySelector(r);o&&(o.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.defaultValue===void 0&&(this.defaultValue=jh()),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,o){const{rootId:n,inputId:i,name:s,identifiers:d,value:c}=this;this.dispatchEvent(new CustomEvent(exports.PontIdentifierField.VALIDATE_EVENT,{detail:{id:n,inputId:i,name:s,identifiers:d,value:c,valid:t,type:r,message:o},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid identifier.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):(this._onValidateSuccess(),!0)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
2969
2975
|
<span
|
|
2970
2976
|
id="${this.markId}"
|
|
2971
2977
|
part="${exports.PontIdentifierField.PARTS.mark}"
|
|
@@ -3015,7 +3021,7 @@
|
|
|
3015
3021
|
</pont-field-description>
|
|
3016
3022
|
`:h}
|
|
3017
3023
|
</pont-field>
|
|
3018
|
-
`}};exports.PontIdentifierField.ROOT="identifier-field";exports.PontIdentifierField.LABEL="label";exports.PontIdentifierField.MARK="mark";exports.PontIdentifierField.DESCRIPTION="description";exports.PontIdentifierField.INPUT="input";exports.PontIdentifierField.ERROR="error";exports.PontIdentifierField.TAG=`${rt}-${exports.PontIdentifierField.ROOT}`;exports.PontIdentifierField.VALIDATE_EVENT=`${exports.PontIdentifierField.TAG}:validate`;exports.PontIdentifierField.PARTS={root:exports.PontIdentifierField.ROOT,label:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.LABEL}`,mark:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.MARK}`,description:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.DESCRIPTION}`,input:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.INPUT}`,error:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.ERROR}`};exports.PontIdentifierField.INPUT_SELECTORS=`pont-input[part="${exports.PontIdentifierField.PARTS.input}"]`;vt([a({type:String})],exports.PontIdentifierField.prototype,"seed",2);vt([a({type:String,attribute:"custom-id"})],exports.PontIdentifierField.prototype,"customId",2);vt([a({type:String,attribute:"input-id"})],exports.PontIdentifierField.prototype,"inputId",1);vt([a({type:String})],exports.PontIdentifierField.prototype,"name",1);vt([a({type:String,attribute:"default-value"})],exports.PontIdentifierField.prototype,"defaultValue",2);vt([a({type:Array})],exports.PontIdentifierField.prototype,"identifiers",2);vt([a({type:String})],exports.PontIdentifierField.prototype,"label",1);vt([a({type:String})],exports.PontIdentifierField.prototype,"placeholder",2);vt([a({type:String})],exports.PontIdentifierField.prototype,"description",2);vt([a({type:String})],exports.PontIdentifierField.prototype,"mark",2);vt([a({type:Boolean})],exports.PontIdentifierField.prototype,"caret",2);vt([a({type:String})],exports.PontIdentifierField.prototype,"autocomplete",2);vt([a({type:Boolean})],exports.PontIdentifierField.prototype,"disabled",2);vt([a({type:Boolean})],exports.PontIdentifierField.prototype,"required",2);vt([a({type:String})],exports.PontIdentifierField.prototype,"validation",2);vt([a({type:String,attribute:"required-error"})],exports.PontIdentifierField.prototype,"requiredError",1);vt([g()],exports.PontIdentifierField.prototype,"_invalid",2);vt([g()],exports.PontIdentifierField.prototype,"_error",2);vt([g()],exports.PontIdentifierField.prototype,"_value",2);exports.PontIdentifierField=vt([p("pont-identifier-field")],exports.PontIdentifierField);var
|
|
3024
|
+
`}};exports.PontIdentifierField.ROOT="identifier-field";exports.PontIdentifierField.LABEL="label";exports.PontIdentifierField.MARK="mark";exports.PontIdentifierField.DESCRIPTION="description";exports.PontIdentifierField.INPUT="input";exports.PontIdentifierField.ERROR="error";exports.PontIdentifierField.TAG=`${rt}-${exports.PontIdentifierField.ROOT}`;exports.PontIdentifierField.VALIDATE_EVENT=`${exports.PontIdentifierField.TAG}:validate`;exports.PontIdentifierField.PARTS={root:exports.PontIdentifierField.ROOT,label:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.LABEL}`,mark:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.MARK}`,description:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.DESCRIPTION}`,input:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.INPUT}`,error:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.ERROR}`};exports.PontIdentifierField.INPUT_SELECTORS=`pont-input[part="${exports.PontIdentifierField.PARTS.input}"]`;vt([a({type:String})],exports.PontIdentifierField.prototype,"seed",2);vt([a({type:String,attribute:"custom-id"})],exports.PontIdentifierField.prototype,"customId",2);vt([a({type:String,attribute:"input-id"})],exports.PontIdentifierField.prototype,"inputId",1);vt([a({type:String})],exports.PontIdentifierField.prototype,"name",1);vt([a({type:String,attribute:"default-value"})],exports.PontIdentifierField.prototype,"defaultValue",2);vt([a({type:Array})],exports.PontIdentifierField.prototype,"identifiers",2);vt([a({type:String})],exports.PontIdentifierField.prototype,"label",1);vt([a({type:String})],exports.PontIdentifierField.prototype,"placeholder",2);vt([a({type:String})],exports.PontIdentifierField.prototype,"description",2);vt([a({type:String})],exports.PontIdentifierField.prototype,"mark",2);vt([a({type:Boolean})],exports.PontIdentifierField.prototype,"caret",2);vt([a({type:String})],exports.PontIdentifierField.prototype,"autocomplete",2);vt([a({type:Boolean})],exports.PontIdentifierField.prototype,"disabled",2);vt([a({type:Boolean})],exports.PontIdentifierField.prototype,"required",2);vt([a({type:String})],exports.PontIdentifierField.prototype,"validation",2);vt([a({type:String,attribute:"required-error"})],exports.PontIdentifierField.prototype,"requiredError",1);vt([g()],exports.PontIdentifierField.prototype,"_invalid",2);vt([g()],exports.PontIdentifierField.prototype,"_error",2);vt([g()],exports.PontIdentifierField.prototype,"_value",2);exports.PontIdentifierField=vt([p("pont-identifier-field")],exports.PontIdentifierField);var MP=Object.defineProperty,BP=Object.getOwnPropertyDescriptor,tt=(e,t,r,o)=>{for(var n=o>1?void 0:o?BP(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&&MP(t,r,n),n};exports.PontNameField=class extends f{constructor(){super(...arguments),this.seed=_t(),this._name=fn.name,this._label=fn.label,this.pattern=fn.pattern,this.validation=fn.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontNameField.INPUT_SELECTORS} > input`;r.matches(o)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontNameField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontNameField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:fn.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:fn.label,this.requestUpdate("label",r)}get minlength(){return this._minlength}set minlength(t){const r=this._minlength;this._minlength=t===void 0||t>0?t:void 0,this.requestUpdate("minlength",r)}get maxlength(){return this._maxlength}set maxlength(t){const r=this._maxlength;if(t===void 0||t<=0)this._maxlength=void 0;else{const{minlength:o}=this;this._maxlength=o?Math.max(t,o):t}this.requestUpdate("maxlength",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultMinlengthError(){return Hn(this.label,this.minlength)}get minlengthError(){return this._minlengthError??this._defaultMinlengthError}set minlengthError(t){const r=this.minlengthError;this._minlengthError=t||void 0,this.requestUpdate("minlengthError",r)}get _defaultMaxlengthError(){return Gn(this.label,this.maxlength)}get maxlengthError(){return this._maxlengthError??this._defaultMaxlengthError}set maxlengthError(t){const r=this.maxlengthError;this._maxlengthError=t||void 0,this.requestUpdate("maxlengthError",r)}get _defaultFormatError(){return Te(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontNameField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontNameField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontNameField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontNameField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontNameField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().replace(/\s+/g," ")}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontNameField.INPUT_SELECTORS,o=this.querySelector(r);o&&(o.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,o){const{rootId:n,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontNameField.VALIDATE_EVENT,{detail:{id:n,inputId:i,name:s,value:d,valid:t,type:r,message:o},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid name.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;if(this.required&&!t)return this._onValidateError("required",this.requiredError),!1;if(!t||this.validation==="simple")return this._onValidateSuccess(),!0;const{minlength:r}=this;if(r&&t.length<r)return this._onValidateError("minlength",this.minlengthError),!1;const{maxlength:o}=this;return o&&t.length>o?(this._onValidateError("maxlength",this.maxlengthError),!1):new RegExp(this.pattern,"u").test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
3019
3025
|
<span
|
|
3020
3026
|
id="${this.markId}"
|
|
3021
3027
|
part="${exports.PontNameField.PARTS.mark}"
|
|
@@ -3065,7 +3071,7 @@
|
|
|
3065
3071
|
</pont-field-description>
|
|
3066
3072
|
`:h}
|
|
3067
3073
|
</pont-field>
|
|
3068
|
-
`}};exports.PontNameField.ROOT="name-field";exports.PontNameField.LABEL="label";exports.PontNameField.MARK="mark";exports.PontNameField.DESCRIPTION="description";exports.PontNameField.INPUT="input";exports.PontNameField.ERROR="error";exports.PontNameField.TAG=`${rt}-${exports.PontNameField.ROOT}`;exports.PontNameField.VALIDATE_EVENT=`${exports.PontNameField.TAG}:validate`;exports.PontNameField.PARTS={root:exports.PontNameField.ROOT,label:`${exports.PontNameField.ROOT}-${exports.PontNameField.LABEL}`,mark:`${exports.PontNameField.ROOT}-${exports.PontNameField.MARK}`,description:`${exports.PontNameField.ROOT}-${exports.PontNameField.DESCRIPTION}`,input:`${exports.PontNameField.ROOT}-${exports.PontNameField.INPUT}`,error:`${exports.PontNameField.ROOT}-${exports.PontNameField.ERROR}`};exports.PontNameField.INPUT_SELECTORS=`pont-input[part="${exports.PontNameField.PARTS.input}"]`;tt([a({type:String})],exports.PontNameField.prototype,"seed",2);tt([a({type:String,attribute:"custom-id"})],exports.PontNameField.prototype,"customId",2);tt([a({type:String,attribute:"input-id"})],exports.PontNameField.prototype,"inputId",1);tt([a({type:String})],exports.PontNameField.prototype,"name",1);tt([a({type:String,attribute:"default-value"})],exports.PontNameField.prototype,"defaultValue",2);tt([a({type:String})],exports.PontNameField.prototype,"label",1);tt([a({type:String})],exports.PontNameField.prototype,"placeholder",2);tt([a({type:String})],exports.PontNameField.prototype,"description",2);tt([a({type:String})],exports.PontNameField.prototype,"mark",2);tt([a({type:Boolean})],exports.PontNameField.prototype,"caret",2);tt([a({type:String})],exports.PontNameField.prototype,"autocomplete",2);tt([a({type:Boolean})],exports.PontNameField.prototype,"disabled",2);tt([a({type:Boolean})],exports.PontNameField.prototype,"required",2);tt([a({type:Number})],exports.PontNameField.prototype,"minlength",1);tt([a({type:Number})],exports.PontNameField.prototype,"maxlength",1);tt([a({type:String})],exports.PontNameField.prototype,"pattern",2);tt([a({type:String})],exports.PontNameField.prototype,"validation",2);tt([a({type:String,attribute:"required-error"})],exports.PontNameField.prototype,"requiredError",1);tt([a({type:String,attribute:"minlength-error"})],exports.PontNameField.prototype,"minlengthError",1);tt([a({type:String,attribute:"maxlength-error"})],exports.PontNameField.prototype,"maxlengthError",1);tt([a({type:String,attribute:"format-error"})],exports.PontNameField.prototype,"formatError",1);tt([g()],exports.PontNameField.prototype,"_invalid",2);tt([g()],exports.PontNameField.prototype,"_error",2);tt([g()],exports.PontNameField.prototype,"_value",2);exports.PontNameField=tt([p("pont-name-field")],exports.PontNameField);var
|
|
3074
|
+
`}};exports.PontNameField.ROOT="name-field";exports.PontNameField.LABEL="label";exports.PontNameField.MARK="mark";exports.PontNameField.DESCRIPTION="description";exports.PontNameField.INPUT="input";exports.PontNameField.ERROR="error";exports.PontNameField.TAG=`${rt}-${exports.PontNameField.ROOT}`;exports.PontNameField.VALIDATE_EVENT=`${exports.PontNameField.TAG}:validate`;exports.PontNameField.PARTS={root:exports.PontNameField.ROOT,label:`${exports.PontNameField.ROOT}-${exports.PontNameField.LABEL}`,mark:`${exports.PontNameField.ROOT}-${exports.PontNameField.MARK}`,description:`${exports.PontNameField.ROOT}-${exports.PontNameField.DESCRIPTION}`,input:`${exports.PontNameField.ROOT}-${exports.PontNameField.INPUT}`,error:`${exports.PontNameField.ROOT}-${exports.PontNameField.ERROR}`};exports.PontNameField.INPUT_SELECTORS=`pont-input[part="${exports.PontNameField.PARTS.input}"]`;tt([a({type:String})],exports.PontNameField.prototype,"seed",2);tt([a({type:String,attribute:"custom-id"})],exports.PontNameField.prototype,"customId",2);tt([a({type:String,attribute:"input-id"})],exports.PontNameField.prototype,"inputId",1);tt([a({type:String})],exports.PontNameField.prototype,"name",1);tt([a({type:String,attribute:"default-value"})],exports.PontNameField.prototype,"defaultValue",2);tt([a({type:String})],exports.PontNameField.prototype,"label",1);tt([a({type:String})],exports.PontNameField.prototype,"placeholder",2);tt([a({type:String})],exports.PontNameField.prototype,"description",2);tt([a({type:String})],exports.PontNameField.prototype,"mark",2);tt([a({type:Boolean})],exports.PontNameField.prototype,"caret",2);tt([a({type:String})],exports.PontNameField.prototype,"autocomplete",2);tt([a({type:Boolean})],exports.PontNameField.prototype,"disabled",2);tt([a({type:Boolean})],exports.PontNameField.prototype,"required",2);tt([a({type:Number})],exports.PontNameField.prototype,"minlength",1);tt([a({type:Number})],exports.PontNameField.prototype,"maxlength",1);tt([a({type:String})],exports.PontNameField.prototype,"pattern",2);tt([a({type:String})],exports.PontNameField.prototype,"validation",2);tt([a({type:String,attribute:"required-error"})],exports.PontNameField.prototype,"requiredError",1);tt([a({type:String,attribute:"minlength-error"})],exports.PontNameField.prototype,"minlengthError",1);tt([a({type:String,attribute:"maxlength-error"})],exports.PontNameField.prototype,"maxlengthError",1);tt([a({type:String,attribute:"format-error"})],exports.PontNameField.prototype,"formatError",1);tt([g()],exports.PontNameField.prototype,"_invalid",2);tt([g()],exports.PontNameField.prototype,"_error",2);tt([g()],exports.PontNameField.prototype,"_value",2);exports.PontNameField=tt([p("pont-name-field")],exports.PontNameField);var UP=Object.defineProperty,jP=Object.getOwnPropertyDescriptor,ht=(e,t,r,o)=>{for(var n=o>1?void 0:o?jP(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&&UP(t,r,n),n};exports.PontPhoneField=class extends f{constructor(){super(...arguments),this.seed=_t(),this._name=mn.name,this._label=mn.label,this.pattern=mn.pattern,this.validation=mn.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontPhoneField.INPUT_SELECTORS} > input`;r.matches(o)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontPhoneField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontPhoneField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:mn.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:mn.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultFormatError(){return Te(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPhoneField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontPhoneField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontPhoneField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontPhoneField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontPhoneField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).replace(/\s/g,"")}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontPhoneField.INPUT_SELECTORS,o=this.querySelector(r);o&&(o.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,o){const{rootId:n,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontPhoneField.VALIDATE_EVENT,{detail:{id:n,inputId:i,name:s,value:d,valid:t,type:r,message:o},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid phone.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
3069
3075
|
<span
|
|
3070
3076
|
id="${this.markId}"
|
|
3071
3077
|
part="${exports.PontPhoneField.PARTS.mark}"
|
|
@@ -3115,7 +3121,7 @@
|
|
|
3115
3121
|
</pont-field-description>
|
|
3116
3122
|
`:h}
|
|
3117
3123
|
</pont-field>
|
|
3118
|
-
`}};exports.PontPhoneField.ROOT="phone-field";exports.PontPhoneField.LABEL="label";exports.PontPhoneField.MARK="mark";exports.PontPhoneField.DESCRIPTION="description";exports.PontPhoneField.INPUT="input";exports.PontPhoneField.ERROR="error";exports.PontPhoneField.TAG=`${rt}-${exports.PontPhoneField.ROOT}`;exports.PontPhoneField.VALIDATE_EVENT=`${exports.PontPhoneField.TAG}:validate`;exports.PontPhoneField.PARTS={root:exports.PontPhoneField.ROOT,label:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.LABEL}`,mark:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.MARK}`,description:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.DESCRIPTION}`,input:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.INPUT}`,error:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.ERROR}`};exports.PontPhoneField.INPUT_SELECTORS=`pont-input[part="${exports.PontPhoneField.PARTS.input}"]`;ht([a({type:String})],exports.PontPhoneField.prototype,"seed",2);ht([a({type:String,attribute:"custom-id"})],exports.PontPhoneField.prototype,"customId",2);ht([a({type:String,attribute:"input-id"})],exports.PontPhoneField.prototype,"inputId",1);ht([a({type:String})],exports.PontPhoneField.prototype,"name",1);ht([a({type:String,attribute:"default-value"})],exports.PontPhoneField.prototype,"defaultValue",2);ht([a({type:String})],exports.PontPhoneField.prototype,"label",1);ht([a({type:String})],exports.PontPhoneField.prototype,"placeholder",2);ht([a({type:String})],exports.PontPhoneField.prototype,"description",2);ht([a({type:String})],exports.PontPhoneField.prototype,"mark",2);ht([a({type:Boolean})],exports.PontPhoneField.prototype,"caret",2);ht([a({type:String})],exports.PontPhoneField.prototype,"autocomplete",2);ht([a({type:Boolean})],exports.PontPhoneField.prototype,"disabled",2);ht([a({type:Boolean})],exports.PontPhoneField.prototype,"required",2);ht([a({type:String})],exports.PontPhoneField.prototype,"pattern",2);ht([a({type:String})],exports.PontPhoneField.prototype,"validation",2);ht([a({type:String,attribute:"required-error"})],exports.PontPhoneField.prototype,"requiredError",1);ht([a({type:String,attribute:"format-error"})],exports.PontPhoneField.prototype,"formatError",1);ht([g()],exports.PontPhoneField.prototype,"_invalid",2);ht([g()],exports.PontPhoneField.prototype,"_error",2);ht([g()],exports.PontPhoneField.prototype,"_value",2);exports.PontPhoneField=ht([p("pont-phone-field")],exports.PontPhoneField);var
|
|
3124
|
+
`}};exports.PontPhoneField.ROOT="phone-field";exports.PontPhoneField.LABEL="label";exports.PontPhoneField.MARK="mark";exports.PontPhoneField.DESCRIPTION="description";exports.PontPhoneField.INPUT="input";exports.PontPhoneField.ERROR="error";exports.PontPhoneField.TAG=`${rt}-${exports.PontPhoneField.ROOT}`;exports.PontPhoneField.VALIDATE_EVENT=`${exports.PontPhoneField.TAG}:validate`;exports.PontPhoneField.PARTS={root:exports.PontPhoneField.ROOT,label:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.LABEL}`,mark:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.MARK}`,description:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.DESCRIPTION}`,input:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.INPUT}`,error:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.ERROR}`};exports.PontPhoneField.INPUT_SELECTORS=`pont-input[part="${exports.PontPhoneField.PARTS.input}"]`;ht([a({type:String})],exports.PontPhoneField.prototype,"seed",2);ht([a({type:String,attribute:"custom-id"})],exports.PontPhoneField.prototype,"customId",2);ht([a({type:String,attribute:"input-id"})],exports.PontPhoneField.prototype,"inputId",1);ht([a({type:String})],exports.PontPhoneField.prototype,"name",1);ht([a({type:String,attribute:"default-value"})],exports.PontPhoneField.prototype,"defaultValue",2);ht([a({type:String})],exports.PontPhoneField.prototype,"label",1);ht([a({type:String})],exports.PontPhoneField.prototype,"placeholder",2);ht([a({type:String})],exports.PontPhoneField.prototype,"description",2);ht([a({type:String})],exports.PontPhoneField.prototype,"mark",2);ht([a({type:Boolean})],exports.PontPhoneField.prototype,"caret",2);ht([a({type:String})],exports.PontPhoneField.prototype,"autocomplete",2);ht([a({type:Boolean})],exports.PontPhoneField.prototype,"disabled",2);ht([a({type:Boolean})],exports.PontPhoneField.prototype,"required",2);ht([a({type:String})],exports.PontPhoneField.prototype,"pattern",2);ht([a({type:String})],exports.PontPhoneField.prototype,"validation",2);ht([a({type:String,attribute:"required-error"})],exports.PontPhoneField.prototype,"requiredError",1);ht([a({type:String,attribute:"format-error"})],exports.PontPhoneField.prototype,"formatError",1);ht([g()],exports.PontPhoneField.prototype,"_invalid",2);ht([g()],exports.PontPhoneField.prototype,"_error",2);ht([g()],exports.PontPhoneField.prototype,"_value",2);exports.PontPhoneField=ht([p("pont-phone-field")],exports.PontPhoneField);var qP=Object.defineProperty,zP=Object.getOwnPropertyDescriptor,et=(e,t,r,o)=>{for(var n=o>1?void 0:o?zP(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&&qP(t,r,n),n};exports.PontUsernameField=class extends f{constructor(){super(...arguments),this.seed=_t(),this._name=gn.name,this._label=gn.label,this.pattern=gn.pattern,this.validation=gn.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,o=`${exports.PontUsernameField.INPUT_SELECTORS} > input`;r.matches(o)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontUsernameField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontUsernameField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:gn.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:gn.label,this.requestUpdate("label",r)}get minlength(){return this._minlength}set minlength(t){const r=this._minlength;this._minlength=t===void 0||t>0?t:void 0,this.requestUpdate("minlength",r)}get maxlength(){return this._maxlength}set maxlength(t){const r=this._maxlength;if(t===void 0||t<=0)this._maxlength=void 0;else{const{minlength:o}=this;this._maxlength=o?Math.max(t,o):t}this.requestUpdate("maxlength",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultMinlengthError(){return Hn(this.label,this.minlength)}get minlengthError(){return this._minlengthError??this._defaultMinlengthError}set minlengthError(t){const r=this.minlengthError;this._minlengthError=t||void 0,this.requestUpdate("minlengthError",r)}get _defaultMaxlengthError(){return Gn(this.label,this.maxlength)}get maxlengthError(){return this._maxlengthError??this._defaultMaxlengthError}set maxlengthError(t){const r=this.maxlengthError;this._maxlengthError=t||void 0,this.requestUpdate("maxlengthError",r)}get _defaultFormatError(){return Te(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontUsernameField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontUsernameField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontUsernameField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontUsernameField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontUsernameField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontUsernameField.INPUT_SELECTORS,o=this.querySelector(r);o&&(o.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,o){const{rootId:n,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontUsernameField.VALIDATE_EVENT,{detail:{id:n,inputId:i,name:s,value:d,valid:t,type:r,message:o},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid username.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;if(this.required&&!t)return this._onValidateError("required",this.requiredError),!1;if(!t||this.validation==="simple")return this._onValidateSuccess(),!0;const{minlength:r}=this;if(r&&t.length<r)return this._onValidateError("minlength",this.minlengthError),!1;const{maxlength:o}=this;return o&&t.length>o?(this._onValidateError("maxlength",this.maxlengthError),!1):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
3119
3125
|
<span
|
|
3120
3126
|
id="${this.markId}"
|
|
3121
3127
|
part="${exports.PontUsernameField.PARTS.mark}"
|
|
@@ -3165,7 +3171,7 @@
|
|
|
3165
3171
|
</pont-field-description>
|
|
3166
3172
|
`:h}
|
|
3167
3173
|
</pont-field>
|
|
3168
|
-
`}};exports.PontUsernameField.ROOT="username-field";exports.PontUsernameField.LABEL="label";exports.PontUsernameField.MARK="mark";exports.PontUsernameField.DESCRIPTION="description";exports.PontUsernameField.INPUT="input";exports.PontUsernameField.ERROR="error";exports.PontUsernameField.TAG=`${rt}-${exports.PontUsernameField.ROOT}`;exports.PontUsernameField.VALIDATE_EVENT=`${exports.PontUsernameField.TAG}:validate`;exports.PontUsernameField.PARTS={root:exports.PontUsernameField.ROOT,label:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.LABEL}`,mark:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.MARK}`,description:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.DESCRIPTION}`,input:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.INPUT}`,error:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.ERROR}`};exports.PontUsernameField.INPUT_SELECTORS=`pont-input[part="${exports.PontUsernameField.PARTS.input}"]`;et([a({type:String})],exports.PontUsernameField.prototype,"seed",2);et([a({type:String,attribute:"custom-id"})],exports.PontUsernameField.prototype,"customId",2);et([a({type:String,attribute:"input-id"})],exports.PontUsernameField.prototype,"inputId",1);et([a({type:String})],exports.PontUsernameField.prototype,"name",1);et([a({type:String,attribute:"default-value"})],exports.PontUsernameField.prototype,"defaultValue",2);et([a({type:String})],exports.PontUsernameField.prototype,"label",1);et([a({type:String})],exports.PontUsernameField.prototype,"placeholder",2);et([a({type:String})],exports.PontUsernameField.prototype,"description",2);et([a({type:String})],exports.PontUsernameField.prototype,"mark",2);et([a({type:Boolean})],exports.PontUsernameField.prototype,"caret",2);et([a({type:String})],exports.PontUsernameField.prototype,"autocomplete",2);et([a({type:Boolean})],exports.PontUsernameField.prototype,"disabled",2);et([a({type:Boolean})],exports.PontUsernameField.prototype,"required",2);et([a({type:Number})],exports.PontUsernameField.prototype,"minlength",1);et([a({type:Number})],exports.PontUsernameField.prototype,"maxlength",1);et([a({type:String})],exports.PontUsernameField.prototype,"pattern",2);et([a({type:String})],exports.PontUsernameField.prototype,"validation",2);et([a({type:String,attribute:"required-error"})],exports.PontUsernameField.prototype,"requiredError",1);et([a({type:String,attribute:"minlength-error"})],exports.PontUsernameField.prototype,"minlengthError",1);et([a({type:String,attribute:"maxlength-error"})],exports.PontUsernameField.prototype,"maxlengthError",1);et([a({type:String,attribute:"format-error"})],exports.PontUsernameField.prototype,"formatError",1);et([g()],exports.PontUsernameField.prototype,"_invalid",2);et([g()],exports.PontUsernameField.prototype,"_error",2);et([g()],exports.PontUsernameField.prototype,"_value",2);exports.PontUsernameField=et([p("pont-username-field")],exports.PontUsernameField);const ms={label:"Link",service:"auth"};var
|
|
3174
|
+
`}};exports.PontUsernameField.ROOT="username-field";exports.PontUsernameField.LABEL="label";exports.PontUsernameField.MARK="mark";exports.PontUsernameField.DESCRIPTION="description";exports.PontUsernameField.INPUT="input";exports.PontUsernameField.ERROR="error";exports.PontUsernameField.TAG=`${rt}-${exports.PontUsernameField.ROOT}`;exports.PontUsernameField.VALIDATE_EVENT=`${exports.PontUsernameField.TAG}:validate`;exports.PontUsernameField.PARTS={root:exports.PontUsernameField.ROOT,label:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.LABEL}`,mark:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.MARK}`,description:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.DESCRIPTION}`,input:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.INPUT}`,error:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.ERROR}`};exports.PontUsernameField.INPUT_SELECTORS=`pont-input[part="${exports.PontUsernameField.PARTS.input}"]`;et([a({type:String})],exports.PontUsernameField.prototype,"seed",2);et([a({type:String,attribute:"custom-id"})],exports.PontUsernameField.prototype,"customId",2);et([a({type:String,attribute:"input-id"})],exports.PontUsernameField.prototype,"inputId",1);et([a({type:String})],exports.PontUsernameField.prototype,"name",1);et([a({type:String,attribute:"default-value"})],exports.PontUsernameField.prototype,"defaultValue",2);et([a({type:String})],exports.PontUsernameField.prototype,"label",1);et([a({type:String})],exports.PontUsernameField.prototype,"placeholder",2);et([a({type:String})],exports.PontUsernameField.prototype,"description",2);et([a({type:String})],exports.PontUsernameField.prototype,"mark",2);et([a({type:Boolean})],exports.PontUsernameField.prototype,"caret",2);et([a({type:String})],exports.PontUsernameField.prototype,"autocomplete",2);et([a({type:Boolean})],exports.PontUsernameField.prototype,"disabled",2);et([a({type:Boolean})],exports.PontUsernameField.prototype,"required",2);et([a({type:Number})],exports.PontUsernameField.prototype,"minlength",1);et([a({type:Number})],exports.PontUsernameField.prototype,"maxlength",1);et([a({type:String})],exports.PontUsernameField.prototype,"pattern",2);et([a({type:String})],exports.PontUsernameField.prototype,"validation",2);et([a({type:String,attribute:"required-error"})],exports.PontUsernameField.prototype,"requiredError",1);et([a({type:String,attribute:"minlength-error"})],exports.PontUsernameField.prototype,"minlengthError",1);et([a({type:String,attribute:"maxlength-error"})],exports.PontUsernameField.prototype,"maxlengthError",1);et([a({type:String,attribute:"format-error"})],exports.PontUsernameField.prototype,"formatError",1);et([g()],exports.PontUsernameField.prototype,"_invalid",2);et([g()],exports.PontUsernameField.prototype,"_error",2);et([g()],exports.PontUsernameField.prototype,"_value",2);exports.PontUsernameField=et([p("pont-username-field")],exports.PontUsernameField);const ms={label:"Link",service:"auth"};var VP=Object.defineProperty,HP=Object.getOwnPropertyDescriptor,De=(e,t,r,o)=>{for(var n=o>1?void 0:o?HP(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&&VP(t,r,n),n};exports.PontLink=class extends f{constructor(){super(...arguments),this.seed=_t(),this._label=ms.label,this.service=ms.service,this._loading=!1,this._handleClick=async()=>{if(this.isDisabled)return;this._loading=!0;const{rootId:t,buttonId:r,service:o,event:n}=this;this.dispatchEvent(new CustomEvent(exports.PontLink.CLICK_EVENT,{detail:{id:t,buttonId:r,service:o,event:n},bubbles:!0,composed:!0}));try{if(n&&o==="auth"){const i=await K.processLoginflowEvent({event:n});this.dispatchEvent(new CustomEvent(exports.PontLink.SUCCESS_EVENT,{detail:{id:t,buttonId:r,event:n,result:i},bubbles:!0,composed:!0}))}}catch(i){const s=i instanceof Error?i.message:String(i);this.dispatchEvent(new CustomEvent(exports.PontLink.ERROR_EVENT,{detail:{id:t,buttonId:r,event:n,message:s,error:i},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:ms.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontLink.TAG}-${this.seed}`}get buttonId(){return`${this.rootId}-${exports.PontLink.BUTTON}`}get promptId(){return`${this.rootId}-${exports.PontLink.PROMPT}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}render(){var t;return l`
|
|
3169
3175
|
<div id="${this.rootId}" part="${exports.PontLink.PARTS.root}">
|
|
3170
3176
|
${(t=this.prompt)!=null&&t.length?l`
|
|
3171
3177
|
<p id="${this.promptId}" part="${exports.PontLink.PARTS.prompt}">
|
|
@@ -3185,7 +3191,7 @@
|
|
|
3185
3191
|
${this.label}
|
|
3186
3192
|
</pont-button>
|
|
3187
3193
|
</div>
|
|
3188
|
-
`}};exports.PontLink.ROOT="link";exports.PontLink.BUTTON="button";exports.PontLink.PROMPT="prompt";exports.PontLink.TAG=`${rt}-${exports.PontLink.ROOT}`;exports.PontLink.CLICK_EVENT=`${exports.PontLink.TAG}:click`;exports.PontLink.SUCCESS_EVENT=`${exports.PontLink.TAG}:success`;exports.PontLink.ERROR_EVENT=`${exports.PontLink.TAG}:error`;exports.PontLink.PARTS={root:exports.PontLink.ROOT,button:`${exports.PontLink.ROOT}-${exports.PontLink.BUTTON}`,prompt:`${exports.PontLink.ROOT}-${exports.PontLink.PROMPT}`};De([a({type:String})],exports.PontLink.prototype,"seed",2);De([a({type:String,attribute:"custom-id"})],exports.PontLink.prototype,"customId",2);De([a({type:String})],exports.PontLink.prototype,"label",1);De([a({type:String})],exports.PontLink.prototype,"prompt",2);De([a({type:String})],exports.PontLink.prototype,"service",2);De([a({type:String})],exports.PontLink.prototype,"event",2);De([a({type:Boolean})],exports.PontLink.prototype,"disabled",2);De([a({type:Boolean})],exports.PontLink.prototype,"loading",2);De([g()],exports.PontLink.prototype,"_loading",2);exports.PontLink=De([p("pont-link")],exports.PontLink);var
|
|
3194
|
+
`}};exports.PontLink.ROOT="link";exports.PontLink.BUTTON="button";exports.PontLink.PROMPT="prompt";exports.PontLink.TAG=`${rt}-${exports.PontLink.ROOT}`;exports.PontLink.CLICK_EVENT=`${exports.PontLink.TAG}:click`;exports.PontLink.SUCCESS_EVENT=`${exports.PontLink.TAG}:success`;exports.PontLink.ERROR_EVENT=`${exports.PontLink.TAG}:error`;exports.PontLink.PARTS={root:exports.PontLink.ROOT,button:`${exports.PontLink.ROOT}-${exports.PontLink.BUTTON}`,prompt:`${exports.PontLink.ROOT}-${exports.PontLink.PROMPT}`};De([a({type:String})],exports.PontLink.prototype,"seed",2);De([a({type:String,attribute:"custom-id"})],exports.PontLink.prototype,"customId",2);De([a({type:String})],exports.PontLink.prototype,"label",1);De([a({type:String})],exports.PontLink.prototype,"prompt",2);De([a({type:String})],exports.PontLink.prototype,"service",2);De([a({type:String})],exports.PontLink.prototype,"event",2);De([a({type:Boolean})],exports.PontLink.prototype,"disabled",2);De([a({type:Boolean})],exports.PontLink.prototype,"loading",2);De([g()],exports.PontLink.prototype,"_loading",2);exports.PontLink=De([p("pont-link")],exports.PontLink);var GP=Object.defineProperty,KP=Object.getOwnPropertyDescriptor,kt=(e,t,r,o)=>{for(var n=o>1?void 0:o?KP(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&&GP(t,r,n),n};exports.PontProviderField=class extends f{constructor(){super(...arguments),this.seed=_t(),this.providers=[],this.overrides=[],this.design=new Fo(this)}static get parts(){const t=this._ROOT,r=`${t}-${this._BUTTON}`;return{root:t,button:r}}createRenderRoot(){return this}get rootId(){return this.customId??`${rt}-${exports.PontProviderField.parts.root}-${this.seed}`}get buttonId(){return`${this.rootId}-${exports.PontProviderField._BUTTON}`}get columns(){const t=this._providers.length;return t<3?"one":t%3===0?"three":t===5?"two-three":t===7?"three-four":"four"}get _providers(){return this.providers.length===0&&this.design.active?[...exports.PontProviderField.DESIGN_PROVIDERS]:[...new Set(this.providers)]}get _overrides(){return this.overrides.filter((t,r,o)=>r===o.findIndex(n=>n.provider===t.provider))}_renderButton(t){const r=`signin_with_oauth(${t.provider})`,o=t.content??this.content??(this._providers.length>2?"icon":void 0);return l`
|
|
3189
3195
|
<pont-provider-button
|
|
3190
3196
|
id="${this.buttonId}"
|
|
3191
3197
|
part="${exports.PontProviderField.parts.button}"
|
|
@@ -3210,7 +3216,7 @@
|
|
|
3210
3216
|
>
|
|
3211
3217
|
${this._providers.map(r=>this._renderButton(t.find(o=>o.provider===r)??{provider:r}))}
|
|
3212
3218
|
</pont-field>
|
|
3213
|
-
`}};exports.PontProviderField._ROOT="provider-field";exports.PontProviderField._BUTTON="button";exports.PontProviderField.DESIGN_PROVIDERS=["google","apple","github"];kt([a({type:String})],exports.PontProviderField.prototype,"seed",2);kt([a({attribute:"custom-id",type:String})],exports.PontProviderField.prototype,"customId",2);kt([a({type:Array})],exports.PontProviderField.prototype,"providers",2);kt([a({type:String})],exports.PontProviderField.prototype,"content",2);kt([a({type:String})],exports.PontProviderField.prototype,"variant",2);kt([a({type:String})],exports.PontProviderField.prototype,"size",2);kt([a({type:String})],exports.PontProviderField.prototype,"prompt",2);kt([a({attribute:"icon-align",type:String})],exports.PontProviderField.prototype,"iconAlign",2);kt([a({type:String})],exports.PontProviderField.prototype,"label",2);kt([a({type:Boolean})],exports.PontProviderField.prototype,"disabled",2);kt([a({type:Boolean})],exports.PontProviderField.prototype,"loading",2);kt([a({type:String})],exports.PontProviderField.prototype,"event",2);kt([a({type:Array})],exports.PontProviderField.prototype,"overrides",2);exports.PontProviderField=kt([p("pont-provider-field")],exports.PontProviderField);const
|
|
3219
|
+
`}};exports.PontProviderField._ROOT="provider-field";exports.PontProviderField._BUTTON="button";exports.PontProviderField.DESIGN_PROVIDERS=["google","apple","github"];kt([a({type:String})],exports.PontProviderField.prototype,"seed",2);kt([a({attribute:"custom-id",type:String})],exports.PontProviderField.prototype,"customId",2);kt([a({type:Array})],exports.PontProviderField.prototype,"providers",2);kt([a({type:String})],exports.PontProviderField.prototype,"content",2);kt([a({type:String})],exports.PontProviderField.prototype,"variant",2);kt([a({type:String})],exports.PontProviderField.prototype,"size",2);kt([a({type:String})],exports.PontProviderField.prototype,"prompt",2);kt([a({attribute:"icon-align",type:String})],exports.PontProviderField.prototype,"iconAlign",2);kt([a({type:String})],exports.PontProviderField.prototype,"label",2);kt([a({type:Boolean})],exports.PontProviderField.prototype,"disabled",2);kt([a({type:Boolean})],exports.PontProviderField.prototype,"loading",2);kt([a({type:String})],exports.PontProviderField.prototype,"event",2);kt([a({type:Array})],exports.PontProviderField.prototype,"overrides",2);exports.PontProviderField=kt([p("pont-provider-field")],exports.PontProviderField);const WP={identifier:""};function Vi(){return U`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3214
3220
|
<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"/>
|
|
3215
3221
|
</svg>
|
|
3216
3222
|
`}function Mt(){return U`
|
|
@@ -3218,18 +3224,18 @@
|
|
|
3218
3224
|
<path d="M8.66504 0.665039L0.665039 8.66504M0.665039 0.665039L8.66504 8.66504" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3219
3225
|
</svg>
|
|
3220
3226
|
|
|
3221
|
-
`}function
|
|
3227
|
+
`}function YP(){return U`
|
|
3222
3228
|
<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3223
3229
|
<path d="M0.665039 4.66504H11.3317M0.665039 0.665039H11.3317M0.665039 8.66504H11.3317" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3224
3230
|
</svg>
|
|
3225
3231
|
|
|
3226
|
-
`}function
|
|
3232
|
+
`}function QP(){return U`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3227
3233
|
<path d="M12.665 4.66406V0.664062H8.66504M12.665 0.664062L5.33171 7.9974M10.665 7.33073V11.3307C10.665 11.6844 10.5246 12.0235 10.2745 12.2735C10.0245 12.5236 9.68533 12.6641 9.33171 12.6641H1.99837C1.64475 12.6641 1.30561 12.5236 1.05556 12.2735C0.805515 12.0235 0.665039 11.6844 0.665039 11.3307V3.9974C0.665039 3.64377 0.805515 3.30464 1.05556 3.05459C1.30561 2.80454 1.64475 2.66406 1.99837 2.66406H5.99837" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3228
3234
|
</svg>
|
|
3229
3235
|
`}function Nc(){return U`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3230
3236
|
<path d="M12.665 8.665L10.6077 6.60767C10.3577 6.35771 10.0186 6.21729 9.66504 6.21729C9.31149 6.21729 8.97241 6.35771 8.72237 6.60767L2.66504 12.665M1.99837 0.665039H11.3317C12.0681 0.665039 12.665 1.26199 12.665 1.99837V11.3317C12.665 12.0681 12.0681 12.665 11.3317 12.665H1.99837C1.26199 12.665 0.665039 12.0681 0.665039 11.3317V1.99837C0.665039 1.26199 1.26199 0.665039 1.99837 0.665039ZM5.99837 4.66504C5.99837 5.40142 5.40142 5.99837 4.66504 5.99837C3.92866 5.99837 3.33171 5.40142 3.33171 4.66504C3.33171 3.92866 3.92866 3.33171 4.66504 3.33171C5.40142 3.33171 5.99837 3.92866 5.99837 4.66504Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3231
3237
|
</svg>
|
|
3232
|
-
`}function
|
|
3238
|
+
`}function ZP(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3233
3239
|
<g clip-path="url(#clip0_549_23445)">
|
|
3234
3240
|
<path d="M7.99992 4.00004V8.00004L10.6666 9.33337M14.6666 8.00004C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00004C1.33325 4.31814 4.31802 1.33337 7.99992 1.33337C11.6818 1.33337 14.6666 4.31814 14.6666 8.00004Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3235
3241
|
</g>
|
|
@@ -3239,10 +3245,10 @@
|
|
|
3239
3245
|
</clipPath>
|
|
3240
3246
|
</defs>
|
|
3241
3247
|
</svg>
|
|
3242
|
-
`}function
|
|
3248
|
+
`}function JP(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3243
3249
|
<path d="M1.33325 14C1.3332 12.9735 1.62934 11.9689 2.18615 11.1066C2.74296 10.2443 3.53677 9.56095 4.47232 9.13865C5.40787 8.71634 6.44541 8.57297 7.46042 8.72575C8.47544 8.87854 9.4248 9.32097 10.1946 9.99997M10.6666 12.6667L11.9999 14L14.6666 11.3333M9.99992 5.33333C9.99992 7.17428 8.50753 8.66667 6.66658 8.66667C4.82564 8.66667 3.33325 7.17428 3.33325 5.33333C3.33325 3.49238 4.82564 2 6.66658 2C8.50753 2 9.99992 3.49238 9.99992 5.33333Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3244
3250
|
</svg>
|
|
3245
|
-
`}function
|
|
3251
|
+
`}function XP(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3246
3252
|
<g clip-path="url(#clip0_549_23453)">
|
|
3247
3253
|
<path d="M5.99992 7.99996L7.33325 9.33329L9.99992 6.66663M2.56655 5.74669C2.46925 5.30838 2.48419 4.85259 2.60999 4.42158C2.73579 3.99058 2.96838 3.59832 3.2862 3.28117C3.60401 2.96402 3.99676 2.73225 4.42802 2.60735C4.85929 2.48245 5.31511 2.46847 5.75322 2.56669C5.99436 2.18956 6.32655 1.8792 6.71919 1.66421C7.11182 1.44923 7.55225 1.33655 7.99988 1.33655C8.44752 1.33655 8.88795 1.44923 9.28058 1.66421C9.67322 1.8792 10.0054 2.18956 10.2466 2.56669C10.6853 2.46804 11.1419 2.48196 11.5739 2.60717C12.0058 2.73237 12.3991 2.96478 12.7171 3.28279C13.0351 3.6008 13.2675 3.99407 13.3927 4.42603C13.5179 4.85798 13.5319 5.31458 13.4332 5.75336C13.8104 5.9945 14.1207 6.32669 14.3357 6.71932C14.5507 7.11196 14.6634 7.55239 14.6634 8.00002C14.6634 8.44766 14.5507 8.88809 14.3357 9.28072C14.1207 9.67336 13.8104 10.0056 13.4332 10.2467C13.5314 10.6848 13.5175 11.1406 13.3926 11.5719C13.2677 12.0032 13.0359 12.3959 12.7187 12.7137C12.4016 13.0315 12.0093 13.2641 11.5783 13.3899C11.1473 13.5157 10.6915 13.5307 10.2532 13.4334C10.0124 13.8119 9.67994 14.1236 9.28663 14.3396C8.89333 14.5555 8.4519 14.6687 8.00322 14.6687C7.55453 14.6687 7.1131 14.5555 6.7198 14.3396C6.3265 14.1236 5.99404 13.8119 5.75322 13.4334C5.31511 13.5316 4.85929 13.5176 4.42802 13.3927C3.99676 13.2678 3.60401 13.036 3.2862 12.7189C2.96838 12.4017 2.73579 12.0095 2.60999 11.5785C2.48419 11.1475 2.46925 10.6917 2.56655 10.2534C2.18652 10.0129 1.87349 9.68014 1.65658 9.28617C1.43967 8.8922 1.32593 8.44976 1.32593 8.00002C1.32593 7.55029 1.43967 7.10785 1.65658 6.71388C1.87349 6.31991 2.18652 5.9872 2.56655 5.74669Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3248
3254
|
</g>
|
|
@@ -3252,17 +3258,17 @@
|
|
|
3252
3258
|
</clipPath>
|
|
3253
3259
|
</defs>
|
|
3254
3260
|
</svg>
|
|
3255
|
-
`}function
|
|
3261
|
+
`}function t1(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3256
3262
|
<path d="M3.33337 8.00004H12.6667M8.00004 3.33337V12.6667" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3257
3263
|
</svg>
|
|
3258
3264
|
`}function La(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3259
3265
|
<path d="M14.0001 14L11.1335 11.1333M12.6667 7.33333C12.6667 10.2789 10.2789 12.6667 7.33333 12.6667C4.38781 12.6667 2 10.2789 2 7.33333C2 4.38781 4.38781 2 7.33333 2C10.2789 2 12.6667 4.38781 12.6667 7.33333Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3260
3266
|
</svg>`}function qh(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3261
3267
|
<path d="M2 8C2 6.4087 2.63214 4.88258 3.75736 3.75736C4.88258 2.63214 6.4087 2 8 2C9.67737 2.00631 11.2874 2.66082 12.4933 3.82667L14 5.33333M10.6667 5.33333H14V2M14 8C14 9.5913 13.3679 11.1174 12.2426 12.2426C11.1174 13.3679 9.5913 14 8 14C6.32263 13.9937 4.71265 13.3392 3.50667 12.1733L2 10.6667M2 14V10.6667H5.33333" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3262
|
-
</svg>`}function
|
|
3268
|
+
</svg>`}function e1(){return U`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3263
3269
|
<path d="M9.99976 7.49988V10.8332M9.99976 14.1665H10.0081M18.108 14.9999L11.4414 3.33319C11.296 3.0767 11.0852 2.86335 10.8305 2.71492C10.5757 2.56649 10.2862 2.48828 9.99136 2.48828C9.69654 2.48828 9.40699 2.56649 9.15226 2.71492C8.89753 2.86335 8.68673 3.0767 8.54136 3.33319L1.8747 14.9999C1.72777 15.2543 1.65072 15.5431 1.65137 15.837C1.65202 16.1308 1.73035 16.4192 1.8784 16.673C2.02646 16.9269 2.23899 17.137 2.49444 17.2822C2.7499 17.4274 3.0392 17.5025 3.33303 17.4999H16.6664C16.9588 17.4996 17.246 17.4223 17.4991 17.2759C17.7522 17.1295 17.9624 16.9191 18.1085 16.6658C18.2545 16.4125 18.3314 16.1252 18.3313 15.8328C18.3312 15.5404 18.2542 15.2531 18.108 14.9999Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3264
|
-
</svg>`}function
|
|
3265
|
-
`}var
|
|
3270
|
+
</svg>`}function r1(){return U`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy-icon lucide-copy"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>
|
|
3271
|
+
`}var n1=Object.defineProperty,o1=Object.getOwnPropertyDescriptor,No=(e,t,r,o)=>{for(var n=o>1?void 0:o?o1(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&&n1(t,r,n),n};exports.PontEditIdentifier=class extends f{constructor(){super(...arguments),this.seed=_t(),this.identifier=WP.identifier,this.event="",this._handleClick=()=>{K.processLoginflowEvent({event:this.event})}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontEditIdentifier.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontEditIdentifier.ICON}`}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}render(){return l`
|
|
3266
3272
|
<div>
|
|
3267
3273
|
<pont-typography-p>${this.identifier}</pont-typography-p>
|
|
3268
3274
|
<div class="pont-flex pont-items-center">
|
|
@@ -3271,14 +3277,14 @@
|
|
|
3271
3277
|
>
|
|
3272
3278
|
</div>
|
|
3273
3279
|
</div>
|
|
3274
|
-
`}};exports.PontEditIdentifier.ROOT="edit-identifier";exports.PontEditIdentifier.ICON="icon";exports.PontEditIdentifier.TAG=`${rt}-${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}`};No([a({type:String})],exports.PontEditIdentifier.prototype,"seed",2);No([a({type:String,attribute:"custom-id"})],exports.PontEditIdentifier.prototype,"customId",2);No([a({type:String})],exports.PontEditIdentifier.prototype,"identifier",2);No([a({type:String})],exports.PontEditIdentifier.prototype,"event",2);exports.PontEditIdentifier=No([p("pont-edit-identifier")],exports.PontEditIdentifier);function
|
|
3275
|
-
]))+`;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 Jc;function rn(){return Jc||(Jc=1,(function(e){const t=Vh(),r=Hh();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}}})(Ss)),Ss}var Xc;function
|
|
3276
|
-
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),o.put(i,13)}},Ds=r,Ds}var Ls={exports:{}},ip;function
|
|
3277
|
-
Suggested mode is: `+t.toString(I));switch(L===t.KANJI&&!d.isKanjiModeEnabled()&&(L=t.BYTE),L){case t.NUMERIC:return new r(S);case t.ALPHANUMERIC:return new o(S);case t.KANJI:return new i(S);case t.BYTE:return new n(S)}}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()))}})(Rs)),Rs}var ap;function
|
|
3280
|
+
`}};exports.PontEditIdentifier.ROOT="edit-identifier";exports.PontEditIdentifier.ICON="icon";exports.PontEditIdentifier.TAG=`${rt}-${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}`};No([a({type:String})],exports.PontEditIdentifier.prototype,"seed",2);No([a({type:String,attribute:"custom-id"})],exports.PontEditIdentifier.prototype,"customId",2);No([a({type:String})],exports.PontEditIdentifier.prototype,"identifier",2);No([a({type:String})],exports.PontEditIdentifier.prototype,"event",2);exports.PontEditIdentifier=No([p("pont-edit-identifier")],exports.PontEditIdentifier);function i1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vn={},gs,Mc;function s1(){return Mc||(Mc=1,gs=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),gs}var fs={},sr={},Bc;function en(){if(Bc)return sr;Bc=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 vs={},Uc;function $l(){return Uc||(Uc=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}}})(vs)),vs}var bs,jc;function a1(){if(jc)return bs;jc=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++}},bs=e,bs}var ys,qc;function l1(){if(qc)return ys;qc=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]},ys=e,ys}var _s={},zc;function d1(){return zc||(zc=1,(function(e){const t=en().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}})(_s)),_s}var ws={},Vc;function c1(){if(Vc)return ws;Vc=1;const e=en().getSymbolSize,t=7;return ws.getPositions=function(o){const n=e(o);return[[0,0],[n-t,0],[0,n-t]]},ws}var $s={},Hc;function p1(){return Hc||(Hc=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,u=null,v=null;for(let b=0;b<i;b++){d=c=0,u=v=null;for(let w=0;w<i;w++){let _=n.get(b,w);_===u?d++:(d>=5&&(s+=t.N1+(d-5)),u=_,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 u=n.get(d,c)+n.get(d,c+1)+n.get(d+1,c)+n.get(d+1,c+1);(u===4||u===0)&&s++}return s*t.N2},e.getPenaltyN3=function(n){const i=n.size;let s=0,d=0,c=0;for(let u=0;u<i;u++){d=c=0;for(let v=0;v<i;v++)d=d<<1&2047|n.get(u,v),v>=10&&(d===1488||d===93)&&s++,c=c<<1&2047|n.get(v,u),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 u=0;u<s;u++){i(u),e.applyMask(u,n);const v=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(u,n),v<c&&(c=v,d=u)}return d}})($s)),$s}var zo={},Gc;function zh(){if(Gc)return zo;Gc=1;const e=$l(),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 zo.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}},zo.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}},zo}var Ps={},eo={},Kc;function h1(){if(Kc)return eo;Kc=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]})(),eo.log=function(o){if(o<1)throw new Error("log("+o+")");return t[o]},eo.exp=function(o){return e[o]},eo.mul=function(o,n){return o===0||n===0?0:e[t[o]+t[n]]},eo}var Wc;function u1(){return Wc||(Wc=1,(function(e){const t=h1();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}})(Ps)),Ps}var Cs,Yc;function m1(){if(Yc)return Cs;Yc=1;const e=u1();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},Cs=t,Cs}var Es={},Ss={},xs={},Qc;function Vh(){return Qc||(Qc=1,xs.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),xs}var ge={},Zc;function Hh(){if(Zc)return ge;Zc=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
|
|
3281
|
+
]))+`;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 Jc;function rn(){return Jc||(Jc=1,(function(e){const t=Vh(),r=Hh();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}}})(Ss)),Ss}var Xc;function g1(){return Xc||(Xc=1,(function(e){const t=en(),r=zh(),o=$l(),n=rn(),i=Vh(),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 u(w,_){return n.getCharCountIndicator(w,_)+4}function v(w,_){let C=0;return w.forEach(function(P){const O=u(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(_),S=r.getTotalCodewordsCount(_,C),D=(O-S)*8;if(P===n.MIXED)return D;const L=D-u(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}})(Es)),Es}var Os={},tp;function f1(){if(tp)return Os;tp=1;const e=en(),t=1335,r=21522,o=e.getBCHDigit(t);return Os.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},Os}var Rs={},Is,ep;function v1(){if(ep)return Is;ep=1;const e=rn();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))},Is=t,Is}var As,rp;function b1(){if(rp)return As;rp=1;const e=rn(),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)},As=r,As}var Ts,np;function y1(){if(np)return Ts;np=1;const e=rn();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)},Ts=t,Ts}var Ds,op;function _1(){if(op)return Ds;op=1;const e=rn(),t=en();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]+`
|
|
3282
|
+
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),o.put(i,13)}},Ds=r,Ds}var Ls={exports:{}},ip;function w1(){return ip||(ip=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,u,v,b,w,_,C,P,O;!d.empty();){c=d.pop(),u=c.value,b=c.cost,w=r[u]||{};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]=u))}if(typeof n<"u"&&typeof s[n]>"u"){var S=["Could not find a path from ",o," to ",n,"."].join("");throw new Error(S)}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})(Ls)),Ls.exports}var sp;function $1(){return sp||(sp=1,(function(e){const t=rn(),r=v1(),o=b1(),n=y1(),i=_1(),s=Hh(),d=en(),c=w1();function u(S){return unescape(encodeURIComponent(S)).length}function v(S,D,L){const I=[];let Q;for(;(Q=S.exec(L))!==null;)I.push({data:Q[0],index:Q.index,mode:D,length:Q[0].length});return I}function b(S){const D=v(s.NUMERIC,t.NUMERIC,S),L=v(s.ALPHANUMERIC,t.ALPHANUMERIC,S);let I,Q;return d.isKanjiModeEnabled()?(I=v(s.BYTE,t.BYTE,S),Q=v(s.KANJI,t.KANJI,S)):(I=v(s.BYTE_KANJI,t.BYTE,S),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(S,D){switch(D){case t.NUMERIC:return r.getBitsLength(S);case t.ALPHANUMERIC:return o.getBitsLength(S);case t.KANJI:return i.getBitsLength(S);case t.BYTE:return n.getBitsLength(S)}}function _(S){return S.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(S){const D=[];for(let L=0;L<S.length;L++){const I=S[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:u(I.data)}]);break;case t.BYTE:D.push([{data:I.data,mode:t.BYTE,length:u(I.data)}])}}return D}function P(S,D){const L={},I={start:{}};let Q=["start"];for(let R=0;R<S.length;R++){const A=S[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(S,D){let L;const I=t.getBestModeForData(S);if(L=t.from(D,I),L!==t.BYTE&&L.bit<I.bit)throw new Error('"'+S+'" cannot be encoded with mode '+t.toString(L)+`.
|
|
3283
|
+
Suggested mode is: `+t.toString(I));switch(L===t.KANJI&&!d.isKanjiModeEnabled()&&(L=t.BYTE),L){case t.NUMERIC:return new r(S);case t.ALPHANUMERIC:return new o(S);case t.KANJI:return new i(S);case t.BYTE:return new n(S)}}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()))}})(Rs)),Rs}var ap;function P1(){if(ap)return fs;ap=1;const e=en(),t=$l(),r=a1(),o=l1(),n=d1(),i=c1(),s=p1(),d=zh(),c=m1(),u=g1(),v=f1(),b=rn(),w=$1();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=u.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 S(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 Xt=!1;$<A.length&&(Xt=(A[$]>>>F&1)===1),R.set(N,k-M,Xt),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,Xt=Math.floor(x/$),me=Math.floor(F/$),jo=me+1,an=Xt-me,xr=new c(an);let ln=0;const It=new Array($),Dl=new Array($);let rs=0;const su=new Uint8Array(R.buffer);for(let dn=0;dn<$;dn++){const os=dn<M?me:jo;It[dn]=su.slice(ln,ln+os),Dl[dn]=xr.encode(It[dn]),ln+=os,rs=Math.max(rs,os)}const ns=new Uint8Array(x);let Ll=0,qe,ze;for(qe=0;qe<rs;qe++)for(ze=0;ze<$;ze++)qe<It[ze].length&&(ns[Ll++]=It[ze][qe]);for(qe=0;qe<an;qe++)for(ze=0;ze<$;ze++)ns[Ll++]=Dl[ze][qe];return ns}function Q(R,A,T,x){let N;if(Array.isArray(R))N=w.fromArray(R);else if(typeof R=="string"){let Xt=A;if(!Xt){const me=w.rawSplit(R);Xt=u.getBestVersionForData(me,T)}N=w.fromString(R,Xt||40)}else throw new Error("Invalid data");const F=u.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(`
|
|
3278
3284
|
The chosen QR Code version cannot contain this amount of data.
|
|
3279
3285
|
Minimum version required to store current data is: `+F+`.
|
|
3280
|
-
`);const $=L(A,T,N),k=e.getSymbolSize(A),M=new o(k);return _(M,A),C(M),P(M,A),S(M,T,0),A>=7&&O(M,A),D(M,$),isNaN(x)&&(x=s.getBestMask(M,S.bind(null,M,T))),s.applyMask(x,M),S(M,T,x),{modules:M,version:A,errorCorrectionLevel:T,maskPattern:x,segments:N}}return fs.create=function(A,T){if(typeof A>"u"||A==="")throw new Error("No input text");let x=t.M,N,F;return typeof T<"u"&&(x=t.from(T.errorCorrectionLevel,t.M),N=u.from(T.version),F=s.from(T.maskPattern),T.toSJISFunc&&e.setToSJISFunction(T.toSJISFunc)),Q(A,N,x,F)},fs}var Fs={},ks={},lp;function Gh(){return lp||(lp=1,(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let o=r.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+r);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");const n=parseInt(o.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+o.slice(0,6).join("")}}e.getOptions=function(o){o||(o={}),o.color||(o.color={});const n=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,s=o.scale||4;return{width:i,scale:i?4:s,margin:n,color:{dark:t(o.color.dark||"#000000ff"),light:t(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},e.getScale=function(o,n){return n.width&&n.width>=o+n.margin*2?n.width/(o+n.margin*2):n.scale},e.getImageWidth=function(o,n){const i=e.getScale(o,n);return Math.floor((o+n.margin*2)*i)},e.qrToImageData=function(o,n,i){const s=n.modules.size,d=n.modules.data,c=e.getScale(s,i),u=Math.floor((s+i.margin*2)*c),v=i.margin*c,b=[i.color.light,i.color.dark];for(let w=0;w<u;w++)for(let _=0;_<u;_++){let C=(w*u+_)*4,P=i.color.light;if(w>=v&&_>=v&&w<u-v&&_<u-v){const O=Math.floor((w-v)/c),S=Math.floor((_-v)/c);P=b[d[O*s+S]?1:0]}o[C++]=P.r,o[C++]=P.g,o[C++]=P.b,o[C]=P.a}}})(ks)),ks}var dp;function
|
|
3281
|
-
`;return typeof d=="function"&&d(null,O),O},Ns}var pp;function
|
|
3286
|
+
`);const $=L(A,T,N),k=e.getSymbolSize(A),M=new o(k);return _(M,A),C(M),P(M,A),S(M,T,0),A>=7&&O(M,A),D(M,$),isNaN(x)&&(x=s.getBestMask(M,S.bind(null,M,T))),s.applyMask(x,M),S(M,T,x),{modules:M,version:A,errorCorrectionLevel:T,maskPattern:x,segments:N}}return fs.create=function(A,T){if(typeof A>"u"||A==="")throw new Error("No input text");let x=t.M,N,F;return typeof T<"u"&&(x=t.from(T.errorCorrectionLevel,t.M),N=u.from(T.version),F=s.from(T.maskPattern),T.toSJISFunc&&e.setToSJISFunction(T.toSJISFunc)),Q(A,N,x,F)},fs}var Fs={},ks={},lp;function Gh(){return lp||(lp=1,(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let o=r.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+r);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");const n=parseInt(o.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+o.slice(0,6).join("")}}e.getOptions=function(o){o||(o={}),o.color||(o.color={});const n=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,s=o.scale||4;return{width:i,scale:i?4:s,margin:n,color:{dark:t(o.color.dark||"#000000ff"),light:t(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},e.getScale=function(o,n){return n.width&&n.width>=o+n.margin*2?n.width/(o+n.margin*2):n.scale},e.getImageWidth=function(o,n){const i=e.getScale(o,n);return Math.floor((o+n.margin*2)*i)},e.qrToImageData=function(o,n,i){const s=n.modules.size,d=n.modules.data,c=e.getScale(s,i),u=Math.floor((s+i.margin*2)*c),v=i.margin*c,b=[i.color.light,i.color.dark];for(let w=0;w<u;w++)for(let _=0;_<u;_++){let C=(w*u+_)*4,P=i.color.light;if(w>=v&&_>=v&&w<u-v&&_<u-v){const O=Math.floor((w-v)/c),S=Math.floor((_-v)/c);P=b[d[O*s+S]?1:0]}o[C++]=P.r,o[C++]=P.g,o[C++]=P.b,o[C]=P.a}}})(ks)),ks}var dp;function C1(){return dp||(dp=1,(function(e){const t=Gh();function r(n,i,s){n.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=s,i.width=s,i.style.height=s+"px",i.style.width=s+"px"}function o(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(i,s,d){let c=d,u=s;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),s||(u=o()),c=t.getOptions(c);const v=t.getImageWidth(i.modules.size,c),b=u.getContext("2d"),w=b.createImageData(v,v);return t.qrToImageData(w.data,i,c),r(b,u,v),b.putImageData(w,0,0),u},e.renderToDataURL=function(i,s,d){let c=d;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),c||(c={});const u=e.render(i,s,c),v=c.type||"image/png",b=c.rendererOpts||{};return u.toDataURL(v,b.quality)}})(Fs)),Fs}var Ns={},cp;function E1(){if(cp)return Ns;cp=1;const e=Gh();function t(n,i){const s=n.a/255,d=i+'="'+n.hex+'"';return s<1?d+" "+i+'-opacity="'+s.toFixed(2).slice(1)+'"':d}function r(n,i,s){let d=n+i;return typeof s<"u"&&(d+=" "+s),d}function o(n,i,s){let d="",c=0,u=!1,v=0;for(let b=0;b<n.length;b++){const w=Math.floor(b%i),_=Math.floor(b/i);!w&&!u&&(u=!0),n[b]?(v++,b>0&&w>0&&n[b-1]||(d+=u?r("M",w+s,.5+_+s):r("m",c,0),c=0,u=!1),w+1<i&&n[b+1]||(d+=r("h",v),v=0)):c++}return d}return Ns.render=function(i,s,d){const c=e.getOptions(s),u=i.modules.size,v=i.modules.data,b=u+c.margin*2,w=c.color.light.a?"<path "+t(c.color.light,"fill")+' d="M0 0h'+b+"v"+b+'H0z"/>':"",_="<path "+t(c.color.dark,"stroke")+' d="'+o(v,u,c.margin)+'"/>',C='viewBox="0 0 '+b+" "+b+'"',O='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+C+' shape-rendering="crispEdges">'+w+_+`</svg>
|
|
3287
|
+
`;return typeof d=="function"&&d(null,O),O},Ns}var pp;function S1(){if(pp)return vn;pp=1;const e=s1(),t=P1(),r=C1(),o=E1();function n(i,s,d,c,u){const v=[].slice.call(arguments,1),b=v.length,w=typeof v[b-1]=="function";if(!w&&!e())throw new Error("Callback required as last argument");if(w){if(b<2)throw new Error("Too few arguments provided");b===2?(u=d,d=s,s=c=void 0):b===3&&(s.getContext&&typeof u>"u"?(u=c,c=void 0):(u=c,c=d,d=s,s=void 0))}else{if(b<1)throw new Error("Too few arguments provided");return b===1?(d=s,s=c=void 0):b===2&&!s.getContext&&(c=d,d=s,s=void 0),new Promise(function(_,C){try{const P=t.create(d,c);_(i(P,s,c))}catch(P){C(P)}})}try{const _=t.create(d,c);u(null,i(_,s,c))}catch(_){u(_)}}return vn.create=t.create,vn.toCanvas=n.bind(null,r.render),vn.toDataURL=n.bind(null,r.renderToDataURL),vn.toString=n.bind(null,function(i,s,d){return o.render(i,d)}),vn}var x1=S1();const O1=i1(x1),Vo={url:"",timeout:10,reappearButtonText:"Show QR Code",errorCorrection:"M"};var R1=Object.defineProperty,I1=Object.getOwnPropertyDescriptor,er=(e,t,r,o)=>{for(var n=o>1?void 0:o?I1(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&&R1(t,r,n),n};exports.PontQrCode=class extends f{constructor(){super(...arguments),this.seed=_t(),this.url=Vo.url,this.timeout=Vo.timeout,this.reappearButtonText=Vo.reappearButtonText,this.disabled=!1,this.errorCorrection=Vo.errorCorrection,this._obscured=!1,this._canvasElement=null,this._handleReappear=()=>{this.disabled||(this._obscured=!1,this._clearTimer(),this._startTimer(),this.emit("pont-qr:reappear",{id:this.rootId,url:this.url}))}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontQrCode.TAG}-${this.seed}`}get canvasId(){return`${this.rootId}-${exports.PontQrCode.QR_CANVAS}`}get overlayId(){return`${this.rootId}-${exports.PontQrCode.OVERLAY}`}get reappearButtonId(){return`${this.rootId}-${exports.PontQrCode.REAPPEAR_BUTTON}`}connectedCallback(){super.connectedCallback(),this._startTimer()}disconnectedCallback(){super.disconnectedCallback(),this._clearTimer()}firstUpdated(){const t=this.querySelector(`#${this.canvasId}`);t&&(this._canvasElement=t,this._renderQR())}updated(t){(t.has("url")||t.has("errorCorrection"))&&(this._renderQR(),this._obscured=!1,this._clearTimer(),this._startTimer()),t.has("timeout")&&(this._clearTimer(),this._startTimer())}_startTimer(){this.timeout<=0||(this._clearTimer(),this._timer=window.setTimeout(()=>{this._obscured=!0,this._timer=void 0,this.emit("pont-qr:obscured",{id:this.rootId,url:this.url})},this.timeout*1e3))}_clearTimer(){this._timer&&(clearTimeout(this._timer),this._timer=void 0)}_renderQR(){if(!this._canvasElement||!this.url)return;const t=getComputedStyle(this),r=parseInt(t.getPropertyValue("--pont-qr-code-canvas-render-width"))||200,o=parseInt(t.getPropertyValue("--pont-qr-code-canvas-render-height"))||200;this._canvasElement.width=r,this._canvasElement.height=o;const n={errorCorrectionLevel:this.errorCorrection};O1.toCanvas(this._canvasElement,this.url,n,i=>{i&&(console.warn("QR generation failed:",i),this.emit("pont-qr:error",{error:i,url:this.url}))})}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){const t=this._obscured&&!this.disabled;return l`
|
|
3282
3288
|
<div
|
|
3283
3289
|
part=${exports.PontQrCode.PARTS.root}
|
|
3284
3290
|
id=${this.rootId}
|
|
@@ -3311,7 +3317,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3311
3317
|
`:h}
|
|
3312
3318
|
</div>
|
|
3313
3319
|
</div>
|
|
3314
|
-
`}_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=`${rt}-${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 ro={title:"Can't scan?",secret:"",issuer:"",account:"",secretLabel:"Manual secret"};var
|
|
3320
|
+
`}_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=`${rt}-${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 ro={title:"Can't scan?",secret:"",issuer:"",account:"",secretLabel:"Manual secret"};var A1=Object.defineProperty,T1=Object.getOwnPropertyDescriptor,Cr=(e,t,r,o)=>{for(var n=o>1?void 0:o?T1(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&&A1(t,r,n),n};exports.PontSecret=class extends Ut{constructor(){super(...arguments),this.title=ro.title,this.secret=ro.secret,this.issuer=ro.issuer,this.account=ro.account,this.secretLabel=ro.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`
|
|
3315
3321
|
<div part=${exports.PontSecret.PARTS.root} class="pont-secret-root">
|
|
3316
3322
|
<div part=${exports.PontSecret.PARTS.card} class="pont-secret-card">
|
|
3317
3323
|
<div part=${exports.PontSecret.PARTS.title} class="pont-secret-title">
|
|
@@ -3336,7 +3342,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3336
3342
|
part=${exports.PontSecret.PARTS.copyButton}
|
|
3337
3343
|
data-testid="copy-button"
|
|
3338
3344
|
>
|
|
3339
|
-
${
|
|
3345
|
+
${r1()}
|
|
3340
3346
|
</pont-input-group-button>
|
|
3341
3347
|
${this._copied?l`
|
|
3342
3348
|
<span
|
|
@@ -3367,7 +3373,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3367
3373
|
</div>
|
|
3368
3374
|
</div>
|
|
3369
3375
|
</div>
|
|
3370
|
-
`}};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=`${rt}-${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}`};Cr([a({type:String})],exports.PontSecret.prototype,"title",2);Cr([a({type:String})],exports.PontSecret.prototype,"secret",2);Cr([a({type:String})],exports.PontSecret.prototype,"issuer",2);Cr([a({type:String})],exports.PontSecret.prototype,"account",2);Cr([a({type:String,attribute:"secret-label"})],exports.PontSecret.prototype,"secretLabel",2);Cr([a({type:Boolean})],exports.PontSecret.prototype,"disabled",2);Cr([g()],exports.PontSecret.prototype,"_copied",2);exports.PontSecret=Cr([p("pont-secret")],exports.PontSecret);const Ms={title:"Recovery codes",subtitle:"Use these codes if you lose access to your authenticator app.",codes:[]};var
|
|
3376
|
+
`}};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=`${rt}-${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}`};Cr([a({type:String})],exports.PontSecret.prototype,"title",2);Cr([a({type:String})],exports.PontSecret.prototype,"secret",2);Cr([a({type:String})],exports.PontSecret.prototype,"issuer",2);Cr([a({type:String})],exports.PontSecret.prototype,"account",2);Cr([a({type:String,attribute:"secret-label"})],exports.PontSecret.prototype,"secretLabel",2);Cr([a({type:Boolean})],exports.PontSecret.prototype,"disabled",2);Cr([g()],exports.PontSecret.prototype,"_copied",2);exports.PontSecret=Cr([p("pont-secret")],exports.PontSecret);const Ms={title:"Recovery codes",subtitle:"Use these codes if you lose access to your authenticator app.",codes:[]};var D1=Object.defineProperty,L1=Object.getOwnPropertyDescriptor,Kn=(e,t,r,o)=>{for(var n=o>1?void 0:o?L1(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&&D1(t,r,n),n};exports.PontRecoveryCodes=class extends Ut{constructor(){super(...arguments),this.title=Ms.title,this.subtitle=Ms.subtitle,this.codes=Ms.codes,this.disabled=!1,this._copied=!1,this._handleCopyAll=async()=>{if(!this.codes.length||this.disabled)return;const t=this.codes.join(`
|
|
3371
3377
|
`);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(`
|
|
3372
3378
|
`),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`
|
|
3373
3379
|
<div part=${exports.PontRecoveryCodes.PARTS.root} class="pont-recovery-codes-root">
|
|
@@ -3440,7 +3446,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3440
3446
|
</div>
|
|
3441
3447
|
</div>
|
|
3442
3448
|
</div>
|
|
3443
|
-
`}};exports.PontRecoveryCodes.ROOT="recovery-codes";exports.PontRecoveryCodes.CARD="card";exports.PontRecoveryCodes.TITLE="title";exports.PontRecoveryCodes.SUBTITLE="subtitle";exports.PontRecoveryCodes.CODES_LIST="codes-list";exports.PontRecoveryCodes.CODE_ITEM="code-item";exports.PontRecoveryCodes.BUTTONS="buttons";exports.PontRecoveryCodes.COPY_BUTTON="copy-button";exports.PontRecoveryCodes.DOWNLOAD_BUTTON="download-button";exports.PontRecoveryCodes.TOOLTIP="tooltip";exports.PontRecoveryCodes.TAG=`${rt}-${exports.PontRecoveryCodes.ROOT}`;exports.PontRecoveryCodes.PARTS={root:exports.PontRecoveryCodes.ROOT,card:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CARD}`,title:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.TITLE}`,subtitle:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.SUBTITLE}`,codesList:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CODES_LIST}`,codeItem:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CODE_ITEM}`,buttons:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.BUTTONS}`,copyButton:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.COPY_BUTTON}`,downloadButton:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.DOWNLOAD_BUTTON}`,tooltip:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.TOOLTIP}`};Kn([a({type:String})],exports.PontRecoveryCodes.prototype,"title",2);Kn([a({type:String})],exports.PontRecoveryCodes.prototype,"subtitle",2);Kn([a({type:Array})],exports.PontRecoveryCodes.prototype,"codes",2);Kn([a({type:Boolean})],exports.PontRecoveryCodes.prototype,"disabled",2);Kn([g()],exports.PontRecoveryCodes.prototype,"_copied",2);exports.PontRecoveryCodes=Kn([p("pont-recovery-codes")],exports.PontRecoveryCodes);const
|
|
3449
|
+
`}};exports.PontRecoveryCodes.ROOT="recovery-codes";exports.PontRecoveryCodes.CARD="card";exports.PontRecoveryCodes.TITLE="title";exports.PontRecoveryCodes.SUBTITLE="subtitle";exports.PontRecoveryCodes.CODES_LIST="codes-list";exports.PontRecoveryCodes.CODE_ITEM="code-item";exports.PontRecoveryCodes.BUTTONS="buttons";exports.PontRecoveryCodes.COPY_BUTTON="copy-button";exports.PontRecoveryCodes.DOWNLOAD_BUTTON="download-button";exports.PontRecoveryCodes.TOOLTIP="tooltip";exports.PontRecoveryCodes.TAG=`${rt}-${exports.PontRecoveryCodes.ROOT}`;exports.PontRecoveryCodes.PARTS={root:exports.PontRecoveryCodes.ROOT,card:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CARD}`,title:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.TITLE}`,subtitle:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.SUBTITLE}`,codesList:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CODES_LIST}`,codeItem:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CODE_ITEM}`,buttons:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.BUTTONS}`,copyButton:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.COPY_BUTTON}`,downloadButton:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.DOWNLOAD_BUTTON}`,tooltip:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.TOOLTIP}`};Kn([a({type:String})],exports.PontRecoveryCodes.prototype,"title",2);Kn([a({type:String})],exports.PontRecoveryCodes.prototype,"subtitle",2);Kn([a({type:Array})],exports.PontRecoveryCodes.prototype,"codes",2);Kn([a({type:Boolean})],exports.PontRecoveryCodes.prototype,"disabled",2);Kn([g()],exports.PontRecoveryCodes.prototype,"_copied",2);exports.PontRecoveryCodes=Kn([p("pont-recovery-codes")],exports.PontRecoveryCodes);const F1={default:U`
|
|
3444
3450
|
<circle cx="12" cy="12" r="10"/>
|
|
3445
3451
|
<line x1="12" x2="12" y1="8" y2="12"/>
|
|
3446
3452
|
<line x1="12" x2="12.01" y1="16" y2="16"/>
|
|
@@ -3459,7 +3465,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3459
3465
|
<circle cx="12" cy="12" r="10"/>
|
|
3460
3466
|
<path d="M12 16v-4"/>
|
|
3461
3467
|
<path d="M12 8h.01"/>
|
|
3462
|
-
`},Bs={status:"default",palette:"default",variant:"default"};var
|
|
3468
|
+
`},Bs={status:"default",palette:"default",variant:"default"};var k1=Object.defineProperty,N1=Object.getOwnPropertyDescriptor,rr=(e,t,r,o)=>{for(var n=o>1?void 0:o?N1(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&&k1(t,r,n),n};exports.PontAlert=class extends f{constructor(){super(...arguments),this.seed=_t(),this.status=Bs.status,this.palette=Bs.palette,this.variant=Bs.variant}get _defaultTitle(){return this.status==="default"?"Alert":this.status.charAt(0).toUpperCase()+this.status.slice(1)}get title(){return this._title??this._defaultTitle}set title(t){const r=this.title;this._title=t||void 0,this.requestUpdate("title",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontAlert.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontAlert.ICON}`}get titleId(){return`${this.rootId}-${exports.PontAlert.TITLE}`}get descriptionId(){return`${this.rootId}-${exports.PontAlert.DESCRIPTION}`}get _rootVariant(){let t=this.palette==="base"?"default":this.palette==="brand"?"brand":this.status==="error"?"destructive":this.status;return this.variant==="tonal"&&t!=="default"&&(t+="-tonal"),t}_renderIcon(){if(!this.icon)return h;const t=F1[this.status];return l`
|
|
3463
3469
|
<svg
|
|
3464
3470
|
id="${this.iconId}"
|
|
3465
3471
|
part="${exports.PontAlert.PARTS.icon}"
|
|
@@ -3500,11 +3506,11 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3500
3506
|
</pont-callout-description>
|
|
3501
3507
|
`:h}
|
|
3502
3508
|
</pont-callout>
|
|
3503
|
-
`}};exports.PontAlert.ROOT="alert";exports.PontAlert.ICON="icon";exports.PontAlert.TITLE="title";exports.PontAlert.DESCRIPTION="description";exports.PontAlert.TAG=`${rt}-${exports.PontAlert.ROOT}`;exports.PontAlert.PARTS={root:exports.PontAlert.ROOT,icon:`${exports.PontAlert.ROOT}-${exports.PontAlert.ICON}`,title:`${exports.PontAlert.ROOT}-${exports.PontAlert.TITLE}`,description:`${exports.PontAlert.ROOT}-${exports.PontAlert.DESCRIPTION}`};rr([a({type:String})],exports.PontAlert.prototype,"seed",2);rr([a({type:String,attribute:"custom-id"})],exports.PontAlert.prototype,"customId",2);rr([a({type:String})],exports.PontAlert.prototype,"status",2);rr([a({type:String})],exports.PontAlert.prototype,"palette",2);rr([a({type:String})],exports.PontAlert.prototype,"variant",2);rr([a({type:String})],exports.PontAlert.prototype,"title",1);rr([a({type:String})],exports.PontAlert.prototype,"description",2);rr([a({type:Boolean})],exports.PontAlert.prototype,"icon",2);exports.PontAlert=rr([p("pont-alert")],exports.PontAlert);var
|
|
3509
|
+
`}};exports.PontAlert.ROOT="alert";exports.PontAlert.ICON="icon";exports.PontAlert.TITLE="title";exports.PontAlert.DESCRIPTION="description";exports.PontAlert.TAG=`${rt}-${exports.PontAlert.ROOT}`;exports.PontAlert.PARTS={root:exports.PontAlert.ROOT,icon:`${exports.PontAlert.ROOT}-${exports.PontAlert.ICON}`,title:`${exports.PontAlert.ROOT}-${exports.PontAlert.TITLE}`,description:`${exports.PontAlert.ROOT}-${exports.PontAlert.DESCRIPTION}`};rr([a({type:String})],exports.PontAlert.prototype,"seed",2);rr([a({type:String,attribute:"custom-id"})],exports.PontAlert.prototype,"customId",2);rr([a({type:String})],exports.PontAlert.prototype,"status",2);rr([a({type:String})],exports.PontAlert.prototype,"palette",2);rr([a({type:String})],exports.PontAlert.prototype,"variant",2);rr([a({type:String})],exports.PontAlert.prototype,"title",1);rr([a({type:String})],exports.PontAlert.prototype,"description",2);rr([a({type:Boolean})],exports.PontAlert.prototype,"icon",2);exports.PontAlert=rr([p("pont-alert")],exports.PontAlert);var M1=Object.defineProperty,B1=Object.getOwnPropertyDescriptor,Wn=(e,t,r,o)=>{for(var n=o>1?void 0:o?B1(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&&M1(t,r,n),n};exports.PontCountdown=class extends Ut{constructor(){super(...arguments),this.content="",this.duration=5,this.redirectUrl="/",this.id="",this.seconds=0,this.timerId=null}get _containerElement(){return this.querySelector(`div[part=${this.id?this.id:"countdown"}]`)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.initializeCountdown()}disconnectedCallback(){this.clearTimer(),super.disconnectedCallback()}initializeCountdown(){this.seconds=Math.max(0,this.duration||0),this.startTimer()}startTimer(){this.clearTimer(),this.timerId=window.setInterval(()=>{this.seconds<=1?this.completeCountdown():this.seconds--},1e3)}completeCountdown(){this.clearTimer(),window.location.href=this.redirectUrl||"/"}clearTimer(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null)}renderContent(){return`${this.content} ${this.seconds}s...`}render(){return l`
|
|
3504
3510
|
<div part=${this.id?this.id:"countdown"}>
|
|
3505
3511
|
<pont-typography-p>${this.renderContent()}</pont-typography-p>
|
|
3506
3512
|
</div>
|
|
3507
|
-
`}};Wn([a()],exports.PontCountdown.prototype,"content",2);Wn([a({type:Number})],exports.PontCountdown.prototype,"duration",2);Wn([a({attribute:"redirect-url"})],exports.PontCountdown.prototype,"redirectUrl",2);Wn([a()],exports.PontCountdown.prototype,"id",2);Wn([g()],exports.PontCountdown.prototype,"seconds",2);exports.PontCountdown=Wn([p("pont-countdown")],exports.PontCountdown);var
|
|
3513
|
+
`}};Wn([a()],exports.PontCountdown.prototype,"content",2);Wn([a({type:Number})],exports.PontCountdown.prototype,"duration",2);Wn([a({attribute:"redirect-url"})],exports.PontCountdown.prototype,"redirectUrl",2);Wn([a()],exports.PontCountdown.prototype,"id",2);Wn([g()],exports.PontCountdown.prototype,"seconds",2);exports.PontCountdown=Wn([p("pont-countdown")],exports.PontCountdown);var U1=Object.defineProperty,j1=Object.getOwnPropertyDescriptor,Hi=(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&&U1(t,r,n),n};exports.PontBlock=class extends Ut{constructor(){super(...arguments),this.id="",this.align="center",this.justify="start",this.branding=new cP(this)}createRenderRoot(){return this}async firstUpdated(){await this.updateComplete;const t=this.querySelector("pont-card-content");t!=null&&t.updateComplete&&await t.updateComplete;const r=t==null?void 0:t.querySelector('div[data-slot="card-content"]');r&&this.moveLightDomChildrenInto(r),await Aa()}async updated(){await this.updateComplete,await Aa()}_renderWatermark(){return l`
|
|
3508
3514
|
<pont-card-footer border>
|
|
3509
3515
|
<pont-watermark variant="muted"></pont-watermark>
|
|
3510
3516
|
</pont-card-footer>
|
|
@@ -3517,30 +3523,30 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3517
3523
|
<pont-card-content></pont-card-content>
|
|
3518
3524
|
${this.branding.showWatermark?this._renderWatermark():h}
|
|
3519
3525
|
</pont-card>
|
|
3520
|
-
`}};Hi([a()],exports.PontBlock.prototype,"id",2);Hi([a()],exports.PontBlock.prototype,"align",2);Hi([a()],exports.PontBlock.prototype,"justify",2);exports.PontBlock=Hi([p("pont-block")],exports.PontBlock);var
|
|
3526
|
+
`}};Hi([a()],exports.PontBlock.prototype,"id",2);Hi([a()],exports.PontBlock.prototype,"align",2);Hi([a()],exports.PontBlock.prototype,"justify",2);exports.PontBlock=Hi([p("pont-block")],exports.PontBlock);var q1=Object.defineProperty,z1=Object.getOwnPropertyDescriptor,Pl=(e,t,r,o)=>{for(var n=o>1?void 0:o?z1(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&&q1(t,r,n),n};const V1="data-pont-design",H1="data-pont-design-empty",G1="data-pont-container";exports.PontContainer=class extends Ut{constructor(){super(...arguments),this.id="",this.type="flex_column",this.design=new Fo(this)}createRenderRoot(){return this}get innerElement(){return this.querySelector(`:scope > [${G1}]`)}async firstUpdated(){await this.updateComplete;const t=this.innerElement;t&&this.moveLightDomChildrenInto(t),this.syncDesignState()}async updated(){await this.updateComplete,await Aa(),this.syncDesignState()}syncDesignState(){var r;const t=this.design.active;this.toggleAttribute(V1,t),this.toggleAttribute(H1,t&&(((r=this.innerElement)==null?void 0:r.childElementCount)??0)===0)}render(){return l`<div
|
|
3521
3527
|
data-pont-container
|
|
3522
3528
|
part=${this.id?this.id:"container"}
|
|
3523
3529
|
data-type="${this.type}"
|
|
3524
|
-
></div>`}};Pl([a()],exports.PontContainer.prototype,"id",2);Pl([a()],exports.PontContainer.prototype,"type",2);exports.PontContainer=Pl([p("pont-container")],exports.PontContainer);var
|
|
3530
|
+
></div>`}};Pl([a()],exports.PontContainer.prototype,"id",2);Pl([a()],exports.PontContainer.prototype,"type",2);exports.PontContainer=Pl([p("pont-container")],exports.PontContainer);var K1=Object.defineProperty,W1=Object.getOwnPropertyDescriptor,Gi=(e,t,r,o)=>{for(var n=o>1?void 0:o?W1(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&&K1(t,r,n),n};exports.PontDivider=class extends f{constructor(){super(...arguments),this.seed=_t()}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontDivider.TAG}-${this.seed}`}render(){return l`
|
|
3525
3531
|
<pont-field-separator id="${this.rootId}" part="${exports.PontDivider.PARTS.root}">
|
|
3526
3532
|
${this.label??h}
|
|
3527
3533
|
</pont-field-separator>
|
|
3528
|
-
`}};exports.PontDivider.ROOT="divider";exports.PontDivider.TAG=`${rt}-${exports.PontDivider.ROOT}`;exports.PontDivider.PARTS={root:exports.PontDivider.ROOT};Gi([a({type:String})],exports.PontDivider.prototype,"seed",2);Gi([a({type:String,attribute:"custom-id"})],exports.PontDivider.prototype,"customId",2);Gi([a({type:String})],exports.PontDivider.prototype,"label",2);exports.PontDivider=Gi([p("pont-divider")],exports.PontDivider);var
|
|
3534
|
+
`}};exports.PontDivider.ROOT="divider";exports.PontDivider.TAG=`${rt}-${exports.PontDivider.ROOT}`;exports.PontDivider.PARTS={root:exports.PontDivider.ROOT};Gi([a({type:String})],exports.PontDivider.prototype,"seed",2);Gi([a({type:String,attribute:"custom-id"})],exports.PontDivider.prototype,"customId",2);Gi([a({type:String})],exports.PontDivider.prototype,"label",2);exports.PontDivider=Gi([p("pont-divider")],exports.PontDivider);var Y1=Object.defineProperty,Q1=Object.getOwnPropertyDescriptor,Ki=(e,t,r,o)=>{for(var n=o>1?void 0:o?Q1(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.PontGap=class extends Ut{constructor(){super(...arguments),this.size="8px",this.type="vertical",this.id=""}createRenderRoot(){return this}render(){let t={width:"0px",height:"0px"};return this.type==="vertical"?t={width:"1px",height:this.size}:t={height:"1px",width:this.size},l`
|
|
3529
3535
|
<div
|
|
3530
3536
|
part=${this.id?this.id:"gap"}
|
|
3531
|
-
style=${
|
|
3537
|
+
style=${pP({...t})}
|
|
3532
3538
|
></div>
|
|
3533
|
-
`}};Ki([a()],exports.PontGap.prototype,"size",2);Ki([a()],exports.PontGap.prototype,"type",2);Ki([a()],exports.PontGap.prototype,"id",2);exports.PontGap=Ki([p("pont-gap")],exports.PontGap);var
|
|
3539
|
+
`}};Ki([a()],exports.PontGap.prototype,"size",2);Ki([a()],exports.PontGap.prototype,"type",2);Ki([a()],exports.PontGap.prototype,"id",2);exports.PontGap=Ki([p("pont-gap")],exports.PontGap);var Z1=Object.defineProperty,J1=Object.getOwnPropertyDescriptor,Cl=(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};const X1="data-pont-header";exports.PontHeader=class extends Ut{constructor(){super(...arguments),this.id="",this.align="center"}get innerElement(){return this.querySelector(`:scope > [${X1}]`)}createRenderRoot(){return this}firstUpdated(){const t=this.innerElement;t&&this.moveLightDomChildrenInto(t)}render(){return l`
|
|
3534
3540
|
<div
|
|
3535
3541
|
data-pont-header
|
|
3536
3542
|
part=${this.id?this.id:"header"}
|
|
3537
3543
|
data-align=${this.align}
|
|
3538
3544
|
></div>
|
|
3539
|
-
`}};Cl([a()],exports.PontHeader.prototype,"id",2);Cl([a()],exports.PontHeader.prototype,"align",2);exports.PontHeader=Cl([p("pont-header")],exports.PontHeader);var
|
|
3545
|
+
`}};Cl([a()],exports.PontHeader.prototype,"id",2);Cl([a()],exports.PontHeader.prototype,"align",2);exports.PontHeader=Cl([p("pont-header")],exports.PontHeader);var t0=Object.defineProperty,e0=Object.getOwnPropertyDescriptor,El=(e,t,r,o)=>{for(var n=o>1?void 0:o?e0(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&&t0(t,r,n),n};exports.PontSubtitle=class extends Ut{get _containerElement(){return this.querySelector(`pont-typography-p[part=${this.id?this.id:"subtitle"}]`)}createRenderRoot(){return this}render(){return l`
|
|
3540
3546
|
<pont-typography-p part=${this.id?this.id:"subtitle"} id=${this.id}>
|
|
3541
3547
|
${this.content}
|
|
3542
3548
|
</pont-typography-p>
|
|
3543
|
-
`}};El([a({type:String})],exports.PontSubtitle.prototype,"id",2);El([a({type:String})],exports.PontSubtitle.prototype,"content",2);exports.PontSubtitle=El([p("pont-subtitle")],exports.PontSubtitle);var
|
|
3549
|
+
`}};El([a({type:String})],exports.PontSubtitle.prototype,"id",2);El([a({type:String})],exports.PontSubtitle.prototype,"content",2);exports.PontSubtitle=El([p("pont-subtitle")],exports.PontSubtitle);var r0=Object.defineProperty,n0=Object.getOwnPropertyDescriptor,Sl=(e,t,r,o)=>{for(var n=o>1?void 0:o?n0(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&&r0(t,r,n),n};exports.PontTitle=class extends Ut{get _containerElement(){return this.querySelector(`pont-typography-h[part=${this.id?this.id:"title"}]`)}createRenderRoot(){return this}render(){return l`
|
|
3544
3550
|
<pont-typography-h
|
|
3545
3551
|
part=${this.id?this.id:"title"}
|
|
3546
3552
|
level="h4"
|
|
@@ -3552,7 +3558,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3552
3558
|
* @license
|
|
3553
3559
|
* Copyright 2017 Google LLC
|
|
3554
3560
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3555
|
-
*/class Fa extends oi{}Fa.directiveName="unsafeSVG",Fa.resultType=2;const hp=An(Fa);var
|
|
3561
|
+
*/class Fa extends oi{}Fa.directiveName="unsafeSVG",Fa.resultType=2;const hp=An(Fa);var o0=Object.defineProperty,i0=Object.getOwnPropertyDescriptor,nr=(e,t,r,o)=>{for(var n=o>1?void 0:o?i0(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&&o0(t,r,n),n};const s0=`
|
|
3556
3562
|
<svg viewBox="0 0 120 32" role="img" aria-label="Logo placeholder"
|
|
3557
3563
|
xmlns="http://www.w3.org/2000/svg" width="120" height="32">
|
|
3558
3564
|
<rect x="0.75" y="0.75" width="118.5" height="30.5" rx="6"
|
|
@@ -3563,21 +3569,21 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3563
3569
|
fill="currentColor" fill-opacity="0.3"/>
|
|
3564
3570
|
<rect x="32" y="19" width="34" height="4" rx="2"
|
|
3565
3571
|
fill="currentColor" fill-opacity="0.18"/>
|
|
3566
|
-
</svg>`;exports.PontLogo=class extends Ut{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=
|
|
3572
|
+
</svg>`;exports.PontLogo=class extends Ut{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=mP(t,this.theme);if(!r&&this.design.active)return this.isSvg=!0,l`
|
|
3567
3573
|
<div class="pont-logo-wrapper" part=${this.id?this.id:"logo"}>
|
|
3568
|
-
${hp(
|
|
3574
|
+
${hp(s0)}
|
|
3569
3575
|
</div>
|
|
3570
|
-
`;const o=r?
|
|
3576
|
+
`;const o=r?bP(r):null;return this.isSvg=!!o,l`
|
|
3571
3577
|
<div class="pont-logo-wrapper">
|
|
3572
3578
|
${o?hp(o):l`
|
|
3573
3579
|
<img
|
|
3574
3580
|
part=${this.id?this.id:"logo"}
|
|
3575
|
-
src=${
|
|
3581
|
+
src=${yP(r)}
|
|
3576
3582
|
alt="Logo"
|
|
3577
3583
|
/>
|
|
3578
3584
|
`}
|
|
3579
3585
|
</div>
|
|
3580
|
-
`}};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 Ho={variant:"brand",logoAlign:"end",label:"Powered by"};var
|
|
3586
|
+
`}};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 Ho={variant:"brand",logoAlign:"end",label:"Powered by"};var a0=Object.defineProperty,l0=Object.getOwnPropertyDescriptor,Yn=(e,t,r,o)=>{for(var n=o>1?void 0:o?l0(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&&a0(t,r,n),n};exports.PontWatermark=class extends f{constructor(){super(...arguments),this.seed=_t(),this.variant=Ho.variant,this.logoAlign=Ho.logoAlign,this._label=Ho.label}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:Ho.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`
|
|
3581
3587
|
<span id="${this.labelId}" part="${exports.PontWatermark.PARTS.label}">
|
|
3582
3588
|
${this.label}
|
|
3583
3589
|
</span>
|
|
@@ -3632,7 +3638,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3632
3638
|
>
|
|
3633
3639
|
${this.logoAlign==="start"?l`${this._renderLogo()} ${this._renderLabel()}`:l`${this._renderLabel()} ${this._renderLogo()}`}
|
|
3634
3640
|
</span>
|
|
3635
|
-
`}};exports.PontWatermark.ROOT="watermark";exports.PontWatermark.LABEL="label";exports.PontWatermark.LOGO="logo";exports.PontWatermark.TAG=`${rt}-${exports.PontWatermark.ROOT}`;exports.PontWatermark.PARTS={root:exports.PontWatermark.ROOT,label:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LABEL}`,logo:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LOGO}`};Yn([a({type:String})],exports.PontWatermark.prototype,"seed",2);Yn([a({type:String,attribute:"custom-id"})],exports.PontWatermark.prototype,"customId",2);Yn([a({type:String})],exports.PontWatermark.prototype,"variant",2);Yn([a({type:String,attribute:"logo-align"})],exports.PontWatermark.prototype,"logoAlign",2);Yn([a({type:String})],exports.PontWatermark.prototype,"label",1);exports.PontWatermark=Yn([p("pont-watermark")],exports.PontWatermark);var
|
|
3641
|
+
`}};exports.PontWatermark.ROOT="watermark";exports.PontWatermark.LABEL="label";exports.PontWatermark.LOGO="logo";exports.PontWatermark.TAG=`${rt}-${exports.PontWatermark.ROOT}`;exports.PontWatermark.PARTS={root:exports.PontWatermark.ROOT,label:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LABEL}`,logo:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LOGO}`};Yn([a({type:String})],exports.PontWatermark.prototype,"seed",2);Yn([a({type:String,attribute:"custom-id"})],exports.PontWatermark.prototype,"customId",2);Yn([a({type:String})],exports.PontWatermark.prototype,"variant",2);Yn([a({type:String,attribute:"logo-align"})],exports.PontWatermark.prototype,"logoAlign",2);Yn([a({type:String})],exports.PontWatermark.prototype,"label",1);exports.PontWatermark=Yn([p("pont-watermark")],exports.PontWatermark);var d0=Object.defineProperty,c0=Object.getOwnPropertyDescriptor,Kh=(e,t,r,o)=>{for(var n=o>1?void 0:o?c0(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&&d0(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>`}};Kh([a({type:String})],exports.PontHint.prototype,"content",2);exports.PontHint=Kh([p("pont-hint")],exports.PontHint);var p0=Object.defineProperty,h0=Object.getOwnPropertyDescriptor,Wi=(e,t,r,o)=>{for(var n=o>1?void 0:o?h0(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&&p0(t,r,n),n};exports.PontModal=class extends f{constructor(){super(...arguments),this._cachedChildren=[],this.isOpen=!1,this.showClose=!0,this.layoutClass="",this._handleClose=t=>{t&&t.stopPropagation(),this.dispatchEvent(new CustomEvent("close",{bubbles:!1,composed:!0}))},this._handleOutsideClick=t=>{t.target===t.currentTarget&&this._handleClose(t)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){return this.isOpen?l`
|
|
3636
3642
|
<div class="pont-modal-overlay"></div>
|
|
3637
3643
|
<div class="pont-modal-container" @click=${this._handleOutsideClick}>
|
|
3638
3644
|
<div part="modal-content" class="pont-modal-layout">
|
|
@@ -3651,7 +3657,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3651
3657
|
${this._cachedChildren}
|
|
3652
3658
|
</div>
|
|
3653
3659
|
</div>
|
|
3654
|
-
`:h}};Wi([a({type:Boolean})],exports.PontModal.prototype,"isOpen",2);Wi([a({type:Boolean})],exports.PontModal.prototype,"showClose",2);Wi([a({type:String})],exports.PontModal.prototype,"layoutClass",2);exports.PontModal=Wi([p("pont-modal")],exports.PontModal);var
|
|
3660
|
+
`:h}};Wi([a({type:Boolean})],exports.PontModal.prototype,"isOpen",2);Wi([a({type:Boolean})],exports.PontModal.prototype,"showClose",2);Wi([a({type:String})],exports.PontModal.prototype,"layoutClass",2);exports.PontModal=Wi([p("pont-modal")],exports.PontModal);var u0=Object.defineProperty,xl=(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&&u0(t,r,n),n};const Tl=class Tl extends f{constructor(){super(...arguments),this.totalPages=1,this.currentPage=1,this.hideGoTo=!1}createRenderRoot(){return this}get visiblePages(){if(this.totalPages<=0)return[];if(this.totalPages<=3)return Array.from({length:this.totalPages},(r,o)=>o+1);let t=Math.max(1,this.currentPage-1);return t+2>this.totalPages&&(t=this.totalPages-2),[t,t+1,t+2]}goTo(t){this.totalPages<=0||t===this.currentPage||t<1||t>this.totalPages||this.dispatchEvent(new CustomEvent("page-change",{detail:{page:t},bubbles:!0,composed:!0}))}render(){const t=this.totalPages,r=this.currentPage,o=t>0,n=!o||r<=1,i=!o||r>=t,s=o?this.visiblePages:[];return l`
|
|
3655
3661
|
<nav
|
|
3656
3662
|
class="pont-flex pont-flex-wrap pont-items-center pont-justify-center pont-gap-1"
|
|
3657
3663
|
aria-label="Pagination"
|
|
@@ -3743,7 +3749,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3743
3749
|
:host {
|
|
3744
3750
|
display: block;
|
|
3745
3751
|
}
|
|
3746
|
-
`;let Wr=Tl;xl([a({type:Number})],Wr.prototype,"totalPages");xl([a({type:Number})],Wr.prototype,"currentPage");xl([a({type:Boolean})],Wr.prototype,"hideGoTo");customElements.define("pont-paginator",Wr);var
|
|
3752
|
+
`;let Wr=Tl;xl([a({type:Number})],Wr.prototype,"totalPages");xl([a({type:Number})],Wr.prototype,"currentPage");xl([a({type:Boolean})],Wr.prototype,"hideGoTo");customElements.define("pont-paginator",Wr);var m0=Object.defineProperty,g0=Object.getOwnPropertyDescriptor,Le=(e,t,r,o)=>{for(var n=o>1?void 0:o?g0(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&&m0(t,r,n),n};const f0=/^[^\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 f0.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`
|
|
3747
3753
|
<div class="pont-space-y-2 ${this.className}">
|
|
3748
3754
|
${this.label?l`<pont-label part="label">${this.label}</pont-label>`:h}
|
|
3749
3755
|
|
|
@@ -3796,7 +3802,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3796
3802
|
</pont-typography-muted>`}
|
|
3797
3803
|
`}
|
|
3798
3804
|
</div>
|
|
3799
|
-
`}};Le([a({type:String})],exports.MultiEmailInput.prototype,"label",2);Le([a({type:Array})],exports.MultiEmailInput.prototype,"value",2);Le([a({attribute:!1})],exports.MultiEmailInput.prototype,"onChange",2);Le([a({type:String})],exports.MultiEmailInput.prototype,"placeholder",2);Le([a({type:Boolean})],exports.MultiEmailInput.prototype,"disabled",2);Le([a({type:Number})],exports.MultiEmailInput.prototype,"maxEmails",2);Le([a({type:String})],exports.MultiEmailInput.prototype,"className",2);Le([g()],exports.MultiEmailInput.prototype,"inputValue",2);Le([g()],exports.MultiEmailInput.prototype,"error",2);exports.MultiEmailInput=Le([p("pont-multi-email-input")],exports.MultiEmailInput);var
|
|
3805
|
+
`}};Le([a({type:String})],exports.MultiEmailInput.prototype,"label",2);Le([a({type:Array})],exports.MultiEmailInput.prototype,"value",2);Le([a({attribute:!1})],exports.MultiEmailInput.prototype,"onChange",2);Le([a({type:String})],exports.MultiEmailInput.prototype,"placeholder",2);Le([a({type:Boolean})],exports.MultiEmailInput.prototype,"disabled",2);Le([a({type:Number})],exports.MultiEmailInput.prototype,"maxEmails",2);Le([a({type:String})],exports.MultiEmailInput.prototype,"className",2);Le([g()],exports.MultiEmailInput.prototype,"inputValue",2);Le([g()],exports.MultiEmailInput.prototype,"error",2);exports.MultiEmailInput=Le([p("pont-multi-email-input")],exports.MultiEmailInput);var v0=Object.defineProperty,b0=Object.getOwnPropertyDescriptor,Qt=(e,t,r,o)=>{for(var n=o>1?void 0:o?b0(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&&v0(t,r,n),n};exports.BadgeSelector=class extends f{constructor(){super(...arguments),this.options=[],this.value=[],this.placeholder="Search roles...",this.label="",this.disabled=!1,this.className="",this.inputValue="",this.isOpen=!1,this.highlightedIndex=-1,this.blurTimeout=null,this.dropdownRef=null}createRenderRoot(){return this}get filteredOptions(){if(!this.inputValue.trim())return this.options;const t=this.inputValue.toLowerCase().trim();return this.options.filter(r=>r.label.toLowerCase().includes(t)||r.value.toLowerCase().includes(t))}get maxReached(){return this.maxSelections!=null&&this.value.length>=this.maxSelections}isOptionDisabled(t){return this.disabled||t.disabled||this.maxReached&&!this.value.includes(t.value)}handleInput(t){this.inputValue=t.target.value,this.isOpen=!0,this.highlightedIndex=-1}handleInputClick(){var t;this.disabled||this.maxReached||this.options.length===0||this.isOpen||(this.isOpen=!0,this.highlightedIndex=-1,this.clearBlurTimeout(),(t=this.querySelector("input"))==null||t.focus())}handleKeyDown(t){if(!this.isOpen){if(t.key==="ArrowDown"||t.key==="ArrowUp"){this.isOpen=!0,this.highlightedIndex=-1,t.preventDefault();return}t.key==="Backspace"&&!this.inputValue&&this.value.length>0&&(this.removeLast(),t.preventDefault());return}const r=this.filteredOptions;switch(t.key){case"ArrowDown":t.preventDefault(),this.highlightedIndex=Math.min(this.highlightedIndex+1,r.length-1);break;case"ArrowUp":t.preventDefault(),this.highlightedIndex=Math.max(this.highlightedIndex-1,-1);break;case"Enter":t.preventDefault(),this.highlightedIndex>=0&&this.highlightedIndex<r.length&&this.selectOption(r[this.highlightedIndex]);break;case"Escape":this.isOpen=!1,this.highlightedIndex=-1;break;case"Backspace":!this.inputValue&&this.value.length>0&&(t.preventDefault(),this.removeLast());break}}selectOption(t){if(!this.isOptionDisabled(t)){if(!this.value.includes(t.value)){const r=[...this.value,t.value];this.value=r,this.notifyChange(r)}this.inputValue="",this.isOpen=!1,this.highlightedIndex=-1}}removeLast(){if(this.value.length===0)return;const t=this.value.slice(0,-1);this.value=t,this.notifyChange(t)}removeBadge(t){const r=this.value.filter(o=>o!==t);this.value=r,this.notifyChange(r)}handleFocus(){!this.disabled&&this.options.length>0&&!this.maxReached&&(this.isOpen=!0,this.highlightedIndex=-1),this.clearBlurTimeout()}handleBlur(){this.blurTimeout=window.setTimeout(()=>{this.isOpen=!1,this.highlightedIndex=-1},200)}handleOptionMouseDown(t){this.clearBlurTimeout(),this.selectOption(t)}clearBlurTimeout(){this.blurTimeout&&(clearTimeout(this.blurTimeout),this.blurTimeout=null)}notifyChange(t){var r;(r=this.onChange)==null||r.call(this,t),this.dispatchEvent(new CustomEvent("badge-selector-change",{detail:{values:t},bubbles:!0,composed:!0}))}render(){const t=this.disabled||this.maxReached;return l`
|
|
3800
3806
|
<div class="pont-space-y-2 ${this.className}">
|
|
3801
3807
|
${this.label?l`<pont-label part="label">${this.label}</pont-label>`:h}
|
|
3802
3808
|
|
|
@@ -3866,7 +3872,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3866
3872
|
</div>
|
|
3867
3873
|
`:h}
|
|
3868
3874
|
</div>
|
|
3869
|
-
`}};Qt([a({type:Array})],exports.BadgeSelector.prototype,"options",2);Qt([a({type:Array})],exports.BadgeSelector.prototype,"value",2);Qt([a({attribute:!1})],exports.BadgeSelector.prototype,"onChange",2);Qt([a({type:String})],exports.BadgeSelector.prototype,"placeholder",2);Qt([a({type:String})],exports.BadgeSelector.prototype,"label",2);Qt([a({type:Boolean})],exports.BadgeSelector.prototype,"disabled",2);Qt([a({type:Number})],exports.BadgeSelector.prototype,"maxSelections",2);Qt([a({type:String})],exports.BadgeSelector.prototype,"className",2);Qt([g()],exports.BadgeSelector.prototype,"inputValue",2);Qt([g()],exports.BadgeSelector.prototype,"isOpen",2);Qt([g()],exports.BadgeSelector.prototype,"highlightedIndex",2);exports.BadgeSelector=Qt([p("pont-badge-selector")],exports.BadgeSelector);var
|
|
3875
|
+
`}};Qt([a({type:Array})],exports.BadgeSelector.prototype,"options",2);Qt([a({type:Array})],exports.BadgeSelector.prototype,"value",2);Qt([a({attribute:!1})],exports.BadgeSelector.prototype,"onChange",2);Qt([a({type:String})],exports.BadgeSelector.prototype,"placeholder",2);Qt([a({type:String})],exports.BadgeSelector.prototype,"label",2);Qt([a({type:Boolean})],exports.BadgeSelector.prototype,"disabled",2);Qt([a({type:Number})],exports.BadgeSelector.prototype,"maxSelections",2);Qt([a({type:String})],exports.BadgeSelector.prototype,"className",2);Qt([g()],exports.BadgeSelector.prototype,"inputValue",2);Qt([g()],exports.BadgeSelector.prototype,"isOpen",2);Qt([g()],exports.BadgeSelector.prototype,"highlightedIndex",2);exports.BadgeSelector=Qt([p("pont-badge-selector")],exports.BadgeSelector);var y0=Object.defineProperty,_0=Object.getOwnPropertyDescriptor,nn=(e,t,r,o)=>{for(var n=o>1?void 0:o?_0(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&&y0(t,r,n),n};exports.PontSideDrawer=class extends f{constructor(){super(),this.inplace=!1,this.side="left",this.open=!1,this.closeOnOverlay=!0,this._cachedChildren=[],this._mounted=!1,this._handleOpen=this._handleOpen.bind(this),this._handleClose=this._handleClose.bind(this)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t))),window.addEventListener("open-sidedrawer",this._handleOpen),window.addEventListener("close-sidedrawer",this._handleClose),document.addEventListener("open-sidedrawer",this._handleOpen),document.addEventListener("close-sidedrawer",this._handleClose),this._mounted=!0}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("open-sidedrawer",this._handleOpen),window.removeEventListener("close-sidedrawer",this._handleClose),document.removeEventListener("open-sidedrawer",this._handleOpen),document.removeEventListener("close-sidedrawer",this._handleClose),this._mounted=!1}_handleOpen(t){const r=(t==null?void 0:t.detail)||{},o=r.drawer_id??r.id,n=this.drawer_id??this.id;n&&(o&&o!==n||(r.side&&(r.side==="left"||r.side==="right")&&(this.side=r.side),this.open=!0,this.dispatchEvent(new CustomEvent("sidedrawer-opened",{bubbles:!0,detail:{id:n}}))))}_handleClose(t){const r=(t==null?void 0:t.detail)||{},o=r.drawer_id??r.id,n=this.drawer_id??this.id;n&&(o&&o!==n||(this.open=!1,this.dispatchEvent(new CustomEvent("sidedrawer-closed",{bubbles:!0,detail:{id:n}}))))}_onOverlayClick(){this.closeOnOverlay&&this._handleClose()}render(){const t=this.side==="right"?"pont-sidedrawer-right":"pont-sidedrawer-left";return l`
|
|
3870
3876
|
<div
|
|
3871
3877
|
part="overlay"
|
|
3872
3878
|
class="pont-sidedrawer-overlay ${this.inplace?"inplace":""} ${this.open?"open":"closed"}"
|
|
@@ -3882,7 +3888,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3882
3888
|
${this._cachedChildren}
|
|
3883
3889
|
</div>
|
|
3884
3890
|
</aside>
|
|
3885
|
-
`}};nn([a({type:String})],exports.PontSideDrawer.prototype,"drawer_id",2);nn([a({type:Boolean})],exports.PontSideDrawer.prototype,"inplace",2);nn([a({type:String})],exports.PontSideDrawer.prototype,"side",2);nn([a({type:Boolean,reflect:!0})],exports.PontSideDrawer.prototype,"open",2);nn([a({type:Boolean})],exports.PontSideDrawer.prototype,"closeOnOverlay",2);nn([g()],exports.PontSideDrawer.prototype,"_mounted",2);exports.PontSideDrawer=nn([p("pont-sidedrawer")],exports.PontSideDrawer);var
|
|
3891
|
+
`}};nn([a({type:String})],exports.PontSideDrawer.prototype,"drawer_id",2);nn([a({type:Boolean})],exports.PontSideDrawer.prototype,"inplace",2);nn([a({type:String})],exports.PontSideDrawer.prototype,"side",2);nn([a({type:Boolean,reflect:!0})],exports.PontSideDrawer.prototype,"open",2);nn([a({type:Boolean})],exports.PontSideDrawer.prototype,"closeOnOverlay",2);nn([g()],exports.PontSideDrawer.prototype,"_mounted",2);exports.PontSideDrawer=nn([p("pont-sidedrawer")],exports.PontSideDrawer);var w0=Object.defineProperty,$0=Object.getOwnPropertyDescriptor,Mo=(e,t,r,o)=>{for(var n=o>1?void 0:o?$0(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&&w0(t,r,n),n};exports.PontMultiSelectFilter=class extends f{constructor(){super(...arguments),this.options=[],this.selected=[],this.placeholder="Filter…",this.label="Filter"}_handleToggle(t){const r=this.selected.includes(t)?this.selected.filter(o=>o!==t):[...this.selected,t];this.dispatchEvent(new CustomEvent("change",{detail:{selected:r},bubbles:!0,composed:!0}))}render(){return this.options.filter(r=>this.selected.includes(r.value)).map(r=>r.label).join(", ")||this.placeholder,l`
|
|
3886
3892
|
<pont-dropdown-menu>
|
|
3887
3893
|
<pont-dropdown-menu-trigger as-child>
|
|
3888
3894
|
<pont-button variant="outline" size="default">
|
|
@@ -3914,7 +3920,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
3914
3920
|
</pont-dropdown-menu-group>
|
|
3915
3921
|
</pont-dropdown-menu-content>
|
|
3916
3922
|
</pont-dropdown-menu>
|
|
3917
|
-
`}createRenderRoot(){return this}};Mo([a({type:Array})],exports.PontMultiSelectFilter.prototype,"options",2);Mo([a({type:Array})],exports.PontMultiSelectFilter.prototype,"selected",2);Mo([a({type:String})],exports.PontMultiSelectFilter.prototype,"placeholder",2);Mo([a({type:String})],exports.PontMultiSelectFilter.prototype,"label",2);exports.PontMultiSelectFilter=Mo([p("pont-multi-select-filter")],exports.PontMultiSelectFilter);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||{}),nt=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(nt||{});const Yi="pont-account-settings-card-header-container",_o="pont-account-settings-card-title",Pe="pont-account-settings-input-label pont-shrink-0 md:pont-block",Qi="pont-account-settings-card-container",wo=()=>l`<pont-typography-muted>Not Added</pont-typography-muted>`;let ka=null;function
|
|
3923
|
+
`}createRenderRoot(){return this}};Mo([a({type:Array})],exports.PontMultiSelectFilter.prototype,"options",2);Mo([a({type:Array})],exports.PontMultiSelectFilter.prototype,"selected",2);Mo([a({type:String})],exports.PontMultiSelectFilter.prototype,"placeholder",2);Mo([a({type:String})],exports.PontMultiSelectFilter.prototype,"label",2);exports.PontMultiSelectFilter=Mo([p("pont-multi-select-filter")],exports.PontMultiSelectFilter);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||{}),nt=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(nt||{});const Yi="pont-account-settings-card-header-container",_o="pont-account-settings-card-title",Pe="pont-account-settings-input-label pont-shrink-0 md:pont-block",Qi="pont-account-settings-card-container",wo=()=>l`<pont-typography-muted>Not Added</pont-typography-muted>`;let ka=null;function P0(e){ka=e}function C0(){return ka||console.warn("SDK environment not initialized. Call initSdk({...}) before using <pont-provider>."),ka}class E0 extends Error{constructor(t,r,o){super(t),this.name="ApiError",this.status=r,this.data=o}}const S0="/mgmt/v1";async function ce(e,t={}){var v,b;const{token:r,headers:o,...n}=t,i=C0(),s=((v=i==null?void 0:i.apiBaseUrl)==null?void 0:v.replace(/\/+$/,""))??"",d={"Content-Type":"application/json",...i==null?void 0:i.headers,...r?{Authorization:`Bearer ${r}`}:{}};o&&(o instanceof Headers?o.forEach((w,_)=>{d[_]=w}):Array.isArray(o)?o.forEach(([w,_])=>{d[w]=_}):Object.assign(d,o));const c=await fetch(`${s}${S0}${e}`,{...n,headers:d});let u=null;try{u=await c.json()}catch{}if(!c.ok){const w=(b=u==null?void 0:u.error)==null?void 0:b.message;throw new E0(w||c.statusText||"Something went wrong",c.status,u)}return u}const x0=100,O0=5;async function R0(){var t,r;const e=[];for(let o=1;o<=O0;o++){const n=await ce(`/me/organizations?page=${o}&limit=${x0}`,{method:"GET",token:le()});if(e.push(...n.data??[]),!((t=n.data)!=null&&t.length)||o>=(((r=n.pagination)==null?void 0:r.total_pages)??1))break}return e}async function I0(){return ce("/me",{method:"GET",token:le()})}async function Zi(e){return ce("/me",{method:"PATCH",body:JSON.stringify(e),token:le()})}async function A0(e,t){var i,s;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.user_ids)!=null&&i.length&&t.user_ids.forEach(d=>r.append("user_ids",d)),(s=t.emails)!=null&&s.length&&t.emails.forEach(d=>r.append("emails",d)),t.roles&&r.append("roles",t.roles));const o=r.toString(),n=`/organizations/${encodeURIComponent(e)}/members${o?`?${o}`:""}`;return ce(n,{method:"GET",token:le()})}async function T0(e,t,r){const o=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}/roles`;await ce(o,{method:"PUT",token:le(),headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}async function D0(e,t){const r=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`;await ce(r,{method:"DELETE",token:le(),headers:{"Content-Type":"application/json"}})}async function L0(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations`;return ce(r,{method:"POST",token:le(),headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function F0(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/resend`;return ce(r,{method:"POST",token:le(),headers:{"Content-Type":"application/json"}})}async function k0(e,t,r){const o=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}`;await ce(o,{method:"DELETE",token:le()})}async function N0(e,t){var i;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.invited_by&&r.append("invited_by",t.invited_by),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.invitee_emails)!=null&&i.length&&t.invitee_emails.forEach(s=>r.append("invitee_emails",s)),t.roles&&r.append("roles",t.roles));const o=r.toString(),n=`/organizations/${encodeURIComponent(e)}/invitations${o?`?${o}`:""}`;return ce(n,{method:"GET",token:le()})}const Ai="org";async function Ol(e){const t=new URLSearchParams;e&&(e.type&&t.append("type",e.type),e.name&&t.append("name",e.name),e.resource_type&&t.append("resource_type",e.resource_type),e.resource_id&&t.append("resource_id",e.resource_id),e.include_instance_scoped!==void 0&&t.append("include_instance_scoped",e.include_instance_scoped.toString()),e.permission&&t.append("permission",e.permission),e.page!==void 0&&t.append("page",e.page.toString()),e.limit!==void 0&&t.append("limit",e.limit.toString()),e.order&&t.append("order",e.order));const r=t.toString(),o=`/roles${r?`?${r}`:""}`;return ce(o,{method:"GET",token:le()})}var M0=Object.defineProperty,B0=Object.getOwnPropertyDescriptor,xt=(e,t,r,o)=>{for(var n=o>1?void 0:o?B0(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&&M0(t,r,n),n};exports.PontAccountInfo=class extends f{constructor(){super(...arguments),this.showAvatarMenu=!1,this.showIcons=!0,this.content=null,this.layout=nt.ROW,this.isUploadingImage=!1,this.isEditingAvatarMobile=!1,this.isMobile=!1,this._isAvatarEditorOpen=!1,this._popoverObserver=null,this._intentionalClose=!1,this.avatarDraft="",this._committedAvatar="",this._onMobileChange=t=>{this.isMobile=t.matches,t.matches||(this.isEditingAvatarMobile=!1)},this.handleAvatarInput=t=>{this.avatarDraft=t.target.value,this.account={...this.account,avatar:this.avatarDraft}},this.handleSaveAvatar=async()=>{if(!this.isUploadingImage){this.isUploadingImage=!0;try{const t=await Zi({picture:this.avatarDraft});this.account={...this.account,avatar:t.picture??""},this._committedAvatar=this.account.avatar,this.avatarDraft=this.account.avatar,this._isAvatarEditorOpen=!1,this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed")}catch(t){this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1,ji(zi(t,"Failed to update your photo.")),this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed")}finally{this.isUploadingImage=!1}}}}firstUpdated(){this._setupPopoverObserver()}_setupPopoverObserver(){const t=this.querySelector("pont-popover-content");if(!t)return;const r=new MutationObserver(n=>{for(const i of n)if(i.type==="childList"){const s=t.firstElementChild;if(s&&s.hasAttribute("data-state")){this._attachAttributeObserver(s),r.disconnect();break}}});r.observe(t,{childList:!0,subtree:!1});const o=t.firstElementChild;o&&o.hasAttribute("data-state")&&(this._attachAttributeObserver(o),r.disconnect())}_attachAttributeObserver(t){this._popoverObserver&&this._popoverObserver.disconnect(),this._popoverObserver=new MutationObserver(r=>{for(const o of r)if(o.type==="attributes"&&o.attributeName==="data-state"){const n=t.getAttribute("data-state");n==="open"?this.openAvatarEditor():n==="closed"&&(this._intentionalClose?this._intentionalClose=!1:(this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1))}}),this._popoverObserver.observe(t,{attributes:!0})}updated(t){t.has("account")&&this.account.avatar&&!this._isAvatarEditorOpen&&(this.avatarDraft=this.account.avatar,this._committedAvatar=this.account.avatar)}connectedCallback(){super.connectedCallback(),this._mobileQuery=window.matchMedia("(max-width: 767px)"),this.isMobile=this._mobileQuery.matches,this._mobileQuery.addEventListener("change",this._onMobileChange)}disconnectedCallback(){super.disconnectedCallback(),this._mobileQuery.removeEventListener("change",this._onMobileChange),this._popoverObserver&&(this._popoverObserver.disconnect(),this._popoverObserver=null)}openAvatarEditor(){this._isAvatarEditorOpen=!0,this._committedAvatar=this.account.avatar,this.avatarDraft=this.account.avatar}resetAvatarDraft(){this.avatarDraft=this.account.avatar}handleCancelAvatar(){this.isUploadingImage||(this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1,this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed"))}renderRow(t,r){const o=this.layout===nt.COLUMN;return l`
|
|
3918
3924
|
<div
|
|
3919
3925
|
class=${zt("pont-account-settings-display-row",o?"":"pont-account-settings-account-grid")}
|
|
3920
3926
|
>
|
|
@@ -4045,7 +4051,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4045
4051
|
<pont-card-content> ${this.renderAccountDetails()} </pont-card-content>
|
|
4046
4052
|
</div>
|
|
4047
4053
|
</pont-card>
|
|
4048
|
-
`}createRenderRoot(){return this}};xt([a({type:Object})],exports.PontAccountInfo.prototype,"account",2);xt([a({type:Boolean})],exports.PontAccountInfo.prototype,"showAvatarMenu",2);xt([a({attribute:!1})],exports.PontAccountInfo.prototype,"toggleAvatarMenu",2);xt([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarChange",2);xt([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarRemove",2);xt([a({type:Boolean})],exports.PontAccountInfo.prototype,"showIcons",2);xt([a({type:Object})],exports.PontAccountInfo.prototype,"content",2);xt([a({type:String})],exports.PontAccountInfo.prototype,"layout",2);xt([g()],exports.PontAccountInfo.prototype,"isUploadingImage",2);xt([g()],exports.PontAccountInfo.prototype,"isEditingAvatarMobile",2);xt([g()],exports.PontAccountInfo.prototype,"isMobile",2);xt([g()],exports.PontAccountInfo.prototype,"_isAvatarEditorOpen",2);xt([g()],exports.PontAccountInfo.prototype,"avatarDraft",2);xt([yt({context:ko,subscribe:!0})],exports.PontAccountInfo.prototype,"userContextValue",2);exports.PontAccountInfo=xt([p("pont-account-info")],exports.PontAccountInfo);var
|
|
4054
|
+
`}createRenderRoot(){return this}};xt([a({type:Object})],exports.PontAccountInfo.prototype,"account",2);xt([a({type:Boolean})],exports.PontAccountInfo.prototype,"showAvatarMenu",2);xt([a({attribute:!1})],exports.PontAccountInfo.prototype,"toggleAvatarMenu",2);xt([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarChange",2);xt([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarRemove",2);xt([a({type:Boolean})],exports.PontAccountInfo.prototype,"showIcons",2);xt([a({type:Object})],exports.PontAccountInfo.prototype,"content",2);xt([a({type:String})],exports.PontAccountInfo.prototype,"layout",2);xt([g()],exports.PontAccountInfo.prototype,"isUploadingImage",2);xt([g()],exports.PontAccountInfo.prototype,"isEditingAvatarMobile",2);xt([g()],exports.PontAccountInfo.prototype,"isMobile",2);xt([g()],exports.PontAccountInfo.prototype,"_isAvatarEditorOpen",2);xt([g()],exports.PontAccountInfo.prototype,"avatarDraft",2);xt([yt({context:ko,subscribe:!0})],exports.PontAccountInfo.prototype,"userContextValue",2);exports.PontAccountInfo=xt([p("pont-account-info")],exports.PontAccountInfo);var U0=Object.defineProperty,j0=Object.getOwnPropertyDescriptor,Fe=(e,t,r,o)=>{for(var n=o>1?void 0:o?j0(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&&U0(t,r,n),n};const up=100;exports.PontLocationInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=nt.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData={location:"",zoneInfo:""},this.errors={},this.handleSave=async()=>{var t,r;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const o=await Zi({address:{...(t=this.userContextValue.user)==null?void 0:t.address,locality:this.formData.location},zoneinfo:this.formData.zoneInfo});this.locationInfo={location:((r=o.address)==null?void 0:r.locality)??"",zoneInfo:o.zoneinfo??""},this.isEditing=!1}catch(o){console.error("Failed to update location info",o),ji(zi(o,"Failed to update location information. Please try again."))}finally{this.isSaving=!1}}}}createRenderRoot(){return this}handleEdit(){this.isSaving||(this.formData={...this.locationInfo},this.errors={},this.isEditing=!0)}handleCancel(){this.isSaving||(this.isEditing=!1,this.errors={})}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={},{location:r,zoneInfo:o}=this.formData;return r.length>up&&(t.location=`Location cannot be longer than ${up} characters.`),o&&!this.timeZones.includes(o)&&(t.zoneInfo="Choose a timezone from the list."),this.errors=t,Object.keys(t).length===0}fieldId(t){return`pont-location-${t}`}get timeZones(){var r;try{const o=(r=Intl.supportedValuesOf)==null?void 0:r.call(Intl,"timeZone");if(o!=null&&o.length)return o}catch{}const t=Intl.DateTimeFormat().resolvedOptions().timeZone;return[...new Set([t,"UTC"].filter(Boolean))]}renderControl(t){const r=!!this.errors[t];return t==="zoneInfo"?l`
|
|
4049
4055
|
<pont-select
|
|
4050
4056
|
.value=${this.formData.zoneInfo}
|
|
4051
4057
|
?disabled=${this.isSaving}
|
|
@@ -4195,7 +4201,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4195
4201
|
${this.isEditing?this.renderFooter():null}
|
|
4196
4202
|
</div>
|
|
4197
4203
|
</pont-card>
|
|
4198
|
-
`}};Fe([a({type:Object})],exports.PontLocationInfo.prototype,"locationInfo",2);Fe([a({type:Boolean})],exports.PontLocationInfo.prototype,"showIcons",2);Fe([a({type:String})],exports.PontLocationInfo.prototype,"layout",2);Fe([a({type:Object})],exports.PontLocationInfo.prototype,"content",2);Fe([yt({context:ko,subscribe:!0})],exports.PontLocationInfo.prototype,"userContextValue",2);Fe([g()],exports.PontLocationInfo.prototype,"isEditing",2);Fe([g()],exports.PontLocationInfo.prototype,"isSaving",2);Fe([g()],exports.PontLocationInfo.prototype,"formData",2);Fe([g()],exports.PontLocationInfo.prototype,"errors",2);exports.PontLocationInfo=Fe([p("pont-location-info")],exports.PontLocationInfo);var
|
|
4204
|
+
`}};Fe([a({type:Object})],exports.PontLocationInfo.prototype,"locationInfo",2);Fe([a({type:Boolean})],exports.PontLocationInfo.prototype,"showIcons",2);Fe([a({type:String})],exports.PontLocationInfo.prototype,"layout",2);Fe([a({type:Object})],exports.PontLocationInfo.prototype,"content",2);Fe([yt({context:ko,subscribe:!0})],exports.PontLocationInfo.prototype,"userContextValue",2);Fe([g()],exports.PontLocationInfo.prototype,"isEditing",2);Fe([g()],exports.PontLocationInfo.prototype,"isSaving",2);Fe([g()],exports.PontLocationInfo.prototype,"formData",2);Fe([g()],exports.PontLocationInfo.prototype,"errors",2);exports.PontLocationInfo=Fe([p("pont-location-info")],exports.PontLocationInfo);var q0=Object.defineProperty,z0=Object.getOwnPropertyDescriptor,ke=(e,t,r,o)=>{for(var n=o>1?void 0:o?z0(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&&q0(t,r,n),n};const mp=100,gp=500;exports.PontPersonalInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=nt.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData=this.personal,this.errors={},this.handleSave=async()=>{if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const t=await Zi({username:this.formData.username,given_name:this.formData.first,middle_name:this.formData.middle,family_name:this.formData.last,nickname:this.formData.nickname,gender:this.formData.gender,profile:this.formData.bio});this.personal={username:t.username??"",first:t.given_name??"",middle:t.middle_name??"",last:t.family_name??"",nickname:t.nickname??"",gender:t.gender??"",bio:t.profile??""},this.isEditing=!1}catch(t){console.error("Failed to update personal info",t),ji(zi(t,"Failed to update personal information. Please try again."))}finally{this.isSaving=!1}}}}handleEdit(){this.isSaving||(this.formData={...this.personal},this.errors={},this.isEditing=!0)}handleCancel(){this.isEditing=!1,this.errors={}}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={},{username:r,first:o,middle:n,last:i,nickname:s,bio:d}=this.formData;return r.trim()&&!/^[a-zA-Z0-9._-]{3,30}$/.test(r.trim())&&(t.username="Use 3-30 characters: letters, numbers, dots, underscores or hyphens."),[["first",o,"First name"],["middle",n,"Middle name"],["last",i,"Last name"],["nickname",s,"Nickname"]].forEach(([c,u,v])=>{u.length>mp&&(t[c]=`${v} cannot be longer than ${mp} characters.`)}),d.length>gp&&(t.bio=`Bio cannot be longer than ${gp} characters.`),this.errors=t,Object.keys(t).length===0}createRenderRoot(){return this}fieldId(t){return`pont-personal-${t}`}renderControl(t){const r=!!this.errors[t];return t==="gender"?l`
|
|
4199
4205
|
<pont-select
|
|
4200
4206
|
.value=${this.formData.gender}
|
|
4201
4207
|
?disabled=${this.isSaving}
|
|
@@ -4354,7 +4360,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4354
4360
|
${this.isEditing?this.renderFooter():null}
|
|
4355
4361
|
</div>
|
|
4356
4362
|
</pont-card>
|
|
4357
|
-
`}};ke([a({type:Object})],exports.PontPersonalInfo.prototype,"personal",2);ke([a({type:Boolean})],exports.PontPersonalInfo.prototype,"showIcons",2);ke([a({type:String})],exports.PontPersonalInfo.prototype,"layout",2);ke([a({type:Object})],exports.PontPersonalInfo.prototype,"content",2);ke([yt({context:ko,subscribe:!0})],exports.PontPersonalInfo.prototype,"userContextValue",2);ke([g()],exports.PontPersonalInfo.prototype,"isEditing",2);ke([g()],exports.PontPersonalInfo.prototype,"isSaving",2);ke([g()],exports.PontPersonalInfo.prototype,"formData",2);ke([g()],exports.PontPersonalInfo.prototype,"errors",2);exports.PontPersonalInfo=ke([p("pont-personal-info")],exports.PontPersonalInfo);var
|
|
4363
|
+
`}};ke([a({type:Object})],exports.PontPersonalInfo.prototype,"personal",2);ke([a({type:Boolean})],exports.PontPersonalInfo.prototype,"showIcons",2);ke([a({type:String})],exports.PontPersonalInfo.prototype,"layout",2);ke([a({type:Object})],exports.PontPersonalInfo.prototype,"content",2);ke([yt({context:ko,subscribe:!0})],exports.PontPersonalInfo.prototype,"userContextValue",2);ke([g()],exports.PontPersonalInfo.prototype,"isEditing",2);ke([g()],exports.PontPersonalInfo.prototype,"isSaving",2);ke([g()],exports.PontPersonalInfo.prototype,"formData",2);ke([g()],exports.PontPersonalInfo.prototype,"errors",2);exports.PontPersonalInfo=ke([p("pont-personal-info")],exports.PontPersonalInfo);var V0=Object.defineProperty,H0=Object.getOwnPropertyDescriptor,Ne=(e,t,r,o)=>{for(var n=o>1?void 0:o?H0(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&&V0(t,r,n),n};exports.PontUrlsInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=nt.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData={website:""},this.errors={},this.handleSave=async()=>{if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const t=await Zi({website:this.formData.website});this.URLsInfo={website:t.website??""},this.isEditing=!1}catch(t){console.error("Failed to update URLs info",t),ji(zi(t,"Failed to update website. Please try again."))}finally{this.isSaving=!1}}}}createRenderRoot(){return this}handleEdit(){this.isSaving||(this.formData={...this.URLsInfo},this.errors={},this.isEditing=!0)}handleCancel(){this.isSaving||(this.isEditing=!1,this.errors={})}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={},r=this.formData.website.trim();if(r){let o=null;try{o=new URL(r)}catch{o=null}o?o.protocol!=="http:"&&o.protocol!=="https:"&&(t.website="Only http:// and https:// addresses are allowed."):t.website="Enter a full URL, including https://"}return this.errors=t,Object.keys(t).length===0}fieldId(t){return`pont-urls-${t}`}renderField(t,r){const o=l`
|
|
4358
4364
|
<pont-field ?invalid=${!!this.errors[r]}>
|
|
4359
4365
|
<pont-input
|
|
4360
4366
|
id=${this.fieldId(r)}
|
|
@@ -4472,7 +4478,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4472
4478
|
@click=${this.handleLinkClick}
|
|
4473
4479
|
class="pont-cursor-pointer pont-account-settings-link-icon"
|
|
4474
4480
|
>
|
|
4475
|
-
${
|
|
4481
|
+
${QP()}
|
|
4476
4482
|
</div>`:h}
|
|
4477
4483
|
</div>
|
|
4478
4484
|
</div>
|
|
@@ -4484,7 +4490,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4484
4490
|
${this.isEditing?this.renderFooter():null}
|
|
4485
4491
|
</div>
|
|
4486
4492
|
</pont-card>
|
|
4487
|
-
`}};Ne([a({type:Object})],exports.PontUrlsInfo.prototype,"URLsInfo",2);Ne([a({type:Boolean})],exports.PontUrlsInfo.prototype,"showIcons",2);Ne([a({type:String})],exports.PontUrlsInfo.prototype,"layout",2);Ne([a({type:Object})],exports.PontUrlsInfo.prototype,"content",2);Ne([yt({context:ko,subscribe:!0})],exports.PontUrlsInfo.prototype,"userContextValue",2);Ne([g()],exports.PontUrlsInfo.prototype,"isEditing",2);Ne([g()],exports.PontUrlsInfo.prototype,"isSaving",2);Ne([g()],exports.PontUrlsInfo.prototype,"formData",2);Ne([g()],exports.PontUrlsInfo.prototype,"errors",2);exports.PontUrlsInfo=Ne([p("pont-urls-info")],exports.PontUrlsInfo);var
|
|
4493
|
+
`}};Ne([a({type:Object})],exports.PontUrlsInfo.prototype,"URLsInfo",2);Ne([a({type:Boolean})],exports.PontUrlsInfo.prototype,"showIcons",2);Ne([a({type:String})],exports.PontUrlsInfo.prototype,"layout",2);Ne([a({type:Object})],exports.PontUrlsInfo.prototype,"content",2);Ne([yt({context:ko,subscribe:!0})],exports.PontUrlsInfo.prototype,"userContextValue",2);Ne([g()],exports.PontUrlsInfo.prototype,"isEditing",2);Ne([g()],exports.PontUrlsInfo.prototype,"isSaving",2);Ne([g()],exports.PontUrlsInfo.prototype,"formData",2);Ne([g()],exports.PontUrlsInfo.prototype,"errors",2);exports.PontUrlsInfo=Ne([p("pont-urls-info")],exports.PontUrlsInfo);var G0=Object.defineProperty,K0=Object.getOwnPropertyDescriptor,Ot=(e,t,r,o)=>{for(var n=o>1?void 0:o?K0(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&&G0(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=nt.ROW,this.content=null}createRenderRoot(){return this}render(){var t,r,o,n;return l`
|
|
4488
4494
|
<div class="pont-account-settings-section-stack">
|
|
4489
4495
|
<pont-account-info
|
|
4490
4496
|
.content=${(t=this.content)==null?void 0:t.account}
|
|
@@ -4510,11 +4516,11 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4510
4516
|
.layout=${this.widgetsLayout}
|
|
4511
4517
|
></pont-urls-info>
|
|
4512
4518
|
</div>
|
|
4513
|
-
`}};Ot([a({type:Object})],exports.Profile.prototype,"account",2);Ot([a({type:Object})],exports.Profile.prototype,"personal",2);Ot([a({type:Object})],exports.Profile.prototype,"location",2);Ot([a({type:Object})],exports.Profile.prototype,"urls",2);Ot([a({type:Boolean})],exports.Profile.prototype,"showAvatarMenu",2);Ot([a({type:Object}),a({attribute:!1})],exports.Profile.prototype,"modalIcon",2);Ot([a({type:String})],exports.Profile.prototype,"orientation",2);Ot([a({type:String})],exports.Profile.prototype,"sidebarDisplayType",2);Ot([a({type:String})],exports.Profile.prototype,"mode",2);Ot([a({type:String})],exports.Profile.prototype,"widgetsLayout",2);Ot([a({type:Function})],exports.Profile.prototype,"toggleAvatarMenu",2);Ot([a({type:Function})],exports.Profile.prototype,"onAvatarChange",2);Ot([a({type:Function})],exports.Profile.prototype,"onAvatarRemove",2);Ot([a({type:Object})],exports.Profile.prototype,"content",2);exports.Profile=Ot([p("pont-profile")],exports.Profile);const Go={vertical:"pont-account-settings-sidebar-vertical",horizontal:"pont-account-settings-sidebar-horizontal",horizontalBurger:"pont-account-settings-sidebar-horizontal-burger"},
|
|
4519
|
+
`}};Ot([a({type:Object})],exports.Profile.prototype,"account",2);Ot([a({type:Object})],exports.Profile.prototype,"personal",2);Ot([a({type:Object})],exports.Profile.prototype,"location",2);Ot([a({type:Object})],exports.Profile.prototype,"urls",2);Ot([a({type:Boolean})],exports.Profile.prototype,"showAvatarMenu",2);Ot([a({type:Object}),a({attribute:!1})],exports.Profile.prototype,"modalIcon",2);Ot([a({type:String})],exports.Profile.prototype,"orientation",2);Ot([a({type:String})],exports.Profile.prototype,"sidebarDisplayType",2);Ot([a({type:String})],exports.Profile.prototype,"mode",2);Ot([a({type:String})],exports.Profile.prototype,"widgetsLayout",2);Ot([a({type:Function})],exports.Profile.prototype,"toggleAvatarMenu",2);Ot([a({type:Function})],exports.Profile.prototype,"onAvatarChange",2);Ot([a({type:Function})],exports.Profile.prototype,"onAvatarRemove",2);Ot([a({type:Object})],exports.Profile.prototype,"content",2);exports.Profile=Ot([p("pont-profile")],exports.Profile);const Go={vertical:"pont-account-settings-sidebar-vertical",horizontal:"pont-account-settings-sidebar-horizontal",horizontalBurger:"pont-account-settings-sidebar-horizontal-burger"},W0="pont-account-settings-sidebar-burger-button pont-rounded-lg pont-cursor-pointer",Y0="mobile-sidebar-drawer pont-account-settings-sidebar-mobile-drawer pont-transform pont-transition-all pont-duration-300 pont-ease-in-out",Q0="mobile-sidebar-overlay pont-account-settings-sidebar-mobile-overlay pont-transition-opacity pont-duration-300 pont-ease-in-out";/**
|
|
4514
4520
|
* @license
|
|
4515
4521
|
* Copyright 2021 Google LLC
|
|
4516
4522
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
4517
|
-
*/const Wh=An(class extends Di{constructor(){super(...arguments),this.key=h}render(e,t){return this.key=e,t}update(e,[t,r]){return t!==this.key&&(mm(e),this.key=t),r}});var
|
|
4523
|
+
*/const Wh=An(class extends Di{constructor(){super(...arguments),this.key=h}render(e,t){return this.key=e,t}update(e,[t,r]){return t!==this.key&&(mm(e),this.key=t),r}});var Z0=Object.defineProperty,J0=Object.getOwnPropertyDescriptor,on=(e,t,r,o)=>{for(var n=o>1?void 0:o?J0(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&&Z0(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 Wh(this.sidebarKey,l`
|
|
4518
4524
|
<pont-tabs-list
|
|
4519
4525
|
data-burger=${this.isBurger}
|
|
4520
4526
|
data-orientation=${e?"vertical":"horizontal"}
|
|
@@ -4529,8 +4535,8 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4529
4535
|
`)}renderWatermark(){return l`<pont-watermark custom-id="pont-watermark"></pont-watermark>`}renderBurger(){return l`
|
|
4530
4536
|
<div class="pont-flex pont-justify-between pont-w-full">
|
|
4531
4537
|
<div class="pont-flex pont-items-center pont-gap-2">
|
|
4532
|
-
<div class="${
|
|
4533
|
-
${
|
|
4538
|
+
<div class="${W0}" @click=${this.toggleMenu}>
|
|
4539
|
+
${YP()}
|
|
4534
4540
|
</div>
|
|
4535
4541
|
<pont-typography-h part="burger-title-label" level="h3"
|
|
4536
4542
|
>Account Settings</pont-typography-h
|
|
@@ -4550,7 +4556,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4550
4556
|
`}renderMobileDrawer(){return l`
|
|
4551
4557
|
<div
|
|
4552
4558
|
part="mobile-drawer"
|
|
4553
|
-
class="${zt(
|
|
4559
|
+
class="${zt(Y0,this.isMenuOpen?"pont-translate-x-0 pont-opacity-100":"pont-translate-x-[-100%] pont-opacity-0")}"
|
|
4554
4560
|
>
|
|
4555
4561
|
<div class="pont-account-settings-sidebar-mobile-body">
|
|
4556
4562
|
<div class="pont-account-settings-sidebar-tab-list">
|
|
@@ -4573,7 +4579,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4573
4579
|
</div>
|
|
4574
4580
|
</div>
|
|
4575
4581
|
<div
|
|
4576
|
-
class="${
|
|
4582
|
+
class="${Q0} ${this.isMenuOpen?"pont-block pont-opacity-100":"pont-hidden pont-opacity-0"}"
|
|
4577
4583
|
@click=${this.toggleMenu}
|
|
4578
4584
|
></div>
|
|
4579
4585
|
`}getSidebarContainerClass(){return this.isBurger&&this.isModal?Go.horizontalBurger:this.isModal&&this.isVertical?`${Go.vertical} pont-account-settings-sidebar-modal-margin`:this.isVertical?Go.vertical:Go.horizontal}render(){const e=!this.isVertical&&!this.isBurger;return l`
|
|
@@ -4591,7 +4597,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4591
4597
|
</div>
|
|
4592
4598
|
|
|
4593
4599
|
${this.isBurger?this.renderMobileDrawer():null}
|
|
4594
|
-
`}};on([a({type:String})],_r.prototype,"orientation",2);on([a({type:String})],_r.prototype,"displayType",2);on([a({type:String})],_r.prototype,"mode",2);on([a({type:Object})],_r.prototype,"config",2);on([a({type:String})],_r.prototype,"activeTab",2);on([g()],_r.prototype,"isMenuOpen",2);_r=on([p("pont-profile-sidebar")],_r);function Rl(){document.dispatchEvent(new CustomEvent("open-user-profile",{bubbles:!0,composed:!0}))}function Il(){document.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}function Yh(){document.dispatchEvent(new CustomEvent("open-member-management",{bubbles:!0,composed:!0}))}function Qh(){document.dispatchEvent(new CustomEvent("close-member-management",{bubbles:!0,composed:!0}))}function Zh(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=Rl,window.__pontCoreSdk.closeAccountSettingsModal=Il,window.__pontCoreSdk.openMemberManagementModal=Yh,window.__pontCoreSdk.closeMemberManagementModal=Qh,window.__pontCoreSdk.setLocales=Zh);var
|
|
4600
|
+
`}};on([a({type:String})],_r.prototype,"orientation",2);on([a({type:String})],_r.prototype,"displayType",2);on([a({type:String})],_r.prototype,"mode",2);on([a({type:Object})],_r.prototype,"config",2);on([a({type:String})],_r.prototype,"activeTab",2);on([g()],_r.prototype,"isMenuOpen",2);_r=on([p("pont-profile-sidebar")],_r);function Rl(){document.dispatchEvent(new CustomEvent("open-user-profile",{bubbles:!0,composed:!0}))}function Il(){document.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}function Yh(){document.dispatchEvent(new CustomEvent("open-member-management",{bubbles:!0,composed:!0}))}function Qh(){document.dispatchEvent(new CustomEvent("close-member-management",{bubbles:!0,composed:!0}))}function Zh(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=Rl,window.__pontCoreSdk.closeAccountSettingsModal=Il,window.__pontCoreSdk.openMemberManagementModal=Yh,window.__pontCoreSdk.closeMemberManagementModal=Qh,window.__pontCoreSdk.setLocales=Zh);var X0=Object.defineProperty,jt=(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&&X0(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=nt.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 zt(Mw,this.isModal?Uw:Bw,this.isModal?Nw:kw,t?"!pont-flex-col":"!pont-flex-row")}get contentClasses(){return zt("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=K.getAuthenticatedUser())==null?void 0:r.email)??"",!!this.userContextValue.identifier)){this._userLoading=!0;try{this.userContextValue.user=await I0(),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<wc.xs?"xs":t<wc.sm?"sm":"md"}renderWatermark(){return this.isVerticalOrientation?l`
|
|
4595
4601
|
<div class="pont-account-settings-watermark-container">
|
|
4596
4602
|
<pont-watermark custom-id="pont-watermark"></pont-watermark>
|
|
4597
4603
|
</div>
|
|
@@ -4672,7 +4678,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4672
4678
|
${this.renderMainContent()}
|
|
4673
4679
|
</div>
|
|
4674
4680
|
</pont-modal>
|
|
4675
|
-
`:this.renderMainContent():h:this.isModal?h:this.renderLoadingSkeleton()}createRenderRoot(){return this}}jt([a({type:Boolean})],Rt.prototype,"showAvatarMenu");jt([a({type:String})],Rt.prototype,"orientation");jt([a({type:String})],Rt.prototype,"mobileDisplay");jt([a({type:String,reflect:!0})],Rt.prototype,"mode");jt([a({type:String})],Rt.prototype,"widgetsLayout");jt([a({type:Object})],Rt.prototype,"content");jt([g()],Rt.prototype,"isOpen");jt([g()],Rt.prototype,"currentBreakpoint");jt([g()],Rt.prototype,"activeTab");jt([yt({context:Pr,subscribe:!0}),a({attribute:!1})],Rt.prototype,"auth");jt([g()],Rt.prototype,"_userLoaded");jt([g()],Rt.prototype,"_userLoading");jt([Wt({context:ko}),g()],Rt.prototype,"userContextValue");customElements.define("pont-account-settings",Rt);var
|
|
4681
|
+
`:this.renderMainContent():h:this.isModal?h:this.renderLoadingSkeleton()}createRenderRoot(){return this}}jt([a({type:Boolean})],Rt.prototype,"showAvatarMenu");jt([a({type:String})],Rt.prototype,"orientation");jt([a({type:String})],Rt.prototype,"mobileDisplay");jt([a({type:String,reflect:!0})],Rt.prototype,"mode");jt([a({type:String})],Rt.prototype,"widgetsLayout");jt([a({type:Object})],Rt.prototype,"content");jt([g()],Rt.prototype,"isOpen");jt([g()],Rt.prototype,"currentBreakpoint");jt([g()],Rt.prototype,"activeTab");jt([yt({context:Pr,subscribe:!0}),a({attribute:!1})],Rt.prototype,"auth");jt([g()],Rt.prototype,"_userLoaded");jt([g()],Rt.prototype,"_userLoading");jt([Wt({context:ko}),g()],Rt.prototype,"userContextValue");customElements.define("pont-account-settings",Rt);var tC=Object.defineProperty,eC=Object.getOwnPropertyDescriptor,Jh=(e,t,r,o)=>{for(var n=o>1?void 0:o?eC(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&&tC(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">
|
|
4676
4682
|
Loading security settings...
|
|
4677
4683
|
</div>`:l`
|
|
4678
4684
|
<div class="pont-account-settings-security-panel">
|
|
@@ -4685,7 +4691,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4685
4691
|
width or height of its own, sized only by a widget class.
|
|
4686
4692
|
-->
|
|
4687
4693
|
<pont-empty-media variant="icon">
|
|
4688
|
-
${
|
|
4694
|
+
${Bg("pont-account-settings-security-icon")}
|
|
4689
4695
|
</pont-empty-media>
|
|
4690
4696
|
<pont-empty-title>Security Settings</pont-empty-title>
|
|
4691
4697
|
<pont-empty-description>
|
|
@@ -4706,7 +4712,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4706
4712
|
-->
|
|
4707
4713
|
</pont-empty>
|
|
4708
4714
|
</div>
|
|
4709
|
-
`}createRenderRoot(){return this}};Jh([a({type:Boolean})],exports.PontSecuritySettings.prototype,"loading",2);exports.PontSecuritySettings=Jh([p("pont-security-settings")],exports.PontSecuritySettings);class
|
|
4715
|
+
`}createRenderRoot(){return this}};Jh([a({type:Boolean})],exports.PontSecuritySettings.prototype,"loading",2);exports.PontSecuritySettings=Jh([p("pont-security-settings")],exports.PontSecuritySettings);class rC extends f{createRenderRoot(){return this}generateBlockProps(t){switch(t){case"total-members":case"active-members":return{title:"Active Members",content:"100",icon:JP};case"pending-invites":return{title:"Pending Invites",content:"8",icon:ZP};case"inactive-members":return{title:"Inactive Members",content:"1",icon:XP}}}statisticBlock({title:t,content:r,icon:o}){return l` <pont-card>
|
|
4710
4716
|
<pont-card-header>
|
|
4711
4717
|
<div class="pont-statistic-block-header">
|
|
4712
4718
|
<pont-typography-muted>${t}</pont-typography-muted>
|
|
@@ -4723,7 +4729,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4723
4729
|
${this.statisticBlock(this.generateBlockProps("pending-invites"))}
|
|
4724
4730
|
${this.statisticBlock(this.generateBlockProps("inactive-members"))}
|
|
4725
4731
|
</div>
|
|
4726
|
-
`}}customElements.define("pont-monitoring-cards",
|
|
4732
|
+
`}}customElements.define("pont-monitoring-cards",rC);var nC=Object.defineProperty,oC=Object.getOwnPropertyDescriptor,Zt=(e,t,r,o)=>{for(var n=o>1?void 0:o?oC(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&&nC(t,r,n),n};let Bt=class extends f{constructor(){super(...arguments),this.drawerId="pont-member-invite",this.organizationId="",this.emails=[],this.roles=[],this.availableRoles=[],this.expiryDays="7",this.customMessage="",this.errors={},this.open=!1,this.isLoading=!1,this.isLoadingRoles=!1,this._handleOpenDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!0,this.organizationId&&this.loadRoles())},this._handleCloseDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!1)},this._handleDrawerClosed=()=>{this.open=!1}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("open-sidedrawer",this._handleOpenDrawer),document.addEventListener("close-sidedrawer",this._handleCloseDrawer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("open-sidedrawer",this._handleOpenDrawer),document.removeEventListener("close-sidedrawer",this._handleCloseDrawer)}async loadRoles(){try{this.isLoadingRoles=!0;const e={resource_id:this.organizationId,resource_type:Ai},t=await Ol(e);this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name,description:r.description||void 0,disabled:!1}))}catch(e){console.error("Failed to load roles:",e)}finally{this.isLoadingRoles=!1}}close(){this.open=!1,window.dispatchEvent(new CustomEvent("close-sidedrawer",{detail:{id:this.drawerId}}))}onEmailsChange(e){this.emails=e,this.errors={...this.errors,emails:void 0}}onRolesChange(e){this.roles=e,this.errors={...this.errors,roles:void 0}}handleExpiryInput(e){this.expiryDays=e.target.value}handleMessageInput(e){this.customMessage=e.target.value}async handleSend(){var r;const e={};if(this.emails.length===0&&(e.emails="Please enter at least one email address."),this.roles.length===0&&(e.roles="Please select at least one role."),Object.keys(e).length>0){this.errors=e;return}if(!this.organizationId){console.error("Organization ID is required");return}const t={emails:this.emails,roles:this.roles,invited_by:(r=K.getAuthenticatedUser())==null?void 0:r.sub,message:this.customMessage||void 0};this.isLoading=!0;try{const o=await L0(this.organizationId,t);this.emails=[],this.roles=[],this.expiryDays="7",this.customMessage="",this.errors={},window.dispatchEvent(new CustomEvent("invite-members-success",{detail:{organizationId:this.organizationId,response:o}})),this.close()}catch(o){console.error("Failed to send invites:",o),this.errors={...this.errors,emails:"Failed to send invites. Please try again."}}finally{this.isLoading=!1}}render(){return l`
|
|
4727
4733
|
<pont-sidedrawer
|
|
4728
4734
|
id=${this.drawerId}
|
|
4729
4735
|
side="right"
|
|
@@ -4862,7 +4868,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4862
4868
|
</div>
|
|
4863
4869
|
</div>
|
|
4864
4870
|
</pont-sidedrawer>
|
|
4865
|
-
`}};Zt([a({type:String})],Bt.prototype,"drawerId",2);Zt([a({type:String})],Bt.prototype,"organizationId",2);Zt([g()],Bt.prototype,"emails",2);Zt([g()],Bt.prototype,"roles",2);Zt([g()],Bt.prototype,"availableRoles",2);Zt([g()],Bt.prototype,"expiryDays",2);Zt([g()],Bt.prototype,"customMessage",2);Zt([g()],Bt.prototype,"errors",2);Zt([g()],Bt.prototype,"open",2);Zt([g()],Bt.prototype,"isLoading",2);Zt([g()],Bt.prototype,"isLoadingRoles",2);Bt=Zt([p("pont-invite-members-form")],Bt);var
|
|
4871
|
+
`}};Zt([a({type:String})],Bt.prototype,"drawerId",2);Zt([a({type:String})],Bt.prototype,"organizationId",2);Zt([g()],Bt.prototype,"emails",2);Zt([g()],Bt.prototype,"roles",2);Zt([g()],Bt.prototype,"availableRoles",2);Zt([g()],Bt.prototype,"expiryDays",2);Zt([g()],Bt.prototype,"customMessage",2);Zt([g()],Bt.prototype,"errors",2);Zt([g()],Bt.prototype,"open",2);Zt([g()],Bt.prototype,"isLoading",2);Zt([g()],Bt.prototype,"isLoadingRoles",2);Bt=Zt([p("pont-invite-members-form")],Bt);var iC=Object.defineProperty,sC=Object.getOwnPropertyDescriptor,Me=(e,t,r,o)=>{for(var n=o>1?void 0:o?sC(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&&iC(t,r,n),n};let se=class extends f{constructor(){super(...arguments),this.drawerId="pont-manage-roles",this.organizationId="",this.member=null,this.selectedRoles=[],this.availableRoles=[],this.errors={},this.open=!1,this.isLoading=!1,this.isLoadingRoles=!1,this._handleOpenDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!0,this.member&&(this.selectedRoles=(this.member.roles||[]).map(o=>o.key)),this.organizationId&&this.loadRoles())},this._handleCloseDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!1)},this._handleDrawerClosed=()=>{this.open=!1}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("open-sidedrawer",this._handleOpenDrawer),document.addEventListener("close-sidedrawer",this._handleCloseDrawer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("open-sidedrawer",this._handleOpenDrawer),document.removeEventListener("close-sidedrawer",this._handleCloseDrawer)}updated(e){e.has("member")&&this.member&&(console.log(this.member),this.selectedRoles=(this.member.roles||[]).map(t=>t.key))}async loadRoles(){try{this.isLoadingRoles=!0;const e={resource_id:this.organizationId,resource_type:Ai},t=await Ol(e);this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name,description:r.description||void 0,disabled:!1}))}catch(e){console.error("Failed to load roles:",e)}finally{this.isLoadingRoles=!1}}close(){this.open=!1,window.dispatchEvent(new CustomEvent("close-sidedrawer",{detail:{id:this.drawerId}}))}onRolesChange(e){this.selectedRoles=e,this.errors={...this.errors,roles:void 0}}async handleSave(){var r;const e={};if(this.selectedRoles.length===0&&(e.roles="Please select at least one role."),Object.keys(e).length>0){this.errors=e;return}if(!this.organizationId){console.error("Organization ID is required");return}if(!((r=this.member)!=null&&r.user.id)){console.error("User ID is required");return}const t={roles:this.selectedRoles};this.isLoading=!0;try{const o=await T0(this.organizationId,this.member.user.id,t);console.log("Member roles updated successfully:",o),this.errors={},window.dispatchEvent(new CustomEvent("update-members-role",{detail:{organizationId:this.organizationId,userId:this.member.user.id,roles:this.selectedRoles,response:o},bubbles:!0,composed:!0})),this.close()}catch(o){console.error("Failed to update member roles:",o),this.errors={...this.errors,roles:"Failed to update member roles. Please try again."}}finally{this.isLoading=!1}}render(){var e;return l`
|
|
4866
4872
|
<pont-sidedrawer
|
|
4867
4873
|
id=${this.drawerId}
|
|
4868
4874
|
side="right"
|
|
@@ -4958,7 +4964,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4958
4964
|
</div>
|
|
4959
4965
|
</div>
|
|
4960
4966
|
</pont-sidedrawer>
|
|
4961
|
-
`}};Me([a({type:String})],se.prototype,"drawerId",2);Me([a({type:String})],se.prototype,"organizationId",2);Me([a({type:Object})],se.prototype,"member",2);Me([g()],se.prototype,"selectedRoles",2);Me([g()],se.prototype,"availableRoles",2);Me([g()],se.prototype,"errors",2);Me([g()],se.prototype,"open",2);Me([g()],se.prototype,"isLoading",2);Me([g()],se.prototype,"isLoadingRoles",2);se=Me([p("pont-manage-roles-form")],se);var
|
|
4967
|
+
`}};Me([a({type:String})],se.prototype,"drawerId",2);Me([a({type:String})],se.prototype,"organizationId",2);Me([a({type:Object})],se.prototype,"member",2);Me([g()],se.prototype,"selectedRoles",2);Me([g()],se.prototype,"availableRoles",2);Me([g()],se.prototype,"errors",2);Me([g()],se.prototype,"open",2);Me([g()],se.prototype,"isLoading",2);Me([g()],se.prototype,"isLoadingRoles",2);se=Me([p("pont-manage-roles-form")],se);var aC=Object.defineProperty,lC=Object.getOwnPropertyDescriptor,pe=(e,t,r,o)=>{for(var n=o>1?void 0:o?lC(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&&aC(t,r,n),n};let Ht=class extends f{constructor(){super(...arguments),this.open=!1,this.title="",this.warningText="",this.confirmLabel="Confirm",this.cancelLabel="Cancel",this.variant="default",this.isLoading=!1}createRenderRoot(){return this}handleClose(){var e;this.isLoading||(this.open=!1,(e=this.onCancel)==null||e.call(this),this.dispatchEvent(new CustomEvent("modal-closed",{bubbles:!0})))}handleCancel(){var e;this.isLoading||(this.open=!1,(e=this.onCancel)==null||e.call(this),this.dispatchEvent(new CustomEvent("modal-cancelled",{bubbles:!0})))}async handleConfirm(){var e;if(!this.isLoading)try{this.isLoading=!0;const t=(e=this.onConfirm)==null?void 0:e.call(this);t instanceof Promise&&await t,this.open=!1,this.dispatchEvent(new CustomEvent("modal-confirmed",{bubbles:!0}))}catch(t){console.error("Action failed:",t),this.dispatchEvent(new CustomEvent("modal-error",{bubbles:!0,detail:{error:t}}))}finally{this.isLoading=!1}}render(){return l`
|
|
4962
4968
|
<pont-modal
|
|
4963
4969
|
part="no_min_width"
|
|
4964
4970
|
.isOpen=${this.open}
|
|
@@ -4985,7 +4991,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
4985
4991
|
</div>
|
|
4986
4992
|
<!-- Custom content via slot -->
|
|
4987
4993
|
${this.warningText?l` <div part="warning-container">
|
|
4988
|
-
<span>${
|
|
4994
|
+
<span>${e1()}</span>
|
|
4989
4995
|
<span>${this.warningText}</span>
|
|
4990
4996
|
</div>`:h}
|
|
4991
4997
|
<div class="pont-flex pont-justify-end pont-gap-2 pont-mt-2 pont-pb-6 pont-px-4">
|
|
@@ -5006,7 +5012,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5006
5012
|
</div>
|
|
5007
5013
|
</div>
|
|
5008
5014
|
</pont-modal>
|
|
5009
|
-
`}};pe([a({type:Boolean})],Ht.prototype,"open",2);pe([a({type:String})],Ht.prototype,"title",2);pe([a({attribute:!1})],Ht.prototype,"description",2);pe([a({type:String})],Ht.prototype,"warningText",2);pe([a({type:String})],Ht.prototype,"confirmLabel",2);pe([a({type:String})],Ht.prototype,"cancelLabel",2);pe([a({type:String})],Ht.prototype,"variant",2);pe([g()],Ht.prototype,"isLoading",2);pe([a({attribute:!1})],Ht.prototype,"onConfirm",2);pe([a({attribute:!1})],Ht.prototype,"onCancel",2);Ht=pe([p("pont-members-action-modal")],Ht);var
|
|
5015
|
+
`}};pe([a({type:Boolean})],Ht.prototype,"open",2);pe([a({type:String})],Ht.prototype,"title",2);pe([a({attribute:!1})],Ht.prototype,"description",2);pe([a({type:String})],Ht.prototype,"warningText",2);pe([a({type:String})],Ht.prototype,"confirmLabel",2);pe([a({type:String})],Ht.prototype,"cancelLabel",2);pe([a({type:String})],Ht.prototype,"variant",2);pe([g()],Ht.prototype,"isLoading",2);pe([a({attribute:!1})],Ht.prototype,"onConfirm",2);pe([a({attribute:!1})],Ht.prototype,"onCancel",2);Ht=pe([p("pont-members-action-modal")],Ht);var dC=Object.defineProperty,cC=Object.getOwnPropertyDescriptor,he=(e,t,r,o)=>{for(var n=o>1?void 0:o?cC(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&&dC(t,r,n),n};let Gt=class extends f{constructor(){super(...arguments),this.members=[],this.membersLoading=!1,this.searchTerm="",this.memberFilters={roles:[]},this.availableRoles=[],this.membersPage=1,this.membersTotalPages=0,this.membersTotal=0,this.rowsPerPage=5}createRenderRoot(){return this}dispatchMembersSearchChange(e){this.dispatchEvent(new CustomEvent("members-search-change",{detail:{searchTerm:e},bubbles:!0,composed:!0}))}handleMembersSearchChange(e){const t=e.target;this.searchTerm=t.value,this._searchDebounceTimer&&window.clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=window.setTimeout(()=>{this._searchDebounceTimer=void 0,this.dispatchMembersSearchChange(this.searchTerm)},300)}handleMembersPageChange(e){this.dispatchEvent(new CustomEvent("members-page-change",{detail:{page:e.detail.page},bubbles:!0,composed:!0}))}handleRowsPerPageChange(e){const t=parseInt(e.target.value,10);this.dispatchEvent(new CustomEvent("members-rows-per-page-change",{detail:{rowsPerPage:t},bubbles:!0,composed:!0}))}handleRefresh(){this.dispatchEvent(new CustomEvent("members-refresh",{bubbles:!0,composed:!0}))}handleRolesChange(e){this.dispatchEvent(new CustomEvent("members-filter-change",{detail:{roles:e.detail.selected},bubbles:!0,composed:!0}))}clearFilters(){this.dispatchEvent(new CustomEvent("members-clear-filters",{bubbles:!0,composed:!0}))}removeFilter(e){this.dispatchEvent(new CustomEvent("members-remove-filter",{detail:{filterValue:e},bubbles:!0,composed:!0}))}dispatchMemberAction(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}filterData(e,t){return t.trim()?e.filter(r=>Object.values(r).some(o=>typeof o=="string"?o.toLowerCase().includes(t.toLowerCase()):!1)):e}transformMemberWithName(e){var t,r,o,n;return{...e,name:((t=e.user)==null?void 0:t.name)||((r=e.user)==null?void 0:r.email)||"Unknown User",email:((o=e.user)==null?void 0:o.email)||"",avatar_url:((n=e.user)==null?void 0:n.picture)||""}}getSelectedFiltersDisplay(){var t;const e=[];return(t=this.memberFilters.roles)!=null&&t.length&&this.memberFilters.roles.forEach(r=>{var n;const o=((n=this.availableRoles.find(i=>i.value===r))==null?void 0:n.label)||r;e.push({name:"roles",value:r,label:o})}),e}getMemberTableConfig(e){const t={name:(n,i)=>{var d,c,u,v;if(e)return l`
|
|
5010
5016
|
<div class="pont-flex pont-items-center pont-gap-2">
|
|
5011
5017
|
<pont-skeleton
|
|
5012
5018
|
class="pont-h-10 pont-w-10 pont-rounded-full"
|
|
@@ -5201,7 +5207,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5201
5207
|
</div>
|
|
5202
5208
|
</div>
|
|
5203
5209
|
`}
|
|
5204
|
-
`}};he([a({attribute:!1})],Gt.prototype,"members",2);he([a({type:Boolean,attribute:!1})],Gt.prototype,"membersLoading",2);he([a({type:String})],Gt.prototype,"searchTerm",2);he([a({type:Object,attribute:!1})],Gt.prototype,"memberFilters",2);he([a({type:Array,attribute:!1})],Gt.prototype,"availableRoles",2);he([a({type:Number})],Gt.prototype,"membersPage",2);he([a({type:Number})],Gt.prototype,"membersTotalPages",2);he([a({type:Number})],Gt.prototype,"membersTotal",2);he([a({type:Number})],Gt.prototype,"rowsPerPage",2);he([g()],Gt.prototype,"_searchDebounceTimer",2);Gt=he([p("pont-member-management-members-panel")],Gt);var
|
|
5210
|
+
`}};he([a({attribute:!1})],Gt.prototype,"members",2);he([a({type:Boolean,attribute:!1})],Gt.prototype,"membersLoading",2);he([a({type:String})],Gt.prototype,"searchTerm",2);he([a({type:Object,attribute:!1})],Gt.prototype,"memberFilters",2);he([a({type:Array,attribute:!1})],Gt.prototype,"availableRoles",2);he([a({type:Number})],Gt.prototype,"membersPage",2);he([a({type:Number})],Gt.prototype,"membersTotalPages",2);he([a({type:Number})],Gt.prototype,"membersTotal",2);he([a({type:Number})],Gt.prototype,"rowsPerPage",2);he([g()],Gt.prototype,"_searchDebounceTimer",2);Gt=he([p("pont-member-management-members-panel")],Gt);var pC=Object.defineProperty,hC=Object.getOwnPropertyDescriptor,ue=(e,t,r,o)=>{for(var n=o>1?void 0:o?hC(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&&pC(t,r,n),n};let Kt=class extends f{constructor(){super(...arguments),this.invitations=[],this.invitationsLoading=!1,this.searchTerm="",this.invitationFilters={roles:[]},this.availableRoles=[],this.invitationsPage=1,this.invitationsTotalPages=0,this.invitationsTotal=0,this.rowsPerPage=5}createRenderRoot(){return this}dispatchInvitationsSearchChange(e){this.dispatchEvent(new CustomEvent("invitations-search-change",{detail:{searchTerm:e},bubbles:!0,composed:!0}))}handleInvitationsSearchChange(e){const t=e.target;this.searchTerm=t.value,this._searchDebounceTimer&&window.clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=window.setTimeout(()=>{this._searchDebounceTimer=void 0,this.dispatchInvitationsSearchChange(this.searchTerm)},300)}handleInvitationsPageChange(e){this.dispatchEvent(new CustomEvent("invitations-page-change",{detail:{page:e.detail.page},bubbles:!0,composed:!0}))}handleRowsPerPageChange(e){const t=parseInt(e.target.value,10);this.dispatchEvent(new CustomEvent("invitations-rows-per-page-change",{detail:{rowsPerPage:t},bubbles:!0,composed:!0}))}handleRefresh(){this.dispatchEvent(new CustomEvent("invitations-refresh",{bubbles:!0,composed:!0}))}handleRolesChange(e){this.dispatchEvent(new CustomEvent("invitations-filter-change",{detail:{roles:e.detail.selected},bubbles:!0,composed:!0}))}clearFilters(){this.dispatchEvent(new CustomEvent("invitations-clear-filters",{bubbles:!0,composed:!0}))}removeFilter(e){this.dispatchEvent(new CustomEvent("invitations-remove-filter",{detail:{filterValue:e},bubbles:!0,composed:!0}))}dispatchInvitationAction(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}getSelectedFiltersDisplay(){var t;const e=[];return(t=this.invitationFilters.roles)!=null&&t.length&&this.invitationFilters.roles.forEach(r=>{var n;const o=((n=this.availableRoles.find(i=>i.value===r))==null?void 0:n.label)||r;e.push({name:"roles",value:r,label:o})}),e}getInvitationTableConfig(e){const t={invitee_email:n=>e?l`
|
|
5205
5211
|
<div class="pont-flex pont-items-center pont-gap-2">
|
|
5206
5212
|
<pont-skeleton
|
|
5207
5213
|
class="pont-h-10 pont-w-10 pont-rounded-full"
|
|
@@ -5393,7 +5399,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5393
5399
|
</div>
|
|
5394
5400
|
</div>
|
|
5395
5401
|
`}
|
|
5396
|
-
`}};ue([a({attribute:!1})],Kt.prototype,"invitations",2);ue([a({type:Boolean,attribute:!1})],Kt.prototype,"invitationsLoading",2);ue([a({type:String})],Kt.prototype,"searchTerm",2);ue([a({type:Object,attribute:!1})],Kt.prototype,"invitationFilters",2);ue([a({type:Array,attribute:!1})],Kt.prototype,"availableRoles",2);ue([a({type:Number})],Kt.prototype,"invitationsPage",2);ue([a({type:Number})],Kt.prototype,"invitationsTotalPages",2);ue([a({type:Number})],Kt.prototype,"invitationsTotal",2);ue([a({type:Number})],Kt.prototype,"rowsPerPage",2);ue([g()],Kt.prototype,"_searchDebounceTimer",2);Kt=ue([p("pont-member-management-invitations-panel")],Kt);var ar=(e=>(e.MEMBERS="Members",e.INVITATIONS="Invitations",e))(ar||{});function mC(e){const t=[{key:"admin",name:"Admin",description:"Full access",type:"system",resource_type:"org",resource_id:"org_123",permissions:["*"],permission_count:10,assignment_count:2,inheritance:[],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:"org",resource_id:"org_123",permissions:["read:projects","write:projects","read:members"],permission_count:3,assignment_count:4,inheritance:[],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:"org",resource_id:"org_123",permissions:["read:repos","write:repos"],permission_count:2,assignment_count:6,inheritance:[],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:"org",resource_id:"org_123",permissions:["read:projects"],permission_count:1,assignment_count:8,inheritance:[],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 Ko="2026-08-05T10:00:00Z",Wo="2026-08-04T10:00:00Z",gC=[{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:Ko,last_active_at:Ko,created_at:Ko,updated_at:Ko,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:Wo,last_active_at:Wo,created_at:Wo,updated_at:Wo,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 fC(e){let t=[...gC];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(u=>d.includes(u.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 vC=[{id:"inv_1",organization_id:"org_123",invitee_email:"frank@example.com",roles:[{key:"viewer",name:"Viewer"}],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"}],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:"jack@example.com",roles:[{key:"admin",name:"Admin"}],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 bC(e){let t=[...vC];if(e!=null&&e.search){const d=e.search.toLowerCase();t=t.filter(c=>c.invitee_email.toLowerCase().includes(d))}if(e!=null&&e.roles){const d=e.roles.split(",");t=t.filter(c=>c.roles.some(u=>d.includes(u.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)}}}var yC=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&&yC(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:[]},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=mC({resource_id:this.organizationId,resource_type:Ai});else{const r={resource_id:this.organizationId,resource_type:Ai};t=await Ol(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=fC(i):d=await T0(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;s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let d;this.useMockData?d=bC(i):d=await M0(this.organizationId,i),this.invitations=d.data,this.invitationsPage=d.pagination.page,this.invitationsTotalPages=d.pagination.total_pages,this.invitationsTotal=d.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||[]},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:[]},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)},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`
|
|
5402
|
+
`}};ue([a({attribute:!1})],Kt.prototype,"invitations",2);ue([a({type:Boolean,attribute:!1})],Kt.prototype,"invitationsLoading",2);ue([a({type:String})],Kt.prototype,"searchTerm",2);ue([a({type:Object,attribute:!1})],Kt.prototype,"invitationFilters",2);ue([a({type:Array,attribute:!1})],Kt.prototype,"availableRoles",2);ue([a({type:Number})],Kt.prototype,"invitationsPage",2);ue([a({type:Number})],Kt.prototype,"invitationsTotalPages",2);ue([a({type:Number})],Kt.prototype,"invitationsTotal",2);ue([a({type:Number})],Kt.prototype,"rowsPerPage",2);ue([g()],Kt.prototype,"_searchDebounceTimer",2);Kt=ue([p("pont-member-management-invitations-panel")],Kt);var ar=(e=>(e.MEMBERS="Members",e.INVITATIONS="Invitations",e))(ar||{});function uC(e){const t=[{key:"admin",name:"Admin",description:"Full access",type:"system",resource_type:"org",resource_id:"org_123",permissions:["*"],permission_count:10,assignment_count:2,inheritance:[],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:"org",resource_id:"org_123",permissions:["read:projects","write:projects","read:members"],permission_count:3,assignment_count:4,inheritance:[],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:"org",resource_id:"org_123",permissions:["read:repos","write:repos"],permission_count:2,assignment_count:6,inheritance:[],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:"org",resource_id:"org_123",permissions:["read:projects"],permission_count:1,assignment_count:8,inheritance:[],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 Ko="2026-08-05T10:00:00Z",Wo="2026-08-04T10:00:00Z",mC=[{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:Ko,last_active_at:Ko,created_at:Ko,updated_at:Ko,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:Wo,last_active_at:Wo,created_at:Wo,updated_at:Wo,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 gC(e){let t=[...mC];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(u=>d.includes(u.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 fC=[{id:"inv_1",organization_id:"org_123",invitee_email:"frank@example.com",roles:[{key:"viewer",name:"Viewer"}],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"}],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:"jack@example.com",roles:[{key:"admin",name:"Admin"}],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 vC(e){let t=[...fC];if(e!=null&&e.search){const d=e.search.toLowerCase();t=t.filter(c=>c.invitee_email.toLowerCase().includes(d))}if(e!=null&&e.roles){const d=e.roles.split(",");t=t.filter(c=>c.roles.some(u=>d.includes(u.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)}}}var bC=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&&bC(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:[]},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=uC({resource_id:this.organizationId,resource_type:Ai});else{const r={resource_id:this.organizationId,resource_type:Ai};t=await Ol(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=gC(i):d=await A0(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;s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let d;this.useMockData?d=vC(i):d=await N0(this.organizationId,i),this.invitations=d.data,this.invitationsPage=d.pagination.page,this.invitationsTotalPages=d.pagination.total_pages,this.invitationsTotal=d.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||[]},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:[]},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)},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`
|
|
5397
5403
|
<p part="description">
|
|
5398
5404
|
Are you sure you want to suspend
|
|
5399
5405
|
<span part="highlight-name"
|
|
@@ -5409,19 +5415,19 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5409
5415
|
>
|
|
5410
5416
|
from this organization?
|
|
5411
5417
|
</p>
|
|
5412
|
-
`,confirmLabel:"Remove User",variant:"danger",warningText:"This member will be permanently removed from the organization and will immediately lose access to all projects, billing, and shared resources. They will need to be re-invited to regain access.",onConfirm:async()=>{await
|
|
5418
|
+
`,confirmLabel:"Remove User",variant:"danger",warningText:"This member will be permanently removed from the organization and will immediately lose access to all projects, billing, and shared resources. They will need to be re-invited to regain access.",onConfirm:async()=>{await D0(this.organizationId,r.user.id),this.loadMembers(this.membersPage,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}})}handleResendInvitation(t){const r=t.detail;this.openActionModal({title:"Resend Invitation",description:l`
|
|
5413
5419
|
<p part="description">
|
|
5414
5420
|
Are you sure you want to resend this invitation to
|
|
5415
5421
|
<span part="highlight-name">${r.invitee_email}</span>
|
|
5416
5422
|
?
|
|
5417
5423
|
</p>
|
|
5418
|
-
`,confirmLabel:"Resend",variant:"default",onConfirm:async()=>{await
|
|
5424
|
+
`,confirmLabel:"Resend",variant:"default",onConfirm:async()=>{await F0(this.organizationId,r.id),this.loadInvitations(this.invitationsPage,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}})}handleCancelInvitation(t){const r=t.detail;this.openActionModal({title:"Cancel Invitation",description:l`
|
|
5419
5425
|
<p part="description">
|
|
5420
5426
|
Are you sure you want to cancel the invitation for
|
|
5421
5427
|
<span part="highlight-name">${r.invitee_email}</span>
|
|
5422
5428
|
?
|
|
5423
5429
|
</p>
|
|
5424
|
-
`,confirmLabel:"Cancel Invitation",variant:"danger",warningText:"This invitation will be permanently deleted and the recipient will lose access to join the organization.",onConfirm:async()=>{await
|
|
5430
|
+
`,confirmLabel:"Cancel Invitation",variant:"danger",warningText:"This invitation will be permanently deleted and the recipient will lose access to join the organization.",onConfirm:async()=>{await k0(this.organizationId,r.id),this.loadInvitations(this.invitationsPage,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}})}renderContent(){return l`
|
|
5425
5431
|
<div class="pont-member-management-shell">
|
|
5426
5432
|
<div>
|
|
5427
5433
|
<div class="pont-flex pont-flex-col pont-gap-8 pont-w-full">
|
|
@@ -5464,7 +5470,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5464
5470
|
size="default"
|
|
5465
5471
|
@click=${()=>setTimeout(()=>{document.dispatchEvent(new CustomEvent("open-sidedrawer",{detail:{id:this.inviteDrawerId,side:"right"},bubbles:!0,composed:!0}))},50)}
|
|
5466
5472
|
>
|
|
5467
|
-
${
|
|
5473
|
+
${t1()}Invite Members
|
|
5468
5474
|
</pont-button>
|
|
5469
5475
|
</div>
|
|
5470
5476
|
<div class="pont-mt-6">
|
|
@@ -5555,7 +5561,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5555
5561
|
>
|
|
5556
5562
|
${this.renderContent()}
|
|
5557
5563
|
</pont-modal>
|
|
5558
|
-
`:h:this.renderContent()}createRenderRoot(){return this}}V([a({type:String})],j.prototype,"mode");V([a({type:String})],j.prototype,"title");V([a({type:String})],j.prototype,"description");V([a({type:String})],j.prototype,"organizationId");V([g()],j.prototype,"isOpen");V([g()],j.prototype,"monitoringFlag");V([g()],j.prototype,"membersSearchTerm");V([g()],j.prototype,"invitationsSearchTerm");V([g()],j.prototype,"members");V([g()],j.prototype,"invitations");V([g()],j.prototype,"membersLoading");V([g()],j.prototype,"invitationsLoading");V([g()],j.prototype,"useMockData");V([g()],j.prototype,"membersPage");V([g()],j.prototype,"membersTotalPages");V([g()],j.prototype,"invitationsPage");V([g()],j.prototype,"invitationsTotalPages");V([g()],j.prototype,"membersTotal");V([g()],j.prototype,"invitationsTotal");V([g()],j.prototype,"rowsPerPage");V([a({type:String})],j.prototype,"inviteDrawerId");V([g()],j.prototype,"availableRoles");V([g()],j.prototype,"isLoadingRoles");V([g()],j.prototype,"memberFilters");V([g()],j.prototype,"invitationFilters");V([g()],j.prototype,"selectedMember");V([g()],j.prototype,"actionModalOpen");V([g()],j.prototype,"actionModalConfig");V([a({type:String})],j.prototype,"manageRolesDrawerId");customElements.define("pont-member-management",j);var
|
|
5564
|
+
`:h:this.renderContent()}createRenderRoot(){return this}}V([a({type:String})],j.prototype,"mode");V([a({type:String})],j.prototype,"title");V([a({type:String})],j.prototype,"description");V([a({type:String})],j.prototype,"organizationId");V([g()],j.prototype,"isOpen");V([g()],j.prototype,"monitoringFlag");V([g()],j.prototype,"membersSearchTerm");V([g()],j.prototype,"invitationsSearchTerm");V([g()],j.prototype,"members");V([g()],j.prototype,"invitations");V([g()],j.prototype,"membersLoading");V([g()],j.prototype,"invitationsLoading");V([g()],j.prototype,"useMockData");V([g()],j.prototype,"membersPage");V([g()],j.prototype,"membersTotalPages");V([g()],j.prototype,"invitationsPage");V([g()],j.prototype,"invitationsTotalPages");V([g()],j.prototype,"membersTotal");V([g()],j.prototype,"invitationsTotal");V([g()],j.prototype,"rowsPerPage");V([a({type:String})],j.prototype,"inviteDrawerId");V([g()],j.prototype,"availableRoles");V([g()],j.prototype,"isLoadingRoles");V([g()],j.prototype,"memberFilters");V([g()],j.prototype,"invitationFilters");V([g()],j.prototype,"selectedMember");V([g()],j.prototype,"actionModalOpen");V([g()],j.prototype,"actionModalConfig");V([a({type:String})],j.prototype,"manageRolesDrawerId");customElements.define("pont-member-management",j);var yC=Object.defineProperty,_C=Object.getOwnPropertyDescriptor,Ji=(e,t,r,o)=>{for(var n=o>1?void 0:o?_C(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&&yC(t,r,n),n};exports.PreviewComponent=class extends f{constructor(){super(...arguments),this.loading=!1,this.renderSpec=null,this.branding=Lo}createRenderRoot(){return this}render(){return l`
|
|
5559
5565
|
${this.loading?l`<div class="pont-p-8 pont-text-center">Loading...</div>`:l`
|
|
5560
5566
|
<pont-provider>
|
|
5561
5567
|
<signed-out>
|
|
@@ -5567,7 +5573,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5567
5573
|
</signed-out>
|
|
5568
5574
|
</pont-provider>
|
|
5569
5575
|
`}
|
|
5570
|
-
`}};Ji([a({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);Ji([a({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);Ji([a({attribute:!1})],exports.PreviewComponent.prototype,"branding",2);exports.PreviewComponent=Ji([p("pont-preview")],exports.PreviewComponent);const
|
|
5576
|
+
`}};Ji([a({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);Ji([a({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);Ji([a({attribute:!1})],exports.PreviewComponent.prototype,"branding",2);exports.PreviewComponent=Ji([p("pont-preview")],exports.PreviewComponent);const wC="We couldn't reach the server. Check your connection and try again.",$C="Too many attempts. Wait a moment and try again.",PC="Something went wrong on our side. Please try again.",CC="Something went wrong. Please try again.",EC="This sign-in could not be completed.",SC="The passkey request was cancelled or timed out. Please try again.",xC=409;function Xh(e){if(e instanceof DOMException&&(e.name==="NotAllowedError"||e.name==="AbortError"))return{message:SC,restartable:!1};const{status:t,code:r,message:o}=OC(e);return t===xC?{message:fp(o)??EC,restartable:!0}:t===void 0&&(r==="NETWORK_ERROR"||r==="TIMEOUT")?{message:wC,restartable:!1}:t===429?{message:$C,restartable:!1}:t!==void 0&&t>=500?{message:PC,restartable:!1}:{message:fp(o)??CC,restartable:!1}}function OC(e){if(typeof e=="string")return{message:e};if(!e||typeof e!="object")return{};const t=e;return{status:typeof t.status=="number"?t.status:void 0,code:typeof t.code=="string"?t.code:void 0,message:typeof t.message=="string"?t.message:void 0}}function fp(e){const t=e==null?void 0:e.trim();if(!t||/^HTTP \d{3}\b/.test(t)||t.includes("`"))return;const r=t.charAt(0).toUpperCase()+t.slice(1);return/[.!?]$/.test(r)?r:`${r}.`}var RC=Object.defineProperty,Xi=(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&&RC(t,r,n),n};class sn extends f{constructor(){super(...arguments),this.renderSpec=null,this.branding=Lo,this.locales="",this.__flowStarted=!1,this.__initialized=!1,this.__previousLocale=null,this.restart=()=>{this.__flowStarted=!1,this.startAuthFlow()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener(exports.PontKitLayout.RESTART_EVENT,this.restart)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(exports.PontKitLayout.RESTART_EVENT,this.restart)}firstUpdated(){this.__initialized||(this.__initialized=!0,this.__previousLocale=this.locales,this.startAuthFlow())}updated(t){if(t.has("locales")){const r=this.locales;this.__previousLocale!==r&&(this.__previousLocale=r,this.restart())}t.has("renderSpec")&&this.renderSpec&&this.tryRemoveFallback()}async startAuthFlow(){if(!this.__flowStarted){this.__flowStarted=!0,this.startError=void 0,await vP(K);try{await this.startFlow()}catch(t){console.error(`[${this.localName}] Starting the flow failed:`,t),this.startError=Xh(t).message,this.__flowStarted=!1}this.tryRemoveFallback()}}tryRemoveFallback(){requestAnimationFrame(()=>{var t;(t=this.querySelector('[part="fallback"]'))==null||t.remove()})}render(){return this.startError?l`<div part="flow-error" class="pont-flex pont-flex-col pont-gap-3">
|
|
5571
5577
|
<pont-alert status="error" description=${this.startError}></pont-alert>
|
|
5572
5578
|
<pont-button variant="outline" @click=${this.restart}>
|
|
5573
5579
|
Try again
|
|
@@ -5575,7 +5581,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5575
5581
|
</div>`:this.renderSpec?l`<pont-layout
|
|
5576
5582
|
.renderSpec=${this.renderSpec}
|
|
5577
5583
|
.branding=${this.branding}
|
|
5578
|
-
></pont-layout>`:l``}}Xi([yt({context:Bh,subscribe:!0})],sn.prototype,"renderSpec");Xi([yt({context:Ui,subscribe:!0})],sn.prototype,"branding");Xi([yt({context:Uh,subscribe:!0})],sn.prototype,"locales");Xi([g()],sn.prototype,"startError");var
|
|
5584
|
+
></pont-layout>`:l``}}Xi([yt({context:Bh,subscribe:!0})],sn.prototype,"renderSpec");Xi([yt({context:Ui,subscribe:!0})],sn.prototype,"branding");Xi([yt({context:Uh,subscribe:!0})],sn.prototype,"locales");Xi([g()],sn.prototype,"startError");var IC=Object.getOwnPropertyDescriptor,AC=(e,t,r,o)=>{for(var n=o>1?void 0:o?IC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};exports.PontInvitation=class extends sn{startFlow(){return K.startLoginflow()}};exports.PontInvitation=AC([p("pont-invitation")],exports.PontInvitation);var TC=Object.getOwnPropertyDescriptor,DC=(e,t,r,o)=>{for(var n=o>1?void 0:o?TC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};exports.PontSignIn=class extends sn{startFlow(){return K.startLoginflow("sys_signin-flow-passkey")}};exports.PontSignIn=DC([p("pont-signin")],exports.PontSignIn);var LC=Object.getOwnPropertyDescriptor,FC=(e,t,r,o)=>{for(var n=o>1?void 0:o?LC(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=s(n)||n);return n};exports.PontSignUp=class extends sn{startFlow(){return K.startLoginflow("sys_signup-flow")}};exports.PontSignUp=FC([p("pont-signup")],exports.PontSignUp);var kC=Object.defineProperty,Be=(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&&kC(t,r,n),n};class ts extends f{constructor(){super(...arguments),this.isTrigger=!1,this.user={}}createRenderRoot(){return this}render(){const{name:t,email:r,avatar_url:o}=this.user||{};return l`
|
|
5579
5585
|
<div
|
|
5580
5586
|
class=${zt("pont-flex pont-items-center pont-gap-2 pont-w-full",this.isTrigger?"pont-py-2":"")}
|
|
5581
5587
|
>
|
|
@@ -5688,7 +5694,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5688
5694
|
</pont-dropdown-menu-group>
|
|
5689
5695
|
</pont-dropdown-menu-content>
|
|
5690
5696
|
</pont-dropdown-menu>
|
|
5691
|
-
`}_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)}}}Be([a({type:String})],Ue.prototype,"accountSettingsPath");Be([a({attribute:!1})],Ue.prototype,"menuItems");Be([yt({context:Pr,subscribe:!0}),a({attribute:!1})],Ue.prototype,"auth");Be([g()],Ue.prototype,"user");Be([g()],Ue.prototype,"signedIn");Be([g()],Ue.prototype,"isLoading");Be([g()],Ue.prototype,"_itemStates");Be([g()],Ue.prototype,"_subMenuOpen");customElements.define("pont-account-menu",Ue);var
|
|
5697
|
+
`}_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)}}}Be([a({type:String})],Ue.prototype,"accountSettingsPath");Be([a({attribute:!1})],Ue.prototype,"menuItems");Be([yt({context:Pr,subscribe:!0}),a({attribute:!1})],Ue.prototype,"auth");Be([g()],Ue.prototype,"user");Be([g()],Ue.prototype,"signedIn");Be([g()],Ue.prototype,"isLoading");Be([g()],Ue.prototype,"_itemStates");Be([g()],Ue.prototype,"_subMenuOpen");customElements.define("pont-account-menu",Ue);var NC=Object.defineProperty,je=(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&&NC(t,r,n),n};const Xo="pont-organization-changed",tu="pont-organization-switch-failed";class Jt 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=K.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 R0()}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 K.switchOrganization(t),this.readCurrent();const n=K.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(tu,{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`
|
|
5692
5698
|
<pont-dropdown-menu>
|
|
5693
5699
|
<pont-dropdown-menu-trigger as-child>
|
|
5694
5700
|
<pont-button part="trigger-button" variant="secondary" ?disabled=${!!this.switching}>
|
|
@@ -5724,7 +5730,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5724
5730
|
* @license
|
|
5725
5731
|
* Copyright 2020 Google LLC
|
|
5726
5732
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5727
|
-
*/const eu=Symbol.for(""),
|
|
5733
|
+
*/const eu=Symbol.for(""),MC=e=>{if((e==null?void 0:e.r)===eu)return e==null?void 0:e._$litStatic$},BC=e=>({_$litStatic$:e,r:eu}),vp=new Map,UC=e=>(t,...r)=>{const o=r.length;let n,i;const s=[],d=[];let c,u=0,v=!1;for(;u<o;){for(c=t[u];u<o&&(i=r[u],(n=MC(i))!==void 0);)c+=n+t[++u],v=!0;u!==o&&d.push(i),s.push(c),u++}if(u===o&&s.push(t[o]),v){const b=s.join("$$lit$$");(t=vp.get(b))===void 0&&(s.raw=s,vp.set(b,t=s)),r=d}return e(t,...r)},Us=UC(l);var jC=Object.defineProperty,qC=Object.getOwnPropertyDescriptor,bt=(e,t,r,o)=>{for(var n=o>1?void 0:o?qC(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&&jC(t,r,n),n};exports.PontOtp=class extends Ut{constructor(){super(...arguments),this.excludeFromForm=!1,this.required=!1,this.requiredError="Code is required.",this.incompleteError="Please enter the complete verification code.",this.variant="with_separator",this.length=6,this.timeout=300,this.dataKey="code",this.name="",this.disabled=!1,this.autoSubmit=!1,this.event="",this.resendText="",this.resendButtonText="",this.resendEvent="",this.id="otp",this._invalid=!1,this._error="",this._value="",this.handleComplete=async t=>{if(this._value=t,this.autoSubmit&&this.event){const r={};r[this.dataKey]=t;try{await K.processLoginflowEvent({event:this.event,data:r})}finally{this.emit("pont-otp:complete",{id:this.id,dataKey:this.dataKey,value:t,event:this.event})}return}this.emit("pont-otp:complete",{id:this.id,dataKey:this.dataKey,value:t,event:null})},this.handleFocus=()=>{this.emit("pont-otp:focus",{id:this.id,dataKey:this.dataKey})},this.handleBlur=()=>{this.emit("pont-otp:blur",{id:this.id,dataKey:this.dataKey})},this.handleResend=async()=>{if(this.resendEvent)try{await K.processLoginflowEvent({event:this.resendEvent})}finally{this.emit("pont-otp:resend",{id:this.id,event:this.resendEvent})}}}get _containerElement(){return this.querySelector(`pont-input-otp[part=${this.id?this.id:"otp"}]`)}get isFormField(){return!this.excludeFromForm}createRenderRoot(){return this}get value(){return this._value}validate(){const t=this._value.trim();return this.required&&!t?(this._invalid=!0,this._error=this.requiredError,!1):t.length!==this.length?(this._invalid=!0,this._error=this.incompleteError,!1):(this._invalid=!1,this._error="",!0)}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}buildOTPContentHTML(){const t=this.variant,r=this.length,o=(s,d)=>Array.from({length:d-s},(c,u)=>`<pont-input-otp-slot index="${s+u}"></pont-input-otp-slot>`).join(""),n=s=>`<pont-input-otp-group>${s}</pont-input-otp-group>`,i="<pont-input-otp-separator></pont-input-otp-separator>";if(t==="simple"){const s=Math.ceil(r/2);return n(o(0,s))+i+n(o(s,r))}if(t==="with_separator"){const s=Math.ceil(r/3);return n(o(0,s))+i+n(o(s,s*2))+i+n(o(s*2,r))}return t==="with_spacing"?Array.from({length:r},(s,d)=>n(`<pont-input-otp-slot index="${d}"></pont-input-otp-slot>`)).join(""):n(o(0,r))}render(){const t=this.variant||"digits_only";return Us`
|
|
5728
5734
|
<pont-field ?disabled=${this.disabled} ?invalid=${this._invalid}>
|
|
5729
5735
|
<pont-input-otp
|
|
5730
5736
|
part=${this.id?this.id:"otp"}
|
|
@@ -5739,7 +5745,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5739
5745
|
.onBlur=${this.handleBlur}
|
|
5740
5746
|
.onChange=${r=>this._value=r}
|
|
5741
5747
|
>
|
|
5742
|
-
${
|
|
5748
|
+
${BC(this.buildOTPContentHTML())}
|
|
5743
5749
|
</pont-input-otp>
|
|
5744
5750
|
${this._invalid?Us`
|
|
5745
5751
|
<pont-field-error
|
|
@@ -5760,7 +5766,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5760
5766
|
</pont-button>
|
|
5761
5767
|
</div>
|
|
5762
5768
|
`:h}
|
|
5763
|
-
`}};exports.PontOtp.ROOT="otp";exports.PontOtp.TAG=`${rt}-${exports.PontOtp.ROOT}`;bt([a({type:Boolean,attribute:"exclude-from-form",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"excludeFromForm",2);bt([a({type:Boolean})],exports.PontOtp.prototype,"required",2);bt([a({attribute:"required-error"})],exports.PontOtp.prototype,"requiredError",2);bt([a({attribute:"incomplete-error"})],exports.PontOtp.prototype,"incompleteError",2);bt([a()],exports.PontOtp.prototype,"variant",2);bt([a({type:Number})],exports.PontOtp.prototype,"length",2);bt([a({type:Number})],exports.PontOtp.prototype,"timeout",2);bt([a({attribute:"data-key"})],exports.PontOtp.prototype,"dataKey",2);bt([a()],exports.PontOtp.prototype,"name",2);bt([a({type:Boolean})],exports.PontOtp.prototype,"disabled",2);bt([a({type:Boolean,attribute:"auto-submit",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"autoSubmit",2);bt([a()],exports.PontOtp.prototype,"event",2);bt([a({attribute:"resend-text"})],exports.PontOtp.prototype,"resendText",2);bt([a({attribute:"resend-button-text"})],exports.PontOtp.prototype,"resendButtonText",2);bt([a({attribute:"resend-event"})],exports.PontOtp.prototype,"resendEvent",2);bt([a()],exports.PontOtp.prototype,"id",2);bt([g()],exports.PontOtp.prototype,"_invalid",2);bt([g()],exports.PontOtp.prototype,"_error",2);bt([g()],exports.PontOtp.prototype,"_value",2);exports.PontOtp=bt([p("pont-otp")],exports.PontOtp);const Yo={duration:60,resend_event:"",resend_button_label:"Resend code",count_down_text:"Resend code in "};var
|
|
5769
|
+
`}};exports.PontOtp.ROOT="otp";exports.PontOtp.TAG=`${rt}-${exports.PontOtp.ROOT}`;bt([a({type:Boolean,attribute:"exclude-from-form",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"excludeFromForm",2);bt([a({type:Boolean})],exports.PontOtp.prototype,"required",2);bt([a({attribute:"required-error"})],exports.PontOtp.prototype,"requiredError",2);bt([a({attribute:"incomplete-error"})],exports.PontOtp.prototype,"incompleteError",2);bt([a()],exports.PontOtp.prototype,"variant",2);bt([a({type:Number})],exports.PontOtp.prototype,"length",2);bt([a({type:Number})],exports.PontOtp.prototype,"timeout",2);bt([a({attribute:"data-key"})],exports.PontOtp.prototype,"dataKey",2);bt([a()],exports.PontOtp.prototype,"name",2);bt([a({type:Boolean})],exports.PontOtp.prototype,"disabled",2);bt([a({type:Boolean,attribute:"auto-submit",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"autoSubmit",2);bt([a()],exports.PontOtp.prototype,"event",2);bt([a({attribute:"resend-text"})],exports.PontOtp.prototype,"resendText",2);bt([a({attribute:"resend-button-text"})],exports.PontOtp.prototype,"resendButtonText",2);bt([a({attribute:"resend-event"})],exports.PontOtp.prototype,"resendEvent",2);bt([a()],exports.PontOtp.prototype,"id",2);bt([g()],exports.PontOtp.prototype,"_invalid",2);bt([g()],exports.PontOtp.prototype,"_error",2);bt([g()],exports.PontOtp.prototype,"_value",2);exports.PontOtp=bt([p("pont-otp")],exports.PontOtp);const Yo={duration:60,resend_event:"",resend_button_label:"Resend code",count_down_text:"Resend code in "};var zC=Object.defineProperty,VC=Object.getOwnPropertyDescriptor,Er=(e,t,r,o)=>{for(var n=o>1?void 0:o?VC(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&&zC(t,r,n),n};exports.PontOtpResend=class extends f{constructor(){super(...arguments),this.seed=_t(),this.duration=Yo.duration,this.resend_event=Yo.resend_event,this.resend_button_label=Yo.resend_button_label,this.count_down_text=Yo.count_down_text,this._remaining=0,this._handleResendClick=()=>{K.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`
|
|
5764
5770
|
<div part=${exports.PontOtpResend.PARTS.root} id=${this.rootId}>
|
|
5765
5771
|
${t?l`
|
|
5766
5772
|
<pont-typography-muted
|
|
@@ -5780,24 +5786,24 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5780
5786
|
</pont-button>
|
|
5781
5787
|
`}
|
|
5782
5788
|
</div>
|
|
5783
|
-
`}};exports.PontOtpResend.ROOT="otp-resend";exports.PontOtpResend.COUNTDOWN="countdown";exports.PontOtpResend.RESEND_BUTTON="resend-button";exports.PontOtpResend.TAG=`${rt}-${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}`};Er([a({type:String})],exports.PontOtpResend.prototype,"seed",2);Er([a({type:String,attribute:"custom-id"})],exports.PontOtpResend.prototype,"customId",2);Er([a({type:Number})],exports.PontOtpResend.prototype,"duration",2);Er([a({type:String,attribute:"resend-event"})],exports.PontOtpResend.prototype,"resend_event",2);Er([a({type:String,attribute:"resend-button-label"})],exports.PontOtpResend.prototype,"resend_button_label",2);Er([a({type:String,attribute:"count-down-text"})],exports.PontOtpResend.prototype,"count_down_text",2);Er([g()],exports.PontOtpResend.prototype,"_remaining",2);exports.PontOtpResend=Er([p("pont-otp-resend")],exports.PontOtpResend);const
|
|
5789
|
+
`}};exports.PontOtpResend.ROOT="otp-resend";exports.PontOtpResend.COUNTDOWN="countdown";exports.PontOtpResend.RESEND_BUTTON="resend-button";exports.PontOtpResend.TAG=`${rt}-${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}`};Er([a({type:String})],exports.PontOtpResend.prototype,"seed",2);Er([a({type:String,attribute:"custom-id"})],exports.PontOtpResend.prototype,"customId",2);Er([a({type:Number})],exports.PontOtpResend.prototype,"duration",2);Er([a({type:String,attribute:"resend-event"})],exports.PontOtpResend.prototype,"resend_event",2);Er([a({type:String,attribute:"resend-button-label"})],exports.PontOtpResend.prototype,"resend_button_label",2);Er([a({type:String,attribute:"count-down-text"})],exports.PontOtpResend.prototype,"count_down_text",2);Er([g()],exports.PontOtpResend.prototype,"_remaining",2);exports.PontOtpResend=Er([p("pont-otp-resend")],exports.PontOtpResend);const HC=[exports.PontEmailField,exports.PontPhoneField,exports.PontUsernameField,exports.PontIdentifierField,exports.PontNameField,exports.PontPasswordField,exports.PontConfirmField,exports.PontOtp],GC=[exports.PontPasskeyButton,exports.PontProviderButton,exports.PontLink];var KC=Object.defineProperty,WC=Object.getOwnPropertyDescriptor,Bo=(e,t,r,o)=>{for(var n=o>1?void 0:o?WC(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&&KC(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,u=r.map(b=>!!b.disabled),v=c.map(b=>!!b.disabled);this._setLoading(!0,r,u,c,v);try{const b=await K.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,error:b})}finally{this._setLoading(!1,r,u,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(HC.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=GC.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`
|
|
5784
5790
|
<form
|
|
5785
5791
|
id="${this.rootId}"
|
|
5786
5792
|
part="${exports.PontForm.PARTS.root}"
|
|
5787
5793
|
@submit=${this._handleSubmit}
|
|
5788
5794
|
@reset=${this._handleReset}
|
|
5789
5795
|
></form>
|
|
5790
|
-
`}};exports.PontForm.ROOT="form";exports.PontForm.TAG=`${rt}-${exports.PontForm.ROOT}`;exports.PontForm.SUBMIT_EVENT=`${exports.PontForm.TAG}:submit`;exports.PontForm.SUCCESS_EVENT=`${exports.PontForm.TAG}:success`;exports.PontForm.ERROR_EVENT=`${exports.PontForm.TAG}:error`;exports.PontForm.RESET_EVENT=`${exports.PontForm.TAG}:reset`;exports.PontForm.PARTS={root:exports.PontForm.ROOT};Bo([a({type:String})],exports.PontForm.prototype,"seed",2);Bo([a({type:String,attribute:"custom-id"})],exports.PontForm.prototype,"customId",2);Bo([a({attribute:!1})],exports.PontForm.prototype,"onSubmit",2);Bo([a({attribute:!1})],exports.PontForm.prototype,"onReset",2);exports.PontForm=Bo([p("pont-form")],exports.PontForm);var
|
|
5796
|
+
`}};exports.PontForm.ROOT="form";exports.PontForm.TAG=`${rt}-${exports.PontForm.ROOT}`;exports.PontForm.SUBMIT_EVENT=`${exports.PontForm.TAG}:submit`;exports.PontForm.SUCCESS_EVENT=`${exports.PontForm.TAG}:success`;exports.PontForm.ERROR_EVENT=`${exports.PontForm.TAG}:error`;exports.PontForm.RESET_EVENT=`${exports.PontForm.TAG}:reset`;exports.PontForm.PARTS={root:exports.PontForm.ROOT};Bo([a({type:String})],exports.PontForm.prototype,"seed",2);Bo([a({type:String,attribute:"custom-id"})],exports.PontForm.prototype,"customId",2);Bo([a({attribute:!1})],exports.PontForm.prototype,"onSubmit",2);Bo([a({attribute:!1})],exports.PontForm.prototype,"onReset",2);exports.PontForm=Bo([p("pont-form")],exports.PontForm);var YC=Object.defineProperty,QC=Object.getOwnPropertyDescriptor,Uo=(e,t,r,o)=>{for(var n=o>1?void 0:o?QC(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&&YC(t,r,n),n};exports.PontKitLayout=class extends f{constructor(){super(...arguments),this.spec="",this.designMode=!1,this.branding=Lo,this.handleError=t=>{const r=t.detail??{};console.error(`${t.type}:`,r.message),this.showError(Xh(r.error??r.message))}}set renderSpec(t){this.spec=t,this.requestUpdate()}createRenderRoot(){return this}connectedCallback(){super.connectedCallback();for(const t of exports.PontKitLayout.ERROR_EVENTS)this.addEventListener(t,this.handleError)}disconnectedCallback(){super.disconnectedCallback();for(const t of exports.PontKitLayout.ERROR_EVENTS)this.removeEventListener(t,this.handleError)}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`
|
|
5791
5797
|
<pont-form custom-id="pont-layout-form">
|
|
5792
5798
|
<div class="pont-relative pont-flex">
|
|
5793
5799
|
<div id="dynamic-content"></div>
|
|
5794
5800
|
</div>
|
|
5795
5801
|
</pont-form>
|
|
5796
|
-
`}showError({message:t,restartable:r}){const o=this.querySelector("#dynamic-content");if(!o)return;o.querySelectorAll(`[${exports.PontKitLayout.BANNER_ATTR}], pont-alert[status="error"]`).forEach(u=>u.remove());const n=document.createElement("pont-alert");n.setAttribute("status","error"),n.setAttribute("description",t),n.setAttribute(exports.PontKitLayout.BANNER_ATTR,"");const i=[n];if(r){const u=document.createElement("pont-button");u.setAttribute("variant","outline"),u.setAttribute(exports.PontKitLayout.BANNER_ATTR,""),u.textContent="Start again",u.addEventListener("click",()=>this.dispatchEvent(new CustomEvent(exports.PontKitLayout.RESTART_EVENT,{bubbles:!0,composed:!0}))),i.push(u)}const s=o.querySelector(":scope > pont-block"),d=(s==null?void 0:s.querySelector('div[data-slot="card-content"]'))??s;if(!d){o.prepend(...i);return}let c=d.firstElementChild;for(;c&&["PONT-LOGO","PONT-HEADER"].includes(c.tagName);)c=c.nextElementSibling;for(const u of i)d.insertBefore(u,c)}};exports.PontKitLayout.RESTART_EVENT="pont-layout:restart";exports.PontKitLayout.ERROR_EVENTS=[exports.PontForm.ERROR_EVENT,exports.PontProviderButton.ERROR_EVENT,exports.PontPasskeyButton.ERROR_EVENT,exports.PontLink.ERROR_EVENT,exports.PontPasswordField.FORGOT_ERROR_EVENT];exports.PontKitLayout.BANNER_ATTR="data-flow-error";exports.PontKitLayout.reportedUnregistered=new Set;exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT="pont:unregistered-element";Uo([g()],exports.PontKitLayout.prototype,"spec",2);Uo([a({attribute:!1})],exports.PontKitLayout.prototype,"renderSpec",1);Uo([a({type:Boolean,attribute:"design-mode"}),Wt({context:Nh})],exports.PontKitLayout.prototype,"designMode",2);Uo([a({attribute:!1}),Wt({context:Ui})],exports.PontKitLayout.prototype,"branding",2);exports.PontKitLayout=Uo([p("pont-layout")],exports.PontKitLayout);function
|
|
5802
|
+
`}showError({message:t,restartable:r}){const o=this.querySelector("#dynamic-content");if(!o)return;o.querySelectorAll(`[${exports.PontKitLayout.BANNER_ATTR}], pont-alert[status="error"]`).forEach(u=>u.remove());const n=document.createElement("pont-alert");n.setAttribute("status","error"),n.setAttribute("description",t),n.setAttribute(exports.PontKitLayout.BANNER_ATTR,"");const i=[n];if(r){const u=document.createElement("pont-button");u.setAttribute("variant","outline"),u.setAttribute(exports.PontKitLayout.BANNER_ATTR,""),u.textContent="Start again",u.addEventListener("click",()=>this.dispatchEvent(new CustomEvent(exports.PontKitLayout.RESTART_EVENT,{bubbles:!0,composed:!0}))),i.push(u)}const s=o.querySelector(":scope > pont-block"),d=(s==null?void 0:s.querySelector('div[data-slot="card-content"]'))??s;if(!d){o.prepend(...i);return}let c=d.firstElementChild;for(;c&&["PONT-LOGO","PONT-HEADER"].includes(c.tagName);)c=c.nextElementSibling;for(const u of i)d.insertBefore(u,c)}};exports.PontKitLayout.RESTART_EVENT="pont-layout:restart";exports.PontKitLayout.ERROR_EVENTS=[exports.PontForm.ERROR_EVENT,exports.PontProviderButton.ERROR_EVENT,exports.PontPasskeyButton.ERROR_EVENT,exports.PontLink.ERROR_EVENT,exports.PontPasswordField.FORGOT_ERROR_EVENT];exports.PontKitLayout.BANNER_ATTR="data-flow-error";exports.PontKitLayout.reportedUnregistered=new Set;exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT="pont:unregistered-element";Uo([g()],exports.PontKitLayout.prototype,"spec",2);Uo([a({attribute:!1})],exports.PontKitLayout.prototype,"renderSpec",1);Uo([a({type:Boolean,attribute:"design-mode"}),Wt({context:Nh})],exports.PontKitLayout.prototype,"designMode",2);Uo([a({attribute:!1}),Wt({context:Ui})],exports.PontKitLayout.prototype,"branding",2);exports.PontKitLayout=Uo([p("pont-layout")],exports.PontKitLayout);function ZC({pathname:e,search:t,env:r}){const n=new URLSearchParams(t).get("redirect_url")||r.signinRedirectUrl;return[r.signinUrl,r.signupUrl,r.invitationUrl].filter(s=>!!s).some(s=>e.includes(s))?n||"/":ru(t)&&n?n:null}function ru(e){return new URLSearchParams(e).has("invite_token")}var JC=Object.defineProperty,XC=Object.getOwnPropertyDescriptor,Sr=(e,t,r,o)=>{for(var n=o>1?void 0:o?XC(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&&JC(t,r,n),n};const t2=`<pont-block>
|
|
5797
5803
|
<pont-header>
|
|
5798
5804
|
<pont-title content="You continued in another tab"></pont-title>
|
|
5799
5805
|
<pont-subtitle content="You can close this one."></pont-subtitle>
|
|
5800
5806
|
</pont-header>
|
|
5801
5807
|
<pont-link label="Continue here instead" event="continue_here"></pont-link>
|
|
5802
|
-
</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=Lo,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(),
|
|
5808
|
+
</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=Lo,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(),uP(),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=Th(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){K.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=t2;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),P0(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=ZC({pathname:window.location.pathname,search:window.location.search,env:this.env});if(t){if(this.wasBouncedBackFrom(t)){this.clearRedirectAttempt(),K.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:K.isAuthenticated(),resolved:!0},this.dispatchAuthChangedEvent(this.auth)}dispatchAuthChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:auth-changed",{detail:{...t},bubbles:!0,composed:!0}))}async restoreThenRefreshAuthState(){if(ru(window.location.search)){K.invalidateSession(),this.refreshAuthState();return}try{await K.restoreSession()}catch{}this.refreshAuthState()}};Sr([a({type:Object}),Wt({context:Mh})],exports.PontProvider.prototype,"env",2);Sr([a({type:String})],exports.PontProvider.prototype,"locales",2);Sr([g(),Wt({context:Uh})],exports.PontProvider.prototype,"effectiveLocales",2);Sr([g(),Wt({context:Pr})],exports.PontProvider.prototype,"auth",2);Sr([g(),Wt({context:Bh})],exports.PontProvider.prototype,"renderSpec",2);Sr([g(),Wt({context:Ui})],exports.PontProvider.prototype,"branding",2);Sr([a({type:Boolean})],exports.PontProvider.prototype,"autoRedirect",2);exports.PontProvider=Sr([p("pont-provider")],exports.PontProvider);var e2=Object.defineProperty,r2=Object.getOwnPropertyDescriptor,nu=(e,t,r,o)=>{for(var n=o>1?void 0:o?r2(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&&e2(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> `}};nu([yt({context:Pr,subscribe:!0}),a({attribute:!1})],exports.SignedOut.prototype,"auth",2);exports.SignedOut=nu([p("pont-signed-out")],exports.SignedOut);var n2=Object.defineProperty,o2=Object.getOwnPropertyDescriptor,ou=(e,t,r,o)=>{for(var n=o>1?void 0:o?o2(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&&n2(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> `}};ou([yt({context:Pr,subscribe:!0}),a({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=ou([p("pont-signed-in")],exports.SignedIn);var i2=Object.defineProperty,s2=Object.getOwnPropertyDescriptor,es=(e,t,r,o)=>{for(var n=o>1?void 0:o?s2(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&&i2(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}};es([a({type:String})],exports.PontAuthenticated.prototype,"redirectUrl",2);es([yt({context:Mh,subscribe:!0}),a({attribute:!1})],exports.PontAuthenticated.prototype,"env",2);es([yt({context:Pr,subscribe:!0}),a({attribute:!1})],exports.PontAuthenticated.prototype,"auth",2);exports.PontAuthenticated=es([p("pont-authenticated")],exports.PontAuthenticated);var a2=Object.defineProperty,l2=Object.getOwnPropertyDescriptor,iu=(e,t,r,o)=>{for(var n=o>1?void 0:o?l2(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&&a2(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``}};iu([yt({context:Pr,subscribe:!0}),a({attribute:!1})],exports.AuthStateElement.prototype,"auth",2);exports.AuthStateElement=iu([p("pont-auth-state")],exports.AuthStateElement);function d2(){return K}exports.BaseElement=Ut;exports.ORGANIZATION_CHANGED_EVENT=Xo;exports.ORGANIZATION_SWITCH_FAILED_EVENT=tu;exports.PontAccountMenu=Ue;exports.PontAccountSettings=Rt;exports.PontMemberManagement=j;exports.PontOrganizationSwitcher=Jt;exports.PontPaginator=Wr;exports.PontUserSnippet=ts;exports.closeAccountSettingsModal=Il;exports.closeMemberManagementModal=Qh;exports.openAccountSettingsModal=Rl;exports.openMemberManagementModal=Yh;exports.setLocales=Zh;exports.useAuthProvider=d2;
|
|
5803
5809
|
//# sourceMappingURL=index.js.map
|