PageSourceSearch

https://transportutvikling.no/dist/all/chunks/188-7099546d9723a0416922.js

js transportutvikling.no collected 2026-09-25 10:41:19 UTC 3,797 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkwips_components_scripts||=[]).push([[188],{"982984e90a7e2eb5"(e,a,l){l.r(a),l.d(a,{default:()=>h});var u=l("b641633d6c906d19"),t=l("82d8eefb58430341"),s=l("a54fa6d0a722ba3f"),o=l("0c402b9e75a52e9e"),n=l("eb0d7dd6674ec63a"),r=l("7076e9acf533d0ea"),c=l("ab5c7e913102dd40"),d=l("da19b2b0057d147a"),i=l("388ad1c32495da5d"),v=l("51075e8f671f51a9"),m=l("92c490e8e5efe9cd"),f=l("0bcd79699a3729e8");const b={class:"form-fields"},p={key:0,class:"button-wrapper"},w=(0,u.pM)({}),y=(0,u.pM)({...w,__name:"CourseUserConfirmForm",setup(e){const{t:a}=(0,c.s)(),{currentSearchParams:l}=(0,n.bP)((0,o.B)()),{course:w,courseAction:y}=(0,n.bP)((0,r.B)()),h=(0,u.EW)(()=>l.value.get("regId")),g=(0,u.EW)(()=>l.value.get("secret")),C=(0,s.IJ)(null),P=(0,s.IJ)(null),k=(0,s.KR)(""),F=(0,s.KR)(""),R=(0,s.KR)(""),$=(0,s.KR)(!1),{isLoggedIn:E}=(0,n.bP)((0,m.x)());function I(){const{replaceQueryParams:e}=(0,o.B)();e({secret:void 0,regId:void 0,salt:void 0,hash:void 0,"course-registration-id":void 0,"course-action":void 0})}(0,u.wB)(C,async()=>{"confirmed"==C.value?.status&&(await new Promise(e=>setTimeout(e,2500)),"confirm-user"==y.value&&E.value&&I())}),(0,u.nT)(()=>{if(!g.value||!h.value||!w.value?.id)return void(P.value=null);const e=new URL("/Api/v2/courses/"+w.value.id+"/registrations/"+h.value+"/user-account/confirm",location.href);e.searchParams.set("secret",g.value),P.value=e});const V=async()=>{if(!P.value)return void(C.value=null);const e=await fetch(P.value);e.ok?C.value=await e.json():C.value=null};async function X(){if(!$.value)try{if(R.value="",$.value=!0,null!==k.value.match(/[^a-zA-Z0-9ÆØÅæøå]/)?null!==k.value.match(/[^0-9]/)?null!==k.value.match(/[^a-zA-ZÆØÅæøå]/)?k.value!=F.value&&(R.value=a("Password confirmation is not equal to password")):R.value=a("Password must contain at least one letter"):R.value=a("Password must contain at least one number"):R.value=a("Password must contain at least one special character"),R.value)return;if(!P.value)return;const e=JSON.stringify({secret:g.value,password:k.value});(await fetch(P.value,{method:"post",headers:{"content-type":"application/json"},body:e})).ok||(R.value=a("Failed confirming user account, try again later")),await V()}finally{$.value=!1}}return(0,u.wB)(P,async()=>{await V()},{immediate:!0}),(e,l)=>((0,u.uX)(),(0,u.CE)("div",null,["unconfirmed"==C.value?.status?((0,u.uX)(),(0,u.CE)("form",{key:0,class:"v2
1-form",action:"",method:"post",onSubmit:(0,t.D$)(X,["stop","prevent"])},[R.value?((0,u.uX)(),(0,u.Wv)(v.default,{key:0,error:R.value},null,8,["error"])):(0,u.Q3)("",!0),(0,u.Lk)("div",b,[(0,u.bF)(d.default,{type:"text",label:e.$t("Username"),"model-value":C.value?.username,disabled:"",autocomplete:"username"},null,8,["label","model-value"]),(0,u.bF)(d.default,{type:"password",label:e.$t("Password"),modelValue:k.value,"onUpdate:modelValue":l[0]||(l[0]=e=>k.value=e),autofocus:"",required:"",minlength:5,autocomplete:"new-password"},null,8,["label","modelValue"]),(0,u.bF)(d.default,{type:"password",label:e.$t("Confirm password"),modelValue:F.value,"onUpdate:modelValue":l[1]||(l[1]=e=>F.value=e),required:"",minlength:5,autocomplete:"new-password"},null,8,["label","modelValue"]),(0,u.bF)(i.default,{type:"submit",label:e.$t("Confirm account"),disabled:$.value},null,8,["label","disabled"])])],32)):"confirmed"==C.value?.status?((0,u.uX)(),(0,u.CE)(u.FK,{key:1},[(0,u.bF)(v.default,{success:(0,s.R1)(a)("Course user account is successfully confirmed")},null,8,["success"]),(0,s.R1)(E)?((0,u.uX)(),(0,u.CE)("div",p,[(0,u.bF)(i.default,{type:"button",label:e.$t("Continue"),onClick:(0,t.D$)(I,["prevent"])},null,8,["label"])])):((0,u.uX)(),(0,u.Wv)(f.default,{key:1}))],64)):(0,u.Q3)("",!0)]))}}),h=(0,l("461bee8a7784aa7f").A)(y,[["__scopeId","data-v-ab4a599a"]])}}]);

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.