1var W=Object.defineProperty;var L=(t,e,i)=>e in t?W(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var r=(t,e,i)=>L(t,typeof e!="symbol"?e+"":e,i);import{r as N,c as C,g as R,h as a,H as B,t as n}from"./client-20261001.js";import{u as V,a as O,b as D,e as X,i as Y}from"./index-202610013.js";import{a as q}from"./arrow_right-D_UyW-KH-20261001.js";import{c as _}from"./close-BvuWkoyY-20261001.js";import"./preload-helper-20261001.js";import"./helpers-20261001.js";import"./index-20261001.js";import"./index-202610012.js";/*! 2 * Built with Stencil 3 * By PostNord. 4 */const k={NEXT:{sv:"Nästa",en:"Next",da:"Næste",fi:"Seuraava",no:"Neste"},PREV:{sv:"Föregående",en:"Previous",da:"Forrige",fi:"Edellinen",no:"Forrige"},FINISH:{sv:"Slutför",en:"Finish",da:"Afslut",fi:"Valmis",no:"Fullfør"},CANCEL:{sv:"Avbryt",en:"Cancel",da:"Annuller",fi:"Peruuta",no:"Avbryt"}},j=()=>`${n("pn-wizard")} .pn-wizard{z-index:10000;position:absolute;top:0;border:none;margin:0;padding:0;background-color:transparent;outline:none;overflow:unset;height:100%;width:100%;max-width:unset;max-height:unset;display:none;opacity:0;transition-property:display, opacity;transition-duration:0.4s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-wizard")} .pn-wizard{transition-duration:0s;transition-delay:0s}}${n("pn-wizard")} .pn-wizard{transition-behavior:allow-discrete}${n("pn-wizard")} .pn-wizard[open]{display:block;opacity:1}@starting-style{${n("pn-wizard")} .pn-wizard[open]{display:block;opacity:0}}${n("pn-wizard")} .pn-wizard::backdrop{background-color:transparent}${n("pn-wizard")} .pn-wizard-sr-only{position:absolute;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);margin:-1px;white-space:nowrap}${n("pn-wizard")} .pn-wizard-overlay{z-index:0}${n("pn-wizard")} .pn-wizard-highlight{position:absolute;left:0;top:0;width:var(--pn-spotlight-width, 0%);height:var(--pn-spotlight-height, 0%);border-radius:var(--pn-spotlight-radius, 0.25em);box-shadow:0 0 0 9999px rgba(0, 0, 0, 0.55);z-index:0;transform:translate(var(--pn-spotlight-x, 0%), var(--pn-spotlight-y, 0%));transition-property:transform, width, height, border-radius;transition-duration:0.4s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-wizard")} .pn-wizard-highlight{transition-duration:0s;transition-delay:0s}}${n("pn-wizard")} .pn-wizard-content{position:absolute;z-index:1;background:#ffffff;border-radius:2em;max-width:20em;box-shadow:0 0 0.5em rgba(0, 0, 0, 0.3);left:0;top:0;transform:translate(var(--pn-wizard-content-x), var(--pn-wizard-content-y));transition-property:transform;transition-duration:0.4s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-wizard")} .pn-wizard-content{transition-duration:0s;transition-delay:0s}}@media (max-width: 55em){${n("pn-wizard")} .pn-wizard-content{position:fixed;top:unset;bottom:0;left:0.5em;border-radius:2em 2em 0 0;width:calc(100vw - 1em);max-width:unset;transform:none}}${n("pn-wizard")} .pn-wizard-cancel{position:absolute;top:1em;right:1em;z-index:10}${n("pn-wizard")} .pn-wizard-text{padding:3em 1em 1em;text-align:center;display:flex;flex-direction:column;flex-wrap:nowrap;gap:clamp(0.5em, 5vw, 1em)}${n("pn-wizard")} .pn-wizard-label{margin:0;font-size:clamp(1.25em, 5vw, 1.5em);font-weight:700;color:#2d2013}${n("pn-wizard")} .pn-wizard-helpertext{margin:0;font-size:clamp(0.875em, 5vw, 1em);font-weight:400;color:#5e554a}${n("pn-wizard")} .pn-wizard-controls{border-top:0.0625em solid #d3cecb;padding:1em;display:flex;justify-content:end;gap:0.5em;flex-wrap:wrap}${n("pn-wizard")} .pn-wizard-indicator{margin-right:auto;align-self:center;font-size:1em;color:#5e554a;padding:0 0.625em}${n("pn-wizard")} .pn-wizard-arrow{position:absolute;width:0;height:0;border:0.5em solid transparent;top:0;right:0;bottom:0;left:0;transition-property:top, right, bottom, left, border-color;transition-duration:0.4s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-wizard")} .pn-wizard-arrow{transition-duration:0s;transition-delay:0s}}${n("pn-wizard")} .pn-wizard-arrow[data-arrow=bottom]{top:100%;bottom:-0.9375em;left:var(--pn-arrow-offset);border-top-color:#ffffff}${n("pn-wizard")} .pn-wizard-arrow[data-arrow=top]{top:-0.9375em;left:var(--pn-arrow-offset);border-bottom-color:#ffffff}${n("pn-wizard")} .pn-wizard-arrow[data-arrow=right]{right:-0.9375em;left:100%;top:var(--pn-arrow-offset);border-left-color:#ffffff}${n("pn-wizard")} .pn-wizard-arrow[data-arrow=left]{left:-0.9375em;top:var(--pn-arrow-offset);border-right-color:#ffffff}${n("pn-wizard")} .pn-wizard-arrow[data-arrow=none]{border-color:transparent}`,U=class{constructor(t){r(this,"id",`pn-wizard-${V()}`);r(this,"wizardIdLabel");r(this,"wizardIdHelpertext");r(this,"wizardElement");r(this,"wizardContent");r(this,"wizardArrow");r(this,"timeoutRerender");r(this,"label","");r(this,"helpertext","");r(this,"language",null);r(this,"pnId",this.id);r(this,"step",-1);r(this,"steps",[]);r(this,"progress","");r(this,"scrollBlock","center");r(this,"displayOverflow",!1);r(this,"hideBack",!1);r(this,"hideNext",!1);
4r(this,"hideFinish",!1);r(this,"labelBack","");r(this,"labelNext","");r(this,"labelFinish","");r(this,"wizardStep");r(this,"wizardHighlightClick");r(this,"wizardClose");N(this,t),this.wizardStep=C(this,"wizardStep",7),this.wizardHighlightClick=C(this,"wizardHighlightClick",7),this.wizardClose=C(this,"wizardClose",7)}get hostElement(){return R(this)}handleStepChange(t,e){var i;if(t===-1){const s=e===this.steps.length;this.wizardClose.emit({step:s?e-1:e,finished:s})}if(!this.isActive()){(i=this.wizardElement)==null||i.close(),setTimeout(()=>this.handleDisplayOverflow(),O()?0:400);return}this.wizardElement.open||(this.runStepLogic(),requestAnimationFrame(()=>{var s;this.handleDisplayOverflow(),(s=this.wizardElement)==null||s.showModal()})),this.wizardStep.emit({step:t,next:t>(e??-1),prev:t<(e??-1)})}handleIdChange(){this.wizardIdLabel=`${this.pnId||this.id}-label`,this.wizardIdHelpertext=`${this.pnId||this.id}-helpertext`}handleOverflow(){this.isActive()&&(clearTimeout(this.timeoutRerender),this.timeoutRerender=setTimeout(()=>this.runStepLogic(),250))}async componentWillLoad(){this.language===null&&await D(this.hostElement)}componentDidRender(){requestAnimationFrame(()=>this.isActive()&&this.runStepLogic())}getRect(t){return t.getBoundingClientRect()}translate(t){var e;return((e=k==null?void 0:k[t])==null?void 0:e[this.language||X])||t}runStepLogic(){this.isOpen()&&this.scrollToElement(),this.highlightElement(),this.positionModal()}handleDisplayOverflow(){if(this.displayOverflow)return;const t=document.body,e=innerWidth-document.documentElement.clientWidth;this.isActive()?(t.style.setProperty("overflow","hidden"),t.style.setProperty("margin-right",`${e}px`)):(t.style.removeProperty("overflow"),t.style.removeProperty("margin-right"))}isActive(t=this.step){return t>=0&&t<this.steps.length}isOpen(){var t;return this.isActive()&&((t=this.wizardElement)==null?void 0:t.open)}isClosed(t=this.step){return t===-1}isFirstStep(){return this.step===0}isLastStep(t=this.step){return this.steps.length===1?!0:t===this.steps.length-1}isProgressDots(){return this.progress==="dots"}isProgressText(){return this.progress==="text"}renderProgress(){return 7>=this.steps.length&&(this.isProgressDots()||this.isProgressText())}showBackButton(){return!(this.hideBack||this.isClosed()||this.isFirstStep())}showNextButton(){return this.hideNext?!1:!this.isLastStep()||this.showFinishButton()}showFinishButton(){return!this.hideFinish&&this.isLastStep()}nextStep(){const t=this.step+1;this.step=t}prevStep(){const t=this.step-1;this.step=t}endWizard(){this.step=-1}getNextLabel(){const t=this.labelFinish||"FINISH",e=this.labelNext||"NEXT",i=this.isLastStep()?t:e;return this.translate(i)}getHighlightTarget(){const t=this.steps[this.step];return t?document.querySelector(t):null}getHighlightRect(){const t=this.getHighlightTarget();if(!t){this.resetToCenter();return}const e=this.getRect(t),i=parseFloat(getComputedStyle(t).margin)||0,s=e.top+window.scrollY-i,o=e.left+window.scrollX-i,m=e.width+i*2,p=e.height+i*2,w=parseFloat(getComputedStyle(t).borderRadius)||4;return{top:s,left:o,width:m,height:p,radius:w}}isInViewport(t){const{top:e,left:i,bottom:s,right:o}=t.getBoundingClientRect();return e>=0&&i>=0&&s<=(window.innerHeight||document.documentElement.clientHeight)&&o<=(window.innerWidth||document.documentElement.clientWidth)}scrollToElement(){const t=this.getHighlightTarget();!t||this.isInViewport(t)||t.scrollIntoView({behavior:"instant",block:this.scrollBlock})}highlightElement(){if(!this.getHighlightTarget())return this.resetToCenter();this.setHighlightVars(this.getHighlightRect())}resetToCenter(){const{width:t,height:e}=this.getWizardContentRect(),i=window.scrollY+window.innerHeight/2-e/2,s=window.scrollX+window.innerWidth/2-t/2;this.setHighlightVars({top:i,left:s,width:0,height:0,radius:0}),this.setModalVars({top:i,left:s}),this.setArrowVars("none",0)}getWizardContentRect(){return this.wizardContent?this.getRect(this.wizardContent):{width:0,height:0}}positionModal(){if(!this.getHighlightTarget())return;const e=16,i=e/2,{top:s,left:o,width:m,height:p}=this.getHighlightRect(),w=o+m/2,{width:g,height:d}=this.getWizardContentRect();let l=0,f=0;
4const{scrollY:b,scrollX:z,innerWidth:v,innerHeight:$}=window,E=v-document.documentElement.clientWidth,u=s+p+e+d<b+$,H=s-b>d+e,P=o-e-g>z,y=o+m+e+g<z+v,F=!u&&!H&&!P&&!y,I=u||H,A=P||y;let x=i,S=i;x=u?s+p+e:s-d-e,S=z+v-g-E-i;let c=0,h="top";I?(l=w-g/2,f=u?s+p+e:s-d-e,h=u?"top":"bottom",c=w-l):A?(l=y?o+m+e:o-g-e,f=s+p/2-d/2,x=b+$-d-i,h=y?"left":"right",c=d/2):F&&(l=w-g/2,f=s+p-d/2,x=b-d-i,h="top",c=w-l);const M=z+E||i;l=Math.max(M,Math.min(l,S)),f=Math.max(i,Math.min(f,x)),this.setModalVars({top:f,left:l}),Y()&&(h="top"),h==="top"||h==="bottom"?c=w-l:c=s+p/2-f;const T=h==="top"||h==="bottom"?g:d;c=Math.max(32,Math.min(c-i,T-32)),this.setArrowVars(h,c)}setHighlightVars({top:t,left:e,width:i,height:s,radius:o}){this.hostElement.style.setProperty("--pn-spotlight-x",`${Math.round(e)}px`),this.hostElement.style.setProperty("--pn-spotlight-y",`${Math.round(t)}px`),this.hostElement.style.setProperty("--pn-spotlight-width",`${Math.round(i)}px`),this.hostElement.style.setProperty("--pn-spotlight-height",`${Math.round(s)}px`),this.hostElement.style.setProperty("--pn-spotlight-radius",`${Math.round(o)}px`)}setModalVars({top:t,left:e}){this.hostElement.style.setProperty("--pn-wizard-content-x",`${Math.round(e)}px`),this.hostElement.style.setProperty("--pn-wizard-content-y",`${Math.round(t)}px`)}setArrowVars(t,e){this.wizardArrow.setAttribute("data-arrow",t),this.hostElement.style.setProperty("--pn-arrow-offset",`${Math.round(e)}px`)}render(){return a(B,{key:"3fbeaf58c3adc8ea380a81b93dc66fb8a6bece5c"},a("dialog",{key:"f0f94968cba2e2dc8baba4752d80a7bea862c929",id:this.pnId,"aria-labelledby":this.label?this.wizardIdLabel:null,"aria-describedby":this.helpertext?this.wizardIdHelpertext:null,class:"pn-wizard",ref:t=>this.wizardElement=t,onCancel:()=>this.endWizard(),onClose:()=>this.endWizard()},a("div",{key:"737f8207c19876c82c6a3d2418305fc7268ee251",class:"pn-wizard-overlay"},a("div",{key:"d420a48ad3b30828b4dd496f56073eea375bbe34",class:"pn-wizard-highlight",onClick:t=>this.wizardHighlightClick.emit(t)})),a("div",{key:"03d6e169d95b7fe7bdb65a31e839b5744db190d0",class:"pn-wizard-content",ref:t=>this.wizardContent=t},a("pn-button",{key:"3534ecbbd28f9171b0ba1adfa07a91a4a20a1dd1",class:"pn-wizard-cancel",arialabel:this.translate("CANCEL"),icon:_,iconOnly:!0,small:!0,appearance:"light",variant:"borderless",onPnClick:()=>this.endWizard()}),a("div",{key:"b1f3f3ddb93efe5201091d19df4ff22acde76391",class:"pn-wizard-text"},this.label&&a("h2",{key:"b689ff85832dd65814d30ca85c00b59281aef1d1",class:"pn-wizard-label",id:this.wizardIdLabel},this.label),this.helpertext&&a("p",{key:"6a978db802f3faa402435c84c233e84c3456f657",class:"pn-wizard-helpertext",id:this.wizardIdHelpertext},this.helpertext),a("slot",{key:"52d0440d5b470fd06eb3a0c21921d540c79c0ac9"}),this.renderProgress()&&a("pn-progress-stepper",{key:"63f08858ddef511b92d622a559fe3888b5a6508a",class:!this.isProgressDots()&&"pn-wizard-sr-only",totalSteps:this.steps.length,currentStep:this.step>0?this.step+1:1,dots:!0})),a("div",{key:"c5b266d5421f09bbc2ab199d6d71f5938dc8ae72",class:"pn-wizard-arrow",ref:t=>this.wizardArrow=t}),a("div",{key:"00aef3606f751ca56142fe2b0a6a08a36e4f92f3",class:"pn-wizard-controls"},this.isProgressText()&&a("span",{key:"d6c0c85554253580d65aa42742cdabf55158bfe5",class:"pn-wizard-indicator","aria-hidden":"true"},this.step+1,"/",this.steps.length),a("slot",{key:"76a1b7c69280ffbbc81f210acdfb8812b241329d",name:"buttons"}),this.showBackButton()&&a("pn-button",{key:"560aa03d06aec0b32ae94ee2264b6bd059b5f305",label:this.labelBack||this.translate("PREV"),small:!0,appearance:"light",variant:"outlined",onPnClick:()=>this.prevStep()}),this.showNextButton()&&a("pn-button",{key:"00d8a13c7ee3413aa2e3d751d101de41e228f866",label:this.getNextLabel(),small:!0,icon:q,onPnClick:()=>this.nextStep()})))))}
4static get watchers(){return{step:[{handleStepChange:0}],pnId:[{handleIdChange:1}]}}};U.style=j();export{U as pn_wizard};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.