@bluepic/embed 0.6.13 → 0.6.14

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.
@@ -163,7 +163,7 @@ list should be an Array.`),e.length===0)return new i(0);if(e.length===1)return e
163
163
  `),t=[];return N(i.maxLength)&&t.push({key:`chars`,current:M.value,max:i.maxLength}),N(i.maxLines)&&t.push({key:`lines`,current:e.length,max:i.maxLines,unit:`lines`}),N(i.maxLineLength)&&t.push({key:`line-length`,current:Math.max(...e.map(e=>e.length)),max:i.maxLineLength,unit:`per line`}),t}),F=(0,t.computed)(()=>i.showWordCount||P.value.length>0),I=(0,t.computed)(()=>i.richtext?j.value.length>0:String(c.value).length>0);function L(e){return e.en}let ee=(0,t.ref)(),R=(0,t.ref)({start:0,length:0}),B=(0,t.computed)({get(){let e=v.value?.richTextInstance;if(!e)return;let t=re(e.resolveFeatures(R.value.start,R.value.length).flat());if(t!==void 0)return t===null?`multiple`:te.value.find(e=>Ux(e.value,t))?.value},set(e){let t=v.value?.richTextInstance;t&&e!==`multiple`&&(e===void 0?t.applyFormat(R.value.start,R.value.length,{}):(t.resolveFeatures(R.value.start,R.value.length),t.applyFormat(R.value.start,R.value.length,e)),ne.value.closePopover())}});(0,t.watch)(ee,()=>{ee.value&&(R.value=ee.value)});let te=(0,t.computed)(()=>i.richtext?[{label:L(i.richtext.noStyleLabel),value:void 0},...i.richtext.options.map((e,t)=>({label:e.label,value:e.style}))]:[]),ne=(0,t.ref)();function re(e){let t=!1,n;for(let r of e)if(!n)n=r.format;else if(!Ux(n,r.format)){t=!0;break}return t?null:n}function V(){i.richtext?_.value=[{text:``,format:{}}]:s.value=``}return(0,t.onUnmounted)(()=>{l.value=[],u.value=0,d.value=0}),n({inputEelRef:S,setFocus(e){e?S.value?.focus():S.value?.blur()}}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`bx-input`,{readonly:e.readonly,bordered:e.bordered,"is-textarea":e.type===`textarea`}])},[e.richtext?((0,t.openBlock)(),(0,t.createBlock)(FS,{key:0,ref_key:`bxSelectRef`,ref:ne,class:`select-richtext`,modelValue:B.value,"onUpdate:modelValue":r[0]||=e=>B.value=e,options:te.value,disabled:!R.value||R.value.length===0},{label:(0,t.withCtx)(({label:e})=>[(0,t.createTextVNode)((0,t.toDisplayString)(e??`Multiple`),1)]),_:1},8,[`modelValue`,`options`,`disabled`])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`bx-input-wrapper`,{focus:w.value&&!e.readonly,round:e.round,ring:e.ring,bordered:e.bordered,[`size-`+e.size]:e.size,disabled:e.disabled,readonly:e.readonly,"rich-text":e.richtext,error:p.value,"state-active":e.state===`active`,"state-success":e.state===`success`,"state-error":e.state===`error`,"state-warning":e.state===`warning`,ghost:e.ghost}]),style:(0,t.normalizeStyle)({"--max-height":e.richtext?`auto`:e.maxHeight,"--min-height":e.minHeight,"--textarea-max-lines":D.value}),onClick:k},[o.prefix?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,HS,[(0,t.renderSlot)(n.$slots,`prefix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`bx-input__input`,{"swiper-no-swiping":w.value,"has-prefix":!!o.prefix}])},[e.richtext?((0,t.openBlock)(),(0,t.createBlock)(jS,{key:0,ref_key:`bxRichTextInstance`,ref:v,modelValue:_.value,"onUpdate:modelValue":r[1]||=e=>_.value=e,selection:ee.value,"onUpdate:selection":r[2]||=e=>ee.value=e,"raw-text":j.value,"onUpdate:rawText":r[3]||=e=>j.value=e,focus:w.value,"onUpdate:focus":r[4]||=e=>w.value=e,"aria-label":e.ariaLabelledby?void 0:e.ariaLabel,"aria-labelledby":e.ariaLabelledby},null,8,[`modelValue`,`selection`,`raw-text`,`focus`,`aria-label`,`aria-labelledby`])):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[e.type===`textarea`?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)(`textarea`,{key:0,ref_key:`inputEelRef`,ref:S,rows:`1`,class:(0,t.normalizeClass)({resizeable:e.resizeable}),"onUpdate:modelValue":r[5]||=e=>g.value=e,placeholder:e.placeholder,onKeydown:A,readonly:e.readonly,title:e.readonly?e.readonlyMessage:void 0,"aria-label":e.ariaLabelledby?void 0:e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-invalid":b.value?`true`:void 0,"aria-describedby":x.value},null,42,US)),[[t.vModelText,g.value]]):(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)(`input`,{key:1,ref_key:`inputEelRef`,ref:S,"onUpdate:modelValue":r[6]||=e=>g.value=e,readonly:e.readonly,placeholder:e.placeholder,type:e.type,onKeydown:A,title:e.readonly?e.readonlyMessage:void 0,"aria-label":e.ariaLabelledby?void 0:e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-invalid":b.value?`true`:void 0,"aria-describedby":x.value},null,40,WS)),[[t.vModelDynamic,g.value]])],64))],2),o.suffix||e.clearable||F.value||o.loading||e.loading||p.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,"data-suffix":!!o.suffix,class:`bx-input__suffix`},[o.loading||e.loading?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,KS,[o.loading?(0,t.renderSlot)(n.$slots,`loading`,{key:0},void 0,!0):((0,t.openBlock)(),(0,t.createBlock)(Gv,{key:1,size:`small`}))])):(0,t.createCommentVNode)(``,!0),(0,t.renderSlot)(n.$slots,`suffix`,{},void 0,!0),F.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,id:(0,t.unref)(y),class:`bx-input__word-count`},[P.value.length?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(P.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:e.key,class:(0,t.normalizeClass)([`bx-input__counter`,{over:e.current>e.max}])},[(0,t.createTextVNode)((0,t.toDisplayString)(e.current)+`/`+(0,t.toDisplayString)(e.max),1),e.unit?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)(`\xA0`+(0,t.toDisplayString)(e.unit),1)],64)):(0,t.createCommentVNode)(``,!0)],2))),128)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(M.value),1)],64))],8,qS)):(0,t.createCommentVNode)(``,!0),p.value?((0,t.openBlock)(),(0,t.createBlock)(VS,{key:2,trigger:`hover`,"custom-threshold-delay":0,"custom-popover-classes":[`text-overflow-tooltip`],"allowed-placements":[`bottom`,`top`,`right`]},{trigger:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`button`,JS,[(0,t.createVNode)(vb,{size:14},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ey))]),_:1})])]),content:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,YS,[f.value?.overflowingCharacters?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,XS,[(0,t.createElementVNode)(`span`,ZS,(0,t.toDisplayString)(e.maxLength+d.value)+` / `+(0,t.toDisplayString)(e.maxLength),1),r[7]||=(0,t.createTextVNode)(` characters `,-1)])):(0,t.createCommentVNode)(``,!0),f.value?.overlowingLines?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,QS,[(0,t.createElementVNode)(`span`,$S,(0,t.toDisplayString)(e.maxLines+u.value)+` / `+(0,t.toDisplayString)(e.maxLines),1),r[8]||=(0,t.createTextVNode)(` lines `,-1)])):(0,t.createCommentVNode)(``,!0),f.value?.lineOverflows?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,eC,[r[9]||=(0,t.createTextVNode)(` Lines are too long: `,-1),(0,t.createElementVNode)(`ul`,null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(f.value.lineOverflows,({index:n,length:r})=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,null,[(0,t.createElementVNode)(`span`,tC,`(`+(0,t.toDisplayString)(n+1)+`)`,1),(0,t.createElementVNode)(`span`,Nie,(0,t.toDisplayString)(r)+` / `+(0,t.toDisplayString)(e.maxLineLength),1)]))),256))])])):(0,t.createCommentVNode)(``,!0)])]),_:1})):(0,t.createCommentVNode)(``,!0),e.clearable&&I.value?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:3,type:`button`,class:`bx-input__clear-btn`,onClick:(0,t.withModifiers)(V,[`stop`]),title:`Clear`,"aria-label":`Clear`},[(0,t.createVNode)(vb,{size:12},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(My))]),_:1})])):(0,t.createCommentVNode)(``,!0)],8,GS)):(0,t.createCommentVNode)(``,!0)],6)],2))}}),[[`__scopeId`,`data-v-6eabee93`]]);function rC(e){return new URLSearchParams(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,String(t)]))).toString()}function Pie(e){let n=(0,t.ref)([]),r=(0,t.ref)(0);async function i(t,i){i=i??n.value.length??0;let a=await(await fetch(`https://api.pexels.com/v1/search?${rC({page:Math.ceil(i/25),query:t,per_page:25})}`,{headers:{Authorization:e}})).json();if(`error`in a)throw Error(a.error);r.value=a.total_results,n.value=[...n.value.slice(0,i),...a.photos]}return{photos:n,total:r,searchPhotos:i}}var Fie=(0,t.defineComponent)({__name:`LazyLoadingItemWrapper`,emits:[`update:visible`],setup(e,{emit:n}){(0,t.ref)();let r=n,i=(0,t.ref)(),a=ea(i);return r(`update:visible`,a.value),(0,t.watch)(a,(e,t)=>{!t&&e&&r(`update:visible`,a.value)}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`item-wrapper`,ref_key:`itemWrapperRef`,ref:i},[(0,t.renderSlot)(e.$slots,`default`)],512))}}),Iie=(0,t.defineComponent)({__name:`LazyLoading`,props:{items:{},total:{},fetch:{type:Function},visibleTriggerOffset:{}},setup(e){(0,t.ref)();let n=e;n.fetch(0);let r=(e,t)=>{t&&e>=n.items.length-n.visibleTriggerOffset-1&&n.total>n.items.length&&n.fetch()};return(n,i)=>((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,(e,i)=>((0,t.openBlock)(),(0,t.createBlock)(Fie,{key:i,class:`item-wrapper`,item:e,index:i,"onUpdate:visible":e=>r(i,e)},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`item`,{item:e,index:i})]),_:2},1032,[`item`,`index`,`onUpdate:visible`]))),128))}}),Lie={class:`bx-empty-icon`},Rie={key:1,viewBox:`0 0 28 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},zie={key:0,class:`bx-empty-description`},Bie={key:1,class:`bx-empty-extra`},iC=W((0,t.defineComponent)({__name:`BxEmpty`,props:{description:{default:`No Data`},size:{default:`medium`}},setup(e){let n=(0,t.useSlots)();return(r,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`bx-empty`,{[`size-${e.size}`]:!0}])},[(0,t.createElementVNode)(`div`,Lie,[n.icon?(0,t.renderSlot)(r.$slots,`icon`,{key:0},void 0,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,Rie,[...i[0]||=[(0,t.createElementVNode)(`path`,{d:`M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM14 7.5C14 3.91015 11.0899 1 7.5 1C3.91015 1 1 3.91015 1 7.5C1 11.0899 3.91015 14 7.5 14C11.0899 14 14 11.0899 14 7.5ZM14 19.5C14 15.9101 11.0899 13 7.5 13C3.91015 13 1 15.9101 1 19.5C1 23.0899 3.91015 26 7.5 26C11.0899 26 14 23.0899 14 19.5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,opacity:`0.4`},null,-1),(0,t.createElementVNode)(`circle`,{cx:`19.5`,cy:`19.5`,r:`6.5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-dasharray":`3 3`,opacity:`0.25`},null,-1)]]))]),e.description||n.description?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,zie,[n.description?(0,t.renderSlot)(r.$slots,`description`,{key:0},void 0,!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(e.description),1)],64))])):(0,t.createCommentVNode)(``,!0),n.default?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Bie,[(0,t.renderSlot)(r.$slots,`default`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)],2))}}),[[`__scopeId`,`data-v-d66bc5e4`]]),Vie={class:`image-library-pexels`},Hie={class:`search-bar-wrapper`},Uie={key:0,class:`photos`},Wie=[`onClick`],Gie=[`src`],Kie={key:0,class:`loading-wrapper`},qie={key:1,class:`loading-wrapper`},Jie=(0,t.defineComponent)({__name:`Pexels`,props:{apiKey:{},width:{},height:{},uploadContext:{},uploadImageAsset:{type:Function}},emits:[`select`],setup(e,{emit:n}){let r=Uv(),i=e,a=n,o=(0,t.ref)(`city`),{searchPhotos:s,photos:c,total:l}=Pie(i.apiKey),u=(0,t.ref)(),d=(0,t.ref)(!1);async function f(){o.value.length>0&&(d.value=!0,l.value=25,c.value=[],await s(o.value),u.value=o.value,d.value=!1)}async function p(e,t){await s(o.value,e)}let m=(0,t.ref)();async function h(e){m.value=e.id;let t=await i.uploadImageAsset({blob:await fetch(r(e.src.original)).then(e=>e.blob()),context:i.uploadContext,width:i.width,height:i.height,key:`pexels-${e.id}`,name:e.id.toString(),onProgress(e){console.log(`upload progress`,e)}});m.value=void 0,a(`select`,t.src)}return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Vie,[(0,t.createElementVNode)(`header`,null,[(0,t.createElementVNode)(`div`,Hie,[(0,t.createVNode)(nC,{modelValue:o.value,"onUpdate:modelValue":n[0]||=e=>o.value=e,round:``,placeholder:`Search...`,size:`medium`,onEnter:f},null,8,[`modelValue`]),(0,t.createVNode)(Jv,{active:``,onClick:f},{default:(0,t.withCtx)(()=>[...n[1]||=[(0,t.createTextVNode)(`Search`,-1)]]),_:1})])]),(0,t.createElementVNode)(`main`,null,[u.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Uie,[(0,t.createVNode)(Iie,{items:(0,t.unref)(c),total:(0,t.unref)(l),fetch:p,"visible-trigger-offset":0},{item:(0,t.withCtx)(({item:e})=>[((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.id,class:`photo-wrapper`,onClick:t=>h(e)},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`preview`,{loading:m.value===e.id}])},[(0,t.createElementVNode)(`img`,{src:(0,t.unref)(r)(e.src.tiny)},null,8,Gie),m.value===e.id?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Kie,[(0,t.createVNode)(Gv)])):(0,t.createCommentVNode)(``,!0)],2)],8,Wie))]),_:1},8,[`items`,`total`])])):d.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,qie,[(0,t.createVNode)(Gv)])):((0,t.openBlock)(),(0,t.createBlock)(iC,{key:2,description:`Search for images on Pexels`},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Rte))]),_:1}))])]))}});function Yie(e,t,n){return e.map(e=>({src:`https://shared-drive.bluepic.io/image?url=${encodeURIComponent(e[`@microsoft.graph.downloadUrl`])}&w=${t}&h=${n}&fit=cover&quality=80&format=png`,key:e.id,width:e.image.width,height:e.image.height,previews:{small:{src:`https://shared-drive.bluepic.io/image?url=${encodeURIComponent(e[`@microsoft.graph.downloadUrl`])}&h=200&fit=cover&quality=80&format=png`,width:e.image.width,height:e.image.height},medium:{src:`https://shared-drive.bluepic.io/image?url=${encodeURIComponent(e[`@microsoft.graph.downloadUrl`])}&h=400&fit=cover&quality=80&format=png`,width:e.image.width,height:e.image.height}}}))}function Xie(e,t,n){return e.map(({thumbnailLink:e,webContentLink:r,sha256Checksum:i,imageMediaMetadata:a})=>({src:`https://shared-drive.bluepic.io/image?url=${encodeURIComponent(r)}&w=${t}&h=${n}&fit=cover&quality=80&format=png`,key:i,width:a?.width??0,height:a?.height??0,previews:{small:{src:`https://shared-drive.bluepic.io/image?url=${encodeURIComponent(e)}&h=200&fit=cover&quality=80&format=png`,width:a?.width??0,height:a?.height??0},medium:{src:`https://shared-drive.bluepic.io/image?url=${encodeURIComponent(e)}&h=400&fit=cover&quality=80&format=png`,width:a?.width??0,height:a?.height??0}}}))}function Zie(e,n,r,i){let a=(0,t.ref)();return{sharedItems:a,fetchSharedDrive:async()=>{if(e===`onedrive`){let e=`https://shared-drive.bluepic.io/onedrive?${rC({sharing:n})}`,t=await(await fetch(e)).json();a.value=Yie(t.children,r,i)}else if(e===`googledrive`){let e=`https://shared-drive.bluepic.io/googledrive?${rC({sharing:n})}`,t=await(await fetch(e)).json();a.value=Xie(t.files,r,i)}}}}var Qie={class:`image-library-shared-drive`},$ie={key:0,class:`photos`},eae=[`onClick`],tae={class:`preview`},nae=[`src`],rae={key:1,class:`loading-wrapper`},iae=W((0,t.defineComponent)({__name:`SharedDrive`,props:{service:{},sharedUrl:{},width:{},height:{}},emits:[`select`],setup(e,{emit:n}){let r=Uv(),i=e,a=n,{fetchSharedDrive:o,sharedItems:s}=Zie(i.service,i.sharedUrl,i.width,i.height);o();function c(e){a(`select`,e.src)}return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Qie,[(0,t.unref)(s)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,$ie,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(s),e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`photo-wrapper`,onClick:t=>c(e)},[(0,t.createElementVNode)(`div`,tae,[(0,t.createElementVNode)(`img`,{src:(0,t.unref)(r)(e.previews.small.src)},null,8,nae)])],8,eae))),256))])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,rae,[(0,t.createVNode)(Gv)]))]))}}),[[`__scopeId`,`data-v-6b7dadc2`]]),aae={class:`image-library-custom`},oae=(0,t.defineComponent)({__name:`Custom`,props:{controller:{},label:{},name:{},props:{}},setup(e){let n=e,r=import(n.controller),i=(0,t.ref)();return r.then(e=>{i.value=new e.default(n.props)}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,aae,`JAJAJA`))}}),sae={class:`image-library-wrapper`},cae={key:0,class:`nav-view-wrapper`},lae={class:`icon-wrapper`},uae={class:`label`},dae={key:1,class:`library-view-wrapper`},aC=W((0,t.defineComponent)({__name:`ImageLibraryWrapper`,props:{options:{},activeKey:{},imageLibraries:{},convertTo:{},quality:{},width:{},height:{},bridge:{},field:{}},emits:[`select`,`update:active-key`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.ref)(r.activeKey);(0,t.watch)(a,()=>{r.activeKey!==a.value&&i(`update:active-key`,a.value)}),(0,t.watch)(()=>r.activeKey,()=>{r.activeKey!==a.value&&(a.value=r.activeKey)});function o(e){a.value=e}let s=(0,t.computed)(()=>r.imageLibraries.find(e=>e.type===`pexels`)?.apiKey),c=(0,t.computed)(()=>r.imageLibraries.find(e=>e.type===`sharedDrive`&&e.service===a.value).sharedUrl),l=(0,t.computed)(()=>r.imageLibraries.find(e=>e.type===a.value)?.label),u=(0,t.computed)(()=>r.imageLibraries.find(e=>e.type===a.value)?.name),d=(0,t.computed)(()=>r.imageLibraries.find(e=>e.type===a.value)?.controller),f=(0,t.computed)(()=>r.imageLibraries.find(e=>e.type===a.value)?.props);function p(e){let t=e[0];t&&m(t.src)}function m(e){i(`select`,e)}return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,sae,[(0,t.createVNode)(t.Transition,{name:`slide-library`},{default:(0,t.withCtx)(()=>[a.value===void 0?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,cae,[(0,t.createElementVNode)(`div`,{class:`image-library-source-navigation`,style:(0,t.normalizeStyle)({"--options-length":e.options.length})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.options,e=>((0,t.openBlock)(),(0,t.createBlock)(Rx,{key:e.key,bordered:!0,onClick:t=>o(e.key)},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,lae,[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.icon)))]),(0,t.createElementVNode)(`div`,uae,(0,t.toDisplayString)(e.label),1)]),_:2},1032,[`onClick`]))),128))],4)])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,dae,[a.value===`upload`?((0,t.openBlock)(),(0,t.createBlock)(Hre,{key:0,width:e.width,height:e.height,"convert-to":e.convertTo,quality:e.quality,field:e.field,"handle-upload":e.bridge.handleUpload,onUpload:p},null,8,[`width`,`height`,`convert-to`,`quality`,`field`,`handle-upload`])):a.value===`pexels`?((0,t.openBlock)(),(0,t.createBlock)(Jie,{key:1,"api-key":s.value,width:e.width,height:e.height,"upload-image-asset":e.bridge.handleUpload,"upload-context":{field:e.field},onSelect:m},null,8,[`api-key`,`width`,`height`,`upload-image-asset`,`upload-context`])):a.value===`googledrive`||a.value===`onedrive`||a.value===`icloud`||a.value===`dropbox`?((0,t.openBlock)(),(0,t.createBlock)(iae,{key:2,service:a.value,"shared-url":c.value,width:e.width,height:e.height,onSelect:m},null,8,[`service`,`shared-url`,`width`,`height`])):a.value===`custom`?((0,t.openBlock)(),(0,t.createBlock)(oae,{key:3,label:l.value??`Custom Library`,name:u.value,controller:d.value,props:f.value},null,8,[`label`,`name`,`controller`,`props`])):(0,t.createCommentVNode)(``,!0)]))]),_:1})]))}}),[[`__scopeId`,`data-v-61c69114`]]),oC=W((0,t.defineComponent)({__name:`BxList`,props:{divider:{type:Boolean,default:!0},bordered:{type:Boolean,default:!1},variant:{default:`plain`}},setup(e){return(0,t.useSlots)(),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`bx-list`,{"has-divider":e.divider&&e.variant===`plain`,bordered:e.bordered,[`variant-${e.variant}`]:!0}])},[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)],2))}}),[[`__scopeId`,`data-v-53785398`]]),fae={class:`bx-list-item__inner`},pae={key:0,class:`bx-list-item__prefix`},mae={class:`bx-list-item__content`},hae={key:1,class:`bx-list-item__suffix`},sC=W((0,t.defineComponent)({__name:`BxListItem`,props:{interactive:{type:Boolean,default:!0}},setup(e){let n=(0,t.useSlots)(),r=(0,t.computed)(()=>!!n.prefix),i=(0,t.computed)(()=>!!n.suffix);return(a,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`bx-list-item`,{"has-prefix":r.value,"has-suffix":i.value,interactive:e.interactive}])},[(0,t.createElementVNode)(`div`,fae,[n.prefix?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,pae,[(0,t.renderSlot)(a.$slots,`prefix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,mae,[(0,t.renderSlot)(a.$slots,`default`,{},void 0,!0)]),n.suffix?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,hae,[(0,t.renderSlot)(a.$slots,`suffix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])],2))}}),[[`__scopeId`,`data-v-1048af22`]]),gae=[`aria-label`],_ae=[`onClick`],vae={class:`icon`},yae={class:`label`},bae={class:`pullup-menu`},xae={class:`icon`},cC=W((0,t.defineComponent)({__name:`BxDropdown`,props:(0,t.mergeModels)({options:{},allowedPlacements:{},mobileLayout:{type:Boolean,default:!1},ariaLabel:{default:`Menu`}},{show:{type:Boolean,required:!1,default:!1},showModifiers:{}}),emits:(0,t.mergeModels)([`select`],[`update:show`]),setup(e,{emit:n}){let r=e,i=n,a=(0,t.useModel)(e,`show`);function o(e){a.value=!1,i(`select`,e.value)}let s=(0,t.useSlots)(),c=h(`bx-dropdown-menu`),{setSlotRef:l,vNodes:u,slotElements:d}=Ix(s.trigger);function f(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),a.value||=!0,v(0))}let p;(0,t.watch)(d,(e,t)=>{for(let e of t??[])e instanceof HTMLElement&&e.removeEventListener(`keydown`,f);p=void 0;let n=e[0];n instanceof HTMLElement&&(n.setAttribute(`aria-haspopup`,`menu`),n.setAttribute(`aria-controls`,c),n.setAttribute(`aria-expanded`,String(a.value)),n.addEventListener(`keydown`,f),p=n)},{immediate:!0});let m=(0,t.ref)(0),g=[];function _(e,t){if(!e){g[t]=void 0;return}let n=e instanceof HTMLElement?e:e.$el;g[t]=n instanceof HTMLElement?n:void 0}function v(e){if(r.options.length===0)return;let n=(e+r.options.length)%r.options.length;m.value=n,(0,t.nextTick)(()=>g[n]?.focus())}function y(e){let t=r.options.length;if(t!==0)switch(e.key){case`ArrowDown`:e.preventDefault(),v(m.value+1);break;case`ArrowUp`:e.preventDefault(),v(m.value-1);break;case`Home`:e.preventDefault(),v(0);break;case`End`:e.preventDefault(),v(t-1);break;case`Enter`:case` `:e.preventDefault(),o(r.options[m.value]),p?.focus();break;case`Escape`:e.preventDefault(),e.stopPropagation(),a.value=!1,p?.focus();break;case`Tab`:a.value=!1}}return(0,t.watch)(a,e=>{p?.setAttribute(`aria-expanded`,String(e)),e&&(m.value=0,(0,t.nextTick)(()=>g[0]?.focus()))}),(0,t.onUnmounted)(()=>{p&&p.removeEventListener(`keydown`,f)}),(n,r)=>e.mobileLayout?((0,t.openBlock)(),(0,t.createBlock)(Lx,{key:0,show:a.value,"onUpdate:show":r[1]||=e=>a.value=e,"disable-background-effect":``,"custom-classes":[`bx-dropdown-mobile-layout-popup`],closeable:!1},{trigger:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(u),(e,n)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e),{key:n,ref_for:!0,ref:(0,t.unref)(l)(n)},null,512))),128))]),content:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`pullup-menu-wrapper`,{}])},[(0,t.createElementVNode)(`div`,{class:`pullup-menu`,role:`menu`,"aria-label":e.ariaLabel},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{type:`button`,role:`menuitem`,class:`select-button`,onClick:t=>o(e)},[(0,t.createElementVNode)(`div`,vae,[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.icon)))]),_:2},1024)]),(0,t.createElementVNode)(`div`,yae,[s.optionLabel?(0,t.renderSlot)(n.$slots,`optionLabel`,{key:0,option:e},void 0,!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],64))])],8,_ae))),256))],8,gae),(0,t.createElementVNode)(`div`,bae,[(0,t.createElementVNode)(`button`,{type:`button`,class:`select-button`,"aria-label":`Close menu`,onClick:r[0]||=e=>a.value=!1},[(0,t.createElementVNode)(`div`,xae,[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(My))]),_:1})]),r[3]||=(0,t.createElementVNode)(`div`,{class:`label`},`Close`,-1)])])])]),_:3},8,[`show`])):((0,t.openBlock)(),(0,t.createBlock)(MS,{key:1,show:a.value,"onUpdate:show":r[2]||=e=>a.value=e,trigger:`click`,"allowed-placements":e.allowedPlacements??[`bottom`,`top`],arrow:!0,"custom-styles":{},"custom-classes":[`dropdown-popover`],"disable-background-effect":``},{trigger:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(u),(e,n)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e),{key:n,ref_for:!0,ref:(0,t.unref)(l)(n)},null,512))),128))]),content:(0,t.withCtx)(()=>[(0,t.createVNode)(oC,{id:(0,t.unref)(c),role:`menu`,"aria-label":e.ariaLabel,onKeydown:y},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(sC,{key:e.value,ref_for:!0,ref:e=>_(e,r),role:`menuitem`,tabindex:r===m.value?0:-1,onClick:t=>o(e)},(0,t.createSlots)({default:(0,t.withCtx)(()=>[s.optionLabel?(0,t.renderSlot)(n.$slots,`optionLabel`,{key:0,option:e},void 0,!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],64))]),_:2},[e.icon?{name:`prefix`,fn:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.icon)))]),_:2},1024)]),key:`0`}:void 0]),1032,[`tabindex`,`onClick`]))),128))]),_:3},8,[`id`,`aria-label`])]),_:3},8,[`show`,`allowed-placements`]))}}),[[`__scopeId`,`data-v-74e3b672`]]);function lC(e){return new Promise(function(t,n){if(typeof e!=`string`&&!(e instanceof Blob)){n({err:`no image source`});return}let r=new Image;typeof e==`string`&&(r.crossOrigin=`anonymous`),r.addEventListener(`load`,e=>{t({width:r.width,height:r.height,ratio:r.height/r.width})}),r.addEventListener(`error`,()=>n({err:`image corrupted`})),r.src=typeof e==`string`?e:URL.createObjectURL(e)})}function uC({height:e,left:t,top:n,width:r},i,a){let o=1/Math.max((r??0)/i,(e??0)/a),s=[Math.min(1,Ti(Math.max(1e-6,t??0)/(i-(r??0)),6)),Math.min(1,Ti(Math.max(1e-6,n??0)/(a-(e??0)),6))];return{scale:o,innerPos:[Math.max(-1,Math.min(1,(s[0]-.5)*2)),Math.max(-1,Math.min(1,(s[1]-.5)*2))]}}function dC(e,t,n,r){let i=e.innerPos[0]/2+.5,a=e.innerPos[1]/2+.5,o=t/n>r?n*r:t,s=t/n>r?n:t/r,c=o/e.scale,l=s/e.scale,u=t-c,d=n-l;return{left:u*i,top:d*a,width:c,height:l}}var fC=Object.defineProperty,pC=(e,t,n)=>t in e?fC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mC=(e,t,n)=>pC(e,typeof t==`symbol`?t:t+``,n);function hC(e){return e*Math.PI/180}function gC(e,t,n){return Math.min(Math.max(e,t),n)}function _C(e,t,n){let[r,i]=e,[a,o]=t;return[Math.cos(n)*(r-a)-Math.sin(n)*(i-o)+a,Math.sin(n)*(r-a)+Math.cos(n)*(i-o)+o]}function vC(e){return e.deltaMode===0}var yC=class extends EventTarget{constructor(e,t,n,r,i,a,o=.1,s=10,c=!1,l=!0){super(),mC(this,`wrapperBounds`,{x:0,y:0,width:100,height:100}),mC(this,`canvasBounds`,{x:0,y:0,width:100,height:100}),mC(this,`translateSpeed`,1),mC(this,`zoomSpeed`,1),mC(this,`translateSpeedAppleTrackpad`,1),mC(this,`zoomSpeedAppleTrackpad`,1),mC(this,`isGestureActive`,!1),mC(this,`roElement`,null),mC(this,`roCanvas`,null),mC(this,`ancestorMotionCleanup`,null),mC(this,`gestureStartRotate`,0),mC(this,`dragStart`,null),mC(this,`dragStartFrozenX`,null),mC(this,`dragStartFrozenY`,null),mC(this,`touchStarts`,null),mC(this,`touchStartTranslateX`,0),mC(this,`touchStartTranslateY`,0),this.element=e,this.offset=t,this.translateX=n,this.translateY=r,this.scale=i,this.rotate=a,this.minScale=o,this.maxScale=s,this.clampBounds=c,this.rotation=l,this.roElement=new ResizeObserver(()=>{let{x:e,y:t,width:n,height:r}=this.element.getBoundingClientRect();this.wrapperBounds={x:e,y:t,width:n,height:r},this.update()}),this.roCanvas=new ResizeObserver(e=>{let{width:t,height:n}=e[0].contentRect;(t!==this.canvasBounds.width||n!==this.canvasBounds.height)&&(this.canvasBounds={...this.canvasBounds,width:t,height:n},this.isGestureActive||this.update())}),requestAnimationFrame(()=>{this.wrapperBounds=this.element.getBoundingClientRect(),this.canvasBounds=this.canvasElement.getBoundingClientRect(),this.update(),this.dispatchEvent(new Event(`init`))}),this.roCanvas.observe(this.canvasElement),this.roElement.observe(this.element),this.installAncestorMotionListeners()}installAncestorMotionListeners(){let e=()=>{let{x:e,y:t,width:n,height:r}=this.element.getBoundingClientRect();e===this.wrapperBounds.x&&t===this.wrapperBounds.y&&n===this.wrapperBounds.width&&r===this.wrapperBounds.height||(this.wrapperBounds={x:e,y:t,width:n,height:r},this.update())},t=e=>!(e instanceof Node)||e===this.element?!1:e.contains(this.element),n=n=>{t(n.target)&&e()},r=[`transitionrun`,`transitionend`,`transitioncancel`,`animationend`,`animationcancel`];for(let e of r)document.addEventListener(e,n,!0);this.ancestorMotionCleanup=()=>{for(let e of r)document.removeEventListener(e,n,!0)}}get canvasElement(){return this.element.querySelector(`.canvas`)}get wrapperInnerX(){return this.wrapperBounds.x+this.offset.left}get wrapperInnerY(){return this.wrapperBounds.y+this.offset.top}get wrapperInnerWidth(){return this.wrapperBounds.width-this.offset.left-this.offset.right}get wrapperInnerHeight(){return this.wrapperBounds.height-this.offset.top-this.offset.bottom}get wrapperInnerRatio(){return this.wrapperInnerWidth/this.wrapperInnerHeight}get canvasNaturalRatio(){return this.canvasBounds.width/this.canvasBounds.height}get naturalScale(){return this.canvasNaturalRatio>=this.wrapperInnerRatio?this.wrapperInnerWidth/this.canvasBounds.width:this.wrapperInnerHeight/this.canvasBounds.height}setTranslateFromUserGesture(e,t){if(this.clampBounds){let n=this.clampTranslate({translateX:e,translateY:t,scale:this.scale,rotate:this.rotate});this.translateX=n.translateX,this.translateY=n.translateY,this.rotate=0}else this.translateX=e,this.translateY=t}handleGesturestart(e){this.gestureStartRotate=this.rotate}handleGesturechange(e){let{clientX:t,clientY:n}=e,r=e.rotation;if(r===0||!this.rotation)return;let i=this.normalizeClientCoords(t,n);this.rotateCanvas(i[0],i[1],this.gestureStartRotate+hC(r))}handleGestureend(e){}handleMousedown(e){e.preventDefault(),this.dragStart=[e.clientX,e.clientY],this.dragStartFrozenX=this.translateX,this.dragStartFrozenY=this.translateY}handleMouseup(e){e.preventDefault(),this.dragStart=null,this.dragStartFrozenX=null,this.dragStartFrozenY=null}handleMousemove(e){if(e.preventDefault(),this.dragStart&&this.dragStartFrozenX!==null&&this.dragStartFrozenY!==null){let t=e.clientX-this.dragStart[0],n=e.clientY-this.dragStart[1],r=this.dragStartFrozenX- -t,i=this.dragStartFrozenY- -n;this.setTranslateFromUserGesture(r,i),this.update()}}handleWheel(e){let{deltaX:t,deltaY:n,ctrlKey:r}=e,i=vC(e);i||(Math.abs(n)>=100&&(n=Math.abs(n)/120*Math.sign(n)),Math.abs(t)>=100&&(t=Math.abs(t)/120*Math.sign(t)));let a=this.scale;if(r){let t=i?.01*this.zoomSpeedAppleTrackpad:.1*this.zoomSpeed,r=1+-n*t,o=a*r;if(o=gC(o,this.minScale,this.maxScale),(o===this.minScale||o===this.maxScale)&&(o===this.minScale&&r<1||o===this.maxScale&&r>1)){e.preventDefault();return}let s=this.relativeWrapperCoordinatesFromClientCoords(e.clientX,e.clientY),[c,l]=this.calcProjectionTranslate(o,s,this.normalizeMatrixCoordinates(e.clientX,e.clientY));this.setTranslateFromUserGesture(c,l),this.scale=o}else{let e=i?1*this.translateSpeedAppleTrackpad:25*this.translateSpeed;this.setTranslateFromUserGesture(this.translateX-t*e,this.translateY-n*e)}this.update(),e.preventDefault()}freezeTouches(e){return Array.from(e).map(e=>{let t=this.clientCoordsToWrapperCoords(e.clientX,e.clientY);return{client:[e.clientX,e.clientY],canvasRel:this.getCanvasCoordsRel(t[0],t[1])}})}handleTouchstart(e){this.touchStarts=this.freezeTouches(e.touches),this.touchStartTranslateX=this.translateX,this.touchStartTranslateY=this.translateY,this.isGestureActive=!0,e.preventDefault()}handleTouchmove(e){e.preventDefault();let t=Array.from(e.touches).map(e=>this.clientCoordsToWrapperCoords(e.clientX,e.clientY));if(this.touchStarts){if(t.length>=2&&this.touchStarts.length>=2){let e=[this.touchStarts[0].canvasRel[0]*this.canvasBounds.width,this.touchStarts[0].canvasRel[1]*this.canvasBounds.height],n=[this.touchStarts[1].canvasRel[0]*this.canvasBounds.width,this.touchStarts[1].canvasRel[1]*this.canvasBounds.height],r=Math.sqrt((e[0]-n[0])**2+(e[1]-n[1])**2),i=gC(Math.sqrt((t[0][0]-t[1][0])**2+(t[0][1]-t[1][1])**2)/this.naturalScale/r,this.minScale,this.maxScale),a=[t[0][0]/this.wrapperInnerWidth,t[0][1]/this.wrapperInnerHeight],o=this.touchStarts[0].canvasRel,[s,c]=this.calcProjectionTranslate(i,a,o,0);if(this.rotation){let r=0,a=0,o=0,l=Math.atan2(n[1]-e[1],n[0]-e[0]);o=Math.atan2(t[1][1]-t[0][1],t[1][0]-t[0][0])-l;let u=(e,t)=>[this.offset.left+this.canvasBounds.width*e*this.naturalScale*i+s,this.offset.top+this.canvasBounds.height*t*this.naturalScale*i+c],d=u(0,0),f=_C(d,u(this.touchStarts[0].canvasRel[0],this.touchStarts[0].canvasRel[1]),o);r=f[0]-d[0],a=f[1]-d[1],this.scale=i,this.rotate=o,this.setTranslateFromUserGesture(s+r,c+a)}else this.scale=i,this.setTranslateFromUserGesture(s,c)}else{let t=e.touches[0].clientX-this.touchStarts[0].client[0],n=e.touches[0].clientY-this.touchStarts[0].client[1],r=this.touchStartTranslateX+t,i=this.touchStartTranslateY+n;this.setTranslateFromUserGesture(r,i)}this.update()}}handleTouchend(e){e.touches.length===0?this.touchStarts=null:(this.touchStarts=this.freezeTouches(e.touches),this.touchStartTranslateX=this.translateX,this.touchStartTranslateY=this.translateY),this.isGestureActive=!1}calcProjectionTranslate(e,t,n,r){let i=this.canvasBounds.width*this.naturalScale,a=this.canvasBounds.height*this.naturalScale,o=_C([n[0]*i*e,n[1]*a*e],[0,0],r??this.rotate),s=t[0]*this.wrapperInnerWidth,c=t[1]*this.wrapperInnerHeight;return[s-o[0],c-o[1]]}applyTransform(e,t,n){let r=this.calcProjectionTranslate(e,t,n,0);this.scale=e,this.setTranslateFromUserGesture(r[0],r[1]),this.update()}composeRelPoint(e,t,n,r,i,a){n??=this.scale,r??=this.translateX,i??=this.translateY,a??=this.rotate;let o=[this.offset.left,this.offset.top],s=_C([this.offset.left+this.canvasBounds.width*(n*this.naturalScale)*e,this.offset.top+this.canvasBounds.height*(n*this.naturalScale)*t],o,a);return[s[0]+r,s[1]+i]}composePoint(e,t){let n=e/this.canvasBounds.width,r=t/this.canvasBounds.height;return this.composeRelPoint(n,r)}getAnchorOffset(e,t,n,r,i=[.5,.5]){let a=this.calcProjectionTranslate(e,i,i,0),o=[this.offset.left+a[0]+this.canvasBounds.width*(e*this.naturalScale)*i[0],this.offset.top+a[1]+this.canvasBounds.height*(e*this.naturalScale)*i[1]],s=this.composeRelPoint(i[0],i[1],e,t,n,r);return[s[0]-o[0],s[1]-o[1]]}getCanvasCoordsRel(e,t){let n=_C([e-this.translateX,t-this.translateY],[0,0],-this.rotate),r=[n[0]/this.renderinScale,n[1]/this.renderinScale];return[r[0]/this.canvasBounds.width,r[1]/this.canvasBounds.height]}clientCoordsToWrapperCoords(e,t){let{x:n,y:r}=this.element.getBoundingClientRect();return[e-n-this.offset.left,t-r-this.offset.top]}relativeWrapperCoordinatesFromClientCoords(e,t){let[n,r]=this.clientCoordsToWrapperCoords(e,t);return[n/this.wrapperInnerWidth,r/this.wrapperInnerHeight]}normalizeMatrixCoordinates(e,t){let n=this.clientCoordsToWrapperCoords(e,t);return this.getCanvasCoordsRel(n[0],n[1])}normalizeClientCoords(e,t){let[n,r]=this.normalizeMatrixCoordinates(e,t);return[n*this.canvasBounds.width,r*this.canvasBounds.height]}rotateCanvas(e,t,n){let r=e/this.canvasBounds.width,i=t/this.canvasBounds.height,a=this.composeRelPoint(r,i,this.scale,0,0,n),o=this.composeRelPoint(r,i);this.setTranslateFromUserGesture(o[0]-a[0],o[1]-a[1]),this.rotate=n,this.update()}get renderinScale(){return this.naturalScale*this.scale}get renderingTranslateX(){return this.offset.left+this.translateX}get renderingTranslateY(){return this.offset.top+this.translateY}get renderingRotate(){return this.rotate}clampTranslate(e,t=[.5,.5]){let n=this.canvasBounds.width*this.naturalScale*e.scale,r=this.canvasBounds.height*this.naturalScale*e.scale,i=n-this.wrapperInnerWidth,a=r-this.wrapperInnerHeight,o=i>0?-i:0,s=Math.min(0,Math.max(e.translateX,o)),c=a>0?-a:0,l=Math.min(0,Math.max(e.translateY,c)),u=-Math.min(0,i)*t[0],d=-Math.min(0,a)*t[1];return{translateX:s+u,translateY:l+d}}update(){this.canvasElement.style.transformOrigin=`top left`,this.canvasElement.style.transform=`translateX(${this.renderingTranslateX}px) translateY(${this.renderingTranslateY}px) scale(${this.renderinScale}) rotate(${this.renderingRotate}rad)`,this.dispatchEvent(new Event(`update`))}destroy(){var e,t,n;(e=this.roElement)==null||e.disconnect(),this.roElement=null,(t=this.roCanvas)==null||t.disconnect(),this.roCanvas=null,(n=this.ancestorMotionCleanup)==null||n.call(this),this.ancestorMotionCleanup=null}},bC={class:`canvas`},xC={class:`matrix`},SC=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})((0,t.defineComponent)({__name:`Zoompinch`,props:{transform:{default:()=>({translateX:0,translateY:0,scale:1,rotate:0})},offset:{default:()=>({left:0,top:0,right:0,bottom:0})},maxScale:{default:10},minScale:{default:.5},clampBounds:{type:Boolean,default:!1},rotation:{type:Boolean,default:!0},mouse:{type:Boolean,default:!0},wheel:{type:Boolean,default:!0},touch:{type:Boolean,default:!0},gesture:{type:Boolean,default:!0},zoomSpeed:{},translateSpeed:{},zoomSpeedAppleTrackpad:{},translateSpeedAppleTrackpad:{}},emits:[`update:transform`,`init`,`dragGestureStart`,`dragGestureEnd`],setup(e,{expose:n,emit:r}){let i=e,a=r,o=(0,t.ref)(),s=(0,t.ref)(),c=(0,t.ref)(!1);window.zoompinchEngine=s;let l=(0,t.ref)(()=>{throw Error(`Not initialized yet`)}),u=(0,t.ref)(0),d=(0,t.ref)(0);(0,t.onMounted)(()=>{o.value&&(s.value=new yC(o.value,i.offset,i.transform.translateX,i.transform.translateY,i.transform.scale,i.transform.rotate,i.minScale,i.maxScale,i.clampBounds,i.rotation),i.zoomSpeed!==void 0&&(s.value.zoomSpeed=i.zoomSpeed),i.translateSpeed!==void 0&&(s.value.translateSpeed=i.translateSpeed),i.zoomSpeedAppleTrackpad!==void 0&&(s.value.zoomSpeedAppleTrackpad=i.zoomSpeedAppleTrackpad),i.translateSpeedAppleTrackpad!==void 0&&(s.value.translateSpeedAppleTrackpad=i.translateSpeedAppleTrackpad),s.value.addEventListener(`init`,()=>{a(`init`)}),s.value.addEventListener(`update`,()=>{if(!s.value)return;let e={translateX:s.value.translateX,translateY:s.value.translateY,scale:s.value.scale,rotate:s.value.rotate};(e.translateX!==i.transform.translateX||e.translateY!==i.transform.translateY||e.scale!==i.transform.scale||e.rotate!==i.transform.rotate)&&a(`update:transform`,e),l.value=(e,t)=>s.value.composePoint(e,t),u.value=s.value.canvasBounds.width,d.value=s.value.canvasBounds.height}),s.value.addEventListener(`init`,()=>{c.value=!0}))}),(0,t.watch)(()=>i.transform,()=>{s.value&&(s.value.translateX!==i.transform.translateX||s.value.translateY!==i.transform.translateY||s.value.scale!==i.transform.scale||s.value.rotate!==i.transform.rotate)&&(s.value.translateX=i.transform.translateX,s.value.translateY=i.transform.translateY,s.value.scale=i.transform.scale,s.value.rotate=i.transform.rotate,s.value.update())},{deep:!0}),(0,t.watch)(()=>i.offset,e=>{s.value&&(s.value.offset=e,s.value.update())},{deep:!0}),(0,t.watch)(()=>i.minScale,e=>{s.value&&(s.value.minScale=e,s.value.update())}),(0,t.watch)(()=>i.maxScale,e=>{s.value&&(s.value.maxScale=e,s.value.update())}),(0,t.watch)(()=>i.clampBounds,e=>{s.value&&(s.value.clampBounds=e,s.value.setTranslateFromUserGesture(s.value.translateX,s.value.translateY),s.value.update())}),(0,t.watch)(()=>i.rotation,e=>{s.value&&(s.value.rotation=e,s.value.update())}),(0,t.watch)(()=>i.zoomSpeed,()=>{!s.value||i.zoomSpeed===void 0||(s.value.zoomSpeed=i.zoomSpeed)}),(0,t.watch)(()=>i.translateSpeed,()=>{!s.value||i.translateSpeed===void 0||(s.value.translateSpeed=i.translateSpeed)}),(0,t.watch)(()=>i.zoomSpeedAppleTrackpad,()=>{!s.value||i.zoomSpeedAppleTrackpad===void 0||(s.value.zoomSpeedAppleTrackpad=i.zoomSpeedAppleTrackpad)}),(0,t.watch)(()=>i.translateSpeedAppleTrackpad,()=>{!s.value||i.translateSpeedAppleTrackpad===void 0||(s.value.translateSpeedAppleTrackpad=i.translateSpeedAppleTrackpad)});let f=(e,t,n,r)=>{s.value&&(r!==void 0&&(s.value.rotate=r),s.value.applyTransform(e,t,n))},p=e=>{s.value&&i.wheel&&s.value.handleWheel(e)},m=e=>{s.value&&i.gesture&&s.value.handleGesturestart(e)},h=e=>{s.value&&i.gesture&&s.value.handleGesturechange(e)},g=e=>{s.value&&i.gesture&&s.value.handleGestureend(e)},_=e=>{s.value&&i.mouse&&s.value.handleMousedown(e)},v=e=>{s.value&&i.mouse&&s.value.handleMousemove(e)},y=e=>{s.value&&i.mouse&&s.value.handleMouseup(e)},b=e=>{s.value&&i.touch&&s.value.handleTouchstart(e)},x=e=>{s.value&&i.touch&&s.value.handleTouchmove(e)},S=e=>{s.value&&i.touch&&s.value.handleTouchend(e)};window.addEventListener(`gesturechange`,h),window.addEventListener(`gestureend`,g),window.addEventListener(`mousemove`,v),window.addEventListener(`mouseup`,y),window.addEventListener(`touchmove`,x),window.addEventListener(`touchend`,S),(0,t.onUnmounted)(()=>{window.removeEventListener(`gesturechange`,h),window.removeEventListener(`gestureend`,g),window.removeEventListener(`mousemove`,v),window.removeEventListener(`mouseup`,y),window.removeEventListener(`touchmove`,x),window.removeEventListener(`touchend`,S)});let C=(e,t)=>{if(!s.value)throw Error(`Zoompinch engine not initialized`);return s.value.normalizeClientCoords(e,t)};return(0,t.useSlots)(),n({applyTransform:f,composePoint:l,normalizeClientCoords:C,zoompinchEngine:s,canvasWidth:u,canvasHeight:d,rotateCanvas:(e,t,n)=>{s.value&&s.value.rotateCanvas(e,t,n)}}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`zoompinchRef`,ref:o,class:`zoompinch`,onWheel:p,onGesturestart:m,onMousedown:_,onTouchstart:b},[(0,t.createElementVNode)(`div`,bC,[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)]),(0,t.createElementVNode)(`div`,xC,[c.value&&l.value?(0,t.renderSlot)(e.$slots,`matrix`,{key:0,composePoint:l.value,normalizeClientCoords:C,canvasWidth:u.value,canvasHeight:d.value},void 0,!0):(0,t.createCommentVNode)(``,!0)])],544))}}),[[`__scopeId`,`data-v-fbdbcf7c`]]),CC=new Set;requestAnimationFrame(function e(){CC.forEach(e=>e()),requestAnimationFrame(e)});function wC(e,t,n){let r,i=()=>{let n=e instanceof Function?e():e.value,i=r;n!==r&&(r=n,t(n,i))};return CC.add(i),n?.immediate&&i(),()=>{CC.delete(i)}}function TC(e,t){let n=null,r=this;return()=>{clearTimeout(n);var i=arguments;n=setTimeout(()=>{e.apply(r,i)},t)}}var EC=[`x`,`y`,`width`,`height`],DC=[`cx`,`cy`,`r`],OC=[`cx`,`cy`,`r`],kC=[`cx`,`cy`,`r`],AC=[`cx`,`cy`,`r`],jC=[`cx`,`cy`,`r`],MC=[`cx`,`cy`,`r`],NC=[`cx`,`cy`,`r`],PC=[`cx`,`cy`,`r`],FC=[`cx`,`cy`,`r`],IC=[`cx`,`cy`,`r`],LC=[`cx`,`cy`,`r`],RC=[`cx`,`cy`,`r`],zC=[`cx`,`cy`,`r`],BC=[`cx`,`cy`,`r`],VC=[`cx`,`cy`,`r`],HC=[`cx`,`cy`,`r`],UC=W((0,t.defineComponent)({__name:`CropSkeleton`,props:{x:{},y:{},width:{},height:{},aspectRatio:{},clamp:{}},emits:[`update`,`effectiveHandleChange`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.ref)(5),o=(0,t.computed)(()=>{let e=Math.min(r.width,r.height);return e>=a.value*8?a.value*4:Math.max(e/2,a.value)}),s=(0,t.computed)(()=>({x:r.x,y:r.y})),c=(0,t.computed)(()=>({x:r.x+r.width,y:r.y})),l=(0,t.computed)(()=>({x:r.x+r.width,y:r.y+r.height})),u=(0,t.computed)(()=>({x:r.x,y:r.y+r.height})),d=(0,t.computed)(()=>({x:r.x+r.width/2,y:r.y})),f=(0,t.computed)(()=>({x:r.x+r.width,y:r.y+r.height/2})),p=(0,t.computed)(()=>({x:r.x+r.width/2,y:r.y+r.height})),m=(0,t.computed)(()=>({x:r.x,y:r.y+r.height/2})),h=(0,t.computed)(()=>r.width>a.value*4&&r.height>a.value*4),g=(0,t.ref)(null),_=(0,t.ref)(null),v=(0,t.ref)(null),y=(0,t.ref)(null),b=(0,t.ref)(null),x=(0,t.ref)(null),S=(0,t.ref)(null);(0,t.watch)(x,e=>{i(`effectiveHandleChange`,e)});function C(e,t){console.log(`handleThumbMouseDown`,e,t),b.value=t,x.value=t,S.value=null,v.value={x:r.x,y:r.y,width:r.width,height:r.height},y.value={x:e.clientX,y:e.clientY},e.preventDefault(),e.stopPropagation()}function w(e,t){console.log(`handleThumbTouchstart`,e,t);let n=e.touches[0];b.value=t,x.value=t,S.value=null,v.value={x:r.x,y:r.y,width:r.width,height:r.height},y.value={x:n.clientX,y:n.clientY},e.preventDefault(),e.stopPropagation()}let T=()=>{b.value=null,x.value=null,S.value=null,v.value=null,y.value=null,g.value=null,_.value=null},E=()=>{b.value=null,x.value=null,S.value=null,v.value=null,y.value=null,g.value=null,_.value=null},D=e=>{if(g.value){if(!v.value)return;let t=e.clientX-g.value.x,n=e.clientY-g.value.y;_.value={x:v.value.x+t,y:v.value.y+n,width:v.value.width,height:v.value.height}}else b.value&&(S.value={x:e.clientX,y:e.clientY})},O=e=>{let t=e.touches[0];if(g.value){if(!v.value)return;let e=t.clientX-g.value.x,n=t.clientY-g.value.y;_.value={x:v.value.x+e,y:v.value.y+n,width:v.value.width,height:v.value.height}}else b.value&&(S.value={x:t.clientX,y:t.clientY})};function k(e){g.value={x:e.clientX,y:e.clientY},y.value={x:e.clientX,y:e.clientY},v.value={x:r.x,y:r.y,width:r.width,height:r.height},e.preventDefault(),e.stopPropagation()}function A(e){let t=e.touches[0];g.value={x:t.clientX,y:t.clientY},y.value={x:t.clientX,y:t.clientY},v.value={x:r.x,y:r.y,width:r.width,height:r.height},e.preventDefault(),e.stopPropagation()}function j(e){let t=r.clamp?.x??-1/0,n=r.clamp?.y??-1/0,i=r.clamp?r.clamp.x+r.clamp.width:1/0,a=r.clamp?r.clamp.y+r.clamp.height:1/0;return{x:Math.min(Math.max(e.x,t),i-e.width),y:Math.min(Math.max(e.y,n),a-e.height),width:e.width,height:e.height}}function M(e){let t=e.shiftKey?10:4,n=0,a=0;switch(e.key){case`ArrowLeft`:n=-t;break;case`ArrowRight`:n=t;break;case`ArrowUp`:a=-t;break;case`ArrowDown`:a=t;break;default:return}e.preventDefault();let o={x:r.x,y:r.y,width:r.width,height:r.height};if(e.shiftKey){if(r.aspectRatio!=null){let n=e.key===`ArrowRight`||e.key===`ArrowDown`?t:-t,{bbox:a}=P(`br`,o,n,n,r.aspectRatio,r.clamp);i(`update`,a)}else{let{bbox:e}=P(`br`,o,n,a,void 0,r.clamp);i(`update`,e)}}else i(`update`,j({...o,x:o.x+n,y:o.y+a}))}function N(e,t,n){let r={tl:`tr`,tr:`tl`,bl:`br`,br:`bl`,l:`r`,r:`l`},i={tl:`bl`,bl:`tl`,tr:`br`,br:`tr`,t:`b`,b:`t`},a=e;return t&&(a=r[a]??a),n&&(a=i[a]??a),a}function P(e,t,n,r,i,a){let o=t.x,s=t.y,c=t.x+t.width,l=t.y+t.height;switch(e){case`tl`:o+=n,s+=r;break;case`t`:s+=r;break;case`tr`:c+=n,s+=r;break;case`r`:c+=n;break;case`br`:c+=n,l+=r;break;case`b`:l+=r;break;case`bl`:o+=n,l+=r;break;case`l`:o+=n}let u=N(e,o>c,s>l),d=a?.x??-1/0,f=a?.y??-1/0,p=a?a.x+a.width:1/0,m=a?a.y+a.height:1/0;if(i!=null){if(e===`tl`||e===`tr`||e===`bl`||e===`br`){let t=e===`tl`||e===`bl`?c:o,n=e===`tl`||e===`tr`?l:s,r=e===`tl`||e===`bl`?o:c,u=e===`tl`||e===`tr`?s:l,h=r>=t,g=u>=n,_=Math.max(Math.abs(r-t),1),v=Math.max(Math.abs(u-n),1);if(_/v>i?_=v*i:v=_/i,a){let e=h?p-t:t-d,r=g?m-n:n-f;(_>e||v>r)&&(e/r>i?(v=Math.min(v,r),_=v*i):(_=Math.min(_,e),v=_/i))}h?(o=t,c=t+_):(c=t,o=t-_),g?(s=n,l=n+v):(l=n,s=n-v)}else if(e===`r`||e===`l`){let n=e===`r`?t.x:t.x+t.width,r=e===`r`?c:o,u=t.y+t.height/2,h=r>=n,g=Math.max(Math.abs(r-n),1);if(a){let e=h?p-n:n-d,t=Math.min(u-f,m-u)*2;g=Math.max(Math.min(g,e,t*i),1)}let _=g/i;h?(o=n,c=n+g):(c=n,o=n-g),s=u-_/2,l=u+_/2}else{let n=e===`b`?t.y:t.y+t.height,r=e===`b`?l:s,u=t.x+t.width/2,h=r>=n,g=Math.max(Math.abs(r-n),1);if(a){let e=h?m-n:n-f,t=Math.min(u-d,p-u)*2;g=Math.max(Math.min(g,e,t/i),1)}let _=g*i;h?(s=n,l=n+g):(l=n,s=n-g),o=u-_/2,c=u+_/2}}else{let e=Math.min(o,c),t=Math.min(s,l),n=Math.max(o,c),r=Math.max(s,l);o=e,s=t,c=n,l=r,a&&(o=Math.max(o,d),s=Math.max(s,f),c=Math.min(c,p),l=Math.min(l,m))}return{bbox:{x:o,y:s,width:c-o,height:l-s},effectiveHandle:u}}return wC(_,()=>{if(_.value){let e=r.clamp?.x??-1/0,t=r.clamp?.y??-1/0,n=r.clamp?r.clamp.x+r.clamp.width:1/0,a=r.clamp?r.clamp.y+r.clamp.height:1/0;_.value.x<e&&(_.value.x=e),_.value.y<t&&(_.value.y=t),_.value.x+_.value.width>n&&(_.value.x=n-_.value.width),_.value.y+_.value.height>a&&(_.value.y=a-_.value.height),i(`update`,_.value)}}),wC(S,()=>{if(!b.value||!S.value||!y.value||!v.value)return;let e=S.value.x-y.value.x,t=S.value.y-y.value.y,{bbox:n,effectiveHandle:a}=P(b.value,v.value,e,t,r.aspectRatio,r.clamp);x.value=a,i(`update`,n)}),window.addEventListener(`mouseup`,T),window.addEventListener(`touchend`,E),window.addEventListener(`mousemove`,D),window.addEventListener(`touchmove`,O),(0,t.onUnmounted)(()=>{window.removeEventListener(`mouseup`,T),window.removeEventListener(`touchend`,E),window.removeEventListener(`mousemove`,D),window.removeEventListener(`touchmove`,O)}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`g`,null,[(0,t.createElementVNode)(`rect`,{x:e.x,y:e.y,width:e.width,height:e.height,class:`skeleton-rect`,tabindex:`0`,role:`application`,"aria-roledescription":`Crop area`,"aria-label":`Crop area. Use arrow keys to move, Shift plus arrow keys to resize.`,onMousedown:k,onTouchstart:A,onKeydown:M},null,40,EC),(0,t.createElementVNode)(`g`,{class:(0,t.normalizeClass)({inactive:!h.value})},[(0,t.createElementVNode)(`g`,null,[(0,t.createElementVNode)(`circle`,{cx:d.value.x,cy:d.value.y,r:o.value,class:`thumb-circle-hitbox thumb-circle-hitbox-t`,onMousedown:r[0]||=e=>C(e,`t`),onTouchstart:r[1]||=e=>w(e,`t`)},null,40,DC),(0,t.createElementVNode)(`circle`,{cx:d.value.x,cy:d.value.y,r:a.value,class:(0,t.normalizeClass)([`thumb-circle`,{pressing:x.value===`t`}])},null,10,OC)]),(0,t.createElementVNode)(`g`,null,[(0,t.createElementVNode)(`circle`,{cx:f.value.x,cy:f.value.y,r:o.value,class:`thumb-circle-hitbox thumb-circle-hitbox-r`,onMousedown:r[2]||=e=>C(e,`r`),onTouchstart:r[3]||=e=>w(e,`r`)},null,40,kC),(0,t.createElementVNode)(`circle`,{cx:f.value.x,cy:f.value.y,r:a.value,class:(0,t.normalizeClass)([`thumb-circle`,{pressing:x.value===`r`}])},null,10,AC)]),(0,t.createElementVNode)(`g`,null,[(0,t.createElementVNode)(`circle`,{cx:p.value.x,cy:p.value.y,r:o.value,class:`thumb-circle-hitbox thumb-circle-hitbox-b`,onMousedown:r[4]||=e=>C(e,`b`),onTouchstart:r[5]||=e=>w(e,`b`)},null,40,jC),(0,t.createElementVNode)(`circle`,{cx:p.value.x,cy:p.value.y,r:a.value,class:(0,t.normalizeClass)([`thumb-circle`,{pressing:x.value===`b`}])},null,10,MC)]),(0,t.createElementVNode)(`g`,null,[(0,t.createElementVNode)(`circle`,{cx:m.value.x,cy:m.value.y,r:o.value,class:`thumb-circle-hitbox thumb-circle-hitbox-l`,onMousedown:r[6]||=e=>C(e,`l`),onTouchstart:r[7]||=e=>w(e,`l`)},null,40,NC),(0,t.createElementVNode)(`circle`,{cx:m.value.x,cy:m.value.y,r:a.value,class:(0,t.normalizeClass)([`thumb-circle`,{pressing:x.value===`l`}])},null,10,PC)])],2),(0,t.createElementVNode)(`g`,null,[(0,t.createElementVNode)(`g`,null,[(0,t.createElementVNode)(`circle`,{cx:s.value.x,cy:s.value.y,r:o.value,class:`thumb-circle-hitbox thumb-circle-hitbox-tl`,onMousedown:r[8]||=e=>C(e,`tl`),onTouchstart:r[9]||=e=>w(e,`tl`)},null,40,FC),(0,t.createElementVNode)(`circle`,{cx:s.value.x,cy:s.value.y,r:a.value,class:(0,t.normalizeClass)([`thumb-circle`,{pressing:x.value===`tl`}])},null,10,IC)]),(0,t.createElementVNode)(`g`,null,[(0,t.createElementVNode)(`circle`,{cx:c.value.x,cy:c.value.y,r:o.value,class:`thumb-circle-hitbox thumb-circle-hitbox-tr`,onMousedown:r[10]||=e=>C(e,`tr`),onTouchstart:r[11]||=e=>w(e,`tr`)},null,40,LC),(0,t.createElementVNode)(`circle`,{cx:c.value.x,cy:c.value.y,r:a.value,class:(0,t.normalizeClass)([`thumb-circle`,{pressing:x.value===`tr`}])},null,10,RC)]),(0,t.createElementVNode)(`g`,null,[(0,t.createElementVNode)(`circle`,{cx:u.value.x,cy:u.value.y,r:o.value,class:`thumb-circle-hitbox thumb-circle-hitbox-bl`,onMousedown:r[12]||=e=>C(e,`bl`),onTouchstart:r[13]||=e=>w(e,`bl`)},null,40,zC),(0,t.createElementVNode)(`circle`,{cx:u.value.x,cy:u.value.y,r:a.value,class:(0,t.normalizeClass)([`thumb-circle`,{pressing:x.value===`bl`}])},null,10,BC)]),(0,t.createElementVNode)(`g`,null,[(0,t.createElementVNode)(`circle`,{cx:l.value.x,cy:l.value.y,r:o.value,class:`thumb-circle-hitbox thumb-circle-hitbox-br`,onMousedown:r[14]||=e=>C(e,`br`),onTouchstart:r[15]||=e=>w(e,`br`)},null,40,VC),(0,t.createElementVNode)(`circle`,{cx:l.value.x,cy:l.value.y,r:a.value,class:(0,t.normalizeClass)([`thumb-circle`,{pressing:x.value===`br`}])},null,10,HC)])])]))}}),[[`__scopeId`,`data-v-ab8c8451`]]);function WC(e,t,n){return Math.min(Math.max(e,t),n)}function GC(e,t){let n=WC(e.x,t.x,t.x+t.width),r=WC(e.y,t.y,t.y+t.height),i=WC(e.x+e.width,t.x,t.x+t.width),a=WC(e.y+e.height,t.y,t.y+t.height);return{x:n,y:r,width:i-n,height:a-r}}function KC(e,t,n){if(n==null)return GC(e,t);let r=e.width,i=e.height;return r>t.width&&(r=t.width,i=r/n),i>t.height&&(i=t.height,r=i*n),{x:WC(e.x,t.x,t.x+t.width-r),y:WC(e.y,t.y,t.y+t.height-i),width:r,height:i}}function qC(e){return new Promise((t,n)=>{if(e.complete&&e.naturalWidth!==0){console.log(`[0] getBoundingClientRect`,e.getBoundingClientRect()),t();return}let r=()=>{e.naturalWidth*e.naturalHeight>0&&(console.log(`[1] getBoundingClientRect`,e.getBoundingClientRect()),setTimeout(()=>{console.log(`[2] getBoundingClientRect`,e.getBoundingClientRect()),t()}),CC.delete(r))};CC.add(r),e.addEventListener(`error`,()=>n(Error(`Failed to load image`)),{once:!0})})}var JC={class:`bx-cropper`},YC={xmlns:`http://www.w3.org/2000/svg`,width:`100%`,height:`100%`,class:`matrix-svg`},XC={key:0,class:`layer loading-layer`},ZC={class:`layer`},QC=W((0,t.defineComponent)({__name:`BxCropper`,props:{crop:{},aspectRatio:{},offset:{default:()=>({top:10,right:10,bottom:10,left:10})},mirrorX:{type:Boolean,default:!1},mirrorY:{type:Boolean,default:!1}},emits:[`update:crop`],setup(e,{emit:n}){let r=e,i=n;(0,t.useSlots)();let a=(0,t.ref)(),o=(0,t.ref)({translateX:0,translateY:0,scale:1,rotate:0}),s=(0,t.ref)(),c=(0,t.ref)();function l(e){let{left:t,top:n,width:i,height:o}=e;return r.mirrorX&&a.value&&(t=a.value.canvasWidth-t-i),r.mirrorY&&a.value&&(n=a.value.canvasHeight-n-o),{left:t,top:n,width:i,height:o}}function u(e){if(!a.value)throw Error(`Zoompinch ref not available`);let t=l(e),[n,r]=a.value.composePoint(t.left,t.top),[i,o]=a.value.composePoint(t.left+t.width,t.top+t.height);return{x:n,y:r,width:i-n,height:o-r}}function d(e){if(!a.value||!a.value.zoompinchEngine)throw Error(`Zoompinch ref or engine not available`);let{x:t,y:n}=a.value.zoompinchEngine.element.getBoundingClientRect(),r=e.x+t,i=e.y+n,[o,s]=a.value.normalizeClientCoords(r,i),[c,l]=a.value.normalizeClientCoords(r+e.width,i+e.height),u=c-o,d=l-s;return{left:Math.round(o),top:Math.round(s),width:Math.round(u),height:Math.round(d)}}let f=(0,t.ref)(!1);async function p(){if(!a.value?.zoompinchEngine)return;let e=Array.from(a.value.zoompinchEngine.canvasElement.children);for(let t of e)t.tagName===`IMG`&&await qC(t);f.value=!0,a.value.applyTransform(1,[.5,.5],[.5,.5]);let t=r.crop??(()=>{let e=a.value.canvasWidth,t=a.value.canvasHeight,n=e/t;if(r.aspectRatio){let i=n>r.aspectRatio?t*r.aspectRatio:e,a=n>r.aspectRatio?t:e/r.aspectRatio;return{left:(e-i)/2,top:(t-a)/2,width:i,height:a}}return{left:0,top:0,width:e,height:t}})();c.value=t,s.value=u(t)}let m=(0,t.ref)(null);window.test=()=>d(s.value);let h=(0,t.computed)(()=>{if(o.value,!a.value)throw Error(`Zoompinch ref not available`);return u({left:0,top:0,width:a.value.canvasWidth,height:a.value.canvasHeight})});function g(e){s.value=e}return(0,t.watch)(o,()=>{s.value&&a.value&&(s.value=KC(s.value,h.value,r.aspectRatio))}),(0,t.watch)(s,e=>{if(!e)return;let t=l(d(e));c.value=t,i(`update:crop`,t)}),(0,t.watch)([()=>r.mirrorX,()=>r.mirrorY],()=>{f.value&&c.value&&a.value&&(s.value=u(c.value))}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,JC,[(0,t.createVNode)((0,t.unref)(SC),{ref_key:`zoompinchRef`,ref:a,transform:o.value,"onUpdate:transform":r[1]||=e=>o.value=e,rotation:!1,"min-scale":1,offset:e.offset,"clamp-bounds":``,onInit:p,class:(0,t.normalizeClass)({[`effective-handle-${m.value}`]:m.value!==null})},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),matrix:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,YC,[s.value?((0,t.openBlock)(),(0,t.createBlock)(UC,(0,t.mergeProps)({key:0},s.value,{"aspect-ratio":e.aspectRatio,clamp:h.value,onUpdate:g,onEffectiveHandleChange:r[0]||=e=>m.value=e}),null,16,[`aspect-ratio`,`clamp`])):(0,t.createCommentVNode)(``,!0)])),f.value?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,XC,[(0,t.createVNode)(Gv)])),(0,t.createElementVNode)(`div`,ZC,[(0,t.renderSlot)(n.$slots,`layer`,{},void 0,!0)])]),_:3},8,[`transform`,`offset`,`class`])]))}}),[[`__scopeId`,`data-v-ea4b0863`]]),$C={class:`bx-image-cropper`},ew=[`src`],tw={class:`actions-left`},nw={class:`actions-right`},rw=W((0,t.defineComponent)({__name:`BxImageCropper`,props:(0,t.mergeModels)({src:{},aspectRatio:{},offset:{}},{crop:{required:!1},cropModifiers:{},mirrorX:{type:Boolean,required:!1,default:!1},mirrorXModifiers:{},mirrorY:{type:Boolean,required:!1,default:!1},mirrorYModifiers:{}}),emits:(0,t.mergeModels)([`cancel`,`done`],[`update:crop`,`update:mirrorX`,`update:mirrorY`]),setup(e,{emit:n}){let r=(0,t.useModel)(e,`crop`),i=(0,t.useModel)(e,`mirrorX`),a=(0,t.useModel)(e,`mirrorY`),o=n;function s(){i.value=!i.value}function c(){a.value=!a.value}return(n,l)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,$C,[(0,t.createVNode)(QC,{"aspect-ratio":e.aspectRatio,crop:r.value,"onUpdate:crop":l[4]||=e=>r.value=e,offset:e.offset,"mirror-x":i.value,"mirror-y":a.value},{layer:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,{class:`actions-wrapper`,onTouchstart:l[2]||=(0,t.withModifiers)(()=>{},[`stop`]),onTouchend:l[3]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createElementVNode)(`div`,tw,[(0,t.createVNode)(Jv,{onClick:s,class:(0,t.normalizeClass)({active:!0}),"aria-label":`Mirror horizontally`},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[...l[5]||=[(0,t.createElementVNode)(`svg`,{fill:`none`,viewBox:`0 0 24 24`,"data-fpl-icon-size":`24`},[(0,t.createElementVNode)(`g`,{style:{"transform-origin":`center center`,transform:`scale(1.5)`}},[(0,t.createElementVNode)(`path`,{style:{fill:`currentColor`,"fill-rule":`evenodd`},d:`M12.5 6.5a.5.5 0 0 0-1 0v11a.5.5 0 0 0 1 0zM6 9.104a.75.75 0 0 1 1.28-.53L10 11.292a1 1 0 0 1 0 1.414l-2.72 2.72a.75.75 0 0 1-1.28-.53zm1 .603v4.586L9.293 12zm11-.603a.75.75 0 0 0-1.28-.53L14 11.292a1 1 0 0 0 0 1.414l2.72 2.72a.75.75 0 0 0 1.28-.53zm-1 .603v4.586L14.707 12z`,"clip-rule":`evenodd`})])],-1)]]),_:1})]),_:1}),(0,t.createVNode)(Jv,{onClick:c,class:(0,t.normalizeClass)({active:!0}),"aria-label":`Mirror vertically`},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[...l[6]||=[(0,t.createElementVNode)(`svg`,{fill:`none`,viewBox:`0 0 24 24`,"data-fpl-icon-size":`24`},[(0,t.createElementVNode)(`g`,{style:{"transform-origin":`center center`,transform:`scale(1.5)`}},[(0,t.createElementVNode)(`path`,{style:{fill:`currentColor`,"fill-rule":`evenodd`},d:`M17.5 12.5a.5.5 0 0 0 0-1h-11a.5.5 0 0 0 0 1zM14.896 18a.75.75 0 0 0 .53-1.28L12.708 14a1 1 0 0 0-1.414 0l-2.72 2.72a.75.75 0 0 0 .53 1.28zm-.603-1H9.707L12 14.707zm.603-11a.75.75 0 0 1 .53 1.28L12.708 10a1 1 0 0 1-1.414 0l-2.72-2.72A.75.75 0 0 1 9.103 6zm-.603 1H9.707L12 9.293z`,"clip-rule":`evenodd`})])],-1)]]),_:1})]),_:1})]),(0,t.createElementVNode)(`div`,nw,[(0,t.createVNode)(Jv,{secondary:``,onClick:l[0]||=e=>o(`cancel`)},{default:(0,t.withCtx)(()=>[...l[7]||=[(0,t.createTextVNode)(` Cancel `,-1)]]),_:1}),(0,t.createVNode)(Jv,{active:``,onClick:l[1]||=e=>o(`done`)},{default:(0,t.withCtx)(()=>[...l[8]||=[(0,t.createTextVNode)(` Done `,-1)]]),_:1})])],32)]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`img`,{src:e.src,crossorigin:`anonymous`,class:(0,t.normalizeClass)([`image`,{"mirror-x":i.value,"mirror-y":a.value}])},null,10,ew)]),_:1},8,[`aspect-ratio`,`crop`,`offset`,`mirror-x`,`mirror-y`])]))}}),[[`__scopeId`,`data-v-900cee50`]]),iw=.6,aw=.4,ow=(e,t,n)=>Math.min(n,Math.max(t,e));function sw(e){let{faces:t,natural:n,aspectRatio:r,cropMode:i,zoom:a=!1}=e;if(i!==`cover`||!Number.isFinite(r)||r<=0||!(n.width>0)||!(n.height>0))return null;let o=t.filter(e=>e.score>=.6&&e.width>0&&e.height>0);if(o.length===0)return null;let s=Math.min(...o.map(e=>e.x)),c=Math.min(...o.map(e=>e.y)),l=Math.max(...o.map(e=>e.x+e.width)),u=Math.max(...o.map(e=>e.y+e.height)),d=(s+l)/2,f=(c+u)/2,p=n.width/n.height,m=p>r?n.height*r:n.width,h=p>r?n.height:n.width/r,g=m,_=h;if(a){let e=(l-s)*2.2,t=(u-c)*2.2,n=Math.max(e,t*r),i=n/r;g=Math.min(m,n),_=Math.min(h,i)}let v=d-g/2,y=f-_*aw,b={left:ow(v,0,Math.max(0,n.width-g)),top:ow(y,0,Math.max(0,n.height-_)),width:g,height:_};return b.left===0&&b.top===0&&Math.abs(b.width-n.width)<.5&&Math.abs(b.height-n.height)<.5?null:b}var cw=null;function lw(e){cw=e}function uw(){return cw!==null}async function dw(e){if(!cw)return[];try{let t=await cw(e);return Array.isArray(t)?t:[]}catch(e){return console.warn(`[autoCrop] face detection failed, skipping auto-crop`,e),[]}}var fw=640;function pw(e){return new Promise(t=>{let n=new Image;n.crossOrigin=`anonymous`,n.addEventListener(`load`,()=>t(n)),n.addEventListener(`error`,()=>t(null)),n.src=e})}function mw(e){let t=e.naturalWidth||e.width,n=e.naturalHeight||e.height;if(!(t>0)||!(n>0))return null;let r=Math.min(1,fw/Math.max(t,n)),i=document.createElement(`canvas`);i.width=Math.max(1,Math.round(t*r)),i.height=Math.max(1,Math.round(n*r));let a=i.getContext(`2d`,{willReadFrequently:!0});if(!a)return null;a.drawImage(e,0,0,i.width,i.height);try{a.getImageData(0,0,1,1)}catch{return null}return{canvas:i,scale:r}}async function hw(e){if(!uw()||e.cropMode!==`cover`)return null;let t=await pw(e.src);if(!t)return null;let n=mw(t);if(!n)return null;let r=await dw(n.canvas);if(r.length===0)return null;let i=1/n.scale;return sw({faces:r.map(e=>({x:e.x*i,y:e.y*i,width:e.width*i,height:e.height*i,score:e.score})),natural:e.natural,aspectRatio:e.aspectRatio,cropMode:e.cropMode,zoom:e.zoom})}var gw=[`aria-labelledby`,`aria-label`],_w=[`src`,`alt`],Sae={class:`actions`},Cae={key:2,class:`padding-input-wrapper`},wae=[`id`],vw=W((0,t.defineComponent)({__name:`ImageEdit`,props:(0,t.mergeModels)({allowUploadFromDevice:{type:Boolean},width:{},height:{},allowedTypes:{},convertTo:{},quality:{},imageLibraries:{},uploadLabel:{default:`Select image`},editLabel:{},actionsLabel:{default:`More`},maxSize:{default:1/0},bridge:{},mobile:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},field:{},allowCropImage:{type:Boolean},aspectRatio:{},resetCropOnChange:{type:Boolean,default:!0},allowPadding:{type:Boolean,default:!1},autoCrop:{type:Boolean,default:!1},autoCropZoom:{type:Boolean,default:!1},labelId:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=Uv(),r=(0,t.inject)(Hv),i=e,a=(0,t.useModel)(e,`modelValue`),o=(0,t.computed)(()=>{let e=a.value?.src;return e&&(0,ci.withBackgroundRemoval)(e,a.value?.removeBackground===!0)}),s=(0,t.computed)({get:()=>a.value?.src,set:e=>{!a.value||typeof a.value!=`object`?a.value={src:e,innerRotate:0,cropMode:`cover`,innerAlign:`center`,crop:null,innerPos:[0,0],mirrorX:!1,mirrorY:!1,scale:1}:(a.value.src=e,a.value.crop=null,a.value.innerPos=[0,0],a.value.scale=1,a.value.innerRotate=0,a.value.mirrorX=!1,a.value.mirrorY=!1),(async()=>{let e=await lC(s.value);if(D.value=e,console.log(`newImageInfo`,e,i,a.value),i.autoCrop&&a.value.cropMode===`cover`){let t=await hw({src:s.value,natural:e,aspectRatio:i.aspectRatio,cropMode:a.value.cropMode,zoom:!0});if(console.log(`autoCrop suggested`,t),t&&a.value.src===s.value){c.value=t;return}}i.resetCropOnChange&&(a.value.cropMode===`cover`?(console.log(`resetting crop on change with cover mode`),c.value=dC({scale:a.value.scale??1,innerPos:a.value.innerPos??[0,0]},e.width,e.height,i.aspectRatio)):c.value={top:0,left:0,width:e.width,height:e.height})})()}}),c=(0,t.computed)({get:()=>a.value.crop?a.value.crop:D.value?dC({scale:a.value.scale??1,innerPos:a.value.innerPos??[0,0]},D.value.width,D.value.height,i.aspectRatio):{top:0,left:0,width:10,height:10},set:async e=>{console.log(`cropProxy.set()`,e);let{scale:t,innerPos:n}=uC(e,D.value.width,D.value.height);a.value={...Gx(a.value),scale:t,innerPos:n,crop:e,cropMode:a.value?.cropMode??`cover`,innerAlign:a.value?.innerAlign??`center`}}});(0,t.watch)(s,e=>{e&&lC(e).then(e=>{D.value=e}).catch(()=>{})},{immediate:!0});let l=h(`bx-image-padding-label`),u=(0,t.computed)(()=>(i.editLabel??i.uploadLabel)||`Image`),d=(0,t.computed)(()=>Math.max(1,Math.min(i.width,i.height)/2)),f=(0,t.computed)({get(){let e=(a.value?.padding??[0])[0]??0;return Math.round(Math.min(100,e/d.value*100))},set(e){let t=Math.max(0,Math.min(100,e))/100*d.value;a.value={...a.value,padding:[t,t,t,t]}}}),p=(0,t.ref)(!1);(0,t.ref)(!1);let m=(0,t.computed)(()=>i.allowCropImage?1:2),{uploadFiles:g,uploadProgresses:_,uploading:v}=Di((0,t.toRef)(i,`width`),(0,t.toRef)(i,`height`),(0,t.toRef)(i,`convertTo`),(0,t.toRef)(i,`quality`),i.bridge.handleUpload,(0,t.toRef)(i,`field`));async function y(){let e=await Wv({types:i.allowedTypes,maxSize:i.maxSize,multiple:!0}),n=Mx({title:`Uploading images`,content:()=>[(0,t.h)(Fx,{value:_.value.reduce((e,t)=>e+t,0)/_.value.length})],closeable:!1,icon:()=>(0,t.h)(Py),disableBackgroundEffect:!0}),r=await g(e);n.close();let a=r[0];a&&(D.value={width:a.width,height:a.height,ratio:a.width/a.height},w(a.src))}let b=(0,t.computed)(()=>[...i.allowUploadFromDevice?[{label:i.uploadLabel,action:y,icon:()=>(0,t.h)(nb),key:`upload`}]:[],...i.imageLibraries.map(e=>({label:e.label,icon:()=>{if(e.type===`sharedDrive`)switch(e.service){case`googledrive`:return(0,t.h)(`img`,{src:`https://upload.wikimedia.org/wikipedia/commons/1/12/Google_Drive_icon_%282020%29.svg`});case`onedrive`:return(0,t.h)(`img`,{src:`https://upload.wikimedia.org/wikipedia/commons/e/e7/Microsoft_OneDrive_Icon_%282025_-_present%29.svg`});default:return(0,t.h)(nb)}else if(e.type===`pexels`)return(0,t.h)(`img`,{src:`https://www.drupal.org/files/project-images/pexels_logo_0.png`});else return(0,t.h)(nb)},key:e.type===`sharedDrive`?e.service:e.type===`custom`?`custom`:e.type,lib:e}))]),x=(0,t.ref)(),S=(0,t.computed)(()=>b.value.slice(m.value===1?m.value:m.value-1).map(e=>({label:e.label,value:e.key,icon:i.mobile?e.icon:()=>(0,t.h)(vb,{},e.icon)})));function C(e){e===`upload`?b.value.length>1?(x.value=void 0,p.value=!0):y():(x.value=e,p.value=!0)}function w(e){console.log(`handleImageSelection`,e),s.value=e,p.value=!1}function T(){if(i.allowUploadFromDevice){y();return}x.value=void 0,p.value=!0}yi(()=>i.field,T);function E(e){i.imageLibraries.length===0&&i.allowUploadFromDevice&&(y(),e.stopImmediatePropagation(),e.stopPropagation(),(0,t.nextTick)(()=>{p.value=!1}))}let D=(0,t.ref)(),O=(0,t.ref)(!1);function k(e){C(e),O.value=!1}function A(){let e=Gx(c.value),n=a.value.mirrorX,l=a.value.mirrorY,u=c.value;lC(s.value).then(e=>{D.value=e});let d=a.value.cropMode===`cover`?i.aspectRatio:void 0,f=Px(()=>(0,t.h)(`div`,{class:`cropper-popover-wrapper`},[(0,t.h)(rw,{src:Ig(o.value??s.value,r?.value),crop:c.value,"onUpdate:crop"(e){e&&(u=e)},mirrorX:a.value.mirrorX,"onUpdate:mirrorX"(e){a.value={...a.value,mirrorX:e}},mirrorY:a.value.mirrorY,"onUpdate:mirrorY"(e){a.value={...a.value,mirrorY:e}},aspectRatio:d,offset:{top:20,right:20,bottom:20,left:20},style:{width:`100%`,height:`100%`},onCancel(){setTimeout(()=>{c.value=e,a.value={...a.value,mirrorX:n,mirrorY:l}},50),f.destroy()},onDone(){setTimeout(()=>{c.value=u},50),f.destroy()}})]))}return(r,s)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`image-edit-field`,{"has-single-action":S.value.length===0&&!e.allowCropImage,compact:e.compact}])},[(0,t.createVNode)(Lx,{closeable:!1,show:p.value,"onUpdate:show":s[3]||=e=>p.value=e,type:`layer`,trigger:`click`,fullscreen:``},{title:(0,t.withCtx)(()=>[x.value?((0,t.openBlock)(),(0,t.createBlock)(Jv,{key:0,circle:``,"aria-label":`Back`,onClick:s[0]||=e=>x.value=void 0},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(iy))]),_:1})]),_:1})):(0,t.createCommentVNode)(``,!0)]),"header-actions":(0,t.withCtx)(()=>[(0,t.createVNode)(Jv,{circle:``,"aria-label":`Close`,onClick:s[1]||=e=>p.value=!1},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(My))]),_:1})]),_:1})]),trigger:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`button`,{type:`button`,class:`image-preview`,"aria-labelledby":e.labelId,"aria-label":e.labelId?void 0:e.editLabel??e.uploadLabel,onClick:E},[o.value?((0,t.openBlock)(),(0,t.createElementBlock)(`img`,{key:0,crossorigin:`anonymous`,src:(0,t.unref)(n)(o.value),alt:u.value},null,8,_w)):((0,t.openBlock)(),(0,t.createBlock)(vb,{key:1,class:`image-placeholder`,"aria-hidden":`true`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(nb))]),_:1}))],8,gw)]),content:(0,t.withCtx)(()=>[(0,t.createVNode)(aC,{"active-key":x.value,"onUpdate:activeKey":s[2]||=e=>x.value=e,options:b.value,"image-libraries":e.imageLibraries,width:e.width,height:e.height,quality:e.quality,"convert-to":e.convertTo,bridge:e.bridge,field:e.field,onSelect:w},null,8,[`active-key`,`options`,`image-libraries`,`width`,`height`,`quality`,`convert-to`,`bridge`,`field`])]),_:1},8,[`show`]),(0,t.createElementVNode)(`div`,Sae,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(b.value.slice(0,b.value.length>m.value?m.value-1:m.value),(n,r)=>((0,t.openBlock)(),(0,t.createBlock)(Jv,{tertiary:!0,active:r===0,size:e.compact?`small`:`medium`,"aria-label":e.compact?n.label:void 0,onClick:e=>C(n.key)},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(n.icon)))]),_:2},1024)]),default:(0,t.withCtx)(()=>[e.compact?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(n.label),1)],64))]),_:2},1032,[`active`,`size`,`aria-label`,`onClick`]))),256)),S.value.length>0&&b.value.length>m.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.mobile?cC:FS),{key:0,trigger:`manual`,options:S.value,onSelect:C,"model-value":void 0,"onUpdate:modelValue":k,"mobile-layout":e.mobile,show:O.value,"onUpdate:show":s[5]||=e=>O.value=e},{trigger:(0,t.withCtx)(()=>[m.value===1?((0,t.openBlock)(),(0,t.createBlock)(Jv,{key:0,tertiary:``,active:``,size:e.compact?`small`:`medium`,"aria-label":e.compact?b.value[0].label:void 0,onClick:s[4]||=e=>C(b.value[0].key)},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(b.value[0].icon)))]),_:1})]),default:(0,t.withCtx)(()=>[e.compact?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(b.value[0].label),1)],64))]),_:1},8,[`size`,`aria-label`])):((0,t.openBlock)(),(0,t.createBlock)(Jv,{key:1,size:e.compact?`small`:`medium`,"aria-label":e.compact?e.actionsLabel:void 0},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Wy))]),_:1})]),default:(0,t.withCtx)(()=>[e.compact?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(e.actionsLabel),1)],64))]),_:1},8,[`size`,`aria-label`]))]),_:1},40,[`options`,`mobile-layout`,`show`])):(0,t.createCommentVNode)(``,!0),i.allowCropImage?((0,t.openBlock)(),(0,t.createBlock)(Jv,{key:1,tertiary:``,size:e.compact?`small`:`medium`,"aria-label":e.compact?e.editLabel??`Edit Image`:void 0,onClick:A},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Ry))]),_:1})]),default:(0,t.withCtx)(()=>[e.compact?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(e.editLabel??`Edit Image`),1)],64))]),_:1},8,[`size`,`aria-label`])):(0,t.createCommentVNode)(``,!0),e.allowPadding&&a.value.cropMode===`contain`?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Cae,[(0,t.createElementVNode)(`span`,{class:`label`,id:(0,t.unref)(l)},`Padding`,8,wae),(0,t.createVNode)(aa,{modelValue:f.value,"onUpdate:modelValue":s[6]||=e=>f.value=e,min:0,max:100,step:1,"aria-labelledby":(0,t.unref)(l),"aria-valuetext":`${f.value}%`},null,8,[`modelValue`,`aria-labelledby`,`aria-valuetext`])])):(0,t.createCommentVNode)(``,!0)])],2))}}),[[`__scopeId`,`data-v-97ea8970`]]),Tae=[`src`,`alt`],Eae={key:0,class:`actions`},yw=2,bw=W((0,t.defineComponent)({__name:`Image`,props:(0,t.mergeModels)({layout:{},allowUploadFromDevice:{type:Boolean},width:{},height:{},allowedTypes:{},convertTo:{},quality:{},imageLibraries:{},uploadLabel:{default:`Select image`},actionsLabel:{default:`More`},maxSize:{default:1/0},bridge:{},mobile:{type:Boolean,default:!1},field:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=Uv(),r=(0,t.useModel)(e,`modelValue`),i=(0,t.computed)(()=>typeof r.value==`string`?r.value:r.value?.src),a=e,o=(0,t.ref)(!1),{uploadFiles:s,uploadProgresses:c,uploading:l}=Di((0,t.toRef)(a,`width`),(0,t.toRef)(a,`height`),(0,t.toRef)(a,`convertTo`),(0,t.toRef)(a,`quality`),a.bridge.handleUpload,(0,t.toRef)(a,`field`));async function u(){let e=await Wv({types:a.allowedTypes,maxSize:a.maxSize,multiple:!0}),n=Mx({title:`Uploading images`,content:()=>[(0,t.h)(Fx,{value:c.value.reduce((e,t)=>e+t,0)/c.value.length})],closeable:!1,icon:()=>(0,t.h)(Py),disableBackgroundEffect:!0}),r=await s(e);n.close();let i=r[0];i&&h(i.src)}let d=(0,t.computed)(()=>[...a.allowUploadFromDevice?[{label:a.uploadLabel,action:u,icon:()=>(0,t.h)(nb),key:`upload`}]:[],...a.imageLibraries.map(e=>({label:e.label,icon:()=>{if(e.type===`sharedDrive`)switch(e.service){case`googledrive`:return(0,t.h)(`img`,{src:`https://upload.wikimedia.org/wikipedia/commons/1/12/Google_Drive_icon_%282020%29.svg`});case`onedrive`:return(0,t.h)(`img`,{src:`https://upload.wikimedia.org/wikipedia/commons/e/e7/Microsoft_OneDrive_Icon_%282025_-_present%29.svg`});default:return(0,t.h)(nb)}else if(e.type===`pexels`)return(0,t.h)(`img`,{src:`https://www.drupal.org/files/project-images/pexels_logo_0.png`});else return(0,t.h)(nb)},key:e.type===`sharedDrive`?e.service:e.type===`custom`?`custom`:e.type,lib:e}))]),f=(0,t.ref)(),p=(0,t.computed)(()=>d.value.slice(1).map(e=>({label:e.label,value:e.key,icon:e.icon})));function m(e){e===`upload`?u():(f.value=e,o.value=!0)}function h(e){typeof r.value==`object`&&r.value!==null?r.value={...Gx(r.value),src:e,crop:null,naturalWidth:void 0,naturalHeight:void 0}:r.value=e,o.value=!1}function g(){if(a.allowUploadFromDevice){u();return}f.value=void 0,o.value=!0}yi(()=>a.field,g);function _(e){a.imageLibraries.length===0&&a.allowUploadFromDevice&&(u(),e.stopImmediatePropagation(),e.stopPropagation(),(0,t.nextTick)(()=>{o.value=!1}))}return(r,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`image-field`,{[`layout-`+e.layout]:!0}])},[(0,t.createVNode)(Lx,{show:o.value,"onUpdate:show":a[2]||=e=>o.value=e,type:`layer`,trigger:`click`,fullscreen:``},{title:(0,t.withCtx)(()=>[f.value?((0,t.openBlock)(),(0,t.createBlock)(Jv,{key:0,circle:``,tertiary:``,onClick:a[0]||=e=>f.value=void 0},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,{size:`small`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(iy))]),_:1})]),_:1})):(0,t.createCommentVNode)(``,!0),a[3]||=(0,t.createElementVNode)(`h3`,null,`Select image`,-1)]),trigger:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`image-preview`,{"single-button-height":d.value.length<=1}]),onClick:_},[i.value?((0,t.openBlock)(),(0,t.createElementBlock)(`img`,{key:0,crossorigin:`anonymous`,src:(0,t.unref)(n)(i.value),alt:e.uploadLabel},null,8,Tae)):((0,t.openBlock)(),(0,t.createBlock)(vb,{key:1,class:`image-placeholder`,"aria-hidden":`true`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(nb))]),_:1}))],2)]),content:(0,t.withCtx)(()=>[(0,t.createVNode)(aC,{"active-key":f.value,"onUpdate:activeKey":a[1]||=e=>f.value=e,options:d.value,"image-libraries":e.imageLibraries,width:e.width,height:e.height,quality:e.quality,"convert-to":e.convertTo,bridge:e.bridge,field:e.field,onSelect:h},null,8,[`active-key`,`options`,`image-libraries`,`width`,`height`,`quality`,`convert-to`,`bridge`,`field`])]),_:1},8,[`show`]),e.layout===`compact`?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Eae,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(d.value.slice(0,d.value.length>yw?1:yw),n=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createVNode)(Jv,{onClick:e=>m(n.key)},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(n.icon)))]),_:2},1024)]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)(n.label),1)]),_:2},1032,[`onClick`]),(0,t.createVNode)(cC,{trigger:`click`,options:p.value,onSelect:m,"mobile-layout":e.mobile,"aria-label":e.actionsLabel},{trigger:(0,t.withCtx)(()=>[d.value.length>yw?((0,t.openBlock)(),(0,t.createBlock)(Jv,{key:0},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,{size:`small`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Wy))]),_:1})]),default:(0,t.withCtx)(()=>[(0,t.createTextVNode)(` `+(0,t.toDisplayString)(e.actionsLabel),1)]),_:1})):(0,t.createCommentVNode)(``,!0)]),_:1},8,[`options`,`mobile-layout`,`aria-label`])],64))),256))]))],2))}}),[[`__scopeId`,`data-v-5ba26440`]]),Dae={key:0,class:`title-wrapper`},Oae={key:0,class:`root-index`},kae={key:1,class:`title`},Aae={type:`button`,class:`help-trigger`,"aria-label":`More information`},xw=W((0,t.defineComponent)({__name:`Group`,props:{layout:{},isRoot:{type:Boolean,default:!1},index:{default:0},fields:{},card:{type:Boolean},description:{},detailedDescription:{},bridge:{}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`group-field`,{}])},[(0,t.createVNode)(Rx,{transculent:!e.card,class:(0,t.normalizeClass)({"no-card":e.card===!1}),dividers:!1},{default:(0,t.withCtx)(()=>[e.description||e.detailedDescription?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Dae,[e.isRoot?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Oae,(0,t.toDisplayString)(e.index),1)):(0,t.createCommentVNode)(``,!0),e.description?((0,t.openBlock)(),(0,t.createElementBlock)(`h4`,kae,(0,t.toDisplayString)(e.description),1)):(0,t.createCommentVNode)(``,!0),e.detailedDescription?((0,t.openBlock)(),(0,t.createBlock)(VS,{key:2,trigger:`hover`},{trigger:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`button`,Aae,[(0,t.createVNode)(vb,{size:16},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(eb))]),_:1})])]),content:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.detailedDescription),1)]),_:1})):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(Ak,{fields:e.fields,bridge:e.bridge,layout:e.layout,"is-root":!1},null,8,[`fields`,`bridge`,`layout`])]),_:1},8,[`transculent`,`class`])]))}}),[[`__scopeId`,`data-v-6023598b`]]),jae={class:`text-field`},Mae=`calc(2*1.2em + 5px * 2)`,Sw=W((0,t.defineComponent)({__name:`Text`,props:(0,t.mergeModels)({maxLength:{},maxLines:{},maxLineLength:{},showWordCount:{type:Boolean},clearable:{type:Boolean},multiline:{type:Boolean},uppercase:{type:Boolean},placeholder:{},richtext:{},bridge:{},maxHeight:{},labelId:{},minWidth:{},maxWidth:{}},{modelValue:{type:[String,Number,Boolean,Array],required:!1,default:`Hello world`},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`);function r(e){n.value=e}let i=e,a=(0,t.computed)(()=>!i.maxHeight||i.maxHeight===Mae?void 0:i.maxHeight);return(i,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,jae,[(0,t.createVNode)(nC,{type:e.multiline?`textarea`:`text`,"model-value":n.value,"onUpdate:modelValue":r,"show-word-count":e.showWordCount,clearable:e.clearable,"max-length":e.maxLength??1/0,"max-line-length":e.maxLineLength??1/0,"max-lines":e.maxLines??1/0,placeholder:e.placeholder||`Text Field...`,resizeable:!1,richtext:e.richtext.enabled?e.richtext:void 0,"max-height":a.value,"max-rows":20,"aria-labelledby":e.labelId,ring:``,bordered:``},null,8,[`type`,`model-value`,`show-word-count`,`clearable`,`max-length`,`max-line-length`,`max-lines`,`placeholder`,`richtext`,`max-height`,`aria-labelledby`])]))}}),[[`__scopeId`,`data-v-ceacb5b8`]]),Nae={class:`field-image-adjust`},Cw=W((0,t.defineComponent)({__name:`ImageAdjust`,props:(0,t.mergeModels)({minX:{},maxX:{},minY:{},maxY:{},minScale:{},maxScale:{},type:{},aspectRatio:{},bridge:{}},{image:{required:!0},imageModifiers:{},adjust:{required:!0},adjustModifiers:{}}),emits:[`update:image`,`update:adjust`],setup(e){(0,t.inject)(Hv);let n=(0,t.useModel)(e,`image`),r=(0,t.useModel)(e,`adjust`),i=e,a=(0,t.ref)();return(0,t.watchEffect)(async()=>{n.value&&(a.value=await lC(n.value))}),(0,t.computed)(()=>dC(r.value,a.value.width,a.value.height,i.aspectRatio)),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Nae,[(0,t.createVNode)(Jv,null,{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Ry))]),_:1})]),default:(0,t.withCtx)(()=>[n[0]||=(0,t.createTextVNode)(` Crop `,-1)]),_:1})]))}}),[[`__scopeId`,`data-v-9e4c42cb`]]),Pae=[`aria-labelledby`],Fae=[`aria-checked`,`aria-label`,`tabindex`,`onClick`],Iae={class:`image-card`},Lae={class:`label-image-proxy`},Rae=[`src`],zae={key:0,class:`label`},ww=W((0,t.defineComponent)({__name:`Select`,props:(0,t.mergeModels)({options:{},layout:{},cardSize:{},showLabels:{type:Boolean},labelId:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,r=(0,t.useModel)(e,`modelValue`),i=Uv(),a=(0,t.computed)(()=>n.layout===`grid`||n.layout===`cards`);function o(e){r.value=e.value}let s=(0,t.ref)([]);function c(e,t){s.value[t]=e}let l=(0,t.computed)(()=>{let e=n.options.findIndex(e=>e.value===r.value);return e>=0?e:0});function u(e){let t=n.options.length;if(t===0)return;let r=s.value.findIndex(e=>e===document.activeElement),i;switch(e.key){case`ArrowRight`:case`ArrowDown`:i=r<0?0:(r+1)%t;break;case`ArrowLeft`:case`ArrowUp`:i=r<0?t-1:(r-1+t)%t;break;case`Home`:i=0;break;case`End`:i=t-1;break;case`Enter`:case` `:r>=0&&(e.preventDefault(),o(n.options[r]));return;default:return}e.preventDefault(),s.value[i]?.focus(),o(n.options[i])}let d=(0,t.computed)(()=>n.options.map(e=>({label:e.label,value:e.value,icon:e.image?()=>(0,t.h)(vb,{},()=>(0,t.h)(`img`,{src:e.image,style:{"object-fit":`cover`,width:`24px`,height:`24px`}})):void 0})));return(n,s)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`select-field`,{"grid-layout":a.value,"horizontal-scroll":e.layout===`cards`}])},[a.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`select-grid`,{[`size-`+e.cardSize]:!0,"horizontal-scroll":e.layout===`cards`}]),role:`radiogroup`,"aria-labelledby":e.labelId,onKeydown:u},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,(n,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:a,ref_for:!0,ref:e=>c(e,a),class:(0,t.normalizeClass)([`option-item`,{active:n.value===r.value}]),role:`radio`,"aria-checked":n.value===r.value?`true`:`false`,"aria-label":n.label,tabindex:a===l.value?0:-1,onClick:e=>o(n)},[(0,t.createElementVNode)(`div`,Iae,[(0,t.createElementVNode)(`div`,Lae,[(0,t.createElementVNode)(`span`,null,(0,t.toDisplayString)(n.label),1)]),n.image?((0,t.openBlock)(),(0,t.createElementBlock)(`img`,{key:0,src:(0,t.unref)(i)(n.image)},null,8,Rae)):(0,t.createCommentVNode)(``,!0)]),e.showLabels?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,zae,(0,t.toDisplayString)(n.label),1)):(0,t.createCommentVNode)(``,!0)],10,Fae))),128))],42,Pae)):((0,t.openBlock)(),(0,t.createBlock)(FS,{key:1,modelValue:r.value,"onUpdate:modelValue":s[0]||=e=>r.value=e,options:d.value,"aria-labelledby":e.labelId,bordered:``},null,8,[`modelValue`,`options`,`aria-labelledby`]))],2))}}),[[`__scopeId`,`data-v-9bc0926e`]]);function Tw(e){let n=(0,t.computed)(()=>{let n=(0,t.toValue)(e.disabled)??!1,r=(0,t.toValue)(e.labelledBy);return{role:e.role,tabindex:n?-1:0,"aria-checked":(0,t.toValue)(e.checked)?`true`:`false`,"aria-disabled":n?`true`:void 0,"aria-labelledby":r,"aria-label":r?void 0:(0,t.toValue)(e.label)}});function r(n){(0,t.toValue)(e.disabled)||(n.key===` `||n.key===`Enter`)&&(n.preventDefault(),e.toggle())}return{attrs:n,onKeydown:r}}var Ew=W((0,t.defineComponent)({__name:`BxCheckbox`,props:(0,t.mergeModels)({label:{},ariaLabel:{},ariaLabelledby:{},size:{default:`medium`},disabled:{type:Boolean,default:!1},secondary:{type:Boolean,default:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,r=(0,t.useModel)(e,`modelValue`),i=()=>{n.disabled||(r.value=!r.value)},{attrs:a,onKeydown:o}=Tw({role:`checkbox`,checked:()=>r.value,disabled:()=>n.disabled,label:()=>n.ariaLabel??n.label,labelledBy:()=>n.ariaLabelledby,toggle:i});return(n,s)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:[`bx-checkbox`,{checked:r.value,disabled:e.disabled,secondary:e.secondary}]},(0,t.unref)(a),{onClick:i,onKeydown:s[0]||=(...e)=>(0,t.unref)(o)&&(0,t.unref)(o)(...e)}),[...s[1]||=[(0,t.createElementVNode)(`div`,{class:`checkbox-box`},[(0,t.createElementVNode)(`div`,{class:`checkbox-symbol`},[(0,t.createElementVNode)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:`check-icon`,"aria-hidden":`true`},[(0,t.createElementVNode)(`path`,{d:`M12.1875 3.75L5.625 11.25L2.8125 8.4375`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`})])])],-1)]],16))}}),[[`__scopeId`,`data-v-6cd2378e`]]),Bae={class:`label`},Vae=[`id`],Dw=W((0,t.defineComponent)({__name:`Checkbox`,props:(0,t.mergeModels)({description:{},detailedDescription:{},label:{},mobile:{type:Boolean,default:!1},secondary:{type:Boolean,default:!1},labelId:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=h(`bx-checkbox-label`),r=(0,t.useModel)(e,`modelValue`);return(i,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`checkbox-field`,{mobile:e.mobile}])},[(0,t.createVNode)(Ew,{modelValue:r.value,"onUpdate:modelValue":a[0]||=e=>r.value=e,size:`medium`,"aria-labelledby":e.label?(0,t.unref)(n):e.labelId},null,8,[`modelValue`,`aria-labelledby`]),e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`checkbox-label`,onClick:a[1]||=e=>r.value=!r.value},[(0,t.createElementVNode)(`div`,Bae,[(0,t.createElementVNode)(`span`,{id:(0,t.unref)(n)},(0,t.toDisplayString)(e.label),9,Vae)])])):(0,t.createCommentVNode)(``,!0)],2))}}),[[`__scopeId`,`data-v-8852852c`]]),Hae=(0,t.defineComponent)({__name:`CollectionEntryFields`,props:{bridge:{},fields:{},layout:{},data:{}},emits:[`update:data`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.ref)(r.data);return(0,t.watch)(()=>r.data,e=>{e!==a.value&&(a.value=e)}),(0,t.provide)(`data`,a),(0,t.watch)(a,()=>{i(`update:data`,a.value)},{deep:!0}),(n,r)=>((0,t.openBlock)(),(0,t.createBlock)(xw,{bridge:e.bridge,fields:e.fields,card:!1,layout:e.layout},null,8,[`bridge`,`fields`,`layout`]))}});function Ow(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ow(Object(n),!0).forEach(function(t){Uae(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ow(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Aw(e){"@babel/helpers - typeof";return Aw=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Aw(e)}function Uae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jw(){return jw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jw.apply(this,arguments)}function Wae(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Gae(e,t){if(e==null)return{};var n=Wae(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kae(e){return qae(e)||Jae(e)||Yae(e)||Xae()}function qae(e){if(Array.isArray(e))return Mw(e)}function Jae(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Yae(e,t){if(e){if(typeof e==`string`)return Mw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mw(e,t)}}function Mw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Xae(){throw TypeError(`Invalid attempt to spread non-iterable instance.
164
164
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Zae=`1.15.6`;function Nw(e){if(typeof window<`u`&&window.navigator)return!!navigator.userAgent.match(e)}var Pw=Nw(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Fw=Nw(/Edge/i),Iw=Nw(/firefox/i),Lw=Nw(/safari/i)&&!Nw(/chrome/i)&&!Nw(/android/i),Rw=Nw(/iP(ad|od|hone)/i),zw=Nw(/chrome/i)&&Nw(/android/i),Bw={capture:!1,passive:!1};function Vw(e,t,n){e.addEventListener(t,n,!Pw&&Bw)}function Hw(e,t,n){e.removeEventListener(t,n,!Pw&&Bw)}function Uw(e,t){if(t){if(t[0]===`>`&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Ww(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Gw(e,t,n,r){if(e){n||=document;do{if(t!=null&&(t[0]===`>`?e.parentNode===n&&Uw(e,t):Uw(e,t))||r&&e===n)return e;if(e===n)break}while(e=Ww(e))}return null}var Kw=/\s+/g;function qw(e,t,n){e&&t&&(e.classList?e.classList[n?`add`:`remove`](t):e.className=((` `+e.className+` `).replace(Kw,` `).replace(` `+t+` `,` `)+(n?` `+t:``)).replace(Kw,` `))}function Jw(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,``):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf(`webkit`)===-1&&(t=`-webkit-`+t),r[t]=n+(typeof n==`string`?``:`px`)}}function Yw(e,t){var n=``;if(typeof e==`string`)n=e;else do{var r=Jw(e,`transform`);r&&r!==`none`&&(n=r+` `+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Xw(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i<a;i++)n(r[i],i);return r}return[]}function Zw(){return document.scrollingElement||document.documentElement}function Qw(e,t,n,r,i){if(e.getBoundingClientRect||e===window){var a,o,s,c,l,u,d;if(e!==window&&e.parentNode&&e!==Zw()?(a=e.getBoundingClientRect(),o=a.top,s=a.left,c=a.bottom,l=a.right,u=a.height,d=a.width):(o=0,s=0,c=window.innerHeight,l=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(i||=e.parentNode,!Pw))do if(i&&i.getBoundingClientRect&&(Jw(i,`transform`)!==`none`||n&&Jw(i,`position`)!==`static`)){var f=i.getBoundingClientRect();o-=f.top+parseInt(Jw(i,`border-top-width`)),s-=f.left+parseInt(Jw(i,`border-left-width`)),c=o+a.height,l=s+a.width;break}while(i=i.parentNode);if(r&&e!==window){var p=Yw(i||e),m=p&&p.a,h=p&&p.d;p&&(o/=h,s/=m,d/=m,u/=h,c=o+u,l=s+d)}return{top:o,left:s,bottom:c,right:l,width:d,height:u}}}function $w(e,t,n){for(var r=iT(e,!0),i=Qw(e)[t];r;){var a=Qw(r)[n],o=void 0;if(o=n===`top`||n===`left`?i>=a:i<=a,!o)return r;if(r===Zw())break;r=iT(r,!1)}return!1}function eT(e,t,n,r){for(var i=0,a=0,o=e.children;a<o.length;){if(o[a].style.display!==`none`&&o[a]!==cE.ghost&&(r||o[a]!==cE.dragged)&&Gw(o[a],n.draggable,e,!1)){if(i===t)return o[a];i++}a++}return null}function tT(e,t){for(var n=e.lastElementChild;n&&(n===cE.ghost||Jw(n,`display`)===`none`||t&&!Uw(n,t));)n=n.previousElementSibling;return n||null}function nT(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!==`TEMPLATE`&&e!==cE.clone&&(!t||Uw(e,t))&&n++;return n}function rT(e){var t=0,n=0,r=Zw();if(e)do{var i=Yw(e),a=i.a,o=i.d;t+=e.scrollLeft*a,n+=e.scrollTop*o}while(e!==r&&(e=e.parentNode));return[t,n]}function Qae(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n)}return-1}function iT(e,t){if(!e||!e.getBoundingClientRect)return Zw();var n=e,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=Jw(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX==`auto`||i.overflowX==`scroll`)||n.clientHeight<n.scrollHeight&&(i.overflowY==`auto`||i.overflowY==`scroll`)){if(!n.getBoundingClientRect||n===document.body)return Zw();if(r||t)return n;r=!0}}while(n=n.parentNode);return Zw()}function $ae(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function aT(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var oT;function sT(e,t){return function(){if(!oT){var n=arguments,r=this;n.length===1?e.call(r,n[0]):e.apply(r,n),oT=setTimeout(function(){oT=void 0},t)}}}function eoe(){clearTimeout(oT),oT=void 0}function cT(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function lT(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function uT(e,t){Jw(e,`position`,`absolute`),Jw(e,`top`,t.top),Jw(e,`left`,t.left),Jw(e,`width`,t.width),Jw(e,`height`,t.height)}function dT(e){Jw(e,`position`,``),Jw(e,`top`,``),Jw(e,`left`,``),Jw(e,`width`,``),Jw(e,`height`,``)}function fT(e,t,n){var r={};return Array.from(e.children).forEach(function(i){if(Gw(i,t.draggable,e,!1)&&!i.animated&&i!==n){var a=Qw(i);r.left=Math.min(r.left??1/0,a.left),r.top=Math.min(r.top??1/0,a.top),r.right=Math.max(r.right??-1/0,a.right),r.bottom=Math.max(r.bottom??-1/0,a.bottom)}}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var pT=`Sortable`+new Date().getTime();function toe(){var e=[],t;return{captureAnimationState:function(){e=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(t){if(Jw(t,`display`)!==`none`&&t!==cE.ghost){e.push({target:t,rect:Qw(t)});var n=kw({},e[e.length-1].rect);if(t.thisAnimationDuration){var r=Yw(t,!0);r&&(n.top-=r.f,n.left-=r.e)}t.fromRect=n}})},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(Qae(e,{target:t}),1)},animateAll:function(n){var r=this;if(!this.options.animation){clearTimeout(t),typeof n==`function`&&n();return}var i=!1,a=0;e.forEach(function(e){var t=0,n=e.target,o=n.fromRect,s=Qw(n),c=n.prevFromRect,l=n.prevToRect,u=e.rect,d=Yw(n,!0);d&&(s.top-=d.f,s.left-=d.e),n.toRect=s,n.thisAnimationDuration&&aT(c,s)&&!aT(o,s)&&(u.top-s.top)/(u.left-s.left)===(o.top-s.top)/(o.left-s.left)&&(t=roe(u,c,l,r.options)),aT(s,o)||(n.prevFromRect=o,n.prevToRect=s,t||=r.options.animation,r.animate(n,u,s,t)),t&&(i=!0,a=Math.max(a,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},t),n.thisAnimationDuration=t)}),clearTimeout(t),i?t=setTimeout(function(){typeof n==`function`&&n()},a):typeof n==`function`&&n(),e=[]},animate:function(e,t,n,r){if(r){Jw(e,`transition`,``),Jw(e,`transform`,``);var i=Yw(this.el),a=i&&i.a,o=i&&i.d,s=(t.left-n.left)/(a||1),c=(t.top-n.top)/(o||1);e.animatingX=!!s,e.animatingY=!!c,Jw(e,`transform`,`translate3d(`+s+`px,`+c+`px,0)`),this.forRepaintDummy=noe(e),Jw(e,`transition`,`transform `+r+`ms`+(this.options.easing?` `+this.options.easing:``)),Jw(e,`transform`,`translate3d(0,0,0)`),typeof e.animated==`number`&&clearTimeout(e.animated),e.animated=setTimeout(function(){Jw(e,`transition`,``),Jw(e,`transform`,``),e.animated=!1,e.animatingX=!1,e.animatingY=!1},r)}}}}function noe(e){return e.offsetWidth}function roe(e,t,n,r){return Math.sqrt((t.top-e.top)**2+(t.left-e.left)**2)/Math.sqrt((t.top-n.top)**2+(t.left-n.left)**2)*r.animation}var mT=[],hT={initializeByDefault:!0},gT={mount:function(e){for(var t in hT)hT.hasOwnProperty(t)&&!(t in e)&&(e[t]=hT[t]);mT.forEach(function(t){if(t.pluginName===e.pluginName)throw`Sortable: Cannot mount plugin ${e.pluginName} more than once`}),mT.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=e+`Global`;mT.forEach(function(r){t[r.pluginName]&&(t[r.pluginName][i]&&t[r.pluginName][i](kw({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](kw({sortable:t},n)))})},initializePlugins:function(e,t,n,r){for(var i in mT.forEach(function(r){var i=r.pluginName;if(e.options[i]||r.initializeByDefault){var a=new r(e,t,e.options);a.sortable=e,a.options=e.options,e[i]=a,jw(n,a.defaults)}}),e.options)if(e.options.hasOwnProperty(i)){var a=this.modifyOption(e,i,e.options[i]);a!==void 0&&(e.options[i]=a)}},getEventProperties:function(e,t){var n={};return mT.forEach(function(r){typeof r.eventProperties==`function`&&jw(n,r.eventProperties.call(t[r.pluginName],e))}),n},modifyOption:function(e,t,n){var r;return mT.forEach(function(i){e[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[t]==`function`&&(r=i.optionListeners[t].call(e[i.pluginName],n))}),r}};function _T(e){var t=e.sortable,n=e.rootEl,r=e.name,i=e.targetEl,a=e.cloneEl,o=e.toEl,s=e.fromEl,c=e.oldIndex,l=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,f=e.originalEvent,p=e.putSortable,m=e.extraEventProperties;if(t||=n&&n[pT],t){var h,g=t.options,_=`on`+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Pw&&!Fw?h=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(h=document.createEvent(`Event`),h.initEvent(r,!0,!0)),h.to=o||n,h.from=s||n,h.item=i||n,h.clone=a,h.oldIndex=c,h.newIndex=l,h.oldDraggableIndex=u,h.newDraggableIndex=d,h.originalEvent=f,h.pullMode=p?p.lastPutMode:void 0;var v=kw(kw({},m),gT.getEventProperties(r,t));for(var y in v)h[y]=v[y];n&&n.dispatchEvent(h),g[_]&&g[_].call(t,h)}}var ioe=[`evt`],vT=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,i=Gae(n,ioe);gT.pluginEvent.bind(cE)(e,t,kw({dragEl:bT,parentEl:xT,ghostEl:ST,rootEl:CT,nextEl:wT,lastDownEl:TT,cloneEl:ET,cloneHidden:DT,dragStarted:UT,putSortable:NT,activeSortable:cE.active,originalEvent:r,oldIndex:OT,oldDraggableIndex:AT,newIndex:kT,newDraggableIndex:jT,hideGhostForTarget:aE,unhideGhostForTarget:oE,cloneNowHidden:function(){DT=!0},cloneNowShown:function(){DT=!1},dispatchSortableEvent:function(e){yT({sortable:t,name:e,originalEvent:r})}},i))};function yT(e){_T(kw({putSortable:NT,cloneEl:ET,targetEl:bT,rootEl:CT,oldIndex:OT,oldDraggableIndex:AT,newIndex:kT,newDraggableIndex:jT},e))}var bT,xT,ST,CT,wT,TT,ET,DT,OT,kT,AT,jT,MT,NT,PT=!1,FT=!1,IT=[],LT,RT,zT,BT,VT,HT,UT,WT,GT,KT=!1,qT=!1,JT,YT,XT=[],ZT=!1,QT=[],$T=typeof document<`u`,eE=Rw,tE=Fw||Pw?`cssFloat`:`float`,aoe=$T&&!zw&&!Rw&&`draggable`in document.createElement(`div`),nE=function(){if($T){if(Pw)return!1;var e=document.createElement(`x`);return e.style.cssText=`pointer-events:auto`,e.style.pointerEvents===`auto`}}(),rE=function(e,t){var n=Jw(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=eT(e,0,t),a=eT(e,1,t),o=i&&Jw(i),s=a&&Jw(a),c=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+Qw(i).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Qw(a).width;if(n.display===`flex`)return n.flexDirection===`column`||n.flexDirection===`column-reverse`?`vertical`:`horizontal`;if(n.display===`grid`)return n.gridTemplateColumns.split(` `).length<=1?`vertical`:`horizontal`;if(i&&o.float&&o.float!==`none`){var u=o.float===`left`?`left`:`right`;return a&&(s.clear===`both`||s.clear===u)?`vertical`:`horizontal`}return i&&(o.display===`block`||o.display===`flex`||o.display===`table`||o.display===`grid`||c>=r&&n[tE]===`none`||a&&n[tE]===`none`&&c+l>r)?`vertical`:`horizontal`},ooe=function(e,t,n){var r=n?e.left:e.top,i=n?e.right:e.bottom,a=n?e.width:e.height,o=n?t.left:t.top,s=n?t.right:t.bottom,c=n?t.width:t.height;return r===o||i===s||r+a/2===o+c/2},soe=function(e,t){var n;return IT.some(function(r){var i=r[pT].options.emptyInsertThreshold;if(i&&!tT(r)){var a=Qw(r),o=e>=a.left-i&&e<=a.right+i,s=t>=a.top-i&&t<=a.bottom+i;if(o&&s)return n=r}}),n},iE=function(e){function t(e,n){return function(r,i,a,o){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(e==null&&(n||s))return!0;if(e==null||e===!1)return!1;if(n&&e===`clone`)return e;if(typeof e==`function`)return t(e(r,i,a,o),n)(r,i,a,o);var c=(n?r:i).options.group.name;return e===!0||typeof e==`string`&&e===c||e.join&&e.indexOf(c)>-1}}var n={},r=e.group;(!r||Aw(r)!=`object`)&&(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},aE=function(){!nE&&ST&&Jw(ST,`display`,`none`)},oE=function(){!nE&&ST&&Jw(ST,`display`,``)};$T&&!zw&&document.addEventListener(`click`,function(e){if(FT)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),FT=!1,!1},!0);var sE=function(e){if(bT){e=e.touches?e.touches[0]:e;var t=soe(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[pT]._onDragOver(n)}}},coe=function(e){bT&&bT.parentNode[pT]._isOutsideThisEl(e.target)};function cE(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw`Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;this.el=e,this.options=t=jw({},t),e[pT]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?`>li`:`>*`,swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return rE(e,this.options)},ghostClass:`sortable-ghost`,chosenClass:`sortable-chosen`,dragClass:`sortable-drag`,ignore:`a, img`,filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData(`Text`,t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:`data-id`,delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:`sortable-fallback`,fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:cE.supportPointer!==!1&&`PointerEvent`in window&&(!Lw||Rw),emptyInsertThreshold:5};for(var r in gT.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var i in iE(t),this)i.charAt(0)===`_`&&typeof this[i]==`function`&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&aoe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Vw(e,`pointerdown`,this._onTapStart):(Vw(e,`mousedown`,this._onTapStart),Vw(e,`touchstart`,this._onTapStart)),this.nativeDraggable&&(Vw(e,`dragover`,this),Vw(e,`dragenter`,this)),IT.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),jw(this,toe())}cE.prototype={constructor:cE,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(WT=null)},_getDirection:function(e,t){return typeof this.options.direction==`function`?this.options.direction.call(this,e,t,bT):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,a=e.type,o=e.touches&&e.touches[0]||e.pointerType&&e.pointerType===`touch`&&e,s=(o||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,l=r.filter;if(_E(n),!bT&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Lw&&s&&s.tagName.toUpperCase()===`SELECT`)&&(s=Gw(s,r.draggable,n,!1),!(s&&s.animated)&&TT!==s)){if(OT=nT(s),AT=nT(s,r.draggable),typeof l==`function`){if(l.call(this,e,s,this)){yT({sortable:t,rootEl:c,name:`filter`,targetEl:s,toEl:n,fromEl:n}),vT(`filter`,t,{evt:e}),i&&e.preventDefault();return}}else if(l&&(l=l.split(`,`).some(function(r){if(r=Gw(c,r.trim(),n,!1),r)return yT({sortable:t,rootEl:r,name:`filter`,targetEl:s,fromEl:n,toEl:n}),vT(`filter`,t,{evt:e}),!0}),l)){i&&e.preventDefault();return}(!r.handle||Gw(c,r.handle,n,!1))&&this._prepareDragStart(e,o,s)}}},_prepareDragStart:function(e,t,n){var r=this,i=r.el,a=r.options,o=i.ownerDocument,s;if(n&&!bT&&n.parentNode===i){var c=Qw(n);if(CT=i,bT=n,xT=bT.parentNode,wT=bT.nextSibling,TT=n,MT=a.group,cE.dragged=bT,LT={target:bT,clientX:(t||e).clientX,clientY:(t||e).clientY},VT=LT.clientX-c.left,HT=LT.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,bT.style[`will-change`]=`all`,s=function(){if(vT(`delayEnded`,r,{evt:e}),cE.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Iw&&r.nativeDraggable&&(bT.draggable=!0),r._triggerDragStart(e,t),yT({sortable:r,name:`choose`,originalEvent:e}),qw(bT,a.chosenClass,!0)},a.ignore.split(`,`).forEach(function(e){Xw(bT,e.trim(),uE)}),Vw(o,`dragover`,sE),Vw(o,`mousemove`,sE),Vw(o,`touchmove`,sE),a.supportPointer?(Vw(o,`pointerup`,r._onDrop),!this.nativeDraggable&&Vw(o,`pointercancel`,r._onDrop)):(Vw(o,`mouseup`,r._onDrop),Vw(o,`touchend`,r._onDrop),Vw(o,`touchcancel`,r._onDrop)),Iw&&this.nativeDraggable&&(this.options.touchStartThreshold=4,bT.draggable=!0),vT(`delayStart`,this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Fw||Pw))){if(cE.eventCanceled){this._onDrop();return}a.supportPointer?(Vw(o,`pointerup`,r._disableDelayedDrag),Vw(o,`pointercancel`,r._disableDelayedDrag)):(Vw(o,`mouseup`,r._disableDelayedDrag),Vw(o,`touchend`,r._disableDelayedDrag),Vw(o,`touchcancel`,r._disableDelayedDrag)),Vw(o,`mousemove`,r._delayedDragTouchMoveHandler),Vw(o,`touchmove`,r._delayedDragTouchMoveHandler),a.supportPointer&&Vw(o,`pointermove`,r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){bT&&uE(bT),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Hw(e,`mouseup`,this._disableDelayedDrag),Hw(e,`touchend`,this._disableDelayedDrag),Hw(e,`touchcancel`,this._disableDelayedDrag),Hw(e,`pointerup`,this._disableDelayedDrag),Hw(e,`pointercancel`,this._disableDelayedDrag),Hw(e,`mousemove`,this._delayedDragTouchMoveHandler),Hw(e,`touchmove`,this._delayedDragTouchMoveHandler),Hw(e,`pointermove`,this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t||=e.pointerType==`touch`&&e,!this.nativeDraggable||t?this.options.supportPointer?Vw(document,`pointermove`,this._onTouchMove):t?Vw(document,`touchmove`,this._onTouchMove):Vw(document,`mousemove`,this._onTouchMove):(Vw(bT,`dragend`,this),Vw(CT,`dragstart`,this._onDragStart));try{document.selection?vE(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(PT=!1,CT&&bT){vT(`dragStarted`,this,{evt:t}),this.nativeDraggable&&Vw(document,`dragover`,coe);var n=this.options;!e&&qw(bT,n.dragClass,!1),qw(bT,n.ghostClass,!0),cE.active=this,e&&this._appendGhost(),yT({sortable:this,name:`start`,originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(RT){this._lastX=RT.clientX,this._lastY=RT.clientY,aE();for(var e=document.elementFromPoint(RT.clientX,RT.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(RT.clientX,RT.clientY),e!==t);)t=e;if(bT.parentNode[pT]._isOutsideThisEl(e),t)do{if(t[pT]){var n=void 0;if(n=t[pT]._onDragOver({clientX:RT.clientX,clientY:RT.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=Ww(t));oE()}},_onTouchMove:function(e){if(LT){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,a=ST&&Yw(ST,!0),o=ST&&a&&a.a,s=ST&&a&&a.d,c=eE&&YT&&rT(YT),l=(i.clientX-LT.clientX+r.x)/(o||1)+(c?c[0]-XT[0]:0)/(o||1),u=(i.clientY-LT.clientY+r.y)/(s||1)+(c?c[1]-XT[1]:0)/(s||1);if(!cE.active&&!PT){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(ST){a?(a.e+=l-(zT||0),a.f+=u-(BT||0)):a={a:1,b:0,c:0,d:1,e:l,f:u};var d=`matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;Jw(ST,`webkitTransform`,d),Jw(ST,`mozTransform`,d),Jw(ST,`msTransform`,d),Jw(ST,`transform`,d),zT=l,BT=u,RT=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!ST){var e=this.options.fallbackOnBody?document.body:CT,t=Qw(bT,!0,eE,!0,e),n=this.options;if(eE){for(YT=e;Jw(YT,`position`)===`static`&&Jw(YT,`transform`)===`none`&&YT!==document;)YT=YT.parentNode;YT!==document.body&&YT!==document.documentElement?(YT===document&&(YT=Zw()),t.top+=YT.scrollTop,t.left+=YT.scrollLeft):YT=Zw(),XT=rT(YT)}ST=bT.cloneNode(!0),qw(ST,n.ghostClass,!1),qw(ST,n.fallbackClass,!0),qw(ST,n.dragClass,!0),Jw(ST,`transition`,``),Jw(ST,`transform`,``),Jw(ST,`box-sizing`,`border-box`),Jw(ST,`margin`,0),Jw(ST,`top`,t.top),Jw(ST,`left`,t.left),Jw(ST,`width`,t.width),Jw(ST,`height`,t.height),Jw(ST,`opacity`,`0.8`),Jw(ST,`position`,eE?`absolute`:`fixed`),Jw(ST,`zIndex`,`100000`),Jw(ST,`pointerEvents`,`none`),cE.ghost=ST,e.appendChild(ST),Jw(ST,`transform-origin`,VT/parseInt(ST.style.width)*100+`% `+HT/parseInt(ST.style.height)*100+`%`)}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,i=n.options;if(vT(`dragStart`,this,{evt:e}),cE.eventCanceled){this._onDrop();return}vT(`setupClone`,this),cE.eventCanceled||(ET=lT(bT),ET.removeAttribute(`id`),ET.draggable=!1,ET.style[`will-change`]=``,this._hideClone(),qw(ET,this.options.chosenClass,!1),cE.clone=ET),n.cloneId=vE(function(){vT(`clone`,n),!cE.eventCanceled&&(n.options.removeCloneOnHide||CT.insertBefore(ET,bT),n._hideClone(),yT({sortable:n,name:`clone`}))}),!t&&qw(bT,i.dragClass,!0),t?(FT=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Hw(document,`mouseup`,n._onDrop),Hw(document,`touchend`,n._onDrop),Hw(document,`touchcancel`,n._onDrop),r&&(r.effectAllowed=`move`,i.setData&&i.setData.call(n,r,bT)),Vw(document,`drop`,n),Jw(bT,`transform`,`translateZ(0)`)),PT=!0,n._dragStartId=vE(n._dragStarted.bind(n,t,e)),Vw(document,`selectstart`,n),UT=!0,window.getSelection().removeAllRanges(),Lw&&Jw(document.body,`user-select`,`none`)},_onDragOver:function(e){var t=this.el,n=e.target,r,i,a,o=this.options,s=o.group,c=cE.active,l=MT===s,u=o.sort,d=NT||c,f,p=this,m=!1;if(ZT)return;function h(o,s){vT(o,p,kw({evt:e,isOwner:l,axis:f?`vertical`:`horizontal`,revert:a,dragRect:r,targetRect:i,canSort:u,fromSortable:d,target:n,completed:_,onMove:function(n,i){return lE(CT,t,bT,r,n,Qw(n),e,i)},changed:v},s))}function g(){h(`dragOverAnimationCapture`),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function _(r){return h(`dragOverCompleted`,{insertion:r}),r&&(l?c._hideClone():c._showClone(p),p!==d&&(qw(bT,NT?NT.options.ghostClass:c.options.ghostClass,!1),qw(bT,o.ghostClass,!0)),NT!==p&&p!==cE.active?NT=p:p===cE.active&&NT&&(NT=null),d===p&&(p._ignoreWhileAnimating=n),p.animateAll(function(){h(`dragOverAnimationComplete`),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(n===bT&&!bT.animated||n===t&&!n.animated)&&(WT=null),!o.dragoverBubble&&!e.rootEl&&n!==document&&(bT.parentNode[pT]._isOutsideThisEl(e.target),!r&&sE(e)),!o.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function v(){kT=nT(bT),jT=nT(bT,o.draggable),yT({sortable:p,name:`change`,toEl:t,newIndex:kT,newDraggableIndex:jT,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=Gw(n,o.draggable,t,!0),h(`dragOver`),cE.eventCanceled)return m;if(bT.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||p._ignoreWhileAnimating===n)return _(!1);if(FT=!1,c&&!o.disabled&&(l?u||(a=xT!==CT):NT===this||(this.lastPutMode=MT.checkPull(this,c,bT,e))&&s.checkPut(this,c,bT,e))){if(f=this._getDirection(e,n)===`vertical`,r=Qw(bT),h(`dragOverValid`),cE.eventCanceled)return m;if(a)return xT=CT,g(),this._hideClone(),h(`revert`),cE.eventCanceled||(wT?CT.insertBefore(bT,wT):CT.appendChild(bT)),_(!0);var y=tT(t,o.draggable);if(!y||pE(e,f,this)&&!y.animated){if(y===bT)return _(!1);if(y&&t===e.target&&(n=y),n&&(i=Qw(n)),lE(CT,t,bT,r,n,i,e,!!n)!==!1)return g(),y&&y.nextSibling?t.insertBefore(bT,y.nextSibling):t.appendChild(bT),xT=t,v(),_(!0)}else if(y&&fE(e,f,this)){var b=eT(t,0,o,!0);if(b===bT)return _(!1);if(n=b,i=Qw(n),lE(CT,t,bT,r,n,i,e,!1)!==!1)return g(),t.insertBefore(bT,b),xT=t,v(),_(!0)}else if(n.parentNode===t){i=Qw(n);var x=0,S,C=bT.parentNode!==t,w=!ooe(bT.animated&&bT.toRect||r,n.animated&&n.toRect||i,f),T=f?`top`:`left`,E=$w(n,`top`,`top`)||$w(bT,`top`,`top`),D=E?E.scrollTop:void 0;WT!==n&&(S=i[T],KT=!1,qT=!w&&o.invertSwap||C),x=mE(e,n,i,f,w?1:o.swapThreshold,o.invertedSwapThreshold==null?o.swapThreshold:o.invertedSwapThreshold,qT,WT===n);var O;if(x!==0){var k=nT(bT);do k-=x,O=xT.children[k];while(O&&(Jw(O,`display`)===`none`||O===ST))}if(x===0||O===n)return _(!1);WT=n,GT=x;var A=n.nextElementSibling,j=!1;j=x===1;var M=lE(CT,t,bT,r,n,i,e,j);if(M!==!1)return(M===1||M===-1)&&(j=M===1),ZT=!0,setTimeout(dE,30),g(),j&&!A?t.appendChild(bT):n.parentNode.insertBefore(bT,j?A:n),E&&cT(E,0,D-E.scrollTop),xT=bT.parentNode,S!==void 0&&!qT&&(JT=Math.abs(S-Qw(n)[T])),v(),_(!0)}if(t.contains(bT))return _(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Hw(document,`mousemove`,this._onTouchMove),Hw(document,`touchmove`,this._onTouchMove),Hw(document,`pointermove`,this._onTouchMove),Hw(document,`dragover`,sE),Hw(document,`mousemove`,sE),Hw(document,`touchmove`,sE)},_offUpEvents:function(){var e=this.el.ownerDocument;Hw(e,`mouseup`,this._onDrop),Hw(e,`touchend`,this._onDrop),Hw(e,`pointerup`,this._onDrop),Hw(e,`pointercancel`,this._onDrop),Hw(e,`touchcancel`,this._onDrop),Hw(document,`selectstart`,this)},_onDrop:function(e){var t=this.el,n=this.options;if(kT=nT(bT),jT=nT(bT,n.draggable),vT(`drop`,this,{evt:e}),xT=bT&&bT.parentNode,kT=nT(bT),jT=nT(bT,n.draggable),cE.eventCanceled){this._nulling();return}PT=!1,qT=!1,KT=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),yE(this.cloneId),yE(this._dragStartId),this.nativeDraggable&&(Hw(document,`drop`,this),Hw(t,`dragstart`,this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Lw&&Jw(document.body,`user-select`,``),Jw(bT,`transform`,``),e&&(UT&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),ST&&ST.parentNode&&ST.parentNode.removeChild(ST),(CT===xT||NT&&NT.lastPutMode!==`clone`)&&ET&&ET.parentNode&&ET.parentNode.removeChild(ET),bT&&(this.nativeDraggable&&Hw(bT,`dragend`,this),uE(bT),bT.style[`will-change`]=``,UT&&!PT&&qw(bT,NT?NT.options.ghostClass:this.options.ghostClass,!1),qw(bT,this.options.chosenClass,!1),yT({sortable:this,name:`unchoose`,toEl:xT,newIndex:null,newDraggableIndex:null,originalEvent:e}),CT===xT?kT!==OT&&kT>=0&&(yT({sortable:this,name:`update`,toEl:xT,originalEvent:e}),yT({sortable:this,name:`sort`,toEl:xT,originalEvent:e})):(kT>=0&&(yT({rootEl:xT,name:`add`,toEl:xT,fromEl:CT,originalEvent:e}),yT({sortable:this,name:`remove`,toEl:xT,originalEvent:e}),yT({rootEl:xT,name:`sort`,toEl:xT,fromEl:CT,originalEvent:e}),yT({sortable:this,name:`sort`,toEl:xT,originalEvent:e})),NT&&NT.save()),cE.active&&((kT==null||kT===-1)&&(kT=OT,jT=AT),yT({sortable:this,name:`end`,toEl:xT,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){vT(`nulling`,this),CT=bT=xT=ST=wT=ET=TT=DT=LT=RT=UT=kT=jT=OT=AT=WT=GT=NT=MT=cE.dragged=cE.ghost=cE.clone=cE.active=null,QT.forEach(function(e){e.checked=!0}),QT.length=zT=BT=0},handleEvent:function(e){switch(e.type){case`drop`:case`dragend`:this._onDrop(e);break;case`dragenter`:case`dragover`:bT&&(this._onDragOver(e),loe(e));break;case`selectstart`:e.preventDefault()}},toArray:function(){for(var e=[],t,n=this.el.children,r=0,i=n.length,a=this.options;r<i;r++)t=n[r],Gw(t,a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||gE(t));return e},sort:function(e,t){var n={},r=this.el;this.toArray().forEach(function(e,t){var i=r.children[t];Gw(i,this.options.draggable,r,!1)&&(n[e]=i)},this),t&&this.captureAnimationState(),e.forEach(function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Gw(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var r=gT.modifyOption(this,e,t);n[e]=r===void 0?t:r,e===`group`&&iE(n)},destroy:function(){vT(`destroy`,this);var e=this.el;e[pT]=null,Hw(e,`mousedown`,this._onTapStart),Hw(e,`touchstart`,this._onTapStart),Hw(e,`pointerdown`,this._onTapStart),this.nativeDraggable&&(Hw(e,`dragover`,this),Hw(e,`dragenter`,this)),Array.prototype.forEach.call(e.querySelectorAll(`[draggable]`),function(e){e.removeAttribute(`draggable`)}),this._onDrop(),this._disableDelayedDragEvents(),IT.splice(IT.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!DT){if(vT(`hideClone`,this),cE.eventCanceled)return;Jw(ET,`display`,`none`),this.options.removeCloneOnHide&&ET.parentNode&&ET.parentNode.removeChild(ET),DT=!0}},_showClone:function(e){if(e.lastPutMode!==`clone`){this._hideClone();return}if(DT){if(vT(`showClone`,this),cE.eventCanceled)return;bT.parentNode==CT&&!this.options.group.revertClone?CT.insertBefore(ET,bT):wT?CT.insertBefore(ET,wT):CT.appendChild(ET),this.options.group.revertClone&&this.animate(bT,ET),Jw(ET,`display`,``),DT=!1}}};function loe(e){e.dataTransfer&&(e.dataTransfer.dropEffect=`move`),e.cancelable&&e.preventDefault()}function lE(e,t,n,r,i,a,o,s){var c,l=e[pT],u=l.options.onMove,d;return window.CustomEvent&&!Pw&&!Fw?c=new CustomEvent(`move`,{bubbles:!0,cancelable:!0}):(c=document.createEvent(`Event`),c.initEvent(`move`,!0,!0)),c.to=t,c.from=e,c.dragged=n,c.draggedRect=r,c.related=i||t,c.relatedRect=a||Qw(t),c.willInsertAfter=s,c.originalEvent=o,e.dispatchEvent(c),u&&(d=u.call(l,c,o)),d}function uE(e){e.draggable=!1}function dE(){ZT=!1}function fE(e,t,n){var r=Qw(eT(n.el,0,n.options,!0)),i=fT(n.el,n.options,ST),a=10;return t?e.clientX<i.left-a||e.clientY<r.top&&e.clientX<r.right:e.clientY<i.top-a||e.clientY<r.bottom&&e.clientX<r.left}function pE(e,t,n){var r=Qw(tT(n.el,n.options.draggable)),i=fT(n.el,n.options,ST),a=10;return t?e.clientX>i.right+a||e.clientY>r.bottom&&e.clientX>r.left:e.clientY>i.bottom+a||e.clientX>r.right&&e.clientY>r.top}function mE(e,t,n,r,i,a,o,s){var c=r?e.clientY:e.clientX,l=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,f=!1;if(!o){if(s&&JT<l*i){if(!KT&&(GT===1?c>u+l*a/2:c<d-l*a/2)&&(KT=!0),KT)f=!0;else if(GT===1?c<u+JT:c>d-JT)return-GT}else if(c>u+l*(1-i)/2&&c<d-l*(1-i)/2)return hE(t)}return f||=o,f&&(c<u+l*a/2||c>d-l*a/2)?c>u+l/2?1:-1:0}function hE(e){return nT(bT)<nT(e)?1:-1}function gE(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function _E(e){QT.length=0;for(var t=e.getElementsByTagName(`input`),n=t.length;n--;){var r=t[n];r.checked&&QT.push(r)}}function vE(e){return setTimeout(e,0)}function yE(e){return clearTimeout(e)}$T&&Vw(document,`touchmove`,function(e){(cE.active||PT)&&e.cancelable&&e.preventDefault()}),cE.utils={on:Vw,off:Hw,css:Jw,find:Xw,is:function(e,t){return!!Gw(e,t,e,!1)},extend:$ae,throttle:sT,closest:Gw,toggleClass:qw,clone:lT,index:nT,nextTick:vE,cancelNextTick:yE,detectDirection:rE,getChild:eT,expando:pT},cE.get=function(e){return e[pT]},cE.mount=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(e){if(!e.prototype||!e.prototype.constructor)throw`Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;e.utils&&(cE.utils=kw(kw({},cE.utils),e.utils)),gT.mount(e)})},cE.create=function(e,t){return new cE(e,t)},cE.version=Zae;var bE=[],xE,SE,CE=!1,wE,TE,EE,DE;function OE(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)e.charAt(0)===`_`&&typeof this[e]==`function`&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?Vw(document,`dragover`,this._handleAutoScroll):this.options.supportPointer?Vw(document,`pointermove`,this._handleFallbackAutoScroll):t.touches?Vw(document,`touchmove`,this._handleFallbackAutoScroll):Vw(document,`mousemove`,this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?Hw(document,`dragover`,this._handleAutoScroll):(Hw(document,`pointermove`,this._handleFallbackAutoScroll),Hw(document,`touchmove`,this._handleFallbackAutoScroll),Hw(document,`mousemove`,this._handleFallbackAutoScroll)),AE(),kE(),eoe()},nulling:function(){EE=SE=xE=CE=DE=wE=TE=null,bE.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(r,i);if(EE=e,t||this.options.forceAutoScrollFallback||Fw||Pw||Lw){jE(e,this.options,a,t);var o=iT(a,!0);CE&&(!DE||r!==wE||i!==TE)&&(DE&&AE(),DE=setInterval(function(){var a=iT(document.elementFromPoint(r,i),!0);a!==o&&(o=a,kE()),jE(e,n.options,a,t)},10),wE=r,TE=i)}else{if(!this.options.bubbleScroll||iT(a,!0)===Zw()){kE();return}jE(e,this.options,iT(a,!1),!1)}}},jw(e,{pluginName:`scroll`,initializeByDefault:!0})}function kE(){bE.forEach(function(e){clearInterval(e.pid)}),bE=[]}function AE(){clearInterval(DE)}var jE=sT(function(e,t,n,r){if(t.scroll){var i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,o=t.scrollSensitivity,s=t.scrollSpeed,c=Zw(),l=!1,u;SE!==n&&(SE=n,kE(),xE=t.scroll,u=t.scrollFn,xE===!0&&(xE=iT(n,!0)));var d=0,f=xE;do{var p=f,m=Qw(p),h=m.top,g=m.bottom,_=m.left,v=m.right,y=m.width,b=m.height,x=void 0,S=void 0,C=p.scrollWidth,w=p.scrollHeight,T=Jw(p),E=p.scrollLeft,D=p.scrollTop;p===c?(x=y<C&&(T.overflowX===`auto`||T.overflowX===`scroll`||T.overflowX===`visible`),S=b<w&&(T.overflowY===`auto`||T.overflowY===`scroll`||T.overflowY===`visible`)):(x=y<C&&(T.overflowX===`auto`||T.overflowX===`scroll`),S=b<w&&(T.overflowY===`auto`||T.overflowY===`scroll`));var O=x&&(Math.abs(v-i)<=o&&E+y<C)-(Math.abs(_-i)<=o&&!!E),k=S&&(Math.abs(g-a)<=o&&D+b<w)-(Math.abs(h-a)<=o&&!!D);if(!bE[d])for(var A=0;A<=d;A++)bE[A]||(bE[A]={});(bE[d].vx!=O||bE[d].vy!=k||bE[d].el!==p)&&(bE[d].el=p,bE[d].vx=O,bE[d].vy=k,clearInterval(bE[d].pid),(O!=0||k!=0)&&(l=!0,bE[d].pid=setInterval(function(){r&&this.layer===0&&cE.active._onTouchMove(EE);var t=bE[this.layer].vy?bE[this.layer].vy*s:0,n=bE[this.layer].vx?bE[this.layer].vx*s:0;(typeof u!=`function`||u.call(cE.dragged.parentNode[pT],n,t,e,EE,bE[this.layer].el)===`continue`)&&cT(bE[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&f!==c&&(f=iT(f,!1)));CE=l}},30),ME=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,i=e.activeSortable,a=e.dispatchSortableEvent,o=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var c=n||i;o();var l=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(l.clientX,l.clientY);s(),c&&!c.el.contains(u)&&(a(`spill`),this.onSpill({dragEl:r,putSortable:n}))}};function NE(){}NE.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=eT(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:ME},jw(NE,{pluginName:`revertOnSpill`});function PE(){}PE.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:ME},jw(PE,{pluginName:`removeOnSpill`});var FE;function IE(){function e(){this.defaults={swapClass:`sortable-swap-highlight`}}return e.prototype={dragStart:function(e){FE=e.dragEl},dragOverValid:function(e){var t=e.completed,n=e.target,r=e.onMove,i=e.activeSortable,a=e.changed,o=e.cancel;if(i.options.swap){var s=this.sortable.el,c=this.options;if(n&&n!==s){var l=FE;r(n)===!1?FE=null:(qw(n,c.swapClass,!0),FE=n),l&&l!==FE&&qw(l,c.swapClass,!1)}a(),t(!0),o()}},drop:function(e){var t=e.activeSortable,n=e.putSortable,r=e.dragEl,i=n||this.sortable,a=this.options;FE&&qw(FE,a.swapClass,!1),FE&&(a.swap||n&&n.options.swap)&&r!==FE&&(i.captureAnimationState(),i!==t&&t.captureAnimationState(),LE(r,FE),i.animateAll(),i!==t&&t.animateAll())},nulling:function(){FE=null}},jw(e,{pluginName:`swap`,eventProperties:function(){return{swapItem:FE}}})}function LE(e,t){var n=e.parentNode,r=t.parentNode,i,a;n&&r&&!n.isEqualNode(t)&&!r.isEqualNode(e)&&(i=nT(e),a=nT(t),n.isEqualNode(r)&&i<a&&a++,n.insertBefore(t,n.children[i]),r.insertBefore(e,r.children[a]))}var RE=[],zE=[],BE,VE,HE=!1,UE=!1,WE=!1,GE,KE,qE;function JE(){function e(e){for(var t in this)t.charAt(0)===`_`&&typeof this[t]==`function`&&(this[t]=this[t].bind(this));e.options.avoidImplicitDeselect||(e.options.supportPointer?Vw(document,`pointerup`,this._deselectMultiDrag):(Vw(document,`mouseup`,this._deselectMultiDrag),Vw(document,`touchend`,this._deselectMultiDrag))),Vw(document,`keydown`,this._checkKeyDown),Vw(document,`keyup`,this._checkKeyUp),this.defaults={selectedClass:`sortable-selected`,multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,n){var r=``;RE.length&&VE===e?RE.forEach(function(e,t){r+=(t?`, `:``)+e.textContent}):r=n.textContent,t.setData(`Text`,r)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){GE=e.dragEl},delayEnded:function(){this.isMultiDrag=~RE.indexOf(GE)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var r=0;r<RE.length;r++)zE.push(lT(RE[r])),zE[r].sortableIndex=RE[r].sortableIndex,zE[r].draggable=!1,zE[r].style[`will-change`]=``,qw(zE[r],this.options.selectedClass,!1),RE[r]===GE&&qw(zE[r],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,r=e.dispatchSortableEvent,i=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||RE.length&&VE===t&&(XE(!0,n),r(`clone`),i()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,r=e.cancel;this.isMultiDrag&&(XE(!1,n),zE.forEach(function(e){Jw(e,`display`,``)}),t(),qE=!1,r())},hideClone:function(e){var t=this;e.sortable;var n=e.cloneNowHidden,r=e.cancel;this.isMultiDrag&&(zE.forEach(function(e){Jw(e,`display`,`none`),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)}),n(),qE=!0,r())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&VE&&VE.multiDrag._deselectMultiDrag(),RE.forEach(function(e){e.sortableIndex=nT(e)}),RE=RE.sort(function(e,t){return e.sortableIndex-t.sortableIndex}),WE=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){RE.forEach(function(e){e!==GE&&Jw(e,`position`,`absolute`)});var r=Qw(GE,!1,!0,!0);RE.forEach(function(e){e!==GE&&uT(e,r)}),UE=!0,HE=!0}n.animateAll(function(){UE=!1,HE=!1,t.options.animation&&RE.forEach(function(e){dT(e)}),t.options.sort&&ZE()})}},dragOver:function(e){var t=e.target,n=e.completed,r=e.cancel;UE&&~RE.indexOf(t)&&(n(!1),r())},revert:function(e){var t=e.fromSortable,n=e.rootEl,r=e.sortable,i=e.dragRect;RE.length>1&&(RE.forEach(function(e){r.addAnimationState({target:e,rect:UE?Qw(e):i}),dT(e),e.fromRect=i,t.removeAnimationState(e)}),UE=!1,YE(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,r=e.insertion,i=e.activeSortable,a=e.parentEl,o=e.putSortable,s=this.options;if(r){if(n&&i._hideClone(),HE=!1,s.animation&&RE.length>1&&(UE||!n&&!i.options.sort&&!o)){var c=Qw(GE,!1,!0,!0);RE.forEach(function(e){e!==GE&&(uT(e,c),a.appendChild(e))}),UE=!0}if(!n){if(UE||ZE(),RE.length>1){var l=qE;i._showClone(t),i.options.animation&&!qE&&l&&zE.forEach(function(e){i.addAnimationState({target:e,rect:KE}),e.fromRect=KE,e.thisAnimationDuration=null})}else i._showClone(t)}}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,r=e.activeSortable;if(RE.forEach(function(e){e.thisAnimationDuration=null}),r.options.animation&&!n&&r.multiDrag.isMultiDrag){KE=jw({},t);var i=Yw(GE,!0);KE.top-=i.f,KE.left-=i.e}},dragOverAnimationComplete:function(){UE&&(UE=!1,ZE())},drop:function(e){var t=e.originalEvent,n=e.rootEl,r=e.parentEl,i=e.sortable,a=e.dispatchSortableEvent,o=e.oldIndex,s=e.putSortable,c=s||this.sortable;if(t){var l=this.options,u=r.children;if(!WE){if(l.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),qw(GE,l.selectedClass,!~RE.indexOf(GE)),~RE.indexOf(GE))RE.splice(RE.indexOf(GE),1),BE=null,_T({sortable:i,rootEl:n,name:`deselect`,targetEl:GE,originalEvent:t});else{if(RE.push(GE),_T({sortable:i,rootEl:n,name:`select`,targetEl:GE,originalEvent:t}),t.shiftKey&&BE&&i.el.contains(BE)){var d=nT(BE),f=nT(GE);~d&&~f&&d!==f&&(function(){var e,a;f>d?(a=d,e=f):(a=f,e=d+1);for(var o=l.filter;a<e;a++)~RE.indexOf(u[a])||Gw(u[a],l.draggable,r,!1)&&(o&&(typeof o==`function`?o.call(i,t,u[a],i):o.split(`,`).some(function(e){return Gw(u[a],e.trim(),r,!1)}))||(qw(u[a],l.selectedClass,!0),RE.push(u[a]),_T({sortable:i,rootEl:n,name:`select`,targetEl:u[a],originalEvent:t})))})()}else BE=GE;VE=c}}if(WE&&this.isMultiDrag){if(UE=!1,(r[pT].options.sort||r!==n)&&RE.length>1){var p=Qw(GE),m=nT(GE,`:not(.`+this.options.selectedClass+`)`);if(!HE&&l.animation&&(GE.thisAnimationDuration=null),c.captureAnimationState(),!HE&&(l.animation&&(GE.fromRect=p,RE.forEach(function(e){if(e.thisAnimationDuration=null,e!==GE){var t=UE?Qw(e):p;e.fromRect=t,c.addAnimationState({target:e,rect:t})}})),ZE(),RE.forEach(function(e){u[m]?r.insertBefore(e,u[m]):r.appendChild(e),m++}),o===nT(GE))){var h=!1;RE.forEach(function(e){if(e.sortableIndex!==nT(e)){h=!0;return}}),h&&(a(`update`),a(`sort`))}RE.forEach(function(e){dT(e)}),c.animateAll()}VE=c}(n===r||s&&s.lastPutMode!==`clone`)&&zE.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)})}},nullingGlobal:function(){this.isMultiDrag=WE=!1,zE.length=0},destroyGlobal:function(){this._deselectMultiDrag(),Hw(document,`pointerup`,this._deselectMultiDrag),Hw(document,`mouseup`,this._deselectMultiDrag),Hw(document,`touchend`,this._deselectMultiDrag),Hw(document,`keydown`,this._checkKeyDown),Hw(document,`keyup`,this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(WE!==void 0&&WE)&&VE===this.sortable&&!(e&&Gw(e.target,this.options.draggable,this.sortable.el,!1))&&!(e&&e.button!==0))for(;RE.length;){var t=RE[0];qw(t,this.options.selectedClass,!1),RE.shift(),_T({sortable:this.sortable,rootEl:this.sortable.el,name:`deselect`,targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},jw(e,{pluginName:`multiDrag`,utils:{select:function(e){var t=e.parentNode[pT];!t||!t.options.multiDrag||~RE.indexOf(e)||(VE&&VE!==t&&(VE.multiDrag._deselectMultiDrag(),VE=t),qw(e,t.options.selectedClass,!0),RE.push(e))},deselect:function(e){var t=e.parentNode[pT],n=RE.indexOf(e);t&&t.options.multiDrag&&~n&&(qw(e,t.options.selectedClass,!1),RE.splice(n,1))}},eventProperties:function(){var e=this,t=[],n=[];return RE.forEach(function(r){t.push({multiDragElement:r,index:r.sortableIndex});var i=UE&&r!==GE?-1:UE?nT(r,`:not(.`+e.options.selectedClass+`)`):nT(r);n.push({multiDragElement:r,index:i})}),{items:Kae(RE),clones:[].concat(zE),oldIndicies:t,newIndicies:n}},optionListeners:{multiDragKey:function(e){return e=e.toLowerCase(),e===`ctrl`?e=`Control`:e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function YE(e,t){RE.forEach(function(n,r){var i=t.children[n.sortableIndex+(e?Number(r):0)];i?t.insertBefore(n,i):t.appendChild(n)})}function XE(e,t){zE.forEach(function(n,r){var i=t.children[n.sortableIndex+(e?Number(r):0)];i?t.insertBefore(n,i):t.appendChild(n)})}function ZE(){RE.forEach(function(e){e!==GE&&e.parentNode&&e.parentNode.removeChild(e)})}cE.mount(new OE),cE.mount(PE,NE),cE.mount(new IE),cE.mount(new JE);var QE={},$E={viewBox:`0 0 133 51`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function eD(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`svg`,$E,[...n[0]||=[(0,t.createStaticVNode)(`<path d="M78.0598 16.2648H61.2682C59.8772 16.2648 58.7495 17.3924 58.7495 18.7835V32.2167C58.7495 33.6078 59.8772 34.7355 61.2682 34.7355H78.0598C79.4508 34.7355 80.5785 33.6078 80.5785 32.2167V18.7835C80.5785 17.3924 79.4508 16.2648 78.0598 16.2648Z" stroke="#F5F5F5" stroke-width="1.67915" stroke-linejoin="round"></path><path d="M73.8618 22.9814C74.7891 22.9814 75.5409 22.2296 75.5409 21.3022C75.5409 20.3748 74.7891 19.623 73.8618 19.623C72.9344 19.623 72.1826 20.3748 72.1826 21.3022C72.1826 22.2296 72.9344 22.9814 73.8618 22.9814Z" stroke="#F5F5F5" stroke-width="1.67915" stroke-miterlimit="10"></path><path d="M72.1827 29.6868L67.4255 24.9385C67.1228 24.6358 66.7159 24.4602 66.288 24.4475C65.8601 24.4348 65.4436 24.586 65.1235 24.8702L58.7495 30.5374M67.9849 34.7353L74.457 28.2632C74.7529 27.9666 75.1491 27.7914 75.5677 27.772C75.9862 27.7526 76.3969 27.8903 76.7191 28.1582L80.5785 31.377" stroke="#F5F5F5" stroke-width="1.67915" stroke-linecap="round" stroke-linejoin="round"></path><path d="M117.267 16.2648H100.475C99.0842 16.2648 97.9565 17.3924 97.9565 18.7835V32.2167C97.9565 33.6078 99.0842 34.7355 100.475 34.7355H117.267C118.658 34.7355 119.786 33.6078 119.786 32.2167V18.7835C119.786 17.3924 118.658 16.2648 117.267 16.2648Z" stroke="#F5F5F5" stroke-width="1.67915" stroke-linejoin="round"></path><path d="M113.069 22.9814C113.997 22.9814 114.748 22.2296 114.748 21.3022C114.748 20.3748 113.997 19.623 113.069 19.623C112.142 19.623 111.39 20.3748 111.39 21.3022C111.39 22.2296 112.142 22.9814 113.069 22.9814Z" stroke="#F5F5F5" stroke-width="1.67915" stroke-miterlimit="10"></path><path d="M111.39 29.6868L106.633 24.9385C106.33 24.6358 105.923 24.4602 105.495 24.4475C105.067 24.4348 104.651 24.586 104.331 24.8702L97.9565 30.5374M107.192 34.7353L113.664 28.2632C113.96 27.9666 114.356 27.7914 114.775 27.772C115.193 27.7526 115.604 27.8903 115.926 28.1582L119.786 31.377" stroke="#F5F5F5" stroke-width="1.67915" stroke-linecap="round" stroke-linejoin="round"></path><circle cx="23.8095" cy="25.5" r="21.0054" stroke="#F5F5F5" stroke-width="1.40647"></circle><path d="M32.2661 16.2648H15.4745C14.0835 16.2648 12.9558 17.3924 12.9558 18.7835V32.2167C12.9558 33.6078 14.0835 34.7355 15.4745 34.7355H32.2661C33.6571 34.7355 34.7848 33.6078 34.7848 32.2167V18.7835C34.7848 17.3924 33.6571 16.2648 32.2661 16.2648Z" stroke="#F5F5F5" stroke-width="1.67915" stroke-linejoin="round"></path><path d="M28.0678 22.9814C28.9952 22.9814 29.747 22.2296 29.747 21.3022C29.747 20.3748 28.9952 19.623 28.0678 19.623C27.1405 19.623 26.3887 20.3748 26.3887 21.3022C26.3887 22.2296 27.1405 22.9814 28.0678 22.9814Z" stroke="#F5F5F5" stroke-width="1.67915" stroke-miterlimit="10"></path><path d="M26.389 29.6868L21.6318 24.9385C21.3291 24.6358 20.9222 24.4602 20.4943 24.4475C20.0664 24.4348 19.6499 24.586 19.3298 24.8702L12.9558 30.5374M22.1912 34.7353L28.6632 28.2632C28.9592 27.9666 29.3554 27.7914 29.774 27.772C30.1925 27.7526 30.6032 27.8903 30.9254 28.1582L34.7848 31.377" stroke="#F5F5F5" stroke-width="1.67915" stroke-linecap="round" stroke-linejoin="round"></path>`,10)]])}var tD=W(QE,[[`render`,eD]]),nD={},rD={viewBox:`0 0 34 34`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function iD(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`svg`,rD,[...n[0]||=[(0,t.createElementVNode)(`path`,{d:`M29.75 17C29.75 9.96094 24.0391 4.25 17 4.25C9.96094 4.25 4.25 9.96094 4.25 17C4.25 24.0391 9.96094 29.75 17 29.75C24.0391 29.75 29.75 24.0391 29.75 17Z`,stroke:`currentColor`,"stroke-width":`2.125`,"stroke-miterlimit":`10`},null,-1),(0,t.createElementVNode)(`path`,{d:`M23.375 11.6875L14.45 22.3125L10.625 18.0625`,stroke:`currentColor`,"stroke-width":`2.125`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,-1)]])}var aD=W(nD,[[`render`,iD]]),oD={},sD={viewBox:`0 0 34 34`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function cD(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`svg`,sD,[...n[0]||=[(0,t.createElementVNode)(`path`,{d:`M19.4305 27.0792L11.4617 5.82921C11.3573 5.55071 11.1704 5.31072 10.9259 5.1413C10.6815 4.97188 10.3912 4.8811 10.0937 4.8811C9.79632 4.8811 9.50599 4.97188 9.26154 5.1413C9.01709 5.31072 8.83018 5.55071 8.72577 5.82921L0.757024 27.0792C0.625226 27.4411 0.641643 27.8403 0.802704 28.1902C0.963765 28.54 1.25644 28.8121 1.61707 28.9472C1.97769 29.0824 2.3771 29.0696 2.7284 28.9118C3.0797 28.754 3.35448 28.4639 3.49296 28.1045L5.89421 21.7016C5.90367 21.6763 5.92063 21.6545 5.94281 21.6391C5.965 21.6236 5.99137 21.6153 6.01839 21.6153H14.1691C14.1961 21.6153 14.2225 21.6236 14.2447 21.6391C14.2669 21.6545 14.2838 21.6763 14.2933 21.7016L16.6945 28.1045C16.833 28.4639 17.1078 28.754 17.4591 28.9118C17.8104 29.0696 18.2098 29.0824 18.5704 28.9472C18.931 28.8121 19.2237 28.54 19.3848 28.1902C19.5458 27.8403 19.5623 27.4411 19.4305 27.0792ZM7.08952 18.5128L9.96956 10.8329C9.97912 10.8077 9.99612 10.786 10.0183 10.7707C10.0405 10.7554 10.0668 10.7472 10.0937 10.7472C10.1207 10.7472 10.147 10.7554 10.1692 10.7707C10.1914 10.786 10.2084 10.8077 10.2179 10.8329L13.098 18.5141C13.1055 18.5342 13.108 18.5558 13.1053 18.5771C13.1027 18.5983 13.0949 18.6186 13.0827 18.6362C13.0705 18.6538 13.0543 18.6682 13.0353 18.6782C13.0163 18.6882 12.9952 18.6934 12.9738 18.6934H7.2137C7.19228 18.6934 7.17118 18.6882 7.1522 18.6782C7.13323 18.6682 7.11695 18.6538 7.10475 18.6362C7.09255 18.6186 7.0848 18.5983 7.08214 18.5771C7.07949 18.5558 7.08202 18.5342 7.08952 18.5141V18.5128Z`,fill:`currentColor`},null,-1),(0,t.createElementVNode)(`path`,{d:`M26.6136 11.2558C23.8432 11.2359 21.3622 12.8409 20.305 15.3331C20.1536 15.6898 20.15 16.092 20.2951 16.4513C20.4402 16.8106 20.722 17.0975 21.0787 17.249C21.4353 17.4004 21.8375 17.404 22.1968 17.2589C22.5561 17.1138 22.843 16.832 22.9945 16.4753C23.5842 15.0881 24.9714 14.1883 26.5353 14.1777C28.6815 14.1631 30.4141 15.9374 30.4141 18.0857C30.4141 18.1115 30.404 18.1364 30.3861 18.155C30.3681 18.1736 30.3436 18.1844 30.3178 18.1853C28.8621 18.2258 27.1356 18.3228 25.595 18.504C21.9592 18.9317 19.7891 20.9139 19.7891 23.8066C19.7891 25.3465 20.3708 26.7285 21.4273 27.7033C22.4188 28.6164 23.7734 29.1191 25.2344 29.1191C27.293 29.1191 29.0654 28.5878 30.4101 27.5771H30.4141C30.4132 27.769 30.4502 27.9591 30.5229 28.1367C30.5955 28.3142 30.7024 28.4758 30.8375 28.612C30.9726 28.7483 31.1332 28.8566 31.3101 28.9308C31.487 29.0049 31.6768 29.0435 31.8687 29.0444C32.0605 29.0452 32.2507 29.0082 32.4282 28.9356C32.6058 28.8629 32.7673 28.756 32.9036 28.6209C33.0398 28.4859 33.1481 28.3253 33.2223 28.1483C33.2965 27.9714 33.3351 27.7816 33.3359 27.5897V18.0937C33.3359 14.3629 30.3477 11.283 26.6136 11.2558ZM25.2344 26.1972C24.0703 26.1972 22.7109 25.571 22.7109 23.8066C22.7109 23.098 22.9653 22.602 23.5364 22.1976C24.0922 21.8038 24.9442 21.5229 25.9363 21.406C27.3388 21.2406 28.9126 21.1497 30.262 21.1092C30.28 21.1091 30.2978 21.1128 30.3144 21.1199C30.331 21.127 30.3459 21.1373 30.3583 21.1504C30.3708 21.1634 30.3804 21.1789 30.3867 21.1957C30.3929 21.2126 30.3957 21.2306 30.3948 21.2486C30.2148 24.5769 28.5188 26.1972 25.2344 26.1972Z`,fill:`currentColor`},null,-1)]])}var lD=W(oD,[[`render`,cD]]),uD={},dD={viewBox:`0 0 34 34`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function fD(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`svg`,dD,[...n[0]||=[(0,t.createElementVNode)(`path`,{d:`M27.625 5.3125H6.375C4.61459 5.3125 3.1875 6.73959 3.1875 8.5V25.5C3.1875 27.2604 4.61459 28.6875 6.375 28.6875H27.625C29.3854 28.6875 30.8125 27.2604 30.8125 25.5V8.5C30.8125 6.73959 29.3854 5.3125 27.625 5.3125Z`,stroke:`currentColor`,"stroke-width":`2.125`,"stroke-linejoin":`round`},null,-1),(0,t.createElementVNode)(`path`,{d:`M22.3125 13.8125C23.4861 13.8125 24.4375 12.8611 24.4375 11.6875C24.4375 10.5139 23.4861 9.5625 22.3125 9.5625C21.1389 9.5625 20.1875 10.5139 20.1875 11.6875C20.1875 12.8611 21.1389 13.8125 22.3125 13.8125Z`,stroke:`currentColor`,"stroke-width":`2.125`,"stroke-miterlimit":`10`},null,-1),(0,t.createElementVNode)(`path`,{d:`M20.1875 22.2986L14.1671 16.2895C13.784 15.9065 13.2691 15.6842 12.7276 15.6682C12.1861 15.6521 11.659 15.8435 11.2539 16.2031L3.1875 23.375`,stroke:`currentColor`,"stroke-width":`2.125`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,-1),(0,t.createElementVNode)(`path`,{d:`M14.875 28.6875L23.0655 20.497C23.4401 20.1216 23.9415 19.8999 24.4712 19.8753C25.0009 19.8508 25.5206 20.0251 25.9283 20.3641L30.8125 24.4375`,stroke:`currentColor`,"stroke-width":`2.125`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,-1)]])}var pD=W(uD,[[`render`,fD]]),mD={},hD={viewBox:`0 0 88 47`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function gD(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`svg`,hD,[...n[0]||=[(0,t.createStaticVNode)(`<path d="M26.3967 27.9008C26.0357 27.5672 25.5053 27.4852 25.0514 27.4086C24.4224 27.3047 24.1818 27.1898 23.8154 26.8617C23.0334 26.1672 23.0334 25.1609 23.8154 24.4664L25.4724 22.9953C28.0099 20.7531 28.0099 17.0781 25.4724 14.8359C23.6021 13.1898 21.092 12.375 18.4834 12.375C15.4373 12.375 12.2545 13.4852 9.79901 15.6617C5.23261 19.6977 5.23261 26.3094 9.79901 30.3453C12.0685 32.3523 15.131 33.3531 18.1607 33.375H18.2537C21.2834 33.375 24.2693 32.3961 26.3912 30.5094C27.1787 29.8148 27.0469 28.5078 26.3967 27.9008Z" stroke="currentColor" stroke-width="1.75" stroke-miterlimit="10"></path><path d="M10.75 22C11.7165 22 12.5 21.2165 12.5 20.25C12.5 19.2835 11.7165 18.5 10.75 18.5C9.7835 18.5 9 19.2835 9 20.25C9 21.2165 9.7835 22 10.75 22Z" fill="currentColor"></path><path d="M11.1875 27.6328C12.154 27.6328 12.9375 26.8493 12.9375 25.8828C12.9375 24.9163 12.154 24.1328 11.1875 24.1328C10.221 24.1328 9.4375 24.9163 9.4375 25.8828C9.4375 26.8493 10.221 27.6328 11.1875 27.6328Z" fill="currentColor"></path><path d="M15.125 18.5C16.0915 18.5 16.875 17.7165 16.875 16.75C16.875 15.7835 16.0915 15 15.125 15C14.1585 15 13.375 15.7835 13.375 16.75C13.375 17.7165 14.1585 18.5 15.125 18.5Z" fill="currentColor"></path><path d="M16.875 31.5703C18.3247 31.5703 19.5 30.3951 19.5 28.9453C19.5 27.4956 18.3247 26.3203 16.875 26.3203C15.4253 26.3203 14.25 27.4956 14.25 28.9453C14.25 30.3951 15.4253 31.5703 16.875 31.5703Z" fill="currentColor"></path><path d="M20.8125 18.5C21.779 18.5 22.5625 17.7165 22.5625 16.75C22.5625 15.7835 21.779 15 20.8125 15C19.846 15 19.0625 15.7835 19.0625 16.75C19.0625 17.7165 19.846 18.5 20.8125 18.5Z" fill="currentColor"></path><path d="M74.5217 28.0258C74.1607 27.6922 73.6303 27.6102 73.1764 27.5336C72.5474 27.4297 72.3068 27.3148 71.9404 26.9867C71.1584 26.2922 71.1584 25.2859 71.9404 24.5914L73.5974 23.1203C76.1349 20.8781 76.1349 17.2031 73.5974 14.9609C71.7271 13.3148 69.217 12.5 66.6084 12.5C63.5623 12.5 60.3795 13.6102 57.924 15.7867C53.3576 19.8227 53.3576 26.4344 57.924 30.4703C60.1935 32.4773 63.256 33.4781 66.2857 33.5H66.3787C69.4084 33.5 72.3943 32.5211 74.5162 30.6344C75.3037 29.9398 75.1719 28.6328 74.5217 28.0258Z" stroke="currentColor" stroke-width="1.75" stroke-miterlimit="10"></path><path d="M58.875 22.125C59.8415 22.125 60.625 21.3415 60.625 20.375C60.625 19.4085 59.8415 18.625 58.875 18.625C57.9085 18.625 57.125 19.4085 57.125 20.375C57.125 21.3415 57.9085 22.125 58.875 22.125Z" fill="currentColor"></path><path d="M59.3125 27.7578C60.279 27.7578 61.0625 26.9743 61.0625 26.0078C61.0625 25.0413 60.279 24.2578 59.3125 24.2578C58.346 24.2578 57.5625 25.0413 57.5625 26.0078C57.5625 26.9743 58.346 27.7578 59.3125 27.7578Z" fill="currentColor"></path><path d="M63.25 18.625C64.2165 18.625 65 17.8415 65 16.875C65 15.9085 64.2165 15.125 63.25 15.125C62.2835 15.125 61.5 15.9085 61.5 16.875C61.5 17.8415 62.2835 18.625 63.25 18.625Z" fill="currentColor"></path><path d="M65 31.6953C66.4497 31.6953 67.625 30.5201 67.625 29.0703C67.625 27.6206 66.4497 26.4453 65 26.4453C63.5503 26.4453 62.375 27.6206 62.375 29.0703C62.375 30.5201 63.5503 31.6953 65 31.6953Z" fill="currentColor"></path><path d="M68.9375 18.625C69.904 18.625 70.6875 17.8415 70.6875 16.875C70.6875 15.9085 69.904 15.125 68.9375 15.125C67.971 15.125 67.1875 15.9085 67.1875 16.875C67.1875 17.8415 67.971 18.625 68.9375 18.625Z" fill="currentColor"></path><circle cx="65" cy="23" r="21.25" stroke="currentColor" stroke-width="1.5"></circle>`,13)]])}var _D=W(mD,[[`render`,gD]]),vD={},yD={viewBox:`0 0 100 25`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function bD(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`svg`,yD,[...n[0]||=[(0,t.createElementVNode)(`rect`,{x:`0.671875`,y:`0.671875`,width:`98.0938`,height:`22.8438`,rx:`3.35938`,stroke:`currentColor`,"stroke-width":`1.34375`},null,-1),(0,t.createElementVNode)(`path`,{d:`M80.625 1.34375V22.8437`,stroke:`currentColor`,"stroke-width":`1.34375`},null,-1),(0,t.createElementVNode)(`path`,{d:`M11.2274 16.6757C10.6811 16.6757 10.1588 16.5938 9.66031 16.4299C9.16185 16.2592 8.76922 16.0407 8.48244 15.7744L8.8614 14.9755C9.13453 15.2144 9.48277 15.4125 9.90613 15.5695C10.3295 15.7266 10.7699 15.8051 11.2274 15.8051C11.6439 15.8051 11.9819 15.7573 12.2414 15.6617C12.5009 15.5661 12.692 15.4364 12.815 15.2725C12.9379 15.1018 12.9993 14.9106 12.9993 14.6989C12.9993 14.4531 12.9174 14.2551 12.7535 14.1049C12.5965 13.9546 12.3882 13.8351 12.1287 13.7464C11.8761 13.6508 11.5961 13.5688 11.2888 13.5006C10.9816 13.4323 10.6709 13.3537 10.3568 13.265C10.0495 13.1694 9.76615 13.0499 9.50667 12.9065C9.25403 12.7631 9.04918 12.5719 8.89213 12.3329C8.73508 12.0871 8.65656 11.773 8.65656 11.3906C8.65656 11.0219 8.75215 10.6839 8.94334 10.3766C9.14136 10.0625 9.4418 9.81331 9.84467 9.62894C10.2544 9.43775 10.7733 9.34216 11.4015 9.34216C11.818 9.34216 12.2311 9.39678 12.6408 9.50604C13.0505 9.61529 13.4056 9.77234 13.706 9.97718L13.368 10.7966C13.0608 10.5917 12.7364 10.4449 12.395 10.3562C12.0536 10.2606 11.7224 10.2128 11.4015 10.2128C10.9986 10.2128 10.6675 10.264 10.408 10.3664C10.1485 10.4688 9.95734 10.6054 9.83443 10.7761C9.71835 10.9468 9.66031 11.138 9.66031 11.3497C9.66031 11.6023 9.73883 11.8037 9.89588 11.954C10.0598 12.1042 10.268 12.2237 10.5207 12.3124C10.7801 12.4012 11.0635 12.4831 11.3708 12.5583C11.6781 12.6265 11.9853 12.7051 12.2926 12.7938C12.6067 12.8826 12.8901 12.9987 13.1427 13.1421C13.4022 13.2855 13.6104 13.4767 13.7675 13.7156C13.9245 13.9546 14.0031 14.2619 14.0031 14.6375C14.0031 14.9994 13.9041 15.3374 13.706 15.6515C13.508 15.9587 13.2008 16.208 12.7842 16.3991C12.3745 16.5835 11.8556 16.6757 11.2274 16.6757ZM17.7732 16.6552C17.1928 16.6552 16.6807 16.5357 16.2369 16.2967C15.7999 16.0577 15.4584 15.73 15.2126 15.3135C14.9736 14.8969 14.8541 14.419 14.8541 13.8795C14.8541 13.3401 14.9702 12.8621 15.2024 12.4456C15.4414 12.0291 15.7657 11.7047 16.1754 11.4726C16.5919 11.2336 17.0597 11.1141 17.5786 11.1141C18.1044 11.1141 18.5687 11.2302 18.9716 11.4623C19.3744 11.6945 19.6885 12.0222 19.9139 12.4456C20.146 12.8621 20.2621 13.3503 20.2621 13.9103C20.2621 13.9512 20.2587 13.999 20.2519 14.0536C20.2519 14.1083 20.2485 14.1595 20.2416 14.2073H15.6223V13.5006H19.7295L19.3301 13.7464C19.3369 13.3981 19.2652 13.0874 19.115 12.8143C18.9647 12.5412 18.7565 12.3295 18.4902 12.1793C18.2307 12.0222 17.9269 11.9437 17.5786 11.9437C17.2372 11.9437 16.9333 12.0222 16.667 12.1793C16.4007 12.3295 16.1925 12.5446 16.0423 12.8246C15.892 13.0977 15.8169 13.4118 15.8169 13.7669V13.9307C15.8169 14.2926 15.8989 14.617 16.0627 14.9038C16.2335 15.1837 16.469 15.4022 16.7695 15.5593C17.0699 15.7163 17.4147 15.7948 17.8039 15.7948C18.1249 15.7948 18.4151 15.7402 18.6745 15.631C18.9408 15.5217 19.173 15.3578 19.371 15.1393L19.9139 15.7744C19.6681 16.0611 19.3608 16.2797 18.9921 16.4299C18.6302 16.5801 18.2239 16.6552 17.7732 16.6552ZM21.6275 16.5938V8.99392H22.6107V16.5938H21.6275ZM26.9053 16.6552C26.3249 16.6552 25.8128 16.5357 25.369 16.2967C24.932 16.0577 24.5906 15.73 24.3447 15.3135C24.1057 14.8969 23.9863 14.419 23.9863 13.8795C23.9863 13.3401 24.1023 12.8621 24.3345 12.4456C24.5735 12.0291 24.8978 11.7047 25.3075 11.4726C25.724 11.2336 26.1918 11.1141 26.7107 11.1141C27.2365 11.1141 27.7008 11.2302 28.1037 11.4623C28.5065 11.6945 28.8206 12.0222 29.046 12.4456C29.2781 12.8621 29.3942 13.3503 29.3942 13.9103C29.3942 13.9512 29.3908 13.999 29.384 14.0536C29.384 14.1083 29.3806 14.1595 29.3737 14.2073H24.7544V13.5006H28.8616L28.4622 13.7464C28.469 13.3981 28.3973 13.0874 28.2471 12.8143C28.0969 12.5412 27.8886 12.3295 27.6223 12.1793C27.3628 12.0222 27.059 11.9437 26.7107 11.9437C26.3693 11.9437 26.0655 12.0222 25.7991 12.1793C25.5328 12.3295 25.3246 12.5446 25.1744 12.8246C25.0241 13.0977 24.949 13.4118 24.949 13.7669V13.9307C24.949 14.2926 25.031 14.617 25.1949 14.9038C25.3656 15.1837 25.6011 15.4022 25.9016 15.5593C26.202 15.7163 26.5468 15.7948 26.9361 15.7948C27.257 15.7948 27.5472 15.7402 27.8067 15.631C28.073 15.5217 28.3051 15.3578 28.5031 15.1393L29.046 15.7744C28.8002 16.0611 28.4929 16.2797 28.1242 16.4299C27.7623 16.5801 27.356 16.6552 26.9053 16.6552ZM33.1256 16.6552C32.5725 16.6552 32.0774 16.5357 31.6404 16.2967C31.2102 16.0577 30.8722 15.73 30.6264 15.3135C30.3806 14.8969 30.2577 14.419 30.2577 13.8795C30.2577 13.3401 30.3806 12.8621 30.6264 12.4456C30.8722 12.0291 31.2102 11.7047 31.6404 11.4726C32.0774 11.2336 32.5725 11.1141 33.1256 11.1141C33.6172 11.1141 34.0542 11.2131 34.4366 11.4111C34.8258 11.6023 35.1262 11.8891 35.3379 12.2715L34.5902 12.7529C34.4127 12.4866 34.1942 12.292 33.9347 12.169C33.6821 12.0393 33.4089 11.9744 33.1153 11.9744C32.7602 11.9744 32.4427 12.053 32.1628 12.21C31.8828 12.3671 31.6609 12.589 31.497 12.8758C31.3331 13.1557 31.2512 13.4903 31.2512 13.8795C31.2512 14.2687 31.3331 14.6067 31.497 14.8935C31.6609 15.1803 31.8828 15.4022 32.1628 15.5593C32.4427 15.7163 32.7602 15.7948 33.1153 15.7948C33.4089 15.7948 33.6821 15.7334 33.9347 15.6105C34.1942 15.4807 34.4127 15.2827 34.5902 15.0164L35.3379 15.4876C35.1262 15.8631 34.8258 16.1533 34.4366 16.3582C34.0542 16.5562 33.6172 16.6552 33.1256 16.6552ZM38.545 16.6552C37.9988 16.6552 37.5754 16.5084 37.275 16.2148C36.9746 15.9212 36.8243 15.5012 36.8243 14.955V9.97718H37.8076V14.914C37.8076 15.2076 37.8793 15.4329 38.0227 15.59C38.1729 15.747 38.3846 15.8256 38.6577 15.8256C38.965 15.8256 39.221 15.7402 39.4259 15.5695L39.7332 16.2762C39.5829 16.406 39.402 16.5016 39.1903 16.563C38.9855 16.6245 38.7704 16.6552 38.545 16.6552ZM35.9025 11.9744V11.1653H39.3644V11.9744H35.9025ZM47.0423 16.5938V15.4466L46.9911 15.2315V13.2752C46.9911 12.8587 46.8682 12.5378 46.6224 12.3124C46.3834 12.0803 46.0215 11.9642 45.5367 11.9642C45.2157 11.9642 44.9016 12.0188 44.5944 12.1281C44.2871 12.2305 44.0276 12.3705 43.8159 12.548L43.4063 11.8106C43.6862 11.5852 44.0208 11.4145 44.41 11.2984C44.806 11.1755 45.2191 11.1141 45.6493 11.1141C46.3936 11.1141 46.9672 11.295 47.37 11.6569C47.7729 12.0188 47.9743 12.5719 47.9743 13.3162V16.5938H47.0423ZM45.2601 16.6552C44.8573 16.6552 44.5022 16.5869 44.1949 16.4504C43.8945 16.3138 43.6623 16.126 43.4984 15.887C43.3346 15.6412 43.2526 15.3647 43.2526 15.0574C43.2526 14.7638 43.3209 14.4975 43.4575 14.2585C43.6009 14.0195 43.8296 13.8283 44.1437 13.6849C44.4646 13.5415 44.8948 13.4698 45.4342 13.4698H47.155V14.1766H45.4752C44.9836 14.1766 44.6524 14.2585 44.4817 14.4224C44.311 14.5862 44.2256 14.7843 44.2256 15.0164C44.2256 15.2827 44.3315 15.4978 44.5432 15.6617C44.7548 15.8187 45.0484 15.8973 45.424 15.8973C45.7927 15.8973 46.1136 15.8153 46.3868 15.6515C46.6667 15.4876 46.8682 15.2486 46.9911 14.9345L47.1857 15.6105C47.0559 15.9314 46.8272 16.1875 46.4994 16.3787C46.1717 16.563 45.7586 16.6552 45.2601 16.6552ZM54.1117 16.5938V10.3152H51.6535V9.4241H57.5838V10.3152H55.1257V16.5938H54.1117ZM60.4131 16.6552C59.8327 16.6552 59.3205 16.5357 58.8767 16.2967C58.4397 16.0577 58.0983 15.73 57.8525 15.3135C57.6135 14.8969 57.494 14.419 57.494 13.8795C57.494 13.3401 57.6101 12.8621 57.8422 12.4456C58.0812 12.0291 58.4056 11.7047 58.8152 11.4726C59.2318 11.2336 59.6995 11.1141 60.2184 11.1141C60.7442 11.1141 61.2085 11.2302 61.6114 11.4623C62.0143 11.6945 62.3284 12.0222 62.5537 12.4456C62.7859 12.8621 62.9019 13.3503 62.9019 13.9103C62.9019 13.9512 62.8985 13.999 62.8917 14.0536C62.8917 14.1083 62.8883 14.1595 62.8815 14.2073H58.2622V13.5006H62.3693L61.9699 13.7464C61.9767 13.3981 61.905 13.0874 61.7548 12.8143C61.6046 12.5412 61.3963 12.3295 61.13 12.1793C60.8705 12.0222 60.5667 11.9437 60.2184 11.9437C59.877 11.9437 59.5732 12.0222 59.3069 12.1793C59.0406 12.3295 58.8323 12.5446 58.6821 12.8246C58.5319 13.0977 58.4568 13.4118 58.4568 13.7669V13.9307C58.4568 14.2926 58.5387 14.617 58.7026 14.9038C58.8733 15.1837 59.1089 15.4022 59.4093 15.5593C59.7097 15.7163 60.0546 15.7948 60.4438 15.7948C60.7647 15.7948 61.0549 15.7402 61.3144 15.631C61.5807 15.5217 61.8128 15.3578 62.0109 15.1393L62.5537 15.7744C62.3079 16.0611 62.0006 16.2797 61.6319 16.4299C61.27 16.5801 60.8637 16.6552 60.4131 16.6552ZM63.3286 16.5938L65.6639 13.562L65.6536 14.0639L63.431 11.1653H64.527L66.2272 13.3981H65.8073L67.5075 11.1653H68.5829L66.3296 14.0844L66.3399 13.562L68.6956 16.5938H67.5792L65.7868 14.2175L66.1862 14.279L64.4245 16.5938H63.3286ZM71.6327 16.6552C71.0864 16.6552 70.6631 16.5084 70.3626 16.2148C70.0622 15.9212 69.912 15.5012 69.912 14.955V9.97718H70.8952V14.914C70.8952 15.2076 70.9669 15.4329 71.1103 15.59C71.2605 15.747 71.4722 15.8256 71.7453 15.8256C72.0526 15.8256 72.3087 15.7402 72.5135 15.5695L72.8208 16.2762C72.6706 16.406 72.4896 16.5016 72.278 16.563C72.0731 16.6245 71.858 16.6552 71.6327 16.6552ZM68.9902 11.9744V11.1653H72.4521V11.9744H68.9902Z`,fill:`currentColor`},null,-1),(0,t.createElementVNode)(`path`,{d:`M85.9375 10.2656L89.5938 13.9219L93.25 10.2656`,stroke:`currentColor`,"stroke-width":`1.21875`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,-1)]])}var xD=W(vD,[[`render`,bD]]),SD={},CD={viewBox:`0 0 32 32`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function wD(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`svg`,CD,[...n[0]||=[(0,t.createStaticVNode)(`<path d="M23 8H28" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M4 8H19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M23 24H28" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M4 24H19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M13 16H28" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M4 16H9" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 10C22.1046 10 23 9.10457 23 8C23 6.89543 22.1046 6 21 6C19.8954 6 19 6.89543 19 8C19 9.10457 19.8954 10 21 10Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11 18C12.1046 18 13 17.1046 13 16C13 14.8954 12.1046 14 11 14C9.89543 14 9 14.8954 9 16C9 17.1046 9.89543 18 11 18Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 26C22.1046 26 23 25.1046 23 24C23 22.8954 22.1046 22 21 22C19.8954 22 19 22.8954 19 24C19 25.1046 19.8954 26 21 26Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,9)]])}var TD=W(SD,[[`render`,wD]]),ED={},DD={viewBox:`0 0 34 34`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function OD(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`svg`,DD,[...n[0]||=[(0,t.createStaticVNode)(`<path d="M10.625 9.5625H29.75" stroke="currentColor" stroke-width="2.125" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.625 17H29.75" stroke="currentColor" stroke-width="2.125" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.625 24.4375H29.75" stroke="currentColor" stroke-width="2.125" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.3125 10.625C5.8993 10.625 6.375 10.1493 6.375 9.5625C6.375 8.9757 5.8993 8.5 5.3125 8.5C4.7257 8.5 4.25 8.9757 4.25 9.5625C4.25 10.1493 4.7257 10.625 5.3125 10.625Z" stroke="currentColor" stroke-width="2.125" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.3125 18.0625C5.8993 18.0625 6.375 17.5868 6.375 17C6.375 16.4132 5.8993 15.9375 5.3125 15.9375C4.7257 15.9375 4.25 16.4132 4.25 17C4.25 17.5868 4.7257 18.0625 5.3125 18.0625Z" stroke="currentColor" stroke-width="2.125" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.3125 25.5C5.8993 25.5 6.375 25.0243 6.375 24.4375C6.375 23.8507 5.8993 23.375 5.3125 23.375C4.7257 23.375 4.25 23.8507 4.25 24.4375C4.25 25.0243 4.7257 25.5 5.3125 25.5Z" stroke="currentColor" stroke-width="2.125" stroke-linecap="round" stroke-linejoin="round"></path>`,6)]])}var kD=W(ED,[[`render`,OD]]),AD={},jD={viewBox:`0 0 34 34`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function MD(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`svg`,jD,[...n[0]||=[(0,t.createStaticVNode)(`<path d="M10.625 9.5625H29.75" stroke="currentColor" stroke-width="2.125" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.625 17H29.75" stroke="currentColor" stroke-width="2.125" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.625 24.4375H29.75" stroke="currentColor" stroke-width="2.125" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.3125 10.625C5.8993 10.625 6.375 10.1493 6.375 9.5625C6.375 8.9757 5.8993 8.5 5.3125 8.5C4.7257 8.5 4.25 8.9757 4.25 9.5625C4.25 10.1493 4.7257 10.625 5.3125 10.625Z" stroke="currentColor" stroke-width="2.125" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.3125 18.0625C5.8993 18.0625 6.375 17.5868 6.375 17C6.375 16.4132 5.8993 15.9375 5.3125 15.9375C4.7257 15.9375 4.25 16.4132 4.25 17C4.25 17.5868 4.7257 18.0625 5.3125 18.0625Z" stroke="currentColor" stroke-width="2.125" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.3125 25.5C5.8993 25.5 6.375 25.0243 6.375 24.4375C6.375 23.8507 5.8993 23.375 5.3125 23.375C4.7257 23.375 4.25 23.8507 4.25 24.4375C4.25 25.0243 4.7257 25.5 5.3125 25.5Z" stroke="currentColor" stroke-width="2.125" stroke-linecap="round" stroke-linejoin="round"></path>`,6)]])}var ND=W(AD,[[`render`,MD]]),PD={},FD={viewBox:`0 0 34 34`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function ID(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`svg`,FD,[...n[0]||=[(0,t.createElementVNode)(`path`,{d:`M28.8735 9.14082L18.955 4.61855C17.8799 4.12715 16.1201 4.12715 15.045 4.61855L5.13323 9.14082C3.96448 9.67207 3.96448 10.5413 5.13323 11.0726L14.9614 15.555C16.083 16.0663 17.9291 16.0663 19.0507 15.555L28.8788 11.0726C30.0422 10.5413 30.0422 9.67141 28.8735 9.14082Z`,stroke:`currentColor`,"stroke-width":`2.125`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,-1),(0,t.createElementVNode)(`path`,{d:`M10.625 20.4878L5.13323 22.9521C3.96448 23.4834 3.96448 24.3533 5.13323 24.8845L14.9614 29.367C16.083 29.8776 17.9291 29.8776 19.0507 29.367L28.8788 24.8845C30.0475 24.3533 30.0475 23.4834 28.8788 22.9521L23.5703 20.3975`,stroke:`currentColor`,"stroke-width":`2.125`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,-1),(0,t.createElementVNode)(`path`,{d:`M10.625 13.5789L5.12656 16.0465C3.95781 16.5778 3.95781 17.4477 5.12656 17.9789L14.9547 22.4607C16.0763 22.972 17.9224 22.972 19.044 22.4607L28.8721 17.9789C30.0475 17.4477 30.0475 16.5778 28.8788 16.0465L23.375 13.5789`,stroke:`currentColor`,"stroke-width":`2.125`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,-1)]])}var LD=W(PD,[[`render`,ID]]),RD={},zD={width:`34`,height:`34`,viewBox:`0 0 34 34`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function BD(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`svg`,zD,[...n[0]||=[(0,t.createElementVNode)(`path`,{d:`M27.4696 16.3427H25.6328C25.5976 16.3427 25.5638 16.3287 25.5389 16.3038C25.514 16.2789 25.5 16.2451 25.5 16.2099V11.0806C25.5 10.3962 25.2281 9.73986 24.7442 9.25591C24.2602 8.77197 23.6039 8.50009 22.9195 8.50009H17.7902C17.755 8.50009 17.7212 8.48609 17.6963 8.46119C17.6714 8.43628 17.6574 8.4025 17.6574 8.36728V6.53048C17.6574 4.72821 16.2297 3.21946 14.4274 3.18825C13.9908 3.18058 13.557 3.25995 13.1513 3.42172C12.7456 3.58349 12.3763 3.82443 12.0647 4.13048C11.7532 4.43652 11.5057 4.80155 11.3367 5.20426C11.1677 5.60697 11.0807 6.0393 11.0805 6.47602V8.36728C11.0805 8.4025 11.0666 8.43628 11.0416 8.46119C11.0167 8.48609 10.983 8.50009 10.9477 8.50009H5.81852C5.12137 8.50219 4.45338 8.78006 3.96043 9.27302C3.46747 9.76597 3.1896 10.434 3.1875 11.1311V15.8048C3.1875 15.84 3.20149 15.8738 3.2264 15.8987C3.25131 15.9236 3.28509 15.9376 3.32031 15.9376H5.1073C7.05766 15.9376 8.67199 17.6296 8.69922 19.58C8.72711 21.5635 7.13801 23.3751 5.16043 23.3751H3.32031C3.28509 23.3751 3.25131 23.3891 3.2264 23.414C3.20149 23.4389 3.1875 23.4727 3.1875 23.5079V28.1816C3.1896 28.8787 3.46747 29.5467 3.96043 30.0397C4.45338 30.5326 5.12137 30.8105 5.81852 30.8126H10.4922C10.5274 30.8126 10.5612 30.7986 10.5861 30.7737C10.611 30.7488 10.625 30.715 10.625 30.6798V29.2899C10.625 27.2791 12.2686 25.5479 14.2773 25.5008C16.2762 25.4543 18.0625 26.8495 18.0625 28.8397V30.6798C18.0625 30.715 18.0765 30.7488 18.1014 30.7737C18.1263 30.7986 18.1601 30.8126 18.1953 30.8126H22.9195C23.6039 30.8126 24.2602 30.5407 24.7442 30.0568C25.2281 29.5728 25.5 28.9164 25.5 28.232V23.0524C25.5 23.0171 25.514 22.9833 25.5389 22.9584C25.5638 22.9335 25.5976 22.9195 25.6328 22.9195H27.5241C29.3589 22.9195 30.8125 21.4141 30.8125 19.5727C30.8125 17.7312 29.2719 16.3427 27.4696 16.3427Z`,stroke:`currentColor`,"stroke-width":`2.125`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,-1)]])}var VD=W(RD,[[`render`,BD]]),HD={},UD={width:`34`,height:`34`,viewBox:`0 0 34 34`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function WD(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`svg`,UD,[...n[0]||=[(0,t.createStaticVNode)(`<g clip-path="url(#clip0_21_4524)"><path d="M17.4196 13.6626L5.01172 26.0679C4.20992 26.871 3.59375 30.4062 3.59375 30.4062C3.59375 30.4062 7.09871 29.8204 7.93209 28.9883L20.3387 16.5817" stroke="currentColor" stroke-width="2.0625" stroke-linecap="round" stroke-linejoin="round"></path><path d="M24.716 15.1217L18.8782 9.28399C18.072 8.47778 16.765 8.47768 15.9589 9.28377C15.1528 10.0899 15.1529 11.3969 15.9591 12.2031L21.7969 18.0408C22.6031 18.847 23.9101 18.8471 24.7162 18.041C25.5223 17.235 25.5222 15.9279 24.716 15.1217Z" stroke="currentColor" stroke-width="2.0625" stroke-linecap="round" stroke-linejoin="round"></path><path d="M19.1856 9.58781C19.1856 9.58781 20.5114 10.1402 21.5846 9.06703L25.1082 4.51471C26.3006 3.26367 28.2832 3.31008 29.4872 4.51471C30.6911 5.71869 30.7337 7.66066 29.4872 8.89301L24.9316 12.4167C23.9229 13.4254 24.4108 14.8156 24.4108 14.8156" stroke="currentColor" stroke-width="2.0625" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7.93211 28.9882C7.93211 28.9882 6.22539 30.1059 5.06008 28.9412C3.89477 27.7765 5.01174 26.0679 5.01174 26.0679" stroke="currentColor" stroke-width="2.0625" stroke-linecap="round" stroke-linejoin="round"></path></g><defs><clipPath id="clip0_21_4524"><rect width="34" height="34" fill="white"></rect></clipPath></defs>`,2)]])}var GD=W(HD,[[`render`,WD]]);function KD(e){let t=[];function n(e,r){for(let r of e)r.type===`Group`?n(r.props.fields,r):t.push(r)}return n(e),t}function qD(e,t){return{...Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t.value[n]])),...Object.fromEntries(Object.entries(e).map(([n])=>[`onUpdate:${n}`,r=>{t.value[e[n]]=r}]))}}var JD={Image:1,Checkbox:.2,Text:1,Select:1,Group:1,ImageAdjust:1,Color:1,Number:1,Map:1,Collection:1,ImageEdit:1,SelectColor:1,SelectImage:1,SelectText:1,Instruction:1,Logo:1};function YD(e){let t=[];function n(e,r){let i=1;for(let a of e)if(a.type===`Group`)n(a.props.fields,a);else{let e=JD[a.type]??1;e+i<=1?(t[t.length-1].fields.push(a),i+=e):(t.push({fields:[a],originalField:r}),i=e)}}return n(e),t}function XD(e){return{mobileFields:(0,t.computed)(()=>YD(e.value).map(e=>({originalField:e.originalField,fields:e.fields})))}}function ZD(e){let n=(0,t.inject)(`data`),r=(0,t.inject)(`bridge`);r||console.error(`bridge is not provided`);let i=(0,t.inject)(`computedPropEvaluator`);i||console.error(`computedPropEvaluator is not provided`);let a=e=>({...Object.fromEntries(Object.entries(e).map(([e,t])=>[e,n.value?n.value[t]:void 0])),...Object.fromEntries(Object.entries(e).map(([t])=>[`onUpdate:${t}`,r=>{if(!n.value){console.error(`data is not provided`);return}n.value[e[t]]=r}]))});function o(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>typeof t==`function`?[e,i(t)]:[e,t]))}return{fields:e,data:n,bridge:r,modelField:a,wrapFieldProps:o}}function QD(e){if(e.description)return e.description;switch(e.type){case`ImageAdjust`:return e.model.image;case`Group`:return $D(e.props.fields);case`Instruction`:return typeof e.props.instruction==`function`?e.props.instruction():e.props.instruction;case`ImageEdit`:return e.model.modelValue;default:return e.model.modelValue}}function $D(e){return e.map(QD).join(`, `)}var eO={Checkbox:aD,Text:lD,ImageEdit:pD,SelectImage:tD,SelectColor:_D,SelectText:xD,Number:TD,Collection:kD,Instruction:ND,Group:LD,Logo:VD,Color:GD,ImageAdjust:Ry,Image:pD,Select:kD,Map:bte};function tO(e,t){return e.type===`Text`?e.props.richtext.enabled?[{text:`hello world`,format:{}}]:`hello world`:e.type===`Checkbox`?!1:e.type===`Image`?`https://imagedelivery.net/mudX-CmAqIANL8bxoNCToA/0ef44222-cec4-41a9-fa4b-deb327addf00/draftThumb`:e.type===`ImageEdit`?{src:`https://imagedelivery.net/mudX-CmAqIANL8bxoNCToA/0ef44222-cec4-41a9-fa4b-deb327addf00/draftThumb`,innerPos:[0,0],scale:1,innerRotate:0}:e.type===`Group`?{}:e.type===`Collection`?[]:e.type===`ImageAdjust`?t===`image`?`https://imagedelivery.net/mudX-CmAqIANL8bxoNCToA/0ef44222-cec4-41a9-fa4b-deb327addf00/draftThumb`:{scale:1,innerPos:[0,0]}:e.type===`Select`?e.props.options[0].value:e.type===`SelectImage`?{src:`https://imagedelivery.net/mudX-CmAqIANL8bxoNCToA/0ef44222-cec4-41a9-fa4b-deb327addf00/draftThumb`,innerPos:[0,0],scale:1,innerRotate:0}:e.type===`SelectColor`?`#ff0000`:e.type===`SelectText`?`hello world`:null}function nO(e){return{...e,props:Object.fromEntries(Object.entries(e.props).map(([e,t])=>{if(t?.__type__===`function`){let[n]=t.__value__.match(/function anonymous\(\s*\) {\s*return /)??[],r=t.__value__.slice(n.length,-1);for(;r.lastIndexOf(`
165
165
  `)>-1;)r.lastIndexOf(`
166
- `)===r.length-1&&(r=r.slice(0,-1));return[e,Function(`return ${r}`)]}return[e,t]}))}}function rO(e){return{...e,props:Object.fromEntries(Object.entries(e.props).map(([e,t])=>typeof t==`function`?[e,{__type__:`function`,__value__:t.toString()}]:[e,t]))}}function iO(e){let n=eO[e];return(0,t.h)(n,{size:20})}var aO={class:`label`},oO={class:`actions-right`},sO={class:`actions`},cO=W((0,t.defineComponent)({__name:`Collection`,props:(0,t.mergeModels)({layout:{},fields:{},description:{},detailedDescription:{},bridge:{},defaultObject:{},defaultValue:{},mobile:{type:Boolean,default:!1},min:{default:0},max:{default:1/0}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,r=(0,t.ref)(m()),i=(0,t.useModel)(e,`modelValue`),a=(0,t.ref)();(0,t.onMounted)(()=>{a.value&&cE.create(a.value,{animation:500,handle:`.drag-btn`,preventOnFilter:!0,ghostClass:`sortable-ghost`,chosenClass:`sortable-chosen`,dragClass:`sortable-drag`,onUpdate:function(e){h(e.oldIndex,e.newIndex)}})});let o=new WeakMap;function s(e,n){if(typeof e!=`object`||!e)return`idx-${n}`;let r=(0,t.toRaw)(e),i=o.get(r);return i||(i=m(),o.set(r,i)),i}let c=(0,t.ref)(i.value?.[0]?s(i.value[0],0):null);(0,t.watch)(()=>i.value,(e,t)=>{(t?.length??0)===0&&e&&e.length>0&&c.value===null&&(c.value=s(e[0],0))});function l(e,t){return c.value!==null&&s(e,t)===c.value}function u(e,t){let n=s(e,t);c.value=c.value===n?null:n}function d(){if(_.value)return;let e=n.defaultObject??n.defaultValue,t=Object.fromEntries(n.fields.map(t=>Object.entries(t.model).map(([n,r])=>e&&r in e?[r,e[r]]:[r,tO(t,n)])).flat()),r=Gx(e?t:i.value?.[0]??t);i.value=[...i.value??[],r],c.value=s(r,i.value.length-1)}function f(e,t){i.value[e]=t}function p(e){if(v.value)return;let t=i.value[e];l(t,e)&&(c.value=null),i.value=i.value.filter((t,n)=>n!==e)}function h(e,t){let n=i.value[e];i.value.splice(e,1),i.value.splice(t,0,n),r.value=m()}function g(e){let t=i.value.indexOf(e),r=n.fields.find(e=>e.type===`Text`);return r?e[r.model.modelValue]??`Entry ${t+1}`:`Entry ${t+1}`}let _=(0,t.computed)(()=>i.value instanceof Array&&i.value.length>=n.max),v=(0,t.computed)(()=>i.value instanceof Array&&i.value.length<=n.min);return(n,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`collection-field`,{mobile:e.mobile}])},[(0,t.createElementVNode)(`div`,{ref_key:`entriesListRef`,ref:a,class:`entries-list`},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.value,(n,i)=>((0,t.openBlock)(),(0,t.createBlock)(Rx,{key:s(n,i)+`-`+r.value},(0,t.createSlots)({header:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,{class:`drag-btn swiper-no-swiping`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Ste))]),_:1}),(0,t.createElementVNode)(`div`,aO,(0,t.toDisplayString)(g(n)),1),(0,t.createElementVNode)(`div`,oO,[(0,t.createVNode)(Jv,{circle:``,size:`small`,tertiary:``,onClick:e=>u(n,i)},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[l(n,i)?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ey),{key:0})):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ay),{key:1}))]),_:2},1024)]),_:2},1032,[`onClick`]),(0,t.createVNode)(Jv,{circle:``,size:`small`,tertiary:``,disabled:v.value,onClick:e=>p(i)},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(My))]),_:1})]),_:1},8,[`disabled`,`onClick`])])]),_:2},[l(n,i)?{name:`default`,fn:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`main`,null,[(0,t.createVNode)(Hae,{data:n,"onUpdate:data":e=>f(i,e),fields:e.fields,bridge:e.bridge,layout:e.layout},null,8,[`data`,`onUpdate:data`,`fields`,`bridge`,`layout`])])]),key:`0`}:void 0]),1024))),128))],512),(0,t.createElementVNode)(`div`,sO,[(0,t.createVNode)(Jv,{tertiary:``,disabled:_.value,centered:``,onClick:d},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Xv))]),_:1})]),default:(0,t.withCtx)(()=>[o[0]||=(0,t.createTextVNode)(` Add entry `,-1)]),_:1},8,[`disabled`])])],2))}}),[[`__scopeId`,`data-v-c44cd7d2`]]),lO={class:`map`},uO=W((0,t.defineComponent)({__name:`MapboxMap`,props:{bounds:{},padding:{},mapboxAccessToken:{},mapboxStyle:{},projection:{},bearing:{},pitch:{},synchronousPrecision:{},ratio:{}},emits:[`update:bounds`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.ref)(),{width:o,height:s}=Qi(a),c;(0,t.onMounted)(()=>{}),(0,t.watch)(()=>r.mapboxStyle,()=>{}),(0,t.watch)(()=>r.projection,()=>{}),(0,t.watch)(()=>r.bearing,()=>{}),(0,t.watch)(()=>r.pitch,()=>{}),(0,t.watch)([()=>r.bounds,()=>r.padding],()=>{});let l=(0,t.computed)(()=>o.value&&s.value?o.value/s.value:1),u=(0,t.computed)(()=>{let e=o.value-r.padding[0]-r.padding[2],t=s.value-r.padding[1]-r.padding[3];if(l.value>=r.ratio){let n=t*r.ratio;return{x:r.padding[0]+(e-n)/2,y:r.padding[1]+0,width:n,height:t}}{let n=e/r.ratio;return{x:r.padding[0]+0,y:r.padding[1]+(t-n)/2,width:e,height:n}}}),d=(0,t.ref)();return(0,t.watch)(d,TC(()=>{!Ux(d.value,r.bounds)&&d.value&&i(`update:bounds`,d.value)},100)),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,lO,[(0,t.createElementVNode)(`div`,{ref_key:`mapboxMapRef`,ref:a,class:`mapbox-map`},null,512),u.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`layer`,style:(0,t.normalizeStyle)({"--x":`${u.value.x}px`,"--y":`${u.value.y}px`,"--width":`${u.value.width}px`,"--height":`${u.value.height}px`})},[(0,t.renderSlot)(e.$slots,`layer`,{bounds:d.value,bbox:u.value,map:(0,t.unref)(c)},void 0,!0)],4)):(0,t.createCommentVNode)(``,!0)]))}}),[[`__scopeId`,`data-v-174d2b1e`]]),dO={class:`preview-image`},fO=[`src`],pO={class:`map-wrapper`},mO=W((0,t.defineComponent)({__name:`Map`,props:{modelValue:{},padding:{default:0},mapStyle:{default:`mapbox://styles/mapbox/streets-v11`},mapboxAccessToken:{},type:{default:`popup`},aspectRatio:{}},emits:[`update:model-value`],setup(e,{emit:n}){let r=Uv(),i=e,a=n,o=(0,t.ref)(),{width:s}=Qi(o),c=(0,t.ref)(!1);(0,t.watch)(c,()=>{c.value||(l.value=u.value,a(`update:model-value`,l.value))});let l=(0,t.ref)(i.modelValue),u=(0,t.ref)(i.modelValue),d=TC(e=>{u.value=e,i.type===`inline`&&a(`update:model-value`,u.value)},500);function f(){let e=i.mapStyle?.replace(`mapbox://styles/`,``),t=Math.round(s.value??200);return`https://api.mapbox.com/styles/v1/${e}/static/[${l.value.join(`,`)}]/${t}x${Math.round(t/i.aspectRatio)}@2x?access_token=${i.mapboxAccessToken}`}let p=(0,t.ref)(f());return(0,t.watch)(l,TC(()=>{p.value=f()},500)),(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`mapFieldRef`,ref:o,class:(0,t.normalizeClass)([`field-map`,{[`type-`+e.type]:!0}]),style:(0,t.normalizeStyle)({"--aspect-ratio":e.aspectRatio})},[e.type===`inline`?((0,t.openBlock)(),(0,t.createBlock)(uO,{key:0,bounds:e.modelValue,"onUpdate:bounds":(0,t.unref)(d),bearing:0,pitch:0,"mapbox-access-token":e.mapboxAccessToken,"mapbox-style":e.mapStyle,padding:[e.padding,e.padding,e.padding,e.padding],projection:{name:`globe`},ratio:e.aspectRatio,"synchronous-precision":8},{layer:(0,t.withCtx)(({bounds:e,map:n,bbox:r})=>[e&&n?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`layer-wrapper`,style:(0,t.normalizeStyle)({"--x":`${n.project([e[0],e[1]]).x}px`,"--y":`${n.project([e[2],e[3]]).y}px`,"--width":`${n.project([e[2],e[3]]).x-n.project([e[0],e[1]]).x}px`,"--height":`${n.project([e[0],e[1]]).y-n.project([e[2],e[3]]).y}px`})},[...i[1]||=[(0,t.createElementVNode)(`div`,{class:`overlay`},null,-1),(0,t.createElementVNode)(`div`,{class:`viewport-border`},null,-1)]],4)):(0,t.createCommentVNode)(``,!0)]),_:1},8,[`bounds`,`onUpdate:bounds`,`mapbox-access-token`,`mapbox-style`,`padding`,`ratio`])):((0,t.openBlock)(),(0,t.createBlock)(Lx,{key:1,type:`layer`,transculent:``,show:c.value,"onUpdate:show":i[0]||=e=>c.value=e},{trigger:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,dO,[(0,t.createElementVNode)(`img`,{src:(0,t.unref)(r)(p.value)},null,8,fO)])]),"close-btn":(0,t.withCtx)(()=>[(0,t.createVNode)(Jv,{round:``,tertiary:``,class:`close-btn`},{default:(0,t.withCtx)(()=>[...i[2]||=[(0,t.createTextVNode)(` Done `,-1)]]),_:1})]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,pO,[(0,t.createVNode)(uO,{bounds:e.modelValue,"onUpdate:bounds":(0,t.unref)(d),bearing:0,pitch:0,"mapbox-access-token":e.mapboxAccessToken,"mapbox-style":e.mapStyle,padding:[e.padding,e.padding,e.padding,e.padding],projection:{name:`globe`},ratio:e.aspectRatio,"synchronous-precision":8},{layer:(0,t.withCtx)(({bounds:e,map:n,bbox:r})=>[e&&n?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`layer-wrapper`,style:(0,t.normalizeStyle)({"--x":`${n.project([e[0],e[1]]).x}px`,"--y":`${n.project([e[2],e[3]]).y}px`,"--width":`${n.project([e[2],e[3]]).x-n.project([e[0],e[1]]).x}px`,"--height":`${n.project([e[0],e[1]]).y-n.project([e[2],e[3]]).y}px`})},[...i[3]||=[(0,t.createElementVNode)(`div`,{class:`overlay`},null,-1),(0,t.createElementVNode)(`div`,{class:`viewport-border`},null,-1),(0,t.createElementVNode)(`div`,{class:`marker`},[(0,t.createElementVNode)(`svg`,{version:`1.0`,id:`Layer_1`,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 64 64`,"enable-background":`new 0 0 64 64`,"xml:space":`preserve`},[(0,t.createElementVNode)(`path`,{d:`M32,0C18.746,0,8,10.746,8,24c0,5.219,1.711,10.008,4.555,13.93c0.051,0.094,0.059,0.199,0.117,0.289l16,24 C29.414,63.332,30.664,64,32,64s2.586-0.668,3.328-1.781l16-24c0.059-0.09,0.066-0.195,0.117-0.289C54.289,34.008,56,29.219,56,24 C56,10.746,45.254,0,32,0z M32,32c-4.418,0-8-3.582-8-8s3.582-8,8-8s8,3.582,8,8S36.418,32,32,32z`})])],-1)]],4)):(0,t.createCommentVNode)(``,!0)]),_:1},8,[`bounds`,`onUpdate:bounds`,`mapbox-access-token`,`mapbox-style`,`padding`,`ratio`])])]),_:1},8,[`show`]))],6))}}),[[`__scopeId`,`data-v-935862fa`]]),hO=[`aria-label`,`aria-labelledby`],gO=[`aria-selected`,`tabindex`,`onClick`],_O={key:1},vO=[`aria-label`,`aria-labelledby`],yO=W((0,t.defineComponent)({__name:`BxTabs`,props:(0,t.mergeModels)({tabs:{},secondary:{type:Boolean,default:!1},size:{default:`medium`},fullWidth:{type:Boolean,default:!1},fitWidth:{type:Boolean,default:!1},ariaLabel:{},ariaLabelledby:{}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,r=(0,t.useModel)(e,`modelValue`);!r.value&&n.tabs.length>0&&(r.value=n.tabs[0].name);let i=[];function a(e,t){if(!e){i[t]=void 0;return}let n=e instanceof HTMLElement?e:e.$el;i[t]=n instanceof HTMLElement?n:void 0}function o(e){let t=n.tabs[e];t&&(r.value=t.name,i[e]?.focus())}function s(e){let t=n.tabs.length;if(t===0)return;let i=n.tabs.findIndex(e=>e.name===r.value),a=i<0?0:i,s;switch(e.key){case`ArrowRight`:case`ArrowDown`:s=(a+1)%t;break;case`ArrowLeft`:case`ArrowUp`:s=(a-1+t)%t;break;case`Home`:s=0;break;case`End`:s=t-1;break;default:return}e.preventDefault(),o(s)}return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`bx-tabs-wrapper`,{"full-width":e.fullWidth,"fit-width":e.fitWidth,secondary:e.secondary,[`size-${e.size}`]:!0}])},[e.secondary?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`bx-tabs-secondary`,role:`tablist`,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onKeydown:s},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.tabs,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:n,ref_for:!0,ref:e=>a(e,n),type:`button`,role:`tab`,"aria-selected":r.value===e.name,tabindex:r.value===e.name?0:-1,class:(0,t.normalizeClass)([`tab`,{active:r.value===e.name}]),onClick:t=>r.value=e.name},[e.icon?((0,t.openBlock)(),(0,t.createBlock)(vb,{key:0,class:`tab-icon`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.icon)))]),_:2},1024)):(0,t.createCommentVNode)(``,!0),e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,_O,(0,t.toDisplayString)(e.label),1)):(0,t.createCommentVNode)(``,!0),e.suffix?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.suffix),{key:2,class:`tab-suffix`})):(0,t.createCommentVNode)(``,!0)],10,gO))),128))],40,hO)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:`bx-tabs-buttons`,role:`tablist`,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onKeydown:s},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.tabs,(n,i)=>((0,t.openBlock)(),(0,t.createBlock)(Jv,{key:i,ref_for:!0,ref:e=>a(e,i),role:`tab`,"aria-selected":r.value===n.name,tabindex:r.value===n.name?0:-1,secondary:``,size:e.size,active:r.value===n.name,centered:e.fullWidth||e.fitWidth,onClick:e=>r.value=n.name},(0,t.createSlots)({_:2},[n.icon?{name:`icon`,fn:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(n.icon)))]),_:2},1024)]),key:`0`}:void 0,n.label||n.suffix?{name:`default`,fn:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.label)+` `,1),n.suffix?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(n.suffix),{key:0,class:`tab-suffix`})):(0,t.createCommentVNode)(``,!0)]),key:`1`}:void 0]),1032,[`aria-selected`,`tabindex`,`size`,`active`,`centered`,`onClick`]))),128))],40,vO))],2))}}),[[`__scopeId`,`data-v-cae25262`]]),bO={aliceblue:`#F0F8FF`,antiquewhite:`#FAEBD7`,aqua:`#00FFFF`,aquamarine:`#7FFFD4`,azure:`#F0FFFF`,beige:`#F5F5DC`,bisque:`#FFE4C4`,black:`#000000`,blanchedalmond:`#FFEBCD`,blue:`#0000FF`,blueviolet:`#8A2BE2`,brown:`#A52A2A`,burlywood:`#DEB887`,cadetblue:`#5F9EA0`,chartreuse:`#7FFF00`,chocolate:`#D2691E`,coral:`#FF7F50`,cornflowerblue:`#6495ED`,cornsilk:`#FFF8DC`,crimson:`#DC143C`,cyan:`#00FFFF`,darkblue:`#00008B`,darkcyan:`#008B8B`,darkgoldenrod:`#B8860B`,darkgray:`#A9A9A9`,darkgrey:`#A9A9A9`,darkgreen:`#006400`,darkkhaki:`#BDB76B`,darkmagenta:`#8B008B`,darkolivegreen:`#556B2F`,darkorange:`#FF8C00`,darkorchid:`#9932CC`,darkred:`#8B0000`,darksalmon:`#E9967A`,darkseagreen:`#8FBC8F`,darkslateblue:`#483D8B`,darkslategray:`#2F4F4F`,darkslategrey:`#2F4F4F`,darkturquoise:`#00CED1`,darkviolet:`#9400D3`,deeppink:`#FF1493`,deepskyblue:`#00BFFF`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1E90FF`,firebrick:`#B22222`,floralwhite:`#FFFAF0`,forestgreen:`#228B22`,fuchsia:`#FF00FF`,gainsboro:`#DCDCDC`,ghostwhite:`#F8F8FF`,gold:`#FFD700`,goldenrod:`#DAA520`,gray:`#808080`,grey:`#808080`,green:`#008000`,greenyellow:`#ADFF2F`,honeydew:`#F0FFF0`,hotpink:`#FF69B4`,indianred:`#CD5C5C`,indigo:`#4B0082`,ivory:`#FFFFF0`,khaki:`#F0E68C`,lavender:`#E6E6FA`,lavenderblush:`#FFF0F5`,lawngreen:`#7CFC00`,lemonchiffon:`#FFFACD`,lightblue:`#ADD8E6`,lightcoral:`#F08080`,lightcyan:`#E0FFFF`,lightgoldenrodyellow:`#FAFAD2`,lightgray:`#D3D3D3`,lightgrey:`#D3D3D3`,lightgreen:`#90EE90`,lightpink:`#FFB6C1`,lightsalmon:`#FFA07A`,lightseagreen:`#20B2AA`,lightskyblue:`#87CEFA`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#B0C4DE`,lightyellow:`#FFFFE0`,lime:`#00FF00`,limegreen:`#32CD32`,linen:`#FAF0E6`,magenta:`#FF00FF`,maroon:`#800000`,mediumaquamarine:`#66CDAA`,mediumblue:`#0000CD`,mediumorchid:`#BA55D3`,mediumpurple:`#9370DB`,mediumseagreen:`#3CB371`,mediumslateblue:`#7B68EE`,mediumspringgreen:`#00FA9A`,mediumturquoise:`#48D1CC`,mediumvioletred:`#C71585`,midnightblue:`#191970`,mintcream:`#F5FFFA`,mistyrose:`#FFE4E1`,moccasin:`#FFE4B5`,navajowhite:`#FFDEAD`,navy:`#000080`,oldlace:`#FDF5E6`,olive:`#808000`,olivedrab:`#6B8E23`,orange:`#FFA500`,orangered:`#FF4500`,orchid:`#DA70D6`,palegoldenrod:`#EEE8AA`,palegreen:`#98FB98`,paleturquoise:`#AFEEEE`,palevioletred:`#DB7093`,papayawhip:`#FFEFD5`,peachpuff:`#FFDAB9`,peru:`#CD853F`,pink:`#FFC0CB`,plum:`#DDA0DD`,powderblue:`#B0E0E6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#FF0000`,rosybrown:`#BC8F8F`,royalblue:`#4169E1`,saddlebrown:`#8B4513`,salmon:`#FA8072`,sandybrown:`#F4A460`,seagreen:`#2E8B57`,seashell:`#FFF5EE`,sienna:`#A0522D`,silver:`#C0C0C0`,skyblue:`#87CEEB`,slateblue:`#6A5ACD`,slategray:`#708090`,slategrey:`#708090`,snow:`#FFFAFA`,springgreen:`#00FF7F`,steelblue:`#4682B4`,tan:`#D2B48C`,teal:`#008080`,thistle:`#D8BFD8`,tomato:`#FF6347`,turquoise:`#40E0D0`,violet:`#EE82EE`,wheat:`#F5DEB3`,white:`#FFFFFF`,whitesmoke:`#F5F5F5`,yellow:`#FFFF00`,yellowgreen:`#9ACD32`};function xO(e,t,n){let r,i,a;if(t===0)r=i=a=n;else{let o=(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;r=o(c,s,e+1/3),i=o(c,s,e),a=o(c,s,e-1/3)}return[r*255,i*255,a*255]}function SO(e){if(e.startsWith(`rgb`)){let[t,n,r]=e.slice(4,-1).split(`,`).map(e=>Number(e.trim()));return[t,n,r,1]}if(e.startsWith(`rgba`)){let[t,n,r,i]=e.slice(5,-1).split(`,`).map(e=>Number(e.trim()));return[t,n,r,i]}if(e.startsWith(`#`)){let t=e.slice(1);return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),1]}if(e.startsWith(`hsl`)){let[t,n,r]=e.slice(4,-1).split(`,`).map(e=>Number(e.trim()));return[...xO(t,n,r),1]}if(e.startsWith(`hsla`)){let[t,n,r,i]=e.slice(5,-1).split(`,`).map(e=>Number(e.trim()));return[...xO(t,n,r),i]}if(e.startsWith(`transparent`))return[0,0,0,0];{let t=e.toLowerCase();if(t in bO)return SO(bO[t]);throw Error(`Unknown color: ${e}`)}}function CO(e){let[t,n,r]=SO(e);return(t*2126+n*7152+r*722)/1e4<128}var wO=(e,t=0)=>{let n=3735928559^t,r=1103547991^t;for(let t=0,i;t<e.length;t++)i=e.charCodeAt(t),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),4294967296*(2097151&r)+(n>>>0)},TO=(e,t=0)=>wO(e,t).toString(16).padStart(16,`0`);function EO(e,t,n){let r=0;for(var i=0;i<e.length;i++)r=e.charCodeAt(i)+((r<<5)-r);return`hsl(${r%360}, ${t*100}%, ${n*100}%)`}function DO(e){if(e=e.trim(),/^#[0-9a-fA-F]{3,8}$/.test(e)){let t=e.slice(1);return t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]+`ff`),t.length===6&&(t+=`ff`),t.length===8?[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),parseInt(t.slice(6,8),16)/255]:null}let t=e.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)$/);if(t)return[+t[1],+t[2],+t[3],t[4]===void 0?1:+t[4]];let n=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(?:,\s*([\d.]+))?\s*\)$/);if(n){let[e,t,r]=xO(+n[1],+n[2],+n[3]);return[e,t,r,n[4]===void 0?1:+n[4]]}return null}function OO(e){return Math.round(Math.max(0,Math.min(255,e))).toString(16).padStart(2,`0`)}function kO(e,t,n,r=1){let i=`#${OO(e)}${OO(t)}${OO(n)}`;return r<.9999?`${i}${OO(r*255)}`:i}function AO(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=0;return i&&(a=r===e?(t-n)/i%6:r===t?(n-e)/i+2:(e-t)/i+4,a*=60,a<0&&(a+=360)),[a,r?i/r*100:0,r*100]}var jO={class:`bx-color-picker`},MO={class:`hue-row`},NO={key:2,class:`rgb-view`},PO={class:`rgb-row`},FO={class:`rgb-value`},IO={class:`rgb-row`},LO={class:`rgb-value`},RO={class:`rgb-row`},zO={class:`rgb-value`},BO={key:3,class:`palette-view`},VO={class:`palette-grid`},HO=[`onClick`],UO={class:`color-controls`},WO={class:`color-preview-wrap`},GO={class:`alpha-col`},KO={class:`color-input-row`},qO=W((0,t.defineComponent)({__name:`BxColorPicker`,props:{modelValue:{default:`#ff0000`},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let n=(0,t.ref)(`spectrum`),r=`#ef4444.#f97316.#f59e0b.#eab308.#84cc16.#22c55e.#10b981.#06b6d4.#3b82f6.#8b5cf6.#b91c1c.#c2410c.#b45309.#a16207.#4d7c0f.#15803d.#047857.#0e7490.#1d4ed8.#6d28d9.#fca5a5.#fdba74.#fcd34d.#fef08a.#d9f99d.#bbf7d0.#a7f3d0.#a5f3fc.#bfdbfe.#ddd6fe.#ffffff.#f3f4f6.#d1d5db.#9ca3af.#6b7280.#4b5563.#374151.#1f2937.#111827.#000000`.split(`.`);function i(e,t,n){t/=100,n/=100;let r=n*t,i=r*(1-Math.abs(e/60%2-1)),a=n-r,o=0,s=0,c=0;return e<60?(o=r,s=i):e<120?(o=i,s=r):e<180?(s=r,c=i):e<240?(s=i,c=r):e<300?(o=i,c=r):(o=r,c=i),[Math.round((o+a)*255),Math.round((s+a)*255),Math.round((c+a)*255)]}function a(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=Math.min(e,t,n),a=(r+i)/2;if(r===i)return[0,0,Math.round(a*100)];let o=r-i,s=a>.5?o/(2-r-i):o/(r+i),c=0;return c=r===e?(t-n)/o%6:r===t?(n-e)/o+2:(e-t)/o+4,c*=60,c<0&&(c+=360),[Math.round(c),Math.round(s*100),Math.round(a*100)]}function o(e){let[t,n,r,i]=e,[a,o,s]=AO(t,n,r);c.value=a,l.value=o,u.value=s,d.value=i}let s=(0,t.useModel)(e,`modelValue`),c=(0,t.ref)(0),l=(0,t.ref)(100),u=(0,t.ref)(100),d=(0,t.ref)(1),f=(0,t.ref)(`HEX`),p=(0,t.ref)(``),m=(0,t.ref)(!1),h=(0,t.ref)(!1),g=(0,t.ref)(),_=(0,t.ref)(),v=(0,t.ref)(),y=(0,t.ref)(),b=(0,t.ref)(),x=(0,t.ref)(),S=(0,t.computed)(()=>i(c.value,l.value,u.value)),C=(0,t.computed)(()=>`rgb(${S.value.join(`, `)})`),w=(0,t.computed)(()=>`rgba(${S.value.join(`, `)}, ${d.value})`),T=(0,t.computed)(()=>S.value[0]),E=(0,t.computed)(()=>S.value[1]),D=(0,t.computed)(()=>S.value[2]);function O(){let[e,t,n]=S.value,r=d.value,i=Math.round(r*100)/100;if(f.value===`HEX`)return kO(e,t,n,r);if(f.value===`RGB`)return r<.9999?`rgba(${e}, ${t}, ${n}, ${i})`:`rgb(${e}, ${t}, ${n})`;{let[o,s,c]=a(e,t,n);return r<.9999?`hsla(${o}, ${s}%, ${c}%, ${i})`:`hsl(${o}, ${s}%, ${c}%)`}}function k(){m.value||(p.value=O(),h.value=!1)}let A=DO(s.value);A&&o(A),k();let j=!1;(0,t.watch)([c,l,u,d],()=>{j=!0,s.value=O(),k(),Promise.resolve().then(()=>{j=!1})}),(0,t.watch)(f,k),(0,t.watch)(s,e=>{if(j)return;let t=DO(e);if(!t)return;let[n,r,i,a]=t,[s,c,l]=S.value;n===s&&r===c&&i===l&&Math.abs(a-d.value)<.005||(o(t),k())});function M(){let e=DO(p.value);if(!e){h.value=!0;return}h.value=!1,o(e)}function N(){m.value=!1,M(),k()}function P(){let e=[`HEX`,`RGB`,`HSL`];f.value=e[(e.indexOf(f.value)+1)%e.length]}function F(e){let t=DO(e);if(!t)return;let[n,r,i]=t,[a,o,s]=AO(n,r,i);c.value=a,l.value=o,u.value=s}function I(e){return kO(T.value,E.value,D.value)===e}let L=null,ee=null;function R(e,t,n){return Math.max(t,Math.min(n,e))}function B(e,t,n,r){if(r===`canvas`)l.value=R((e-n.left)/n.width*100,0,100),u.value=R(100-(t-n.top)/n.height*100,0,100);else if(r===`hue`)c.value=R((e-n.left)/n.width*360,0,360);else if(r===`alpha`)d.value=R((e-n.left)/n.width,0,1);else{let t=R(Math.round((e-n.left)/n.width*255),0,255),[i,a,o]=S.value,[s,d,f]=AO(r===`r`?t:i,r===`g`?t:a,r===`b`?t:o);d>.01&&(c.value=s),l.value=d,u.value=f}}function te(e,t,n,r){t&&(L=e,ee=t.getBoundingClientRect(),B(n,r,ee,e))}function ne(e){te(`canvas`,g.value,e.clientX,e.clientY)}function re(e){te(`canvas`,g.value,e.touches[0].clientX,e.touches[0].clientY)}function V(e){te(`hue`,_.value,e.clientX,e.clientY)}function ie(e){te(`hue`,_.value,e.touches[0].clientX,e.touches[0].clientY)}function ae(e){te(`alpha`,v.value,e.clientX,e.clientY)}function oe(e){te(`alpha`,v.value,e.touches[0].clientX,e.touches[0].clientY)}function H(e){te(`r`,y.value,e.clientX,e.clientY)}function se(e){te(`r`,y.value,e.touches[0].clientX,e.touches[0].clientY)}function ce(e){te(`g`,b.value,e.clientX,e.clientY)}function le(e){te(`g`,b.value,e.touches[0].clientX,e.touches[0].clientY)}function ue(e){te(`b`,x.value,e.clientX,e.clientY)}function de(e){te(`b`,x.value,e.touches[0].clientX,e.touches[0].clientY)}function fe(e,t){L&&ee&&B(e,t,ee,L)}function pe(){L=null,ee=null}let me=e=>fe(e.clientX,e.clientY),he=e=>fe(e.touches[0].clientX,e.touches[0].clientY);window.addEventListener(`mousemove`,me),window.addEventListener(`mouseup`,pe),window.addEventListener(`touchmove`,he,{passive:!0}),window.addEventListener(`touchend`,pe),(0,t.onUnmounted)(()=>{window.removeEventListener(`mousemove`,me),window.removeEventListener(`mouseup`,pe),window.removeEventListener(`touchmove`,he),window.removeEventListener(`touchend`,pe)});let ge=`EyeDropper`in window;async function _e(){if(ge)try{let e=DO((await new window.EyeDropper().open()).sRGBHex);e&&o(e)}catch{}}return(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,jO,[(0,t.createCommentVNode)(``,!0),n.value===`spectrum`?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createElementVNode)(`div`,{ref_key:`canvasRef`,ref:g,class:`color-canvas`,style:(0,t.normalizeStyle)({"--canvas-hue":c.value}),onMousedown:ne,onTouchstart:(0,t.withModifiers)(re,[`prevent`])},[(0,t.createElementVNode)(`div`,{class:`canvas-cursor`,style:(0,t.normalizeStyle)({left:l.value+`%`,top:100-u.value+`%`})},null,4)],36),(0,t.createElementVNode)(`div`,MO,[(0,t.createElementVNode)(`div`,{ref_key:`hueRef`,ref:_,class:`color-slider hue-slider`,onMousedown:V,onTouchstart:(0,t.withModifiers)(ie,[`prevent`])},[(0,t.createElementVNode)(`div`,{class:`slider-thumb`,style:(0,t.normalizeStyle)({left:c.value/360*100+`%`})},null,4)],544)])],64)):n.value===`rgb`?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,NO,[(0,t.createElementVNode)(`div`,PO,[i[3]||=(0,t.createElementVNode)(`span`,{class:`rgb-label`,style:{color:`#f87171`}},`R`,-1),(0,t.createElementVNode)(`div`,{ref_key:`rRef`,ref:y,class:`color-slider rgb-slider`,style:(0,t.normalizeStyle)({background:`linear-gradient(to right, rgb(0,${E.value},${D.value}), rgb(255,${E.value},${D.value}))`}),onMousedown:H,onTouchstart:(0,t.withModifiers)(se,[`prevent`])},[(0,t.createElementVNode)(`div`,{class:`slider-thumb`,style:(0,t.normalizeStyle)({left:T.value/255*100+`%`})},null,4)],36),(0,t.createElementVNode)(`span`,FO,(0,t.toDisplayString)(T.value),1)]),(0,t.createElementVNode)(`div`,IO,[i[4]||=(0,t.createElementVNode)(`span`,{class:`rgb-label`,style:{color:`#4ade80`}},`G`,-1),(0,t.createElementVNode)(`div`,{ref_key:`gRef`,ref:b,class:`color-slider rgb-slider`,style:(0,t.normalizeStyle)({background:`linear-gradient(to right, rgb(${T.value},0,${D.value}), rgb(${T.value},255,${D.value}))`}),onMousedown:ce,onTouchstart:(0,t.withModifiers)(le,[`prevent`])},[(0,t.createElementVNode)(`div`,{class:`slider-thumb`,style:(0,t.normalizeStyle)({left:E.value/255*100+`%`})},null,4)],36),(0,t.createElementVNode)(`span`,LO,(0,t.toDisplayString)(E.value),1)]),(0,t.createElementVNode)(`div`,RO,[i[5]||=(0,t.createElementVNode)(`span`,{class:`rgb-label`,style:{color:`#60a5fa`}},`B`,-1),(0,t.createElementVNode)(`div`,{ref_key:`bRef`,ref:x,class:`color-slider rgb-slider`,style:(0,t.normalizeStyle)({background:`linear-gradient(to right, rgb(${T.value},${E.value},0), rgb(${T.value},${E.value},255))`}),onMousedown:ue,onTouchstart:(0,t.withModifiers)(de,[`prevent`])},[(0,t.createElementVNode)(`div`,{class:`slider-thumb`,style:(0,t.normalizeStyle)({left:D.value/255*100+`%`})},null,4)],36),(0,t.createElementVNode)(`span`,zO,(0,t.toDisplayString)(D.value),1)])])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,BO,[(0,t.createElementVNode)(`div`,VO,[((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r,e=>(0,t.createElementVNode)(`div`,{key:e,class:(0,t.normalizeClass)([`swatch`,{active:I(e)}]),style:(0,t.normalizeStyle)({backgroundColor:e}),onClick:t=>F(e)},null,14,HO)),64))])])),(0,t.createElementVNode)(`div`,UO,[(0,t.createElementVNode)(`div`,WO,[i[6]||=(0,t.createElementVNode)(`div`,{class:`checker`},null,-1),(0,t.createElementVNode)(`div`,{class:`color-preview`,style:(0,t.normalizeStyle)({backgroundColor:w.value})},null,4)]),(0,t.createElementVNode)(`div`,GO,[(0,t.createElementVNode)(`div`,{ref_key:`alphaRef`,ref:v,class:`color-slider alpha-slider`,style:(0,t.normalizeStyle)({"--alpha-color-rgb":C.value}),onMousedown:ae,onTouchstart:(0,t.withModifiers)(oe,[`prevent`])},[(0,t.createElementVNode)(`div`,{class:`slider-thumb`,style:(0,t.normalizeStyle)({left:d.value*100+`%`})},null,4)],36)])]),(0,t.createElementVNode)(`div`,KO,[(0,t.createVNode)(nC,{modelValue:p.value,"onUpdate:modelValue":i[1]||=e=>p.value=e,class:(0,t.normalizeClass)([`color-value-input`,{"is-invalid":h.value}]),onFocus:i[2]||=e=>m.value=!0,onBlur:N,onEnter:M},null,8,[`modelValue`,`class`]),(0,t.createVNode)(Jv,{secondary:``,class:`format-btn`,onClick:P},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(f.value),1)]),_:1}),(0,t.createVNode)(Jv,{secondary:``,class:`eyedropper-btn`,disabled:!ge,onClick:_e},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,{size:14},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Xy))]),_:1})]),_:1},8,[`disabled`])])]))}}),[[`__scopeId`,`data-v-4fe09951`]]),JO=[`tabindex`,`aria-expanded`,`aria-disabled`,`aria-label`,`aria-labelledby`],YO={key:0,class:`trigger-label`},XO={key:1,class:`trigger-chevron`},ZO=W((0,t.defineComponent)({__name:`BxColorPickerPopover`,props:(0,t.mergeModels)({disabled:{type:Boolean,default:!1},placeholder:{default:`Pick a color…`},triggerLabel:{type:Boolean,default:!0},roundColorSwatch:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1},ariaLabel:{},ariaLabelledby:{}},{modelValue:{required:!1,default:`#ff0000`},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,r=(0,t.useSlots)(),i=(0,t.useModel)(e,`modelValue`),a=(0,t.ref)(!1),o=(0,t.ref)(),s=(0,t.ref)();function c(e){if(!n.disabled)switch(e.key){case`Enter`:case` `:e.preventDefault(),o.value?.show();break;case`Escape`:o.value?.close()}}return(0,t.watch)(a,(e,n)=>{n&&!e&&(0,t.nextTick)(()=>{s.value?.querySelector(`.color-trigger`)?.focus()})}),(n,l)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`rootRef`,ref:s,class:(0,t.normalizeClass)([`bx-color-picker-popover`,{disabled:e.disabled,bordered:e.bordered}])},[(0,t.createVNode)(MS,{ref_key:`popoverRef`,ref:o,trigger:`click`,"allowed-placements":[`bottom-start`,`top-start`,`bottom`,`top`],arrow:!1,"darken-background":!1,"custom-classes":[`bx-color-picker-popover`],"floating-padding":4,show:a.value,"onUpdate:show":l[1]||=e=>a.value=e,"transition-duration":0},{trigger:(0,t.withCtx)(()=>[r.trigger?(0,t.renderSlot)(n.$slots,`trigger`,{key:0},void 0,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:(0,t.normalizeClass)([`color-trigger`,{focus:a.value,disabled:e.disabled,"swatch-only":!e.triggerLabel}]),role:`button`,tabindex:e.disabled?-1:0,"aria-haspopup":`dialog`,"aria-expanded":a.value?`true`:`false`,"aria-disabled":e.disabled?`true`:void 0,"aria-label":e.ariaLabelledby?void 0:e.ariaLabel??(i.value?`Color ${i.value}`:`Pick a color`),"aria-labelledby":e.ariaLabelledby,onKeydown:c},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`trigger-swatch-wrap`,{round:e.roundColorSwatch}])},[l[2]||=(0,t.createElementVNode)(`div`,{class:`trigger-checker`},null,-1),(0,t.createElementVNode)(`div`,{class:`trigger-swatch`,style:(0,t.normalizeStyle)({backgroundColor:i.value})},null,4)],2),e.triggerLabel?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,YO,[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)({placeholder:!i.value})},(0,t.toDisplayString)(i.value||e.placeholder),3)])):(0,t.createCommentVNode)(``,!0),e.triggerLabel?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,XO,[(0,t.createVNode)(vb,{size:14},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Ey))]),_:1})])):(0,t.createCommentVNode)(``,!0)],42,JO))]),content:(0,t.withCtx)(()=>[(0,t.createVNode)(qO,{modelValue:i.value,"onUpdate:modelValue":l[0]||=e=>i.value=e},null,8,[`modelValue`])]),_:3},8,[`show`])],2))}}),[[`__scopeId`,`data-v-6ed5ccc4`]]),QO={class:`field-color`},$O=W((0,t.defineComponent)({__name:`Color`,props:(0,t.mergeModels)({alpha:{type:Boolean},labelId:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`);return(r,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,QO,[(0,t.createVNode)(ZO,{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,alpha:e.alpha,"aria-labelledby":e.labelId,bordered:``},null,8,[`modelValue`,`alpha`,`aria-labelledby`])]))}}),[[`__scopeId`,`data-v-b6f7be33`]]),ek=W((0,t.defineComponent)({__name:`BxNumberInput`,props:(0,t.mergeModels)({min:{},max:{},step:{default:1},size:{default:`medium`},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},placeholder:{},state:{default:`default`},ring:{type:Boolean,default:!1},round:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1},ariaLabel:{},ariaLabelledby:{},showControls:{type:Boolean,default:!0}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,r=(0,t.useModel)(e,`modelValue`),i=(0,t.ref)(r.value?.toString()??``),a=(0,t.computed)(()=>parseFloat(i.value)||0);(0,t.watch)(r,e=>{e!==void 0&&e!==parseFloat(i.value)&&(i.value=e.toString())});function o(e){let t=e;return n.min!==void 0&&(t=Math.max(n.min,t)),n.max!==void 0&&(t=Math.min(n.max,t)),t}function s(e){let t=String(e);i.value=t;let n=parseFloat(t);!isNaN(n)&&t!==``&&t!==`-`&&(r.value=n)}function c(){let e=parseFloat(i.value);if(isNaN(e)||i.value===``)i.value=r.value?.toString()??``;else{let t=o(e);i.value=t.toString(),r.value=t}}function l(e){e.key===`ArrowUp`?(e.preventDefault(),u()):e.key===`ArrowDown`&&(e.preventDefault(),d())}function u(){let e=o(a.value+n.step);i.value=e.toString(),r.value=e}function d(){let e=o(a.value-n.step);i.value=e.toString(),r.value=e}return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`bx-number-input`,onKeydown:l},[(0,t.createVNode)(nC,{type:`text`,"model-value":i.value,size:e.size,disabled:e.disabled,readonly:e.readonly,placeholder:e.placeholder,state:e.state,ring:e.ring,round:e.round,bordered:e.bordered,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"onUpdate:modelValue":s,onBlur:c},(0,t.createSlots)({suffix:(0,t.withCtx)(()=>[e.showControls?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`bx-number-input__controls`,`size-${e.size}`])},[(0,t.createVNode)(Jv,{size:`small`,"aria-label":`Decrease`,disabled:e.disabled||e.readonly||e.min!==void 0&&a.value<=e.min,onClick:d},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Pte))]),_:1})]),_:1},8,[`disabled`]),(0,t.createVNode)(Jv,{size:`small`,"aria-label":`Increase`,disabled:e.disabled||e.readonly||e.max!==void 0&&a.value>=e.max,onClick:u},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Xv))]),_:1})]),_:1},8,[`disabled`])],2)):(0,t.renderSlot)(n.$slots,`suffix`,{key:1},void 0,!0)]),_:2},[n.$slots.prefix?{name:`prefix`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`prefix`,{},void 0,!0)]),key:`0`}:void 0]),1032,[`model-value`,`size`,`disabled`,`readonly`,`placeholder`,`state`,`ring`,`round`,`bordered`,`aria-label`,`aria-labelledby`])],32))}}),[[`__scopeId`,`data-v-086f0794`]]),tk={class:`field-number`},nk=W((0,t.defineComponent)({__name:`Number`,props:(0,t.mergeModels)({min:{},max:{},step:{},type:{},labelId:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`),r=(0,t.computed)({get(){return Number(n.value)},set(e){n.value=Number(e)}});return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,tk,[e.type===`slider`?((0,t.openBlock)(),(0,t.createBlock)(aa,{key:0,type:`range`,modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,min:e.min,max:e.max,step:e.step,"aria-labelledby":e.labelId},null,8,[`modelValue`,`min`,`max`,`step`,`aria-labelledby`])):((0,t.openBlock)(),(0,t.createBlock)(ek,{key:1,modelValue:r.value,"onUpdate:modelValue":i[1]||=e=>r.value=e,min:e.min,max:e.max,step:e.step,"aria-labelledby":e.labelId,bordered:``},null,8,[`modelValue`,`min`,`max`,`step`,`aria-labelledby`]))]))}}),[[`__scopeId`,`data-v-a0f3cc69`]]),rk=[`aria-label`,`aria-labelledby`],ik=W((0,t.defineComponent)({__name:`BxButtonGroup`,props:(0,t.mergeModels)({options:{},fillWidth:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},ariaLabel:{},ariaLabelledby:{}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`),r=e;function i(e){!e.disabled&&!r.disabled&&(n.value=e.value)}let a=(0,t.computed)(()=>{let e=r.options.findIndex(e=>e.value===n.value);return e>=0?e:r.options.findIndex(e=>!(e.disabled||r.disabled))}),o=[];function s(e,t){if(!e){o[t]=void 0;return}let n=e instanceof HTMLElement?e:e.$el;o[t]=n instanceof HTMLElement?n:void 0}function c(e){let t=r.options[e];return!!t&&!(t.disabled||r.disabled)}function l(e){let t=r.options[e];t&&(n.value=t.value,o[e]?.focus())}function u(e){let t=r.options.length;if(t===0)return;let n=a.value<0?0:a.value,i=(e,n)=>{let r=e;for(let e=0;e<t;e++)if(r=(r+n+t)%t,c(r))return r;return e},o;switch(e.key){case`ArrowRight`:case`ArrowDown`:o=i(n,1);break;case`ArrowLeft`:case`ArrowUp`:o=i(n,-1);break;case`Home`:o=c(0)?0:i(0,1);break;case`End`:o=c(t-1)?t-1:i(t-1,-1);break;default:return}e.preventDefault(),l(o)}return(r,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`bx-button-group`,{"fill-width":e.fillWidth}]),role:`radiogroup`,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onKeydown:u},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,(r,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:o},[r.tooltip?((0,t.openBlock)(),(0,t.createBlock)(VS,{key:0,trigger:`hover`,"allowed-placements":r.allowedTooltipPlacements},{trigger:(0,t.withCtx)(()=>[r.render?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.render({option:r})),{key:0})):((0,t.openBlock)(),(0,t.createBlock)(Jv,{key:1,ref_for:!0,ref:e=>s(e,o),role:`radio`,"aria-checked":r.value===n.value,tabindex:o===a.value?0:-1,disabled:r.disabled||e.disabled,secondary:``,active:r.value===n.value,centered:e.fillWidth,onClick:e=>i(r)},(0,t.createSlots)({_:2},[r.icon?{name:`icon`,fn:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.icon)))]),_:2},1024)]),key:`0`}:void 0,r.label?{name:`default`,fn:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(r.label),1)]),key:`1`}:void 0]),1032,[`aria-checked`,`tabindex`,`disabled`,`active`,`centered`,`onClick`]))]),content:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,null,(0,t.toDisplayString)(r.tooltip),1)]),_:2},1032,[`allowed-placements`])):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[r.render?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.render({option:r})),{key:0})):((0,t.openBlock)(),(0,t.createBlock)(Jv,{key:1,ref_for:!0,ref:e=>s(e,o),role:`radio`,"aria-checked":r.value===n.value,tabindex:o===a.value?0:-1,disabled:r.disabled||e.disabled,secondary:``,active:r.value===n.value,centered:e.fillWidth,onClick:e=>i(r)},(0,t.createSlots)({_:2},[r.icon?{name:`icon`,fn:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.icon)))]),_:2},1024)]),key:`0`}:void 0,r.label?{name:`default`,fn:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(r.label),1)]),key:`1`}:void 0]),1032,[`aria-checked`,`tabindex`,`disabled`,`active`,`centered`,`onClick`]))],64))],64))),128))],42,rk))}}),[[`__scopeId`,`data-v-387a0dce`]]),ak={class:`select-text-field`},ok=W((0,t.defineComponent)({__name:`SelectText`,props:(0,t.mergeModels)({options:{},layout:{},mobile:{type:Boolean,default:!1},labelId:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`),r=e,i=(0,t.computed)(()=>r.layout===`button`&&r.mobile?`carroussel`:r.layout);return(r,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,ak,[i.value===`button`?((0,t.openBlock)(),(0,t.createBlock)(ik,{key:0,modelValue:n.value,"onUpdate:modelValue":a[0]||=e=>n.value=e,"aria-labelledby":e.labelId,options:e.options.map(e=>({label:e.label||(typeof e.value==`string`?e.value:String(e.value)),value:e.value})),"fill-width":!0,mobile:e.mobile},null,8,[`modelValue`,`aria-labelledby`,`options`,`mobile`])):((0,t.openBlock)(),(0,t.createBlock)(FS,{key:1,modelValue:n.value,"onUpdate:modelValue":a[1]||=e=>n.value=e,bordered:``,"aria-labelledby":e.labelId,options:e.options.map(e=>({label:e.label||(typeof e.value==`string`?e.value:String(e.value)),value:e.value})),"placeholder-active-label":`Select option`},null,8,[`modelValue`,`aria-labelledby`,`options`]))]))}}),[[`__scopeId`,`data-v-bc071fd7`]]),sk=[`data-si`],ck=[`onClick`],lk={class:`preview-wrapper`},uk={key:0,class:`label-wrapper`},dk=W((0,t.defineComponent)({__name:`SelectColor`,props:(0,t.mergeModels)({options:{},layout:{},showLabels:{type:Boolean},size:{},mobile:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`),r=e,i=(0,t.computed)(()=>r.layout===`button`&&r.mobile?`carroussel`:r.layout);function a(e){return e.map(e=>`${e.color} ${e.position*100}%`).join(`, `)}function o(e){return e.type===`linear`?`linear-gradient(${e.angle}deg, ${a(e.stops)})`:e.type===`radial`?`radial-gradient(circle at ${e.x1*100}% ${e.y1*100}%, ${a(e.stops)})`:`conic-gradient(from ${e.angle}deg at ${e.x*100}% ${e.y*100}%, ${a(e.stops)})`}function s(e){return typeof e==`string`?e:o(e)}function c(e){return typeof e==`string`?e:`${e.type} gradient`}function l(e){return typeof n.value==`string`||typeof e.value==`string`?n.value===e.value:Ux(n.value,e.value)}let u=(0,t.ref)(null),d=(0,t.computed)(()=>{let e=r.options.map((e,t)=>t).filter(e=>l(r.options[e]));return e.includes(u.value)?u.value:e[0]});function f(e,t){n.value=e.value,u.value=t}let p=(0,t.computed)(()=>r.options.map(e=>({label:e.label||c(e.value),value:e.value,icon:()=>(0,t.h)(`div`,{style:{width:`16px`,height:`16px`,borderRadius:`50%`,background:e.image??s(e.value),flexShrink:`0`}})})));return(a,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`select-color-field`,{mobile:e.mobile}]),"data-si":d.value},[i.value===`dropdown`?((0,t.openBlock)(),(0,t.createBlock)(FS,{key:0,bordered:``,modelValue:n.value,"onUpdate:modelValue":o[0]||=e=>n.value=e,options:p.value,"placeholder-active-label":`Select color`},null,8,[`modelValue`,`options`])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:(0,t.normalizeClass)([`color-options-wrapper`,{carroussel:i.value===`carroussel`,[`size-${r.size}`]:!0}])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`color-option`,{selected:r===d.value}]),onClick:e=>f(n,r)},[(0,t.createElementVNode)(`div`,lk,[(0,t.createElementVNode)(`div`,{class:`color-circle`,style:(0,t.normalizeStyle)({background:n.image??s(n.value)})},null,4)]),n.label&&e.showLabels?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,uk,(0,t.toDisplayString)(n.label),1)):(0,t.createCommentVNode)(``,!0)],10,ck))),256))],2))],10,sk))}}),[[`__scopeId`,`data-v-56305235`]]),fk=[`onClick`],pk={class:`preview-wrapper`},mk=[`src`],hk={key:0,class:`label-wrapper`},gk=W((0,t.defineComponent)({__name:`SelectImage`,props:(0,t.mergeModels)({options:{},layout:{},imageDisplay:{},size:{},mobile:{type:Boolean,default:!1}},{modelValue:{required:!0,default:()=>({src:`https://picsum.photos/536/354`,innerRotate:0,crop:null,cropMode:`cover`,innerAlign:`center`,mirrorX:!1,mirrorY:!1})},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=Uv(),r=(0,t.useModel)(e,`modelValue`),i=e,a=(0,t.computed)(()=>i.layout===`button`&&i.mobile?`carroussel`:i.layout),o=(0,t.computed)({get(){return r.value},set(e){let t=typeof e==`string`?e:e.src;r.value=typeof o.value==`object`?{...o.value,src:t}:e}}),s=(0,t.computed)(()=>i.options.map(e=>({label:e.label||(typeof e.value==`string`?e.value:String(e.value)),value:e.value,icon:()=>(0,t.h)(`img`,{src:e.image??(typeof e.value==`string`?e.value:e.value.src),style:{"object-fit":i.imageDisplay,width:`19px`,height:`19px`}})})));function c(e){return(typeof e.value==`string`?e.value:e.value.src)===(typeof o.value==`string`?o.value:o.value.src)}return(r,l)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`select-image-field`,{mobile:e.mobile}])},[a.value===`dropdown`?((0,t.openBlock)(),(0,t.createBlock)(FS,{key:0,bordered:``,modelValue:o.value,"onUpdate:modelValue":l[0]||=e=>o.value=e,options:s.value,"placeholder-active-label":`Select image`},null,8,[`modelValue`,`options`])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:(0,t.normalizeClass)([`image-options-wrapper`,{carroussel:a.value===`carroussel`,[`size-${i.size}`]:!0}])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,r=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`image-option`,{selected:c(r)}]),onClick:e=>o.value=r.value},[(0,t.createElementVNode)(`div`,pk,[(0,t.createElementVNode)(`img`,{src:(0,t.unref)(n)(r.image??(typeof r.value==`string`?r.value:r.value.src)),style:(0,t.normalizeStyle)({"object-fit":e.imageDisplay}),class:`preview-image`},null,12,mk)]),r.label?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,hk,(0,t.toDisplayString)(r.label),1)):(0,t.createCommentVNode)(``,!0)],10,fk))),256))],2))],2))}}),[[`__scopeId`,`data-v-c64ba991`]]),_k={key:0,class:`info-symbol-wrapper`},vk={class:`instruction-text`},yk={class:`detailed-description-text`},bk=W((0,t.defineComponent)({__name:`Instruction`,props:{instruction:{},description:{},detailedDescription:{}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`instruction-field`,{}])},[e.description===void 0?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,_k,[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ob))]),_:1})])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`main`,null,[(0,t.createElementVNode)(`div`,vk,(0,t.toDisplayString)(e.instruction),1),(0,t.createElementVNode)(`div`,yk,(0,t.toDisplayString)(e.detailedDescription),1)])]))}}),[[`__scopeId`,`data-v-9fa25486`]]),xk={class:`highlighted-field`},Sk=[`aria-label`],Ck=W((0,t.defineComponent)({__name:`HighlightedText`,props:(0,t.mergeModels)({options:{},userAgentRichText:{type:Boolean},noStyleLabel:{},mixedStyleLabel:{},showWordCount:{type:Boolean},clearable:{type:Boolean},maxLength:{},maxLineLength:{},maxLines:{},placeholder:{},maxHeight:{},labelId:{},toolbarLabel:{}},{modelValue:{type:[String,Number,Boolean,Array],required:!1,default:`Hello world`},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`),r=(0,t.ref)();function i(e){return typeof e==`object`&&e instanceof Array?Gx(e):typeof e==`string`||typeof e==`number`||typeof e==`boolean`?[{text:String(e),format:{}}]:[{text:`foobar`,format:{}}]}function a(e,t){return Ux(e,t)}let o=(0,t.ref)(i(n.value));(0,t.watch)(o,(e,t)=>{n.value=e}),(0,t.watch)(n,()=>{a(i(n.value),o.value)||(o.value=i(n.value))});let s=(0,t.ref)(),c=(0,t.ref)({start:0,length:0});(0,t.watch)(s,()=>{s.value&&(c.value=s.value)});let l=(0,t.ref)(!1);function u(e){let t=!1,n;for(let r of e)if(!n)n=r.format;else if(!Ux(n,r.format)){t=!0;break}return t?null:n??null}let d=(0,t.computed)(()=>{let e=r.value?.richTextInstance;return e?u(e.resolveFeatures(c.value.start,c.value.length).flat()):null});(0,t.watchEffect)(()=>{console.log(`commonStyleFormat`,d.value)});function f(e){return d.value?e.style===null?u(o.value)!==null:Ux(d.value,e.style):!1}function p(e){let t=r.value?.richTextInstance;t&&s.value&&s.value.length!==0&&(f(e)?t.applyFormat(c.value.start,c.value.length,{}):t.applyFormat(c.value.start,c.value.length,e.style))}return(0,t.watchEffect)(()=>{console.log(`selection`,s.value)}),(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,xk,[(0,t.createElementVNode)(`div`,{class:`actions`,role:`toolbar`,"aria-label":e.toolbarLabel??`Text formatting`},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,e=>((0,t.openBlock)(),(0,t.createBlock)(Jv,{secondary:f(e),"aria-pressed":f(e),onClick:t=>p(e),disabled:!s.value||s.value.length===0},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)]),_:2},1032,[`secondary`,`aria-pressed`,`onClick`,`disabled`]))),256))],8,Sk),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`text-input`,{focused:l.value}]),style:(0,t.normalizeStyle)({"--max-height":e.maxHeight??void 0})},[(0,t.createVNode)(jS,{ref_key:`bxRichTextInstance`,ref:r,modelValue:o.value,"onUpdate:modelValue":i[0]||=e=>o.value=e,selection:s.value,"onUpdate:selection":i[1]||=e=>s.value=e,focus:l.value,"onUpdate:focus":i[2]||=e=>l.value=e,"aria-labelledby":e.labelId},null,8,[`modelValue`,`selection`,`focus`,`aria-labelledby`])],6)]))}}),[[`__scopeId`,`data-v-521b1391`]]),wk=u({Checkbox:()=>Dw,Collection:()=>cO,Color:()=>$O,Group:()=>xw,HighlightedText:()=>Ck,Image:()=>bw,ImageAdjust:()=>Cw,ImageEdit:()=>vw,Instruction:()=>bk,Logo:()=>vw,Map:()=>mO,Number:()=>nk,Select:()=>ww,SelectColor:()=>dk,SelectImage:()=>gk,SelectText:()=>ok,Text:()=>Sw}),Tk={class:`inner`},Ek={key:1},Dk=[`id`],Ok={type:`button`,class:`help-trigger`,"aria-label":`More information`},kk=[`id`],Ak=W((0,t.defineComponent)({__name:`FieldsList`,props:{layout:{default:`list`},fields:{},isRoot:{type:Boolean},isSegmented:{type:Boolean,default:!1}},setup(e){let n=e,r=(0,t.inject)(`bridge`),i=di(),a=(0,t.inject)(`data`),o=(0,t.inject)(`computedPropEvaluator`);o||console.error(`computedPropEvaluator is not provided`);let s=e=>{if(`pos`in e&&`scale`in e){let t=e.image,n=e.pos,r=e.scale;return{image:a.value[t],"onUpdate:image":e=>{a.value[t]=e},adjust:{scale:a.value[r],innerPos:a.value[n]},"onUpdate:adjust":e=>{a.value[r]=e.scale,a.value[n]=e.innerPos}}}return{...Object.fromEntries(Object.entries(e).map(([e,t])=>[e,a.value[t]])),...Object.fromEntries(Object.entries(e).map(([t])=>[`onUpdate:${t}`,n=>{a.value[e[t]]=n}]))}};function c(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>typeof t==`function`?[e,o(t)]:[e,t]))}let l=new WeakMap;function u(e){let t=l.get(e);return t||(t=h(`bx-field-label`),l.set(e,t)),t}let d={Text:`Text field`,HighlightedText:`Text field`,Number:`Number field`,Color:`Color`,Select:`Selection`,SelectText:`Selection`,SelectColor:`Color selection`,SelectImage:`Image selection`,Checkbox:`Checkbox`,Image:`Image`,ImageEdit:`Image`,ImageAdjust:`Image`,Map:`Location`,Collection:`Collection`};function f(e){let t=e.props?.placeholder;return typeof t==`string`&&t.trim()?t.trim():`${d[e.type]??`Field`} ${p(e)}`}let p=e=>{let t=n.fields.indexOf(e);return t-n.fields.slice(0,t).filter(e=>e.type===`Instruction`).length+1};return(n,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`bluepic-fields`,{[`layout-`+e.layout]:!0}])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.fields,(n,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_for:!0,ref:e=>(0,t.unref)(i)?.register(n,e),class:(0,t.normalizeClass)([`field`,{"is-root":e.isRoot,[`field-type-`+n.type.toLowerCase()]:!0,"field-has-card":n.type===`Group`&&n.props.card}]),style:(0,t.normalizeStyle)({"--min-width":n.layout?.minWidth,"--max-width":n.layout?.maxWidth})},[n.type!==`Group`&&n.description?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`description`,{"no-detailed-description":!n.detailedDescription,"text-overlaying-description":!e.isRoot&&n.type===`Text`}])},[(0,t.createElementVNode)(`div`,Tk,[e.isRoot?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`root-index`,{}])},[n.type===`Instruction`?((0,t.openBlock)(),(0,t.createBlock)(vb,{key:0},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(cb))]),_:1})):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Ek,(0,t.toDisplayString)(p(n)),1))])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,{id:u(n)},(0,t.toDisplayString)(n.description),9,Dk),n.detailedDescription&&n.type!==`Instruction`?((0,t.openBlock)(),(0,t.createBlock)(VS,{key:1,trigger:`hover`,"custom-threshold-delay":0},{trigger:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`button`,Ok,[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(eb))]),_:1})])]),content:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.detailedDescription),1)]),_:2},1024)):(0,t.createCommentVNode)(``,!0)])],2)):n.type!==`Group`&&n.type!==`Instruction`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:1,id:u(n),class:`bx-visually-hidden-label`},(0,t.toDisplayString)(f(n)),9,kk)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(wk[n.type]),(0,t.mergeProps)({bridge:(0,t.unref)(r),index:p(n),"is-root":e.isRoot},{ref_for:!0},{...c(n.props),...s(n.model),field:n,description:n.description,detailedDescription:n.detailedDescription,labelId:n.type!==`Group`&&n.type!==`Instruction`?u(n):void 0,...(()=>{if(n.type===`Text`)return{...n.layout}})()}),null,16,[`bridge`,`index`,`is-root`]))],6))),256))],2))}}),[[`__scopeId`,`data-v-a31a95c2`]]),jk={class:`bx-fields`},Mk=(0,t.defineComponent)({__name:`Fields`,props:{fields:{},isSegmented:{type:Boolean}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,jk,[(0,t.createVNode)(Ak,{fields:e.fields,"is-root":``,"is-segmented":e.isSegmented},null,8,[`fields`,`is-segmented`])]))}}),Nk=[`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`,`[tabindex]:not([tabindex="-1"])`].join(`,`);function Pk(e){return e.getAttribute(`aria-hidden`)!==`true`&&e.getClientRects().length>0}function Fk(e,n){let r=new Map,i=null,a=[];function o(t){let n=e();return n?n.querySelector(`[data-overlay-id="${CSS.escape(t)}"]`):null}function s(e){return Array.from(e.querySelectorAll(Nk)).filter(Pk)}function c(){let e=n();for(let t=e.length-1;t>=0;t--)if(e[t].trapFocus&&o(e[t].id))return e[t].id;return null}function l(e){if(e.key!==`Tab`||!i)return;let t=o(i);if(!t)return;let n=s(t);if(n.length===0){e.preventDefault(),t.focus?.();return}let r=n[0],a=n[n.length-1],c=document.activeElement;!c||!t.contains(c)?(e.preventDefault(),(e.shiftKey?a:r).focus()):e.shiftKey&&c===r?(e.preventDefault(),a.focus()):!e.shiftKey&&c===a&&(e.preventDefault(),r.focus())}async function u(){await(0,t.nextTick)();let e=n().map(e=>e.id);for(let t of a)if(!e.includes(t)&&r.has(t)){let e=r.get(t)??null;r.delete(t),t===i&&(i=null,e&&e.isConnected&&e.focus?.())}a=e;let l=c();if(l!==i&&(i=l,l&&!r.has(l))){r.set(l,document.activeElement);let e=o(l);e&&(s(e)[0]??e).focus?.()}}document.addEventListener(`keydown`,l,!0),(0,t.watch)(n,()=>void u(),{deep:!0,immediate:!0}),(0,t.onBeforeUnmount)(()=>{document.removeEventListener(`keydown`,l,!0)})}var Ik=[`data-overlay-id`],Lk=[`data-overlay-id`],Rk=W((0,t.defineComponent)({__name:`PopupProvider`,setup(e,{expose:n}){let r=(0,t.ref)([]),i=(0,t.ref)();Fk(()=>i.value,()=>r.value.map(e=>({id:e.id,trapFocus:e.trapFocus})));function a(e,t,n){r.value.push({kind:`popup`,id:e,render:t,type:n.type,close:n.close,handleClickOutside:n.handleClickOutside,disableBackgroundEffect:n.disableBackgroundEffect,wrapperCustomClasses:n.wrapperCustomClasses,drawerPlacement:n.drawerPlacement,transitionDuration:n.transitionDuration,role:n.role,trapFocus:n.trapFocus??!0})}function o(e,t,n){r.value.push({kind:`popover`,id:e,render:t,darkenBackground:n.darkenBackground,handleClickOutside:n.handleClickOutside,transitionDuration:n.transitionDuration,role:n.role,trapFocus:n.trapFocus??!1,close:n.close})}function s(e){let t=r.value.findIndex(t=>t.id===e);t!==-1&&r.value.splice(t,1)}function c(e){return r.value.some(t=>t.id===e)}let l=(0,t.computed)(()=>r.value.some(e=>e.kind===`popover`&&e.darkenBackground)),u=(0,t.computed)(()=>r.value.filter(e=>e.kind===`popup`&&!e.disableBackgroundEffect));function d(e){let t=0;for(let n=e+1;n<r.value.length;n++){let e=r.value[n];e.kind===`popup`&&!e.disableBackgroundEffect&&t++}return t}(0,t.watch)(u,()=>{let e=document.querySelector($9);e&&(u.value.length>0?e.classList.add(`bluepic-popup-app-wrapper-in-background`):e.classList.remove(`bluepic-popup-app-wrapper-in-background`))});function f(e){e.kind===`popup`?e.close():e.handleClickOutside()}let p=e=>{r.value.length!==0&&e.key===`Escape`&&r.value[r.value.length-1].close()};return window.addEventListener(`keydown`,p),(0,t.onUnmounted)(()=>{window.removeEventListener(`keydown`,p)}),n({isVisible:c,pushPopup:a,pushPopover:o,pull:s,entries:r}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`providerRoot`,ref:i,class:(0,t.normalizeClass)([`bluepic-overlay-provider`,{visible:r.value.length>0,"darken-background":l.value}])},[(0,t.createVNode)(t.TransitionGroup,{name:`overlay-entry`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.value,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:e.id},[e.kind===`popup`?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`popup-wrapper overlay-item`,{[`type-`+e.type]:!0,[`drawer-`+(e.drawerPlacement??`right`)]:e.type===`drawer`,...Object.fromEntries((e.wrapperCustomClasses??[]).map(e=>[e,!0]))}]),"data-overlay-id":e.id,style:(0,t.normalizeStyle)({"--popup-transition-duration":e.transitionDuration+`ms`})},[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.render),{onClickOutside:t=>f(e),onClose:e.close,style:(0,t.normalizeStyle)({"--level":d(n)})},null,40,[`onClickOutside`,`onClose`,`style`]))],14,Ik)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:(0,t.normalizeClass)([`popover-entry-wrapper overlay-item`,{"darken-entry":e.darkenBackground}]),"data-overlay-id":e.id,style:(0,t.normalizeStyle)({"--popup-transition-duration":e.transitionDuration+`ms`})},[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.render),{onClickOutside:t=>f(e)},null,40,[`onClickOutside`]))],14,Lk))],64))),128))]),_:1})],2))}}),[[`__scopeId`,`data-v-9f32537d`]]),zk=W((0,t.defineComponent)({__name:`MessageProvider`,setup(e,{expose:n}){let r=(0,t.ref)([]),i=[`top-left`,`top`,`top-right`,`left`,`right`,`bottom-left`,`bottom`,`bottom-right`];function a(e){return r.value.filter(t=>t.placement===e)}function o(e){return e.startsWith(`top`)?`top`:e.startsWith(`bottom`)?`bottom`:e===`left`?`left`:`right`}function s(e,t,n){r.value.push({id:e,render:t,placement:n.placement})}function c(e){let t=r.value.findIndex(t=>t.id===e);t!==-1&&r.value.splice(t,1)}function l(e){return r.value.some(t=>t.id===e)}return n({push:s,pull:c,isVisible:l}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`bluepic-message-provider`,{visible:r.value.length>0}])},[((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i,e=>(0,t.createElementVNode)(`div`,{key:e,class:(0,t.normalizeClass)([`message-lane`,[`lane-${e}`]])},[(0,t.createVNode)(t.TransitionGroup,{name:`message-${o(e)}`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a(e),e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.id,class:`message-item`},[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.render)))]))),128))]),_:2},1032,[`name`])],2)),64))],2))}}),[[`__scopeId`,`data-v-e01d8c5b`]]),Bk=class{overlayProviderRef;messageProviderRef;constructor(){let e=document.createElement(`div`);e.classList.add(`bluepic-popup-provider__wrapper`);let n=document.createElement(`style`);n.setAttribute(`type`,`text/css`),n.setAttribute(`data-bluepic-popup-app-wrapper`,`true`),n.innerHTML=`
166
+ `)===r.length-1&&(r=r.slice(0,-1));return[e,Function(`return ${r}`)]}return[e,t]}))}}function rO(e){return{...e,props:Object.fromEntries(Object.entries(e.props).map(([e,t])=>typeof t==`function`?[e,{__type__:`function`,__value__:t.toString()}]:[e,t]))}}function iO(e){let n=eO[e];return(0,t.h)(n,{size:20})}var aO={class:`label`},oO={class:`actions-right`},sO={class:`actions`},cO=W((0,t.defineComponent)({__name:`Collection`,props:(0,t.mergeModels)({layout:{},fields:{},description:{},detailedDescription:{},bridge:{},defaultObject:{},defaultValue:{},mobile:{type:Boolean,default:!1},min:{default:0},max:{default:1/0}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,r=(0,t.ref)(m()),i=(0,t.useModel)(e,`modelValue`),a=(0,t.ref)();(0,t.onMounted)(()=>{a.value&&cE.create(a.value,{animation:500,handle:`.drag-btn`,preventOnFilter:!0,ghostClass:`sortable-ghost`,chosenClass:`sortable-chosen`,dragClass:`sortable-drag`,onUpdate:function(e){h(e.oldIndex,e.newIndex)}})});let o=new WeakMap;function s(e,n){if(typeof e!=`object`||!e)return`idx-${n}`;let r=(0,t.toRaw)(e),i=o.get(r);return i||(i=m(),o.set(r,i)),i}let c=(0,t.ref)(i.value?.[0]?s(i.value[0],0):null);(0,t.watch)(()=>i.value,(e,t)=>{(t?.length??0)===0&&e&&e.length>0&&c.value===null&&(c.value=s(e[0],0))});function l(e,t){return c.value!==null&&s(e,t)===c.value}function u(e,t){let n=s(e,t);c.value=c.value===n?null:n}function d(){if(_.value)return;let e=n.defaultObject??n.defaultValue,t=Object.fromEntries(n.fields.map(t=>Object.entries(t.model).map(([n,r])=>e&&r in e?[r,e[r]]:[r,tO(t,n)])).flat()),r=Gx(e?t:i.value?.[0]??t);i.value=[...i.value??[],r],c.value=s(r,i.value.length-1)}function f(e,t){i.value[e]=t}function p(e){if(v.value)return;let t=i.value[e];l(t,e)&&(c.value=null),i.value=i.value.filter((t,n)=>n!==e)}function h(e,t){let n=i.value[e];i.value.splice(e,1),i.value.splice(t,0,n),r.value=m()}function g(e){let t=i.value.indexOf(e),r=n.fields.find(e=>e.type===`Text`);return r?e[r.model.modelValue]??`Entry ${t+1}`:`Entry ${t+1}`}let _=(0,t.computed)(()=>i.value instanceof Array&&i.value.length>=n.max),v=(0,t.computed)(()=>i.value instanceof Array&&i.value.length<=n.min);return(n,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`collection-field`,{mobile:e.mobile}])},[(0,t.createElementVNode)(`div`,{ref_key:`entriesListRef`,ref:a,class:`entries-list`},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.value,(n,i)=>((0,t.openBlock)(),(0,t.createBlock)(Rx,{key:s(n,i)+`-`+r.value},(0,t.createSlots)({header:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,{class:`drag-btn swiper-no-swiping`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Ste))]),_:1}),(0,t.createElementVNode)(`div`,aO,(0,t.toDisplayString)(g(n)),1),(0,t.createElementVNode)(`div`,oO,[(0,t.createVNode)(Jv,{circle:``,size:`small`,tertiary:``,onClick:e=>u(n,i)},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[l(n,i)?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ey),{key:0})):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ay),{key:1}))]),_:2},1024)]),_:2},1032,[`onClick`]),(0,t.createVNode)(Jv,{circle:``,size:`small`,tertiary:``,disabled:v.value,onClick:e=>p(i)},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(My))]),_:1})]),_:1},8,[`disabled`,`onClick`])])]),_:2},[l(n,i)?{name:`default`,fn:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`main`,null,[(0,t.createVNode)(Hae,{data:n,"onUpdate:data":e=>f(i,e),fields:e.fields,bridge:e.bridge,layout:e.layout},null,8,[`data`,`onUpdate:data`,`fields`,`bridge`,`layout`])])]),key:`0`}:void 0]),1024))),128))],512),(0,t.createElementVNode)(`div`,sO,[(0,t.createVNode)(Jv,{tertiary:``,disabled:_.value,centered:``,onClick:d},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Xv))]),_:1})]),default:(0,t.withCtx)(()=>[o[0]||=(0,t.createTextVNode)(` Add entry `,-1)]),_:1},8,[`disabled`])])],2))}}),[[`__scopeId`,`data-v-c44cd7d2`]]),lO={class:`map`},uO=W((0,t.defineComponent)({__name:`MapboxMap`,props:{bounds:{},padding:{},mapboxAccessToken:{},mapboxStyle:{},projection:{},bearing:{},pitch:{},synchronousPrecision:{},ratio:{}},emits:[`update:bounds`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.ref)(),{width:o,height:s}=Qi(a),c;(0,t.onMounted)(()=>{}),(0,t.watch)(()=>r.mapboxStyle,()=>{}),(0,t.watch)(()=>r.projection,()=>{}),(0,t.watch)(()=>r.bearing,()=>{}),(0,t.watch)(()=>r.pitch,()=>{}),(0,t.watch)([()=>r.bounds,()=>r.padding],()=>{});let l=(0,t.computed)(()=>o.value&&s.value?o.value/s.value:1),u=(0,t.computed)(()=>{let e=o.value-r.padding[0]-r.padding[2],t=s.value-r.padding[1]-r.padding[3];if(l.value>=r.ratio){let n=t*r.ratio;return{x:r.padding[0]+(e-n)/2,y:r.padding[1]+0,width:n,height:t}}{let n=e/r.ratio;return{x:r.padding[0]+0,y:r.padding[1]+(t-n)/2,width:e,height:n}}}),d=(0,t.ref)();return(0,t.watch)(d,TC(()=>{!Ux(d.value,r.bounds)&&d.value&&i(`update:bounds`,d.value)},100)),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,lO,[(0,t.createElementVNode)(`div`,{ref_key:`mapboxMapRef`,ref:a,class:`mapbox-map`},null,512),u.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`layer`,style:(0,t.normalizeStyle)({"--x":`${u.value.x}px`,"--y":`${u.value.y}px`,"--width":`${u.value.width}px`,"--height":`${u.value.height}px`})},[(0,t.renderSlot)(e.$slots,`layer`,{bounds:d.value,bbox:u.value,map:(0,t.unref)(c)},void 0,!0)],4)):(0,t.createCommentVNode)(``,!0)]))}}),[[`__scopeId`,`data-v-174d2b1e`]]),dO={class:`preview-image`},fO=[`src`],pO={class:`map-wrapper`},mO=W((0,t.defineComponent)({__name:`Map`,props:{modelValue:{},padding:{default:0},mapStyle:{default:`mapbox://styles/mapbox/streets-v11`},mapboxAccessToken:{},type:{default:`popup`},aspectRatio:{}},emits:[`update:model-value`],setup(e,{emit:n}){let r=Uv(),i=e,a=n,o=(0,t.ref)(),{width:s}=Qi(o),c=(0,t.ref)(!1);(0,t.watch)(c,()=>{c.value||(l.value=u.value,a(`update:model-value`,l.value))});let l=(0,t.ref)(i.modelValue),u=(0,t.ref)(i.modelValue),d=TC(e=>{u.value=e,i.type===`inline`&&a(`update:model-value`,u.value)},500);function f(){let e=i.mapStyle?.replace(`mapbox://styles/`,``),t=Math.round(s.value??200);return`https://api.mapbox.com/styles/v1/${e}/static/[${l.value.join(`,`)}]/${t}x${Math.round(t/i.aspectRatio)}@2x?access_token=${i.mapboxAccessToken}`}let p=(0,t.ref)(f());return(0,t.watch)(l,TC(()=>{p.value=f()},500)),(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`mapFieldRef`,ref:o,class:(0,t.normalizeClass)([`field-map`,{[`type-`+e.type]:!0}]),style:(0,t.normalizeStyle)({"--aspect-ratio":e.aspectRatio})},[e.type===`inline`?((0,t.openBlock)(),(0,t.createBlock)(uO,{key:0,bounds:e.modelValue,"onUpdate:bounds":(0,t.unref)(d),bearing:0,pitch:0,"mapbox-access-token":e.mapboxAccessToken,"mapbox-style":e.mapStyle,padding:[e.padding,e.padding,e.padding,e.padding],projection:{name:`globe`},ratio:e.aspectRatio,"synchronous-precision":8},{layer:(0,t.withCtx)(({bounds:e,map:n,bbox:r})=>[e&&n?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`layer-wrapper`,style:(0,t.normalizeStyle)({"--x":`${n.project([e[0],e[1]]).x}px`,"--y":`${n.project([e[2],e[3]]).y}px`,"--width":`${n.project([e[2],e[3]]).x-n.project([e[0],e[1]]).x}px`,"--height":`${n.project([e[0],e[1]]).y-n.project([e[2],e[3]]).y}px`})},[...i[1]||=[(0,t.createElementVNode)(`div`,{class:`overlay`},null,-1),(0,t.createElementVNode)(`div`,{class:`viewport-border`},null,-1)]],4)):(0,t.createCommentVNode)(``,!0)]),_:1},8,[`bounds`,`onUpdate:bounds`,`mapbox-access-token`,`mapbox-style`,`padding`,`ratio`])):((0,t.openBlock)(),(0,t.createBlock)(Lx,{key:1,type:`layer`,transculent:``,show:c.value,"onUpdate:show":i[0]||=e=>c.value=e},{trigger:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,dO,[(0,t.createElementVNode)(`img`,{src:(0,t.unref)(r)(p.value)},null,8,fO)])]),"close-btn":(0,t.withCtx)(()=>[(0,t.createVNode)(Jv,{round:``,tertiary:``,class:`close-btn`},{default:(0,t.withCtx)(()=>[...i[2]||=[(0,t.createTextVNode)(` Done `,-1)]]),_:1})]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,pO,[(0,t.createVNode)(uO,{bounds:e.modelValue,"onUpdate:bounds":(0,t.unref)(d),bearing:0,pitch:0,"mapbox-access-token":e.mapboxAccessToken,"mapbox-style":e.mapStyle,padding:[e.padding,e.padding,e.padding,e.padding],projection:{name:`globe`},ratio:e.aspectRatio,"synchronous-precision":8},{layer:(0,t.withCtx)(({bounds:e,map:n,bbox:r})=>[e&&n?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`layer-wrapper`,style:(0,t.normalizeStyle)({"--x":`${n.project([e[0],e[1]]).x}px`,"--y":`${n.project([e[2],e[3]]).y}px`,"--width":`${n.project([e[2],e[3]]).x-n.project([e[0],e[1]]).x}px`,"--height":`${n.project([e[0],e[1]]).y-n.project([e[2],e[3]]).y}px`})},[...i[3]||=[(0,t.createElementVNode)(`div`,{class:`overlay`},null,-1),(0,t.createElementVNode)(`div`,{class:`viewport-border`},null,-1),(0,t.createElementVNode)(`div`,{class:`marker`},[(0,t.createElementVNode)(`svg`,{version:`1.0`,id:`Layer_1`,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 64 64`,"enable-background":`new 0 0 64 64`,"xml:space":`preserve`},[(0,t.createElementVNode)(`path`,{d:`M32,0C18.746,0,8,10.746,8,24c0,5.219,1.711,10.008,4.555,13.93c0.051,0.094,0.059,0.199,0.117,0.289l16,24 C29.414,63.332,30.664,64,32,64s2.586-0.668,3.328-1.781l16-24c0.059-0.09,0.066-0.195,0.117-0.289C54.289,34.008,56,29.219,56,24 C56,10.746,45.254,0,32,0z M32,32c-4.418,0-8-3.582-8-8s3.582-8,8-8s8,3.582,8,8S36.418,32,32,32z`})])],-1)]],4)):(0,t.createCommentVNode)(``,!0)]),_:1},8,[`bounds`,`onUpdate:bounds`,`mapbox-access-token`,`mapbox-style`,`padding`,`ratio`])])]),_:1},8,[`show`]))],6))}}),[[`__scopeId`,`data-v-935862fa`]]),hO=[`aria-label`,`aria-labelledby`],gO=[`aria-selected`,`aria-disabled`,`tabindex`,`onClick`],_O={key:1},vO=[`aria-label`,`aria-labelledby`],yO=W((0,t.defineComponent)({__name:`BxTabs`,props:(0,t.mergeModels)({tabs:{},secondary:{type:Boolean,default:!1},size:{default:`medium`},fullWidth:{type:Boolean,default:!1},fitWidth:{type:Boolean,default:!1},ariaLabel:{},ariaLabelledby:{}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,r=(0,t.useModel)(e,`modelValue`);!r.value&&n.tabs.length>0&&(r.value=(n.tabs.find(e=>!e.disabled)??n.tabs[0]).name);function i(e){e.disabled||(r.value=e.name)}let a=[];function o(e,t){if(!e){a[t]=void 0;return}let n=e instanceof HTMLElement?e:e.$el;a[t]=n instanceof HTMLElement?n:void 0}function s(e){let t=n.tabs[e];t&&!t.disabled&&(r.value=t.name,a[e]?.focus())}function c(e){let t=n.tabs.length;if(t===0)return;let i=n.tabs.findIndex(e=>e.name===r.value),a=i<0?0:i,o=e=>!n.tabs[e]?.disabled,c=(e,n)=>{for(let r=1;r<=t;r++){let i=((e+n*r)%t+t)%t;if(o(i))return i}return e},l;switch(e.key){case`ArrowRight`:case`ArrowDown`:l=c(a,1);break;case`ArrowLeft`:case`ArrowUp`:l=c(a,-1);break;case`Home`:l=c(t-1,1);break;case`End`:l=c(0,-1);break;default:return}e.preventDefault(),s(l)}return(n,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`bx-tabs-wrapper`,{"full-width":e.fullWidth,"fit-width":e.fitWidth,secondary:e.secondary,[`size-${e.size}`]:!0}])},[e.secondary?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`bx-tabs-secondary`,role:`tablist`,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onKeydown:c},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.tabs,(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(VS,{key:n,trigger:e.tooltip?`hover`:`manual`,"allowed-placements":[`bottom`,`top`]},{trigger:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`button`,{ref_for:!0,ref:e=>o(e,n),type:`button`,role:`tab`,"aria-selected":r.value===e.name,"aria-disabled":e.disabled||void 0,tabindex:r.value===e.name?0:-1,class:(0,t.normalizeClass)([`tab`,{active:r.value===e.name,"tab-disabled":e.disabled}]),onClick:t=>i(e)},[e.icon?((0,t.openBlock)(),(0,t.createBlock)(vb,{key:0,class:`tab-icon`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.icon)))]),_:2},1024)):(0,t.createCommentVNode)(``,!0),e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,_O,(0,t.toDisplayString)(e.label),1)):(0,t.createCommentVNode)(``,!0),e.suffix?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.suffix),{key:2,class:`tab-suffix`})):(0,t.createCommentVNode)(``,!0)],10,gO)]),content:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,null,(0,t.toDisplayString)(e.tooltip),1)]),_:2},1032,[`trigger`]))),128))],40,hO)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:`bx-tabs-buttons`,role:`tablist`,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onKeydown:c},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.tabs,(n,a)=>((0,t.openBlock)(),(0,t.createBlock)(VS,{key:a,trigger:n.tooltip?`hover`:`manual`,"allowed-placements":[`bottom`,`top`]},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)(Jv,{ref_for:!0,ref:e=>o(e,a),role:`tab`,"aria-selected":r.value===n.name,"aria-disabled":n.disabled||void 0,tabindex:r.value===n.name?0:-1,secondary:``,size:e.size,active:r.value===n.name,centered:e.fullWidth||e.fitWidth,class:(0,t.normalizeClass)({"tab-disabled":n.disabled}),onClick:e=>i(n)},(0,t.createSlots)({_:2},[n.icon?{name:`icon`,fn:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(n.icon)))]),_:2},1024)]),key:`0`}:void 0,n.label||n.suffix?{name:`default`,fn:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.label)+` `,1),n.suffix?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(n.suffix),{key:0,class:`tab-suffix`})):(0,t.createCommentVNode)(``,!0)]),key:`1`}:void 0]),1032,[`aria-selected`,`aria-disabled`,`tabindex`,`size`,`active`,`centered`,`class`,`onClick`])]),content:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,null,(0,t.toDisplayString)(n.tooltip),1)]),_:2},1032,[`trigger`]))),128))],40,vO))],2))}}),[[`__scopeId`,`data-v-cd56c5a8`]]),bO={aliceblue:`#F0F8FF`,antiquewhite:`#FAEBD7`,aqua:`#00FFFF`,aquamarine:`#7FFFD4`,azure:`#F0FFFF`,beige:`#F5F5DC`,bisque:`#FFE4C4`,black:`#000000`,blanchedalmond:`#FFEBCD`,blue:`#0000FF`,blueviolet:`#8A2BE2`,brown:`#A52A2A`,burlywood:`#DEB887`,cadetblue:`#5F9EA0`,chartreuse:`#7FFF00`,chocolate:`#D2691E`,coral:`#FF7F50`,cornflowerblue:`#6495ED`,cornsilk:`#FFF8DC`,crimson:`#DC143C`,cyan:`#00FFFF`,darkblue:`#00008B`,darkcyan:`#008B8B`,darkgoldenrod:`#B8860B`,darkgray:`#A9A9A9`,darkgrey:`#A9A9A9`,darkgreen:`#006400`,darkkhaki:`#BDB76B`,darkmagenta:`#8B008B`,darkolivegreen:`#556B2F`,darkorange:`#FF8C00`,darkorchid:`#9932CC`,darkred:`#8B0000`,darksalmon:`#E9967A`,darkseagreen:`#8FBC8F`,darkslateblue:`#483D8B`,darkslategray:`#2F4F4F`,darkslategrey:`#2F4F4F`,darkturquoise:`#00CED1`,darkviolet:`#9400D3`,deeppink:`#FF1493`,deepskyblue:`#00BFFF`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1E90FF`,firebrick:`#B22222`,floralwhite:`#FFFAF0`,forestgreen:`#228B22`,fuchsia:`#FF00FF`,gainsboro:`#DCDCDC`,ghostwhite:`#F8F8FF`,gold:`#FFD700`,goldenrod:`#DAA520`,gray:`#808080`,grey:`#808080`,green:`#008000`,greenyellow:`#ADFF2F`,honeydew:`#F0FFF0`,hotpink:`#FF69B4`,indianred:`#CD5C5C`,indigo:`#4B0082`,ivory:`#FFFFF0`,khaki:`#F0E68C`,lavender:`#E6E6FA`,lavenderblush:`#FFF0F5`,lawngreen:`#7CFC00`,lemonchiffon:`#FFFACD`,lightblue:`#ADD8E6`,lightcoral:`#F08080`,lightcyan:`#E0FFFF`,lightgoldenrodyellow:`#FAFAD2`,lightgray:`#D3D3D3`,lightgrey:`#D3D3D3`,lightgreen:`#90EE90`,lightpink:`#FFB6C1`,lightsalmon:`#FFA07A`,lightseagreen:`#20B2AA`,lightskyblue:`#87CEFA`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#B0C4DE`,lightyellow:`#FFFFE0`,lime:`#00FF00`,limegreen:`#32CD32`,linen:`#FAF0E6`,magenta:`#FF00FF`,maroon:`#800000`,mediumaquamarine:`#66CDAA`,mediumblue:`#0000CD`,mediumorchid:`#BA55D3`,mediumpurple:`#9370DB`,mediumseagreen:`#3CB371`,mediumslateblue:`#7B68EE`,mediumspringgreen:`#00FA9A`,mediumturquoise:`#48D1CC`,mediumvioletred:`#C71585`,midnightblue:`#191970`,mintcream:`#F5FFFA`,mistyrose:`#FFE4E1`,moccasin:`#FFE4B5`,navajowhite:`#FFDEAD`,navy:`#000080`,oldlace:`#FDF5E6`,olive:`#808000`,olivedrab:`#6B8E23`,orange:`#FFA500`,orangered:`#FF4500`,orchid:`#DA70D6`,palegoldenrod:`#EEE8AA`,palegreen:`#98FB98`,paleturquoise:`#AFEEEE`,palevioletred:`#DB7093`,papayawhip:`#FFEFD5`,peachpuff:`#FFDAB9`,peru:`#CD853F`,pink:`#FFC0CB`,plum:`#DDA0DD`,powderblue:`#B0E0E6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#FF0000`,rosybrown:`#BC8F8F`,royalblue:`#4169E1`,saddlebrown:`#8B4513`,salmon:`#FA8072`,sandybrown:`#F4A460`,seagreen:`#2E8B57`,seashell:`#FFF5EE`,sienna:`#A0522D`,silver:`#C0C0C0`,skyblue:`#87CEEB`,slateblue:`#6A5ACD`,slategray:`#708090`,slategrey:`#708090`,snow:`#FFFAFA`,springgreen:`#00FF7F`,steelblue:`#4682B4`,tan:`#D2B48C`,teal:`#008080`,thistle:`#D8BFD8`,tomato:`#FF6347`,turquoise:`#40E0D0`,violet:`#EE82EE`,wheat:`#F5DEB3`,white:`#FFFFFF`,whitesmoke:`#F5F5F5`,yellow:`#FFFF00`,yellowgreen:`#9ACD32`};function xO(e,t,n){let r,i,a;if(t===0)r=i=a=n;else{let o=(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;r=o(c,s,e+1/3),i=o(c,s,e),a=o(c,s,e-1/3)}return[r*255,i*255,a*255]}function SO(e){if(e.startsWith(`rgb`)){let[t,n,r]=e.slice(4,-1).split(`,`).map(e=>Number(e.trim()));return[t,n,r,1]}if(e.startsWith(`rgba`)){let[t,n,r,i]=e.slice(5,-1).split(`,`).map(e=>Number(e.trim()));return[t,n,r,i]}if(e.startsWith(`#`)){let t=e.slice(1);return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),1]}if(e.startsWith(`hsl`)){let[t,n,r]=e.slice(4,-1).split(`,`).map(e=>Number(e.trim()));return[...xO(t,n,r),1]}if(e.startsWith(`hsla`)){let[t,n,r,i]=e.slice(5,-1).split(`,`).map(e=>Number(e.trim()));return[...xO(t,n,r),i]}if(e.startsWith(`transparent`))return[0,0,0,0];{let t=e.toLowerCase();if(t in bO)return SO(bO[t]);throw Error(`Unknown color: ${e}`)}}function CO(e){let[t,n,r]=SO(e);return(t*2126+n*7152+r*722)/1e4<128}var wO=(e,t=0)=>{let n=3735928559^t,r=1103547991^t;for(let t=0,i;t<e.length;t++)i=e.charCodeAt(t),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),4294967296*(2097151&r)+(n>>>0)},TO=(e,t=0)=>wO(e,t).toString(16).padStart(16,`0`);function EO(e,t,n){let r=0;for(var i=0;i<e.length;i++)r=e.charCodeAt(i)+((r<<5)-r);return`hsl(${r%360}, ${t*100}%, ${n*100}%)`}function DO(e){if(e=e.trim(),/^#[0-9a-fA-F]{3,8}$/.test(e)){let t=e.slice(1);return t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]+`ff`),t.length===6&&(t+=`ff`),t.length===8?[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),parseInt(t.slice(6,8),16)/255]:null}let t=e.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)$/);if(t)return[+t[1],+t[2],+t[3],t[4]===void 0?1:+t[4]];let n=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(?:,\s*([\d.]+))?\s*\)$/);if(n){let[e,t,r]=xO(+n[1],+n[2],+n[3]);return[e,t,r,n[4]===void 0?1:+n[4]]}return null}function OO(e){return Math.round(Math.max(0,Math.min(255,e))).toString(16).padStart(2,`0`)}function kO(e,t,n,r=1){let i=`#${OO(e)}${OO(t)}${OO(n)}`;return r<.9999?`${i}${OO(r*255)}`:i}function AO(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=0;return i&&(a=r===e?(t-n)/i%6:r===t?(n-e)/i+2:(e-t)/i+4,a*=60,a<0&&(a+=360)),[a,r?i/r*100:0,r*100]}var jO={class:`bx-color-picker`},MO={class:`hue-row`},NO={key:2,class:`rgb-view`},PO={class:`rgb-row`},FO={class:`rgb-value`},IO={class:`rgb-row`},LO={class:`rgb-value`},RO={class:`rgb-row`},zO={class:`rgb-value`},BO={key:3,class:`palette-view`},VO={class:`palette-grid`},HO=[`onClick`],UO={class:`color-controls`},WO={class:`color-preview-wrap`},GO={class:`alpha-col`},KO={class:`color-input-row`},qO=W((0,t.defineComponent)({__name:`BxColorPicker`,props:{modelValue:{default:`#ff0000`},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let n=(0,t.ref)(`spectrum`),r=`#ef4444.#f97316.#f59e0b.#eab308.#84cc16.#22c55e.#10b981.#06b6d4.#3b82f6.#8b5cf6.#b91c1c.#c2410c.#b45309.#a16207.#4d7c0f.#15803d.#047857.#0e7490.#1d4ed8.#6d28d9.#fca5a5.#fdba74.#fcd34d.#fef08a.#d9f99d.#bbf7d0.#a7f3d0.#a5f3fc.#bfdbfe.#ddd6fe.#ffffff.#f3f4f6.#d1d5db.#9ca3af.#6b7280.#4b5563.#374151.#1f2937.#111827.#000000`.split(`.`);function i(e,t,n){t/=100,n/=100;let r=n*t,i=r*(1-Math.abs(e/60%2-1)),a=n-r,o=0,s=0,c=0;return e<60?(o=r,s=i):e<120?(o=i,s=r):e<180?(s=r,c=i):e<240?(s=i,c=r):e<300?(o=i,c=r):(o=r,c=i),[Math.round((o+a)*255),Math.round((s+a)*255),Math.round((c+a)*255)]}function a(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=Math.min(e,t,n),a=(r+i)/2;if(r===i)return[0,0,Math.round(a*100)];let o=r-i,s=a>.5?o/(2-r-i):o/(r+i),c=0;return c=r===e?(t-n)/o%6:r===t?(n-e)/o+2:(e-t)/o+4,c*=60,c<0&&(c+=360),[Math.round(c),Math.round(s*100),Math.round(a*100)]}function o(e){let[t,n,r,i]=e,[a,o,s]=AO(t,n,r);c.value=a,l.value=o,u.value=s,d.value=i}let s=(0,t.useModel)(e,`modelValue`),c=(0,t.ref)(0),l=(0,t.ref)(100),u=(0,t.ref)(100),d=(0,t.ref)(1),f=(0,t.ref)(`HEX`),p=(0,t.ref)(``),m=(0,t.ref)(!1),h=(0,t.ref)(!1),g=(0,t.ref)(),_=(0,t.ref)(),v=(0,t.ref)(),y=(0,t.ref)(),b=(0,t.ref)(),x=(0,t.ref)(),S=(0,t.computed)(()=>i(c.value,l.value,u.value)),C=(0,t.computed)(()=>`rgb(${S.value.join(`, `)})`),w=(0,t.computed)(()=>`rgba(${S.value.join(`, `)}, ${d.value})`),T=(0,t.computed)(()=>S.value[0]),E=(0,t.computed)(()=>S.value[1]),D=(0,t.computed)(()=>S.value[2]);function O(){let[e,t,n]=S.value,r=d.value,i=Math.round(r*100)/100;if(f.value===`HEX`)return kO(e,t,n,r);if(f.value===`RGB`)return r<.9999?`rgba(${e}, ${t}, ${n}, ${i})`:`rgb(${e}, ${t}, ${n})`;{let[o,s,c]=a(e,t,n);return r<.9999?`hsla(${o}, ${s}%, ${c}%, ${i})`:`hsl(${o}, ${s}%, ${c}%)`}}function k(){m.value||(p.value=O(),h.value=!1)}let A=DO(s.value);A&&o(A),k();let j=!1;(0,t.watch)([c,l,u,d],()=>{j=!0,s.value=O(),k(),Promise.resolve().then(()=>{j=!1})}),(0,t.watch)(f,k),(0,t.watch)(s,e=>{if(j)return;let t=DO(e);if(!t)return;let[n,r,i,a]=t,[s,c,l]=S.value;n===s&&r===c&&i===l&&Math.abs(a-d.value)<.005||(o(t),k())});function M(){let e=DO(p.value);if(!e){h.value=!0;return}h.value=!1,o(e)}function N(){m.value=!1,M(),k()}function P(){let e=[`HEX`,`RGB`,`HSL`];f.value=e[(e.indexOf(f.value)+1)%e.length]}function F(e){let t=DO(e);if(!t)return;let[n,r,i]=t,[a,o,s]=AO(n,r,i);c.value=a,l.value=o,u.value=s}function I(e){return kO(T.value,E.value,D.value)===e}let L=null,ee=null;function R(e,t,n){return Math.max(t,Math.min(n,e))}function B(e,t,n,r){if(r===`canvas`)l.value=R((e-n.left)/n.width*100,0,100),u.value=R(100-(t-n.top)/n.height*100,0,100);else if(r===`hue`)c.value=R((e-n.left)/n.width*360,0,360);else if(r===`alpha`)d.value=R((e-n.left)/n.width,0,1);else{let t=R(Math.round((e-n.left)/n.width*255),0,255),[i,a,o]=S.value,[s,d,f]=AO(r===`r`?t:i,r===`g`?t:a,r===`b`?t:o);d>.01&&(c.value=s),l.value=d,u.value=f}}function te(e,t,n,r){t&&(L=e,ee=t.getBoundingClientRect(),B(n,r,ee,e))}function ne(e){te(`canvas`,g.value,e.clientX,e.clientY)}function re(e){te(`canvas`,g.value,e.touches[0].clientX,e.touches[0].clientY)}function V(e){te(`hue`,_.value,e.clientX,e.clientY)}function ie(e){te(`hue`,_.value,e.touches[0].clientX,e.touches[0].clientY)}function ae(e){te(`alpha`,v.value,e.clientX,e.clientY)}function oe(e){te(`alpha`,v.value,e.touches[0].clientX,e.touches[0].clientY)}function H(e){te(`r`,y.value,e.clientX,e.clientY)}function se(e){te(`r`,y.value,e.touches[0].clientX,e.touches[0].clientY)}function ce(e){te(`g`,b.value,e.clientX,e.clientY)}function le(e){te(`g`,b.value,e.touches[0].clientX,e.touches[0].clientY)}function ue(e){te(`b`,x.value,e.clientX,e.clientY)}function de(e){te(`b`,x.value,e.touches[0].clientX,e.touches[0].clientY)}function fe(e,t){L&&ee&&B(e,t,ee,L)}function pe(){L=null,ee=null}let me=e=>fe(e.clientX,e.clientY),he=e=>fe(e.touches[0].clientX,e.touches[0].clientY);window.addEventListener(`mousemove`,me),window.addEventListener(`mouseup`,pe),window.addEventListener(`touchmove`,he,{passive:!0}),window.addEventListener(`touchend`,pe),(0,t.onUnmounted)(()=>{window.removeEventListener(`mousemove`,me),window.removeEventListener(`mouseup`,pe),window.removeEventListener(`touchmove`,he),window.removeEventListener(`touchend`,pe)});let ge=`EyeDropper`in window;async function _e(){if(ge)try{let e=DO((await new window.EyeDropper().open()).sRGBHex);e&&o(e)}catch{}}return(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,jO,[(0,t.createCommentVNode)(``,!0),n.value===`spectrum`?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createElementVNode)(`div`,{ref_key:`canvasRef`,ref:g,class:`color-canvas`,style:(0,t.normalizeStyle)({"--canvas-hue":c.value}),onMousedown:ne,onTouchstart:(0,t.withModifiers)(re,[`prevent`])},[(0,t.createElementVNode)(`div`,{class:`canvas-cursor`,style:(0,t.normalizeStyle)({left:l.value+`%`,top:100-u.value+`%`})},null,4)],36),(0,t.createElementVNode)(`div`,MO,[(0,t.createElementVNode)(`div`,{ref_key:`hueRef`,ref:_,class:`color-slider hue-slider`,onMousedown:V,onTouchstart:(0,t.withModifiers)(ie,[`prevent`])},[(0,t.createElementVNode)(`div`,{class:`slider-thumb`,style:(0,t.normalizeStyle)({left:c.value/360*100+`%`})},null,4)],544)])],64)):n.value===`rgb`?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,NO,[(0,t.createElementVNode)(`div`,PO,[i[3]||=(0,t.createElementVNode)(`span`,{class:`rgb-label`,style:{color:`#f87171`}},`R`,-1),(0,t.createElementVNode)(`div`,{ref_key:`rRef`,ref:y,class:`color-slider rgb-slider`,style:(0,t.normalizeStyle)({background:`linear-gradient(to right, rgb(0,${E.value},${D.value}), rgb(255,${E.value},${D.value}))`}),onMousedown:H,onTouchstart:(0,t.withModifiers)(se,[`prevent`])},[(0,t.createElementVNode)(`div`,{class:`slider-thumb`,style:(0,t.normalizeStyle)({left:T.value/255*100+`%`})},null,4)],36),(0,t.createElementVNode)(`span`,FO,(0,t.toDisplayString)(T.value),1)]),(0,t.createElementVNode)(`div`,IO,[i[4]||=(0,t.createElementVNode)(`span`,{class:`rgb-label`,style:{color:`#4ade80`}},`G`,-1),(0,t.createElementVNode)(`div`,{ref_key:`gRef`,ref:b,class:`color-slider rgb-slider`,style:(0,t.normalizeStyle)({background:`linear-gradient(to right, rgb(${T.value},0,${D.value}), rgb(${T.value},255,${D.value}))`}),onMousedown:ce,onTouchstart:(0,t.withModifiers)(le,[`prevent`])},[(0,t.createElementVNode)(`div`,{class:`slider-thumb`,style:(0,t.normalizeStyle)({left:E.value/255*100+`%`})},null,4)],36),(0,t.createElementVNode)(`span`,LO,(0,t.toDisplayString)(E.value),1)]),(0,t.createElementVNode)(`div`,RO,[i[5]||=(0,t.createElementVNode)(`span`,{class:`rgb-label`,style:{color:`#60a5fa`}},`B`,-1),(0,t.createElementVNode)(`div`,{ref_key:`bRef`,ref:x,class:`color-slider rgb-slider`,style:(0,t.normalizeStyle)({background:`linear-gradient(to right, rgb(${T.value},${E.value},0), rgb(${T.value},${E.value},255))`}),onMousedown:ue,onTouchstart:(0,t.withModifiers)(de,[`prevent`])},[(0,t.createElementVNode)(`div`,{class:`slider-thumb`,style:(0,t.normalizeStyle)({left:D.value/255*100+`%`})},null,4)],36),(0,t.createElementVNode)(`span`,zO,(0,t.toDisplayString)(D.value),1)])])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,BO,[(0,t.createElementVNode)(`div`,VO,[((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r,e=>(0,t.createElementVNode)(`div`,{key:e,class:(0,t.normalizeClass)([`swatch`,{active:I(e)}]),style:(0,t.normalizeStyle)({backgroundColor:e}),onClick:t=>F(e)},null,14,HO)),64))])])),(0,t.createElementVNode)(`div`,UO,[(0,t.createElementVNode)(`div`,WO,[i[6]||=(0,t.createElementVNode)(`div`,{class:`checker`},null,-1),(0,t.createElementVNode)(`div`,{class:`color-preview`,style:(0,t.normalizeStyle)({backgroundColor:w.value})},null,4)]),(0,t.createElementVNode)(`div`,GO,[(0,t.createElementVNode)(`div`,{ref_key:`alphaRef`,ref:v,class:`color-slider alpha-slider`,style:(0,t.normalizeStyle)({"--alpha-color-rgb":C.value}),onMousedown:ae,onTouchstart:(0,t.withModifiers)(oe,[`prevent`])},[(0,t.createElementVNode)(`div`,{class:`slider-thumb`,style:(0,t.normalizeStyle)({left:d.value*100+`%`})},null,4)],36)])]),(0,t.createElementVNode)(`div`,KO,[(0,t.createVNode)(nC,{modelValue:p.value,"onUpdate:modelValue":i[1]||=e=>p.value=e,class:(0,t.normalizeClass)([`color-value-input`,{"is-invalid":h.value}]),onFocus:i[2]||=e=>m.value=!0,onBlur:N,onEnter:M},null,8,[`modelValue`,`class`]),(0,t.createVNode)(Jv,{secondary:``,class:`format-btn`,onClick:P},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(f.value),1)]),_:1}),(0,t.createVNode)(Jv,{secondary:``,class:`eyedropper-btn`,disabled:!ge,onClick:_e},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,{size:14},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Xy))]),_:1})]),_:1},8,[`disabled`])])]))}}),[[`__scopeId`,`data-v-4fe09951`]]),JO=[`tabindex`,`aria-expanded`,`aria-disabled`,`aria-label`,`aria-labelledby`],YO={key:0,class:`trigger-label`},XO={key:1,class:`trigger-chevron`},ZO=W((0,t.defineComponent)({__name:`BxColorPickerPopover`,props:(0,t.mergeModels)({disabled:{type:Boolean,default:!1},placeholder:{default:`Pick a color…`},triggerLabel:{type:Boolean,default:!0},roundColorSwatch:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1},ariaLabel:{},ariaLabelledby:{}},{modelValue:{required:!1,default:`#ff0000`},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,r=(0,t.useSlots)(),i=(0,t.useModel)(e,`modelValue`),a=(0,t.ref)(!1),o=(0,t.ref)(),s=(0,t.ref)();function c(e){if(!n.disabled)switch(e.key){case`Enter`:case` `:e.preventDefault(),o.value?.show();break;case`Escape`:o.value?.close()}}return(0,t.watch)(a,(e,n)=>{n&&!e&&(0,t.nextTick)(()=>{s.value?.querySelector(`.color-trigger`)?.focus()})}),(n,l)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`rootRef`,ref:s,class:(0,t.normalizeClass)([`bx-color-picker-popover`,{disabled:e.disabled,bordered:e.bordered}])},[(0,t.createVNode)(MS,{ref_key:`popoverRef`,ref:o,trigger:`click`,"allowed-placements":[`bottom-start`,`top-start`,`bottom`,`top`],arrow:!1,"darken-background":!1,"custom-classes":[`bx-color-picker-popover`],"floating-padding":4,show:a.value,"onUpdate:show":l[1]||=e=>a.value=e,"transition-duration":0},{trigger:(0,t.withCtx)(()=>[r.trigger?(0,t.renderSlot)(n.$slots,`trigger`,{key:0},void 0,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:(0,t.normalizeClass)([`color-trigger`,{focus:a.value,disabled:e.disabled,"swatch-only":!e.triggerLabel}]),role:`button`,tabindex:e.disabled?-1:0,"aria-haspopup":`dialog`,"aria-expanded":a.value?`true`:`false`,"aria-disabled":e.disabled?`true`:void 0,"aria-label":e.ariaLabelledby?void 0:e.ariaLabel??(i.value?`Color ${i.value}`:`Pick a color`),"aria-labelledby":e.ariaLabelledby,onKeydown:c},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`trigger-swatch-wrap`,{round:e.roundColorSwatch}])},[l[2]||=(0,t.createElementVNode)(`div`,{class:`trigger-checker`},null,-1),(0,t.createElementVNode)(`div`,{class:`trigger-swatch`,style:(0,t.normalizeStyle)({backgroundColor:i.value})},null,4)],2),e.triggerLabel?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,YO,[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)({placeholder:!i.value})},(0,t.toDisplayString)(i.value||e.placeholder),3)])):(0,t.createCommentVNode)(``,!0),e.triggerLabel?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,XO,[(0,t.createVNode)(vb,{size:14},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Ey))]),_:1})])):(0,t.createCommentVNode)(``,!0)],42,JO))]),content:(0,t.withCtx)(()=>[(0,t.createVNode)(qO,{modelValue:i.value,"onUpdate:modelValue":l[0]||=e=>i.value=e},null,8,[`modelValue`])]),_:3},8,[`show`])],2))}}),[[`__scopeId`,`data-v-6ed5ccc4`]]),QO={class:`field-color`},$O=W((0,t.defineComponent)({__name:`Color`,props:(0,t.mergeModels)({alpha:{type:Boolean},labelId:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`);return(r,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,QO,[(0,t.createVNode)(ZO,{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,alpha:e.alpha,"aria-labelledby":e.labelId,bordered:``},null,8,[`modelValue`,`alpha`,`aria-labelledby`])]))}}),[[`__scopeId`,`data-v-b6f7be33`]]),ek=W((0,t.defineComponent)({__name:`BxNumberInput`,props:(0,t.mergeModels)({min:{},max:{},step:{default:1},size:{default:`medium`},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},placeholder:{},state:{default:`default`},ring:{type:Boolean,default:!1},round:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1},ariaLabel:{},ariaLabelledby:{},showControls:{type:Boolean,default:!0}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,r=(0,t.useModel)(e,`modelValue`),i=(0,t.ref)(r.value?.toString()??``),a=(0,t.computed)(()=>parseFloat(i.value)||0);(0,t.watch)(r,e=>{e!==void 0&&e!==parseFloat(i.value)&&(i.value=e.toString())});function o(e){let t=e;return n.min!==void 0&&(t=Math.max(n.min,t)),n.max!==void 0&&(t=Math.min(n.max,t)),t}function s(e){let t=String(e);i.value=t;let n=parseFloat(t);!isNaN(n)&&t!==``&&t!==`-`&&(r.value=n)}function c(){let e=parseFloat(i.value);if(isNaN(e)||i.value===``)i.value=r.value?.toString()??``;else{let t=o(e);i.value=t.toString(),r.value=t}}function l(e){e.key===`ArrowUp`?(e.preventDefault(),u()):e.key===`ArrowDown`&&(e.preventDefault(),d())}function u(){let e=o(a.value+n.step);i.value=e.toString(),r.value=e}function d(){let e=o(a.value-n.step);i.value=e.toString(),r.value=e}return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`bx-number-input`,onKeydown:l},[(0,t.createVNode)(nC,{type:`text`,"model-value":i.value,size:e.size,disabled:e.disabled,readonly:e.readonly,placeholder:e.placeholder,state:e.state,ring:e.ring,round:e.round,bordered:e.bordered,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"onUpdate:modelValue":s,onBlur:c},(0,t.createSlots)({suffix:(0,t.withCtx)(()=>[e.showControls?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`bx-number-input__controls`,`size-${e.size}`])},[(0,t.createVNode)(Jv,{size:`small`,"aria-label":`Decrease`,disabled:e.disabled||e.readonly||e.min!==void 0&&a.value<=e.min,onClick:d},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Pte))]),_:1})]),_:1},8,[`disabled`]),(0,t.createVNode)(Jv,{size:`small`,"aria-label":`Increase`,disabled:e.disabled||e.readonly||e.max!==void 0&&a.value>=e.max,onClick:u},{icon:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(Xv))]),_:1})]),_:1},8,[`disabled`])],2)):(0,t.renderSlot)(n.$slots,`suffix`,{key:1},void 0,!0)]),_:2},[n.$slots.prefix?{name:`prefix`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`prefix`,{},void 0,!0)]),key:`0`}:void 0]),1032,[`model-value`,`size`,`disabled`,`readonly`,`placeholder`,`state`,`ring`,`round`,`bordered`,`aria-label`,`aria-labelledby`])],32))}}),[[`__scopeId`,`data-v-086f0794`]]),tk={class:`field-number`},nk=W((0,t.defineComponent)({__name:`Number`,props:(0,t.mergeModels)({min:{},max:{},step:{},type:{},labelId:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`),r=(0,t.computed)({get(){return Number(n.value)},set(e){n.value=Number(e)}});return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,tk,[e.type===`slider`?((0,t.openBlock)(),(0,t.createBlock)(aa,{key:0,type:`range`,modelValue:r.value,"onUpdate:modelValue":i[0]||=e=>r.value=e,min:e.min,max:e.max,step:e.step,"aria-labelledby":e.labelId},null,8,[`modelValue`,`min`,`max`,`step`,`aria-labelledby`])):((0,t.openBlock)(),(0,t.createBlock)(ek,{key:1,modelValue:r.value,"onUpdate:modelValue":i[1]||=e=>r.value=e,min:e.min,max:e.max,step:e.step,"aria-labelledby":e.labelId,bordered:``},null,8,[`modelValue`,`min`,`max`,`step`,`aria-labelledby`]))]))}}),[[`__scopeId`,`data-v-a0f3cc69`]]),rk=[`aria-label`,`aria-labelledby`],ik=W((0,t.defineComponent)({__name:`BxButtonGroup`,props:(0,t.mergeModels)({options:{},fillWidth:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},ariaLabel:{},ariaLabelledby:{}},{modelValue:{required:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`),r=e;function i(e){!e.disabled&&!r.disabled&&(n.value=e.value)}let a=(0,t.computed)(()=>{let e=r.options.findIndex(e=>e.value===n.value);return e>=0?e:r.options.findIndex(e=>!(e.disabled||r.disabled))}),o=[];function s(e,t){if(!e){o[t]=void 0;return}let n=e instanceof HTMLElement?e:e.$el;o[t]=n instanceof HTMLElement?n:void 0}function c(e){let t=r.options[e];return!!t&&!(t.disabled||r.disabled)}function l(e){let t=r.options[e];t&&(n.value=t.value,o[e]?.focus())}function u(e){let t=r.options.length;if(t===0)return;let n=a.value<0?0:a.value,i=(e,n)=>{let r=e;for(let e=0;e<t;e++)if(r=(r+n+t)%t,c(r))return r;return e},o;switch(e.key){case`ArrowRight`:case`ArrowDown`:o=i(n,1);break;case`ArrowLeft`:case`ArrowUp`:o=i(n,-1);break;case`Home`:o=c(0)?0:i(0,1);break;case`End`:o=c(t-1)?t-1:i(t-1,-1);break;default:return}e.preventDefault(),l(o)}return(r,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`bx-button-group`,{"fill-width":e.fillWidth}]),role:`radiogroup`,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,onKeydown:u},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,(r,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:o},[r.tooltip?((0,t.openBlock)(),(0,t.createBlock)(VS,{key:0,trigger:`hover`,"allowed-placements":r.allowedTooltipPlacements},{trigger:(0,t.withCtx)(()=>[r.render?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.render({option:r})),{key:0})):((0,t.openBlock)(),(0,t.createBlock)(Jv,{key:1,ref_for:!0,ref:e=>s(e,o),role:`radio`,"aria-checked":r.value===n.value,tabindex:o===a.value?0:-1,disabled:r.disabled||e.disabled,secondary:``,active:r.value===n.value,centered:e.fillWidth,onClick:e=>i(r)},(0,t.createSlots)({_:2},[r.icon?{name:`icon`,fn:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.icon)))]),_:2},1024)]),key:`0`}:void 0,r.label?{name:`default`,fn:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(r.label),1)]),key:`1`}:void 0]),1032,[`aria-checked`,`tabindex`,`disabled`,`active`,`centered`,`onClick`]))]),content:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,null,(0,t.toDisplayString)(r.tooltip),1)]),_:2},1032,[`allowed-placements`])):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[r.render?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.render({option:r})),{key:0})):((0,t.openBlock)(),(0,t.createBlock)(Jv,{key:1,ref_for:!0,ref:e=>s(e,o),role:`radio`,"aria-checked":r.value===n.value,tabindex:o===a.value?0:-1,disabled:r.disabled||e.disabled,secondary:``,active:r.value===n.value,centered:e.fillWidth,onClick:e=>i(r)},(0,t.createSlots)({_:2},[r.icon?{name:`icon`,fn:(0,t.withCtx)(()=>[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.icon)))]),_:2},1024)]),key:`0`}:void 0,r.label?{name:`default`,fn:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(r.label),1)]),key:`1`}:void 0]),1032,[`aria-checked`,`tabindex`,`disabled`,`active`,`centered`,`onClick`]))],64))],64))),128))],42,rk))}}),[[`__scopeId`,`data-v-387a0dce`]]),ak={class:`select-text-field`},ok=W((0,t.defineComponent)({__name:`SelectText`,props:(0,t.mergeModels)({options:{},layout:{},mobile:{type:Boolean,default:!1},labelId:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`),r=e,i=(0,t.computed)(()=>r.layout===`button`&&r.mobile?`carroussel`:r.layout);return(r,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,ak,[i.value===`button`?((0,t.openBlock)(),(0,t.createBlock)(ik,{key:0,modelValue:n.value,"onUpdate:modelValue":a[0]||=e=>n.value=e,"aria-labelledby":e.labelId,options:e.options.map(e=>({label:e.label||(typeof e.value==`string`?e.value:String(e.value)),value:e.value})),"fill-width":!0,mobile:e.mobile},null,8,[`modelValue`,`aria-labelledby`,`options`,`mobile`])):((0,t.openBlock)(),(0,t.createBlock)(FS,{key:1,modelValue:n.value,"onUpdate:modelValue":a[1]||=e=>n.value=e,bordered:``,"aria-labelledby":e.labelId,options:e.options.map(e=>({label:e.label||(typeof e.value==`string`?e.value:String(e.value)),value:e.value})),"placeholder-active-label":`Select option`},null,8,[`modelValue`,`aria-labelledby`,`options`]))]))}}),[[`__scopeId`,`data-v-bc071fd7`]]),sk=[`data-si`],ck=[`onClick`],lk={class:`preview-wrapper`},uk={key:0,class:`label-wrapper`},dk=W((0,t.defineComponent)({__name:`SelectColor`,props:(0,t.mergeModels)({options:{},layout:{},showLabels:{type:Boolean},size:{},mobile:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`),r=e,i=(0,t.computed)(()=>r.layout===`button`&&r.mobile?`carroussel`:r.layout);function a(e){return e.map(e=>`${e.color} ${e.position*100}%`).join(`, `)}function o(e){return e.type===`linear`?`linear-gradient(${e.angle}deg, ${a(e.stops)})`:e.type===`radial`?`radial-gradient(circle at ${e.x1*100}% ${e.y1*100}%, ${a(e.stops)})`:`conic-gradient(from ${e.angle}deg at ${e.x*100}% ${e.y*100}%, ${a(e.stops)})`}function s(e){return typeof e==`string`?e:o(e)}function c(e){return typeof e==`string`?e:`${e.type} gradient`}function l(e){return typeof n.value==`string`||typeof e.value==`string`?n.value===e.value:Ux(n.value,e.value)}let u=(0,t.ref)(null),d=(0,t.computed)(()=>{let e=r.options.map((e,t)=>t).filter(e=>l(r.options[e]));return e.includes(u.value)?u.value:e[0]});function f(e,t){n.value=e.value,u.value=t}let p=(0,t.computed)(()=>r.options.map(e=>({label:e.label||c(e.value),value:e.value,icon:()=>(0,t.h)(`div`,{style:{width:`16px`,height:`16px`,borderRadius:`50%`,background:e.image??s(e.value),flexShrink:`0`}})})));return(a,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`select-color-field`,{mobile:e.mobile}]),"data-si":d.value},[i.value===`dropdown`?((0,t.openBlock)(),(0,t.createBlock)(FS,{key:0,bordered:``,modelValue:n.value,"onUpdate:modelValue":o[0]||=e=>n.value=e,options:p.value,"placeholder-active-label":`Select color`},null,8,[`modelValue`,`options`])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:(0,t.normalizeClass)([`color-options-wrapper`,{carroussel:i.value===`carroussel`,[`size-${r.size}`]:!0}])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`color-option`,{selected:r===d.value}]),onClick:e=>f(n,r)},[(0,t.createElementVNode)(`div`,lk,[(0,t.createElementVNode)(`div`,{class:`color-circle`,style:(0,t.normalizeStyle)({background:n.image??s(n.value)})},null,4)]),n.label&&e.showLabels?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,uk,(0,t.toDisplayString)(n.label),1)):(0,t.createCommentVNode)(``,!0)],10,ck))),256))],2))],10,sk))}}),[[`__scopeId`,`data-v-56305235`]]),fk=[`onClick`],pk={class:`preview-wrapper`},mk=[`src`],hk={key:0,class:`label-wrapper`},gk=W((0,t.defineComponent)({__name:`SelectImage`,props:(0,t.mergeModels)({options:{},layout:{},imageDisplay:{},size:{},mobile:{type:Boolean,default:!1}},{modelValue:{required:!0,default:()=>({src:`https://picsum.photos/536/354`,innerRotate:0,crop:null,cropMode:`cover`,innerAlign:`center`,mirrorX:!1,mirrorY:!1})},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=Uv(),r=(0,t.useModel)(e,`modelValue`),i=e,a=(0,t.computed)(()=>i.layout===`button`&&i.mobile?`carroussel`:i.layout),o=(0,t.computed)({get(){return r.value},set(e){let t=typeof e==`string`?e:e.src;r.value=typeof o.value==`object`?{...o.value,src:t}:e}}),s=(0,t.computed)(()=>i.options.map(e=>({label:e.label||(typeof e.value==`string`?e.value:String(e.value)),value:e.value,icon:()=>(0,t.h)(`img`,{src:e.image??(typeof e.value==`string`?e.value:e.value.src),style:{"object-fit":i.imageDisplay,width:`19px`,height:`19px`}})})));function c(e){return(typeof e.value==`string`?e.value:e.value.src)===(typeof o.value==`string`?o.value:o.value.src)}return(r,l)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`select-image-field`,{mobile:e.mobile}])},[a.value===`dropdown`?((0,t.openBlock)(),(0,t.createBlock)(FS,{key:0,bordered:``,modelValue:o.value,"onUpdate:modelValue":l[0]||=e=>o.value=e,options:s.value,"placeholder-active-label":`Select image`},null,8,[`modelValue`,`options`])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:(0,t.normalizeClass)([`image-options-wrapper`,{carroussel:a.value===`carroussel`,[`size-${i.size}`]:!0}])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,r=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`image-option`,{selected:c(r)}]),onClick:e=>o.value=r.value},[(0,t.createElementVNode)(`div`,pk,[(0,t.createElementVNode)(`img`,{src:(0,t.unref)(n)(r.image??(typeof r.value==`string`?r.value:r.value.src)),style:(0,t.normalizeStyle)({"object-fit":e.imageDisplay}),class:`preview-image`},null,12,mk)]),r.label?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,hk,(0,t.toDisplayString)(r.label),1)):(0,t.createCommentVNode)(``,!0)],10,fk))),256))],2))],2))}}),[[`__scopeId`,`data-v-c64ba991`]]),_k={key:0,class:`info-symbol-wrapper`},vk={class:`instruction-text`},yk={class:`detailed-description-text`},bk=W((0,t.defineComponent)({__name:`Instruction`,props:{instruction:{},description:{},detailedDescription:{}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`instruction-field`,{}])},[e.description===void 0?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,_k,[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(ob))]),_:1})])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`main`,null,[(0,t.createElementVNode)(`div`,vk,(0,t.toDisplayString)(e.instruction),1),(0,t.createElementVNode)(`div`,yk,(0,t.toDisplayString)(e.detailedDescription),1)])]))}}),[[`__scopeId`,`data-v-9fa25486`]]),xk={class:`highlighted-field`},Sk=[`aria-label`],Ck=W((0,t.defineComponent)({__name:`HighlightedText`,props:(0,t.mergeModels)({options:{},userAgentRichText:{type:Boolean},noStyleLabel:{},mixedStyleLabel:{},showWordCount:{type:Boolean},clearable:{type:Boolean},maxLength:{},maxLineLength:{},maxLines:{},placeholder:{},maxHeight:{},labelId:{},toolbarLabel:{}},{modelValue:{type:[String,Number,Boolean,Array],required:!1,default:`Hello world`},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`),r=(0,t.ref)();function i(e){return typeof e==`object`&&e instanceof Array?Gx(e):typeof e==`string`||typeof e==`number`||typeof e==`boolean`?[{text:String(e),format:{}}]:[{text:`foobar`,format:{}}]}function a(e,t){return Ux(e,t)}let o=(0,t.ref)(i(n.value));(0,t.watch)(o,(e,t)=>{n.value=e}),(0,t.watch)(n,()=>{a(i(n.value),o.value)||(o.value=i(n.value))});let s=(0,t.ref)(),c=(0,t.ref)({start:0,length:0});(0,t.watch)(s,()=>{s.value&&(c.value=s.value)});let l=(0,t.ref)(!1);function u(e){let t=!1,n;for(let r of e)if(!n)n=r.format;else if(!Ux(n,r.format)){t=!0;break}return t?null:n??null}let d=(0,t.computed)(()=>{let e=r.value?.richTextInstance;return e?u(e.resolveFeatures(c.value.start,c.value.length).flat()):null});(0,t.watchEffect)(()=>{console.log(`commonStyleFormat`,d.value)});function f(e){return d.value?e.style===null?u(o.value)!==null:Ux(d.value,e.style):!1}function p(e){let t=r.value?.richTextInstance;t&&s.value&&s.value.length!==0&&(f(e)?t.applyFormat(c.value.start,c.value.length,{}):t.applyFormat(c.value.start,c.value.length,e.style))}return(0,t.watchEffect)(()=>{console.log(`selection`,s.value)}),(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,xk,[(0,t.createElementVNode)(`div`,{class:`actions`,role:`toolbar`,"aria-label":e.toolbarLabel??`Text formatting`},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,e=>((0,t.openBlock)(),(0,t.createBlock)(Jv,{secondary:f(e),"aria-pressed":f(e),onClick:t=>p(e),disabled:!s.value||s.value.length===0},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)]),_:2},1032,[`secondary`,`aria-pressed`,`onClick`,`disabled`]))),256))],8,Sk),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`text-input`,{focused:l.value}]),style:(0,t.normalizeStyle)({"--max-height":e.maxHeight??void 0})},[(0,t.createVNode)(jS,{ref_key:`bxRichTextInstance`,ref:r,modelValue:o.value,"onUpdate:modelValue":i[0]||=e=>o.value=e,selection:s.value,"onUpdate:selection":i[1]||=e=>s.value=e,focus:l.value,"onUpdate:focus":i[2]||=e=>l.value=e,"aria-labelledby":e.labelId},null,8,[`modelValue`,`selection`,`focus`,`aria-labelledby`])],6)]))}}),[[`__scopeId`,`data-v-521b1391`]]),wk=u({Checkbox:()=>Dw,Collection:()=>cO,Color:()=>$O,Group:()=>xw,HighlightedText:()=>Ck,Image:()=>bw,ImageAdjust:()=>Cw,ImageEdit:()=>vw,Instruction:()=>bk,Logo:()=>vw,Map:()=>mO,Number:()=>nk,Select:()=>ww,SelectColor:()=>dk,SelectImage:()=>gk,SelectText:()=>ok,Text:()=>Sw}),Tk={class:`inner`},Ek={key:1},Dk=[`id`],Ok={type:`button`,class:`help-trigger`,"aria-label":`More information`},kk=[`id`],Ak=W((0,t.defineComponent)({__name:`FieldsList`,props:{layout:{default:`list`},fields:{},isRoot:{type:Boolean},isSegmented:{type:Boolean,default:!1}},setup(e){let n=e,r=(0,t.inject)(`bridge`),i=di(),a=(0,t.inject)(`data`),o=(0,t.inject)(`computedPropEvaluator`);o||console.error(`computedPropEvaluator is not provided`);let s=e=>{if(`pos`in e&&`scale`in e){let t=e.image,n=e.pos,r=e.scale;return{image:a.value[t],"onUpdate:image":e=>{a.value[t]=e},adjust:{scale:a.value[r],innerPos:a.value[n]},"onUpdate:adjust":e=>{a.value[r]=e.scale,a.value[n]=e.innerPos}}}return{...Object.fromEntries(Object.entries(e).map(([e,t])=>[e,a.value[t]])),...Object.fromEntries(Object.entries(e).map(([t])=>[`onUpdate:${t}`,n=>{a.value[e[t]]=n}]))}};function c(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>typeof t==`function`?[e,o(t)]:[e,t]))}let l=new WeakMap;function u(e){let t=l.get(e);return t||(t=h(`bx-field-label`),l.set(e,t)),t}let d={Text:`Text field`,HighlightedText:`Text field`,Number:`Number field`,Color:`Color`,Select:`Selection`,SelectText:`Selection`,SelectColor:`Color selection`,SelectImage:`Image selection`,Checkbox:`Checkbox`,Image:`Image`,ImageEdit:`Image`,ImageAdjust:`Image`,Map:`Location`,Collection:`Collection`};function f(e){let t=e.props?.placeholder;return typeof t==`string`&&t.trim()?t.trim():`${d[e.type]??`Field`} ${p(e)}`}let p=e=>{let t=n.fields.indexOf(e);return t-n.fields.slice(0,t).filter(e=>e.type===`Instruction`).length+1};return(n,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`bluepic-fields`,{[`layout-`+e.layout]:!0}])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.fields,(n,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_for:!0,ref:e=>(0,t.unref)(i)?.register(n,e),class:(0,t.normalizeClass)([`field`,{"is-root":e.isRoot,[`field-type-`+n.type.toLowerCase()]:!0,"field-has-card":n.type===`Group`&&n.props.card}]),style:(0,t.normalizeStyle)({"--min-width":n.layout?.minWidth,"--max-width":n.layout?.maxWidth})},[n.type!==`Group`&&n.description?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`description`,{"no-detailed-description":!n.detailedDescription,"text-overlaying-description":!e.isRoot&&n.type===`Text`}])},[(0,t.createElementVNode)(`div`,Tk,[e.isRoot?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`root-index`,{}])},[n.type===`Instruction`?((0,t.openBlock)(),(0,t.createBlock)(vb,{key:0},{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(cb))]),_:1})):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Ek,(0,t.toDisplayString)(p(n)),1))])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,{id:u(n)},(0,t.toDisplayString)(n.description),9,Dk),n.detailedDescription&&n.type!==`Instruction`?((0,t.openBlock)(),(0,t.createBlock)(VS,{key:1,trigger:`hover`,"custom-threshold-delay":0},{trigger:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`button`,Ok,[(0,t.createVNode)(vb,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(eb))]),_:1})])]),content:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.detailedDescription),1)]),_:2},1024)):(0,t.createCommentVNode)(``,!0)])],2)):n.type!==`Group`&&n.type!==`Instruction`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:1,id:u(n),class:`bx-visually-hidden-label`},(0,t.toDisplayString)(f(n)),9,kk)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(wk[n.type]),(0,t.mergeProps)({bridge:(0,t.unref)(r),index:p(n),"is-root":e.isRoot},{ref_for:!0},{...c(n.props),...s(n.model),field:n,description:n.description,detailedDescription:n.detailedDescription,labelId:n.type!==`Group`&&n.type!==`Instruction`?u(n):void 0,...(()=>{if(n.type===`Text`)return{...n.layout}})()}),null,16,[`bridge`,`index`,`is-root`]))],6))),256))],2))}}),[[`__scopeId`,`data-v-a31a95c2`]]),jk={class:`bx-fields`},Mk=(0,t.defineComponent)({__name:`Fields`,props:{fields:{},isSegmented:{type:Boolean}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,jk,[(0,t.createVNode)(Ak,{fields:e.fields,"is-root":``,"is-segmented":e.isSegmented},null,8,[`fields`,`is-segmented`])]))}}),Nk=[`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`,`[tabindex]:not([tabindex="-1"])`].join(`,`);function Pk(e){return e.getAttribute(`aria-hidden`)!==`true`&&e.getClientRects().length>0}function Fk(e,n){let r=new Map,i=null,a=[];function o(t){let n=e();return n?n.querySelector(`[data-overlay-id="${CSS.escape(t)}"]`):null}function s(e){return Array.from(e.querySelectorAll(Nk)).filter(Pk)}function c(){let e=n();for(let t=e.length-1;t>=0;t--)if(e[t].trapFocus&&o(e[t].id))return e[t].id;return null}function l(e){if(e.key!==`Tab`||!i)return;let t=o(i);if(!t)return;let n=s(t);if(n.length===0){e.preventDefault(),t.focus?.();return}let r=n[0],a=n[n.length-1],c=document.activeElement;!c||!t.contains(c)?(e.preventDefault(),(e.shiftKey?a:r).focus()):e.shiftKey&&c===r?(e.preventDefault(),a.focus()):!e.shiftKey&&c===a&&(e.preventDefault(),r.focus())}async function u(){await(0,t.nextTick)();let e=n().map(e=>e.id);for(let t of a)if(!e.includes(t)&&r.has(t)){let e=r.get(t)??null;r.delete(t),t===i&&(i=null,e&&e.isConnected&&e.focus?.())}a=e;let l=c();if(l!==i&&(i=l,l&&!r.has(l))){r.set(l,document.activeElement);let e=o(l);e&&(s(e)[0]??e).focus?.()}}document.addEventListener(`keydown`,l,!0),(0,t.watch)(n,()=>void u(),{deep:!0,immediate:!0}),(0,t.onBeforeUnmount)(()=>{document.removeEventListener(`keydown`,l,!0)})}var Ik=[`data-overlay-id`],Lk=[`data-overlay-id`],Rk=W((0,t.defineComponent)({__name:`PopupProvider`,setup(e,{expose:n}){let r=(0,t.ref)([]),i=(0,t.ref)();Fk(()=>i.value,()=>r.value.map(e=>({id:e.id,trapFocus:e.trapFocus})));function a(e,t,n){r.value.push({kind:`popup`,id:e,render:t,type:n.type,close:n.close,handleClickOutside:n.handleClickOutside,disableBackgroundEffect:n.disableBackgroundEffect,wrapperCustomClasses:n.wrapperCustomClasses,drawerPlacement:n.drawerPlacement,transitionDuration:n.transitionDuration,role:n.role,trapFocus:n.trapFocus??!0})}function o(e,t,n){r.value.push({kind:`popover`,id:e,render:t,darkenBackground:n.darkenBackground,handleClickOutside:n.handleClickOutside,transitionDuration:n.transitionDuration,role:n.role,trapFocus:n.trapFocus??!1,close:n.close})}function s(e){let t=r.value.findIndex(t=>t.id===e);t!==-1&&r.value.splice(t,1)}function c(e){return r.value.some(t=>t.id===e)}let l=(0,t.computed)(()=>r.value.some(e=>e.kind===`popover`&&e.darkenBackground)),u=(0,t.computed)(()=>r.value.filter(e=>e.kind===`popup`&&!e.disableBackgroundEffect));function d(e){let t=0;for(let n=e+1;n<r.value.length;n++){let e=r.value[n];e.kind===`popup`&&!e.disableBackgroundEffect&&t++}return t}(0,t.watch)(u,()=>{let e=document.querySelector($9);e&&(u.value.length>0?e.classList.add(`bluepic-popup-app-wrapper-in-background`):e.classList.remove(`bluepic-popup-app-wrapper-in-background`))});function f(e){e.kind===`popup`?e.close():e.handleClickOutside()}let p=e=>{r.value.length!==0&&e.key===`Escape`&&r.value[r.value.length-1].close()};return window.addEventListener(`keydown`,p),(0,t.onUnmounted)(()=>{window.removeEventListener(`keydown`,p)}),n({isVisible:c,pushPopup:a,pushPopover:o,pull:s,entries:r}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`providerRoot`,ref:i,class:(0,t.normalizeClass)([`bluepic-overlay-provider`,{visible:r.value.length>0,"darken-background":l.value}])},[(0,t.createVNode)(t.TransitionGroup,{name:`overlay-entry`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.value,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:e.id},[e.kind===`popup`?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`popup-wrapper overlay-item`,{[`type-`+e.type]:!0,[`drawer-`+(e.drawerPlacement??`right`)]:e.type===`drawer`,...Object.fromEntries((e.wrapperCustomClasses??[]).map(e=>[e,!0]))}]),"data-overlay-id":e.id,style:(0,t.normalizeStyle)({"--popup-transition-duration":e.transitionDuration+`ms`})},[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.render),{onClickOutside:t=>f(e),onClose:e.close,style:(0,t.normalizeStyle)({"--level":d(n)})},null,40,[`onClickOutside`,`onClose`,`style`]))],14,Ik)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:(0,t.normalizeClass)([`popover-entry-wrapper overlay-item`,{"darken-entry":e.darkenBackground}]),"data-overlay-id":e.id,style:(0,t.normalizeStyle)({"--popup-transition-duration":e.transitionDuration+`ms`})},[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.render),{onClickOutside:t=>f(e)},null,40,[`onClickOutside`]))],14,Lk))],64))),128))]),_:1})],2))}}),[[`__scopeId`,`data-v-9f32537d`]]),zk=W((0,t.defineComponent)({__name:`MessageProvider`,setup(e,{expose:n}){let r=(0,t.ref)([]),i=[`top-left`,`top`,`top-right`,`left`,`right`,`bottom-left`,`bottom`,`bottom-right`];function a(e){return r.value.filter(t=>t.placement===e)}function o(e){return e.startsWith(`top`)?`top`:e.startsWith(`bottom`)?`bottom`:e===`left`?`left`:`right`}function s(e,t,n){r.value.push({id:e,render:t,placement:n.placement})}function c(e){let t=r.value.findIndex(t=>t.id===e);t!==-1&&r.value.splice(t,1)}function l(e){return r.value.some(t=>t.id===e)}return n({push:s,pull:c,isVisible:l}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`bluepic-message-provider`,{visible:r.value.length>0}])},[((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i,e=>(0,t.createElementVNode)(`div`,{key:e,class:(0,t.normalizeClass)([`message-lane`,[`lane-${e}`]])},[(0,t.createVNode)(t.TransitionGroup,{name:`message-${o(e)}`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a(e),e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.id,class:`message-item`},[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.render)))]))),128))]),_:2},1032,[`name`])],2)),64))],2))}}),[[`__scopeId`,`data-v-e01d8c5b`]]),Bk=class{overlayProviderRef;messageProviderRef;constructor(){let e=document.createElement(`div`);e.classList.add(`bluepic-popup-provider__wrapper`);let n=document.createElement(`style`);n.setAttribute(`type`,`text/css`),n.setAttribute(`data-bluepic-popup-app-wrapper`,`true`),n.innerHTML=`
167
167
  .bluepic-popup-body {
168
168
 
169
169
  }