@kvass/widgets 1.9.19 → 1.9.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_plugin-vue_export-helper.js +8 -8
- package/dist/directories.js +1 -1
- package/dist/finn.js +2 -2
- package/dist/flatfinder.js +24 -23
- package/dist/google-search-console.js +1 -1
- package/dist/gsc-verification-key-form.js +1 -1
- package/dist/kvass-form.js +3 -3
- package/dist/nabolagsprofil.js +1 -1
- package/package.json +1 -1
package/dist/finn.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import{Z as inject,q as defineComponent,r as ref,c as createElementBlock,o as openBlock,j as createVNode,w as withCtx,v as unref,a as createBaseVNode,R as normalizeProps,S as guardReactiveProps,m as mergeProps,d as createCommentVNode,F as Fragment,e as createBlock,_ as _export_sfc,b as computed,i as onMounted,l as renderList,C as createTextVNode,t as toDisplayString,n as normalizeClass,J as mergeModels,K as useModel,z as withDirectives,V as createSlots,E as watch,g as renderSlot,a9 as useId,ad as resolveDirective,L as toRef,ae as withKeys,a1 as onUnmounted,af as KeepAlive,D as onBeforeUnmount,ac as onBeforeMount,f as resolveDynamicComponent,X as provide,p as defineCustomElement}from"./_plugin-vue_export-helper.js";import{a as Se,u as up,G as Go,T as TB,v as vB,_ as _r,B as Bf,U as Ue,S as SC,W as Wo,z as zB,f as fB,A as AB,g as gx,h as hy,I as IB,e as BB,$ as $B,N as NB,L as LB,b as hd,m as mB,E as EB}from"./index.es2.js";import{u as useCurrentElement}from"./index2.js";import{V as Vt,b as bt,M as Mt,f as floatingUi}from"./style.js";import{e as toCurrency,C as Clone,h as hasDiff,u as uploadFunction,i as Diff}from"./index.js";import{n as nbMessages}from"./nb_NO.js";const PropsInjectionKey=Symbol("props");function _isPlaceholder(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function _curry1(e){return function t(a){return arguments.length===0||_isPlaceholder(a)?t:e.apply(this,arguments)}}function _curry2(e){return function t(a,r){switch(arguments.length){case 0:return t;case 1:return _isPlaceholder(a)?t:_curry1(function(i){return e(a,i)});default:return _isPlaceholder(a)&&_isPlaceholder(r)?t:_isPlaceholder(a)?_curry1(function(i){return e(i,r)}):_isPlaceholder(r)?_curry1(function(i){return e(a,i)}):e(a,r)}}}function _curry3(e){return function t(a,r,i){switch(arguments.length){case 0:return t;case 1:return _isPlaceholder(a)?t:_curry2(function(n,s){return e(a,n,s)});case 2:return _isPlaceholder(a)&&_isPlaceholder(r)?t:_isPlaceholder(a)?_curry2(function(n,s){return e(n,r,s)}):_isPlaceholder(r)?_curry2(function(n,s){return e(a,n,s)}):_curry1(function(n){return e(a,r,n)});default:return _isPlaceholder(a)&&_isPlaceholder(r)&&_isPlaceholder(i)?t:_isPlaceholder(a)&&_isPlaceholder(r)?_curry2(function(n,s){return e(n,s,i)}):_isPlaceholder(a)&&_isPlaceholder(i)?_curry2(function(n,s){return e(n,r,s)}):_isPlaceholder(r)&&_isPlaceholder(i)?_curry2(function(n,s){return e(a,n,s)}):_isPlaceholder(a)?_curry1(function(n){return e(n,r,i)}):_isPlaceholder(r)?_curry1(function(n){return e(a,n,i)}):_isPlaceholder(i)?_curry1(function(n){return e(a,r,n)}):e(a,r,i)}}}function _has(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function _isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}var mergeWithKey=_curry3(function(t,a,r){var i={},n;a=a||{},r=r||{};for(n in a)_has(n,a)&&(i[n]=_has(n,r)?t(n,a[n],r[n]):a[n]);for(n in r)_has(n,r)&&!_has(n,i)&&(i[n]=r[n]);return i}),mergeDeepWithKey=_curry3(function e(t,a,r){return mergeWithKey(function(i,n,s){return _isObject(n)&&_isObject(s)?e(t,n,s):t(i,n,s)},a,r)}),mergeDeepRight=_curry2(function(t,a){return mergeDeepWithKey(function(r,i,n){return n},t,a)});async function fetch$1(e,t={}){return fetch(e,mergeDeepRight({headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include"},t)).then(r=>{if(!r.ok)throw r;return r})}function SSE(e){const t=new TextDecoder,a=[],r=s=>t.decode(s).split(`
|
|
2
|
-
`).map(l=>{if(l)return JSON.parse(l.replace("data: ",""))}).filter(Boolean),i=e.body.getReader(),n=(s,l)=>a.filter(o=>o.event===s).forEach(o=>o.callback(l));return i.read().then(function s({done:l,value:o}){return l?n("finished"):(r(o).forEach(f=>n(f.event,f.payload)),i.read().then(s))}),{on:(s,l)=>{a.push({event:s,callback:l})},cancel:()=>{i.cancel()}}}function useAPI(e){const t=inject(PropsInjectionKey),a=y=>new URL(`${t.tenant}/api/integration/${t.integrationId}/callbacks/${y}`);return{getAds:y=>{const p=a("data");return y&&p.searchParams.append("id",y),fetch$1(p.toString(),{method:"GET",headers:{authorization:`Bearer ${t.token}`}}).then(x=>x.json())},navigateView:(y,p)=>{const x=a(y);x.searchParams.append("token",t.token),x.searchParams.append("project",t.project),p&&x.searchParams.append("id",p),e.value.dispatchEvent(new CustomEvent("action",{detail:{type:"navigate",value:{name:"form",query:{target:x.toString()}}},bubbles:!0,composed:!0}))},remove:y=>{const p=a("unpublish");return p.searchParams.append("id",y),fetch$1(p.toString(),{method:"DELETE",headers:{authorization:`Bearer ${t.token}`}}).catch(x=>{throw console.error(x),x})},publish:async(y,p={})=>{const{preview:x=!1,publish:k=!0}=p,g=a("publish"),S=await fetch$1(g.toString(),{method:"POST",cache:"no-cache",keepalive:!0,headers:{Authorization:`Bearer ${t.token}`,"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({data:y,preview:x,publish:k})});return SSE(S)},unpublish:y=>{const p=a("unpublish");return p.searchParams.append("id",y),fetch$1(p.toString(),{method:"POST",headers:{authorization:`Bearer ${t.token}`}})},navigateProjectStep:y=>{e.value.dispatchEvent(new CustomEvent("action",{detail:{type:"navigate",value:{name:"project-edit",params:{id:t.project,step:y}}},bubbles:!0,composed:!0}))},getUnits:()=>{const y=a("units");return fetch$1(y.toString(),{method:"GET",headers:{authorization:`Bearer ${t.token}`}}).then(p=>p.json())},fields:y=>{const p=a("fields");return fetch$1(p.toString(),{method:"POST",headers:{authorization:`Bearer ${t.token}`},body:JSON.stringify({type:y.type,units:y.units.map(x=>x.id)})}).then(x=>x.json())}}}const _sfc_main$k=defineComponent({__name:"Options.ce",props:{item:{type:null}},emits:["refetch"],setup(e,{emit:t}){const a=useCurrentElement(),r=useAPI(a),i=t,n=ref(),s=ref(),l=ref(),o=(u,y)=>{sessionStorage.setItem("k-finn-step",y?"preview":"publish"),r.navigateView("mutate",u)},f=u=>{sessionStorage.setItem("k-finn-step","ad"),r.navigateView("mutate",u)};return(u,y)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(up),{teleport:!1,closeOnOutsideClick:!0,variant:"prompt",ref_key:"removedialog",ref:s,class:"remove-dialog",title:"Du er i ferd med å slette annonsen"},{trigger:withCtx(({triggerProps:p})=>[createVNode(unref(Se),mergeProps({style:{display:"none"}},p),null,16)]),default:withCtx(({descriptionProps:p})=>[createBaseVNode("div",normalizeProps(guardReactiveProps(p))," Du er i ferd med å slette din Finn-annonse. Vi gjør oppmerksom på at annonsen avsluttes i sin helhet, du vil eventuelt miste resterende betalt periode hos Finn. Er du sikker? ",16)]),actions:withCtx(({close:p})=>[createVNode(unref(Se),{label:"Nei, ta meg tilbake",onClick:p},null,8,["onClick"]),createVNode(unref(Se),{label:"Ja, jeg ønsker å slette",variant:"primary",promise:n.value,onSuccess:()=>{p(),i("refetch")},onClick:y[0]||(y[0]=()=>n.value=unref(r).remove(u.item.id))},null,8,["promise","onSuccess"])]),_:1},512),createVNode(unref(up),{teleport:!1,closeOnOutsideClick:!0,variant:"prompt",ref_key:"unpublishdialog",ref:l,class:"unpublish-dialog",title:"Du er i ferd med å avpublisere annonsen"},{trigger:withCtx(({triggerProps:p})=>[createVNode(unref(Se),mergeProps({style:{display:"none"}},p),null,16)]),default:withCtx(({descriptionProps:p})=>[createBaseVNode("div",normalizeProps(guardReactiveProps(p))," Du er i ferd med å avpublisere din Finn-annonse. Vi gjør oppmerksom på at perioden for annonsen vil fortsette å løpe til utløpsdato. ",16)]),actions:withCtx(({close:p})=>[createVNode(unref(Se),{label:"Nei, ta meg tilbake",onClick:p},null,8,["onClick"]),createVNode(unref(Se),{label:"Ja, jeg ønsker å avpublisere",variant:"primary",promise:n.value,onSuccess:()=>{p(),i("refetch")},onClick:y[1]||(y[1]=()=>n.value=unref(r).unpublish(u.item.id))},null,8,["promise","onSuccess"])]),_:1},512),createVNode(unref(Go),{label:"Endre",keepOpen:"",teleport:!1,class:"options"},{default:withCtx(()=>[createVNode(unref(Se),{iconRight:"fa-pro-light:pen",label:"Rediger",onClick:y[2]||(y[2]=()=>f(u.item.id)),variant:"tertiary"}),u.item.code?(openBlock(),createElementBlock(Fragment,{key:0},[!u.item.publishedAt||u.item.preview?(openBlock(),createBlock(unref(Se),{key:0,iconRight:"fa-pro-light:arrow-right",label:"Publiser",onClick:y[3]||(y[3]=()=>o(u.item.id,u.item.preview)),variant:"tertiary"})):createCommentVNode("",!0),u.item.publishedAt?(openBlock(),createBlock(unref(Se),{key:1,iconRight:"fa-pro-light:play-pause",label:"Avpubliser",onClick:y[4]||(y[4]=()=>{l.value.open()}),variant:"tertiary"})):createCommentVNode("",!0)],64)):createCommentVNode("",!0),createVNode(unref(Se),{"data-type":"delete",class:"options__delete",variant:"danger",label:"Slett",iconRight:"fa-pro-light:trash-xmark",onClick:y[5]||(y[5]=()=>{s.value.open()})})]),_:1})],64))}}),_style_0$e=".k-button.options__delete{color:var(--k-button-danger-background, var(--k-ui-color-danger));background-color:var(--k-button-danger-text, white)}.k-button.options__delete:focus,.k-button.options__delete:active,.k-button.options__delete:hover{color:var(--k-button-danger-text, white)}.unpublish-dialog,.remove-dialog{--k-dialog-min-width: 400px;--k-dialog-max-width: 600px}",Options=_export_sfc(_sfc_main$k,[["styles",[_style_0$e]]]),_sfc_main$j=defineComponent({__name:"Dashboard.ce",setup(e){const t=useCurrentElement(),a=useAPI(t),r=ref([]),i=ref(!1),n=computed(()=>[{id:"name",label:"Kampanjenavn"},{id:"status",label:"Status"},{id:"published",label:"Publisert"},{id:"insight",label:""},{id:"url",label:""},{id:"edit",label:""}]),s=f=>f.code?f.publishedAt?f.preview?{label:"Utkast - Forhåndsvisning",variant:"info"}:{label:"Aktiv",variant:"success"}:{label:"Avpublisert",variant:"danger"}:{label:"Utkast",variant:"neutral"},l=f=>{if(!f.code||!f.publishedAt||f.preview)return"-";const u={year:"numeric",month:"numeric",day:"numeric"};return new Date(f.publishedAt).toLocaleString("nb-NO",u)};ref();const o=()=>{i.value=!0,a.getAds().then(f=>{r.value=f}).finally(()=>{i.value=!1})};return onMounted(()=>{o()}),(f,u)=>(openBlock(),createBlock(unref(SC),{class:"ads",title:"Dine Finn-annonser",subtitle:"Her får du en oversikt over dine Finn-annonser.",variant:"prompt",appearance:"shadow"},{default:withCtx(()=>[r.value.length&&!i.value?(openBlock(),createBlock(unref(TB),{key:0,items:r.value,columns:n.value},{name:withCtx(({item:y})=>[createTextVNode(toDisplayString(y.name),1)]),status:withCtx(({item:y})=>[createVNode(unref(vB),mergeProps(s(y),{appearance:"filled"}),null,16)]),published:withCtx(({item:y})=>[createTextVNode(toDisplayString(l(y)),1)]),url:withCtx(({item:y})=>[y.url?(openBlock(),createElementBlock(Fragment,{key:0},[y.units.some(p=>p.url)?(openBlock(),createBlock(unref(Go),{key:0,label:"Se annonser"},{default:withCtx(()=>[createVNode(unref(Se),{variant:"tertiary",iconRight:"fa-pro-light:arrow-up-right-from-square",label:"Prosjektannonse",target:"_blank",is:"a",href:y.url},null,8,["href"]),(openBlock(!0),createElementBlock(Fragment,null,renderList(y.units,p=>(openBlock(),createBlock(unref(Se),{variant:"tertiary",label:`${p.name}`,target:"_blank",is:"a",href:p.url,iconRight:"fa-pro-light:arrow-up-right-from-square"},null,8,["label","href"]))),256))]),_:2},1024)):(openBlock(),createBlock(unref(Se),{key:1,iconRight:"fa-pro-light:arrow-up-right-from-square",label:"Se annonse",target:"_blank",is:"a",href:y.url},null,8,["href"]))],64)):createCommentVNode("",!0)]),insight:withCtx(({item:y})=>[!y.preview&&y.statistics?(openBlock(),createBlock(unref(Se),{key:0,iconRight:"fa-pro-light:arrow-up-right-from-square",label:"Se innsikt",target:"_blank",is:"a",href:y.statistics},null,8,["href"])):createCommentVNode("",!0)]),edit:withCtx(({item:y})=>[(openBlock(),createBlock(Options,{item:y,onRefetch:u[0]||(u[0]=()=>o()),key:y.id},null,8,["item"]))]),_:1},8,["items","columns"])):createCommentVNode("",!0),i.value?(openBlock(),createBlock(unref(_r),{key:1,direction:"column",align:"center"},{default:withCtx(()=>[createVNode(unref(Bf),{size:"large"})]),_:1})):createCommentVNode("",!0),!i.value&&!r.value.length?(openBlock(),createBlock(unref(_r),{key:2,direction:"column",align:"center",class:"ads__empty"},{default:withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-thin:face-sleeping"}),u[1]||(u[1]=createBaseVNode("div",null,"Fant ingen annonser",-1))]),_:1,__:[1]})):createCommentVNode("",!0)]),_:1}))}}),_style_0$d=".ads .k-datatable{position:initial}.ads__empty{font-size:1rem}.ads__empty svg{padding-block:var(--k-ui-spacing);opacity:var(--k-ui-opacity-faded);font-size:5rem}",Dashboard=_export_sfc(_sfc_main$j,[["styles",[_style_0$d]]]),_sfc_main$i=defineComponent({__name:"Tooltip.ce",props:{src:{type:String},content:{type:String}},setup(e){return(t,a)=>(openBlock(),createBlock(unref(Vt),{container:!1},{popper:withCtx(()=>[t.content?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass({"k-mb-sm":t.src})},toDisplayString(t.content),3)):createCommentVNode("",!0),t.src?(openBlock(),createBlock(unref(Wo),{key:1,class:"tooltip__image",src:t.src,width:"100%",size:"cover","aspect-ratio":"16/9"},null,8,["src"])):createCommentVNode("",!0)]),default:withCtx(()=>[createVNode(unref(Ue),{icon:"material-symbols:question-mark",class:"v-popper__icon"})]),_:1}))}}),_style_0$c=".tooltip__image{border-radius:var(--k-ui-rounding)}",Tooltip=_export_sfc(_sfc_main$i,[["styles",[_style_0$c]]]),houseBuildingTypes=["detached","flat","semidetached","terraced","leisure","fourPlex","chainLinkedHouse","boatBerth","boathouse"],Categories=[{type:"ESTATE_PLANNED",label:"Kommer for salg",sublabel:"Nye boliger, kommer for salg",group:"Nybygg",disabled:e=>{if(!e.length)return!1;const t=["draft","upcoming"];return!e.some(a=>a.saleType==="sale"&&t.includes(a.status.value))},disabledReason:'Du må ha enheter merket som "kommer for salg".'},{type:"ESTATE_PROJECT",label:"Boliger",sublabel:"Nye boliger til salgs",group:"Nybygg",unitType:"ESTATE_PROJECT_UNIT",disabled:e=>{if(!e.length)return!0;const t=houseBuildingTypes.filter(a=>a!=="leisure");return!e.some(a=>a.saleType==="sale"&&t.includes(a.propertyType.value))},disabledReason:"Du må ha boligtypeenheter til salgs"},{type:"ESTATE_PROJECT_SINGLE",label:"Enkelt enhet",sublabel:"Nye boliger til salgs enkelt enhet",group:"Nybygg",disabled:e=>{if(!e.length)return!1;const t=houseBuildingTypes;return!e.some(a=>a.saleType==="sale"&&t.includes(a.propertyType.value))},disabledReason:"Du må ha boligtypeenheter eller hytteenheter til salgs."},{type:"ESTATE_PROJECT_LEISURE",label:"Hytter",sublabel:"Nye boliger til salgs hytte",group:"Nybygg",unitType:"ESTATE_PROJECT_UNIT_LEISURE",disabled:e=>{if(!e.length)return!0;const t=["leisure"];return!e.some(a=>a.saleType==="sale"&&t.includes(a.propertyType.value))},disabledReason:"Du må ha hytteenheter til salgs"},{type:"ESTATE_BUSINESS_SALE",label:"Til salgs",sublabel:"Næringseiendommer til salgs",group:"Næring",disabled:e=>{if(!e.length)return!1;const t=houseBuildingTypes;return!e.some(a=>a.saleType==="sale"&&!t.includes(a.propertyType.value))},disabledReason:"Du må ha flere enheter til salgs enn bare boligtyper og hytter"},{type:"ESTATE_BUSINESS_RENT",label:"Til leie",sublabel:"Næringseiendommer til leie",group:"Næring",disabled:e=>e.length?!e.some(t=>t.saleType==="rent"):!1,disabledReason:"Du må ha enheter til leie"},{type:"PLOT_SALE",label:"Tomt/Fritidstomt",sublabel:"Boligtomt/Fritidstomt til salgs",group:"Tomter",disabled:e=>{if(!e.length)return!1;const t=["plot","leisurePlot"];return!e.some(a=>a.saleType==="sale"&&t.includes(a.propertyType.value))},disabledReason:"Du må ha tomteenheter eller fritidstomter til salgs"},{type:"ESTATE_RENT",label:"Bruktbolig",sublabel:"Bolig til leie",group:"Leie",disabled:e=>e.length?!e.some(t=>t.saleType==="rent"):!1,disabledReason:"Du må ha enheter til leie"}];zB.setLabels(nbMessages);const _hoisted_1$3={class:"category__label"},_hoisted_2$1={class:"category__sublabel"},_hoisted_3={class:"category__group"},_hoisted_4={class:"category__label"},_hoisted_5={class:"category__sublabel"},_sfc_main$h=defineComponent({__name:"Type.ce",props:mergeModels({onNext:{type:null},onPrev:{type:null},units:{type:Array}},{modelValue:{default:{}},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=useCurrentElement(),a=useAPI(t),r=inject(PropsInjectionKey),i=e,n=useModel(e,"modelValue"),s=computed(()=>{const T=Categories.reduce((R,B)=>(R[B.group]||(R[B.group]=[]),R[B.group].push(B),R),{});return Object.entries(T).map(([R,B])=>({group:R,items:B}))}),l=computed(()=>Categories.find(T=>T.type===n.value.type)),o=computed(()=>[{id:"name",label:"Navn",sort:!0},{id:"type",label:"Enhetstype",sort:!0},{id:"status",label:"Status",sort:!0},{id:"price",label:"Pris",sort:!0}]),f=T=>{switch(T){case"upcoming":return"info";case"sale":return"success";case"reserved":return"warning";case"sold":return"danger";default:return"neutral"}};function u(T){return T.disabled}const y=()=>{i.onNext()},p=ref({name:1}),x=computed(()=>i.units.sort((T,M)=>{let[R]=Object.keys(p.value),[B]=Object.values(p.value);const G=P=>R==="status"?P[R].label:R==="type"?P.propertyType.label:P[R],O=G(T),N=G(M),U=B<0,L=!isNaN(O),z=!isNaN(N);return L&&z?U?N-O:O-N:typeof O=="string"&&typeof N=="string"?U?N.localeCompare(O,"nb-NO",{numeric:!0,sensitivity:"base"}):O.localeCompare(N,"nb-NO",{numeric:!0,sensitivity:"base"}):0})),k=computed({get(){return x.value.filter(T=>n.value.units.some(M=>M.id===T.id))},set(T){n.value.units=T.map(M=>{const{price:R,propertyType:B,status:G,disabled:O,saleType:N,disabledReason:U,...L}=M;return{fields:{},...L}})}}),g=computed(()=>o.value.filter(T=>T.sort).map(T=>T.id)),S=computed(()=>{const T={name:"required",type:"required"};return l.value?.type==="ESTATE_PROJECT_SINGLE"&&n.value.units.length?{units:"size:1",...T}:["ESTATE_PROJECT","ESTATE_PROJECT_LEISURE"].includes(l.value?.type||"")?{units:"min:1",...T}:T}),c=computed(()=>({name:"Internt navn",type:"Annonse-kategori",units:"enhet"})),d=computed(()=>({min:`Du må minimum velge :min :attribute når "${Categories.find(T=>T.type==="ESTATE_PROJECT")?.label}" eller "${Categories.find(T=>T.type==="ESTATE_PROJECT_LEISURE")?.label}" er valgt som annonse-kategori`,size:`Du kan kun velge :size :attribute når "${Categories.find(T=>T.type==="ESTATE_PROJECT_SINGLE")?.label}" er valgt som annonse-kategori`})),m=fB({rules:S,labels:c,data:n,customMessages:d}),{bind:b}=m,E=ref();return onMounted(()=>{const T=E.value?.$el;if(!T)return;let M=T.querySelectorAll('[data-scope="checkbox"][data-part="root"][data-disabled]');const R=x.value.filter(B=>B.disabled);M.forEach((B,G)=>{const O=R[G].disabledReason;bt(B,{container:!1,triggers:["hover","focus"],content:O,placements:"auto",preventOverflow:!0},null)})}),(T,M)=>(openBlock(),createBlock(unref(SC),{class:"type",title:"Grunnlag for Finn-annonsen",variant:"prompt",appearance:"shadow",subtitle:"Definer annonsen sitt interne navn, annonse-kategorien definerer hvor den plasseres på Finn."},{default:withCtx(()=>[createVNode(unref(AB),{columns:"2",gap:"4rem 2rem"},{default:withCtx(()=>[createVNode(unref(gx),normalizeProps(guardReactiveProps(unref(b)("name"))),{label:withCtx(()=>[M[5]||(M[5]=createBaseVNode("span",null,"Internt navn på Finn-annonse ",-1)),createVNode(Tooltip,{content:"Det interne navnet gjør det lettere å finne annonsen i oversikten over Finn-annonsene på prosjektet, spesielt hvis du planlegger å ha flere annonser på samme prosjekt!"})]),default:withCtx(()=>[createVNode(unref(hy),{modelValue:n.value.name,"onUpdate:modelValue":M[0]||(M[0]=R=>n.value.name=R)},null,8,["modelValue"])]),_:1},16),createVNode(unref(gx),mergeProps(unref(b)("type"),{help:"Dette legger annonsen på riktig boligtype på Finn"}),{label:withCtx(()=>[M[6]||(M[6]=createBaseVNode("span",null," Velg annonse-kategori ",-1)),createVNode(Tooltip,{content:"En annonse-kategori gjør det mulig å bestemme ønsket plass i Finn for din type annonse. Dersom du for eksempel skal leie ut en bolig kan du benytte bolig til leie. Annonsen vil deretter plasseres på bolig til leie på Finn."})]),default:withCtx(()=>[createVNode(unref(Go),{teleport:!1,disabled:!!unref(r).id,label:"Velg...",class:"category"},createSlots({default:withCtx(({close:R})=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(s.value,B=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",_hoisted_3,toDisplayString(B.group),1),(openBlock(!0),createElementBlock(Fragment,null,renderList(B.items,G=>withDirectives((openBlock(),createBlock(unref(Se),{variant:"tertiary",onClick:()=>{n.value.type=G.type,R()},disabled:G.disabled(T.units)},{default:withCtx(()=>[createVNode(unref(_r),{class:"category__label-wrapper"},{default:withCtx(()=>[createBaseVNode("div",_hoisted_4,toDisplayString(G.label),1),createBaseVNode("div",_hoisted_5,toDisplayString(G.sublabel),1)]),_:2},1024)]),_:2},1032,["onClick","disabled"])),[[unref(Mt),{content:G.disabledReason,disabled:!G.disabled(T.units),container:!1}]])),256))],64))),256))]),_:2},[l.value?{name:"trigger",fn:withCtx(()=>[createVNode(unref(_r),{class:"category__label-wrapper"},{default:withCtx(()=>[createBaseVNode("div",_hoisted_1$3,toDisplayString(l.value.label),1),createBaseVNode("div",_hoisted_2$1,toDisplayString(l.value.sublabel),1)]),_:1})]),key:"0"}:void 0]),1032,["disabled"])]),_:1},16),x.value.length?(openBlock(),createBlock(unref(gx),{key:0,label:"Velg hvilke enheter du vil publisere i Finn-annonse",class:"k-grid-span-full"},{default:withCtx(()=>[createVNode(unref(IB),{is:"div",appearance:"indicator",treshhold:200,class:"table-scroller"},{default:withCtx(()=>[createVNode(unref(TB),{ref_key:"unitTable",ref:E,sticky:!0,sortableBy:g.value,sortBy:p.value,"onUpdate:sortBy":M[1]||(M[1]=R=>p.value=R),columns:o.value,items:x.value,selected:k.value,"onUpdate:selected":M[2]||(M[2]=R=>k.value=R),isDisabled:u},{name:withCtx(({item:R})=>[createTextVNode(toDisplayString(R.name),1)]),type:withCtx(({item:R})=>[createTextVNode(toDisplayString(R.propertyType.label),1)]),status:withCtx(({item:R})=>[createVNode(unref(vB),{appearance:"filled",variant:f(R.status.value),rounded:!0},{default:withCtx(()=>[createTextVNode(toDisplayString(R.status.label),1)]),_:2},1032,["variant"])]),price:withCtx(({item:R})=>[createTextVNode(toDisplayString(unref(toCurrency)(R.price)),1)]),_:1},8,["sortableBy","sortBy","columns","items","selected"])]),_:1})]),_:1})):createCommentVNode("",!0)]),_:1})]),actions:withCtx(()=>[createVNode(unref(Se),{label:"Avbryt",variant:"secondary",onClick:M[3]||(M[3]=()=>unref(a).navigateView("dashboard"))}),withDirectives(createVNode(unref(Se),{label:"Neste",variant:"primary","icon-right":"fa-pro-solid:arrow-right",disabled:!unref(m).passes.value,onClick:M[4]||(M[4]=()=>y())},null,8,["disabled"]),[[unref(Mt),{content:Object.entries(unref(m).errors.value.errors).map(([R,B])=>B).flat().join(`
|
|
2
|
+
`).map(l=>{if(l)return JSON.parse(l.replace("data: ",""))}).filter(Boolean),i=e.body.getReader(),n=(s,l)=>a.filter(o=>o.event===s).forEach(o=>o.callback(l));return i.read().then(function s({done:l,value:o}){return l?n("finished"):(r(o).forEach(f=>n(f.event,f.payload)),i.read().then(s))}),{on:(s,l)=>{a.push({event:s,callback:l})},cancel:()=>{i.cancel()}}}function useAPI(e){const t=inject(PropsInjectionKey),a=y=>new URL(`${t.tenant}/api/integration/${t.integrationId}/callbacks/${y}`);return{getAds:y=>{const p=a("data");return y&&p.searchParams.append("id",y),fetch$1(p.toString(),{method:"GET",headers:{authorization:`Bearer ${t.token}`}}).then(x=>x.json())},navigateView:(y,p)=>{const x=a(y);x.searchParams.append("token",t.token),x.searchParams.append("project",t.project),p&&x.searchParams.append("id",p),e.value.dispatchEvent(new CustomEvent("action",{detail:{type:"navigate",value:{name:"form",query:{target:x.toString()}}},bubbles:!0,composed:!0}))},remove:y=>{const p=a("unpublish");return p.searchParams.append("id",y),fetch$1(p.toString(),{method:"DELETE",headers:{authorization:`Bearer ${t.token}`}}).catch(x=>{throw console.error(x),x})},publish:async(y,p={})=>{const{preview:x=!1,publish:k=!0}=p,g=a("publish"),S=await fetch$1(g.toString(),{method:"POST",cache:"no-cache",keepalive:!0,headers:{Authorization:`Bearer ${t.token}`,"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({data:y,preview:x,publish:k})});return SSE(S)},unpublish:y=>{const p=a("unpublish");return p.searchParams.append("id",y),fetch$1(p.toString(),{method:"POST",headers:{authorization:`Bearer ${t.token}`}})},navigateProjectStep:y=>{e.value.dispatchEvent(new CustomEvent("action",{detail:{type:"navigate",value:{name:"project-edit",params:{id:t.project,step:y}}},bubbles:!0,composed:!0}))},getUnits:()=>{const y=a("units");return fetch$1(y.toString(),{method:"GET",headers:{authorization:`Bearer ${t.token}`}}).then(p=>p.json())},fields:y=>{const p=a("fields");return fetch$1(p.toString(),{method:"POST",headers:{authorization:`Bearer ${t.token}`},body:JSON.stringify({type:y.type,units:y.units.map(x=>x.id)})}).then(x=>x.json())}}}const _sfc_main$k=defineComponent({__name:"Options.ce",props:{item:{type:Object}},emits:["refetch"],setup(e,{emit:t}){const a=useCurrentElement(),r=useAPI(a),i=t,n=ref(),s=ref(),l=ref(),o=(u,y)=>{sessionStorage.setItem("k-finn-step",y?"preview":"publish"),r.navigateView("mutate",u)},f=u=>{sessionStorage.setItem("k-finn-step","ad"),r.navigateView("mutate",u)};return(u,y)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(up),{teleport:!1,closeOnOutsideClick:!0,variant:"prompt",ref_key:"removedialog",ref:s,class:"remove-dialog",title:"Du er i ferd med å slette annonsen"},{trigger:withCtx(({triggerProps:p})=>[createVNode(unref(Se),mergeProps({style:{display:"none"}},p),null,16)]),default:withCtx(({descriptionProps:p})=>[createBaseVNode("div",normalizeProps(guardReactiveProps(p))," Du er i ferd med å slette din Finn-annonse. Vi gjør oppmerksom på at annonsen avsluttes i sin helhet, du vil eventuelt miste resterende betalt periode hos Finn. Er du sikker? ",16)]),actions:withCtx(({close:p})=>[createVNode(unref(Se),{label:"Nei, ta meg tilbake",onClick:p},null,8,["onClick"]),createVNode(unref(Se),{label:"Ja, jeg ønsker å slette",variant:"primary",promise:n.value,onSuccess:()=>{p(),i("refetch")},onClick:y[0]||(y[0]=()=>n.value=unref(r).remove(u.item.id))},null,8,["promise","onSuccess"])]),_:1},512),createVNode(unref(up),{teleport:!1,closeOnOutsideClick:!0,variant:"prompt",ref_key:"unpublishdialog",ref:l,class:"unpublish-dialog",title:"Du er i ferd med å avpublisere annonsen"},{trigger:withCtx(({triggerProps:p})=>[createVNode(unref(Se),mergeProps({style:{display:"none"}},p),null,16)]),default:withCtx(({descriptionProps:p})=>[createBaseVNode("div",normalizeProps(guardReactiveProps(p))," Du er i ferd med å avpublisere din Finn-annonse. Vi gjør oppmerksom på at perioden for annonsen vil fortsette å løpe til utløpsdato. ",16)]),actions:withCtx(({close:p})=>[createVNode(unref(Se),{label:"Nei, ta meg tilbake",onClick:p},null,8,["onClick"]),createVNode(unref(Se),{label:"Ja, jeg ønsker å avpublisere",variant:"primary",promise:n.value,onSuccess:()=>{p(),i("refetch")},onClick:y[1]||(y[1]=()=>n.value=unref(r).unpublish(u.item.id))},null,8,["promise","onSuccess"])]),_:1},512),createVNode(unref(Go),{label:"Endre",keepOpen:"",teleport:!1,class:"options"},{default:withCtx(()=>[createVNode(unref(Se),{iconRight:"fa-pro-light:pen",label:"Rediger",onClick:y[2]||(y[2]=()=>f(u.item.id)),variant:"tertiary"}),u.item.code?(openBlock(),createElementBlock(Fragment,{key:0},[!u.item.publishedAt||u.item.preview?(openBlock(),createBlock(unref(Se),{key:0,iconRight:"fa-pro-light:arrow-right",label:"Publiser",onClick:y[3]||(y[3]=()=>o(u.item.id,u.item.preview)),variant:"tertiary"})):createCommentVNode("",!0),u.item.publishedAt?(openBlock(),createBlock(unref(Se),{key:1,iconRight:"fa-pro-light:play-pause",label:"Avpubliser",onClick:y[4]||(y[4]=()=>{l.value.open()}),variant:"tertiary"})):createCommentVNode("",!0)],64)):createCommentVNode("",!0),createVNode(unref(Se),{"data-type":"delete",class:"options__delete",variant:"danger",label:"Slett",iconRight:"fa-pro-light:trash-xmark",onClick:y[5]||(y[5]=()=>{s.value.open()})})]),_:1})],64))}}),_style_0$e=".k-button.options__delete{color:var(--k-button-danger-background, var(--k-ui-color-danger));background-color:var(--k-button-danger-text, white)}.k-button.options__delete:focus,.k-button.options__delete:active,.k-button.options__delete:hover{color:var(--k-button-danger-text, white)}.unpublish-dialog,.remove-dialog{--k-dialog-min-width: 400px;--k-dialog-max-width: 600px}",Options=_export_sfc(_sfc_main$k,[["styles",[_style_0$e]]]),_sfc_main$j=defineComponent({__name:"Dashboard.ce",setup(e){const t=useCurrentElement(),a=useAPI(t),r=ref([]),i=ref(!1),n=computed(()=>[{id:"name",label:"Kampanjenavn"},{id:"status",label:"Status"},{id:"published",label:"Publisert"},{id:"insight",label:""},{id:"url",label:""},{id:"edit",label:""}]),s=f=>f.code?f.publishedAt?f.preview?{label:"Utkast - Forhåndsvisning",variant:"info"}:{label:"Aktiv",variant:"success"}:{label:"Avpublisert",variant:"danger"}:{label:"Utkast",variant:"neutral"},l=f=>{if(!f.code||!f.publishedAt||f.preview)return"-";const u={year:"numeric",month:"numeric",day:"numeric"};return new Date(f.publishedAt).toLocaleString("nb-NO",u)};ref();const o=()=>{i.value=!0,a.getAds().then(f=>{r.value=f}).finally(()=>{i.value=!1})};return onMounted(()=>{o()}),(f,u)=>(openBlock(),createBlock(unref(SC),{class:"ads",title:"Dine Finn-annonser",subtitle:"Her får du en oversikt over dine Finn-annonser.",variant:"prompt",appearance:"shadow"},{default:withCtx(()=>[r.value.length&&!i.value?(openBlock(),createBlock(unref(TB),{key:0,items:r.value,columns:n.value},{name:withCtx(({item:y})=>[createTextVNode(toDisplayString(y.name),1)]),status:withCtx(({item:y})=>[createVNode(unref(vB),mergeProps(s(y),{appearance:"filled"}),null,16)]),published:withCtx(({item:y})=>[createTextVNode(toDisplayString(l(y)),1)]),url:withCtx(({item:y})=>[y.url?(openBlock(),createElementBlock(Fragment,{key:0},[y.units.some(p=>p.url)?(openBlock(),createBlock(unref(Go),{key:0,label:"Se annonser"},{default:withCtx(()=>[createVNode(unref(Se),{variant:"tertiary",iconRight:"fa-pro-light:arrow-up-right-from-square",label:"Prosjektannonse",target:"_blank",is:"a",href:y.url},null,8,["href"]),(openBlock(!0),createElementBlock(Fragment,null,renderList(y.units,p=>(openBlock(),createBlock(unref(Se),{variant:"tertiary",label:`${p.name}`,target:"_blank",is:"a",href:p.url,iconRight:"fa-pro-light:arrow-up-right-from-square"},null,8,["label","href"]))),256))]),_:2},1024)):(openBlock(),createBlock(unref(Se),{key:1,iconRight:"fa-pro-light:arrow-up-right-from-square",label:"Se annonse",target:"_blank",is:"a",href:y.url},null,8,["href"]))],64)):createCommentVNode("",!0)]),insight:withCtx(({item:y})=>[!y.preview&&y.statistics?(openBlock(),createBlock(unref(Se),{key:0,iconRight:"fa-pro-light:arrow-up-right-from-square",label:"Se innsikt",target:"_blank",is:"a",href:y.statistics},null,8,["href"])):createCommentVNode("",!0)]),edit:withCtx(({item:y})=>[(openBlock(),createBlock(Options,{item:y,onRefetch:u[0]||(u[0]=()=>o()),key:y.id},null,8,["item"]))]),_:1},8,["items","columns"])):createCommentVNode("",!0),i.value?(openBlock(),createBlock(unref(_r),{key:1,direction:"column",align:"center"},{default:withCtx(()=>[createVNode(unref(Bf),{size:"large"})]),_:1})):createCommentVNode("",!0),!i.value&&!r.value.length?(openBlock(),createBlock(unref(_r),{key:2,direction:"column",align:"center",class:"ads__empty"},{default:withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-thin:face-sleeping"}),u[1]||(u[1]=createBaseVNode("div",null,"Fant ingen annonser",-1))]),_:1})):createCommentVNode("",!0)]),_:1}))}}),_style_0$d=".ads .k-datatable{position:initial}.ads__empty{font-size:1rem}.ads__empty svg{padding-block:var(--k-ui-spacing);opacity:var(--k-ui-opacity-faded);font-size:5rem}",Dashboard=_export_sfc(_sfc_main$j,[["styles",[_style_0$d]]]),_sfc_main$i=defineComponent({__name:"Tooltip.ce",props:{src:{type:String},content:{type:String}},setup(e){return(t,a)=>(openBlock(),createBlock(unref(Vt),{container:!1},{popper:withCtx(()=>[t.content?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass({"k-mb-sm":t.src})},toDisplayString(t.content),3)):createCommentVNode("",!0),t.src?(openBlock(),createBlock(unref(Wo),{key:1,class:"tooltip__image",src:t.src,width:"100%",size:"cover","aspect-ratio":"16/9"},null,8,["src"])):createCommentVNode("",!0)]),default:withCtx(()=>[createVNode(unref(Ue),{icon:"material-symbols:question-mark",class:"v-popper__icon"})]),_:1}))}}),_style_0$c=".tooltip__image{border-radius:var(--k-ui-rounding)}",Tooltip=_export_sfc(_sfc_main$i,[["styles",[_style_0$c]]]),houseBuildingTypes=["detached","flat","semidetached","terraced","leisure","fourPlex","chainLinkedHouse","boatBerth","boathouse"],Categories=[{type:"ESTATE_PLANNED",label:"Kommer for salg",sublabel:"Nye boliger, kommer for salg",group:"Nybygg",disabled:e=>{if(!e.length)return!1;const t=["draft","upcoming"];return!e.some(a=>a.saleType==="sale"&&t.includes(a.status.value))},disabledReason:'Du må ha enheter merket som "kommer for salg".'},{type:"ESTATE_PROJECT",label:"Boliger",sublabel:"Nye boliger til salgs",group:"Nybygg",unitType:"ESTATE_PROJECT_UNIT",disabled:e=>{if(!e.length)return!0;const t=houseBuildingTypes.filter(a=>a!=="leisure");return!e.some(a=>a.saleType==="sale"&&t.includes(a.propertyType.value))},disabledReason:"Du må ha boligtypeenheter til salgs"},{type:"ESTATE_PROJECT_SINGLE",label:"Enkelt enhet",sublabel:"Nye boliger til salgs enkelt enhet",group:"Nybygg",disabled:e=>{if(!e.length)return!1;const t=houseBuildingTypes;return!e.some(a=>a.saleType==="sale"&&t.includes(a.propertyType.value))},disabledReason:"Du må ha boligtypeenheter eller hytteenheter til salgs."},{type:"ESTATE_PROJECT_LEISURE",label:"Hytter",sublabel:"Nye boliger til salgs hytte",group:"Nybygg",unitType:"ESTATE_PROJECT_UNIT_LEISURE",disabled:e=>{if(!e.length)return!0;const t=["leisure"];return!e.some(a=>a.saleType==="sale"&&t.includes(a.propertyType.value))},disabledReason:"Du må ha hytteenheter til salgs"},{type:"ESTATE_BUSINESS_SALE",label:"Til salgs",sublabel:"Næringseiendommer til salgs",group:"Næring",disabled:e=>{if(!e.length)return!1;const t=houseBuildingTypes;return!e.some(a=>a.saleType==="sale"&&!t.includes(a.propertyType.value))},disabledReason:"Du må ha flere enheter til salgs enn bare boligtyper og hytter"},{type:"ESTATE_BUSINESS_RENT",label:"Til leie",sublabel:"Næringseiendommer til leie",group:"Næring",disabled:e=>e.length?!e.some(t=>t.saleType==="rent"):!1,disabledReason:"Du må ha enheter til leie"},{type:"PLOT_SALE",label:"Tomt/Fritidstomt",sublabel:"Boligtomt/Fritidstomt til salgs",group:"Tomter",disabled:e=>{if(!e.length)return!1;const t=["plot","leisurePlot"];return!e.some(a=>a.saleType==="sale"&&t.includes(a.propertyType.value))},disabledReason:"Du må ha tomteenheter eller fritidstomter til salgs"},{type:"ESTATE_RENT",label:"Bruktbolig",sublabel:"Bolig til leie",group:"Leie",disabled:e=>e.length?!e.some(t=>t.saleType==="rent"):!1,disabledReason:"Du må ha enheter til leie"}];zB.setLabels(nbMessages);const _hoisted_1$3={class:"category__label"},_hoisted_2$1={class:"category__sublabel"},_hoisted_3={class:"category__group"},_hoisted_4={class:"category__label"},_hoisted_5={class:"category__sublabel"},_sfc_main$h=defineComponent({__name:"Type.ce",props:mergeModels({onNext:{type:null},onPrev:{type:null},units:{type:Array}},{modelValue:{default:{}},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=useCurrentElement(),a=useAPI(t),r=inject(PropsInjectionKey),i=e,n=useModel(e,"modelValue"),s=computed(()=>{const T=Categories.reduce((R,B)=>(R[B.group]||(R[B.group]=[]),R[B.group].push(B),R),{});return Object.entries(T).map(([R,B])=>({group:R,items:B}))}),l=computed(()=>Categories.find(T=>T.type===n.value.type)),o=computed(()=>[{id:"name",label:"Navn",sort:!0},{id:"type",label:"Enhetstype",sort:!0},{id:"status",label:"Status",sort:!0},{id:"price",label:"Pris",sort:!0}]),f=T=>{switch(T){case"upcoming":return"info";case"sale":return"success";case"reserved":return"warning";case"sold":return"danger";default:return"neutral"}};function u(T){return T.disabled}const y=()=>{i.onNext()},p=ref({name:1}),x=computed(()=>i.units.sort((T,M)=>{let[R]=Object.keys(p.value),[B]=Object.values(p.value);const G=P=>R==="status"?P[R].label:R==="type"?P.propertyType.label:P[R],O=G(T),N=G(M),U=B<0,L=!isNaN(O),z=!isNaN(N);return L&&z?U?N-O:O-N:typeof O=="string"&&typeof N=="string"?U?N.localeCompare(O,"nb-NO",{numeric:!0,sensitivity:"base"}):O.localeCompare(N,"nb-NO",{numeric:!0,sensitivity:"base"}):0})),k=computed({get(){return x.value.filter(T=>n.value.units.some(M=>M.id===T.id))},set(T){n.value.units=T.map(M=>{const{price:R,propertyType:B,status:G,disabled:O,saleType:N,disabledReason:U,...L}=M;return{fields:{},...L}})}}),g=computed(()=>o.value.filter(T=>T.sort).map(T=>T.id)),S=computed(()=>{const T={name:"required",type:"required"};return l.value?.type==="ESTATE_PROJECT_SINGLE"&&n.value.units.length?{units:"size:1",...T}:["ESTATE_PROJECT","ESTATE_PROJECT_LEISURE"].includes(l.value?.type||"")?{units:"min:1",...T}:T}),c=computed(()=>({name:"Internt navn",type:"Annonse-kategori",units:"enhet"})),d=computed(()=>({min:`Du må minimum velge :min :attribute når "${Categories.find(T=>T.type==="ESTATE_PROJECT")?.label}" eller "${Categories.find(T=>T.type==="ESTATE_PROJECT_LEISURE")?.label}" er valgt som annonse-kategori`,size:`Du kan kun velge :size :attribute når "${Categories.find(T=>T.type==="ESTATE_PROJECT_SINGLE")?.label}" er valgt som annonse-kategori`})),m=fB({rules:S,labels:c,data:n,customMessages:d}),{bind:b}=m,E=ref();return onMounted(()=>{const T=E.value?.$el;if(!T)return;let M=T.querySelectorAll('[data-scope="checkbox"][data-part="root"][data-disabled]');const R=x.value.filter(B=>B.disabled);M.forEach((B,G)=>{const O=R[G].disabledReason;bt(B,{container:!1,triggers:["hover","focus"],content:O,placements:"auto",preventOverflow:!0},null)})}),(T,M)=>(openBlock(),createBlock(unref(SC),{class:"type",title:"Grunnlag for Finn-annonsen",variant:"prompt",appearance:"shadow",subtitle:"Definer annonsen sitt interne navn, annonse-kategorien definerer hvor den plasseres på Finn."},{default:withCtx(()=>[createVNode(unref(AB),{columns:"2",gap:"4rem 2rem"},{default:withCtx(()=>[createVNode(unref(gx),normalizeProps(guardReactiveProps(unref(b)("name"))),{label:withCtx(()=>[M[5]||(M[5]=createBaseVNode("span",null,"Internt navn på Finn-annonse ",-1)),createVNode(Tooltip,{content:"Det interne navnet gjør det lettere å finne annonsen i oversikten over Finn-annonsene på prosjektet, spesielt hvis du planlegger å ha flere annonser på samme prosjekt!"})]),default:withCtx(()=>[createVNode(unref(hy),{modelValue:n.value.name,"onUpdate:modelValue":M[0]||(M[0]=R=>n.value.name=R)},null,8,["modelValue"])]),_:1},16),createVNode(unref(gx),mergeProps(unref(b)("type"),{help:"Dette legger annonsen på riktig boligtype på Finn"}),{label:withCtx(()=>[M[6]||(M[6]=createBaseVNode("span",null," Velg annonse-kategori ",-1)),createVNode(Tooltip,{content:"En annonse-kategori gjør det mulig å bestemme ønsket plass i Finn for din type annonse. Dersom du for eksempel skal leie ut en bolig kan du benytte bolig til leie. Annonsen vil deretter plasseres på bolig til leie på Finn."})]),default:withCtx(()=>[createVNode(unref(Go),{teleport:!1,disabled:!!unref(r).id,label:"Velg...",class:"category"},createSlots({default:withCtx(({close:R})=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(s.value,B=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",_hoisted_3,toDisplayString(B.group),1),(openBlock(!0),createElementBlock(Fragment,null,renderList(B.items,G=>withDirectives((openBlock(),createBlock(unref(Se),{variant:"tertiary",onClick:()=>{n.value.type=G.type,R()},disabled:G.disabled(T.units)},{default:withCtx(()=>[createVNode(unref(_r),{class:"category__label-wrapper"},{default:withCtx(()=>[createBaseVNode("div",_hoisted_4,toDisplayString(G.label),1),createBaseVNode("div",_hoisted_5,toDisplayString(G.sublabel),1)]),_:2},1024)]),_:2},1032,["onClick","disabled"])),[[unref(Mt),{content:G.disabledReason,disabled:!G.disabled(T.units),container:!1}]])),256))],64))),256))]),_:2},[l.value?{name:"trigger",fn:withCtx(()=>[createVNode(unref(_r),{class:"category__label-wrapper"},{default:withCtx(()=>[createBaseVNode("div",_hoisted_1$3,toDisplayString(l.value.label),1),createBaseVNode("div",_hoisted_2$1,toDisplayString(l.value.sublabel),1)]),_:1})]),key:"0"}:void 0]),1032,["disabled"])]),_:1},16),x.value.length?(openBlock(),createBlock(unref(gx),{key:0,label:"Velg hvilke enheter du vil publisere i Finn-annonse",class:"k-grid-span-full"},{default:withCtx(()=>[createVNode(unref(IB),{is:"div",appearance:"indicator",treshhold:200,class:"table-scroller"},{default:withCtx(()=>[createVNode(unref(TB),{ref_key:"unitTable",ref:E,sticky:!0,sortableBy:g.value,sortBy:p.value,"onUpdate:sortBy":M[1]||(M[1]=R=>p.value=R),columns:o.value,items:x.value,selected:k.value,"onUpdate:selected":M[2]||(M[2]=R=>k.value=R),isDisabled:u},{name:withCtx(({item:R})=>[createTextVNode(toDisplayString(R.name),1)]),type:withCtx(({item:R})=>[createTextVNode(toDisplayString(R.propertyType.label),1)]),status:withCtx(({item:R})=>[createVNode(unref(vB),{appearance:"filled",variant:f(R.status.value),rounded:!0},{default:withCtx(()=>[createTextVNode(toDisplayString(R.status.label),1)]),_:2},1032,["variant"])]),price:withCtx(({item:R})=>[createTextVNode(toDisplayString(unref(toCurrency)(R.price)),1)]),_:1},8,["sortableBy","sortBy","columns","items","selected"])]),_:1})]),_:1})):createCommentVNode("",!0)]),_:1})]),actions:withCtx(()=>[createVNode(unref(Se),{label:"Avbryt",variant:"secondary",onClick:M[3]||(M[3]=()=>unref(a).navigateView("dashboard"))}),withDirectives(createVNode(unref(Se),{label:"Neste",variant:"primary","icon-right":"fa-pro-solid:arrow-right",disabled:!unref(m).passes.value,onClick:M[4]||(M[4]=()=>y())},null,8,["disabled"]),[[unref(Mt),{content:Object.entries(unref(m).errors.value.errors).map(([R,B])=>B).flat().join(`
|
|
3
3
|
`),disabled:unref(m).passes.value,container:!1}]])]),_:1}))}}),_style_0$b=".type .table-scroller{max-height:650px;position:relative}.type .category__group{font-weight:700;padding-inline:var(--k-ui-spacing-sm);padding-top:var(--k-ui-spacing-xs)}.type .category__label-wrapper{flex-direction:column;gap:var(--k-ui-spacing-xxs);align-items:start}.type .category__sublabel{font-size:var(--k-ui-font-size-sm);opacity:var(--k-ui-opacity-faded)}",StepType=_export_sfc(_sfc_main$h,[["styles",[_style_0$b]]]),_hoisted_1$2={style:{"margin-left":"auto"}},_sfc_main$g=defineComponent({__name:"ExpandableList.ce",props:{modelValue:{type:Array},title:{default:"",type:String},subtitle:{default:"",type:String},limit:{type:Number},template:{type:null}},emits:["update:modelValue","remove"],setup(e,{emit:t}){const a=e,r=t,i=ref(Clone(a.modelValue));watch(()=>a.modelValue,(u,y)=>{hasDiff({value:u},{value:i.value})&&(i.value=Clone(u))},{deep:!0}),watch(()=>[...i.value],(u,y)=>{if(!u.length)return i.value.push(Clone(a.template));u.length===y.length&&r("update:modelValue",u)},{deep:!0});const n=ref([]),s=u=>(n.value[u]||(n.value[u]=useId()),n.value[u]),l=()=>{const u=[...i.value,Clone(a.template)];i.value=u,r("update:modelValue",[...u])},o=u=>{n.value.splice(u,1);const y=[...i.value];y.splice(u,1),i.value=y,r("update:modelValue",[...y]),r("remove",u)},f=(u,y)=>{const p=n.value.splice(u,1)[0];n.value.splice(u+y,0,p);const x=[...i.value],k=x.splice(u,1)[0];x.splice(u+y,0,k),i.value=x,r("update:modelValue",[...x])};return onMounted(()=>{i.value.length||i.value.push(Clone(a.template))}),(u,y)=>(openBlock(),createBlock(unref(BB),{class:"expandable-list",title:u.title,subtitle:u.subtitle},createSlots({actions:withCtx(()=>[renderSlot(u.$slots,"actions",{},()=>[createBaseVNode("span",_hoisted_1$2,toDisplayString(i.value.length)+toDisplayString(u.limit?` / ${u.limit}`:"")+" "+toDisplayString(i.value.length>=2||u.limit?"felter":"felt"),1)])]),default:withCtx(()=>[renderSlot(u.$slots,"before-content"),(openBlock(!0),createElementBlock(Fragment,null,renderList(i.value,(p,x)=>(openBlock(),createElementBlock(Fragment,{key:s(x)},[createVNode(unref(_r),{justify:"end",gap:"4px",class:"expandable-list__actions"},{default:withCtx(()=>[withDirectives(createVNode(unref(Se),{size:"small",icon:"fa-pro-light:trash",onClick:k=>o(x),class:"expandable-list__remove"},null,8,["onClick"]),[[unref(Mt),{content:"Fjern",container:!1}]]),withDirectives(createVNode(unref(Se),{size:"small",icon:"fa-pro-light:arrow-up",disabled:x===0,onClick:k=>f(x,-1),class:"expandable-list__move-up"},null,8,["disabled","onClick"]),[[unref(Mt),{content:"Flytt opp",container:!1}]]),withDirectives(createVNode(unref(Se),{size:"small",icon:"fa-pro-light:arrow-down",disabled:x===i.value.length-1,onClick:k=>f(x,1),class:"expandable-list__move-down"},null,8,["disabled","onClick"]),[[unref(Mt),{content:"Flytt ned",container:!1}]])]),_:2},1024),createVNode(unref(_r),{direction:"column",class:"expandable-list__content"},{default:withCtx(()=>[renderSlot(u.$slots,"default",{item:p,index:x})]),_:2},1024)],64))),128))]),footer:withCtx(()=>[withDirectives(createVNode(unref(Se),{variant:"tertiary",disabled:u.limit&&i.value.length>=u.limit,onClick:l,icon:"fa-pro-solid:plus",label:"Opprett nytt felt",class:"expandable-list__add"},null,8,["disabled"]),[[unref(Mt),{content:"Maks antall felter lagt til",disabled:!(u.limit&&i.value.length>=u.limit),container:!1}]])]),_:2},[u.$slots.title?{name:"title",fn:withCtx(()=>[renderSlot(u.$slots,"title")]),key:"0"}:void 0]),1032,["title","subtitle"]))}}),_style_0$a=".expandable-list__actions:hover+.expandable-list__content{border-radius:var(--k-ui-rounding-sm);outline:2px dashed var(--k-ui-color-neutral-dark);outline-offset:6px}.expandable-list .k-expandable__footer{--k-expandable-spacing: 0rem}.expandable-list .k-expandable__footer .k-button{width:100%;--k-button-tertiary-background: #eaeaea;padding:1rem;border-top-right-radius:0;border-top-left-radius:0}.expandable-list .k-expandable__footer .k-button__content{flex-direction:column}.expandable-list .k-expandable__footer .k-button__icon{padding:.5rem;color:#fff;background-color:var(--k-ui-color-primary);border-radius:var(--k-ui-rounding-full)}.expandable-list .k-expandable__footer .k-button__icon svg{height:1em;width:1em}",ExpandableList=_export_sfc(_sfc_main$g,[["styles",[_style_0$a]]]),_sfc_main$f=defineComponent({__name:"UnitLinks.ce",props:{modelValue:{type:Object},hasFields:{type:Function},hasField:{type:Function},getIsEditedBind:{type:Function},isEdited:{type:Function},rules:{type:Object},labels:{type:Object},initialUnitField:{type:Object}},emits:["update:modelValue"],setup(e,{expose:t,emit:a}){const r=e,i=a,n=ref(Clone(r.modelValue)),s=ref({});watch(()=>r.modelValue,(c,d)=>{hasDiff({value:c},{value:n.value})&&(n.value=Clone(c))},{deep:!0});const l=c=>{const d=["MOREINFO.*.URL","MOREINFO.0.URL","MOREINFO.1.URL","MOREINFO.2.URL","MOREINFO.3.URL"];return Object.fromEntries(Object.entries(c).filter(([m,b])=>d.includes(m)))},o=computed(()=>l(r.rules)),f=computed(()=>l(r.labels)),u=fB({rules:o,labels:f,data:n}),{bind:y}=u,p=ref(),x=c=>hasDiff({value:n.value[c]},{value:r.initialUnitField[c]}),k=(...c)=>r.getIsEditedBind(x(...c)),g=()=>{n.value=Clone(r.modelValue)},S=()=>{i("update:modelValue",Clone(n.value))};return t({open:()=>{p.value.open()},close:()=>{p.value.close()}}),(c,d)=>(openBlock(),createBlock(unref(up),{ref_key:"linkDialog",ref:p,variant:"prompt",title:"Tilpass enhetens nyttige lenker i Finn-annonsen",subtitle:"Lenker vil være synlig under kontakt informasjon på enhetsannonsen",teleport:!1,closeOnOutsideClick:!1},{trigger:withCtx(({triggerProps:m})=>[createVNode(unref(Se),{style:{display:"none"}})]),default:withCtx(()=>[c.hasFields("MOREINFO")?(openBlock(),createBlock(ExpandableList,{key:0,limit:4,template:{URL:"",URLTEXT:""},expanded:!0,modelValue:n.value.MOREINFO,"onUpdate:modelValue":d[2]||(d[2]=m=>n.value.MOREINFO=m),onRemove:d[3]||(d[3]=m=>{const b=Object.keys(s.value).reverse().find(E=>E.startsWith("MOREINFO.")&&E.endsWith(".URL")&&s.value[E]);b&&(s.value[b]=!1)})},createSlots({title:withCtx(()=>[d[4]||(d[4]=createBaseVNode("span",null,"Nyttige lenker i Finn-annonsen",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Nyttige lenker vises her i enhetsannonsen. Noen felt er standard og låst av Finn, derfor vises lenken til prosjektsiden alltid automatisk. Du kan fritt legge til egne lenker og lenker til andre nettsteder.",src:"https://assets.kvass.no/67c80a5e92504cdf70aba756"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":x("MOREINFO")}]),icon:k("MOREINFO").icon},null,8,["class","icon"]),[[unref(Mt),{content:k("MOREINFO").label,container:!1}]])]),default:withCtx(({item:m,index:b})=>[createVNode(unref(AB),{columns:"2"},{default:withCtx(()=>[createVNode(unref(gx),{label:"URL til nyttig lenke",onBlur:()=>s.value[`MOREINFO.${b}.URL`]=!0,error:s.value[`MOREINFO.${b}.URL`]?Object.entries(unref(u).errors.value.errors).filter(([E,T])=>E===`MOREINFO.${b}.URL`).map(([E,T])=>T).flat().join(`
|
|
4
4
|
`):void 0},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:m.URL,"onUpdate:modelValue":E=>m.URL=E,suffix:"URL"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["onBlur","error"]),createVNode(unref(gx),{label:"Visningsnavn på lenken på Finn-annonsen"},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:m.URLTEXT,"onUpdate:modelValue":E=>m.URLTEXT=E},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)]),_:2},[c.hasFields("ESTATE_EXTERNAL_URL","ESTATE_EXTERNAL_ORDER_URL")?{name:"before-content",fn:withCtx(()=>[createVNode(unref(AB),{columns:"2"},{default:withCtx(()=>[c.hasField("ESTATE_EXTERNAL_URL")?(openBlock(),createElementBlock(Fragment,{key:0},[createVNode(unref(gx),{label:"URL til nyttig lenke"},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:c.data.ESTATE_EXTERNAL_URL,"onUpdate:modelValue":d[0]||(d[0]=m=>c.data.ESTATE_EXTERNAL_URL=m),suffix:"URL",disabled:""},null,8,["modelValue"])]),_:1}),createVNode(unref(gx),{label:"Visningsnavn på lenken på Finn-annonsen"},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:"Se prosjektets hjemmeside",disabled:""})]),_:1})],64)):createCommentVNode("",!0),c.hasField("ESTATE_EXTERNAL_ORDER_URL")?(openBlock(),createElementBlock(Fragment,{key:1},[createVNode(unref(gx),{label:"URL til nyttig lenke"},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:c.data.ESTATE_EXTERNAL_ORDER_URL,"onUpdate:modelValue":d[1]||(d[1]=m=>c.data.ESTATE_EXTERNAL_ORDER_URL=m),suffix:"URL",disabled:""},null,8,["modelValue"])]),_:1}),createVNode(unref(gx),{label:"Visningsnavn på lenken på Finn-annonsen"},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:"Bestill salgsoppgave",disabled:""})]),_:1})],64)):createCommentVNode("",!0)]),_:1}),d[5]||(d[5]=createBaseVNode("div",{class:"ad__expandable-list-divider"},null,-1))]),key:"0"}:void 0]),1032,["modelValue"])):createCommentVNode("",!0)]),actions:withCtx(({close:m})=>[createVNode(unref(Se),{label:"Avbryt",onClick:()=>{g(),m()},variant:"secondary"},null,8,["onClick"]),withDirectives(createVNode(unref(Se),{disabled:!unref(u).passes.value,label:"Bekreft",onClick:()=>{unref(u).passes&&(S(),m())},variant:"primary"},null,8,["disabled","onClick"]),[[unref(Mt),{content:Object.entries(unref(u).errors.value.errors).map(([b,E])=>E).flat().join(`
|
|
5
5
|
`),disabled:unref(u).passes.value,container:!1}]])]),_:1},512))}}),_sfc_main$e=defineComponent({__name:"RichTextMultiple.ce",props:mergeModels({expanded:{type:Boolean},title:{type:String},subtitle:{type:String}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=useModel(e,"modelValue");function a(n){/<[a-z][\s\S]*>/i.test(n)||(n=`<p>${n}</p>`);const l=new DOMParser().parseFromString(n,"text/html"),o=[],f=l.querySelectorAll("h3");let u=l.body.firstElementChild,y="";for(;u&&u!==f[0]&&(y+=u.outerHTML,u=u.nextElementSibling,!(!u||!l.body.contains(u))););return y.trim()&&o.push({title:"",content:y}),f.forEach((p,x)=>{const k=p.textContent||"";let g="",S=p.nextElementSibling;for(;S&&S.tagName!=="H3";)g+=S.outerHTML,S=S.nextElementSibling;o.push({title:k,content:g})}),o}const r=computed({get:()=>a(t.value),set:n=>{t.value=n.map(s=>`<h3>${s.title}</h3>${s.content}`).join("")}}),i=(n,s,l)=>{const o=r.value;o.length||o.push({title:"",content:""}),o[s]&&(o[s]={...o[s]||{},[l]:n}),t.value=o.map(({title:f,content:u})=>`<h3>${f}</h3>${u}`).join("")};return(n,s)=>(openBlock(),createBlock(ExpandableList,{expanded:n.expanded,title:n.title,subtitle:n.subtitle,template:{title:"",content:""},modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l)},createSlots({default:withCtx(({item:l,index:o})=>[createVNode(unref(gx),{label:"Tittel"},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:l.title,"onUpdate:modelValue":f=>i(f,o,"title")},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),createVNode(unref(gx),{label:"Tekst"},{default:withCtx(()=>[createVNode(unref($B),{actions:["bold","italic","orderedList","bulletList"],modelValue:l.content,"onUpdate:modelValue":f=>i(f,o,"content"),placeholder:"Skriv her..."},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},[n.$slots.title?{name:"title",fn:withCtx(()=>[renderSlot(n.$slots,"title")]),key:"0"}:void 0,n.$slots.actions?{name:"actions",fn:withCtx(()=>[renderSlot(n.$slots,"actions")]),key:"1"}:void 0]),1032,["expanded","title","subtitle","modelValue"]))}}),_sfc_main$d=defineComponent({__name:"UnitDescription.ce",props:{modelValue:{type:Object},hasFields:{type:Function},hasField:{type:Function},getIsEditedBind:{type:Function},isEdited:{type:Function},rules:{type:Object},labels:{type:Object},initialUnitField:{type:Object}},emits:["update:modelValue"],setup(e,{expose:t,emit:a}){const r=e,i=a,n=ref(Clone(r.modelValue)),s=ref();watch(()=>r.modelValue,(S,c)=>{hasDiff({value:S},{value:n.value})&&(n.value=Clone(S))},{deep:!0});const l=S=>{const c=["HEADING"];return Object.fromEntries(Object.entries(S).filter(([d,m])=>c.includes(d)))},o=computed(()=>l(r.rules)),f=computed(()=>l(r.labels)),u=fB({rules:o,labels:f,data:n}),{bind:y}=u,p=S=>hasDiff({value:n.value[S]},{value:r.initialUnitField[S]}),x=(...S)=>r.getIsEditedBind(p(...S)),k=()=>{n.value=Clone(r.modelValue)},g=()=>{i("update:modelValue",Clone(n.value))};return t({open:()=>{s.value.open()},close:()=>s.value.close()}),(S,c)=>(openBlock(),createBlock(unref(up),{variant:"prompt",title:"Rediger enhet",subtitle:"Rediger beskrivelser og bilder",teleport:!1,closeOnOutsideClick:!1,ref_key:"descriptionDialog",ref:s},{trigger:withCtx(({triggerProps:d})=>[createVNode(unref(Se),mergeProps({style:{display:"none"}},d),null,16)]),default:withCtx(()=>[createVNode(unref(_r),{direction:"column",gap:"2rem"},{default:withCtx(()=>[S.hasFields("HEADING")?(openBlock(),createBlock(unref(BB),{key:0,expanded:!0,title:"Hovedtittel og undertittel"},{title:withCtx(()=>[c[4]||(c[4]=createBaseVNode("span",null,"Undertittel",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Teksten du skriver her vises som undertittel i annonsen.",src:"https://assets.kvass.no/67c7181792504cdf70aba68d"})]),default:withCtx(()=>[S.hasField("HEADING")?(openBlock(),createBlock(unref(gx),mergeProps({key:0},unref(y)("HEADING"),{label:"Undertittel for enhetsannonsen",class:["ad__field",{"ad__field--edited":p("HEADING")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:n.value.HEADING,"onUpdate:modelValue":c[0]||(c[0]=d=>n.value.HEADING=d)},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:x("HEADING").icon},null,8,["icon"]),[[unref(Mt),{content:x("HEADING").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),S.hasFields("MEDIA")?(openBlock(),createBlock(unref(BB),{key:1,expanded:!0},{title:withCtx(()=>[c[5]||(c[5]=createBaseVNode("span",null,"Bilder",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Bildene hentes fra enhetssiden. Det første bildet blir forsidebildet i enhetsannonsen.",src:"https://assets.kvass.no/67c8088692504cdf70aba702"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":p("MEDIA")}]),icon:x("MEDIA").icon},null,8,["class","icon"]),[[unref(Mt),{content:x("MEDIA").label,container:!1}]])]),default:withCtx(()=>[S.hasField("MEDIA")?(openBlock(),createBlock(unref(NB),{key:0,modelValue:n.value.MEDIA,"onUpdate:modelValue":c[1]||(c[1]=d=>n.value.MEDIA=d),label:"Bilder i enhetsannonsen",dropMessage:"Dra en fil hit eller <b>velg</b> for å laste opp",accept:["image/jpeg","image/png","image/jpg"],upload:unref(uploadFunction),types:["Image"],multiple:!0,sortable:!0,description:!0,placement:"outside",size:"contain",labels:{selectMessage:"Trykk på knappen nedenfor for å laste opp andre filtyper",select:"Velg",cancel:"Avbryt",save:"Bekreft",descriptionPlaceholder:"",image:{createLabel:"Bilde",preview:"",inputLabel:"",error:""}}},null,8,["modelValue","upload"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),S.hasFields("FLOORPLAN_MEDIA")?(openBlock(),createBlock(unref(BB),{key:2,expanded:!0},{title:withCtx(()=>[c[6]||(c[6]=createBaseVNode("span",null,"Plantegninger",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Plantegninger vises sist i bildegalleriet eller som en egen knapp i galleriet med navnet «Plantegninger». Dette avhenger av hva annonsetypen støtter.",src:"https://assets.kvass.no/67d1501f9b29de28ddec33d9"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":p("FLOORPLAN_MEDIA")}]),icon:x("FLOORPLAN_MEDIA").icon},null,8,["class","icon"]),[[unref(Mt),{content:x("FLOORPLAN_MEDIA").label,container:!1}]])]),default:withCtx(()=>[S.hasField("FLOORPLAN_MEDIA")?(openBlock(),createBlock(unref(LB),{key:0,rename:!1,modelValue:n.value.FLOORPLAN_MEDIA,"onUpdate:modelValue":c[2]||(c[2]=d=>n.value.FLOORPLAN_MEDIA=d),label:"Plantegninger i enhetsannonsen",dropMessage:"Dra en fil hit eller <b>velg</b> for å laste opp",accept:["image/jpeg","image/png","image/jpg"],upload:unref(uploadFunction),uploadOptions:{},types:["Image"],multiple:!0,sortable:!0,labels:{delete:"Slett",download:"Last ned",copy:"Kopier lenke"}},null,8,["modelValue","upload"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),S.hasFields("GENERAL_DESCRIPTION")?(openBlock(),createBlock(_sfc_main$e,{key:3,expanded:!0,modelValue:n.value.GENERAL_DESCRIPTION,"onUpdate:modelValue":c[3]||(c[3]=d=>n.value.GENERAL_DESCRIPTION=d)},{title:withCtx(()=>[c[7]||(c[7]=createBaseVNode("span",null,"Beskrivelse",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Teksten du skriver her vises under beskrivelsen i enhetsannonsen.",src:"https://assets.kvass.no/67c80a5792504cdf70aba732"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":p("GENERAL_DESCRIPTION")}]),icon:x("GENERAL_DESCRIPTION").icon},null,8,["class","icon"]),[[unref(Mt),{content:x("GENERAL_DESCRIPTION").label,container:!1}]])]),_:1},8,["modelValue"])):createCommentVNode("",!0)]),_:1})]),actions:withCtx(({close:d})=>[createVNode(unref(Se),{label:"Avbryt",onClick:()=>{k(),d()},variant:"secondary"},null,8,["onClick"]),withDirectives(createVNode(unref(Se),{label:"Bekreft",disabled:!unref(u).passes.value,onClick:()=>{unref(u).passes&&(g(),d())},variant:"primary"},null,8,["disabled","onClick"]),[[unref(Mt),{content:Object.entries(unref(u).errors.value.errors).map(([m,b])=>b).flat().join(`
|
|
6
6
|
`),disabled:unref(u).passes.value,container:!1}]])]),_:1},512))}}),_sfc_main$c=defineComponent({__name:"UnitFacilities.ce",props:{modelValue:{type:Object},hasFields:{type:Function},hasField:{type:Function},getIsEditedBind:{type:Function},isEdited:{type:Function},facilities:{type:Array},initialUnitField:{type:Object}},emits:["update:modelValue"],setup(e,{expose:t,emit:a}){const r=e,i=a,n=ref(Clone(r.modelValue)),s=ref();watch(()=>r.modelValue,(y,p)=>{hasDiff({value:y},{value:n.value})&&(n.value=Clone(y))},{deep:!0});const l=y=>hasDiff({value:n.value[y]},{value:r.initialUnitField[y]}),o=(...y)=>r.getIsEditedBind(l(...y)),f=()=>{n.value=Clone(r.modelValue)},u=()=>{i("update:modelValue",Clone(n.value))};return t({open:()=>{s.value.open()},close:()=>{s.value.close()}}),(y,p)=>{const x=resolveDirective("tooltip");return openBlock(),createBlock(unref(up),{ref_key:"facilitesDialog",ref:s,variant:"prompt",title:"Tilpass enhetens fasiliteter i Finn-annonsen",subtitle:"Fasiliteter vil vises i en egen seksjon på enhetsannonsen og benyttes til filtrering av annonser på Finn.",teleport:!1,closeOnOutsideClick:!1},{trigger:withCtx(({triggerProps:k})=>[createVNode(unref(Se),{style:{display:"none"}})]),default:withCtx(()=>[y.hasFields("ESTATE_PREFERENCE")?(openBlock(),createBlock(unref(BB),{key:0,expanded:!0},{title:withCtx(()=>[p[1]||(p[1]=createBaseVNode("span",null,' Fasiliteter i enhetsannonsen" ',-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Fasilitenene som velges her vil bli synlig under fasiliteter på enhetsannonsen. De vil også være tilgjengelige som filtre i søkelisten.",src:"https://assets.kvass.no/67c80a4c92504cdf70aba70e"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":l("ESTATE_PREFERENCE")}]),icon:o("ESTATE_PREFERENCE").icon},null,8,["class","icon"]),[[x,{content:o("ESTATE_PREFERENCE").label,container:!1}]])]),default:withCtx(()=>[y.hasField("ESTATE_PREFERENCE")?(openBlock(),createBlock(unref(gx),{key:0,class:"facilities",label:"Tilgjengelige fasiliteter"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(y.facilities,k=>(openBlock(),createBlock(unref(hd),{modelValue:n.value.ESTATE_PREFERENCE,"onUpdate:modelValue":p[0]||(p[0]=g=>n.value.ESTATE_PREFERENCE=g),value:k.value,label:k.label},null,8,["modelValue","value","label"]))),256))]),_:1})):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0)]),actions:withCtx(({close:k})=>[createVNode(unref(Se),{label:"Avbryt",onClick:()=>{f(),k()},variant:"secondary"},null,8,["onClick"]),createVNode(unref(Se),{label:"Bekreft",onClick:()=>{u(),k()},variant:"primary"},null,8,["onClick"])]),_:1},512)}}}),_sfc_main$b=defineComponent({__name:"UnitSettings.ce",setup(e){const t=ref(),a=ref(),r=ref();return(i,n)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(_sfc_main$d,mergeProps({ref_key:"description",ref:t},i.$attrs),null,16),createVNode(_sfc_main$f,mergeProps({ref_key:"links",ref:a},i.$attrs),null,16),createVNode(_sfc_main$c,mergeProps({ref_key:"facilities",ref:r},i.$attrs),null,16),createVNode(unref(Go),{class:"unit-table__actions",label:"",theme:"shadow",variant:"secondary",keepOpen:!0,teleport:!1},{default:withCtx(({close:s})=>[createVNode(unref(Se),{variant:"tertiary",label:"Rediger enhet",iconRight:"fa-pro-solid:caret-right",onClick:n[0]||(n[0]=()=>t.value.open())}),createVNode(unref(Se),{variant:"tertiary",label:"Rediger lenker",iconRight:"fa-pro-solid:caret-right",onClick:n[1]||(n[1]=()=>a.value.open())}),createVNode(unref(Se),{variant:"tertiary",label:"Rediger fasiliteter",iconRight:"fa-pro-solid:caret-right",onClick:n[2]||(n[2]=()=>r.value.open())})]),_:1})],64))}}),_hoisted_1$1=["innerHTML"],_sfc_main$a=defineComponent({__name:"UnitTable.ce",props:mergeModels({units:{type:Array},initialUnitFields:{type:Array},facilities:{type:Array}},{modelValue:{default:{}},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=inject(PropsInjectionKey),a=e,r=useModel(e,"modelValue"),i=ref(a.units.map((p,x)=>p.fields));watch(()=>a.units,p=>{i.value=p.map((x,k)=>x.fields)});const n=computed(()=>a.units.map((p,x)=>{const k=fB({rules:toRef(p.rules),labels:toRef(p.labels),data:toRef(p.fields)}),g=k.passes.value,S=Object.entries(k.errors.value.errors).map(([c,d])=>d).flat().join(`
|
|
7
|
-
`);return{errors:k.errors.value,validate:k.bind,passes:g,error:S}})),s=(p,x)=>!!p.hasOwnProperty(x),l=(p,...x)=>!!x.map(k=>s(p,k)).find(Boolean),o=(p,x)=>r.value.units[p]?r.value.units[p].fields.hasOwnProperty(x):!1,f=p=>p?{icon:"fa-pro-regular:cloud-xmark",label:"Ikke synkronisert"}:{icon:"fa-pro-regular:cloud-check",label:"Synkronisert"},u=(p,x)=>{const k=r.value.units[x].fields.IS_HIGHLIGHTED==="true"?"false":"true";r.value.units[x].fields.IS_HIGHLIGHTED=k},y=(p,x="basis")=>new URL(`${t.tenant}/residentials/${p}/edit/${x}`).toString();return(p,x)=>(openBlock(),createBlock(unref(IB),{is:"div",appearance:"indicator",treshhold:500,class:"unit-table-scroller"},{default:withCtx(()=>[createVNode(unref(TB),{sticky:!0,class:"unit-table",columns:[{id:"unit",label:"Enhet",size:"1fr"},{id:"highlight",label:"Fremhev enhet",align:"center",size:"150px"},{id:"settings",label:"Innstillinger",align:"center",size:"150px"}],items:i.value},{"highlight-label":withCtx(({item:k})=>[createBaseVNode("span",{innerHTML:k.label},null,8,_hoisted_1$1),createVNode(Tooltip,{class:"k-ml-xxs",content:"Slik vises utvalgte enheter i Finn-annonsen.",src:"https://assets.kvass.no/67c80a5c92504cdf70aba74a"})]),unit:withCtx(({item:k,rowIndex:g})=>[createBaseVNode("span",null,toDisplayString(k.HOUSING_UNIT_REF),1),n.value[g].error?(openBlock(),createElementBlock(Fragment,{key:0},[withDirectives(createVNode(unref(Ue),{class:"unit-table__error disable-focus-modal",icon:"fa-pro-solid:exclamation-triangle"},null,512),[[unref(Mt),{content:n.value[g].error,container:!1}]]),createVNode(unref(Se),{class:"k-ml-lg disable-focus-modal",is:"a",target:"_blank",label:"Gå til enhet",size:"small",href:y(k.USER_REFERENCE),iconRight:"fa-pro-light:arrow-up-right-from-square"},null,8,["href"])],64)):createCommentVNode("",!0)]),highlight:withCtx(({item:k,rowIndex:g})=>[createVNode(unref(Ue),{class:normalizeClass(["unit-table__highlight",{"unit-table__highlight--selected":r.value.units[g].fields.IS_HIGHLIGHTED==="true"}]),icon:"fa-pro-solid:star",tabindex:"0",onKeydown:withKeys(()=>{u(k,g)},["enter"]),onClick:()=>{u(k,g)}},null,8,["class","onKeydown","onClick"])]),settings:withCtx(({item:k,rowIndex:g})=>[(openBlock(),createBlock(_sfc_main$b,{units:p.units,initialUnitField:p.initialUnitFields.find(S=>S.USER_REFERENCE===k.USER_REFERENCE),key:k.USER_REFERENCE,modelValue:k,"onUpdate:modelValue":S=>{Object.entries(unref(Diff)(k,S)).map(([c,d])=>{if(c==="IS_HIGHLIGHTED")return;k[c]=d;const m=r.value.units.find(b=>b.id===k.USER_REFERENCE);m.fields[c]=d,unref(hasDiff)({value:d},{value:p.initialUnitFields.find(b=>b.USER_REFERENCE===k.USER_REFERENCE)[c]})||delete m.fields[c]})},hasFields:(...S)=>l(k,...S),hasField:(...S)=>s(k,...S),getIsEditedBind:(...S)=>f(...S),isEdited:(...S)=>o(g,...S),rules:p.units.map(S=>S.rules)[g],labels:p.units.map(S=>S.labels)[g],facilities:p.facilities},null,8,["units","initialUnitField","modelValue","onUpdate:modelValue","hasFields","hasField","getIsEditedBind","isEdited","rules","labels","facilities"]))]),_:1},8,["items"])]),_:1}))}}),_style_0$9=".unit-table{overflow:visible;box-sizing:border-box;padding:var(--k-ui-spacing);border-radius:var(--k-ui-rounding);background-color:#fff;--k-dialog-max-width: 900px;--k-dialog-min-width: 900px;--k-datatable-cell-size: 1rem;--k-datatable-odd-color: white;--k-datatable-even-color: var(--k-ui-color-neutral-lightest)}.unit-table-scroller{min-height:300px;max-height:1000px}.unit-table .k-datatable__cell-sort-icon{display:none}.unit-table__actions{--k-button-secondary-background: white}.unit-table__error{margin-left:.5rem;color:var(--k-ui-color-danger-dark)}.unit-table__error:focus{outline:var(--k-ui-outline-width) solid var(--k-ui-outline-color);outline-offset:var(--k-ui-outline-offset)}.unit-table [data-col-id=highlight]{z-index:3!important}.unit-table [data-col-id=highlight] .v-popper__popper{width:300px;font-size:1rem}.unit-table__highlight{font-size:2rem;color:var(--k-ui-color-neutral)}.unit-table__highlight:focus{outline:var(--k-ui-outline-width) solid var(--k-ui-outline-color);outline-offset:var(--k-ui-outline-offset)}.unit-table__highlight:hover{cursor:pointer}.unit-table__highlight:hover:not(.unit-table__highlight--selected){color:var(--k-ui-color-neutral-dark)}.unit-table__highlight--selected{color:var(--k-ui-color-primary)}",UnitTable=_export_sfc(_sfc_main$a,[["styles",[_style_0$9]]]),Properties=[{value:"flat",label:"Leilighet",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE","ESTATE_RENT"]},{value:"detached",label:"Enebolig",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE","ESTATE_RENT"]},{value:"terraced",label:"Rekkehus",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE","ESTATE_RENT"]},{value:"semidetached",label:"Tomannsbolig",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE","ESTATE_RENT"]},{value:"bedsit",label:"Hybel",categories:["ESTATE_RENT"]},{value:"cottage",label:"Hytte",categories:["ESTATE_PLANNED","ESTATE_PROJECT_LEISURE"],condition:e=>e.type!=="ESTATE_PLANNED"?!0:e.fields.IS_LEISURE},{value:"leisure_plot",label:"Hyttetomt",categories:["PLOT_SALE"]},{value:"office",label:"Kontor",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"businessplot",label:"Næringstomt",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"houseshare",label:"Rom i bofellesskap",categories:["ESTATE_RENT"]},{value:"plot",label:"Tomter",categories:["PLOT_SALE"]},{value:"business",label:"Butikk/Handel",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"industrial",label:"Produksjon/Industri",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"warehouse",label:"Lager/Logistikk",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"multipurposearea",label:"Kombinasjonslokaler",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"farm",label:"Gårdsbruk/Småbruk",categories:["ESTATE_PLANNED","ESTATE_PROJECT_LEISURE","ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"],condition:e=>e.type!=="ESTATE_PLANNED"?!0:e.fields.IS_LEISURE},{value:"multiunits",label:"Bygård/Flermannsbolig",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"shoppingmall",label:"Kjøpesenter",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"mechshop",label:"Verksted",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"garage",label:"Garasje/Parkering",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT","ESTATE_RENT"]},{value:"hotel",label:"Hotell/Overnatting",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"restaurant",label:"Serveringslokale/Kantine",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"learningfacility",label:"Undervisning/Arrangement",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"project",label:"Prosjekt",categories:[]},{value:"other_leisure",label:"Annet fritid",categories:["ESTATE_PLANNED","ESTATE_PROJECT_LEISURE"],condition:e=>e.type!=="ESTATE_PLANNED"?!0:e.fields.IS_LEISURE},{value:"other",label:"Andre",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE","ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT","ESTATE_RENT"]}],OwnershipTypes=[{value:"LEASEHOLD",label:"Obligasjon"},{value:"COLLECTIVE_OWNERSHIP",label:"Aksje"},{value:"FREEHOLD",label:"Eier (Selveier)"},{value:"PART_OWNERSHIP",label:"Andel"},{value:"OTHER",label:"Annet"}],LeisureSituation=[{value:"coast",label:"Ved sjøen"},{value:"mountains",label:"På fjellet"},{value:"inland",label:"Innlandet"}],energyLabel=[{value:"A",label:"A"},{value:"B",label:"B"},{value:"C",label:"C"},{value:"D",label:"D"},{value:"E",label:"E"},{value:"F",label:"F"},{value:"G",label:"G"}],energyLabelColor=[{value:"dark_Green",label:"Mørkegrønn"},{value:"light_Green",label:"Lysegrønn"},{value:"yellow",label:"Gul"},{value:"orange",label:"Oransje"},{value:"red",label:"Rød"}],_hoisted_1={class:"k-card__title ad__title"},_hoisted_2={key:1},_sfc_main$9=defineComponent({__name:"Ad.ce",props:mergeModels({onNext:{type:null},onPrev:{type:null}},{modelValue:{default:{}},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=useCurrentElement(),a=useAPI(t),r=inject(PropsInjectionKey),i=e,n=useModel(e,"modelValue"),s=()=>{n.value.fields={},n.value.units.forEach(j=>j.fields={}),U()},l=computed(()=>Properties.filter(j=>j.categories.includes(n.value.type)&&(j.condition?j.condition(n.value):!0))),o=ref({}),f=ref({}),u=ref([]),y=ref([]),p=ref([]),x=computed(()=>p.value.filter(j=>j.categories.includes(Categories.find(I=>I.type===n.value.type)?.unitType))),k=ref(!0),g=ref([]),S=ref({}),c=ref({}),d=ref({}),m=computed(()=>({...o.value,units:u.value.map(j=>j.fields)})),b=computed(()=>({required_if:'Feltet ":attribute" er påkrevd når ":other" er avhuket'})),E=fB({rules:S,labels:c,data:m,customMessages:b}),{bind:T}=E,M=computed(()=>{const j=(o.value.BROKER||[]).length;return j?Array.from({length:j},(I,V)=>E.errors.value.errors[`BROKER.${V}.PHONE`]).filter(Boolean).flat().join(""):"Kundebehandler er påkrevd"}),R=computed(()=>["MAP_COORDINATE.EASTING","MAP_COORDINATE.NORTHING","STREETADDRESS","ZIPCODE"].some(I=>E.errors.value.errors[I])?"Adresse og koordinater er påkrevd":""),B=j=>!!o.value.hasOwnProperty(j),G=(...j)=>j.some(B),O=j=>n.value.fields.hasOwnProperty(j),N=j=>O(j)?{icon:"fa-pro-regular:cloud-xmark",label:"Ikke synkronisert"}:{icon:"fa-pro-regular:cloud-check",label:"Synkronisert"},U=()=>(k.value=!0,a.fields(n.value).then(j=>{p.value=j.facilities,f.value=Clone(j.fields),o.value=Clone({...j.fields,...n.value.fields}),g.value.forEach(q=>q()),g.value=[],Object.keys(j.fields).forEach(q=>{const K=watch(()=>o.value[q],(Z,X)=>{n.value.fields[q]=Z,hasDiff({value:Z},{value:f.value[q]})||delete n.value.fields[q]},{deep:!0});g.value.push(K)}),y.value=Clone(j.units.map(q=>q.fields)),u.value=Clone(j.units.map((q,K)=>({...q,fields:{...q.fields,...n.value.units.find(Z=>Z.id===q.fields.USER_REFERENCE)?.fields||{}}})));const I=j.units.map(q=>q.rules).map(q=>Object.fromEntries(Object.entries(q).map(([K,Z])=>[`units.*.${K}`,Z]))),V=j.units.map(({fields:q,labels:K,rules:Z},X)=>{const $=`Enhet ${q.HOUSING_UNIT_REF||X+1}`;return{...Object.fromEntries(Object.entries(K).map(([te,ie])=>[`units.${X}.${te}`,`${$} ${ie}`]))}});S.value=Object.assign({},j.rules,...I),c.value=Object.assign({},j.labels,...V)}).catch(j=>{console.error(j),i.onPrev()}).finally(()=>{k.value=!1})),L=()=>!n.value.id||n.value.preview||!n.value.code?"Generer forhåndsvisning":"Neste",z=j=>new URL(`${r.tenant}/projects/${r.project}/edit/${j}`).toString();function P(){document.visibilityState==="visible"&&U()}const A=ref(),_=ref(!!(Object.keys(n.value.fields).length||n.value.units.some(j=>Object.keys(j.fields).length))),C=ref();function F(j){j.target.classList.contains("k-expandable__header")||j.target.classList.contains("disable-focus-modal")||C.value.open()}const D=j=>{t.value.querySelectorAll(".k-expandable--expandable").forEach(V=>{j?V.addEventListener("focusin",F):V.removeEventListener("focusin",F)})},Y=()=>{D(!1)},H=()=>{_.value=!0,Y()};onMounted(()=>{window.addEventListener("visibilitychange",P),U().then(()=>{_.value||D(!0)})}),onUnmounted(()=>{window.removeEventListener("visibilitychange",P),Y()});const J=ref(),W=ref(),Q=()=>{J.value=new Promise((j,I)=>{W.value=!0,a.publish(n.value,{publish:!1}).then(V=>{V.on("message",q=>{q.id&&(n.value.id=q.id),V.on("error",K=>{I(K)}),V.on("finished",()=>{V.cancel(),j(n.value.id),W.value=!1})})})})};return(j,I)=>(openBlock(),createElementBlock("div",{class:"ad",ref_key:"formContainer",ref:A},[createVNode(unref(up),{teleport:!1,ref_key:"editDialog",ref:C,title:"Du er i ferd med å tilpasse annonsen",variant:"prompt"},{trigger:withCtx(({triggerProps:V})=>[createVNode(unref(Se),mergeProps(V,{style:{display:"none"}}),null,16)]),default:withCtx(()=>[I[39]||(I[39]=createBaseVNode("p",null," Når du aksepterer her og gjør endringer i tekstfelt vil skyen skifte farge til oransje og innholde et kryss. Da er ikke lenger feltet du har justert synkronisert med prosjektsiden. På den måten kan du tilpasse innhold til Finn uten å påvirke prosjektsiden. ",-1)),createVNode(unref(Wo),{src:"https://assets.kvass.no/67c59b8a92504cdf70ab97d2",size:"contain",width:"100%",aspectRatio:"16/9"})]),actions:withCtx(({close:V})=>[createVNode(unref(Se),{label:"Nei, ta meg tilbake",onClick:V},null,8,["onClick"]),createVNode(unref(Se),{label:"Ja, den er grei!",variant:"primary",onClick:()=>{H(),V()}},null,8,["onClick"])]),_:1},512),createVNode(unref(mB),{title:"Tilpasset annonse eller automatisert annonse",variant:"info",class:"ad__alert",icon:"fa-pro-regular:exclamation-circle"},{default:withCtx(()=>I[40]||(I[40]=[createBaseVNode("p",{style:{"margin-top":"0"}}," Basert på informasjon du har fylt ut til prosjektsiden har vi opprettet en Finn-annonse basert på dette. ",-1),createBaseVNode("p",null," Dersom du ønsker å tilpasse prosjektet med nye bilder og tekster, vær klar over at prosjektsiden og Finn-annonsen ikke lengre vil synkroniseres. Det betyr at dersom du endrer tekst under prosjektsiden, for eksempel under steget presentasjon, vil det ikke automatisk oppdateres på Finn.no. ",-1),createBaseVNode("p",null,' Om du ønsker å benytte den ferdigutfylte Finn-annonsen vi tilbyr trenger du ikke gjøre endringer på denne siden. Dersom du tidligere har gjort endringer og ønsker å tilbakestille til vår ferdig utfylte annonse kan du gjøre dette under knappen "Tilbakestill innhold" ',-1)])),_:1}),(openBlock(),createBlock(KeepAlive,null,[k.value?(openBlock(),createBlock(unref(_r),{key:0,justify:"center",style:{"background-color":"whitesmoke"},class:"k-py-3xl"},{default:withCtx(()=>[createVNode(unref(Bf),{size:"large"})]),_:1})):(openBlock(),createBlock(unref(SC),{key:1,variant:"prompt",appearance:"shadow"},{header:withCtx(()=>[createBaseVNode("div",_hoisted_1,[I[41]||(I[41]=createBaseVNode("span",null,"Innhold i Finn-annonsen",-1)),createVNode(unref(Se),{class:"ad__go-back",icon:"fa-pro-light:chevron-left",label:"Gå tilbake",variant:"secondary",onClick:j.onPrev},null,8,["onClick"]),createVNode(unref(up),{alignment:"center",teleport:!1,title:"Tilbakestill endringer",subtitle:"Tilbakestill alle endringer du har gjort, slik at at alle feltene blir synkronisert igjen"},{trigger:withCtx(({triggerProps:V})=>[createVNode(unref(Se),mergeProps({class:"ad__reset",label:"Tilbakestill innhold",variant:"secondary"},V),null,16)]),actions:withCtx(({close:V})=>[createVNode(unref(Se),{class:"ad__reset",label:"Nei, gå tilbake",variant:"secondary",onClick:V},null,8,["onClick"]),createVNode(unref(Se),{class:"ad__reset",label:"Ja, tilbakestill innhold",variant:"primary",onClick:()=>{s(),V()}},null,8,["onClick"])]),_:1}),n.value.code?createCommentVNode("",!0):(openBlock(),createBlock(unref(Se),{key:0,class:"ad__reset",label:"Lagre utkast",variant:"secondary",onClick:Q,promise:J.value},null,8,["promise"]))]),I[42]||(I[42]=createBaseVNode("div",{class:"k-card__subtitle"},[createBaseVNode("div",null," Her kan du få et overblikk over informasjonen som sendes til Finn, og hvor den finnes i løsningen. "),createBaseVNode("div",null,"Her kan du også justere detaljer tilknyttet din annonse.")],-1))]),default:withCtx(()=>[createVNode(unref(_r),{direction:"column",gap:"2rem"},{default:withCtx(()=>[G("PROJECT_NAME","HOUSING_UNIT_REF","HEADING")?(openBlock(),createBlock(unref(BB),{key:0,expanded:!0},{title:withCtx(()=>[createBaseVNode("span",null,toDisplayString(G("PROJECT_NAME","HOUSING_UNIT_REF")?"Hovedtittel og undertittel":"Hovedtittel"),1),createVNode(Tooltip,{class:"k-ml-xxs",content:G("PROJECT_NAME","HOUSING_UNIT_REF")?"Teksten du skriver her vises som hovedtittelen og undertittel i annonsen.":"Teksten du skriver her vises som hovedtittel i annonsen.",src:"https://assets.kvass.no/67c7181792504cdf70aba68d"},null,8,["content"])]),default:withCtx(()=>[B("HOUSING_UNIT_REF")?(openBlock(),createBlock(unref(gx),mergeProps({key:0},unref(T)("HOUSING_UNIT_REF"),{label:B("PROJECT_NAME")?"Leilighetsnr":"Hovedtittel for annonsen",class:["ad__field",{"ad__field--edited":O("HOUSING_UNIT_REF")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.HOUSING_UNIT_REF,"onUpdate:modelValue":I[0]||(I[0]=V=>o.value.HOUSING_UNIT_REF=V)},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("HOUSING_UNIT_REF").icon},null,8,["icon"]),[[unref(Mt),{content:N("HOUSING_UNIT_REF").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["label","class"])):createCommentVNode("",!0),B("PROJECT_NAME")?(openBlock(),createBlock(unref(gx),mergeProps({key:1},unref(T)("PROJECT_NAME"),{label:"Hovedtittel for annonsen",class:["ad__field",{"ad__field--edited":O("PROJECT_NAME")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.PROJECT_NAME,"onUpdate:modelValue":I[1]||(I[1]=V=>o.value.PROJECT_NAME=V)},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("PROJECT_NAME").icon},null,8,["icon"]),[[unref(Mt),{content:N("PROJECT_NAME").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("HEADING")?(openBlock(),createBlock(unref(gx),mergeProps({key:2},unref(T)("HEADING"),{label:G("PROJECT_NAME","HOUSING_UNIT_REF")?"Undertittel":"Hovedtittel",class:["ad__field",{"ad__field--edited":O("HEADING")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.HEADING,"onUpdate:modelValue":I[2]||(I[2]=V=>o.value.HEADING=V)},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("HEADING").icon},null,8,["icon"]),[[unref(Mt),{content:N("HEADING").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["label","class"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),G("PRICE_SUGGESTION","COLLECTIVE_DEBT","SALES_COST_SUM","TOTAL_PRICE")?(openBlock(),createBlock(unref(BB),{key:1,expanded:!0},{title:withCtx(()=>[I[43]||(I[43]=createBaseVNode("span",null,"Prisantydning",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Prisantydning vises slik i Finn annonsen",src:"https://assets.kvass.no/67d03cc19b29de28ddebeebf"})]),default:withCtx(()=>[B("PRICE_SUGGESTION")?(openBlock(),createBlock(unref(gx),mergeProps({key:0},unref(T)("PRICE_SUGGESTION"),{label:"Prisantydning",class:["ad__field",{"ad__field--edited":O("PRICE_SUGGESTION")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.PRICE_SUGGESTION,"onUpdate:modelValue":I[3]||(I[3]=V=>o.value.PRICE_SUGGESTION=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("PRICE_SUGGESTION").icon},null,8,["icon"]),[[unref(Mt),{content:N("PRICE_SUGGESTION").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("SALES_COST_SUM")?(openBlock(),createBlock(unref(gx),mergeProps({key:1},unref(T)("SALES_COST_SUM"),{label:"Omkostninger",class:["ad__field",{"ad__field--edited":O("SALES_COST_SUM")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.SALES_COST_SUM,"onUpdate:modelValue":I[4]||(I[4]=V=>o.value.SALES_COST_SUM=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("SALES_COST_SUM").icon},null,8,["icon"]),[[unref(Mt),{content:N("SALES_COST_SUM").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("COLLECTIVE_DEBT")?(openBlock(),createBlock(unref(gx),mergeProps({key:2},unref(T)("COLLECTIVE_DEBT"),{label:"Fellesgjeld",class:["ad__field",{"ad__field--edited":O("COLLECTIVE_DEBT")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.COLLECTIVE_DEBT,"onUpdate:modelValue":I[5]||(I[5]=V=>o.value.COLLECTIVE_DEBT=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("COLLECTIVE_DEBT").icon},null,8,["icon"]),[[unref(Mt),{content:N("COLLECTIVE_DEBT").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("TOTAL_PRICE")?(openBlock(),createBlock(unref(gx),mergeProps({key:3},unref(T)("TOTAL_PRICE"),{label:"Totalpris",class:["ad__field",{"ad__field--edited":O("TOTAL_PRICE")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.TOTAL_PRICE,"onUpdate:modelValue":I[6]||(I[6]=V=>o.value.TOTAL_PRICE=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("TOTAL_PRICE").icon},null,8,["icon"]),[[unref(Mt),{content:N("TOTAL_PRICE").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),createVNode(unref(BB),{expanded:!0},{title:withCtx(()=>[I[44]||(I[44]=createBaseVNode("span",null," Nøkkelinformasjon",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Nøkkelinformasjon vises slik i Finn annonsen",src:"https://assets.kvass.no/67c8077992504cdf70aba6f6"})]),default:withCtx(()=>[createVNode(unref(AB),{columns:"2"},{default:withCtx(()=>[B("IS_LEISURE")?(openBlock(),createBlock(unref(gx),mergeProps({key:0,label:"Er hytte"},unref(T)("IS_LEISURE")),{default:withCtx(()=>[createVNode(unref(Go),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":O("IS_LEISURE")}]),label:o.value.IS_LEISURE?"Ja":"Nei",items:[{label:"Nei",action:()=>{o.value.IS_LEISURE=null,Array.isArray(o.value.PROPERTY_TYPE)&&(o.value.PROPERTY_TYPE=o.value.PROPERTY_TYPE.filter(V=>l.value.some(q=>q.value===V)))}},{label:"Ja",action:()=>{o.value.IS_LEISURE=!0,Array.isArray(o.value.PROPERTY_TYPE)&&(o.value.PROPERTY_TYPE=o.value.PROPERTY_TYPE.filter(V=>l.value.some(q=>q.value===V)))}}]},{"icon-right":withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),withDirectives(createVNode(unref(Ue),{icon:N("IS_LEISURE").icon},null,8,["icon"]),[[unref(Mt),{content:N("IS_LEISURE").label,container:!1}]])]),_:1},8,["class","label","items"])]),_:1},16)):createCommentVNode("",!0),B("IS_LEISURE")&&!o.value.IS_LEISURE?(openBlock(),createElementBlock("div",_hoisted_2)):createCommentVNode("",!0),(B("IS_LEISURE")?o.value.IS_LEISURE:B("LEISURE_SITUATION"))?(openBlock(),createBlock(unref(gx),mergeProps({key:2,label:"Beliggenhet"},unref(T)("LEISURE_SITUATION")),{default:withCtx(()=>[createVNode(unref(Go),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":O("LEISURE_SITUATION")}]),label:unref(LeisureSituation).find(V=>V.value===o.value.LEISURE_SITUATION)?.label||"Velg...",items:unref(LeisureSituation).map(V=>({...V,action:()=>{o.value.LEISURE_SITUATION=V.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),withDirectives(createVNode(unref(Ue),{icon:N("LEISURE_SITUATION").icon},null,8,["icon"]),[[unref(Mt),{content:N("LEISURE_SITUATION").label,container:!1}]])]),_:1},8,["class","label","items"])]),_:1},16)):createCommentVNode("",!0),G("PROPERTY_TYPE")&&!Array.isArray(o.value.PROPERTY_TYPE)?(openBlock(),createBlock(unref(gx),mergeProps({key:3},unref(T)("PROPERTY_TYPE"),{label:"Enhetstype",class:["ad__dropdown",{"ad__dropdown--edited":O("PROPERTY_TYPE")}]}),{default:withCtx(()=>[createVNode(unref(Go),{label:l.value.find(V=>V.value===o.value.PROPERTY_TYPE)?.label||"Velg...",items:l.value.map(V=>({...V,action:()=>{o.value.PROPERTY_TYPE=V.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),withDirectives(createVNode(unref(Ue),{icon:N("PROPERTY_TYPE").icon},null,8,["icon"]),[[unref(Mt),{content:N("PROPERTY_TYPE").label,container:!1}]])]),_:1},8,["label","items"])]),_:1},16,["class"])):createCommentVNode("",!0),B("PLOT_AREA")?(openBlock(),createBlock(unref(gx),mergeProps({key:4},unref(T)("PLOT_AREA"),{label:"Tomteareal",class:["ad__field",{"ad__field--edited":O("PLOT_AREA")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.PLOT_AREA,"onUpdate:modelValue":I[7]||(I[7]=V=>o.value.PLOT_AREA=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("PLOT_AREA").icon},null,8,["icon"]),[[unref(Mt),{content:N("PLOT_AREA").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("PLOT_IS_OWNED")?(openBlock(),createBlock(unref(gx),mergeProps({key:5,label:"Eiet tomt"},unref(T)("PLOT_IS_OWNED")),{default:withCtx(()=>[createVNode(unref(Go),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":O("PLOT_IS_OWNED")}]),label:o.value.PLOT_IS_OWNED==="yes"?"Ja":"Nei",items:[{label:"Nei",action:()=>o.value.PLOT_IS_OWNED="no"},{label:"Ja",action:()=>o.value.PLOT_IS_OWNED="yes"}]},{"icon-right":withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),withDirectives(createVNode(unref(Ue),{icon:N("PLOT_IS_OWNED").icon},null,8,["icon"]),[[unref(Mt),{content:N("PLOT_IS_OWNED").label,container:!1}]])]),_:1},8,["class","label","items"])]),_:1},16)):createCommentVNode("",!0),B("RENTAL_PRICE_PER_MONTH")?(openBlock(),createBlock(unref(gx),mergeProps({key:6},unref(T)("RENTAL_PRICE_PER_MONTH"),{label:"Månedsleie",class:["ad__field",{"ad__field--edited":O("RENTAL_PRICE_PER_MONTH")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.RENTAL_PRICE_PER_MONTH,"onUpdate:modelValue":I[8]||(I[8]=V=>o.value.RENTAL_PRICE_PER_MONTH=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("RENTAL_PRICE_PER_MONTH").icon},null,8,["icon"]),[[unref(Mt),{content:N("RENTAL_PRICE_PER_MONTH").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("NO_OF_ROOMS")?(openBlock(),createBlock(unref(gx),mergeProps({key:7},unref(T)("NO_OF_ROOMS"),{label:"Antall rom",class:["ad__field",{"ad__field--edited":O("NO_OF_ROOMS")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.NO_OF_ROOMS,"onUpdate:modelValue":I[9]||(I[9]=V=>o.value.NO_OF_ROOMS=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("NO_OF_ROOMS").icon},null,8,["icon"]),[[unref(Mt),{content:N("NO_OF_ROOMS").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("NO_OF_BEDROOMS")?(openBlock(),createBlock(unref(gx),mergeProps({key:8},unref(T)("NO_OF_BEDROOMS"),{label:"Soverom",class:["ad__field",{"ad__field--edited":O("NO_OF_BEDROOMS")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.NO_OF_BEDROOMS,"onUpdate:modelValue":I[10]||(I[10]=V=>o.value.NO_OF_BEDROOMS=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("NO_OF_BEDROOMS").icon},null,8,["icon"]),[[unref(Mt),{content:N("NO_OF_BEDROOMS").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("AREA_FROM")?(openBlock(),createBlock(unref(gx),mergeProps({key:9},unref(T)("AREA_FROM"),{label:"Areal fra",class:["ad__field",{"ad__field--edited":O("AREA_FROM")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.AREA_FROM,"onUpdate:modelValue":I[11]||(I[11]=V=>o.value.AREA_FROM=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("AREA_FROM").icon},null,8,["icon"]),[[unref(Mt),{content:N("AREA_FROM").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("AREA_TO")?(openBlock(),createBlock(unref(gx),mergeProps({key:10},unref(T)("AREA_TO"),{label:"Areal til",class:["ad__field",{"ad__field--edited":O("AREA_TO")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.AREA_TO,"onUpdate:modelValue":I[12]||(I[12]=V=>o.value.AREA_TO=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("AREA_TO").icon},null,8,["icon"]),[[unref(Mt),{content:N("AREA_TO").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("PRIMARY_ROOM_AREA")?(openBlock(),createBlock(unref(gx),mergeProps({key:11},unref(T)("PRIMARY_ROOM_AREA"),{label:"Primærareal",class:["ad__field",{"ad__field--edited":O("PRIMARY_ROOM_AREA")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.PRIMARY_ROOM_AREA,"onUpdate:modelValue":I[13]||(I[13]=V=>o.value.PRIMARY_ROOM_AREA=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("PRIMARY_ROOM_AREA").icon},null,8,["icon"]),[[unref(Mt),{content:N("PRIMARY_ROOM_AREA").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("USEABLE_AREA")?(openBlock(),createBlock(unref(gx),mergeProps({key:12},unref(T)("USEABLE_AREA"),{label:"Bruksareal (BRA)",class:["ad__field",{"ad__field--edited":O("USEABLE_AREA")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.USEABLE_AREA,"onUpdate:modelValue":I[14]||(I[14]=V=>o.value.USEABLE_AREA=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("USEABLE_AREA").icon},null,8,["icon"]),[[unref(Mt),{content:N("USEABLE_AREA").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("USEABLE_AREA_I")?(openBlock(),createBlock(unref(gx),mergeProps({key:13},unref(T)("USEABLE_AREA_I"),{label:"Internt bruksareal (BRA-i)",class:["ad__field",{"ad__field--edited":O("USEABLE_AREA_I")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.USEABLE_AREA_I,"onUpdate:modelValue":I[15]||(I[15]=V=>o.value.USEABLE_AREA_I=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("USEABLE_AREA_I").icon},null,8,["icon"]),[[unref(Mt),{content:N("USEABLE_AREA_I").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("USEABLE_AREA_E")?(openBlock(),createBlock(unref(gx),mergeProps({key:14},unref(T)("USEABLE_AREA_E"),{label:"Eksternt bruksareal (BRA-e)",class:["ad__field",{"ad__field--edited":O("USEABLE_AREA_E")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.USEABLE_AREA_E,"onUpdate:modelValue":I[16]||(I[16]=V=>o.value.USEABLE_AREA_E=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("USEABLE_AREA_E").icon},null,8,["icon"]),[[unref(Mt),{content:N("USEABLE_AREA_E").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("USEABLE_AREA_B")?(openBlock(),createBlock(unref(gx),mergeProps({key:15},unref(T)("USEABLE_AREA_B"),{label:"Innglasset balkong (BRA-b)",class:["ad__field",{"ad__field--edited":O("USEABLE_AREA_B")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.USEABLE_AREA_B,"onUpdate:modelValue":I[17]||(I[17]=V=>o.value.USEABLE_AREA_B=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("USEABLE_AREA_B").icon},null,8,["icon"]),[[unref(Mt),{content:N("USEABLE_AREA_B").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("GROSS_AREA")?(openBlock(),createBlock(unref(gx),mergeProps({key:16},unref(T)("GROSS_AREA"),{label:"Bruttoareal (BTA)",class:["ad__field",{"ad__field--edited":O("GROSS_AREA")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.GROSS_AREA,"onUpdate:modelValue":I[18]||(I[18]=V=>o.value.GROSS_AREA=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("GROSS_AREA").icon},null,8,["icon"]),[[unref(Mt),{content:N("GROSS_AREA").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("NO_OF_PARKING_SPOTS")?(openBlock(),createBlock(unref(gx),mergeProps({key:17},unref(T)("NO_OF_PARKING_SPOTS"),{label:"Antall parkeringsplasser",class:["ad__field",{"ad__field--edited":O("NO_OF_PARKING_SPOTS")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.NO_OF_PARKING_SPOTS,"onUpdate:modelValue":I[19]||(I[19]=V=>o.value.NO_OF_PARKING_SPOTS=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("NO_OF_PARKING_SPOTS").icon},null,8,["icon"]),[[unref(Mt),{content:N("NO_OF_PARKING_SPOTS").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("FLOOR")?(openBlock(),createBlock(unref(gx),mergeProps({key:18},unref(T)("FLOOR"),{label:"Etasje",class:["ad__field",{"ad__field--edited":O("FLOOR")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.FLOOR,"onUpdate:modelValue":I[20]||(I[20]=V=>o.value.FLOOR=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("FLOOR").icon},null,8,["icon"]),[[unref(Mt),{content:N("FLOOR").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("NO_OF_FLOORS")?(openBlock(),createBlock(unref(gx),mergeProps({key:19},unref(T)("NO_OF_FLOORS"),{label:"Antall etasjer",class:["ad__field",{"ad__field--edited":O("NO_OF_FLOORS")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.NO_OF_FLOORS,"onUpdate:modelValue":I[21]||(I[21]=V=>o.value.NO_OF_FLOORS=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("NO_OF_FLOORS").icon},null,8,["icon"]),[[unref(Mt),{content:N("NO_OF_FLOORS").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("CONSTRUCTION_YEAR")?(openBlock(),createBlock(unref(gx),mergeProps({key:20},unref(T)("CONSTRUCTION_YEAR"),{label:"Byggeår",class:["ad__field",{"ad__field--edited":O("CONSTRUCTION_YEAR")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.CONSTRUCTION_YEAR,"onUpdate:modelValue":I[22]||(I[22]=V=>o.value.CONSTRUCTION_YEAR=Number.isNaN(V)?null:V),mask:{mask:Number,unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("CONSTRUCTION_YEAR").icon},null,8,["icon"]),[[unref(Mt),{content:N("CONSTRUCTION_YEAR").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("RENOVATED_YEAR")?(openBlock(),createBlock(unref(gx),mergeProps({key:21},unref(T)("RENOVATED_YEAR"),{label:"Renoveringsår",class:["ad__field",{"ad__field--edited":O("RENOVATED_YEAR")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.RENOVATED_YEAR,"onUpdate:modelValue":I[23]||(I[23]=V=>o.value.RENOVATED_YEAR=Number.isNaN(V)?null:V),mask:{mask:Number,unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("RENOVATED_YEAR").icon},null,8,["icon"]),[[unref(Mt),{content:N("RENOVATED_YEAR").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("ENERGY_LABEL")?(openBlock(),createBlock(unref(gx),mergeProps({key:22,label:"Energimerking"},unref(T)("ENERGY_LABEL")),{default:withCtx(()=>[createVNode(unref(Go),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":O("ENERGY_LABEL")}]),label:unref(energyLabel).find(V=>V.value===o.value.ENERGY_LABEL)?.label||"Velg...",items:unref(energyLabel).map(V=>({...V,action:()=>{o.value.ENERGY_LABEL=V.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),withDirectives(createVNode(unref(Ue),{icon:N("ENERGY_LABEL").icon},null,8,["icon"]),[[unref(Mt),{content:N("ENERGY_LABEL").label,container:!1}]])]),_:1},8,["class","label","items"])]),_:1},16)):createCommentVNode("",!0),B("ENERGY_LABEL_COLOR_CODE")?(openBlock(),createBlock(unref(gx),mergeProps({key:23,label:"Energimerking (farge)"},unref(T)("ENERGY_LABEL_COLOR_CODE")),{default:withCtx(()=>[createVNode(unref(Go),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":O("ENERGY_LABEL_COLOR_CODE")}]),label:unref(energyLabelColor).find(V=>V.value===o.value.ENERGY_LABEL_COLOR_CODE)?.label||"Velg...",items:unref(energyLabelColor).map(V=>({...V,action:()=>{o.value.ENERGY_LABEL_COLOR_CODE=V.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-regular:angle-down",class:"k-mr-xs"}),withDirectives(createVNode(unref(Ue),{icon:N("ENERGY_LABEL_COLOR_CODE").icon},null,8,["icon"]),[[unref(Mt),{content:N("ENERGY_LABEL_COLOR_CODE").label,container:!1}]])]),_:1},8,["class","label","items"])]),_:1},16)):createCommentVNode("",!0),B("OWNERSHIP_TYPE")?(openBlock(),createBlock(unref(gx),mergeProps({key:24,label:"Eiertype"},unref(T)("OWNERSHIP_TYPE")),{default:withCtx(()=>[createVNode(unref(Go),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":O("OWNERSHIP_TYPE")}]),label:unref(OwnershipTypes).find(V=>V.value===o.value.OWNERSHIP_TYPE)?.label||"Velg...",items:unref(OwnershipTypes).map(V=>({...V,action:()=>{o.value.OWNERSHIP_TYPE=V.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),withDirectives(createVNode(unref(Ue),{icon:N("OWNERSHIP_TYPE").icon},null,8,["icon"]),[[unref(Mt),{content:N("OWNERSHIP_TYPE").label,container:!1}]])]),_:1},8,["class","label","items"])]),_:1},16)):createCommentVNode("",!0),B("BEDROOMS_FROM")?(openBlock(),createBlock(unref(gx),mergeProps({key:25},unref(T)("BEDROOMS_FROM"),{label:"Soverom fra",class:["ad__field",{"ad__field--edited":O("BEDROOMS_FROM")}]}),{default:withCtx(()=>[createVNode(unref(hy),{mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0},modelValue:o.value.BEDROOMS_FROM,"onUpdate:modelValue":I[24]||(I[24]=V=>o.value.BEDROOMS_FROM=Number.isNaN(V)?null:V)},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("BEDROOMS_FROM").icon},null,8,["icon"]),[[unref(Mt),{content:N("BEDROOMS_FROM").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("BEDROOMS_TO")?(openBlock(),createBlock(unref(gx),mergeProps({key:26},unref(T)("BEDROOMS_TO"),{label:"Soverom til",class:["ad__field",{"ad__field--edited":O("BEDROOMS_TO")}]}),{default:withCtx(()=>[createVNode(unref(hy),{mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0},modelValue:o.value.BEDROOMS_TO,"onUpdate:modelValue":I[25]||(I[25]=V=>o.value.BEDROOMS_TO=Number.isNaN(V)?null:V)},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("BEDROOMS_TO").icon},null,8,["icon"]),[[unref(Mt),{content:N("BEDROOMS_TO").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0)]),_:1})]),_:1}),G("PROPERTY_TYPE")&&Array.isArray(o.value.PROPERTY_TYPE)?(openBlock(),createBlock(unref(BB),{key:2,expanded:!0},{title:withCtx(()=>[I[45]||(I[45]=createBaseVNode("span",null,"Enhetstyper for annonsen",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Enhetstypene som velges her vil bli synlig under enhetstyper på Finn-annonsen. De vil også være tilgjengelige som filtre i søkelisten.",src:"https://assets.kvass.no/67c8203b92504cdf70aba768"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":O("PROPERTY_TYPE")}]),icon:N("PROPERTY_TYPE").icon},null,8,["class","icon"]),[[unref(Mt),{content:N("PROPERTY_TYPE").label,container:!1}]])]),default:withCtx(()=>[B("PROPERTY_TYPE")?(openBlock(),createBlock(unref(gx),mergeProps({key:0},unref(T)("PROPERTY_TYPE"),{label:"Tilgjengelige lokaler"}),{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(l.value,V=>(openBlock(),createBlock(unref(hd),{modelValue:o.value.PROPERTY_TYPE,"onUpdate:modelValue":I[26]||(I[26]=q=>o.value.PROPERTY_TYPE=q),value:V.value,label:V.label},null,8,["modelValue","value","label"]))),256))]),_:1},16)):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),G("MEDIA")?(openBlock(),createBlock(unref(BB),{key:3,expanded:!0},{title:withCtx(()=>[I[46]||(I[46]=createBaseVNode("span",null,"Bilder",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Bildene hentes fra prosjektsiden. Det første bildet blir forsidebildet i Finn-annonsen.",src:"https://assets.kvass.no/67c8088692504cdf70aba702"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":O("MEDIA")}]),icon:N("MEDIA").icon},null,8,["class","icon"]),[[unref(Mt),{content:N("MEDIA").label,container:!1}]])]),default:withCtx(()=>[G("MEDIA")?(openBlock(),createBlock(unref(NB),{key:0,modelValue:o.value.MEDIA,"onUpdate:modelValue":I[27]||(I[27]=V=>o.value.MEDIA=V),label:"Bilder i Finn-annonsen",dropMessage:"Dra en fil hit eller <b>velg</b> for å laste opp",accept:["image/jpeg","image/png","image/jpg"],upload:unref(uploadFunction),types:["Image"],multiple:!0,sortable:!0,description:!0,placement:"outside",size:"contain",labels:{selectMessage:"Trykk på knappen nedenfor for å laste opp andre filtyper",select:"Velg",cancel:"Avbryt",save:"Bekreft",descriptionPlaceholder:"",image:{createLabel:"Bilde",preview:"",inputLabel:"",error:""}}},null,8,["modelValue","upload"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),G("FLOORPLAN_MEDIA")?(openBlock(),createBlock(unref(BB),{key:4,expanded:!0},{title:withCtx(()=>[I[47]||(I[47]=createBaseVNode("span",null,"Plantegninger",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Plantegninger vises sist i bildegalleriet eller som en egen knapp i galleriet med navnet «Plantegninger». Dette avhenger av hva annonsetypen støtter.",src:"https://assets.kvass.no/67d1501f9b29de28ddec33d9"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":O("FLOORPLAN_MEDIA")}]),icon:N("FLOORPLAN_MEDIA").icon},null,8,["class","icon"]),[[unref(Mt),{content:N("FLOORPLAN_MEDIA").label,container:!1}]])]),default:withCtx(()=>[G("FLOORPLAN_MEDIA")?(openBlock(),createBlock(unref(LB),{key:0,rename:!1,modelValue:o.value.FLOORPLAN_MEDIA,"onUpdate:modelValue":I[28]||(I[28]=V=>o.value.FLOORPLAN_MEDIA=V),label:"Plantegninger i Finn-annonsen",dropMessage:"Dra en fil hit eller <b>velg</b> for å laste opp",accept:["image/jpeg","image/png","image/jpg"],upload:unref(uploadFunction),uploadOptions:{},multiple:!0,sortable:!0,labels:{delete:"Slett",download:"Last ned",copy:"Kopier lenke"}},null,8,["modelValue","upload"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),G("GENERAL_DESCRIPTION")?(openBlock(),createBlock(_sfc_main$e,{key:5,expanded:!0,modelValue:o.value.GENERAL_DESCRIPTION,"onUpdate:modelValue":I[29]||(I[29]=V=>o.value.GENERAL_DESCRIPTION=V)},{title:withCtx(()=>[I[48]||(I[48]=createBaseVNode("span",null,"Beskrivelse",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Teksten du skriver her vises under beskrivelsen i Finn-annonsen.",src:"https://assets.kvass.no/67c80a5792504cdf70aba732"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":O("GENERAL_DESCRIPTION")}]),icon:N("GENERAL_DESCRIPTION").icon},null,8,["class","icon"]),[[unref(Mt),{content:N("GENERAL_DESCRIPTION").label,container:!1}]])]),_:1},8,["modelValue"])):createCommentVNode("",!0),G("GENERAL_TEXT_REALESTATE")?(openBlock(),createBlock(ExpandableList,{key:6,expanded:!0,template:{GENERAL_HEADING:"",GENERAL_TEXT:""},modelValue:o.value.GENERAL_TEXT_REALESTATE,"onUpdate:modelValue":I[30]||(I[30]=V=>o.value.GENERAL_TEXT_REALESTATE=V)},{title:withCtx(()=>[I[49]||(I[49]=createBaseVNode("span",null,"Beskrivelse",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Teksten du skriver her vises under beskrivelsen i Finn-annonsen.",src:"https://assets.kvass.no/67c80a5792504cdf70aba732"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":O("GENERAL_TEXT_REALESTATE")}]),icon:N("GENERAL_TEXT_REALESTATE").icon},null,8,["class","icon"]),[[unref(Mt),{content:N("GENERAL_TEXT_REALESTATE").label,container:!1}]])]),default:withCtx(({item:V})=>[createVNode(unref(gx),{label:"Tittel"},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:V.GENERAL_HEADING,"onUpdate:modelValue":q=>V.GENERAL_HEADING=q},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),createVNode(unref(gx),{label:"Tekst"},{default:withCtx(()=>[createVNode(unref($B),{placeholder:"Skriv her...",actions:["bold","italic","orderedList","bulletList"],modelValue:V.GENERAL_TEXT,"onUpdate:modelValue":q=>V.GENERAL_TEXT=q},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:1},8,["modelValue"])):createCommentVNode("",!0),G("ESTATE_PREFERENCE","PROJECT_PREFERENCE")?(openBlock(),createBlock(unref(BB),{key:7,expanded:!0},{title:withCtx(()=>[createBaseVNode("span",null,toDisplayString(B("PROJECT_PREFERENCE")?"Fasiliteter i prosjektannonsen":"Fasiliteter i annonsen"),1),createVNode(Tooltip,{class:"k-ml-xxs",content:"Fasilitenene som velges her vil bli synlig under fasiliteter på Finn-annonsen. De vil også være tilgjengelige som filtre i søkelisten.",src:"https://assets.kvass.no/67c80a4c92504cdf70aba70e"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":B("PROJECT_PREFERENCE")?O("PROJECT_PREFERENCE"):O("ESTATE_PREFERENCE")}]),icon:B("PROJECT_PREFERENCE")?N("PROJECT_PREFERENCE").icon:N("ESTATE_PREFERENCE").icon},null,8,["class","icon"]),[[unref(Mt),{content:B("PROJECT_PREFERENCE")?N("PROJECT_PREFERENCE").label:N("ESTATE_PREFERENCE").label,container:!1}]])]),default:withCtx(()=>[B("PROJECT_PREFERENCE")?(openBlock(),createBlock(unref(gx),{key:0,class:"facilities",label:"Tilgjengelige fasiliteter"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(p.value.filter(V=>V.categories.includes(n.value.type)),V=>(openBlock(),createBlock(unref(hd),{modelValue:o.value.PROJECT_PREFERENCE,"onUpdate:modelValue":I[31]||(I[31]=q=>o.value.PROJECT_PREFERENCE=q),value:V.value,label:V.label},null,8,["modelValue","value","label"]))),256))]),_:1})):createCommentVNode("",!0),B("ESTATE_PREFERENCE")?(openBlock(),createBlock(unref(gx),{key:1,class:"facilities",label:"Tilgjengelige fasiliteter"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(p.value.filter(V=>V.categories.includes(n.value.type)),V=>(openBlock(),createBlock(unref(hd),{modelValue:o.value.ESTATE_PREFERENCE,"onUpdate:modelValue":I[32]||(I[32]=q=>o.value.ESTATE_PREFERENCE=q),value:V.value,label:V.label},null,8,["modelValue","value","label"]))),256))]),_:1})):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),u.value.length?(openBlock(),createBlock(unref(BB),{key:8,expanded:!0},{title:withCtx(()=>[I[50]||(I[50]=createBaseVNode("span",null," Valgte enheter til Finn-annonsen ",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Slik vises de valgte enhetene i Finn-annonsen.",src:"https://assets.kvass.no/67c80a5a92504cdf70aba73e"})]),default:withCtx(()=>[createVNode(UnitTable,{initialUnitFields:y.value,units:u.value,modelValue:n.value,"onUpdate:modelValue":I[33]||(I[33]=V=>n.value=V),facilities:x.value},null,8,["initialUnitFields","units","modelValue","facilities"])]),_:1})):createCommentVNode("",!0),R.value?(openBlock(),createElementBlock(Fragment,{key:9},[createVNode(unref(BB),{title:"Adresse",subtitle:"Om du vil endre adresse må du tilpasse denne på grunnlag.",expandable:!1,expanded:!1},{actions:withCtx(()=>[createVNode(unref(Se),{class:"ad__navigate-button",variant:"primary",label:"Gå til Grunnlag",is:"a",target:"_blank",href:z("basis"),iconRight:"fa-pro-light:arrow-up-right-from-square"},null,8,["href"])]),_:1}),createVNode(unref(mB),{variant:"danger",content:R.value,icon:"fa-pro-light:exclamation-triangle"},null,8,["content"])],64)):createCommentVNode("",!0),G("PHASE_PLANNING","PHASE_SALE_START","PHASE_DEVELOPMENT_START","PHASE_MOVE_IN","CURRENT_PHASE")?(openBlock(),createBlock(unref(BB),{key:10,expandable:!1,expanded:!1},{title:withCtx(()=>[I[51]||(I[51]=createBaseVNode("span",null,"Prosjektstatus",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"For å endre prosjektstatus må du tilpasse den i presentasjonen. Slik vises prosjektstatus i Finn-annonsen.",src:"https://assets.kvass.no/67c80a5492504cdf70aba726"})]),actions:withCtx(()=>[createVNode(unref(Se),{class:"ad__navigate-button",variant:"primary",label:"Gå til Presentasjon",is:"a",target:"_blank",href:z("presentation"),iconRight:"fa-pro-light:arrow-up-right-from-square"},null,8,["href"])]),_:1})):createCommentVNode("",!0),createVNode(unref(BB),{expandable:!1,expanded:!1},{title:withCtx(()=>[I[52]||(I[52]=createBaseVNode("span",null,"Kundebehandler",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"For å endre kontaktperson må du tilpasse hvem som er kundebehandler under «roller». Slik vises kundebehandler i Finn-annonsen.",src:"https://assets.kvass.no/67c80a5092504cdf70aba71a"})]),actions:withCtx(()=>[createVNode(unref(Se),{class:"ad__navigate-button",variant:"primary",label:"Gå til Roller",is:"a",target:"_blank",href:z("roles"),iconRight:"fa-pro-light:arrow-up-right-from-square"},null,8,["href"])]),_:1}),M.value?(openBlock(),createBlock(unref(mB),{key:11,variant:"danger",content:M.value,icon:"fa-pro-light:exclamation-triangle"},null,8,["content"])):createCommentVNode("",!0),G("MOREINFO")?(openBlock(),createBlock(ExpandableList,{key:12,expanded:!0,limit:4,template:{URL:"",URLTEXT:""},modelValue:o.value.MOREINFO,"onUpdate:modelValue":I[36]||(I[36]=V=>o.value.MOREINFO=V),onRemove:I[37]||(I[37]=V=>{const q=Object.keys(d.value).reverse().find(K=>K.startsWith("MOREINFO.")&&K.endsWith(".URL")&&d.value[K]);q&&(d.value[q]=!1)})},createSlots({title:withCtx(()=>[I[53]||(I[53]=createBaseVNode("span",null,"Nyttige lenker i Finn-annonsen",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Nyttige lenker vises her i Finn-annonsen. Noen felt er standard og låst av Finn, derfor vises lenken til prosjektsiden alltid automatisk. Du kan fritt legge til egne lenker og lenker til andre nettsteder.",src:"https://assets.kvass.no/67c80a5e92504cdf70aba756"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":O("MOREINFO")}]),icon:N("MOREINFO").icon},null,8,["class","icon"]),[[unref(Mt),{content:N("MOREINFO").label,container:!1}]])]),default:withCtx(({item:V,index:q})=>[createVNode(unref(AB),{columns:"2"},{default:withCtx(()=>[createVNode(unref(gx),{label:"URL til nyttig lenke",onBlur:()=>d.value[`MOREINFO.${q}.URL`]=!0,error:d.value[`MOREINFO.${q}.URL`]?Object.entries(unref(E).errors.value.errors).filter(([K,Z])=>K===`MOREINFO.${q}.URL`).map(([K,Z])=>Z).flat().join(`
|
|
7
|
+
`);return{errors:k.errors.value,validate:k.bind,passes:g,error:S}})),s=(p,x)=>!!p.hasOwnProperty(x),l=(p,...x)=>!!x.map(k=>s(p,k)).find(Boolean),o=(p,x)=>r.value.units[p]?r.value.units[p].fields.hasOwnProperty(x):!1,f=p=>p?{icon:"fa-pro-regular:cloud-xmark",label:"Ikke synkronisert"}:{icon:"fa-pro-regular:cloud-check",label:"Synkronisert"},u=(p,x)=>{const k=r.value.units[x].fields.IS_HIGHLIGHTED==="true"?"false":"true";r.value.units[x].fields.IS_HIGHLIGHTED=k},y=(p,x="basis")=>new URL(`${t.tenant}/residentials/${p}/edit/${x}`).toString();return(p,x)=>(openBlock(),createBlock(unref(IB),{is:"div",appearance:"indicator",treshhold:500,class:"unit-table-scroller"},{default:withCtx(()=>[createVNode(unref(TB),{sticky:!0,class:"unit-table",columns:[{id:"unit",label:"Enhet",size:"1fr"},{id:"highlight",label:"Fremhev enhet",align:"center",size:"150px"},{id:"settings",label:"Innstillinger",align:"center",size:"150px"}],items:i.value},{"highlight-label":withCtx(({item:k})=>[createBaseVNode("span",{innerHTML:k.label},null,8,_hoisted_1$1),createVNode(Tooltip,{class:"k-ml-xxs",content:"Slik vises utvalgte enheter i Finn-annonsen.",src:"https://assets.kvass.no/67c80a5c92504cdf70aba74a"})]),unit:withCtx(({item:k,rowIndex:g})=>[createBaseVNode("span",null,toDisplayString(k.HOUSING_UNIT_REF),1),n.value[g].error?(openBlock(),createElementBlock(Fragment,{key:0},[withDirectives(createVNode(unref(Ue),{class:"unit-table__error disable-focus-modal",icon:"fa-pro-solid:exclamation-triangle"},null,512),[[unref(Mt),{content:n.value[g].error,container:!1}]]),createVNode(unref(Se),{class:"k-ml-lg disable-focus-modal",is:"a",target:"_blank",label:"Gå til enhet",size:"small",href:y(k.USER_REFERENCE),iconRight:"fa-pro-light:arrow-up-right-from-square"},null,8,["href"])],64)):createCommentVNode("",!0)]),highlight:withCtx(({item:k,rowIndex:g})=>[createVNode(unref(Ue),{class:normalizeClass(["unit-table__highlight",{"unit-table__highlight--selected":r.value.units[g].fields.IS_HIGHLIGHTED==="true"}]),icon:"fa-pro-solid:star",tabindex:"0",onKeydown:withKeys(()=>{u(k,g)},["enter"]),onClick:()=>{u(k,g)}},null,8,["class","onKeydown","onClick"])]),settings:withCtx(({item:k,rowIndex:g})=>[(openBlock(),createBlock(_sfc_main$b,{units:p.units,initialUnitField:p.initialUnitFields.find(S=>S.USER_REFERENCE===k.USER_REFERENCE),key:k.USER_REFERENCE,modelValue:k,"onUpdate:modelValue":S=>{Object.entries(unref(Diff)(k,S)).map(([c,d])=>{if(c==="IS_HIGHLIGHTED")return;k[c]=d;const m=r.value.units.find(b=>b.id===k.USER_REFERENCE);m.fields[c]=d,unref(hasDiff)({value:d},{value:p.initialUnitFields.find(b=>b.USER_REFERENCE===k.USER_REFERENCE)[c]})||delete m.fields[c]})},hasFields:(...S)=>l(k,...S),hasField:(...S)=>s(k,...S),getIsEditedBind:(...S)=>f(...S),isEdited:(...S)=>o(g,...S),rules:p.units.map(S=>S.rules)[g],labels:p.units.map(S=>S.labels)[g],facilities:p.facilities},null,8,["units","initialUnitField","modelValue","onUpdate:modelValue","hasFields","hasField","getIsEditedBind","isEdited","rules","labels","facilities"]))]),_:1},8,["items"])]),_:1}))}}),_style_0$9=".unit-table{overflow:visible;box-sizing:border-box;padding:var(--k-ui-spacing);border-radius:var(--k-ui-rounding);background-color:#fff;--k-dialog-max-width: 900px;--k-dialog-min-width: 900px;--k-datatable-cell-size: 1rem;--k-datatable-odd-color: white;--k-datatable-even-color: var(--k-ui-color-neutral-lightest)}.unit-table-scroller{min-height:300px;max-height:1000px}.unit-table .k-datatable__cell-sort-icon{display:none}.unit-table__actions{--k-button-secondary-background: white}.unit-table__error{margin-left:.5rem;color:var(--k-ui-color-danger-dark)}.unit-table__error:focus{outline:var(--k-ui-outline-width) solid var(--k-ui-outline-color);outline-offset:var(--k-ui-outline-offset)}.unit-table [data-col-id=highlight]{z-index:3!important}.unit-table [data-col-id=highlight] .v-popper__popper{width:300px;font-size:1rem}.unit-table__highlight{font-size:2rem;color:var(--k-ui-color-neutral)}.unit-table__highlight:focus{outline:var(--k-ui-outline-width) solid var(--k-ui-outline-color);outline-offset:var(--k-ui-outline-offset)}.unit-table__highlight:hover{cursor:pointer}.unit-table__highlight:hover:not(.unit-table__highlight--selected){color:var(--k-ui-color-neutral-dark)}.unit-table__highlight--selected{color:var(--k-ui-color-primary)}",UnitTable=_export_sfc(_sfc_main$a,[["styles",[_style_0$9]]]),Properties=[{value:"flat",label:"Leilighet",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE","ESTATE_RENT"]},{value:"detached",label:"Enebolig",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE","ESTATE_RENT"]},{value:"terraced",label:"Rekkehus",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE","ESTATE_RENT"]},{value:"semidetached",label:"Tomannsbolig",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE","ESTATE_RENT"]},{value:"bedsit",label:"Hybel",categories:["ESTATE_RENT"]},{value:"cottage",label:"Hytte",categories:["ESTATE_PLANNED","ESTATE_PROJECT_LEISURE"],condition:e=>e.type!=="ESTATE_PLANNED"?!0:e.fields.IS_LEISURE},{value:"leisure_plot",label:"Hyttetomt",categories:["PLOT_SALE"]},{value:"office",label:"Kontor",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"businessplot",label:"Næringstomt",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"houseshare",label:"Rom i bofellesskap",categories:["ESTATE_RENT"]},{value:"plot",label:"Tomter",categories:["PLOT_SALE"]},{value:"business",label:"Butikk/Handel",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"industrial",label:"Produksjon/Industri",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"warehouse",label:"Lager/Logistikk",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"multipurposearea",label:"Kombinasjonslokaler",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"farm",label:"Gårdsbruk/Småbruk",categories:["ESTATE_PLANNED","ESTATE_PROJECT_LEISURE","ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"],condition:e=>e.type!=="ESTATE_PLANNED"?!0:e.fields.IS_LEISURE},{value:"multiunits",label:"Bygård/Flermannsbolig",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"shoppingmall",label:"Kjøpesenter",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"mechshop",label:"Verksted",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"garage",label:"Garasje/Parkering",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT","ESTATE_RENT"]},{value:"hotel",label:"Hotell/Overnatting",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"restaurant",label:"Serveringslokale/Kantine",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"learningfacility",label:"Undervisning/Arrangement",categories:["ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT"]},{value:"project",label:"Prosjekt",categories:[]},{value:"other_leisure",label:"Annet fritid",categories:["ESTATE_PLANNED","ESTATE_PROJECT_LEISURE"],condition:e=>e.type!=="ESTATE_PLANNED"?!0:e.fields.IS_LEISURE},{value:"other",label:"Andre",categories:["ESTATE_PLANNED","ESTATE_PROJECT","ESTATE_PROJECT_LEISURE","ESTATE_PROJECT_SINGLE","ESTATE_BUSINESS_SALE","ESTATE_BUSINESS_RENT","ESTATE_RENT"]}],OwnershipTypes=[{value:"LEASEHOLD",label:"Obligasjon"},{value:"COLLECTIVE_OWNERSHIP",label:"Aksje"},{value:"FREEHOLD",label:"Eier (Selveier)"},{value:"PART_OWNERSHIP",label:"Andel"},{value:"OTHER",label:"Annet"}],LeisureSituation=[{value:"coast",label:"Ved sjøen"},{value:"mountains",label:"På fjellet"},{value:"inland",label:"Innlandet"}],energyLabel=[{value:"A",label:"A"},{value:"B",label:"B"},{value:"C",label:"C"},{value:"D",label:"D"},{value:"E",label:"E"},{value:"F",label:"F"},{value:"G",label:"G"}],energyLabelColor=[{value:"dark_Green",label:"Mørkegrønn"},{value:"light_Green",label:"Lysegrønn"},{value:"yellow",label:"Gul"},{value:"orange",label:"Oransje"},{value:"red",label:"Rød"}],_hoisted_1={class:"k-card__title ad__title"},_hoisted_2={key:1},_sfc_main$9=defineComponent({__name:"Ad.ce",props:mergeModels({onNext:{type:null},onPrev:{type:null}},{modelValue:{default:{}},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=useCurrentElement(),a=useAPI(t),r=inject(PropsInjectionKey),i=e,n=useModel(e,"modelValue"),s=()=>{n.value.fields={},n.value.units.forEach(j=>j.fields={}),U()},l=computed(()=>Properties.filter(j=>j.categories.includes(n.value.type)&&(j.condition?j.condition(n.value):!0))),o=ref({}),f=ref({}),u=ref([]),y=ref([]),p=ref([]),x=computed(()=>p.value.filter(j=>j.categories.includes(Categories.find(I=>I.type===n.value.type)?.unitType))),k=ref(!0),g=ref([]),S=ref({}),c=ref({}),d=ref({}),m=computed(()=>({...o.value,units:u.value.map(j=>j.fields)})),b=computed(()=>({required_if:'Feltet ":attribute" er påkrevd når ":other" er avhuket'})),E=fB({rules:S,labels:c,data:m,customMessages:b}),{bind:T}=E,M=computed(()=>{const j=(o.value.BROKER||[]).length;return j?Array.from({length:j},(I,V)=>E.errors.value.errors[`BROKER.${V}.PHONE`]).filter(Boolean).flat().join(""):"Kundebehandler er påkrevd"}),R=computed(()=>["MAP_COORDINATE.EASTING","MAP_COORDINATE.NORTHING","STREETADDRESS","ZIPCODE"].some(I=>E.errors.value.errors[I])?"Adresse og koordinater er påkrevd":""),B=j=>!!o.value.hasOwnProperty(j),G=(...j)=>j.some(B),O=j=>n.value.fields.hasOwnProperty(j),N=j=>O(j)?{icon:"fa-pro-regular:cloud-xmark",label:"Ikke synkronisert"}:{icon:"fa-pro-regular:cloud-check",label:"Synkronisert"},U=()=>(k.value=!0,a.fields(n.value).then(j=>{p.value=j.facilities,f.value=Clone(j.fields),o.value=Clone({...j.fields,...n.value.fields}),g.value.forEach(q=>q()),g.value=[],Object.keys(j.fields).forEach(q=>{const K=watch(()=>o.value[q],(Z,X)=>{n.value.fields[q]=Z,hasDiff({value:Z},{value:f.value[q]})||delete n.value.fields[q]},{deep:!0});g.value.push(K)}),y.value=Clone(j.units.map(q=>q.fields)),u.value=Clone(j.units.map((q,K)=>({...q,fields:{...q.fields,...n.value.units.find(Z=>Z.id===q.fields.USER_REFERENCE)?.fields||{}}})));const I=j.units.map(q=>q.rules).map(q=>Object.fromEntries(Object.entries(q).map(([K,Z])=>[`units.*.${K}`,Z]))),V=j.units.map(({fields:q,labels:K,rules:Z},X)=>{const $=`Enhet ${q.HOUSING_UNIT_REF||X+1}`;return{...Object.fromEntries(Object.entries(K).map(([te,ie])=>[`units.${X}.${te}`,`${$} ${ie}`]))}});S.value=Object.assign({},j.rules,...I),c.value=Object.assign({},j.labels,...V)}).catch(j=>{console.error(j),i.onPrev()}).finally(()=>{k.value=!1})),L=()=>!n.value.id||n.value.preview||!n.value.code?"Generer forhåndsvisning":"Neste",z=j=>new URL(`${r.tenant}/projects/${r.project}/edit/${j}`).toString();function P(){document.visibilityState==="visible"&&U()}const A=ref(),_=ref(!!(Object.keys(n.value.fields).length||n.value.units.some(j=>Object.keys(j.fields).length))),C=ref();function F(j){j.target.classList.contains("k-expandable__header")||j.target.classList.contains("disable-focus-modal")||C.value.open()}const D=j=>{t.value.querySelectorAll(".k-expandable--expandable").forEach(V=>{j?V.addEventListener("focusin",F):V.removeEventListener("focusin",F)})},Y=()=>{D(!1)},H=()=>{_.value=!0,Y()};onMounted(()=>{window.addEventListener("visibilitychange",P),U().then(()=>{_.value||D(!0)})}),onUnmounted(()=>{window.removeEventListener("visibilitychange",P),Y()});const J=ref(),W=ref(),Q=()=>{J.value=new Promise((j,I)=>{W.value=!0,a.publish(n.value,{publish:!1}).then(V=>{V.on("message",q=>{q.id&&(n.value.id=q.id),V.on("error",K=>{I(K)}),V.on("finished",()=>{V.cancel(),j(n.value.id),W.value=!1})})})})};return(j,I)=>(openBlock(),createElementBlock("div",{class:"ad",ref_key:"formContainer",ref:A},[createVNode(unref(up),{teleport:!1,ref_key:"editDialog",ref:C,title:"Du er i ferd med å tilpasse annonsen",variant:"prompt"},{trigger:withCtx(({triggerProps:V})=>[createVNode(unref(Se),mergeProps(V,{style:{display:"none"}}),null,16)]),default:withCtx(()=>[I[39]||(I[39]=createBaseVNode("p",null," Når du aksepterer her og gjør endringer i tekstfelt vil skyen skifte farge til oransje og innholde et kryss. Da er ikke lenger feltet du har justert synkronisert med prosjektsiden. På den måten kan du tilpasse innhold til Finn uten å påvirke prosjektsiden. ",-1)),createVNode(unref(Wo),{src:"https://assets.kvass.no/67c59b8a92504cdf70ab97d2",size:"contain",width:"100%",aspectRatio:"16/9"})]),actions:withCtx(({close:V})=>[createVNode(unref(Se),{label:"Nei, ta meg tilbake",onClick:V},null,8,["onClick"]),createVNode(unref(Se),{label:"Ja, den er grei!",variant:"primary",onClick:()=>{H(),V()}},null,8,["onClick"])]),_:1},512),createVNode(unref(mB),{title:"Tilpasset annonse eller automatisert annonse",variant:"info",class:"ad__alert",icon:"fa-pro-regular:exclamation-circle"},{default:withCtx(()=>[...I[40]||(I[40]=[createBaseVNode("p",{style:{"margin-top":"0"}}," Basert på informasjon du har fylt ut til prosjektsiden har vi opprettet en Finn-annonse basert på dette. ",-1),createBaseVNode("p",null," Dersom du ønsker å tilpasse prosjektet med nye bilder og tekster, vær klar over at prosjektsiden og Finn-annonsen ikke lengre vil synkroniseres. Det betyr at dersom du endrer tekst under prosjektsiden, for eksempel under steget presentasjon, vil det ikke automatisk oppdateres på Finn.no. ",-1),createBaseVNode("p",null,' Om du ønsker å benytte den ferdigutfylte Finn-annonsen vi tilbyr trenger du ikke gjøre endringer på denne siden. Dersom du tidligere har gjort endringer og ønsker å tilbakestille til vår ferdig utfylte annonse kan du gjøre dette under knappen "Tilbakestill innhold" ',-1)])]),_:1}),(openBlock(),createBlock(KeepAlive,null,[k.value?(openBlock(),createBlock(unref(_r),{key:0,justify:"center",style:{"background-color":"whitesmoke"},class:"k-py-3xl"},{default:withCtx(()=>[createVNode(unref(Bf),{size:"large"})]),_:1})):(openBlock(),createBlock(unref(SC),{key:1,variant:"prompt",appearance:"shadow"},{header:withCtx(()=>[createBaseVNode("div",_hoisted_1,[I[41]||(I[41]=createBaseVNode("span",null,"Innhold i Finn-annonsen",-1)),createVNode(unref(Se),{class:"ad__go-back",icon:"fa-pro-light:chevron-left",label:"Gå tilbake",variant:"secondary",onClick:j.onPrev},null,8,["onClick"]),createVNode(unref(up),{alignment:"center",teleport:!1,title:"Tilbakestill endringer",subtitle:"Tilbakestill alle endringer du har gjort, slik at at alle feltene blir synkronisert igjen"},{trigger:withCtx(({triggerProps:V})=>[createVNode(unref(Se),mergeProps({class:"ad__reset",label:"Tilbakestill innhold",variant:"secondary"},V),null,16)]),actions:withCtx(({close:V})=>[createVNode(unref(Se),{class:"ad__reset",label:"Nei, gå tilbake",variant:"secondary",onClick:V},null,8,["onClick"]),createVNode(unref(Se),{class:"ad__reset",label:"Ja, tilbakestill innhold",variant:"primary",onClick:()=>{s(),V()}},null,8,["onClick"])]),_:1}),n.value.code?createCommentVNode("",!0):(openBlock(),createBlock(unref(Se),{key:0,class:"ad__reset",label:"Lagre utkast",variant:"secondary",onClick:Q,promise:J.value},null,8,["promise"]))]),I[42]||(I[42]=createBaseVNode("div",{class:"k-card__subtitle"},[createBaseVNode("div",null," Her kan du få et overblikk over informasjonen som sendes til Finn, og hvor den finnes i løsningen. "),createBaseVNode("div",null,"Her kan du også justere detaljer tilknyttet din annonse.")],-1))]),default:withCtx(()=>[createVNode(unref(_r),{direction:"column",gap:"2rem"},{default:withCtx(()=>[G("PROJECT_NAME","HOUSING_UNIT_REF","HEADING")?(openBlock(),createBlock(unref(BB),{key:0,expanded:!0},{title:withCtx(()=>[createBaseVNode("span",null,toDisplayString(G("PROJECT_NAME","HOUSING_UNIT_REF")?"Hovedtittel og undertittel":"Hovedtittel"),1),createVNode(Tooltip,{class:"k-ml-xxs",content:G("PROJECT_NAME","HOUSING_UNIT_REF")?"Teksten du skriver her vises som hovedtittelen og undertittel i annonsen.":"Teksten du skriver her vises som hovedtittel i annonsen.",src:"https://assets.kvass.no/67c7181792504cdf70aba68d"},null,8,["content"])]),default:withCtx(()=>[B("HOUSING_UNIT_REF")?(openBlock(),createBlock(unref(gx),mergeProps({key:0},unref(T)("HOUSING_UNIT_REF"),{label:B("PROJECT_NAME")?"Leilighetsnr":"Hovedtittel for annonsen",class:["ad__field",{"ad__field--edited":O("HOUSING_UNIT_REF")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.HOUSING_UNIT_REF,"onUpdate:modelValue":I[0]||(I[0]=V=>o.value.HOUSING_UNIT_REF=V)},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("HOUSING_UNIT_REF").icon},null,8,["icon"]),[[unref(Mt),{content:N("HOUSING_UNIT_REF").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["label","class"])):createCommentVNode("",!0),B("PROJECT_NAME")?(openBlock(),createBlock(unref(gx),mergeProps({key:1},unref(T)("PROJECT_NAME"),{label:"Hovedtittel for annonsen",class:["ad__field",{"ad__field--edited":O("PROJECT_NAME")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.PROJECT_NAME,"onUpdate:modelValue":I[1]||(I[1]=V=>o.value.PROJECT_NAME=V)},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("PROJECT_NAME").icon},null,8,["icon"]),[[unref(Mt),{content:N("PROJECT_NAME").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("HEADING")?(openBlock(),createBlock(unref(gx),mergeProps({key:2},unref(T)("HEADING"),{label:G("PROJECT_NAME","HOUSING_UNIT_REF")?"Undertittel":"Hovedtittel",class:["ad__field",{"ad__field--edited":O("HEADING")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.HEADING,"onUpdate:modelValue":I[2]||(I[2]=V=>o.value.HEADING=V)},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("HEADING").icon},null,8,["icon"]),[[unref(Mt),{content:N("HEADING").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["label","class"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),G("PRICE_SUGGESTION","COLLECTIVE_DEBT","SALES_COST_SUM","TOTAL_PRICE")?(openBlock(),createBlock(unref(BB),{key:1,expanded:!0},{title:withCtx(()=>[I[43]||(I[43]=createBaseVNode("span",null,"Prisantydning",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Prisantydning vises slik i Finn annonsen",src:"https://assets.kvass.no/67d03cc19b29de28ddebeebf"})]),default:withCtx(()=>[B("PRICE_SUGGESTION")?(openBlock(),createBlock(unref(gx),mergeProps({key:0},unref(T)("PRICE_SUGGESTION"),{label:"Prisantydning",class:["ad__field",{"ad__field--edited":O("PRICE_SUGGESTION")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.PRICE_SUGGESTION,"onUpdate:modelValue":I[3]||(I[3]=V=>o.value.PRICE_SUGGESTION=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("PRICE_SUGGESTION").icon},null,8,["icon"]),[[unref(Mt),{content:N("PRICE_SUGGESTION").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("SALES_COST_SUM")?(openBlock(),createBlock(unref(gx),mergeProps({key:1},unref(T)("SALES_COST_SUM"),{label:"Omkostninger",class:["ad__field",{"ad__field--edited":O("SALES_COST_SUM")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.SALES_COST_SUM,"onUpdate:modelValue":I[4]||(I[4]=V=>o.value.SALES_COST_SUM=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("SALES_COST_SUM").icon},null,8,["icon"]),[[unref(Mt),{content:N("SALES_COST_SUM").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("COLLECTIVE_DEBT")?(openBlock(),createBlock(unref(gx),mergeProps({key:2},unref(T)("COLLECTIVE_DEBT"),{label:"Fellesgjeld",class:["ad__field",{"ad__field--edited":O("COLLECTIVE_DEBT")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.COLLECTIVE_DEBT,"onUpdate:modelValue":I[5]||(I[5]=V=>o.value.COLLECTIVE_DEBT=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("COLLECTIVE_DEBT").icon},null,8,["icon"]),[[unref(Mt),{content:N("COLLECTIVE_DEBT").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("TOTAL_PRICE")?(openBlock(),createBlock(unref(gx),mergeProps({key:3},unref(T)("TOTAL_PRICE"),{label:"Totalpris",class:["ad__field",{"ad__field--edited":O("TOTAL_PRICE")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.TOTAL_PRICE,"onUpdate:modelValue":I[6]||(I[6]=V=>o.value.TOTAL_PRICE=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("TOTAL_PRICE").icon},null,8,["icon"]),[[unref(Mt),{content:N("TOTAL_PRICE").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),createVNode(unref(BB),{expanded:!0},{title:withCtx(()=>[I[44]||(I[44]=createBaseVNode("span",null," Nøkkelinformasjon",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Nøkkelinformasjon vises slik i Finn annonsen",src:"https://assets.kvass.no/67c8077992504cdf70aba6f6"})]),default:withCtx(()=>[createVNode(unref(AB),{columns:"2"},{default:withCtx(()=>[B("IS_LEISURE")?(openBlock(),createBlock(unref(gx),mergeProps({key:0,label:"Er hytte"},unref(T)("IS_LEISURE")),{default:withCtx(()=>[createVNode(unref(Go),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":O("IS_LEISURE")}]),label:o.value.IS_LEISURE?"Ja":"Nei",items:[{label:"Nei",action:()=>{o.value.IS_LEISURE=null,Array.isArray(o.value.PROPERTY_TYPE)&&(o.value.PROPERTY_TYPE=o.value.PROPERTY_TYPE.filter(V=>l.value.some(q=>q.value===V)))}},{label:"Ja",action:()=>{o.value.IS_LEISURE=!0,Array.isArray(o.value.PROPERTY_TYPE)&&(o.value.PROPERTY_TYPE=o.value.PROPERTY_TYPE.filter(V=>l.value.some(q=>q.value===V)))}}]},{"icon-right":withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),withDirectives(createVNode(unref(Ue),{icon:N("IS_LEISURE").icon},null,8,["icon"]),[[unref(Mt),{content:N("IS_LEISURE").label,container:!1}]])]),_:1},8,["class","label","items"])]),_:1},16)):createCommentVNode("",!0),B("IS_LEISURE")&&!o.value.IS_LEISURE?(openBlock(),createElementBlock("div",_hoisted_2)):createCommentVNode("",!0),(B("IS_LEISURE")?o.value.IS_LEISURE:B("LEISURE_SITUATION"))?(openBlock(),createBlock(unref(gx),mergeProps({key:2,label:"Beliggenhet"},unref(T)("LEISURE_SITUATION")),{default:withCtx(()=>[createVNode(unref(Go),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":O("LEISURE_SITUATION")}]),label:unref(LeisureSituation).find(V=>V.value===o.value.LEISURE_SITUATION)?.label||"Velg...",items:unref(LeisureSituation).map(V=>({...V,action:()=>{o.value.LEISURE_SITUATION=V.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),withDirectives(createVNode(unref(Ue),{icon:N("LEISURE_SITUATION").icon},null,8,["icon"]),[[unref(Mt),{content:N("LEISURE_SITUATION").label,container:!1}]])]),_:1},8,["class","label","items"])]),_:1},16)):createCommentVNode("",!0),G("PROPERTY_TYPE")&&!Array.isArray(o.value.PROPERTY_TYPE)?(openBlock(),createBlock(unref(gx),mergeProps({key:3},unref(T)("PROPERTY_TYPE"),{label:"Enhetstype",class:["ad__dropdown",{"ad__dropdown--edited":O("PROPERTY_TYPE")}]}),{default:withCtx(()=>[createVNode(unref(Go),{label:l.value.find(V=>V.value===o.value.PROPERTY_TYPE)?.label||"Velg...",items:l.value.map(V=>({...V,action:()=>{o.value.PROPERTY_TYPE=V.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),withDirectives(createVNode(unref(Ue),{icon:N("PROPERTY_TYPE").icon},null,8,["icon"]),[[unref(Mt),{content:N("PROPERTY_TYPE").label,container:!1}]])]),_:1},8,["label","items"])]),_:1},16,["class"])):createCommentVNode("",!0),B("PLOT_AREA")?(openBlock(),createBlock(unref(gx),mergeProps({key:4},unref(T)("PLOT_AREA"),{label:"Tomteareal",class:["ad__field",{"ad__field--edited":O("PLOT_AREA")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.PLOT_AREA,"onUpdate:modelValue":I[7]||(I[7]=V=>o.value.PLOT_AREA=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("PLOT_AREA").icon},null,8,["icon"]),[[unref(Mt),{content:N("PLOT_AREA").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("PLOT_IS_OWNED")?(openBlock(),createBlock(unref(gx),mergeProps({key:5,label:"Eiet tomt"},unref(T)("PLOT_IS_OWNED")),{default:withCtx(()=>[createVNode(unref(Go),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":O("PLOT_IS_OWNED")}]),label:o.value.PLOT_IS_OWNED==="yes"?"Ja":"Nei",items:[{label:"Nei",action:()=>o.value.PLOT_IS_OWNED="no"},{label:"Ja",action:()=>o.value.PLOT_IS_OWNED="yes"}]},{"icon-right":withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),withDirectives(createVNode(unref(Ue),{icon:N("PLOT_IS_OWNED").icon},null,8,["icon"]),[[unref(Mt),{content:N("PLOT_IS_OWNED").label,container:!1}]])]),_:1},8,["class","label","items"])]),_:1},16)):createCommentVNode("",!0),B("RENTAL_PRICE_PER_MONTH")?(openBlock(),createBlock(unref(gx),mergeProps({key:6},unref(T)("RENTAL_PRICE_PER_MONTH"),{label:"Månedsleie",class:["ad__field",{"ad__field--edited":O("RENTAL_PRICE_PER_MONTH")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.RENTAL_PRICE_PER_MONTH,"onUpdate:modelValue":I[8]||(I[8]=V=>o.value.RENTAL_PRICE_PER_MONTH=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("RENTAL_PRICE_PER_MONTH").icon},null,8,["icon"]),[[unref(Mt),{content:N("RENTAL_PRICE_PER_MONTH").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("NO_OF_ROOMS")?(openBlock(),createBlock(unref(gx),mergeProps({key:7},unref(T)("NO_OF_ROOMS"),{label:"Antall rom",class:["ad__field",{"ad__field--edited":O("NO_OF_ROOMS")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.NO_OF_ROOMS,"onUpdate:modelValue":I[9]||(I[9]=V=>o.value.NO_OF_ROOMS=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("NO_OF_ROOMS").icon},null,8,["icon"]),[[unref(Mt),{content:N("NO_OF_ROOMS").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("NO_OF_BEDROOMS")?(openBlock(),createBlock(unref(gx),mergeProps({key:8},unref(T)("NO_OF_BEDROOMS"),{label:"Soverom",class:["ad__field",{"ad__field--edited":O("NO_OF_BEDROOMS")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.NO_OF_BEDROOMS,"onUpdate:modelValue":I[10]||(I[10]=V=>o.value.NO_OF_BEDROOMS=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("NO_OF_BEDROOMS").icon},null,8,["icon"]),[[unref(Mt),{content:N("NO_OF_BEDROOMS").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("AREA_FROM")?(openBlock(),createBlock(unref(gx),mergeProps({key:9},unref(T)("AREA_FROM"),{label:"Areal fra",class:["ad__field",{"ad__field--edited":O("AREA_FROM")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.AREA_FROM,"onUpdate:modelValue":I[11]||(I[11]=V=>o.value.AREA_FROM=Number.isNaN(V)?null:V),mask:{mask:Number,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("AREA_FROM").icon},null,8,["icon"]),[[unref(Mt),{content:N("AREA_FROM").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("AREA_TO")?(openBlock(),createBlock(unref(gx),mergeProps({key:10},unref(T)("AREA_TO"),{label:"Areal til",class:["ad__field",{"ad__field--edited":O("AREA_TO")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.AREA_TO,"onUpdate:modelValue":I[12]||(I[12]=V=>o.value.AREA_TO=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("AREA_TO").icon},null,8,["icon"]),[[unref(Mt),{content:N("AREA_TO").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("PRIMARY_ROOM_AREA")?(openBlock(),createBlock(unref(gx),mergeProps({key:11},unref(T)("PRIMARY_ROOM_AREA"),{label:"Primærareal",class:["ad__field",{"ad__field--edited":O("PRIMARY_ROOM_AREA")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.PRIMARY_ROOM_AREA,"onUpdate:modelValue":I[13]||(I[13]=V=>o.value.PRIMARY_ROOM_AREA=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("PRIMARY_ROOM_AREA").icon},null,8,["icon"]),[[unref(Mt),{content:N("PRIMARY_ROOM_AREA").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("USEABLE_AREA")?(openBlock(),createBlock(unref(gx),mergeProps({key:12},unref(T)("USEABLE_AREA"),{label:"Bruksareal (BRA)",class:["ad__field",{"ad__field--edited":O("USEABLE_AREA")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.USEABLE_AREA,"onUpdate:modelValue":I[14]||(I[14]=V=>o.value.USEABLE_AREA=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("USEABLE_AREA").icon},null,8,["icon"]),[[unref(Mt),{content:N("USEABLE_AREA").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("USEABLE_AREA_I")?(openBlock(),createBlock(unref(gx),mergeProps({key:13},unref(T)("USEABLE_AREA_I"),{label:"Internt bruksareal (BRA-i)",class:["ad__field",{"ad__field--edited":O("USEABLE_AREA_I")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.USEABLE_AREA_I,"onUpdate:modelValue":I[15]||(I[15]=V=>o.value.USEABLE_AREA_I=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("USEABLE_AREA_I").icon},null,8,["icon"]),[[unref(Mt),{content:N("USEABLE_AREA_I").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("USEABLE_AREA_E")?(openBlock(),createBlock(unref(gx),mergeProps({key:14},unref(T)("USEABLE_AREA_E"),{label:"Eksternt bruksareal (BRA-e)",class:["ad__field",{"ad__field--edited":O("USEABLE_AREA_E")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.USEABLE_AREA_E,"onUpdate:modelValue":I[16]||(I[16]=V=>o.value.USEABLE_AREA_E=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("USEABLE_AREA_E").icon},null,8,["icon"]),[[unref(Mt),{content:N("USEABLE_AREA_E").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("USEABLE_AREA_B")?(openBlock(),createBlock(unref(gx),mergeProps({key:15},unref(T)("USEABLE_AREA_B"),{label:"Innglasset balkong (BRA-b)",class:["ad__field",{"ad__field--edited":O("USEABLE_AREA_B")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.USEABLE_AREA_B,"onUpdate:modelValue":I[17]||(I[17]=V=>o.value.USEABLE_AREA_B=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("USEABLE_AREA_B").icon},null,8,["icon"]),[[unref(Mt),{content:N("USEABLE_AREA_B").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("GROSS_AREA")?(openBlock(),createBlock(unref(gx),mergeProps({key:16},unref(T)("GROSS_AREA"),{label:"Bruttoareal (BTA)",class:["ad__field",{"ad__field--edited":O("GROSS_AREA")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.GROSS_AREA,"onUpdate:modelValue":I[18]||(I[18]=V=>o.value.GROSS_AREA=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("GROSS_AREA").icon},null,8,["icon"]),[[unref(Mt),{content:N("GROSS_AREA").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("NO_OF_PARKING_SPOTS")?(openBlock(),createBlock(unref(gx),mergeProps({key:17},unref(T)("NO_OF_PARKING_SPOTS"),{label:"Antall parkeringsplasser",class:["ad__field",{"ad__field--edited":O("NO_OF_PARKING_SPOTS")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.NO_OF_PARKING_SPOTS,"onUpdate:modelValue":I[19]||(I[19]=V=>o.value.NO_OF_PARKING_SPOTS=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("NO_OF_PARKING_SPOTS").icon},null,8,["icon"]),[[unref(Mt),{content:N("NO_OF_PARKING_SPOTS").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("FLOOR")?(openBlock(),createBlock(unref(gx),mergeProps({key:18},unref(T)("FLOOR"),{label:"Etasje",class:["ad__field",{"ad__field--edited":O("FLOOR")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.FLOOR,"onUpdate:modelValue":I[20]||(I[20]=V=>o.value.FLOOR=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("FLOOR").icon},null,8,["icon"]),[[unref(Mt),{content:N("FLOOR").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("NO_OF_FLOORS")?(openBlock(),createBlock(unref(gx),mergeProps({key:19},unref(T)("NO_OF_FLOORS"),{label:"Antall etasjer",class:["ad__field",{"ad__field--edited":O("NO_OF_FLOORS")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.NO_OF_FLOORS,"onUpdate:modelValue":I[21]||(I[21]=V=>o.value.NO_OF_FLOORS=Number.isNaN(V)?null:V),mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("NO_OF_FLOORS").icon},null,8,["icon"]),[[unref(Mt),{content:N("NO_OF_FLOORS").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("CONSTRUCTION_YEAR")?(openBlock(),createBlock(unref(gx),mergeProps({key:20},unref(T)("CONSTRUCTION_YEAR"),{label:"Byggeår",class:["ad__field",{"ad__field--edited":O("CONSTRUCTION_YEAR")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.CONSTRUCTION_YEAR,"onUpdate:modelValue":I[22]||(I[22]=V=>o.value.CONSTRUCTION_YEAR=Number.isNaN(V)?null:V),mask:{mask:Number,unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("CONSTRUCTION_YEAR").icon},null,8,["icon"]),[[unref(Mt),{content:N("CONSTRUCTION_YEAR").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("RENOVATED_YEAR")?(openBlock(),createBlock(unref(gx),mergeProps({key:21},unref(T)("RENOVATED_YEAR"),{label:"Renoveringsår",class:["ad__field",{"ad__field--edited":O("RENOVATED_YEAR")}]}),{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.RENOVATED_YEAR,"onUpdate:modelValue":I[23]||(I[23]=V=>o.value.RENOVATED_YEAR=Number.isNaN(V)?null:V),mask:{mask:Number,unmask:!0,min:0,scale:0}},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("RENOVATED_YEAR").icon},null,8,["icon"]),[[unref(Mt),{content:N("RENOVATED_YEAR").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("ENERGY_LABEL")?(openBlock(),createBlock(unref(gx),mergeProps({key:22,label:"Energimerking"},unref(T)("ENERGY_LABEL")),{default:withCtx(()=>[createVNode(unref(Go),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":O("ENERGY_LABEL")}]),label:unref(energyLabel).find(V=>V.value===o.value.ENERGY_LABEL)?.label||"Velg...",items:unref(energyLabel).map(V=>({...V,action:()=>{o.value.ENERGY_LABEL=V.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),withDirectives(createVNode(unref(Ue),{icon:N("ENERGY_LABEL").icon},null,8,["icon"]),[[unref(Mt),{content:N("ENERGY_LABEL").label,container:!1}]])]),_:1},8,["class","label","items"])]),_:1},16)):createCommentVNode("",!0),B("ENERGY_LABEL_COLOR_CODE")?(openBlock(),createBlock(unref(gx),mergeProps({key:23,label:"Energimerking (farge)"},unref(T)("ENERGY_LABEL_COLOR_CODE")),{default:withCtx(()=>[createVNode(unref(Go),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":O("ENERGY_LABEL_COLOR_CODE")}]),label:unref(energyLabelColor).find(V=>V.value===o.value.ENERGY_LABEL_COLOR_CODE)?.label||"Velg...",items:unref(energyLabelColor).map(V=>({...V,action:()=>{o.value.ENERGY_LABEL_COLOR_CODE=V.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-regular:angle-down",class:"k-mr-xs"}),withDirectives(createVNode(unref(Ue),{icon:N("ENERGY_LABEL_COLOR_CODE").icon},null,8,["icon"]),[[unref(Mt),{content:N("ENERGY_LABEL_COLOR_CODE").label,container:!1}]])]),_:1},8,["class","label","items"])]),_:1},16)):createCommentVNode("",!0),B("OWNERSHIP_TYPE")?(openBlock(),createBlock(unref(gx),mergeProps({key:24,label:"Eiertype"},unref(T)("OWNERSHIP_TYPE")),{default:withCtx(()=>[createVNode(unref(Go),{class:normalizeClass(["ad__dropdown",{"ad__dropdown--edited":O("OWNERSHIP_TYPE")}]),label:unref(OwnershipTypes).find(V=>V.value===o.value.OWNERSHIP_TYPE)?.label||"Velg...",items:unref(OwnershipTypes).map(V=>({...V,action:()=>{o.value.OWNERSHIP_TYPE=V.value}}))},{"icon-right":withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-regular:angle-down",class:"k-mr-sm"}),withDirectives(createVNode(unref(Ue),{icon:N("OWNERSHIP_TYPE").icon},null,8,["icon"]),[[unref(Mt),{content:N("OWNERSHIP_TYPE").label,container:!1}]])]),_:1},8,["class","label","items"])]),_:1},16)):createCommentVNode("",!0),B("BEDROOMS_FROM")?(openBlock(),createBlock(unref(gx),mergeProps({key:25},unref(T)("BEDROOMS_FROM"),{label:"Soverom fra",class:["ad__field",{"ad__field--edited":O("BEDROOMS_FROM")}]}),{default:withCtx(()=>[createVNode(unref(hy),{mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0},modelValue:o.value.BEDROOMS_FROM,"onUpdate:modelValue":I[24]||(I[24]=V=>o.value.BEDROOMS_FROM=Number.isNaN(V)?null:V)},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("BEDROOMS_FROM").icon},null,8,["icon"]),[[unref(Mt),{content:N("BEDROOMS_FROM").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0),B("BEDROOMS_TO")?(openBlock(),createBlock(unref(gx),mergeProps({key:26},unref(T)("BEDROOMS_TO"),{label:"Soverom til",class:["ad__field",{"ad__field--edited":O("BEDROOMS_TO")}]}),{default:withCtx(()=>[createVNode(unref(hy),{mask:{mask:Number,thousandsSeparator:" ",unmask:!0,min:0,scale:0},modelValue:o.value.BEDROOMS_TO,"onUpdate:modelValue":I[25]||(I[25]=V=>o.value.BEDROOMS_TO=Number.isNaN(V)?null:V)},{suffix:withCtx(()=>[withDirectives(createVNode(unref(Ue),{icon:N("BEDROOMS_TO").icon},null,8,["icon"]),[[unref(Mt),{content:N("BEDROOMS_TO").label,container:!1}]])]),_:1},8,["modelValue"])]),_:1},16,["class"])):createCommentVNode("",!0)]),_:1})]),_:1}),G("PROPERTY_TYPE")&&Array.isArray(o.value.PROPERTY_TYPE)?(openBlock(),createBlock(unref(BB),{key:2,expanded:!0},{title:withCtx(()=>[I[45]||(I[45]=createBaseVNode("span",null,"Enhetstyper for annonsen",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Enhetstypene som velges her vil bli synlig under enhetstyper på Finn-annonsen. De vil også være tilgjengelige som filtre i søkelisten.",src:"https://assets.kvass.no/67c8203b92504cdf70aba768"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":O("PROPERTY_TYPE")}]),icon:N("PROPERTY_TYPE").icon},null,8,["class","icon"]),[[unref(Mt),{content:N("PROPERTY_TYPE").label,container:!1}]])]),default:withCtx(()=>[B("PROPERTY_TYPE")?(openBlock(),createBlock(unref(gx),mergeProps({key:0},unref(T)("PROPERTY_TYPE"),{label:"Tilgjengelige lokaler"}),{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(l.value,V=>(openBlock(),createBlock(unref(hd),{modelValue:o.value.PROPERTY_TYPE,"onUpdate:modelValue":I[26]||(I[26]=q=>o.value.PROPERTY_TYPE=q),value:V.value,label:V.label},null,8,["modelValue","value","label"]))),256))]),_:1},16)):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),G("MEDIA")?(openBlock(),createBlock(unref(BB),{key:3,expanded:!0},{title:withCtx(()=>[I[46]||(I[46]=createBaseVNode("span",null,"Bilder",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Bildene hentes fra prosjektsiden. Det første bildet blir forsidebildet i Finn-annonsen.",src:"https://assets.kvass.no/67c8088692504cdf70aba702"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":O("MEDIA")}]),icon:N("MEDIA").icon},null,8,["class","icon"]),[[unref(Mt),{content:N("MEDIA").label,container:!1}]])]),default:withCtx(()=>[G("MEDIA")?(openBlock(),createBlock(unref(NB),{key:0,modelValue:o.value.MEDIA,"onUpdate:modelValue":I[27]||(I[27]=V=>o.value.MEDIA=V),label:"Bilder i Finn-annonsen",dropMessage:"Dra en fil hit eller <b>velg</b> for å laste opp",accept:["image/jpeg","image/png","image/jpg"],upload:unref(uploadFunction),types:["Image"],multiple:!0,sortable:!0,description:!0,placement:"outside",size:"contain",labels:{selectMessage:"Trykk på knappen nedenfor for å laste opp andre filtyper",select:"Velg",cancel:"Avbryt",save:"Bekreft",descriptionPlaceholder:"",image:{createLabel:"Bilde",preview:"",inputLabel:"",error:""}}},null,8,["modelValue","upload"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),G("FLOORPLAN_MEDIA")?(openBlock(),createBlock(unref(BB),{key:4,expanded:!0},{title:withCtx(()=>[I[47]||(I[47]=createBaseVNode("span",null,"Plantegninger",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Plantegninger vises sist i bildegalleriet eller som en egen knapp i galleriet med navnet «Plantegninger». Dette avhenger av hva annonsetypen støtter.",src:"https://assets.kvass.no/67d1501f9b29de28ddec33d9"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":O("FLOORPLAN_MEDIA")}]),icon:N("FLOORPLAN_MEDIA").icon},null,8,["class","icon"]),[[unref(Mt),{content:N("FLOORPLAN_MEDIA").label,container:!1}]])]),default:withCtx(()=>[G("FLOORPLAN_MEDIA")?(openBlock(),createBlock(unref(LB),{key:0,rename:!1,modelValue:o.value.FLOORPLAN_MEDIA,"onUpdate:modelValue":I[28]||(I[28]=V=>o.value.FLOORPLAN_MEDIA=V),label:"Plantegninger i Finn-annonsen",dropMessage:"Dra en fil hit eller <b>velg</b> for å laste opp",accept:["image/jpeg","image/png","image/jpg"],upload:unref(uploadFunction),uploadOptions:{},multiple:!0,sortable:!0,labels:{delete:"Slett",download:"Last ned",copy:"Kopier lenke"}},null,8,["modelValue","upload"])):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),G("GENERAL_DESCRIPTION")?(openBlock(),createBlock(_sfc_main$e,{key:5,expanded:!0,modelValue:o.value.GENERAL_DESCRIPTION,"onUpdate:modelValue":I[29]||(I[29]=V=>o.value.GENERAL_DESCRIPTION=V)},{title:withCtx(()=>[I[48]||(I[48]=createBaseVNode("span",null,"Beskrivelse",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Teksten du skriver her vises under beskrivelsen i Finn-annonsen.",src:"https://assets.kvass.no/67c80a5792504cdf70aba732"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":O("GENERAL_DESCRIPTION")}]),icon:N("GENERAL_DESCRIPTION").icon},null,8,["class","icon"]),[[unref(Mt),{content:N("GENERAL_DESCRIPTION").label,container:!1}]])]),_:1},8,["modelValue"])):createCommentVNode("",!0),G("GENERAL_TEXT_REALESTATE")?(openBlock(),createBlock(ExpandableList,{key:6,expanded:!0,template:{GENERAL_HEADING:"",GENERAL_TEXT:""},modelValue:o.value.GENERAL_TEXT_REALESTATE,"onUpdate:modelValue":I[30]||(I[30]=V=>o.value.GENERAL_TEXT_REALESTATE=V)},{title:withCtx(()=>[I[49]||(I[49]=createBaseVNode("span",null,"Beskrivelse",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Teksten du skriver her vises under beskrivelsen i Finn-annonsen.",src:"https://assets.kvass.no/67c80a5792504cdf70aba732"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":O("GENERAL_TEXT_REALESTATE")}]),icon:N("GENERAL_TEXT_REALESTATE").icon},null,8,["class","icon"]),[[unref(Mt),{content:N("GENERAL_TEXT_REALESTATE").label,container:!1}]])]),default:withCtx(({item:V})=>[createVNode(unref(gx),{label:"Tittel"},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:V.GENERAL_HEADING,"onUpdate:modelValue":q=>V.GENERAL_HEADING=q},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),createVNode(unref(gx),{label:"Tekst"},{default:withCtx(()=>[createVNode(unref($B),{placeholder:"Skriv her...",actions:["bold","italic","orderedList","bulletList"],modelValue:V.GENERAL_TEXT,"onUpdate:modelValue":q=>V.GENERAL_TEXT=q},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:1},8,["modelValue"])):createCommentVNode("",!0),G("ESTATE_PREFERENCE","PROJECT_PREFERENCE")?(openBlock(),createBlock(unref(BB),{key:7,expanded:!0},{title:withCtx(()=>[createBaseVNode("span",null,toDisplayString(B("PROJECT_PREFERENCE")?"Fasiliteter i prosjektannonsen":"Fasiliteter i annonsen"),1),createVNode(Tooltip,{class:"k-ml-xxs",content:"Fasilitenene som velges her vil bli synlig under fasiliteter på Finn-annonsen. De vil også være tilgjengelige som filtre i søkelisten.",src:"https://assets.kvass.no/67c80a4c92504cdf70aba70e"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":B("PROJECT_PREFERENCE")?O("PROJECT_PREFERENCE"):O("ESTATE_PREFERENCE")}]),icon:B("PROJECT_PREFERENCE")?N("PROJECT_PREFERENCE").icon:N("ESTATE_PREFERENCE").icon},null,8,["class","icon"]),[[unref(Mt),{content:B("PROJECT_PREFERENCE")?N("PROJECT_PREFERENCE").label:N("ESTATE_PREFERENCE").label,container:!1}]])]),default:withCtx(()=>[B("PROJECT_PREFERENCE")?(openBlock(),createBlock(unref(gx),{key:0,class:"facilities",label:"Tilgjengelige fasiliteter"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(p.value.filter(V=>V.categories.includes(n.value.type)),V=>(openBlock(),createBlock(unref(hd),{modelValue:o.value.PROJECT_PREFERENCE,"onUpdate:modelValue":I[31]||(I[31]=q=>o.value.PROJECT_PREFERENCE=q),value:V.value,label:V.label},null,8,["modelValue","value","label"]))),256))]),_:1})):createCommentVNode("",!0),B("ESTATE_PREFERENCE")?(openBlock(),createBlock(unref(gx),{key:1,class:"facilities",label:"Tilgjengelige fasiliteter"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(p.value.filter(V=>V.categories.includes(n.value.type)),V=>(openBlock(),createBlock(unref(hd),{modelValue:o.value.ESTATE_PREFERENCE,"onUpdate:modelValue":I[32]||(I[32]=q=>o.value.ESTATE_PREFERENCE=q),value:V.value,label:V.label},null,8,["modelValue","value","label"]))),256))]),_:1})):createCommentVNode("",!0)]),_:1})):createCommentVNode("",!0),u.value.length?(openBlock(),createBlock(unref(BB),{key:8,expanded:!0},{title:withCtx(()=>[I[50]||(I[50]=createBaseVNode("span",null," Valgte enheter til Finn-annonsen ",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Slik vises de valgte enhetene i Finn-annonsen.",src:"https://assets.kvass.no/67c80a5a92504cdf70aba73e"})]),default:withCtx(()=>[createVNode(UnitTable,{initialUnitFields:y.value,units:u.value,modelValue:n.value,"onUpdate:modelValue":I[33]||(I[33]=V=>n.value=V),facilities:x.value},null,8,["initialUnitFields","units","modelValue","facilities"])]),_:1})):createCommentVNode("",!0),R.value?(openBlock(),createElementBlock(Fragment,{key:9},[createVNode(unref(BB),{title:"Adresse",subtitle:"Om du vil endre adresse må du tilpasse denne på grunnlag.",expandable:!1,expanded:!1},{actions:withCtx(()=>[createVNode(unref(Se),{class:"ad__navigate-button",variant:"primary",label:"Gå til Grunnlag",is:"a",target:"_blank",href:z("basis"),iconRight:"fa-pro-light:arrow-up-right-from-square"},null,8,["href"])]),_:1}),createVNode(unref(mB),{variant:"danger",content:R.value,icon:"fa-pro-light:exclamation-triangle"},null,8,["content"])],64)):createCommentVNode("",!0),G("PHASE_PLANNING","PHASE_SALE_START","PHASE_DEVELOPMENT_START","PHASE_MOVE_IN","CURRENT_PHASE")?(openBlock(),createBlock(unref(BB),{key:10,expandable:!1,expanded:!1},{title:withCtx(()=>[I[51]||(I[51]=createBaseVNode("span",null,"Prosjektstatus",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"For å endre prosjektstatus må du tilpasse den i presentasjonen. Slik vises prosjektstatus i Finn-annonsen.",src:"https://assets.kvass.no/67c80a5492504cdf70aba726"})]),actions:withCtx(()=>[createVNode(unref(Se),{class:"ad__navigate-button",variant:"primary",label:"Gå til Presentasjon",is:"a",target:"_blank",href:z("presentation"),iconRight:"fa-pro-light:arrow-up-right-from-square"},null,8,["href"])]),_:1})):createCommentVNode("",!0),createVNode(unref(BB),{expandable:!1,expanded:!1},{title:withCtx(()=>[I[52]||(I[52]=createBaseVNode("span",null,"Kundebehandler",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"For å endre kontaktperson må du tilpasse hvem som er kundebehandler under «roller». Slik vises kundebehandler i Finn-annonsen.",src:"https://assets.kvass.no/67c80a5092504cdf70aba71a"})]),actions:withCtx(()=>[createVNode(unref(Se),{class:"ad__navigate-button",variant:"primary",label:"Gå til Roller",is:"a",target:"_blank",href:z("roles"),iconRight:"fa-pro-light:arrow-up-right-from-square"},null,8,["href"])]),_:1}),M.value?(openBlock(),createBlock(unref(mB),{key:11,variant:"danger",content:M.value,icon:"fa-pro-light:exclamation-triangle"},null,8,["content"])):createCommentVNode("",!0),G("MOREINFO")?(openBlock(),createBlock(ExpandableList,{key:12,expanded:!0,limit:4,template:{URL:"",URLTEXT:""},modelValue:o.value.MOREINFO,"onUpdate:modelValue":I[36]||(I[36]=V=>o.value.MOREINFO=V),onRemove:I[37]||(I[37]=V=>{const q=Object.keys(d.value).reverse().find(K=>K.startsWith("MOREINFO.")&&K.endsWith(".URL")&&d.value[K]);q&&(d.value[q]=!1)})},createSlots({title:withCtx(()=>[I[53]||(I[53]=createBaseVNode("span",null,"Nyttige lenker i Finn-annonsen",-1)),createVNode(Tooltip,{class:"k-ml-xxs",content:"Nyttige lenker vises her i Finn-annonsen. Noen felt er standard og låst av Finn, derfor vises lenken til prosjektsiden alltid automatisk. Du kan fritt legge til egne lenker og lenker til andre nettsteder.",src:"https://assets.kvass.no/67c80a5e92504cdf70aba756"})]),actions:withCtx(()=>[withDirectives(createVNode(unref(Ue),{class:normalizeClass(["ad__expandable-list-field-icon",{"ad__expandable-list-field-icon--edited":O("MOREINFO")}]),icon:N("MOREINFO").icon},null,8,["class","icon"]),[[unref(Mt),{content:N("MOREINFO").label,container:!1}]])]),default:withCtx(({item:V,index:q})=>[createVNode(unref(AB),{columns:"2"},{default:withCtx(()=>[createVNode(unref(gx),{label:"URL til nyttig lenke",onBlur:()=>d.value[`MOREINFO.${q}.URL`]=!0,error:d.value[`MOREINFO.${q}.URL`]?Object.entries(unref(E).errors.value.errors).filter(([K,Z])=>K===`MOREINFO.${q}.URL`).map(([K,Z])=>Z).flat().join(`
|
|
8
8
|
`):void 0},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:V.URL,"onUpdate:modelValue":K=>V.URL=K,suffix:"URL"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["onBlur","error"]),createVNode(unref(gx),{label:"Visningsnavn på lenken på Finn-annonsen"},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:V.URLTEXT,"onUpdate:modelValue":K=>V.URLTEXT=K},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)]),_:2},[G("ESTATE_EXTERNAL_URL","ESTATE_EXTERNAL_ORDER_URL")?{name:"before-content",fn:withCtx(()=>[createVNode(unref(AB),{columns:"2"},{default:withCtx(()=>[B("ESTATE_EXTERNAL_URL")?(openBlock(),createElementBlock(Fragment,{key:0},[createVNode(unref(gx),{label:"URL til nyttig lenke"},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.ESTATE_EXTERNAL_URL,"onUpdate:modelValue":I[34]||(I[34]=V=>o.value.ESTATE_EXTERNAL_URL=V),suffix:"URL",disabled:""},null,8,["modelValue"])]),_:1}),createVNode(unref(gx),{label:"Visningsnavn på lenken på Finn-annonsen"},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:"Se prosjektets hjemmeside",disabled:""})]),_:1})],64)):createCommentVNode("",!0),B("ESTATE_EXTERNAL_ORDER_URL")?(openBlock(),createElementBlock(Fragment,{key:1},[createVNode(unref(gx),{label:"URL til nyttig lenke"},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:o.value.ESTATE_EXTERNAL_ORDER_URL,"onUpdate:modelValue":I[35]||(I[35]=V=>o.value.ESTATE_EXTERNAL_ORDER_URL=V),suffix:"URL",disabled:""},null,8,["modelValue"])]),_:1}),createVNode(unref(gx),{label:"Visningsnavn på lenken på Finn-annonsen"},{default:withCtx(()=>[createVNode(unref(hy),{modelValue:"Bestill salgsoppgave",disabled:""})]),_:1})],64)):createCommentVNode("",!0)]),_:1}),I[54]||(I[54]=createBaseVNode("div",{class:"ad__expandable-list-divider"},null,-1))]),key:"0"}:void 0]),1032,["modelValue"])):createCommentVNode("",!0)]),_:1})]),actions:withCtx(()=>[createVNode(unref(Se),{icon:"fa-pro-light:chevron-left",label:"Gå tilbake",variant:"secondary",onClick:j.onPrev},null,8,["onClick"]),n.value.code?createCommentVNode("",!0):(openBlock(),createBlock(unref(Se),{key:0,label:"Lagre utkast",variant:"secondary",onClick:Q,promise:J.value},null,8,["promise"])),withDirectives(createVNode(unref(Se),{loading:W.value,label:L(),variant:"primary","icon-right":"fa-pro-solid:arrow-right",onClick:I[38]||(I[38]=()=>{!unref(E).passes||W.value||j.onNext()}),disabled:!unref(E).passes.value},null,8,["loading","label","disabled"]),[[unref(Mt),{content:Object.entries(unref(E).errors.value.errors).map(([V,q])=>q).flat().join(`
|
|
9
9
|
`),disabled:unref(E).passes.value,container:!1}]])]),_:1}))],1024))],512))}}),_style_0$8='.ad__title{display:flex;flex-direction:row;gap:var(--k-ui-spacing-xs)}.ad__title span{margin-right:auto}.ad__go-back.k-button,.ad__reset.k-button{font-weight:400;font-size:1rem}.ad .facilities{display:grid;grid-template-columns:1fr 1fr}.ad .facilities .k-formcontrol__label{grid-column:1/-1}.ad__alert{margin-bottom:2rem}.ad__alert .k-alert__icon{padding:var(--k-ui-spacing-lg)}.ad .ad__field{--k-input-prefix-background: white;--k-input-prefix-text: var(--k-ui-color-neutral-dark)}.ad .ad__field svg{color:var(--synced-icon)}.ad .ad__field .k-input__input{color:var(--k-ui-color-neutral-dark)}.ad .ad__field--edited{--k-input-prefix-text: var(--k-ui-color-neutral-darkest)}.ad .ad__field--edited svg{color:var(--edited-icon)}.ad .ad__field--edited .k-input__input{color:var(--k-ui-color-neutral-darkest)}.ad__dropdown{--k-button-secondary-background: white;--k-button-secondary-text: var(--k-ui-color-neutral-dark);--k-button-secondary-background-hover: var(--k-ui-color-neutral-lightest);--k-button-secondary-background-active: var(--k-ui-color-neutral-light);--k-button-medium-padding-inline: var(--k-ui-spacing-sm);--k-button-medium-padding-block: var(--k-ui-spacing-sm)}.ad__dropdown svg:last-of-type{color:var(--synced-icon)}.ad__dropdown--edited{--k-button-secondary-text: var(--k-ui-color-neutral-darkest)}.ad__dropdown--edited svg:last-of-type{color:var(--edited-icon)}.ad__expandable-list-divider{margin-block:1rem;position:relative}.ad__expandable-list-divider:before{content:"";position:absolute;top:50%;transform:translateY(-50%);left:-1rem;width:calc(100% + 2rem);height:var(--k-expandable-border-width, 1px);background-color:var(--k-expandable-border-color, var(--k-ui-color-neutral))}.ad__expandable-list-field-icon{background:#fff;border-radius:var(--k-ui-rounding-full);overflow:visible;padding:var(--k-ui-spacing-xs);line-height:1;color:var(--synced-icon)}.ad__expandable-list-field-icon--edited{color:var(--edited-icon)}.ad__navigate-button{--k-button-medium-font-size: 1rem}',StepAd=_export_sfc(_sfc_main$9,[["styles",[_style_0$8]]]),_sfc_main$8=defineComponent({__name:"Error.ce",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){return useModel(e,"modelValue"),(t,a)=>(openBlock(),createBlock(unref(SC),{class:"publish-error",appearence:"border",variant:"default",title:"Obs! Noe gikk galt",subtitle:"Det oppsto et problem."},{thumbnail:withCtx(()=>[createVNode(unref(Ue),{icon:"fa-pro-light:circle-exclamation"})]),_:1}))}}),_style_0$7=".publish-error .k-card__thumbnail{display:flex;justify-content:center;background-color:#e7201b33;padding-block:7rem;font-size:7rem}.publish-error .k-card__thumbnail svg{color:#e7201b}",StepError=_export_sfc(_sfc_main$8,[["styles",[_style_0$7]]]);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lottie={exports:{}};(function(module,exports){typeof navigator<"u"&&function(e,t){module.exports=t()}(commonjsGlobal,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var a,r=e.length,i;for(a=0;a<r;a+=1){i=e[a].prototype;for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t.prototype[n]=i[n])}}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,a=this.audios.length;for(t=0;t<a;t+=1)this.audios[t].pause()},resume:function(){var t,a=this.audios.length;for(t=0;t<a;t+=1)this.audios[t].resume()},setRate:function(t){var a,r=this.audios.length;for(a=0;a<r;a+=1)this.audios[a].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):window.Howl?new window.Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,a=this.audios.length;for(t=0;t<a;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new e}}(),createTypedArray=function(){function e(a,r){var i=0,n=[],s;switch(a){case"int16":case"uint8c":s=1;break;default:s=1.1;break}for(i=0;i<r;i+=1)n.push(s);return n}function t(a,r){return a==="float32"?new Float32Array(r):a==="int16"?new Int16Array(r):a==="uint8c"?new Uint8ClampedArray(r):e(a,r)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?t:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$6=function(t){return typeof t}:_typeof$6=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$6(e)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var e=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],t,a=e.length;for(t=0;t<a;t+=1)BMMath[e[t]]=Math[e[t]]})(),BMMath.random=Math.random,BMMath.abs=function(e){var t=_typeof$6(e);if(t==="object"&&e.length){var a=createSizedArray(e.length),r,i=e.length;for(r=0;r<i;r+=1)a[r]=Math.abs(e[r]);return a}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,a,r){this.type=e,this.currentTime=t,this.totalTime=a,this.direction=r<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,a,r){this.type=e,this.currentLoop=a,this.totalLoops=t,this.direction=r<0?-1:1}function BMSegmentStartEvent(e,t,a){this.type=e,this.firstFrame=t,this.totalFrames=a}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}var createElementID=function(){var e=0;return function(){return e+=1,idPrefix$1+"__lottie_element_"+e}}();function HSVtoRGB(e,t,a){var r,i,n,s,l,o,f,u;switch(s=Math.floor(e*6),l=e*6-s,o=a*(1-t),f=a*(1-l*t),u=a*(1-(1-l)*t),s%6){case 0:r=a,i=u,n=o;break;case 1:r=f,i=a,n=o;break;case 2:r=o,i=a,n=u;break;case 3:r=o,i=f,n=a;break;case 4:r=u,i=o,n=a;break;case 5:r=a,i=o,n=f;break}return[r,i,n]}function RGBtoHSV(e,t,a){var r=Math.max(e,t,a),i=Math.min(e,t,a),n=r-i,s,l=r===0?0:n/r,o=r/255;switch(r){case i:s=0;break;case e:s=t-a+n*(t<a?6:0),s/=6*n;break;case t:s=a-e+n*2,s/=6*n;break;case a:s=e-t+n*4,s/=6*n;break}return[s,l,o]}function addSaturationToRGB(e,t){var a=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return a[1]+=t,a[1]>1?a[1]=1:a[1]<=0&&(a[1]=0),HSVtoRGB(a[0],a[1],a[2])}function addBrightnessToRGB(e,t){var a=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return a[2]+=t,a[2]>1?a[2]=1:a[2]<0&&(a[2]=0),HSVtoRGB(a[0],a[1],a[2])}function addHueToRGB(e,t){var a=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return a[0]+=t/360,a[0]>1?a[0]-=1:a[0]<0&&(a[0]+=1),HSVtoRGB(a[0],a[1],a[2])}var rgbToHex=function(){var e=[],t,a;for(t=0;t<256;t+=1)a=t.toString(16),e[t]=a.length===1?"0"+a:a;return function(r,i,n){return r<0&&(r=0),i<0&&(i=0),n<0&&(n=0),"#"+e[r]+e[i]+e[n]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(t){return typeof t}:_typeof$5=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(e)}var dataManager=function(){var e=1,t=[],a,r,i={onmessage:function(){},postMessage:function(p){a({data:p})}},n={postMessage:function(p){i.onmessage({data:p})}};function s(p){if(window.Worker&&window.Blob&&getWebWorker()){var x=new Blob(["var _workerSelf = self; self.onmessage = ",p.toString()],{type:"text/javascript"}),k=URL.createObjectURL(x);return new Worker(k)}return a=p,i}function l(){r||(r=s(function(p){function x(){function g(L,z){var P,A,_=L.length,C,F,D,Y;for(A=0;A<_;A+=1)if(P=L[A],"ks"in P&&!P.completed){if(P.completed=!0,P.hasMask){var H=P.masksProperties;for(F=H.length,C=0;C<F;C+=1)if(H[C].pt.k.i)b(H[C].pt.k);else for(Y=H[C].pt.k.length,D=0;D<Y;D+=1)H[C].pt.k[D].s&&b(H[C].pt.k[D].s[0]),H[C].pt.k[D].e&&b(H[C].pt.k[D].e[0])}P.ty===0?(P.layers=d(P.refId,z),g(P.layers,z)):P.ty===4?m(P.shapes):P.ty===5&&N(P)}}function S(L,z){if(L){var P=0,A=L.length;for(P=0;P<A;P+=1)L[P].t===1&&(L[P].data.layers=d(L[P].data.refId,z),g(L[P].data.layers,z))}}function c(L,z){for(var P=0,A=z.length;P<A;){if(z[P].id===L)return z[P];P+=1}return null}function d(L,z){var P=c(L,z);return P?P.layers.__used?JSON.parse(JSON.stringify(P.layers)):(P.layers.__used=!0,P.layers):null}function m(L){var z,P=L.length,A,_;for(z=P-1;z>=0;z-=1)if(L[z].ty==="sh")if(L[z].ks.k.i)b(L[z].ks.k);else for(_=L[z].ks.k.length,A=0;A<_;A+=1)L[z].ks.k[A].s&&b(L[z].ks.k[A].s[0]),L[z].ks.k[A].e&&b(L[z].ks.k[A].e[0]);else L[z].ty==="gr"&&m(L[z].it)}function b(L){var z,P=L.i.length;for(z=0;z<P;z+=1)L.i[z][0]+=L.v[z][0],L.i[z][1]+=L.v[z][1],L.o[z][0]+=L.v[z][0],L.o[z][1]+=L.v[z][1]}function E(L,z){var P=z?z.split("."):[100,100,100];return L[0]>P[0]?!0:P[0]>L[0]?!1:L[1]>P[1]?!0:P[1]>L[1]?!1:L[2]>P[2]?!0:P[2]>L[2]?!1:null}var T=function(){var L=[4,4,14];function z(A){var _=A.t.d;A.t.d={k:[{s:_,t:0}]}}function P(A){var _,C=A.length;for(_=0;_<C;_+=1)A[_].ty===5&&z(A[_])}return function(A){if(E(L,A.v)&&(P(A.layers),A.assets)){var _,C=A.assets.length;for(_=0;_<C;_+=1)A.assets[_].layers&&P(A.assets[_].layers)}}}(),M=function(){var L=[4,7,99];return function(z){if(z.chars&&!E(L,z.v)){var P,A=z.chars.length;for(P=0;P<A;P+=1){var _=z.chars[P];_.data&&_.data.shapes&&(m(_.data.shapes),_.data.ip=0,_.data.op=99999,_.data.st=0,_.data.sr=1,_.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},z.chars[P].t||(_.data.shapes.push({ty:"no"}),_.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),R=function(){var L=[5,7,15];function z(A){var _=A.t.p;typeof _.a=="number"&&(_.a={a:0,k:_.a}),typeof _.p=="number"&&(_.p={a:0,k:_.p}),typeof _.r=="number"&&(_.r={a:0,k:_.r})}function P(A){var _,C=A.length;for(_=0;_<C;_+=1)A[_].ty===5&&z(A[_])}return function(A){if(E(L,A.v)&&(P(A.layers),A.assets)){var _,C=A.assets.length;for(_=0;_<C;_+=1)A.assets[_].layers&&P(A.assets[_].layers)}}}(),B=function(){var L=[4,1,9];function z(A){var _,C=A.length,F,D;for(_=0;_<C;_+=1)if(A[_].ty==="gr")z(A[_].it);else if(A[_].ty==="fl"||A[_].ty==="st")if(A[_].c.k&&A[_].c.k[0].i)for(D=A[_].c.k.length,F=0;F<D;F+=1)A[_].c.k[F].s&&(A[_].c.k[F].s[0]/=255,A[_].c.k[F].s[1]/=255,A[_].c.k[F].s[2]/=255,A[_].c.k[F].s[3]/=255),A[_].c.k[F].e&&(A[_].c.k[F].e[0]/=255,A[_].c.k[F].e[1]/=255,A[_].c.k[F].e[2]/=255,A[_].c.k[F].e[3]/=255);else A[_].c.k[0]/=255,A[_].c.k[1]/=255,A[_].c.k[2]/=255,A[_].c.k[3]/=255}function P(A){var _,C=A.length;for(_=0;_<C;_+=1)A[_].ty===4&&z(A[_].shapes)}return function(A){if(E(L,A.v)&&(P(A.layers),A.assets)){var _,C=A.assets.length;for(_=0;_<C;_+=1)A.assets[_].layers&&P(A.assets[_].layers)}}}(),G=function(){var L=[4,4,18];function z(A){var _,C=A.length,F,D;for(_=C-1;_>=0;_-=1)if(A[_].ty==="sh")if(A[_].ks.k.i)A[_].ks.k.c=A[_].closed;else for(D=A[_].ks.k.length,F=0;F<D;F+=1)A[_].ks.k[F].s&&(A[_].ks.k[F].s[0].c=A[_].closed),A[_].ks.k[F].e&&(A[_].ks.k[F].e[0].c=A[_].closed);else A[_].ty==="gr"&&z(A[_].it)}function P(A){var _,C,F=A.length,D,Y,H,J;for(C=0;C<F;C+=1){if(_=A[C],_.hasMask){var W=_.masksProperties;for(Y=W.length,D=0;D<Y;D+=1)if(W[D].pt.k.i)W[D].pt.k.c=W[D].cl;else for(J=W[D].pt.k.length,H=0;H<J;H+=1)W[D].pt.k[H].s&&(W[D].pt.k[H].s[0].c=W[D].cl),W[D].pt.k[H].e&&(W[D].pt.k[H].e[0].c=W[D].cl)}_.ty===4&&z(_.shapes)}}return function(A){if(E(L,A.v)&&(P(A.layers),A.assets)){var _,C=A.assets.length;for(_=0;_<C;_+=1)A.assets[_].layers&&P(A.assets[_].layers)}}}();function O(L){L.__complete||(B(L),T(L),M(L),R(L),G(L),g(L.layers,L.assets),S(L.chars,L.assets),L.__complete=!0)}function N(L){L.t.a.length===0&&"m"in L.t.p}var U={};return U.completeData=O,U.checkColors=B,U.checkChars=M,U.checkPathProperties=R,U.checkShapes=G,U.completeLayers=g,U}if(n.dataManager||(n.dataManager=x()),n.assetLoader||(n.assetLoader=function(){function g(c){var d=c.getResponseHeader("content-type");return d&&c.responseType==="json"&&d.indexOf("json")!==-1||c.response&&_typeof$5(c.response)==="object"?c.response:c.response&&typeof c.response=="string"?JSON.parse(c.response):c.responseText?JSON.parse(c.responseText):null}function S(c,d,m,b){var E,T=new XMLHttpRequest;try{T.responseType="json"}catch{}T.onreadystatechange=function(){if(T.readyState===4)if(T.status===200)E=g(T),m(E);else try{E=g(T),m(E)}catch(M){b&&b(M)}};try{T.open(["G","E","T"].join(""),c,!0)}catch{T.open(["G","E","T"].join(""),d+"/"+c,!0)}T.send()}return{load:S}}()),p.data.type==="loadAnimation")n.assetLoader.load(p.data.path,p.data.fullPath,function(g){n.dataManager.completeData(g),n.postMessage({id:p.data.id,payload:g,status:"success"})},function(){n.postMessage({id:p.data.id,status:"error"})});else if(p.data.type==="complete"){var k=p.data.animation;n.dataManager.completeData(k),n.postMessage({id:p.data.id,payload:k,status:"success"})}else p.data.type==="loadData"&&n.assetLoader.load(p.data.path,p.data.fullPath,function(g){n.postMessage({id:p.data.id,payload:g,status:"success"})},function(){n.postMessage({id:p.data.id,status:"error"})})}),r.onmessage=function(p){var x=p.data,k=x.id,g=t[k];t[k]=null,x.status==="success"?g.onComplete(x.payload):g.onError&&g.onError()})}function o(p,x){e+=1;var k="processId_"+e;return t[k]={onComplete:p,onError:x},k}function f(p,x,k){l();var g=o(x,k);r.postMessage({type:"loadAnimation",path:p,fullPath:window.location.origin+window.location.pathname,id:g})}function u(p,x,k){l();var g=o(x,k);r.postMessage({type:"loadData",path:p,fullPath:window.location.origin+window.location.pathname,id:g})}function y(p,x,k){l();var g=o(x,k);r.postMessage({type:"complete",animation:p,id:g})}return{loadAnimation:f,loadData:u,completeAnimation:y}}(),ImagePreloader=function(){var e=function(){var c=createTag("canvas");c.width=1,c.height=1;var d=c.getContext("2d");return d.fillStyle="rgba(0,0,0,0)",d.fillRect(0,0,1,1),c}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function a(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(c,d,m){var b="";if(c.e)b=c.p;else if(d){var E=c.p;E.indexOf("images/")!==-1&&(E=E.split("/")[1]),b=d+E}else b=m,b+=c.u?c.u:"",b+=c.p;return b}function i(c){var d=0,m=setInterval(function(){var b=c.getBBox();(b.width||d>500)&&(this._imageLoaded(),clearInterval(m)),d+=1}.bind(this),50)}function n(c){var d=r(c,this.assetsPath,this.path),m=createNS("image");isSafari?this.testImageLoaded(m):m.addEventListener("load",this._imageLoaded,!1),m.addEventListener("error",function(){b.img=e,this._imageLoaded()}.bind(this),!1),m.setAttributeNS("http://www.w3.org/1999/xlink","href",d),this._elementHelper.append?this._elementHelper.append(m):this._elementHelper.appendChild(m);var b={img:m,assetData:c};return b}function s(c){var d=r(c,this.assetsPath,this.path),m=createTag("img");m.crossOrigin="anonymous",m.addEventListener("load",this._imageLoaded,!1),m.addEventListener("error",function(){b.img=e,this._imageLoaded()}.bind(this),!1),m.src=d;var b={img:m,assetData:c};return b}function l(c){var d={assetData:c},m=r(c,this.assetsPath,this.path);return dataManager.loadData(m,function(b){d.img=b,this._footageLoaded()}.bind(this),function(){d.img={},this._footageLoaded()}.bind(this)),d}function o(c,d){this.imagesLoadedCb=d;var m,b=c.length;for(m=0;m<b;m+=1)c[m].layers||(!c[m].t||c[m].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(c[m]))):c[m].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(c[m]))))}function f(c){this.path=c||""}function u(c){this.assetsPath=c||""}function y(c){for(var d=0,m=this.images.length;d<m;){if(this.images[d].assetData===c)return this.images[d].img;d+=1}return null}function p(){this.imagesLoadedCb=null,this.images.length=0}function x(){return this.totalImages===this.loadedAssets}function k(){return this.totalFootages===this.loadedFootagesCount}function g(c,d){c==="svg"?(this._elementHelper=d,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function S(){this._imageLoaded=t.bind(this),this._footageLoaded=a.bind(this),this.testImageLoaded=i.bind(this),this.createFootageData=l.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return S.prototype={loadAssets:o,setAssetsPath:u,setPath:f,loadedImages:x,loadedFootages:k,destroy:p,getAsset:y,createImgData:s,createImageData:n,imageLoaded:t,footageLoaded:a,setCacheType:g},S}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var a=this._cbs[e],r=0;r<a.length;r+=1)a[r](t)},addEventListener:function(e,t){return this._cbs[e]||(this._cbs[e]=[]),this._cbs[e].push(t),function(){this.removeEventListener(e,t)}.bind(this)},removeEventListener:function(e,t){if(!t)this._cbs[e]=null;else if(this._cbs[e]){for(var a=0,r=this._cbs[e].length;a<r;)this._cbs[e][a]===t&&(this._cbs[e].splice(a,1),a-=1,r-=1),a+=1;this._cbs[e].length||(this._cbs[e]=null)}}};var markerParser=function(){function e(t){for(var a=t.split(`\r
|
|
10
10
|
`),r={},i,n=0,s=0;s<a.length;s+=1)i=a[s].split(":"),i.length===2&&(r[i[0]]=i[1].trim(),n+=1);if(n===0)throw new Error;return r}return function(t){for(var a=[],r=0;r<t.length;r+=1){var i=t[r],n={time:i.tm,duration:i.dr};try{n.payload=JSON.parse(t[r].cm)}catch{try{n.payload=e(t[r].cm)}catch{n.payload={name:t[r].cm}}}a.push(n)}return a}}(),ProjectInterface=function(){function e(t){this.compositions.push(t)}return function(){function t(a){for(var r=0,i=this.compositions.length;r<i;){if(this.compositions[r].data&&this.compositions[r].data.nm===a)return this.compositions[r].prepareFrame&&this.compositions[r].data.xt&&this.compositions[r].prepareFrame(this.currentFrame),this.compositions[r].compInterface;r+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(e,t){renderers[e]=t};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var e in renderers)if(renderers[e])return e;return""}function _typeof$4(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$4=function(t){return typeof t}:_typeof$4=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$4(e)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t="svg";e.animType?t=e.animType:e.renderer&&(t=e.renderer);var a=getRenderer(t);this.renderer=new a(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,e.loop===""||e.loop===null||e.loop===void 0||e.loop===!0?this.loop=!0:e.loop===!1?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay="autoplay"in e?e.autoplay:!0,this.name=e.name?e.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(e,"autoloadSegments")?e.autoloadSegments:!0,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(e.path.lastIndexOf("\\")!==-1?this.path=e.path.substr(0,e.path.lastIndexOf("\\")+1):this.path=e.path.substr(0,e.path.lastIndexOf("/")+1),this.fileName=e.path.substr(e.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&_typeof$4(t)!=="object"&&(t=JSON.parse(t));var a={wrapper:e,animationData:t},r=e.attributes;a.path=r.getNamedItem("data-animation-path")?r.getNamedItem("data-animation-path").value:r.getNamedItem("data-bm-path")?r.getNamedItem("data-bm-path").value:r.getNamedItem("bm-path")?r.getNamedItem("bm-path").value:"",a.animType=r.getNamedItem("data-anim-type")?r.getNamedItem("data-anim-type").value:r.getNamedItem("data-bm-type")?r.getNamedItem("data-bm-type").value:r.getNamedItem("bm-type")?r.getNamedItem("bm-type").value:r.getNamedItem("data-bm-renderer")?r.getNamedItem("data-bm-renderer").value:r.getNamedItem("bm-renderer")?r.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var i=r.getNamedItem("data-anim-loop")?r.getNamedItem("data-anim-loop").value:r.getNamedItem("data-bm-loop")?r.getNamedItem("data-bm-loop").value:r.getNamedItem("bm-loop")?r.getNamedItem("bm-loop").value:"";i==="false"?a.loop=!1:i==="true"?a.loop=!0:i!==""&&(a.loop=parseInt(i,10));var n=r.getNamedItem("data-anim-autoplay")?r.getNamedItem("data-anim-autoplay").value:r.getNamedItem("data-bm-autoplay")?r.getNamedItem("data-bm-autoplay").value:r.getNamedItem("bm-autoplay")?r.getNamedItem("bm-autoplay").value:!0;a.autoplay=n!=="false",a.name=r.getNamedItem("data-name")?r.getNamedItem("data-name").value:r.getNamedItem("data-bm-name")?r.getNamedItem("data-bm-name").value:r.getNamedItem("bm-name")?r.getNamedItem("bm-name").value:"";var s=r.getNamedItem("data-anim-prerender")?r.getNamedItem("data-anim-prerender").value:r.getNamedItem("data-bm-prerender")?r.getNamedItem("data-bm-prerender").value:r.getNamedItem("bm-prerender")?r.getNamedItem("bm-prerender").value:"";s==="false"&&(a.prerender=!1),a.path?this.setParams(a):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t=this.animationData.layers,a,r=t.length,i=e.layers,n,s=i.length;for(n=0;n<s;n+=1)for(a=0;a<r;){if(t[a].id===i[n].id){t[a]=i[n];break}a+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(r=e.assets.length,a=0;a<r;a+=1)this.animationData.assets.push(e.assets[a]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||e.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var t=e.shift();this.timeCompleted=t.time*this.frameRate;var a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(a,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){var e=this.animationData.segments;e||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||(e.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var a=typeof e=="number"?e:void 0,r=typeof t=="number"?t:void 0;this.renderer.updateContainerSize(a,r)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,a=0;a<this.markers.length;a+=1)if(t=this.markers[a],t.payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,a){if(!(a&&this.name!==a)){var r=Number(e);if(isNaN(r)){var i=this.getMarkerData(e);i&&this.goToAndStop(i.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,a){if(!(a&&this.name!==a)){var r=Number(e);if(isNaN(r)){var i=this.getMarkerData(e);i&&(i.duration?this.playSegments([i.time,i.time+i.duration],!0):this.goToAndStop(i.time,!0))}else this.goToAndStop(r,t,a);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(!(this.isPaused===!0||this.isLoaded===!1)){var t=this.currentRawFrame+e*this.frameModifier,a=!1;t>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(a=!0,t=this.totalFrames-1):t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):t<0?this.checkSegments(t%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(a=!0,t=0)):this.setCurrentRawFrameValue(t),a&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var a=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?a=e:this.currentRawFrame+this.firstFrame>t&&(a=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,a!==-1&&this.goToAndStop(a,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),_typeof$4(e[0])==="object"){var a,r=e.length;for(a=0;a<r;a+=1)this.segments.push(e[a])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return this.segments.length?(this.adjustSegment(this.segments.shift(),e),!0):!1},AnimationItem.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(e){var t="";if(e.e)t=e.p;else if(this.assetsPath){var a=e.p;a.indexOf("images/")!==-1&&(a=a.split("/")[1]),t=this.assetsPath+a}else t=this.path,t+=e.u?e.u:"",t+=e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,a=this.assets.length;t<a;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,a){try{var r=this.renderer.getElementByPath(e);r.updateDocumentData(t,a)}catch{}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case"enterFrame":this.triggerEvent(e,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case"segmentStart":this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}e==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),e==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),e==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),e==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),e==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],a=0,r=0,i=0,n=!0,s=!1;function l(P){for(var A=0,_=P.target;A<r;)t[A].animation===_&&(t.splice(A,1),A-=1,r-=1,_.isPaused||y()),A+=1}function o(P,A){if(!P)return null;for(var _=0;_<r;){if(t[_].elem===P&&t[_].elem!==null)return t[_].animation;_+=1}var C=new AnimationItem;return p(C,P),C.setData(P,A),C}function f(){var P,A=t.length,_=[];for(P=0;P<A;P+=1)_.push(t[P].animation);return _}function u(){i+=1,G()}function y(){i-=1}function p(P,A){P.addEventListener("destroy",l),P.addEventListener("_active",u),P.addEventListener("_idle",y),t.push({elem:A,animation:P}),r+=1}function x(P){var A=new AnimationItem;return p(A,null),A.setParams(P),A}function k(P,A){var _;for(_=0;_<r;_+=1)t[_].animation.setSpeed(P,A)}function g(P,A){var _;for(_=0;_<r;_+=1)t[_].animation.setDirection(P,A)}function S(P){var A;for(A=0;A<r;A+=1)t[A].animation.play(P)}function c(P){var A=P-a,_;for(_=0;_<r;_+=1)t[_].animation.advanceTime(A);a=P,i&&!s?window.requestAnimationFrame(c):n=!0}function d(P){a=P,window.requestAnimationFrame(c)}function m(P){var A;for(A=0;A<r;A+=1)t[A].animation.pause(P)}function b(P,A,_){var C;for(C=0;C<r;C+=1)t[C].animation.goToAndStop(P,A,_)}function E(P){var A;for(A=0;A<r;A+=1)t[A].animation.stop(P)}function T(P){var A;for(A=0;A<r;A+=1)t[A].animation.togglePause(P)}function M(P){var A;for(A=r-1;A>=0;A-=1)t[A].animation.destroy(P)}function R(P,A,_){var C=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),F,D=C.length;for(F=0;F<D;F+=1)_&&C[F].setAttribute("data-bm-type",_),o(C[F],P);if(A&&D===0){_||(_="svg");var Y=document.getElementsByTagName("body")[0];Y.innerText="";var H=createTag("div");H.style.width="100%",H.style.height="100%",H.setAttribute("data-bm-type",_),Y.appendChild(H),o(H,P)}}function B(){var P;for(P=0;P<r;P+=1)t[P].animation.resize()}function G(){!s&&i&&n&&(window.requestAnimationFrame(d),n=!1)}function O(){s=!0}function N(){s=!1,G()}function U(P,A){var _;for(_=0;_<r;_+=1)t[_].animation.setVolume(P,A)}function L(P){var A;for(A=0;A<r;A+=1)t[A].animation.mute(P)}function z(P){var A;for(A=0;A<r;A+=1)t[A].animation.unmute(P)}return e.registerAnimation=o,e.loadAnimation=x,e.setSpeed=k,e.setDirection=g,e.play=S,e.pause=m,e.stop=E,e.togglePause=T,e.searchAnimations=R,e.resize=B,e.goToAndStop=b,e.destroy=M,e.freeze=O,e.unfreeze=N,e.setVolume=U,e.mute=L,e.unmute=z,e.getRegisteredAnimations=f,e}(),BezierFactory=function(){var e={};e.getBezierEasing=a;var t={};function a(d,m,b,E,T){var M=T||("bez_"+d+"_"+m+"_"+b+"_"+E).replace(/\./g,"p");if(t[M])return t[M];var R=new c([d,m,b,E]);return t[M]=R,R}var r=4,i=.001,n=1e-7,s=10,l=11,o=1/(l-1),f=typeof Float32Array=="function";function u(d,m){return 1-3*m+3*d}function y(d,m){return 3*m-6*d}function p(d){return 3*d}function x(d,m,b){return((u(m,b)*d+y(m,b))*d+p(m))*d}function k(d,m,b){return 3*u(m,b)*d*d+2*y(m,b)*d+p(m)}function g(d,m,b,E,T){var M,R,B=0;do R=m+(b-m)/2,M=x(R,E,T)-d,M>0?b=R:m=R;while(Math.abs(M)>n&&++B<s);return R}function S(d,m,b,E){for(var T=0;T<r;++T){var M=k(m,b,E);if(M===0)return m;var R=x(m,b,E)-d;m-=R/M}return m}function c(d){this._p=d,this._mSampleValues=f?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this)}return c.prototype={get:function(d){var m=this._p[0],b=this._p[1],E=this._p[2],T=this._p[3];return this._precomputed||this._precompute(),m===b&&E===T?d:d===0?0:d===1?1:x(this._getTForX(d),b,T)},_precompute:function(){var d=this._p[0],m=this._p[1],b=this._p[2],E=this._p[3];this._precomputed=!0,(d!==m||b!==E)&&this._calcSampleValues()},_calcSampleValues:function(){for(var d=this._p[0],m=this._p[2],b=0;b<l;++b)this._mSampleValues[b]=x(b*o,d,m)},_getTForX:function(d){for(var m=this._p[0],b=this._p[2],E=this._mSampleValues,T=0,M=1,R=l-1;M!==R&&E[M]<=d;++M)T+=o;--M;var B=(d-E[M])/(E[M+1]-E[M]),G=T+B*o,O=k(G,m,b);return O>=i?S(d,G,m,b):O===0?G:g(d,T,T+o,m,b)}},e}(),pooling=function(){function e(t){return t.concat(createSizedArray(t.length))}return{double:e}}(),poolFactory=function(){return function(e,t,a){var r=0,i=e,n=createSizedArray(i),s={newElement:l,release:o};function l(){var f;return r?(r-=1,f=n[r]):f=t(),f}function o(f){r===i&&(n=pooling.double(n),i*=2),a&&a(f),n[r]=f,r+=1}return s}}(),bezierLengthPool=function(){function e(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,e)}(),segmentsLengthPool=function(){function e(){return{lengths:[],totalLength:0}}function t(a){var r,i=a.lengths.length;for(r=0;r<i;r+=1)bezierLengthPool.release(a.lengths[r]);a.lengths.length=0}return poolFactory(8,e,t)}();function bezFunction(){var e=Math;function t(p,x,k,g,S,c){var d=p*g+x*S+k*c-S*g-c*p-k*x;return d>-.001&&d<.001}function a(p,x,k,g,S,c,d,m,b){if(k===0&&c===0&&b===0)return t(p,x,g,S,d,m);var E=e.sqrt(e.pow(g-p,2)+e.pow(S-x,2)+e.pow(c-k,2)),T=e.sqrt(e.pow(d-p,2)+e.pow(m-x,2)+e.pow(b-k,2)),M=e.sqrt(e.pow(d-g,2)+e.pow(m-S,2)+e.pow(b-c,2)),R;return E>T?E>M?R=E-T-M:R=M-T-E:M>T?R=M-T-E:R=T-E-M,R>-1e-4&&R<1e-4}var r=function(){return function(p,x,k,g){var S=getDefaultCurveSegments(),c,d,m,b,E,T=0,M,R=[],B=[],G=bezierLengthPool.newElement();for(m=k.length,c=0;c<S;c+=1){for(E=c/(S-1),M=0,d=0;d<m;d+=1)b=bmPow(1-E,3)*p[d]+3*bmPow(1-E,2)*E*k[d]+3*(1-E)*bmPow(E,2)*g[d]+bmPow(E,3)*x[d],R[d]=b,B[d]!==null&&(M+=bmPow(R[d]-B[d],2)),B[d]=R[d];M&&(M=bmSqrt(M),T+=M),G.percents[c]=E,G.lengths[c]=T}return G.addedLength=T,G}}();function i(p){var x=segmentsLengthPool.newElement(),k=p.c,g=p.v,S=p.o,c=p.i,d,m=p._length,b=x.lengths,E=0;for(d=0;d<m-1;d+=1)b[d]=r(g[d],g[d+1],S[d],c[d+1]),E+=b[d].addedLength;return k&&m&&(b[d]=r(g[d],g[0],S[d],c[0]),E+=b[d].addedLength),x.totalLength=E,x}function n(p){this.segmentLength=0,this.points=new Array(p)}function s(p,x){this.partialLength=p,this.point=x}var l=function(){var p={};return function(x,k,g,S){var c=(x[0]+"_"+x[1]+"_"+k[0]+"_"+k[1]+"_"+g[0]+"_"+g[1]+"_"+S[0]+"_"+S[1]).replace(/\./g,"p");if(!p[c]){var d=getDefaultCurveSegments(),m,b,E,T,M,R=0,B,G,O=null;x.length===2&&(x[0]!==k[0]||x[1]!==k[1])&&t(x[0],x[1],k[0],k[1],x[0]+g[0],x[1]+g[1])&&t(x[0],x[1],k[0],k[1],k[0]+S[0],k[1]+S[1])&&(d=2);var N=new n(d);for(E=g.length,m=0;m<d;m+=1){for(G=createSizedArray(E),M=m/(d-1),B=0,b=0;b<E;b+=1)T=bmPow(1-M,3)*x[b]+3*bmPow(1-M,2)*M*(x[b]+g[b])+3*(1-M)*bmPow(M,2)*(k[b]+S[b])+bmPow(M,3)*k[b],G[b]=T,O!==null&&(B+=bmPow(G[b]-O[b],2));B=bmSqrt(B),R+=B,N.points[m]=new s(B,G),O=G}N.segmentLength=R,p[c]=N}return p[c]}}();function o(p,x){var k=x.percents,g=x.lengths,S=k.length,c=bmFloor((S-1)*p),d=p*x.addedLength,m=0;if(c===S-1||c===0||d===g[c])return k[c];for(var b=g[c]>d?-1:1,E=!0;E;)if(g[c]<=d&&g[c+1]>d?(m=(d-g[c])/(g[c+1]-g[c]),E=!1):c+=b,c<0||c>=S-1){if(c===S-1)return k[c];E=!1}return k[c]+(k[c+1]-k[c])*m}function f(p,x,k,g,S,c){var d=o(S,c),m=1-d,b=e.round((m*m*m*p[0]+(d*m*m+m*d*m+m*m*d)*k[0]+(d*d*m+m*d*d+d*m*d)*g[0]+d*d*d*x[0])*1e3)/1e3,E=e.round((m*m*m*p[1]+(d*m*m+m*d*m+m*m*d)*k[1]+(d*d*m+m*d*d+d*m*d)*g[1]+d*d*d*x[1])*1e3)/1e3;return[b,E]}var u=createTypedArray("float32",8);function y(p,x,k,g,S,c,d){S<0?S=0:S>1&&(S=1);var m=o(S,d);c=c>1?1:c;var b=o(c,d),E,T=p.length,M=1-m,R=1-b,B=M*M*M,G=m*M*M*3,O=m*m*M*3,N=m*m*m,U=M*M*R,L=m*M*R+M*m*R+M*M*b,z=m*m*R+M*m*b+m*M*b,P=m*m*b,A=M*R*R,_=m*R*R+M*b*R+M*R*b,C=m*b*R+M*b*b+m*R*b,F=m*b*b,D=R*R*R,Y=b*R*R+R*b*R+R*R*b,H=b*b*R+R*b*b+b*R*b,J=b*b*b;for(E=0;E<T;E+=1)u[E*4]=e.round((B*p[E]+G*k[E]+O*g[E]+N*x[E])*1e3)/1e3,u[E*4+1]=e.round((U*p[E]+L*k[E]+z*g[E]+P*x[E])*1e3)/1e3,u[E*4+2]=e.round((A*p[E]+_*k[E]+C*g[E]+F*x[E])*1e3)/1e3,u[E*4+3]=e.round((D*p[E]+Y*k[E]+H*g[E]+J*x[E])*1e3)/1e3;return u}return{getSegmentsLength:i,getNewSegment:y,getPointInSegment:f,buildBezierData:l,pointOnLine2D:t,pointOnLine3D:a}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(e,t){var a=this.offsetTime,r;this.propType==="multidimensional"&&(r=createTypedArray("float32",this.pv.length));for(var i=t.lastIndex,n=i,s=this.keyframes.length-1,l=!0,o,f,u;l;){if(o=this.keyframes[n],f=this.keyframes[n+1],n===s-1&&e>=f.t-a){o.h&&(o=f),i=0;break}if(f.t-a>e){i=n;break}n<s-1?n+=1:(i=0,l=!1)}u=this.keyframesMetadata[n]||{};var y,p,x,k,g,S,c=f.t-a,d=o.t-a,m;if(o.to){u.bezierData||(u.bezierData=bez.buildBezierData(o.s,f.s||o.e,o.to,o.ti));var b=u.bezierData;if(e>=c||e<d){var E=e>=c?b.points.length-1:0;for(p=b.points[E].point.length,y=0;y<p;y+=1)r[y]=b.points[E].point[y]}else{u.__fnct?S=u.__fnct:(S=BezierFactory.getBezierEasing(o.o.x,o.o.y,o.i.x,o.i.y,o.n).get,u.__fnct=S),x=S((e-d)/(c-d));var T=b.segmentLength*x,M,R=t.lastFrame<e&&t._lastKeyframeIndex===n?t._lastAddedLength:0;for(g=t.lastFrame<e&&t._lastKeyframeIndex===n?t._lastPoint:0,l=!0,k=b.points.length;l;){if(R+=b.points[g].partialLength,T===0||x===0||g===b.points.length-1){for(p=b.points[g].point.length,y=0;y<p;y+=1)r[y]=b.points[g].point[y];break}else if(T>=R&&T<R+b.points[g+1].partialLength){for(M=(T-R)/b.points[g+1].partialLength,p=b.points[g].point.length,y=0;y<p;y+=1)r[y]=b.points[g].point[y]+(b.points[g+1].point[y]-b.points[g].point[y])*M;break}g<k-1?g+=1:l=!1}t._lastPoint=g,t._lastAddedLength=R-b.points[g].partialLength,t._lastKeyframeIndex=n}}else{var B,G,O,N,U;if(s=o.s.length,m=f.s||o.e,this.sh&&o.h!==1)if(e>=c)r[0]=m[0],r[1]=m[1],r[2]=m[2];else if(e<=d)r[0]=o.s[0],r[1]=o.s[1],r[2]=o.s[2];else{var L=createQuaternion(o.s),z=createQuaternion(m),P=(e-d)/(c-d);quaternionToEuler(r,slerp(L,z,P))}else for(n=0;n<s;n+=1)o.h!==1&&(e>=c?x=1:e<d?x=0:(o.o.x.constructor===Array?(u.__fnct||(u.__fnct=[]),u.__fnct[n]?S=u.__fnct[n]:(B=o.o.x[n]===void 0?o.o.x[0]:o.o.x[n],G=o.o.y[n]===void 0?o.o.y[0]:o.o.y[n],O=o.i.x[n]===void 0?o.i.x[0]:o.i.x[n],N=o.i.y[n]===void 0?o.i.y[0]:o.i.y[n],S=BezierFactory.getBezierEasing(B,G,O,N).get,u.__fnct[n]=S)):u.__fnct?S=u.__fnct:(B=o.o.x,G=o.o.y,O=o.i.x,N=o.i.y,S=BezierFactory.getBezierEasing(B,G,O,N).get,o.keyframeMetadata=S),x=S((e-d)/(c-d)))),m=f.s||o.e,U=o.h===1?o.s[n]:o.s[n]+(m[n]-o.s[n])*x,this.propType==="multidimensional"?r[n]=U:r=U}return t.lastIndex=i,r}function slerp(e,t,a){var r=[],i=e[0],n=e[1],s=e[2],l=e[3],o=t[0],f=t[1],u=t[2],y=t[3],p,x,k,g,S;return x=i*o+n*f+s*u+l*y,x<0&&(x=-x,o=-o,f=-f,u=-u,y=-y),1-x>1e-6?(p=Math.acos(x),k=Math.sin(p),g=Math.sin((1-a)*p)/k,S=Math.sin(a*p)/k):(g=1-a,S=a),r[0]=g*i+S*o,r[1]=g*n+S*f,r[2]=g*s+S*u,r[3]=g*l+S*y,r}function quaternionToEuler(e,t){var a=t[0],r=t[1],i=t[2],n=t[3],s=Math.atan2(2*r*n-2*a*i,1-2*r*r-2*i*i),l=Math.asin(2*a*r+2*i*n),o=Math.atan2(2*a*n-2*r*i,1-2*a*a-2*i*i);e[0]=s/degToRads,e[1]=l/degToRads,e[2]=o/degToRads}function createQuaternion(e){var t=e[0]*degToRads,a=e[1]*degToRads,r=e[2]*degToRads,i=Math.cos(t/2),n=Math.cos(a/2),s=Math.cos(r/2),l=Math.sin(t/2),o=Math.sin(a/2),f=Math.sin(r/2),u=i*n*s-l*o*f,y=l*o*s+i*n*f,p=l*n*s+i*o*f,x=i*o*s-l*n*f;return[y,p,x,u]}function getValueAtCurrentTime(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,a=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=a&&e>=a||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var r=this.interpolateValue(e,this._caching);this.pv=r}return this._caching.lastFrame=e,this.pv}function setVValue(e){var t;if(this.propType==="unidimensional")t=e*this.mult,mathAbs(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var a=0,r=this.v.length;a<r;)t=e[a]*this.mult,mathAbs(this.v[a]-t)>1e-5&&(this.v[a]=t,this._mdf=!0),a+=1}function processEffectsSequence(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var e,t=this.effectsSequence.length,a=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)a=this.effectsSequence[e](a);this.setVValue(a),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function ValueProperty(e,t,a,r){this.propType="unidimensional",this.mult=a||1,this.data=t,this.v=a?t.k*a:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=r,this.comp=e.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(e,t,a,r){this.propType="multidimensional",this.mult=a||1,this.data=t,this._mdf=!1,this.elem=e,this.container=r,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var i,n=t.k.length;for(this.v=createTypedArray("float32",n),this.pv=createTypedArray("float32",n),this.vel=createTypedArray("float32",n),i=0;i<n;i+=1)this.v[i]=t.k[i]*this.mult,this.pv[i]=t.k[i];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(e,t,a,r){this.propType="unidimensional",this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=a||1,this.elem=e,this.container=r,this.comp=e.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(e,t,a,r){this.propType="multidimensional";var i,n=t.k.length,s,l,o,f;for(i=0;i<n-1;i+=1)t.k[i].to&&t.k[i].s&&t.k[i+1]&&t.k[i+1].s&&(s=t.k[i].s,l=t.k[i+1].s,o=t.k[i].to,f=t.k[i].ti,(s.length===2&&!(s[0]===l[0]&&s[1]===l[1])&&bez.pointOnLine2D(s[0],s[1],l[0],l[1],s[0]+o[0],s[1]+o[1])&&bez.pointOnLine2D(s[0],s[1],l[0],l[1],l[0]+f[0],l[1]+f[1])||s.length===3&&!(s[0]===l[0]&&s[1]===l[1]&&s[2]===l[2])&&bez.pointOnLine3D(s[0],s[1],s[2],l[0],l[1],l[2],s[0]+o[0],s[1]+o[1],s[2]+o[2])&&bez.pointOnLine3D(s[0],s[1],s[2],l[0],l[1],l[2],l[0]+f[0],l[1]+f[1],l[2]+f[2]))&&(t.k[i].to=null,t.k[i].ti=null),s[0]===l[0]&&s[1]===l[1]&&o[0]===0&&o[1]===0&&f[0]===0&&f[1]===0&&(s.length===2||s[2]===l[2]&&o[2]===0&&f[2]===0)&&(t.k[i].to=null,t.k[i].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=a||1,this.elem=e,this.container=r,this.comp=e.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var u=t.k[0].s.length;for(this.v=createTypedArray("float32",u),this.pv=createTypedArray("float32",u),i=0;i<u;i+=1)this.v[i]=initFrame,this.pv[i]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",u)},this.addEffect=addEffect}var PropertyFactory=function(){function e(a,r,i,n,s){r.sid&&(r=a.globalData.slotManager.getProp(r));var l;if(!r.k.length)l=new ValueProperty(a,r,n,s);else if(typeof r.k[0]=="number")l=new MultiDimensionalProperty(a,r,n,s);else switch(i){case 0:l=new KeyframedValueProperty(a,r,n,s);break;case 1:l=new KeyframedMultidimensionalProperty(a,r,n,s);break}return l.effectsSequence.length&&s.addDynamicProperty(l),l}var t={getProp:e};return t}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(e){this.dynamicProperties.indexOf(e)===-1&&(this.dynamicProperties.push(e),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var e,t=this.dynamicProperties.length;for(e=0;e<t;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(e){this.container=e,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){function e(){return createTypedArray("float32",2)}return poolFactory(8,e)}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(e,t){this.c=e,this.setLength(t);for(var a=0;a<t;)this.v[a]=pointPool.newElement(),this.o[a]=pointPool.newElement(),this.i[a]=pointPool.newElement(),a+=1},ShapePath.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(e,t,a,r,i){var n;switch(this._length=Math.max(this._length,r+1),this._length>=this._maxLength&&this.doubleArrayLength(),a){case"v":n=this.v;break;case"i":n=this.i;break;case"o":n=this.o;break;default:n=[];break}(!n[r]||n[r]&&!i)&&(n[r]=pointPool.newElement()),n[r][0]=e,n[r][1]=t},ShapePath.prototype.setTripleAt=function(e,t,a,r,i,n,s,l){this.setXYAt(e,t,"v",s,l),this.setXYAt(a,r,"o",s,l),this.setXYAt(i,n,"i",s,l)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,a=this.o,r=this.i,i=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],r[0][0],r[0][1],a[0][0],a[0][1],0,!1),i=1);var n=this._length-1,s=this._length,l;for(l=i;l<s;l+=1)e.setTripleAt(t[n][0],t[n][1],r[n][0],r[n][1],a[n][0],a[n][1],l,!1),n-=1;return e},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function e(){return new ShapePath}function t(i){var n=i._length,s;for(s=0;s<n;s+=1)pointPool.release(i.v[s]),pointPool.release(i.i[s]),pointPool.release(i.o[s]),i.v[s]=null,i.i[s]=null,i.o[s]=null;i._length=0,i.c=!1}function a(i){var n=r.newElement(),s,l=i._length===void 0?i.v.length:i._length;for(n.setLength(l),n.c=i.c,s=0;s<l;s+=1)n.setTripleAt(i.v[s][0],i.v[s][1],i.o[s][0],i.o[s][1],i.i[s][0],i.i[s][1],s);return n}var r=poolFactory(4,e,t);return r.clone=a,r}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var e;for(e=0;e<this._length;e+=1)shapePool.release(this.shapes[e]);this._length=0};var shapeCollectionPool=function(){var e={newShapeCollection:i,release:n},t=0,a=4,r=createSizedArray(a);function i(){var s;return t?(t-=1,s=r[t]):s=new ShapeCollection,s}function n(s){var l,o=s._length;for(l=0;l<o;l+=1)shapePool.release(s.shapes[l]);s._length=0,t===a&&(r=pooling.double(r),a*=2),r[t]=s,t+=1}return e}(),ShapePropertyFactory=function(){var e=-999999;function t(c,d,m){var b=m.lastIndex,E,T,M,R,B,G,O,N,U,L=this.keyframes;if(c<L[0].t-this.offsetTime)E=L[0].s[0],M=!0,b=0;else if(c>=L[L.length-1].t-this.offsetTime)E=L[L.length-1].s?L[L.length-1].s[0]:L[L.length-2].e[0],M=!0;else{for(var z=b,P=L.length-1,A=!0,_,C,F;A&&(_=L[z],C=L[z+1],!(C.t-this.offsetTime>c));)z<P-1?z+=1:A=!1;if(F=this.keyframesMetadata[z]||{},M=_.h===1,b=z,!M){if(c>=C.t-this.offsetTime)N=1;else if(c<_.t-this.offsetTime)N=0;else{var D;F.__fnct?D=F.__fnct:(D=BezierFactory.getBezierEasing(_.o.x,_.o.y,_.i.x,_.i.y).get,F.__fnct=D),N=D((c-(_.t-this.offsetTime))/(C.t-this.offsetTime-(_.t-this.offsetTime)))}T=C.s?C.s[0]:_.e[0]}E=_.s[0]}for(G=d._length,O=E.i[0].length,m.lastIndex=b,R=0;R<G;R+=1)for(B=0;B<O;B+=1)U=M?E.i[R][B]:E.i[R][B]+(T.i[R][B]-E.i[R][B])*N,d.i[R][B]=U,U=M?E.o[R][B]:E.o[R][B]+(T.o[R][B]-E.o[R][B])*N,d.o[R][B]=U,U=M?E.v[R][B]:E.v[R][B]+(T.v[R][B]-E.v[R][B])*N,d.v[R][B]=U}function a(){var c=this.comp.renderedFrame-this.offsetTime,d=this.keyframes[0].t-this.offsetTime,m=this.keyframes[this.keyframes.length-1].t-this.offsetTime,b=this._caching.lastFrame;return b!==e&&(b<d&&c<d||b>m&&c>m)||(this._caching.lastIndex=b<c?this._caching.lastIndex:0,this.interpolateShape(c,this.pv,this._caching)),this._caching.lastFrame=c,this.pv}function r(){this.paths=this.localShapeCollection}function i(c,d){if(c._length!==d._length||c.c!==d.c)return!1;var m,b=c._length;for(m=0;m<b;m+=1)if(c.v[m][0]!==d.v[m][0]||c.v[m][1]!==d.v[m][1]||c.o[m][0]!==d.o[m][0]||c.o[m][1]!==d.o[m][1]||c.i[m][0]!==d.i[m][0]||c.i[m][1]!==d.i[m][1])return!1;return!0}function n(c){i(this.v,c)||(this.v=shapePool.clone(c),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function s(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var c;this.kf?c=this.pv:this.data.ks?c=this.data.ks.k:c=this.data.pt.k;var d,m=this.effectsSequence.length;for(d=0;d<m;d+=1)c=this.effectsSequence[d](c);this.setVValue(c),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function l(c,d,m){this.propType="shape",this.comp=c.comp,this.container=c,this.elem=c,this.data=d,this.k=!1,this.kf=!1,this._mdf=!1;var b=m===3?d.pt.k:d.ks.k;this.v=shapePool.clone(b),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=r,this.effectsSequence=[]}function o(c){this.effectsSequence.push(c),this.container.addDynamicProperty(this)}l.prototype.interpolateShape=t,l.prototype.getValue=s,l.prototype.setVValue=n,l.prototype.addEffect=o;function f(c,d,m){this.propType="shape",this.comp=c.comp,this.elem=c,this.container=c,this.offsetTime=c.data.st,this.keyframes=m===3?d.pt.k:d.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var b=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,b),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=e,this.reset=r,this._caching={lastFrame:e,lastIndex:0},this.effectsSequence=[a.bind(this)]}f.prototype.getValue=s,f.prototype.interpolateShape=t,f.prototype.setVValue=n,f.prototype.addEffect=o;var u=function(){var c=roundCorner;function d(m,b){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=b.d,this.elem=m,this.comp=m.comp,this.frameId=-1,this.initDynamicPropertyContainer(m),this.p=PropertyFactory.getProp(m,b.p,1,0,this),this.s=PropertyFactory.getProp(m,b.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return d.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var m=this.p.v[0],b=this.p.v[1],E=this.s.v[0]/2,T=this.s.v[1]/2,M=this.d!==3,R=this.v;R.v[0][0]=m,R.v[0][1]=b-T,R.v[1][0]=M?m+E:m-E,R.v[1][1]=b,R.v[2][0]=m,R.v[2][1]=b+T,R.v[3][0]=M?m-E:m+E,R.v[3][1]=b,R.i[0][0]=M?m-E*c:m+E*c,R.i[0][1]=b-T,R.i[1][0]=M?m+E:m-E,R.i[1][1]=b-T*c,R.i[2][0]=M?m+E*c:m-E*c,R.i[2][1]=b+T,R.i[3][0]=M?m-E:m+E,R.i[3][1]=b+T*c,R.o[0][0]=M?m+E*c:m-E*c,R.o[0][1]=b-T,R.o[1][0]=M?m+E:m-E,R.o[1][1]=b+T*c,R.o[2][0]=M?m-E*c:m+E*c,R.o[2][1]=b+T,R.o[3][0]=M?m-E:m+E,R.o[3][1]=b-T*c}},extendPrototype([DynamicPropertyContainer],d),d}(),y=function(){function c(d,m){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=d,this.comp=d.comp,this.data=m,this.frameId=-1,this.d=m.d,this.initDynamicPropertyContainer(d),m.sy===1?(this.ir=PropertyFactory.getProp(d,m.ir,0,0,this),this.is=PropertyFactory.getProp(d,m.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(d,m.pt,0,0,this),this.p=PropertyFactory.getProp(d,m.p,1,0,this),this.r=PropertyFactory.getProp(d,m.r,0,degToRads,this),this.or=PropertyFactory.getProp(d,m.or,0,0,this),this.os=PropertyFactory.getProp(d,m.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return c.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var d=Math.floor(this.pt.v)*2,m=Math.PI*2/d,b=!0,E=this.or.v,T=this.ir.v,M=this.os.v,R=this.is.v,B=2*Math.PI*E/(d*2),G=2*Math.PI*T/(d*2),O,N,U,L,z=-Math.PI/2;z+=this.r.v;var P=this.data.d===3?-1:1;for(this.v._length=0,O=0;O<d;O+=1){N=b?E:T,U=b?M:R,L=b?B:G;var A=N*Math.cos(z),_=N*Math.sin(z),C=A===0&&_===0?0:_/Math.sqrt(A*A+_*_),F=A===0&&_===0?0:-A/Math.sqrt(A*A+_*_);A+=+this.p.v[0],_+=+this.p.v[1],this.v.setTripleAt(A,_,A-C*L*U*P,_-F*L*U*P,A+C*L*U*P,_+F*L*U*P,O,!0),b=!b,z+=m*P}},convertPolygonToPath:function(){var d=Math.floor(this.pt.v),m=Math.PI*2/d,b=this.or.v,E=this.os.v,T=2*Math.PI*b/(d*4),M,R=-Math.PI*.5,B=this.data.d===3?-1:1;for(R+=this.r.v,this.v._length=0,M=0;M<d;M+=1){var G=b*Math.cos(R),O=b*Math.sin(R),N=G===0&&O===0?0:O/Math.sqrt(G*G+O*O),U=G===0&&O===0?0:-G/Math.sqrt(G*G+O*O);G+=+this.p.v[0],O+=+this.p.v[1],this.v.setTripleAt(G,O,G-N*T*E*B,O-U*T*E*B,G+N*T*E*B,O+U*T*E*B,M,!0),R+=m*B}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],c),c}(),p=function(){function c(d,m){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=d,this.comp=d.comp,this.frameId=-1,this.d=m.d,this.initDynamicPropertyContainer(d),this.p=PropertyFactory.getProp(d,m.p,1,0,this),this.s=PropertyFactory.getProp(d,m.s,1,0,this),this.r=PropertyFactory.getProp(d,m.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return c.prototype={convertRectToPath:function(){var d=this.p.v[0],m=this.p.v[1],b=this.s.v[0]/2,E=this.s.v[1]/2,T=bmMin(b,E,this.r.v),M=T*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(d+b,m-E+T,d+b,m-E+T,d+b,m-E+M,0,!0),this.v.setTripleAt(d+b,m+E-T,d+b,m+E-M,d+b,m+E-T,1,!0),T!==0?(this.v.setTripleAt(d+b-T,m+E,d+b-T,m+E,d+b-M,m+E,2,!0),this.v.setTripleAt(d-b+T,m+E,d-b+M,m+E,d-b+T,m+E,3,!0),this.v.setTripleAt(d-b,m+E-T,d-b,m+E-T,d-b,m+E-M,4,!0),this.v.setTripleAt(d-b,m-E+T,d-b,m-E+M,d-b,m-E+T,5,!0),this.v.setTripleAt(d-b+T,m-E,d-b+T,m-E,d-b+M,m-E,6,!0),this.v.setTripleAt(d+b-T,m-E,d+b-M,m-E,d+b-T,m-E,7,!0)):(this.v.setTripleAt(d-b,m+E,d-b+M,m+E,d-b,m+E,2),this.v.setTripleAt(d-b,m-E,d-b,m-E+M,d-b,m-E,3))):(this.v.setTripleAt(d+b,m-E+T,d+b,m-E+M,d+b,m-E+T,0,!0),T!==0?(this.v.setTripleAt(d+b-T,m-E,d+b-T,m-E,d+b-M,m-E,1,!0),this.v.setTripleAt(d-b+T,m-E,d-b+M,m-E,d-b+T,m-E,2,!0),this.v.setTripleAt(d-b,m-E+T,d-b,m-E+T,d-b,m-E+M,3,!0),this.v.setTripleAt(d-b,m+E-T,d-b,m+E-M,d-b,m+E-T,4,!0),this.v.setTripleAt(d-b+T,m+E,d-b+T,m+E,d-b+M,m+E,5,!0),this.v.setTripleAt(d+b-T,m+E,d+b-M,m+E,d+b-T,m+E,6,!0),this.v.setTripleAt(d+b,m+E-T,d+b,m+E-T,d+b,m+E-M,7,!0)):(this.v.setTripleAt(d-b,m-E,d-b+M,m-E,d-b,m-E,1,!0),this.v.setTripleAt(d-b,m+E,d-b,m+E-M,d-b,m+E,2,!0),this.v.setTripleAt(d+b,m+E,d+b-M,m+E,d+b,m+E,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:r},extendPrototype([DynamicPropertyContainer],c),c}();function x(c,d,m){var b;if(m===3||m===4){var E=m===3?d.pt:d.ks,T=E.k;T.length?b=new f(c,d,m):b=new l(c,d,m)}else m===5?b=new p(c,d):m===6?b=new u(c,d):m===7&&(b=new y(c,d));return b.k&&c.addDynamicProperty(b),b}function k(){return l}function g(){return f}var S={};return S.getShapeProp=x,S.getConstructorFunction=k,S.getKeyframedConstructorFunction=g,S}();/*!
|