1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4891],{40450:(t,e,s)=>{s.d(e,{p:()=>l,t:()=>c});var n=s(77532),i=s(12672);const a=(t,e=(()=>!0))=>Object.keys(t).reduce(((s,i)=>e({key:i,value:t[i]})?Object.assign(Object.assign({},s),(0,n.i)(t[i])?a(t[i],e):{[i]:t[i]}):s),{});class o{constructor(){this.storageKey="translations",this.supportedLanguages=["lv","ru","en"],this.translations={},this.mergedTranslations={},this.updateTranslations=async(t,e)=>{try{this.translations=await this.loadTranslations(t,e)}catch(t){}this.mergedTranslations=await this.mergeTranslations(e)},this.loadTranslations=async(t,e)=>{if(!t||!e)return Promise.reject(`Missing translation parameters - group (${t}), language (${e}).`);if(!this.supportedLanguages.includes(e))return Promise.reject(`Translations language "${e}" is not supported.`);if(this.translationsExist(t,e))return Promise.reject(`Translations for group (${t}) and language (${e}) already exist.`);const s=this.getCachedTranslations();return s[t]||(s[t]={}),s[t][e]=await((t,e)=>{let s;try{s=new URL(`${e}/${t}`,i.e.translations).href}catch(t){return console.error(t),Promise.reject("Translations endpoint URL generation failed.")}return(new i.A).setUrl(s).setOptions({method:"GET"}).setErrorFallbackValue({}).execute()})(t,e),this.cacheTranslations(s),Promise.resolve(s)},this.mergeTranslations=async t=>Promise.resolve(a(this.translations,(({key:e})=>!this.supportedLanguages.includes(e)||e===t))),this.translationsExist=(t,e)=>{var s,n;const i=null!==(n=null===(s=this.translations[t])||void 0===s?void 0:s[e])&&void 0!==n?n:{};return!(0===Object.keys(i).length)},this.getCachedTranslations=()=>{var t;return null!==(t=JSON.parse(sessionStorage.getItem(this.storageKey)))&&void 0!==t?t:{}},this.cacheTranslations=t=>{sessionStorage.setItem(this.storageKey,JSON.stringify(t))},this.translations=this.getCachedTranslations()}static getInstance(){return o.instance||(o.instance=new o),o.instance}getTranslations(){return this.mergedTranslations}}const r=o.getInstance(),l=async(t,e)=>{await r.updateTranslations(t,e)},c=(t,e)=>{var s,i;const a=r.getTranslations();let o=null!==(i=null!==(s=a[t.trim()])&&void 0!==s?s:a.lv)&&void 0!==i?i:t;return(0,n.i)(e)&&(o=h(o,e)),o},h=(t,e)=>{for(const[s,n]of Object.entries(e))t=t.replace(new RegExp(`{${s}}`,"g"),n);return t}},4891:(t,e,s)=>{s.r(e),s.d(e,{tet_multi_step_dialog:()=>a});var n=s(83420),i=s(40450);s(12672);const a=class{constructor(t){(0,n.r)(this,t),this.stepBlocks=[],this.setStepBlocks=t=>{t&&this.stepBlocks.push(t)},this.setActive=t=>{const e=Array.from(this.stepBlocks).find((t=>t.classList.contains("active"))),s=e?Number(e.getAttribute("data-step")):0,n=t?s-1:s+1,i=Array.from(this.stepBlocks),a=i.find((t=>Number(t.getAttribute("data-step"))===n));a&&(this.stepBlocks.forEach((t=>{t.style.display="none",t.classList.remove("active")})),a.classList.add("active"),a.style.display="block",this.updateButtonVisibility(n,i))},this.updateButtonVisibility=(t,e)=>{const s=e.find((e=>Number(e.getAttribute("data-step"))===t+1)),n=e.find((e=>Number(e.getAttribute("data-step"))===t-1));this.nextButton.style.display=s?"block":"none",this.prevButton.style.display=n?"block":"none",this.tetDialog.setAttribute("footer-display",s?n?"between":"right":"left")},this.handleKeydownEvent=t=>{["Enter"," "].includes(t.key)&&(this.isKeydownFocus=!0)},this.content="",this.steps=[],this.isOpen=!1,this.dialogDataScreenKey="",this.tetDialogClass="",this.language="lv",this.isKeydownFocus=!1}async componentWillLoad(){(0,i.p)("tet-components",this.language).then((()=>(0,n.f)(this)))}componentDidLoad(){this.setActive(!1),this.prevButton.addEventListener("click",(()=>{var t;this.setActive(!0),null===(t=this.prevButton.shadowRoot.querySelector("button"))||void 0===t||t.blur(),this.isKeydownFocus&&("none"!==this.prevButton.style.display?this.prevButton.focus():this.nextButton.focus())})),this.nextButton.addEventListener("click",(()=>{var t;this.setActive(!1),null===(t=this.nextButton.shadowRoot.querySelector("button"))||void 0===t||t.blur(),this.isKeydownFocus&&("none"!==this.nextButton.style.display?this.nextButton.focus():this.prevButton.focus())}))}renderStep(t,e){return(0,n.h)("div",{innerHTML:t,"data-step":Number(e)+1,class:"multi-step-dialog__step",ref:this.setStepBlocks})}render(){return(0,n.h)(n.H,{key:"b598910b807a91fd85aa0b465cff95b749c0f758",class:"multi-step-dialog"},(0,n.h)("tet-dialog",{key:"9b74cc784026f5e17a14a0b691abdb328702f4a5",class:this.tetDialogClass,"is-open":this.isOpen,"data-screen-key":this.dialogDataScreenKey,"footer-display":"right",ref:t=>this.tetDialog=t},(0,n.h)("div",{key:"56660aac23c2f1cc8b86fde1b6a51513898160cc",innerHTML:this.content}),this.steps.map(((t,e)=>this.renderStep(t,e))),(0,n.h)("tet-button",{key:"d5f21a9ac7e78ecf363a4dab08d806d7bdcb7b1f",class:"footer-button",slot:"footer",size:"medium",theme:"light",type:"secondary",ref:t=>this.prevButton=t,onKeyDown:t=>this.handleKeydownEvent(t)},(0,i.t)("components-go-back")),(0,n.h)("tet-button",{key:"1be410f7b4c67c03fa35724658eda630425b827a",class:"footer-button",slot:"footer",size:"medium",theme:"light",ref:t=>this.nextButton=t,onKeyDown:t=>this.handleKeydownEvent(t)},(0,i.t)("components-next-step"))))}}},77532:(t,e,s)=>{s.d(e,{a:()=>o,b:()=>a,c:()=>n,i:()=>i});const n=t=>t instanceof Promise,i=t=>!!t&&"object"==typeof t,a=t=>"function"==typeof t,o=t=>null==t}}]);
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.