@bagelink/vue 1.15.468 → 1.15.474

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -457,7 +457,7 @@ ${l.preList[n]}
457
457
 
458
458
  `}return n});ee.subParser("makeMarkdown.paragraph",(e,l)=>{let a="";if(e.hasChildNodes()){let n=e.childNodes,d=n.length;for(let c=0;c<d;++c)a+=ee.subParser("makeMarkdown.node")(n[c],l)}return a=a.trim(),a});ee.subParser("makeMarkdown.pre",(e,l)=>{let a=e.getAttribute("prenum");return`<pre>${l.preList[a]}</pre>`});ee.subParser("makeMarkdown.strikethrough",(e,l)=>{let a="";if(e.hasChildNodes()){a+="~~";let n=e.childNodes,d=n.length;for(let c=0;c<d;++c)a+=ee.subParser("makeMarkdown.node")(n[c],l);a+="~~"}return a});ee.subParser("makeMarkdown.strong",(e,l)=>{let a="";if(e.hasChildNodes()){a+="**";let n=e.childNodes,d=n.length;for(let c=0;c<d;++c)a+=ee.subParser("makeMarkdown.node")(n[c],l);a+="**"}return a});ee.subParser("makeMarkdown.table",(e,l)=>{let a="",n=[[],[]],d=e.querySelectorAll("thead>tr>th"),c=e.querySelectorAll("tbody>tr");for(let s=0;s<d.length;++s){let o=ee.subParser("makeMarkdown.tableCell")(d[s],l),m="---";if(d[s].hasAttribute("style"))switch(d[s].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":m=":---";break;case"text-align:right;":m="---:";break;case"text-align:center;":m=":---:";break}n[0][s]=o.trim(),n[1][s]=m}for(let s=0;s<c.length;++s){let o=n.push([])-1,m=c[s].getElementsByTagName("td");for(let Z=0;Z<d.length;++Z){let u=" ";typeof m[Z]<"u"&&(u=ee.subParser("makeMarkdown.tableCell")(m[Z],l)),n[o].push(u)}}let i=3;for(let s=0;s<n.length;++s)for(let o=0;o<n[s].length;++o){let m=n[s][o].length;m>i&&(i=m)}for(let s=0;s<n.length;++s){for(let o=0;o<n[s].length;++o)s===1?n[s][o].slice(-1)===":"?n[s][o]=`${ee.helper.padEnd(n[s][o].slice(-1),i-1,"-")}:`:n[s][o]=ee.helper.padEnd(n[s][o],i,"-"):n[s][o]=ee.helper.padEnd(n[s][o],i);a+=`| ${n[s].join(" | ")} |
459
459
  `}return a.trim()});ee.subParser("makeMarkdown.tableCell",(e,l)=>{let a="";if(!e.hasChildNodes())return"";let n=e.childNodes,d=n.length;for(let c=0;c<d;++c)a+=ee.subParser("makeMarkdown.node")(n[c],l,!0);return a.trim()});ee.subParser("makeMarkdown.txt",e=>{let l=e.nodeValue;return l=l.replace(/ +/g," "),l=l.replace(/¨NBSP;/g," "),l=ee.helper.unescapeHTMLEntities(l),l=l.replace(/([*_~|`])/g,"\\$1"),l=l.replace(/^(\s*)>/g,"\\$1>"),l=l.replace(/^#/gm,"\\#"),l=l.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),l=l.replace(/^( {0,3}\d+)\./gm,"$1\\."),l=l.replace(/^( {0,3})([+-])/gm,"$1\\$2"),l=l.replace(/\](\s*)\(/g,"\\]$1\\("),l=l.replace(/^ {0,3}\[([\S \t]*?)\]:/gm,"\\[$1]:"),l});function Xd(e,l){if(!l)return{matches:!0,score:0};const a=e.toLowerCase(),n=l.toLowerCase();if(a.includes(n))return{matches:!0,score:1e3};const d=n.split(/\s+/).filter(u=>u.length>0),c=a.split(/\s+/);let i=0;for(const u of d)c.some(r=>r.includes(u))&&i++;if(i===d.length)return{matches:!0,score:100+i*10};let s=0,o=0,m=0,Z=0;for(let u=0;u<a.length&&s<n.length;u++)a[u]===n[s]?(s++,o++,Z++,m=Math.max(m,o)):o=0;return s===n.length?{matches:!0,score:m*5+Z}:{matches:!1,score:0}}function IO(...e){return e.filter(Boolean).join(", ")}function xO(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const l=Math.random()*16|0;return(e==="x"?l:l&3|8).toString(16)})}function zO(e){const l=e;return l.label??l.name??l.title??String(l.id??"")}function wO(e){const l=e;return l.value??l.key??l.id??""}function gO(e){if(Array.isArray(e))return e.map(a=>({...a,label:zO(a),value:wO(a)}));const l=e;return a=>a.map(n=>({...n,label:typeof l.label=="function"?l.label(n):String(n[l.label]??""),value:n[l.value]}))}function RO(e){return Array.isArray(e)?e:"data"in e?e.data:"items"in e?e.items:[]}function SO(e,l,a){const n=a?.timeout??1e4,d=e.length>0;let c=null;async function i(o){const m=d?e(o??""):e();return l(RO(await Promise.race([m,new Promise((Z,u)=>setTimeout(()=>{u(new Error("Request timeout"))},n))])))}const s=async o=>{try{return d?await i(o):(c||(c=await i()),o?c.filter(m=>{const{label:Z}=m;return typeof Z!="string"?!0:Xd(Z,o).matches}).sort((m,Z)=>{const u=m.label??"";return Xd(Z.label??"",o).score-Xd(u,o).score}):c)}catch{return[]}};return s.clearCache=()=>{c=null},s}function gm(e,l){return l==="titleCase"?e.split("_").map(a=>a[0].toUpperCase()+a.slice(1).toLocaleLowerCase()).join(" "):l==="pascal"?e.split("_").map(a=>a[0].toUpperCase()+a.slice(1).toLocaleLowerCase()).join(""):l==="camel"?e.split("_").map((a,n)=>n===0?a:a[0].toUpperCase()+a.slice(1)).join(""):l==="snake"?[...e].map(a=>a===a.toUpperCase()?`_${a.toLowerCase()}`:a).join(""):e}var Go=new Map;function vO(e,l=500){clearTimeout(Go.get(e));const a=setTimeout(()=>{e(),Go.delete(e)},l);Go.set(e,a)}function FO(e){return e.toLowerCase().replace(/[^a-z0-9-\s]/g,"").split(/[\s-]+/).join("-")}function _n(e){return e===void 0?e:e.split("_").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" ")||e}var pr=new Map;function Dd(e){if(!e.includes("<")&&!e.includes("&"))return e.trim();const l=pr.get(e);if(l!==void 0)return l;if(typeof DOMParser>"u")return e.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();const a=new DOMParser().parseFromString(e,"text/html");a.body.querySelectorAll("p, div, li, br, h1, h2, h3, h4, h5, h6").forEach(d=>d.after(" "));const n=(a.body.textContent||"").replace(/\u00a0/g," ").replace(/\s+/g," ").trim();return pr.set(e,n),n}function Ip(e){return/<\/?[a-z][\s\S]*>/i.test(e)}async function xp(e,l){await navigator.clipboard.writeText(e),l&&l("Copied to clipboard")}function zp(...e){return e=e.flatMap(l=>l.split(/\s/)),e.map(l=>l.charAt(0)).join("")}function wp(e,l={}){if(!e||typeof document>"u")return e;const a=document.createElement("template");a.innerHTML=e;const n=d=>{for(const c of Array.from(d.children)){const i=c.tagName.toLowerCase();if(["script","iframe","object","embed","link","meta","base","form"].includes(i)){c.remove();continue}for(const s of Array.from(c.attributes)){const o=s.name.toLowerCase(),m=s.value.trim().toLowerCase();(o.startsWith("on")||(o==="href"||o==="src"||o==="xlink:href")&&(m.startsWith("javascript:")||m.startsWith("data:"))||l.resetFormatting&&["style","class","width","height","align","bgcolor","color","face","size"].includes(o))&&c.removeAttribute(s.name)}n(c)}};return n(a.content),a.innerHTML}function kO(e,l){e.key==="Escape"&&l()}function gp(e,l,...a){return a.map(n=>typeof n=="function"?n(e,l):n).join(" ")}function Rm(e,l,a){if(!e)return{};const n=["class","onClick","$el"],d=Object.entries(e).filter(([i])=>!n.includes(i)).map(([i,s])=>[i,typeof s=="function"?s(l,a):s]),c=Object.fromEntries(d);for(const i of n.slice(1))e[i]&&(c[i]=e[i]);return c}function fO(e,l){return e["v-if"]===void 0?!0:typeof e["v-if"]=="boolean"?e["v-if"]:typeof e["v-if"]=="string"?!0:typeof e["v-if"]=="function"?e["v-if"]?.(l?.[e.id],l):!0}function jO(e,l){if(l)return e?e[l]:void 0}const Sm=e=>!Number.isNaN(Date.parse(e));function Rp(e,l){const a=Array.from(new Set((e??[]).flatMap(Object.keys))).map(n=>({id:n,label:n==="created_at"?"Created Date":n==="updated_at"?"Last Update":_n(n),transform:d=>["created_at","updated_at"].includes(n)?d&&ol(d,"DD.MM.YY HH:mm"):d}));return l?a.filter(n=>l.includes(n.id)||!n.id):a}function _2(e=100){return new Promise(l=>setTimeout(l,e))}var cd=new Map;async function uc(e,l){const a=l?.id||e;if(await _2(1),cd.has(a)){const d=cd.get(a);if(d)return d}if(l?.id&&document.getElementById(l.id)||document.querySelector(`script[src="${e}"]`))return Promise.resolve();const n=new Promise((d,c)=>{const i=document.createElement("script");i.src=e,l?.id&&(i.id=l.id),i.onload=()=>{d(),cd.delete(a)},i.onerror=s=>{c(new Error(String(s))),cd.delete(a)},document.head.append(i)});return cd.set(a,n),n}async function Ud(e,{timeout:l=1e4,interval:a=50}={}){const n=Date.now();for(;window[e]===void 0;){if(Date.now()-n>l)throw new Error(`awaitGlobal: window.${e} not available after ${l}ms`);await _2(a)}return window[e]}function vm(e){return new Promise((l,a)=>{if(document.querySelector(`link[href="${e}"]`)){l();return}const n=document.createElement("link");n.href=e,n.rel="stylesheet",n.onload=()=>{l()},n.onerror=a,document.head.append(n)})}function $2(e){return e.startsWith("https://")?e:(e=e.replace(/http:\/\//,""),`https://${e}`)}function rt(e,l="px"){return typeof e=="number"?`${e}${l}`:e}var JO=/^https?:\/\/|^\/\/|^blob:|^data:/,Sp="https://files.bagel.design";function CO(e){Sp=e.replace(/\/$/,"")}function dt(e){if(!(e==null||e==="")){if(typeof e!="string"){const l=e,a=l.imageURL??l.url??l.path_key??l.pathKey??l.src;return typeof a=="string"?dt(a):void 0}return JO.test(e)||e.startsWith("/")?e:e.startsWith("static/")||e.startsWith("images/")?`/${e}`:`${Sp}/${e}`}}function yd(e,l,a=void 0){if(!l)return e;const n=l.split(/[.[]/);let d=e;for(const c of n){if(!d||typeof d!="object"||!(c in d))return a;d=d[c]}return d??a}var DO=e=>e.replace(/http:\/\//,"//");function vp(e,l){try{return e()}catch(a){l&&l(a)}}function q2(e,l){if(typeof document>"u")return;const a=document.createElement("a");a.target="_blank",a.rel="noopener noreferrer";const n=l!==void 0&&l!=="";if(typeof e=="string"){a.href=DO(e);const d=e.split("/").pop();a.download=n?l:d!==void 0&&d!==""?d:"download"}else{const d=URL.createObjectURL(e);a.href=d,a.download=n?l:"download",setTimeout(()=>vp(()=>{URL.revokeObjectURL(d)}),0)}document.body.appendChild(a),a.click(),document.body.removeChild(a)}function UO(e,l){let a=null;const n=(async d=>{try{if(!a){const c=await e(d);a=(Array.isArray(c)?c:c.data||c.items||[]).map(i=>l?l(i):{label:i.name||i.title||`${i.id}`,value:i.id,...i})}return d&&a?a.map(c=>({item:c,match:Xd(c.label,d)})).filter(({match:c})=>c.matches).sort((c,i)=>i.match.score-c.match.score).map(({item:c})=>c):a||[]}catch{return[]}});return n.clearCache=()=>{a=null},n}var OO=e=>Object.keys(e),Wr=e=>e?.split(" ").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" ");function Gr(e,l){return l?e.map(a=>{const n={};return l.forEach(d=>{const{id:c,transform:i,label:s}=d;if(c){const o=yd(a,c),m=s||c;n[m]=i?.(o,a)||o||""}}),n}):e}function EO(e){const l=new Set;return e.forEach(a=>{Object.keys(a).forEach(n=>l.add(n))}),Array.from(l).map(a=>({id:a,label:a}))}function BO(){const e=(0,t.ref)(!1);async function l(){return e.value||(await uc("https://cdn.jsdelivr.net/npm/xlsx/dist/xlsx.full.min.js"),e.value=!0),window.XLSX}async function a(u,r="data",b){const h=(0,t.toValue)(b)||EO(u),p=await l(),N=Gr(u,h),W=h.length>0?h.map(L=>{const{id:X,label:T}=L;return{v:T||X,t:"s"}}):[],G=p.utils.json_to_sheet(N);W.length>0&&p.utils.sheet_add_aoa(G,[W.map(L=>L.v)],{origin:"A1"});const Y=p.utils.book_new();p.utils.book_append_sheet(Y,G,"Sheet1"),r=r.endsWith(".xlsx")?r:`${r}.xlsx`,p.writeFile(Y,r)}async function n(u,r="data",b){const h=b?b.map(G=>G.id).filter(Boolean):[...new Set(u.flatMap(OO))],p=b?b.map(G=>{const{label:Y,id:L}=G;return Y||Wr(L)}):h.map(Wr),N=Gr(u,b),W=[p.join(","),...N.map(G=>h.map(Y=>{const L=G[Y]!==void 0?G[Y]:"";return`"${String(L).replace(/"/g,'""')}"`}).join(","))].join(`
460
- `);r=r.endsWith(".csv")?r:`${r}.csv`,q2(new Blob([W],{type:"text/csv;charset=utf-8"}),r)}async function d(u){const r=await l(),b=await u.arrayBuffer();return r.read(b)}async function c(u){return(await d(u)).SheetNames}async function i(u,r,b=!0){const h=await l(),p=(await d(u)).Sheets[r],N=h.utils.sheet_to_json(p,{header:1});if(N.length===0)return{headers:[],data:[]};let W=[],G=0;b?(W=N[0].map(L=>String(L||"").trim()),G=1):W=N[0].map((L,X)=>String.fromCharCode(65+X));const Y=[];for(let L=G;L<N.length;L++){const X=N[L],T={};for(let V=0;V<W.length;V++)V<X.length?T[W[V]]=X[V]:T[W[V]]="";Y.push(T)}return{headers:W,data:Y}}async function s(u){const r=await l();return new Promise((b,h)=>{const p=new FileReader;p.onload=N=>{try{const W=new Uint8Array(N.target?.result),G=r.read(W,{type:"array"}),Y=G.SheetNames[0],L=G.Sheets[Y];b(r.utils.sheet_to_json(L))}catch(W){h(W)}},p.onerror=()=>{h(new Error("Failed to read file"))},p.readAsArrayBuffer(u)})}function o(u){return typeof u=="number"&&Number.isInteger(u)&&u>=2e4&&u<=5e4}function m(u){const r=new Date(Date.UTC(1899,11,30));return new Date(r.getTime()+u*(1440*60*1e3))}function Z(u,r=!1){if(!(u instanceof Date)||Number.isNaN(u.getTime()))return"";const b=u.getFullYear(),h=String(u.getMonth()+1).padStart(2,"0"),p=String(u.getDate()).padStart(2,"0");return r?`${b}-${h}-${p}T${String(u.getHours()).padStart(2,"0")}:${String(u.getMinutes()).padStart(2,"0")}:${String(u.getSeconds()).padStart(2,"0")}`:`${b}-${h}-${p}`}return{downloadExcel:a,downloadCSV:n,readExcelFile:s,ensureXLSXLoaded:l,getSheetNames:c,readSheetData:i,getWorkbook:d,isExcelSerialDate:o,excelSerialDateToJSDate:m,formatDate:Z}}var Nr={"to-t":"to top","to-b":"to bottom","to-l":"to left","to-r":"to right","to-tl":"to top left","to-tr":"to top right","to-bl":"to bottom left","to-br":"to bottom right"};function KO(e){if(e==null||e==="")return;if(typeof e=="string"&&e in Nr)return Nr[e];const l=Number(e);return Number.isFinite(l)?`${l}deg`:void 0}function HO(e){return typeof e!="string"?[]:e.trim().split(/\s+/).filter(Boolean)}function No(e){const l=e.trim();return l.startsWith("var(")||l.startsWith("#")||/^(rgb|hsl|color-mix|linear-gradient)\(/.test(l)?l:l.startsWith("--")?`var(${l})`:`var(--bgl-${l})`}function Ws({gradient:e,gradientDir:l,color:a}){const n=(0,t.computed)(()=>{const c=(0,t.toValue)(e);return c===!0||typeof c=="string"&&c.trim()!==""}),d=(0,t.computed)(()=>[(0,t.toValue)(a),...HO((0,t.toValue)(e))].filter(Boolean));return{isGradient:n,gradientStyle:(0,t.computed)(()=>{if(!n.value)return{};const c={},i=KO((0,t.toValue)(l));i&&(c["--bgl-grad-angle"]=i);const s=d.value;if(s.length<2)return c;c["--bgl-grad-from"]=No(s[0]),c["--bgl-grad-to"]=No(s[s.length-1]);const o=s.slice(1,-1);return o.length&&(c["--bgl-grad-via"]=`${o.map(No).join(", ")}, `),c}),stops:d}}async function PO(e){if("caches"in window)try{const l=await(await window.caches.open("img-cache")).match(e);if(l)return URL.createObjectURL(await l.blob())}catch{}}async function QO(e,l){if("caches"in window)try{await(await window.caches.open("img-cache")).put(e,new Response(l))}catch{}}async function AO(e){await uc("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");const l=await(await Ud("heic2any"))({blob:await(await fetch($2(e))).blob()});return await QO(e,l),URL.createObjectURL(l)}function e0(e){const l=(0,t.ref)(void 0),a=(0,t.ref)(!1);async function n(){a.value=!1;const d=dt((0,t.toValue)(e));if(d===void 0||d===""){l.value=void 0;return}try{if(d.split(".").pop()?.toLowerCase().split("?")[0]==="heic"){const c=await PO(d);if(c!==void 0&&c!==""){l.value=c;return}l.value=await AO(d)}else l.value=d}catch{a.value=!0,l.value=void 0}}return(0,t.watch)(()=>(0,t.toValue)(e),n,{immediate:!0}),{imageSrc:l,loadingError:a}}var Mn={},Yr=!1,Fm=typeof window<"u";function _O(){!Fm||Yr||(Yr=!0,window.addEventListener("storage",e=>{e.key!==null&&e.key in Mn&&(Mn[e.key].value=e.newValue!==null?JSON.parse(e.newValue):null)}))}function $O(e,l=null){if(!(e in Mn)){const a=Fm?localStorage.getItem(e):null;Mn[e]=(0,t.ref)(a!==null?JSON.parse(a):l),(0,t.watch)(Mn[e],n=>{Fm&&localStorage.setItem(e,JSON.stringify(n))})}return Mn[e]}function Fp(e){return _O(),new Proxy({},{get(l,a){return $O(a,e?.[a]??null)}})}var kp=1e3,qO=60*kp;function eE(e,l={}){const{interval:a=30*kp,inactivityThreshold:n=5*qO,pauseInBackground:d=!0}=l,{idle:c}=jV(n),i=(0,t.ref)(!0),s=(0,t.ref)(null),o=()=>!d||document.visibilityState==="visible",m=()=>{i.value=!1,s.value!==null&&(clearTimeout(s.value),s.value=null)},Z=()=>{s.value!==null&&(clearTimeout(s.value),s.value=null)},u=()=>{s.value!==null&&(clearTimeout(s.value),s.value=null);const h=async()=>{if(i.value&&o()&&!c.value)try{await e()}catch{}i.value&&(s.value=window.setTimeout(h,a))};h()},r=()=>{i.value&&u()};function b(){document.visibilityState==="visible"?i.value&&u():d&&Z()}return(0,t.onMounted)(()=>{document.addEventListener("visibilitychange",b),u()}),(0,t.onUnmounted)(()=>{document.removeEventListener("visibilitychange",b),m()}),{isPolling:i,pausePolling:Z,resumePolling:r,startPolling:u,stopPolling:m}}function lE(){const e=(0,t.ref)(!1);let l;function a(n){e.value=n.matches}return(0,t.onMounted)(()=>{typeof window>"u"||!window.matchMedia||(l=window.matchMedia("(prefers-reduced-motion: reduce)"),e.value=l.matches,l.addEventListener("change",a))}),(0,t.onUnmounted)(()=>{l?.removeEventListener("change",a)}),e}function tE(e,l,a){const n={...e};return a===void 0?delete n[l]:n[l]=a,n}function aE(e){const l=(0,ya.useRoute)(),a=(0,ya.useRouter)(),n={};return new Proxy({},{get(d,c){if(!(c in n)){const i=e?.[c];n[c]=(0,t.computed)({get:()=>l.query[c]??i,set:s=>a.replace({query:tE(l.query,c,s)})})}return n[c]}})}var Nt=(0,t.ref)([{value:"dark",class:"bgl-dark-mode",icon:"cloudy_night",label:"Dark Mode",isDark:!0},{value:"light",class:"bgl-light-mode",icon:"brightness_7",label:"Light Mode",isDark:!1},{value:"system",class:"system",icon:"settings_input_component",label:"System Default"}]),Lr="color-mode",pt=(0,t.ref)("system"),km=(0,t.ref)(!1),l0=(0,t.ref)(!1),gi=(0,t.ref)(!1),t0=typeof window<"u";function nE(){return l0.value&&t0&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}function Xr(e){return Nt.value.find(l=>l.value===e)}function ti(e){if(!t0)return;const l=document.documentElement;if(Nt.value.forEach(a=>{a.class!=="system"&&l.classList.remove(a.class)}),e==="system"){const a=nE();km.value=a;const n=Nt.value.find(i=>i.value==="dark"),d=Nt.value.find(i=>i.value==="light"),c=a?n:d;c&&l.classList.add(c.class)}else{const a=Xr(e),n=a&&a.isDark&&!l0.value?Xr("light"):a;n&&(l.classList.add(n.class),km.value=n.isDark??!1)}}function dE(){const e=Nt.value.filter(l=>l.value!=="system");e.length!==0&&(pt.value=e[(e.findIndex(l=>l.value===pt.value)+1)%e.length].value)}function cE(e={}){e.allowDark!==void 0&&(l0.value=e.allowDark),e.manualSelection!==void 0&&(gi.value=e.manualSelection),fp(),gi.value||(pt.value="system"),ti(pt.value)}function iE(e){if(!Nt.value.some(l=>l.value===e.value)){const l=Nt.value.findIndex(a=>a.value==="system");l>-1?Nt.value.splice(l,0,e):Nt.value.push(e)}}var yr=!1;function fp(){if(!(yr||!t0)){if(yr=!0,gi.value){const e=window.localStorage.getItem(Lr);Nt.value.some(l=>l.value===e)&&(pt.value=e)}else pt.value="system";ti(pt.value),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{pt.value==="system"&&ti("system")}),(0,t.watch)(pt,e=>{gi.value&&localStorage.setItem(Lr,e),ti(e)})}}function sE(){return fp(),{isDark:km,theme:(0,t.computed)(()=>pt.value),themeOptions:Nt,toggleTheme:dE,addTheme:iE,setTheme:e=>{pt.value=e}}}function jp(e,l,a,n){gV(e,(d,c)=>{if(l?.()?.setCustomValidity(""),!a||d===c||!d)return;const i=a(d,n?.());typeof i=="string"&&l?.()?.setCustomValidity(i)},{debounce:500})}function Jp({schema:e,columns:l,data:a}={}){const n=(0,t.computed)(()=>(0,t.toValue)(e)),d=(0,t.computed)(()=>(0,t.toValue)(l));return n.value?d.value&&d.value.length>0?n.value.filter(c=>d.value?.includes(c.id)):n.value:Rp(a,d.value)}const oE={s:"400px",m:"540px",l:"720px",xl:"960px",full:"100%"};var mE={key:0,class:"dialog-grip","aria-hidden":"true"},ZE={key:2,class:"flex-grow-1"},uE=(0,t.defineComponent)({__name:"Dialog",props:{open:{type:Boolean},title:{},width:{default:"m"},position:{default:"center"},dismissable:{type:Boolean,default:!0},flat:{type:Boolean,default:!0},thin:{type:Boolean,default:!1},centerTitle:{type:Boolean,default:!1},ellipsisTitle:{type:Boolean,default:!1},closePlacement:{default:"header-end"},grip:{type:Boolean,default:void 0}},emits:["update:open","close"],setup(e,{expose:l,emit:a}){const n=e,d=(0,t.computed)(()=>n.grip??n.position==="bottom"),c=a,i=(0,t.ref)(null),s=(0,t.ref)(!1),o=(0,t.ref)(!0),m=(0,t.computed)(()=>oE[n.width]),Z=(0,t.computed)(()=>n.position==="left"?"dialog-left ms-1 me-auto mt-1 mb-1 height-100-2 m_m-0 m_h-100vh m_max-h-100vh m_radius-0":n.position==="right"?"dialog-right me-1 ms-auto mt-1 mb-1 height-100-2 m_m-0 m_h-100vh m_max-h-100vh m_radius-0":n.position==="top"?"dialog-top mx-auto mt-1 mb-auto":n.position==="bottom"?"dialog-bottom mx-auto mb-1 mt-auto":"dialog-center mx-auto");(0,t.watch)(()=>n.open,N=>{N?(i.value?.showModal(),s.value=!1,o.value=!1,setTimeout(()=>{o.value=!0},250)):u()}),(0,t.onMounted)(()=>{n.open&&i.value?.showModal()});function u(){s.value||(s.value=!0)}function r(){s.value&&(i.value?.close(),s.value=!1,c("close"))}function b(N){N.target===i.value&&n.dismissable&&c("update:open",!1)}function h(N){if(!n.dismissable){N.preventDefault();return}c("update:open",!1)}function p(){o.value=!1,c("update:open",!1)}return l({close:p}),(N,W)=>((0,t.openBlock)(),(0,t.createElementBlock)("dialog",{ref_key:"dialogRef",ref:i,class:(0,t.normalizeClass)([[Z.value,{"is-closing":s.value}],"border-none shadow-30 p-0 testMe1 dialog-no-focus-outline"]),style:(0,t.normalizeStyle)({"--dialog-width":m.value}),onClick:b,onCancel:h,onAnimationend:r},[(0,t.createElementVNode)("div",{class:"grid grid-dialog max-height-100-2",tabindex:"-1",autofocus:"",onClick:W[0]||(W[0]=(0,t.withModifiers)(()=>{},["stop"]))},[d.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",mE)):(0,t.createCommentVNode)("",!0),e.title||N.$slots.header||e.dismissable?((0,t.openBlock)(),(0,t.createElementBlock)("header",{key:1,class:(0,t.normalizeClass)(["flex space-between flex-shrink-0 align-items-start gap-05",{"border-bottom":!e.flat,"border-none":!e.title&&!N.$slots.header,"m_ps-1":e.title||N.$slots.header,"p-05 m_p-05":!e.title&&!N.$slots.header,"ps-1-5 pe-1 py-1 ":!e.thin&&(e.title||N.$slots.header),"ps-1 pe-05 py-05":e.thin&&(e.title||N.$slots.header)}])},[e.dismissable&&e.closePlacement==="header-start"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:0,flat:"",icon:"close","aria-label":"Close",class:"dialog-close relative z-2",thin:"",onClick:p})):(0,t.createCommentVNode)("",!0),e.title||N.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)("h3",{key:1,class:(0,t.normalizeClass)(["dialog-title m-0 txt20 semi w-100p",{"txt-center balance":e.centerTitle,"word-break-all":!e.centerTitle,"ellipsis-1":e.ellipsisTitle}])},[(0,t.renderSlot)(N.$slots,"header",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)],!0)],2)):(0,t.createCommentVNode)("",!0),!e.title&&!N.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)("div",ZE)):(0,t.createCommentVNode)("",!0),e.dismissable&&e.closePlacement==="header-end"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:3,flat:"",icon:"close","aria-label":"Close",class:"dialog-close relative z-2",thin:"",onClick:p})):(0,t.createCommentVNode)("",!0)],2)):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["overflow-y flex-grow-1 m_p-1",{"px-1 py-05":e.thin,"px-1-5 py-1":!e.thin}])},[(0,t.renderSlot)(N.$slots,"default",{},void 0,!0)],2),N.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)("footer",{key:2,class:(0,t.normalizeClass)(["flex flex-shrink-0 gap-05 m_px-05 m_py-05 justify-content-end",{"border-top":!e.flat,"px-05 py-05":e.thin,"px-1-5 py-1":!e.thin}])},[(0,t.renderSlot)(N.$slots,"footer",{},void 0,!0)],2)):(0,t.createCommentVNode)("",!0)]),e.dismissable&&e.closePlacement==="overlay-start"&&o.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:0,icon:"close","aria-label":"Close",class:"fixed top-1 start-1 z-999 overlay-btn",onClick:p})):(0,t.createCommentVNode)("",!0),e.dismissable&&e.closePlacement==="overlay-end"&&o.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:1,icon:"close","aria-label":"Close",class:"fixed top-1 end-1 z-999 overlay-btn",onClick:p})):(0,t.createCommentVNode)("",!0)],38))}}),At=Ye(uE,[["__scopeId","data-v-42595465"]]),rE=(0,t.defineComponent)({__name:"DialogConfirm",props:{open:{type:Boolean},title:{},message:{},width:{default:"s"},position:{default:"center"},dismissable:{type:Boolean,default:!0},confirmText:{},cancelText:{},confirmColor:{default:"primary"}},emits:["update:open","resolve"],setup(e,{emit:l}){const a=e,n=l,{$t:d}=tl(),c=(0,t.computed)(()=>a.title||d("modalConfirm.title")),i=(0,t.computed)(()=>a.confirmText||d("modalConfirm.confirm")),s=(0,t.computed)(()=>a.cancelText||d("modalConfirm.cancel"));function o(){n("resolve",!0),n("update:open",!1)}function m(){n("resolve",!1),n("update:open",!1)}function Z(){n("resolve",!1)}return(u,r)=>((0,t.openBlock)(),(0,t.createBlock)(At,{open:e.open,title:c.value,width:e.width,position:e.position,dismissable:e.dismissable,"onUpdate:open":r[0]||(r[0]=b=>u.$emit("update:open",b)),onClose:Z},{footer:(0,t.withCtx)(()=>[(0,t.createVNode)(oe,{flat:"",onClick:m},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(s.value),1)]),_:1}),(0,t.createVNode)(oe,{color:e.confirmColor,onClick:o},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(i.value),1)]),_:1},8,["color"])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("p",null,(0,t.toDisplayString)(e.message),1)]),_:1},8,["open","title","width","position","dismissable"]))}}),Cp=rE,Vn=new Map,fm=new Set,Dp=/^[a-z0-9][a-z0-9._-]*:[a-z0-9][a-z0-9._-]*$/i;function bE(e){if(!Dp.test(e.type))throw new Error(`Custom form field type "${e.type}" must be a namespaced ID such as "acme:rating"`);if(Vn.has(e.type))throw new Error(`Custom form field type "${e.type}" is already registered`);return Vn.set(e.type,e),fm.delete(e.type),()=>{Vn.get(e.type)===e&&Vn.delete(e.type)}}function Wt(e){return Vn.get(e)}function hE(){return[...Vn.values()]}function Gs(e){return Dp.test(e)}function Ns(e){!Gs(e)||fm.has(e)||fm.add(e)}function pE(e,l,a={},n=""){return Wt(e)?.display?.(l,{key:n,config:a})}function a0(e,l){const a={...l};for(const[n,d]of Object.entries(e)){const c=Wt(d._type)?.toSubmission;if(!c)continue;const i=c(a[n],{key:n,config:d._config,formData:l});i===void 0?delete a[n]:a[n]=i}return a}const WE=12,GE=12,NE=1;var Up=/^col-(\d{1,2})\/12$/,Op=/^start-col-(\d{1,2})$/,Ep=/^m_col-(\d{1,2})\/12$/,Bp=/^start-row-(\d+)$/,Kp=/^(?:grid-)?span-row-(\d+)$/,Hp=/^m_start-col-(\d{1,2})$/,Pp=/^m_start-row-(\d+)$/,Qp=/^m_(?:grid-)?span-row-(\d+)$/,Ri={"col-1/12":1,"col-1/6":2,"col-2/12":2,"col-1/4":3,"col-3/12":3,"col-1/3":4,"col-4/12":4,"col-5/12":5,"col-1/2":6,"col-6/12":6,"col-7/12":7,"col-2/3":8,"col-8/12":8,"col-3/4":9,"col-9/12":9,"col-5/6":10,"col-10/12":10,"col-11/12":11,"col-full":12,"col-12/12":12},jm=Object.fromEntries(Object.entries(Ri).map(([e,l])=>[`m_${e}`,l]));function wa(e){return Math.max(1,Math.min(12,Math.round(e)))}function Ys(e){return Math.max(1,Math.round(e))}function Ap(e){return`col-${wa(e)}/12`}function _p(e){return`start-col-${wa(e)}`}function $p(e){return`m_col-${wa(e)}/12`}function qp(e){return`span-row-${Ys(e)}`}function YE(e){return`start-row-${Math.max(1,Math.round(e))}`}function e5(e){return`m_start-col-${wa(e)}`}function l5(e){return`m_start-row-${Math.max(1,Math.round(e))}`}function t5(e){return`m_span-row-${Ys(e)}`}function n0(e){if(e)for(const l of e.split(/\s+/)){if(l.startsWith("m_"))continue;const a=l.match(Up);if(a)return wa(Number(a[1]));if(l in Ri)return Ri[l]}}function d0(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Op);if(a)return wa(Number(a[1]))}}function c0(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Ep);if(a)return wa(Number(a[1]));if(l in jm)return jm[l]}}function i0(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Hp);if(a)return wa(Number(a[1]))}}function s0(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Kp);if(a)return Ys(Number(a[1]))}}function o0(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Bp);if(a)return Math.max(1,Number(a[1]))}}function m0(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Pp);if(a)return Math.max(1,Number(a[1]))}}function Z0(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Qp);if(a)return Ys(Number(a[1]))}}function u0(e){return e?e.split(/\s+/).filter(Boolean).filter(l=>!Up.test(l)&&!Op.test(l)&&!Ep.test(l)&&!Bp.test(l)&&!Kp.test(l)&&!Hp.test(l)&&!Pp.test(l)&&!Qp.test(l)&&!(l in Ri)&&!(l in jm)).join(" "):""}function a5(e,l){const a=u0(e),n=a?[a]:[];return l.colSpan!==void 0&&l.colSpan!==12&&n.push(Ap(l.colSpan)),l.colStart!==void 0&&n.push(_p(l.colStart)),l.rowStart!==void 0&&n.push(YE(l.rowStart)),l.rowSpan!==void 0&&l.rowSpan!==1&&n.push(qp(l.rowSpan)),l.mColSpan!==void 0&&l.mColSpan!==12&&n.push($p(l.mColSpan)),l.mColStart!==void 0&&n.push(e5(l.mColStart)),l.mRowStart!==void 0&&n.push(l5(l.mRowStart)),l.mRowSpan!==void 0&&l.mRowSpan!==1&&n.push(t5(l.mRowSpan)),n.join(" ")}function n5(e){return{colSpan:n0(e),colStart:d0(e),rowStart:o0(e),rowSpan:s0(e),mColSpan:c0(e),mColStart:i0(e),mRowStart:m0(e),mRowSpan:Z0(e)}}var LE=(0,t.defineComponent)({__name:"FormFlow",props:{schema:{},modelValue:{},components:{},errors:{},onSubmit:{type:Function}},emits:["update:modelValue"],setup(e,{expose:l,emit:a}){const n=e,d=a,{$t:c}=tl();function i(w,K){const O=K.split(".");let R=w;for(const z of O)R=R?.[z];return R}function s(w,K,O){const R=K.split(".");let z=w;for(let v=0;v<R.length-1;v++){const S=R[v];(z[S]==null||typeof z[S]!="object")&&(z[S]={}),z=z[S]}z[R[R.length-1]]=O}function o(w){if(w==null||typeof w!="object")return w;try{return structuredClone(w)}catch{return JSON.parse(JSON.stringify(w))}}function m(w,K,O,R){const z=Wt(w._type);if(z?.coerce)return z.coerce(K,{key:O,config:w._config,formData:R});if(typeof K!="string")return K;const v=K.trim();switch(w._type){case"checkbox":case"toggle":return v.toLowerCase()==="true"?!0:v.toLowerCase()==="false"?!1:K;case"number":case"range":{if(!v)return K;const S=Number(v);return Number.isNaN(S)?K:S}default:return K}}function Z(w){const K={...w??{}};for(const[O,R]of Object.entries(n.schema._fields)){const z=i(K,O);if(z!==void 0){s(K,O,m(R,z,O,K));continue}const v=R._config.default;v!==void 0&&s(K,O,m(R,o(v),O,K))}return K}function u(w){const K=w._config.schema;if(K&&typeof K.getDefaults=="function"){const R=o(K.getDefaults());if(R&&Object.keys(R).length>0)return R}const O=w._config.default;return Array.isArray(O)&&O.length>0&&O[0]!=null&&typeof O[0]=="object"?o(r(O[0])):{}}function r(w){try{return JSON.parse(JSON.stringify(w))}catch{return{...w}}}const b=(0,t.ref)(Z(n.modelValue)),h=(0,t.ref)({}),p=(0,t.ref)(!1),N=(0,t.ref)("idle"),W=(0,t.ref)();let G=!1;(0,t.watch)(()=>n.modelValue,w=>{G||(b.value=Z(w))},{deep:!0}),(0,t.watch)(b,w=>{G=!0,d("update:modelValue",o(w)),(0,t.nextTick)(()=>{G=!1})},{deep:!0});function Y(w){return w._hidden?!1:w._condition==null?!0:L2(w._condition,b.value)}function L(w,K){if(K._condition==null)return w;const O=K._condition.trim().split(/\s+/)[0];if(!O)return w;const R=i(b.value,O);return R==null?w:`${w}:${String(R)}`}const X=(0,t.computed)(()=>{const w=[];for(const[K,O]of Object.entries(n.schema._fields))Y(O)&&w.push({key:K,field:O});return w});function T(w){if(!n.schema._class?.split(/\s+/).includes("free-grid"))return;const{rowStart:K,rowSpan:O,mRowStart:R,mRowSpan:z}=n5(w._class);if(!(!K&&!R&&!O&&!z))return{...K?{"--bgl-grid-row-start":String(K)}:{},...R?{"--bgl-mobile-grid-row-start":String(R)}:{},...O?{"--bgl-grid-row-span":String(O)}:{},...z?{"--bgl-mobile-grid-row-span":String(z)}:{}}}function V(w,K,O){s(b.value,w,K),(N.value==="success"||N.value==="error")&&(N.value="idle"),p.value&&x(w,O)}function y(w,K,O){const R=Wt(K._type);return R?.isEmpty?R.isEmpty(w,{key:O,config:K._config,formData:b.value}):w==null||w===""||w===!1&&K._type==="checkbox"||Array.isArray(w)&&w.length===0||K._type==="tel"&&typeof w=="string"&&/^\+\d+$/.test(w)}function x(w,K){const O=M(w);if(K._config.required===!0&&y(O,K,w))return h.value={...h.value,[w]:K._config.requiredMessage??c("form.required")},!1;if(K._type==="email"&&O&&!Ja.test(O))return h.value={...h.value,[w]:c("form.invalidEmail")},!1;const R=Wt(K._type)?.validate?.(O,{key:w,config:K._config,formData:b.value});if(R!==void 0&&R!==!0)return h.value={...h.value,[w]:R},!1;if(K._validations!=null)for(const z of K._validations){const v=z(O);if(v!==!0)return h.value={...h.value,[w]:v},!1}return h.value=Object.fromEntries(Object.entries(h.value).filter(([z])=>z!==w)),!0}function M(w){return i(b.value,w)}function F(w,K){return K._config.label!=null?K._config.label:w.split(/[._-]/).map(O=>O.charAt(0).toUpperCase()+O.slice(1)).join(" ")}function g(w){if(typeof w!="string"&&(w._type==="select"||w._type==="multiselect")&&w._config.display==="btn")return n.components?.selectBtn??T2;const K=typeof w=="string"?w:w._type;if(K&&n.components?.[K]!=null)return n.components[K];const O=K?Wt(K)?.component:void 0;return O||(K&&Gs(K)&&Ns(K),{text:fe,email:y2,password:_1,number:St,tel:D2,url:fe,date:Ba,time:fe,datetime:Ba,textarea:fe,richtext:Ni,json:X2,checkbox:Il,toggle:us,radio:q1,select:Cl,multiselect:Cl,array:Wn,heading:ym,divider:ym,upload:kd,color:gt,icon:D1,range:V2}[K]??fe)}const C=(0,t.computed)(()=>{const w={...h.value,...n.errors||{}},K={};for(const[O,R]of Object.entries(w))K[O]=Me(R)??R;return K});function E(w,K){const O=F(K,w),{helpText:R,...z}=w._config,v=n.schema._class?.split(/\s+/).includes("free-grid")??!1,S={label:O,modelValue:M(K),"onUpdate:modelValue":te=>{V(K,te,w)},error:C.value[K],...z,...R!=null?{helptext:R}:{},name:w._config.name??K};if(w._type==="textarea"&&(S.multiline=!0),w._type==="multiselect"&&(S.multiselect=!0),v&&w._type==="richtext"&&(S.fullHeight=!0),v&&(w._type==="upload"||w._type==="file")&&(S.height=w._config.hideLabel?"100%":"calc(100% - 1.75rem)"),(w._type==="select"||w._type==="multiselect")&&typeof S.options=="function"){const te=S.options;S.options=J=>te(J,b.value)}if(w._type==="json"&&(S.language=S.language??"json"),w._type==="array"){delete S.default,delete S.schema,delete S.itemType;const{helpText:te,...J}=Object.fromEntries(Object.entries(w._config).filter(([ie])=>ie!=="schema"&&ie!=="itemType"&&ie!=="default"));Object.assign(S,J),te!=null&&(S.helptext=te),delete S.helpText,S.modelValue=M(K),S["onUpdate:modelValue"]=ie=>{V(K,ie,w)},S.allowAdd=S.allowAdd??!0,S.allowDelete=S.allowDelete??!0}return S}function _(w,K){return{...w._component?.props??{},...E(w,K)}}function $(w){return typeof w=="string"&&n.components?.[w]!=null?n.components[w]:w}function f(w){return w._component!=null}function U(){let w=!0;const K={};for(const{key:O,field:R}of X.value){const z=M(O);if(R._config.required===!0&&y(z,R,O)){K[O]=R._config.requiredMessage??c("form.required"),w=!1;continue}if(R._type==="email"&&z&&!Ja.test(z)){K[O]=c("form.invalidEmail"),w=!1;continue}const v=Wt(R._type)?.validate?.(z,{key:O,config:R._config,formData:b.value});if(v!==void 0&&v!==!0){K[O]=v,w=!1;continue}if(R._validations!=null)for(const S of R._validations){const te=S(z);if(te!==!0){K[O]=te,w=!1;break}}}return h.value=K,w}async function Q(w){w&&w.preventDefault(),p.value=!0;const K=U();if(K){if(n.onSubmit){N.value="submitting";try{await n.onSubmit(a0(n.schema._fields,b.value)),N.value="success"}catch{N.value="error"}}}else{w?.stopPropagation(),W.value?.reportValidity();const O=X.value.find(({key:R})=>h.value[R])?.key;if(O!=null&&W.value){const R=W.value.querySelector(`[name="${O}"]`)||W.value.querySelector(`[id="${O}"]`)||W.value.querySelector(`[data-field="${O}"]`)||W.value.querySelector("input, select, textarea");R&&(R.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{R instanceof HTMLElement&&R.focus()},300))}}return K}return l({validate:U,submit:Q,formState:N}),(w,K)=>{const O=(0,t.resolveComponent)("FormFlow",!0);return(0,t.openBlock)(),(0,t.createElementBlock)("form",{ref_key:"formElement",ref:W,class:(0,t.normalizeClass)(["grid-form",e.schema._class]),onSubmit:Q},[N.value==="success"?(0,t.renderSlot)(w.$slots,"success",{key:0,formData:b.value}):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(X.value,({key:R,field:z})=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:L(R,z),class:(0,t.normalizeClass)([z._class,z._config.class]),style:(0,t.normalizeStyle)(T(z))},[(0,t.renderSlot)(w.$slots,`field:${R}`,{value:M(R),field:z,formData:b.value,error:h.value[R],onChange:v=>{V(R,v,z)}},()=>[z._type==="array"&&z._config.schema?._isSchema?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:0,ref_for:!0},E(z,R),{"create-item":()=>u(z)}),{default:(0,t.withCtx)(({item:v})=>[(0,t.createVNode)(O,{"model-value":v.value,schema:z._config.schema,components:e.components,"onUpdate:modelValue":S=>{v.value=S}},null,8,["model-value","schema","components","onUpdate:modelValue"])]),_:2},1040,["create-item"])):z._type==="array"&&typeof z._config.schema=="string"?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:1,ref_for:!0},E(z,R),{"create-item":()=>""}),{default:(0,t.withCtx)(({item:v})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(g(z._config.schema)),{"model-value":v.value,"onUpdate:modelValue":S=>{v.value=S}},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1040)):z._type==="array"&&z._config.schema?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:2,ref_for:!0},E(z,R),{"create-item":()=>u(z)}),{default:(0,t.withCtx)(({item:v})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)($(z._config.schema)),{modelValue:v.value,"onUpdate:modelValue":S=>v.value=S},null,8,["modelValue","onUpdate:modelValue"]))]),_:2},1040,["create-item"])):z._type==="array"&&z._config.itemType?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:3,ref_for:!0},E(z,R),{"create-item":()=>""}),{default:(0,t.withCtx)(({item:v})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(g(z._config.itemType)),{"model-value":v.value,"onUpdate:modelValue":S=>{v.value=S}},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1040)):f(z)?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)($(z._component.component)),(0,t.mergeProps)({key:4,ref_for:!0},_(z,R)),null,16)):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(g(z)),(0,t.mergeProps)({key:5,ref_for:!0},E(z,R)),null,16))])],6))),128)),(0,t.renderSlot)(w.$slots,"errors",{errors:C.value,errorCount:Object.keys(C.value).filter(R=>C.value[R]).length,visibleFields:X.value}),N.value==="error"?(0,t.renderSlot)(w.$slots,"error",{key:0,formData:b.value}):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(w.$slots,"submit",{submit:Q,validate:U,formData:b.value,errors:C.value,formState:N.value})],64))],34)}}}),Ls=LE,XE={key:0,class:"dialog-form-error bg-red-30 color-red radius-1 mb-1 txt14 px-1 py-075"},yE={key:1,class:"mb-1 mt-0"},ME=(0,t.defineComponent)({__name:"DialogForm",props:{open:{type:Boolean},title:{},width:{default:"m"},position:{default:"center"},dismissable:{type:Boolean,default:!0},schema:{},modelValue:{},message:{},onSubmit:{},onDelete:{},submitText:{},cancelText:{},deleteText:{}},emits:["update:open","resolve"],setup(e,{emit:l}){const a=e,n=l,{$t:d}=tl(),c=(0,t.ref)({...a.modelValue||{}}),i=(0,t.ref)(!1),s=(0,t.ref)(!1),o=(0,t.ref)(null),m=(0,t.ref)(),Z=(0,t.computed)(()=>typeof a.onDelete=="function");async function u(){if(!i.value){if(!m.value?.validate()){o.value=d("dialogForm.validationError");return}o.value=null,i.value=!0;try{a.onSubmit&&await a.onSubmit(c.value),n("resolve",{action:"submit",data:c.value}),n("update:open",!1)}catch(p){o.value=p instanceof Error?p.message:d("dialogForm.errorOccurred")}finally{i.value=!1}}}async function r(){if(!(s.value||!a.onDelete)){o.value=null,s.value=!0;try{await a.onDelete(c.value),n("resolve",{action:"delete",data:c.value}),n("update:open",!1)}catch(p){o.value=p instanceof Error?p.message:d("dialogForm.errorOccurred")}finally{s.value=!1}}}function b(){n("resolve",{action:"cancel",data:c.value}),n("update:open",!1)}function h(){n("resolve",{action:"cancel",data:c.value})}return(p,N)=>((0,t.openBlock)(),(0,t.createBlock)(At,{open:e.open,title:e.title,width:e.width,position:e.position,dismissable:e.dismissable,"onUpdate:open":N[1]||(N[1]=W=>p.$emit("update:open",W)),onClose:h},{footer:(0,t.withCtx)(()=>[Z.value?((0,t.openBlock)(),(0,t.createBlock)(oe,{key:0,color:"red",flat:"",loading:s.value,disabled:i.value,class:"me-auto",thin:"",onClick:r},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.deleteText||(0,t.unref)(d)("dialogForm.delete")),1)]),_:1},8,["loading","disabled"])):(0,t.createCommentVNode)("",!0),N[2]||(N[2]=(0,t.createElementVNode)("div",{class:"flex-grow-1"},null,-1)),(0,t.createVNode)(oe,{flat:"",disabled:i.value||s.value,onClick:b,thin:""},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.cancelText||(0,t.unref)(d)("dialogForm.cancel")),1)]),_:1},8,["disabled"]),(0,t.createVNode)(oe,{color:"primary",loading:i.value,disabled:s.value,onClick:u},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.submitText||(0,t.unref)(d)("dialogForm.save")),1)]),_:1},8,["loading","disabled"])]),default:(0,t.withCtx)(()=>[o.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",XE,(0,t.toDisplayString)(o.value),1)):(0,t.createCommentVNode)("",!0),e.message?((0,t.openBlock)(),(0,t.createElementBlock)("p",yE,(0,t.toDisplayString)(e.message),1)):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(Ls,{ref_key:"formFlowRef",ref:m,modelValue:c.value,"onUpdate:modelValue":N[0]||(N[0]=W=>c.value=W),schema:e.schema,onSubmit:u},null,8,["modelValue","schema"])]),_:1},8,["open","title","width","position","dismissable"]))}}),d5=ME;const r0=Symbol("dialog");var Si=null;function c5(){let e=null;try{e=(0,t.inject)(r0,null)}catch{e=null}if(!e){if(Si)return Si;throw new Error("Dialog API not provided. Make sure DialogPlugin is installed via app.use(DialogPlugin)")}return e}const i5={install:e=>{let l=0;const a=(0,t.reactive)([]),n={form:c=>new Promise(i=>{const s=++l;a.push({id:s,type:"form",options:c,resolve:i,open:!0})}),confirm:c=>new Promise(i=>{const s=++l,o=typeof c=="string"?{message:c}:c;a.push({id:s,type:"confirm",options:o,resolve:i,open:!0})}),open:c=>{const i=++l,s={id:i,type:"open",options:c,resolve:()=>{},open:!0};return a.push(s),{close:()=>{const o=a.findIndex(m=>m.id===i);o!==-1&&(a[o].open=!1,setTimeout(()=>{const m=a.findIndex(Z=>Z.id===i);m!==-1&&a.splice(m,1)},200))}}}};Si||(Si=n),e.provide(r0,n);const d=(0,t.defineComponent)({name:"DialogContainer",setup(){function c(o,m){o.resolve(m),o.open=!1,setTimeout(()=>{const Z=a.findIndex(u=>u.id===o.id);Z!==-1&&a.splice(Z,1)},200)}function i(o,m){o.resolve(m),o.open=!1,setTimeout(()=>{const Z=a.findIndex(u=>u.id===o.id);Z!==-1&&a.splice(Z,1)},200)}function s(o,m){m||(o.open=!1,setTimeout(()=>{const Z=a.findIndex(u=>u.id===o.id);Z!==-1&&a.splice(Z,1)},200))}return{dialogStack:a,handleFormResolve:c,handleConfirmResolve:i,handleOpenUpdate:s}},render(){return this.dialogStack.map(c=>{if(c.type==="form")return(0,t.h)(d5,{key:c.id,open:c.open,...c.options,"onUpdate:open":i=>{i||this.handleFormResolve(c,{action:"cancel",data:c.options.modelValue||{}})},onResolve:i=>{this.handleFormResolve(c,i)}});if(c.type==="confirm")return(0,t.h)(Cp,{key:c.id,open:c.open,...c.options,"onUpdate:open":i=>{i||this.handleConfirmResolve(c,!1)},onResolve:i=>{this.handleConfirmResolve(c,i)}});if(c.type==="open"){const i=c.options;return(0,t.h)(At,{key:c.id,open:c.open,title:i.title,width:i.width,position:i.position,dismissable:i.dismissable,class:i.class,"onUpdate:open":s=>{this.handleOpenUpdate(c,s)}},{default:()=>(0,t.h)((typeof i.component=="string",i.component),i.props||{})})}return null})}});if(e.component("DialogContainer",d),typeof document<"u"&&typeof window<"u"){const c=()=>{if(!document.getElementById("bagelink-dialog-root")){const i=document.createElement("div");i.id="bagelink-dialog-root",document.body.appendChild(i);const s=(0,t.createApp)(d);Object.assign(s._context,e._context),s.mount(i)}};document.body&&c(),e.mixin({mounted(){this.$root===this&&c()}})}}};var b0={pint:{pattern:/\d/},int:{pattern:/[\d-]/},pnum:{pattern:/[\d.]/},tel:{pattern:/[\d.\-()\s+]/},money:{pattern:/[\d.\s,]/},number:{pattern:/[\d\-.]/},num:{pattern:/[\d\-.]/},hex:{pattern:/[0-9a-f]/i},email:{pattern:/[\w.\-@]/},alpha:{pattern:/[a-z_]/i},alphanum:{pattern:/\w/},lower:{pattern:/[a-z]/i,transform:e=>e.toLowerCase()},upper:{pattern:/[A-Z]/i,transform:e=>e.toUpperCase()},slug:{pattern:/[a-z0-9-]/i,transform:e=>e.toLowerCase().replace(/\s/g,"-")},snake:{pattern:/[a-z_]/,transform:e=>e.toLowerCase().replace(/\s/g,"_")}},vc=new WeakMap;function Yo(e){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e;const l=e.querySelector("input, textarea");return l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement?l:null}function Mr(e){const l=Object.keys(e.modifiers);return l.length>0?l[l.length-1]:""}function s5(e){return e.pattern!=null?e.pattern:e.modifier!=null&&e.modifier!==""?b0[e.modifier]?.pattern??/./:/./}function Vr(e,l,a){a.keydownEvent=(n=>{TE(n,l,a)}),a.inputEvent=(n=>{o5(n,l,a)}),a.compositionStartEvent=(()=>{IE(a)}),a.compositionEndEvent=(n=>{xE(n,l,a)}),l.addEventListener("keydown",a.keydownEvent),l.addEventListener("input",a.inputEvent,{capture:!0}),l.addEventListener("compositionstart",a.compositionStartEvent),l.addEventListener("compositionend",a.compositionEndEvent)}function Tr(e,l){l.keydownEvent&&e.removeEventListener("keydown",l.keydownEvent),l.inputEvent&&e.removeEventListener("input",l.inputEvent,{capture:!0}),l.compositionStartEvent&&e.removeEventListener("compositionstart",l.compositionStartEvent),l.compositionEndEvent&&e.removeEventListener("compositionend",l.compositionEndEvent),l.keydownEvent=void 0,l.inputEvent=void 0,l.compositionStartEvent=void 0,l.compositionEndEvent=void 0}function VE(e){const l=["Tab","Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"];return e.ctrlKey||e.altKey||e.metaKey?!0:l.includes(e.key)}function TE(e,l,a){if(a.composing===!0||VE(e)||a.modifier!=null&&a.modifier!==""&&typeof b0[a.modifier]?.transform=="function")return;const n=s5(a),d=e.key;n.test(d)||e.preventDefault()}function IE(e){e.composing=!0}function xE(e,l,a){a.composing=!1,o5(e,l,a)}function Ir(e,l){const a=s5(l);let n;if(l.modifier!=null&&l.modifier!==""){const c=b0[l.modifier]?.transform;n=c?c(e):e}else n=e;let d="";for(let c=0;c<n.length;c++){const i=n[c];a.test(i)&&(d+=i)}return d}function o5(e,l,a){if(a.reformatting===!0||a.composing===!0)return;const n=l.value,d=l.selectionEnd??n.length,c=n.slice(0,d),i=Ir(n,a);if(i===n)return;const s=Ir(c,a).length;a.reformatting=!0,l.value=i,l.setSelectionRange(s,s),a.reformatting=!1}var zE={beforeMount(e,l){const a=Yo(e);if(a===null)return;const n={modifier:Mr(l)};typeof l.value=="object"&&l.value!==null&&(n.pattern=l.value.pattern??/./,n.validateOnly=l.value.validateOnly===!0),vc.set(e,n),Vr(e,a,n)},updated(e,l){const a=Yo(e);if(a===null)return;const n=vc.get(e);n!==void 0&&(Tr(a,n),n.modifier=Mr(l),typeof l.value=="object"&&l.value!==null&&(n.pattern=l.value.pattern??/./,n.validateOnly=l.value.validateOnly===!0),Vr(e,a,n))},unmounted(e){const l=Yo(e),a=vc.get(e);l!==null&&a!==void 0&&Tr(l,a),vc.delete(e)},getSSRProps(){return{}}},m5=zE,wE=()=>typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;function gE(e){const l={y:"up",delay:0,once:!0,threshold:.12};return e?typeof e=="string"?{...l,y:e}:{...l,...e}:l}var Lo=new WeakMap,RE={mounted(e,l){const a=gE(l.value);if(wE())return;e.classList.add("bgl-reveal"),a.y!=="none"&&(e.dataset.revealDir=a.y),a.delay&&e.style.setProperty("--bgl-reveal-delay",`${a.delay}ms`);const n=new IntersectionObserver(d=>{for(const c of d)c.isIntersecting?(e.classList.add("bgl-reveal-in"),a.once&&n.unobserve(e)):a.once||e.classList.remove("bgl-reveal-in")},{threshold:a.threshold,rootMargin:"0px 0px -8% 0px"});n.observe(e),Lo.set(e,n)},unmounted(e){Lo.get(e)?.disconnect(),Lo.delete(e)},getSSRProps(){return{}}},Z5=RE;function SE(e){let l=e.__rippleContainer;return(!l||!l.isConnected)&&(l=document.createElement("span"),Object.assign(l.style,{position:"absolute",inset:"0",overflow:"hidden",borderRadius:"inherit",pointerEvents:"none"}),e.appendChild(l),e.__rippleContainer=l),l}var vE={mounted(e,l){const a=n=>{const d=e.getBoundingClientRect(),c=Math.max(d.width,d.height),i=document.createElement("span");i.className="ripple",Object.assign(i.style,{width:`${c}px`,height:`${c}px`,left:`${n.clientX-d.left-c/2}px`,top:`${n.clientY-d.top-c/2}px`,position:"absolute",borderRadius:"50%",transform:"scale(0)",background:"rgba(0, 0, 0, 0.3)",pointerEvents:"none",animation:"rippleEffect 0.6s ease-out"}),SE(e).appendChild(i),setTimeout(()=>{i.remove()},600)};e.__rippleClickHandler=a,l.value!==!1&&(getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.addEventListener("mousedown",a))},updated(e,l){const a=e.__rippleClickHandler;l.value===!1?e.removeEventListener("mousedown",a):(getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.addEventListener("mousedown",a))},unmounted(e){const l=e.__rippleClickHandler;l&&(e.removeEventListener("mousedown",l),delete e.__rippleClickHandler)},getSSRProps(){return{}}},u5=vE,vi=new WeakMap;function xr(e,l){const a=l.value||{},n=O2();let d=a.handle?e.querySelector(a.handle):e;const c=!d;d||(d=e.ownerDocument.createElement("div"),d.className=a.handle.replace(".","")+(a.handleClass?` ${a.handleClass}`:""),d.style.cssText="position:absolute;bottom:0;left:0;right:0;height:6px;background:rgba(0,0,0,0.1);",e.appendChild(d));const i=d,s={cursor:i.style.cursor,userSelect:i.style.userSelect,touchAction:i.style.touchAction},o=["role","tabindex","aria-orientation","aria-label","aria-valuenow","aria-valuemin","aria-valuemax"].map(r=>[r,i.getAttribute(r)]);i.style.cursor="ns-resize",i.style.userSelect="none",i.style.touchAction="none",i.setAttribute("role","separator"),i.setAttribute("tabindex","0"),i.setAttribute("aria-orientation","horizontal"),i.hasAttribute("aria-label")||i.setAttribute("aria-label","Resize height"),i.setAttribute("aria-valuemin",String(a.minHeight??0)),a.maxHeight!==void 0&&i.setAttribute("aria-valuemax",String(a.maxHeight)),i.setAttribute("aria-valuenow",String(e.offsetHeight));function m(r,b,h){const p={clientY:r,deltaY:r-b,initialHeight:h},N=h+p.deltaY,W=a.gridSize&&a.gridSize>0?Math.round(N/a.gridSize)*a.gridSize:N,G=Math.min(a.maxHeight??1/0,Math.max(a.minHeight??0,W));return e.style.height=`${G}px`,i.setAttribute("aria-valuenow",String(G)),a.onResize?.(p),p}function Z(r){if(r.button!==0||r.isPrimary===!1)return;n.cancel();const b=r.clientY,h=e.offsetHeight,p=e.style.height,N=i.getAttribute("aria-valuenow");a.onStart?.(r),n.start(r,{cursor:"ns-resize",onMove:W=>m(W.clientY,b,h),onEnd(W){const G=m(W.clientY,b,h);a.onEnd?.(G)},onCancel(){e.style.height=p,N!==null&&i.setAttribute("aria-valuenow",N),a.onCancel?.()}})}function u(r){if(!["ArrowUp","ArrowDown","Home","End"].includes(r.key)||r.key==="End"&&a.maxHeight===void 0)return;r.preventDefault(),n.cancel();const b=e.offsetHeight,h=(a.gridSize||10)*(r.shiftKey?5:1),p=r.key==="Home"?a.minHeight??0:r.key==="End"?a.maxHeight:b+(r.key==="ArrowUp"?-h:h);a.onStart?.(r);const N=m(p-b,0,b);a.onEnd?.(N)}i.addEventListener("pointerdown",Z),i.addEventListener("keydown",u),vi.set(e,()=>{n.cancel(),i.removeEventListener("pointerdown",Z),i.removeEventListener("keydown",u),Object.assign(i.style,s);for(const[r,b]of o)b===null?i.removeAttribute(r):i.setAttribute(r,b);c&&i.remove(),vi.delete(e)})}const FE={mounted:xr,unmounted(e){vi.get(e)?.()},updated(e,l){l.value!==l.oldValue&&(vi.get(e)?.(),xr(e,l))},getSSRProps(){return{}}};function Fi(e){return e==="richtext"?3:e==="textarea"||e==="json"||e==="radio"||e==="file"||e==="signature"?2:1}function h0(e){if(e.format)switch(e.format){case"email":return"email";case"tel":return"phone";case"uri":case"url":return"url";case"date":case"date-time":return"date"}if(e.enum)return"select";switch(e.type){case"number":case"integer":return"number";case"boolean":return"checkbox"}return"text"}function r5(e){if(!e?.properties)return[];const l=new Set(e.required??[]),a=[],n=Object.keys(e.properties),d=Array.isArray(e["x-property-order"])?e["x-property-order"].filter(i=>typeof i=="string"&&i in e.properties):[],c=[...new Set([...d,...n])];for(const i of c){const s=e.properties[i],o=s["x-field-type"]??h0(s),m={};s.minLength!==void 0&&(m.minLength=s.minLength),s.maxLength!==void 0&&(m.maxLength=s.maxLength),s.minimum!==void 0&&(m.min=s.minimum),s.maximum!==void 0&&(m.max=s.maximum),s.multipleOf!==void 0&&(m.step=s.multipleOf),s.pattern!==void 0&&(m.pattern=s.pattern),s["x-options"]?m.options=s["x-options"]:s.enum&&(m.options=s.enum.map(r=>({label:String(r),value:String(r)})));const Z=s["x-ui"]?.class,u={id:crypto.randomUUID(),key:i,type:o,label:s.title??i,placeholder:s["x-placeholder"],description:s.description,required:l.has(i)||void 0,colSpan:n0(Z)??12,colStart:d0(Z),rowStart:o0(Z),rowSpan:s0(Z)??Fi(o),mColSpan:c0(Z)??12,mColStart:i0(Z),mRowStart:m0(Z),mRowSpan:Z0(Z),class:u0(Z)||void 0,hideLabel:s["x-hide-label"]??!1,condition:s["x-ui"]?.condition||void 0,hidden:s["x-ui"]?.hidden||o==="hidden"||void 0,richTextVariant:s["x-rich-text-variant"],richTextHeight:s["x-rich-text-height"],markdownShowFormatting:s["x-markdown-show-formatting"],textareaRows:s["x-textarea-rows"],textareaAutoHeight:s["x-textarea-autoheight"],numberLayout:s["x-number-layout"],numberSpinner:s["x-number-spinner"]??!0,phoneOnlyCountries:Array.isArray(s["x-phone-only-countries"])?s["x-phone-only-countries"].join(", "):s["x-phone-only-countries"],selectMultiselect:s["x-select-multiselect"],selectSearchable:s["x-select-searchable"],fileMultiple:s["x-file-multiple"],fileHeight:s["x-file-height"],fileAccept:s["x-file-accept"],fileTheme:s["x-file-theme"],fileShowIcon:s["x-file-show-icon"]===!1?!1:void 0,fileIcon:s["x-file-icon"],dateEnableTime:s["x-date-enable-time"],dateMin:s["x-date-min"],dateMax:s["x-date-max"],rangeMulti:s["x-range-multi"],radioThin:s["x-radio-thin"],radioHideRadio:s["x-radio-hide-radio"],radioHideLabelWhenImage:s["x-radio-hide-label-when-image"],radioAlign:s["x-ui"]?.radioAlign??s["x-radio-align"],radioInline:s["x-radio-inline"],radioSize:s["x-radio-size"],radioTextAlign:s["x-ui"]?.radioTextAlign??s["x-radio-text-align"]??"center",textIcon:s["x-text-icon"],textIconStart:s["x-text-icon-start"],validation:Object.keys(m).length>0?m:void 0,defaultValue:s.default,content:s["x-field-type"]==="heading"?s.title:void 0};a.push(u)}return a}function kE(e,l={}){const a={},n=[];for(const c of e){const i={};if(c.type==="heading"||c.type==="divider")i.type="string",i.title=c.content||c.label,i["x-field-type"]=c.type;else{switch(c.type){case"text":case"textarea":case"richtext":case"markdown":case"email":case"phone":case"url":case"date":case"signature":case"color":case"hidden":i.type="string";break;case"file":c.fileMultiple===!0?(i.type="array",i.items={type:"string"}):i.type="string";break;case"number":case"range":i.type="number";break;case"checkbox":case"toggle":i.type="boolean";break;case"json":i.type="object";break;case"select":case"radio":i.type="string",c.validation?.options&&(i.enum=c.validation.options.map(m=>m.value));break}c.type==="email"&&(i.format="email"),c.type==="phone"&&(i.format="tel"),c.type==="url"&&(i.format="uri"),c.type==="date"&&(i.format=c.dateEnableTime?"date-time":"date"),c.type==="color"&&(i.format="color"),i.title=c.label,c.description&&(i.description=c.description),c.defaultValue!==void 0&&(i.default=c.defaultValue),c.type!=="text"&&(i["x-field-type"]=c.type),c.validation?.minLength!==void 0&&(i.minLength=c.validation.minLength),c.validation?.maxLength!==void 0&&(i.maxLength=c.validation.maxLength),c.validation?.min!==void 0&&(i.minimum=c.validation.min),c.validation?.max!==void 0&&(i.maximum=c.validation.max),c.validation?.step!==void 0&&(i.multipleOf=c.validation.step),c.validation?.pattern!==void 0&&(i.pattern=c.validation.pattern),c.required&&(n.push(c.key),c.type==="checkbox"&&(i.const=!0))}c.placeholder&&(i["x-placeholder"]=c.placeholder),c.validation?.options&&(i["x-options"]=c.validation.options);const s=c.rowSpan??Fi(c.type),o=a5(c.class,{colSpan:c.colSpan,colStart:c.colStart,rowStart:c.rowStart,rowSpan:l.freeGrid?s>1?s:void 0:s===Fi(c.type)?void 0:s,mColSpan:c.mColSpan,mColStart:c.mColStart,mRowStart:c.mRowStart,mRowSpan:c.mRowSpan});o&&(i["x-ui"]={...i["x-ui"],class:o}),c.condition&&(i["x-ui"]={...i["x-ui"],condition:c.condition}),c.hidden===!0&&(i["x-ui"]={...i["x-ui"],hidden:!0}),c.hideLabel===!0&&(i["x-hide-label"]=!0),c.richTextVariant&&(i["x-rich-text-variant"]=c.richTextVariant),c.richTextHeight!==void 0&&(i["x-rich-text-height"]=c.richTextHeight),c.markdownShowFormatting===!0&&(i["x-markdown-show-formatting"]=!0),c.textareaRows!==void 0&&(i["x-textarea-rows"]=c.textareaRows),c.textareaAutoHeight===!0&&(i["x-textarea-autoheight"]=!0),c.numberLayout&&c.numberLayout!=="default"&&(i["x-number-layout"]=c.numberLayout),c.numberSpinner===!1&&(i["x-number-spinner"]=!1),c.phoneOnlyCountries&&(i["x-phone-only-countries"]=c.phoneOnlyCountries),c.selectMultiselect===!0&&(i["x-select-multiselect"]=!0),c.selectSearchable===!0&&(i["x-select-searchable"]=!0),c.fileMultiple===!0&&(i["x-file-multiple"]=!0),c.fileHeight!==void 0&&(i["x-file-height"]=c.fileHeight),c.fileAccept&&(i["x-file-accept"]=c.fileAccept),c.fileTheme&&(i["x-file-theme"]=c.fileTheme),c.fileShowIcon===!1&&(i["x-file-show-icon"]=!1),c.fileIcon&&(i["x-file-icon"]=c.fileIcon),c.dateEnableTime===!0&&(i["x-date-enable-time"]=!0),c.dateMin&&(i["x-date-min"]=c.dateMin),c.dateMax&&(i["x-date-max"]=c.dateMax),c.rangeMulti===!0&&(i["x-range-multi"]=!0),c.radioThin===!0&&(i["x-radio-thin"]=!0),c.radioHideRadio===!0&&(i["x-radio-hide-radio"]=!0),c.radioHideLabelWhenImage===!0&&(i["x-radio-hide-label-when-image"]=!0),c.radioAlign&&(i["x-ui"]={...i["x-ui"],radioAlign:c.radioAlign}),c.radioInline===!0&&(i["x-radio-inline"]=!0),c.radioSize&&(i["x-radio-size"]=c.radioSize),c.radioTextAlign&&(i["x-ui"]={...i["x-ui"],radioTextAlign:c.radioTextAlign}),c.textIcon&&(i["x-text-icon"]=c.textIcon),c.textIconStart&&(i["x-text-icon-start"]=c.textIconStart),a[c.key]=i}const d={$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:a};return n.length>0&&(d.required=n),d}function Jm(e,l){if(typeof l!="string")return l;const a=l.trim();switch(e.type){case"checkbox":case"toggle":return a.toLowerCase()==="true"?!0:a.toLowerCase()==="false"?!1:l;case"number":case"range":{if(!a)return l;const n=Number(a);return Number.isNaN(n)?l:n}default:return l}}function fE(e,l){const a={};for(const n of e)if(!(n.type==="heading"||n.type==="divider")){if(l&&n.key in l){a[n.key]=Jm(n,l[n.key]);continue}if(n.defaultValue!==void 0){a[n.key]=Jm(n,n.defaultValue);continue}switch(n.type){case"checkbox":case"toggle":a[n.key]=!1;break;case"number":case"range":a[n.key]=n.validation?.min??0;break;default:a[n.key]=""}}return a}function jE(e,l){const a={};for(const n of e){if(n.type==="heading"||n.type==="divider"||n.type==="hidden"||n.hidden===!0)continue;const d=l[n.key];if(n.required&&(d==null||d==="")){a[n.key]=`${n.label} is required`;continue}if(d==null||d==="")continue;const c=n.validation;if(typeof d=="string"){if(c?.minLength!==void 0&&d.length<c.minLength){a[n.key]=`${n.label} must be at least ${c.minLength} characters`;continue}if(c?.maxLength!==void 0&&d.length>c.maxLength){a[n.key]=`${n.label} must be at most ${c.maxLength} characters`;continue}if(c?.pattern&&!new RegExp(c.pattern).test(d)){a[n.key]=`${n.label} format is invalid`;continue}}if(typeof d=="number"){if(c?.min!==void 0&&d<c.min){a[n.key]=`${n.label} must be at least ${c.min}`;continue}if(c?.max!==void 0&&d>c.max){a[n.key]=`${n.label} must be at most ${c.max}`;continue}}}return a}function JE(e){return{fields:(0,t.computed)(()=>r5(e.value))}}const CE=!0;var Oe=class{_type;_config;_condition;_hidden;_validations;_onUpdate;_class;_slots;_component;constructor(e,l={}){this._type=e,this._config=l}if(e){return this._condition=e,this}hidden(e=!0){return this._hidden=e,this}validate(e){return this._validations||(this._validations=[]),this._validations.push(e),this}onUpdate(e){return this._onUpdate=e,this}class(e){return this._class=this._class?`${this._class} ${e}`:e,this}required(e){return this._config.required=!0,e&&(this._config.requiredMessage=e),this}slot(e,l,a){return this._slots||(this._slots=[]),typeof e!="string"||l!==void 0&&typeof l!="string"?this._slots.push({component:e,props:l}):this._slots.push({name:e,component:l,props:a}),this}};function nl(e,l){return typeof e=="string"?{...l,label:e}:e??{}}const dl={text(e,l){return new Oe("text",nl(e,l))},email(e,l){return new Oe("email",nl(e,l))},password(e,l){return new Oe("password",nl(e,l))},number(e,l){return new Oe("number",nl(e,l))},tel(e,l){return new Oe("tel",nl(e,l))},url(e,l){return new Oe("url",nl(e,l))},date(e,l){return new Oe("date",nl(e,l))},time(e,l){return new Oe("time",nl(e,l))},datetime(e,l){return new Oe("datetime",nl(e,l))},textarea(e,l){return new Oe("textarea",nl(e,l))},richtext(e,l){return new Oe("richtext",nl(e,l))},json(e,l){const a=nl(e,l);return a.language||(a.language="json"),new Oe("json",a)},checkbox(e,l){return new Oe("checkbox",nl(e,l))},toggle(e,l){return new Oe("toggle",nl(e,l))},radio(e,l,a){if(typeof e=="string"){const n=e,d=l;return new Oe("radio",{...a,label:n,options:d})}return new Oe("radio",{...nl(l,a),options:e})},select(e,l,a){if(typeof e=="string"){const n=e,d=l;return new Oe("select",{...a,label:n,options:d})}return new Oe("select",{...nl(l,a),options:e})},multiselect(e,l,a){if(typeof e=="string"){const n=e,d=l;return new Oe("multiselect",{...a,label:n,options:d,multiple:!0})}return new Oe("multiselect",{...nl(l,a),options:e})},color(e,l){return new Oe("color",nl(e,l))},icon(e,l){return new Oe("icon",nl(e,l))},range(e,l){return new Oe("range",nl(e,l))},custom(e,l,a){return Wt(e)||Ns(e),new Oe(e,nl(l,a))},upload(e,l){return new Oe("upload",nl(e,l))},array(e,l,a){if(typeof e=="string"){const d=e,c=l;return new Oe("array",{...a??{},label:d,schema:c})}const n=e;return new Oe("array",{...nl(l,a),schema:n})},component(e,l={}){const a=new Oe("component",l);return a._component={component:e,props:l},a},display(e,l={}){const a=new Oe("display",l);return a._component={component:e,props:l},a}};var Cm=class b5{_isSchema=!0;_label;_fields;_condition;_class;constructor(l,a){this._fields=l,this._label=a}if(l){return this._condition=l,this}class(l){return this._class=this._class?`${this._class} ${l}`:l,this}defaults(l){for(const[a,n]of Object.entries(l))this._fields[a]&&this._fields[a]._config.default===void 0&&(this._fields[a]._config.default=n);return this}getDefaults(){const l={};for(const[a,n]of Object.entries(this._fields))n._config.default!==void 0&&(l[a]=n._config.default);return l}toJSONSchema(){const l={},a=[];for(const[c,i]of Object.entries(this._fields)){const s=i._config,o=Wt(i._type),m=o?.jsonSchema?.type??b5.getJSONSchemaType(i._type),Z={type:m};if(s.label&&(Z.title=s.label),s.helpText&&(Z.description=s.helpText),s.default!==void 0&&(Z.default=s.default),s.options){const b=s.options.map(h=>Wa(h)??h);i._type==="multiselect"?Z.items={type:"string",enum:b}:Z.enum=b}s.min!==void 0&&(Z[m==="string"?"minLength":"minimum"]=s.min),s.max!==void 0&&(Z[m==="string"?"maxLength":"maximum"]=s.max),i._type==="email"&&(Z.format="email"),i._type==="url"&&(Z.format="uri"),i._type==="date"&&(Z.format="date"),i._type==="time"&&(Z.format="time"),i._type==="datetime"&&(Z.format="date-time");const u={};i._type!=="text"&&(u.fieldType=i._type),o&&(Z["x-field-type"]=i._type),s.placeholder&&(u.placeholder=s.placeholder),s.disabled&&(u.disabled=s.disabled),s.readonly&&(u.readonly=s.readonly),s.autoheight&&(u.autoheight=s.autoheight),s.rows&&(u.rows=s.rows),s.cols&&(u.cols=s.cols),(i._type==="select"||i._type==="multiselect")&&s.searchable!==void 0&&(Z["x-select-searchable"]=s.searchable),i._class&&(u.class=i._class),i._condition&&(u.condition=i._condition),i._hidden&&(u.hidden=!0),i._type==="array"&&(s.allowAdd!==void 0&&(u.allowAdd=s.allowAdd),s.allowDelete!==void 0&&(u.allowDelete=s.allowDelete)),i._component&&(u.component=typeof i._component.component=="string"?i._component.component:i._component.component.name||"CustomComponent",i._component.props&&(u.componentProps=i._component.props)),Object.keys(u).length>0&&(Z["x-ui"]=u);const r=o?.jsonSchema?.serialize?.(s,{key:c,required:s.required===!0});r&&Object.assign(Z,r),l[c]=Z,s.required===!0&&a.push(c)}const n={type:"object",properties:l};a.length>0&&(n.required=a),this._label&&(n.title=this._label);const d={};return this._condition&&(d.condition=this._condition),this._class&&(d.class=this._class),Object.keys(d).length>0&&(n["x-ui"]=d),n}static getJSONSchemaType(l){return{text:"string",email:"string",password:"string",number:"number",tel:"string",url:"string",date:"string",time:"string",datetime:"string",textarea:"string",richtext:"string",json:"object",checkbox:"boolean",toggle:"boolean",radio:"string",select:"string",multiselect:"array",array:"array"}[l]||"string"}};function DE(e,l){if(typeof e=="string"){if(!l)throw new Error("Fields are required when providing a label");return new Cm(l,e)}return new Cm(e)}function UE(e){return e}function OE(e){return async(l,a)=>{if(!l.endpoint.startsWith("/")||l.endpoint.startsWith("//"))throw new Error("Form option endpoints must be same-origin paths");const n={};return l.searchParam&&a&&(n[l.searchParam]=a),l.limitParam&&l.limit!=null&&(n[l.limitParam]=l.limit),(await e.get(l.endpoint,{params:n})).data}}function Fc(e,l){return l?l.split(".").reduce((a,n)=>{if(!(a==null||typeof a!="object"))return a[n]},e):e}function zr(e,l){const a=Fc(e,l.itemsPath);return Array.isArray(a)?a.flatMap(n=>{const d=Fc(n,l.valuePath??"id"),c=Fc(n,l.labelPath??"name");if(d==null||c==null)return[];const i=l.subtitlePath?Fc(n,l.subtitlePath):void 0;return[{label:String(c),value:String(d),...i==null?{}:{subtitle:String(i)}}]}):[]}function Dm(e,l){const a={},n=new Set(e.required||[]);if(e.properties){const c=Object.keys(e.properties),i=Array.isArray(e["x-property-order"])?e["x-property-order"].filter(s=>typeof s=="string"&&s in e.properties):[];for(const s of new Set([...i,...c])){const o=e.properties[s];a[s]=KE(s,o,n.has(s),e,l?.loadOptionsSource)}}const d=new Cm(a,e.title);return e["x-ui"]?.condition&&d.if(e["x-ui"].condition),e["x-ui"]?.class&&d.class(e["x-ui"].class),d}function EE(e,l){const a=e.match(/^#\/(\$defs|definitions)\/(.+)$/);if(!a)return;const[,n,d]=a,c=n==="$defs"?l.$defs:l.definitions;return d?c?.[d]:void 0}function BE(e,l){const a=e.anyOf||e.oneOf;if(!a||a.length===0)return e;const n=a.filter(i=>i.type!=="null");if(n.length===1){const i=n[0];return{...i,...e,type:e.type??i.type,title:e.title||i.title,description:e.description||i.description,default:e.default!==void 0?e.default:i.default,"x-ui":{...i["x-ui"],...e["x-ui"]}}}const d=["object","array","string","number","integer","boolean"],c=n.sort((i,s)=>d.indexOf(i.type||"string")-d.indexOf(s.type||"string"))[0];return{...c,...e,type:e.type??c.type,title:e.title||c.title,description:e.description||c.description,default:e.default!==void 0?e.default:c.default,"x-ui":{...c["x-ui"],...e["x-ui"]}}}function KE(e,l,a,n,d){let c=l;if(l.$ref){const b=EE(l.$ref,n);b&&(c={...b,type:l.type??b.type,enum:l.enum??b.enum,title:l.title??b.title,description:l.description??b.description,default:l.default!==void 0?l.default:b.default,"x-ui":{...b["x-ui"],...l["x-ui"]}})}(c.anyOf||c.oneOf)&&(c=BE(c,n));const i=c["x-ui"]||{};let s=i.fieldType||c["x-field-type"]||wr(c);s==="select"&&c["x-select-multiselect"]&&(s="multiselect");const o=c["x-options"],m={},Z=Wt(s);c.title&&(m.label=c.title),c.description&&(m.helpText=c.description),c.default!==void 0&&(m.default=c.default),(a||i.required===!0)&&(m.required=!0),i.placeholder&&(m.placeholder=i.placeholder),c["x-placeholder"]&&(m.placeholder=c["x-placeholder"]),HE(m,c),Z?.settingsDefaults&&Object.assign(m,Z.settingsDefaults);const u=Z?.jsonSchema?.parse?.(c,{key:e,required:a||i.required===!0});if(u&&Object.assign(m,u),c["x-options-source"]){if(!d)throw new Error(`Field "${e}" requires an x-options-source loader`);const b=c["x-options-source"];let h;m.options=async p=>{const N=b.searchParam?zr(await d(b,p),b):h??=zr(await d(b,b.searchParam?p:""),b);if(b.searchParam||!p.trim())return N;const W=p.trim().toLocaleLowerCase();return N.filter(G=>[G.label,G.subtitle,G.value].some(Y=>Y?.toLocaleLowerCase().includes(W)))},c["x-select-searchable"]===void 0&&(m.searchable=!0)}i.radioAlign!==void 0&&(m.align=i.radioAlign),i.radioTextAlign!==void 0&&(m.textAlign=i.radioTextAlign),i.disabled&&(m.disabled=i.disabled),i.readonly&&(m.readonly=i.readonly),i.autoheight&&(m.autoheight=i.autoheight),i.rows&&(m.rows=i.rows),i.cols&&(m.cols=i.cols),c.minimum!==void 0&&(m.min=c.minimum),c.maximum!==void 0&&(m.max=c.maximum),c.minLength!==void 0&&(m.min=c.minLength),c.maxLength!==void 0&&(m.max=c.maxLength),c.pattern!==void 0&&(m.pattern=c.pattern);let r;switch(s){case"heading":r=new Oe("heading",m);break;case"divider":r=new Oe("divider",m);break;case"email":r=dl.email(m);break;case"password":r=dl.password(m);break;case"number":r=dl.number(m);break;case"tel":case"phone":r=dl.tel(m);break;case"url":r=dl.url(m);break;case"date":r=dl.date(m);break;case"time":r=dl.time(m);break;case"datetime":r=dl.datetime(m);break;case"textarea":r=dl.textarea(m);break;case"richtext":r=dl.richtext(m);break;case"json":r=dl.json(m);break;case"checkbox":r=dl.checkbox(m);break;case"toggle":r=dl.toggle(m);break;case"radio":r=dl.radio(o??c.enum??[],m);break;case"select":r=dl.select(m.options??o??c.enum??[],m);break;case"multiselect":r=dl.multiselect(m.options??o??c.enum??[],m);break;case"icon":r=dl.icon(m);break;case"file":case"upload":r=dl.upload(m);break;case"array":{const b={...m};i.allowAdd!==void 0&&(b.allowAdd=i.allowAdd),i.allowDelete!==void 0&&(b.allowDelete=i.allowDelete),c.items?.type&&(b.itemType=wr(c.items)),r=dl.array(c.title||e,void 0,b);break}case"display":r=dl.display(i.component||"div",i.componentProps||{});break;case"component":r=dl.component(i.component||"div",i.componentProps||{});break;default:Z?r=new Oe(s,m):Gs(s)?(Ns(s),m.missingCustomRegistration=!0,r=new Oe(s,m)):r=dl.text(m);break}if(i.component&&s!=="component"&&s!=="display"&&(r._component={component:i.component,props:i.componentProps||{}}),c.const!==void 0&&r.validate(b=>b===c.const?!0:m.requiredMessage||"form.required"),c.pattern){const b=new RegExp(c.pattern);r.validate(h=>h==null||h===""||b.test(String(h))?!0:"form.pattern")}return i.class&&r.class(i.class),i.condition&&r.if(i.condition),i.hidden&&r.hidden(),r}function HE(e,l){const a=l,n=(i,s)=>{a[s]!==void 0&&(e[i]=a[s])};a["x-radio-inline"]&&(e.inline=!0),a["x-radio-thin"]&&(e.thin=!0),a["x-radio-hide-radio"]&&(e.hideRadio=!0),a["x-radio-hide-label-when-image"]&&(e.hideLabelWhenImage=!0),n("align","x-radio-align"),n("textAlign","x-radio-text-align"),a["x-select-multiselect"]&&(e.multiple=!0),n("searchable","x-select-searchable"),n("rows","x-textarea-rows"),n("autoheight","x-textarea-autoheight"),n("layout","x-number-layout"),a["x-number-spinner"]===!1&&(e.spinner=!1),typeof a["x-phone-only-countries"]=="string"?e.onlyCountries=a["x-phone-only-countries"].split(",").map(i=>i.trim()).filter(Boolean):Array.isArray(a["x-phone-only-countries"])&&(e.onlyCountries=a["x-phone-only-countries"]),n("defaultCountry","x-phone-default-country"),a["x-range-multi"]&&(e.multiRange=!0),a["x-file-multiple"]&&(e.multiple=!0);const d=a["x-file-height"];d!==void 0&&(e.height=typeof d=="number"?`${d}px`:d),n("accept","x-file-accept"),n("theme","x-file-theme"),a["x-file-show-icon"]===!1&&(e.showIcon=!1),n("icon","x-file-icon"),a["x-date-enable-time"]&&(e.enableTime=!0),n("min","x-date-min"),n("max","x-date-max"),n("icon","x-text-icon"),n("iconStart","x-text-icon-start");const c=a["x-rich-text-variant"];c==="basic"?e.basic=!0:c==="simple"&&(e.simple=!0),n("height","x-rich-text-height"),a["x-markdown-show-formatting"]&&(e.showFormatting=!0),a["x-hide-label"]===!0&&(e.hideLabel=!0)}function wr(e){if(e.format)switch(e.format){case"email":return"email";case"uri":return"url";case"date":return"date";case"time":return"time";case"date-time":return"datetime"}if(e.enum)return"select";switch(e.type){case"boolean":return"checkbox";case"number":case"integer":return"number";case"array":return"array";case"object":return"json";default:return"text"}}var PE={class:"multi-step-form"},QE={class:"step-progress"},AE=["onClick"],_E={class:"step-number"},$E={class:"step-label"},qE={key:0},eB={key:0,class:"step-title"},lB={key:1,class:"validation-errors"},tB={class:"step-navigation"},aB=["disabled"],nB={class:"step-counter"},dB=(0,t.defineComponent)({__name:"MultiStepForm",props:{schema:{},modelValue:{},currentStep:{},components:{},validateOnNext:{type:Boolean,default:!0}},emits:["update:modelValue","update:currentStep","stepChange","complete","validationError"],setup(e,{expose:l,emit:a}){const n=e,d=a,{$t:c}=tl(),i=(0,t.useSlots)(),s=(0,t.computed)(()=>Object.keys(i)),o=(0,t.ref)({...n.modelValue||{}}),m=(0,t.ref)(n.currentStep!=null&&n.currentStep!==""?n.currentStep:Object.keys(n.schema)[0]);let Z=!1;(0,t.watch)(()=>n.modelValue,g=>{Z||(o.value={...g||{}})},{deep:!0}),(0,t.watch)(o,g=>{Z=!0,d("update:modelValue",g),setTimeout(()=>{Z=!1},0)},{deep:!0}),(0,t.watch)(()=>n.currentStep,g=>{g!=null&&(m.value=g)}),(0,t.watch)(m,g=>{d("update:currentStep",g),d("stepChange",g)});function u(g,C){const E=C.split(".");let _=g;for(const $ of E)_=_?.[$];return _}function r(g,C){if(!g)return!0;try{const E=Fd(g);if(E.length===0)return!0;let _=!0,$=null;for(let f=0;f<E.length;f++){const U=E[f],Q=u(C,U.field),{op:w,value:K,connector:O}=U;let R=!1;switch(w){case"eq":R=Q===K;break;case"ne":R=Q!==K;break;case"gt":R=K!=null&&Q>K;break;case"ge":R=K!=null&&Q>=K;break;case"lt":R=K!=null&&Q<K;break;case"le":R=K!=null&&Q<=K;break;case"co":R=K!=null&&String(Q).includes(String(K));break;case"sw":R=K!=null&&String(Q).startsWith(String(K));break;case"ew":R=K!=null&&String(Q).endsWith(String(K));break;case"pr":R=Q!=null;break;default:R=!1}f===0?(_=R,$=R):(O==="or"?_=($??!1)||R:O==="and"&&(_=($??!1)&&R),$=_)}return _}catch{return!0}}function b(g){return g._condition==null?!0:r(g._condition,o.value)}const h=(0,t.computed)(()=>Object.entries(n.schema).filter(([,g])=>b(g)).map(([g,C])=>({key:g,schema:C}))),p=(0,t.computed)(()=>h.value.findIndex(g=>g.key===m.value)),N=(0,t.computed)(()=>p.value===0),W=(0,t.computed)(()=>p.value===h.value.length-1),G=(0,t.computed)(()=>h.value[p.value]?.schema),Y=(0,t.ref)({});function L(g){return g._hidden?!1:g._condition==null?!0:r(g._condition,o.value)}function X(g){const C=g.replace(/\[(\d+)\]/g,".$1");return u(o.value,C)}function T(g){return!!(g==null||typeof g=="string"&&g.trim()===""||Array.isArray(g)&&g.length===0)}function V(){if(!n.validateOnNext||G.value==null)return!0;const g={},C=G.value._fields;for(const[E,_]of Object.entries(C)){if(_._type==="display"||!L(_))continue;const $=X(E),f=_._config;if(f.required===!0&&T($)){g[E]=`${typeof f.label=="string"?f.label:E} is required`;continue}if(_._validations&&!T($))for(const U of _._validations){const Q=U($);if(Q!==!0){g[E]=Q;break}}}return Y.value=g,Object.keys(g).length>0?(d("validationError",g),!1):!0}function y(g,C){return C._label!=null?C._label:g.split(/[._-]/).map(E=>E.charAt(0).toUpperCase()+E.slice(1)).join(" ")}function x(g){const C=h.value.findIndex(E=>E.key===g);if(C!==-1){if(C<p.value){m.value=g,Y.value={};return}C>p.value&&!V()||(m.value=g)}}function M(){if(V())if(W.value)d("complete");else{const g=p.value+1;m.value=h.value[g].key,Y.value={}}}function F(){if(!N.value){const g=p.value-1;m.value=h.value[g].key,Y.value={}}}return l({validateCurrentStep:V,stepErrors:Y,nextStep:M,prevStep:F,goToStep:x,visibleSteps:h,activeStep:m,currentStepIndex:p,isFirstStep:N,isLastStep:W}),(g,C)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",PE,[(0,t.createElementVNode)("div",QE,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(h.value,(E,_)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:E.key,class:(0,t.normalizeClass)(["step-indicator",{active:E.key===m.value,completed:_<p.value}]),onClick:$=>x(E.key)},[(0,t.createElementVNode)("div",_E,(0,t.toDisplayString)(_+1),1),(0,t.createElementVNode)("div",$E,(0,t.toDisplayString)(y(E.key,E.schema)),1)],10,AE))),128))]),G.value!=null?((0,t.openBlock)(),(0,t.createElementBlock)("div",qE,[G.value._label?((0,t.openBlock)(),(0,t.createElementBlock)("h2",eB,(0,t.toDisplayString)(G.value._label),1)):(0,t.createCommentVNode)("",!0),Object.keys(Y.value).length>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",lB,[(0,t.createElementVNode)("ul",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(Y.value,(E,_)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:_},(0,t.toDisplayString)(E),1))),128))])])):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(g.$slots,`step:${m.value}`,{schema:G.value,formData:o.value,stepKey:m.value,errors:Y.value},()=>[(0,t.createVNode)(Ls,{modelValue:o.value,"onUpdate:modelValue":C[0]||(C[0]=E=>o.value=E),schema:G.value,components:e.components,errors:Y.value},(0,t.createSlots)({_:2},[(0,t.renderList)(s.value,E=>({name:E,fn:(0,t.withCtx)(_=>[(0,t.renderSlot)(g.$slots,E,(0,t.normalizeProps)((0,t.guardReactiveProps)(_)),void 0,!0)])}))]),1032,["modelValue","schema","components","errors"])],!0)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",tB,[(0,t.createElementVNode)("button",{type:"button",class:"btn-secondary",disabled:N.value,onClick:F},(0,t.toDisplayString)((0,t.unref)(c)("multiStep.previous")),9,aB),(0,t.createElementVNode)("div",nB,(0,t.toDisplayString)((0,t.unref)(c)("multiStep.step",{current:p.value+1,total:h.value.length})),1),(0,t.createElementVNode)("button",{type:"button",class:"btn-primary",onClick:M},(0,t.toDisplayString)(W.value?(0,t.unref)(c)("multiStep.complete"):(0,t.unref)(c)("multiStep.next")),1)])]))}}),cB=Ye(dB,[["__scopeId","data-v-7a55f4bb"]]);function iB(){return{steps:[],transitions:[]}}function sB(e){return!!e&&e.steps.length>1}function Md(e,l){if(l!=null)return e.steps.find(a=>a.key===l)}function h5(e,l){return e.transitions.filter(a=>a.from===l)}function oB(e){const l=e.schema?.properties;return l&&typeof l=="object"?Object.entries(l):[]}function p5(e){return e?.autoAdvance===!0}function W5(e){if(!e)return null;const l=oB(e);return l.length===1?l[0][0]:null}function ki(e){return e.startId&&Md(e,e.startId)?e.startId:e.steps[0]?.key}function Xs(e,l,a){for(const n of h5(e,l))if(!n.condition||n.condition.trim()===""||L2(n.condition,a))return n.to;return null}function mB(e,l,a){return Xs(e,l,a)===null}function Um(e,l,a){const n=ki(e);if(!n||!l)return 0;const d=new Set;let c=n,i=0,s=0,o=!1;for(;c&&!d.has(c);)d.add(c),s++,o||(c===l?o=!0:i++),c=Xs(e,c,a);return s<=1?o?100:0:Math.round(i/(s-1)*100)}function ZB(e){const l={},a=[];for(const d of e.steps){const c=d.schema?.properties;c&&typeof c=="object"&&Object.assign(l,c);const i=d.schema?.required;if(Array.isArray(i))for(const s of i)a.includes(s)||a.push(s)}const n={type:"object",properties:l};return a.length&&(n.required=a),n}var uB={class:"form-flow-player"},rB={class:"ffp-stage"},bB={key:0,class:"ffp-title"},hB={key:1,class:"ffp-empty"},pB={class:"ffp-nav flex flex-center gap-1"},WB={key:0,class:"ffp-counter flex-center round bg-primary-10 color-primary px-075 txt13 medium tabular-nums"},GB=(0,t.defineComponent)({__name:"FormFlowPlayer",props:{structure:{},modelValue:{},components:{},formName:{default:""},animated:{type:Boolean,default:!0},autoAdvance:{type:Boolean,default:!0},autoAdvanceDelay:{default:200},redirect:{type:Boolean,default:!0},hideTitle:{type:Boolean,default:!1},hideCounter:{type:Boolean,default:!1},onComplete:{},beforePrimary:{},loadOptionsSource:{}},emits:["update:modelValue","stepChange","progress","stepEnter","stepComplete","formComplete","redirect","complete"],setup(e,{expose:l,emit:a}){const n=e,d=a,{$t:c}=tl(),i=(0,t.useSlots)(),s=(0,t.computed)(()=>Object.keys(i).filter(U=>U!=="nav"&&U!=="primary-label"&&U!=="step"&&U!=="empty")),o=(0,t.ref)("next"),m=(0,t.computed)(()=>n.animated?o.value==="prev"?"ffp-slide-prev":"ffp-slide-next":""),Z=(0,t.ref)({...n.modelValue||{}});(0,t.watch)(Z,U=>d("update:modelValue",U),{deep:!0}),(0,t.watch)(()=>n.modelValue,U=>{U&&U!==Z.value&&(Z.value={...U})},{deep:!0});const u=(0,t.ref)(ki(n.structure)),r=(0,t.ref)([]);(0,t.watch)(()=>n.structure,()=>{u.value=ki(n.structure),r.value=[]},{deep:!0}),(0,t.watch)(u,U=>{U&&d("stepChange",U)},{immediate:!0});const b=(0,t.computed)(()=>Md(n.structure,u.value??null));function h(U){const Q=Md(n.structure,U),w=Um(n.structure,U,Z.value),K=r.value.length+1,O=w>0?Math.round(K/w*100):null;return{formName:n.formName,stepKey:U,stepTitle:Q?.title??"",stepIndex:K,totalSteps:O,skipSubmit:Q?.skipSubmit??!1,formData:{...Z.value}}}(0,t.watch)(u,(U,Q)=>{U&&U!==Q&&d("stepEnter",h(U))},{immediate:!0});const p=(0,t.computed)(()=>{const U=b.value;return U?Dm(U.schema,{loadOptionsSource:n.loadOptionsSource}):null}),N=(0,t.computed)(()=>Object.assign({},...n.structure.steps.map(U=>Dm(U.schema,{loadOptionsSource:n.loadOptionsSource})._fields))),W=(0,t.computed)(()=>u.value?Xs(n.structure,u.value,Z.value):null),G=(0,t.computed)(()=>W.value===null),Y=(0,t.computed)(()=>r.value.length>0),L=(0,t.computed)(()=>Um(n.structure,u.value,Z.value));(0,t.watch)(L,U=>d("progress",U),{immediate:!0});const X=(0,t.ref)(null),T=(0,t.ref)(!1);function V(U){X.value=U}function y(){return X.value?.validate()??!0}async function x(){if(!y())return;const U=b.value;if(await n.beforePrimary?.({data:{...Z.value},currentStep:U,isTerminal:G.value})===!1)return;if(G.value){T.value=!0;try{const w=a0(N.value,Z.value);U?.skipSubmit||await n.onComplete?.(w),u.value&&d("formComplete",h(u.value)),d("complete",{...Z.value});const K=U?.redirectUrl?.trim();K&&(d("redirect",K),n.redirect&&typeof window<"u"&&window.location.assign(K))}finally{T.value=!1}return}const Q=W.value;if(Q&&u.value){const w=Md(n.structure,Q);d("stepComplete",{...h(u.value),destinationStepKey:Q,destinationStepTitle:w?.title??""}),o.value="next",r.value.push(u.value),u.value=Q}}const M=(0,t.computed)(()=>n.autoAdvance&&p5(b.value)),F=(0,t.computed)(()=>W5(b.value));let g=null;const C=(0,t.ref)(null);function E(){g&&(clearTimeout(g),g=null)}const _=(0,t.ref)(F.value?Z.value[F.value]:void 0);(0,t.watch)(u,()=>{E(),C.value=null,_.value=F.value?Z.value[F.value]:void 0},{flush:"sync"}),(0,t.watch)(()=>F.value?Z.value[F.value]:void 0,U=>{M.value&&C.value!==u.value&&(!(U!=null&&U!=="")||U===_.value||(E(),g=setTimeout(()=>{M.value&&(C.value=u.value??null,x())},n.autoAdvanceDelay)))});function $(){const U=r.value.pop();U&&(o.value="prev",u.value=U)}const f=(0,t.computed)(()=>r.value.length+1);return l({formData:Z,currentKey:u,nextKey:W,isTerminal:G,progress:L,validateStep:y}),(U,Q)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",uB,[(0,t.createElementVNode)("div",rB,[(0,t.createVNode)(t.Transition,{name:m.value,mode:"out-in"},{default:(0,t.withCtx)(()=>[b.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:u.value,class:"ffp-step"},[!e.hideTitle&&b.value.title?((0,t.openBlock)(),(0,t.createElementBlock)("h2",bB,(0,t.toDisplayString)(b.value.title),1)):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(U.$slots,"step",{step:b.value,formData:Z.value,stepKey:u.value,schema:p.value,setFormRef:V},()=>[p.value?((0,t.openBlock)(),(0,t.createBlock)(Ls,{key:0,ref_key:"formRef",ref:X,modelValue:Z.value,"onUpdate:modelValue":Q[0]||(Q[0]=w=>Z.value=w),schema:p.value,components:e.components},(0,t.createSlots)({_:2},[(0,t.renderList)(s.value,w=>({name:w,fn:(0,t.withCtx)(K=>[(0,t.renderSlot)(U.$slots,w,(0,t.normalizeProps)((0,t.guardReactiveProps)(K)),void 0,!0)])}))]),1032,["modelValue","schema","components"])):(0,t.createCommentVNode)("",!0)],!0)])):((0,t.openBlock)(),(0,t.createElementBlock)("div",hB,[(0,t.renderSlot)(U.$slots,"empty",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.empty")??"No steps to display."),1)],!0)]))]),_:3},8,["name"])]),(0,t.renderSlot)(U.$slots,"nav",{canGoBack:Y.value,isTerminal:G.value,submitting:T.value,goBack:$,goPrimary:x,stepPosition:f.value,progress:L.value,currentKey:u.value,primaryLabel:b.value?.primaryLabel,autoAdvances:M.value},()=>[(0,t.createElementVNode)("div",pB,[(0,t.createVNode)(oe,{class:"ffp-nav-btn",flat:"",icon:"arrow_back",value:(0,t.unref)(c)?.("multiStep.previous")??"Back",disabled:!Y.value,onClick:$},null,8,["value","disabled"]),e.hideCounter?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("span",WB,(0,t.toDisplayString)(f.value),1)),G.value?((0,t.openBlock)(),(0,t.createBlock)(oe,{key:1,class:"ffp-nav-btn",value:b.value?.primaryLabel||(0,t.unref)(c)?.("multiStep.complete")||"Submit",loading:T.value,onClick:x},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(U.$slots,"primary-label",{isTerminal:!0},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.complete")??"Submit"),1)],!0)]),_:3},8,["value","loading"])):((0,t.openBlock)(),(0,t.createBlock)(oe,{key:2,class:"ffp-nav-btn","icon-end":"arrow_forward",value:(0,t.unref)(c)?.("multiStep.next")??"Next",disabled:T.value,onClick:x},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(U.$slots,"primary-label",{isTerminal:!1},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.next")??"Next"),1)],!0)]),_:3},8,["value","disabled"]))])],!0)]))}}),NB=Ye(GB,[["__scopeId","data-v-f3affd6b"]]);function st(e){var l;return((l=e.ownerDocument)==null?void 0:l.defaultView)||window}function Jt(e){return st(e).getComputedStyle(e)}var gr=Math.min,Vd=Math.max,fi=Math.round;function G5(e){const l=Jt(e);let a=parseFloat(l.width),n=parseFloat(l.height);const d=e.offsetWidth,c=e.offsetHeight,i=fi(a)!==d||fi(n)!==c;return i&&(a=d,n=c),{width:a,height:n,fallback:i}}function Ta(e){return Y5(e)?(e.nodeName||"").toLowerCase():""}var kc;function N5(){if(kc)return kc;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(kc=e.brands.map((l=>l.brand+"/"+l.version)).join(" "),kc):navigator.userAgent}function Ct(e){return e instanceof st(e).HTMLElement}function La(e){return e instanceof st(e).Element}function Y5(e){return e instanceof st(e).Node}function Rr(e){return typeof ShadowRoot>"u"?!1:e instanceof st(e).ShadowRoot||e instanceof ShadowRoot}function ys(e){const{overflow:l,overflowX:a,overflowY:n,display:d}=Jt(e);return/auto|scroll|overlay|hidden|clip/.test(l+n+a)&&!["inline","contents"].includes(d)}function YB(e){return["table","td","th"].includes(Ta(e))}function Om(e){const l=/firefox/i.test(N5()),a=Jt(e),n=a.backdropFilter||a.WebkitBackdropFilter;return a.transform!=="none"||a.perspective!=="none"||!!n&&n!=="none"||l&&a.willChange==="filter"||l&&!!a.filter&&a.filter!=="none"||["transform","perspective"].some((d=>a.willChange.includes(d)))||["paint","layout","strict","content"].some((d=>{const c=a.contain;return c!=null&&c.includes(d)}))}function L5(){return!/^((?!chrome|android).)*safari/i.test(N5())}function p0(e){return["html","body","#document"].includes(Ta(e))}function X5(e){return La(e)?e:e.contextElement}var y5={x:1,y:1};function Sn(e){const l=X5(e);if(!Ct(l))return y5;const a=l.getBoundingClientRect(),{width:n,height:d,fallback:c}=G5(l);let i=(c?fi(a.width):a.width)/n,s=(c?fi(a.height):a.height)/d;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}function Od(e,l,a,n){var d,c;l===void 0&&(l=!1),a===void 0&&(a=!1);const i=e.getBoundingClientRect(),s=X5(e);let o=y5;l&&(n?La(n)&&(o=Sn(n)):o=Sn(e));const m=s?st(s):window,Z=!L5()&&a;let u=(i.left+(Z&&((d=m.visualViewport)==null?void 0:d.offsetLeft)||0))/o.x,r=(i.top+(Z&&((c=m.visualViewport)==null?void 0:c.offsetTop)||0))/o.y,b=i.width/o.x,h=i.height/o.y;if(s){const p=st(s),N=n&&La(n)?st(n):n;let W=p.frameElement;for(;W&&n&&N!==p;){const G=Sn(W),Y=W.getBoundingClientRect(),L=getComputedStyle(W);Y.x+=(W.clientLeft+parseFloat(L.paddingLeft))*G.x,Y.y+=(W.clientTop+parseFloat(L.paddingTop))*G.y,u*=G.x,r*=G.y,b*=G.x,h*=G.y,u+=Y.x,r+=Y.y,W=st(W).frameElement}}return{width:b,height:h,top:r,right:u+b,bottom:r+h,left:u,x:u,y:r}}function Xa(e){return((Y5(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ms(e){return La(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function M5(e){return Od(Xa(e)).left+Ms(e).scrollLeft}function Ed(e){if(Ta(e)==="html")return e;const l=e.assignedSlot||e.parentNode||Rr(e)&&e.host||Xa(e);return Rr(l)?l.host:l}function V5(e){const l=Ed(e);return p0(l)?l.ownerDocument.body:Ct(l)&&ys(l)?l:V5(l)}function ji(e,l){var a;l===void 0&&(l=[]);const n=V5(e),d=n===((a=e.ownerDocument)==null?void 0:a.body),c=st(n);return d?l.concat(c,c.visualViewport||[],ys(n)?n:[]):l.concat(n,ji(n))}function Sr(e,l,a){return l==="viewport"?Ea((function(n,d){const c=st(n),i=Xa(n),s=c.visualViewport;let o=i.clientWidth,m=i.clientHeight,Z=0,u=0;if(s){o=s.width,m=s.height;const r=L5();(r||!r&&d==="fixed")&&(Z=s.offsetLeft,u=s.offsetTop)}return{width:o,height:m,x:Z,y:u}})(e,a)):La(l)?Ea((function(n,d){const c=Od(n,!0,d==="fixed"),i=c.top+n.clientTop,s=c.left+n.clientLeft,o=Ct(n)?Sn(n):{x:1,y:1};return{width:n.clientWidth*o.x,height:n.clientHeight*o.y,x:s*o.x,y:i*o.y}})(l,a)):Ea((function(n){const d=Xa(n),c=Ms(n),i=n.ownerDocument.body,s=Vd(d.scrollWidth,d.clientWidth,i.scrollWidth,i.clientWidth),o=Vd(d.scrollHeight,d.clientHeight,i.scrollHeight,i.clientHeight);let m=-c.scrollLeft+M5(n);const Z=-c.scrollTop;return Jt(i).direction==="rtl"&&(m+=Vd(d.clientWidth,i.clientWidth)-s),{width:s,height:o,x:m,y:Z}})(Xa(e)))}function vr(e){return Ct(e)&&Jt(e).position!=="fixed"?e.offsetParent:null}function Fr(e){const l=st(e);let a=vr(e);for(;a&&YB(a)&&Jt(a).position==="static";)a=vr(a);return a&&(Ta(a)==="html"||Ta(a)==="body"&&Jt(a).position==="static"&&!Om(a))?l:a||(function(n){let d=Ed(n);for(;Ct(d)&&!p0(d);){if(Om(d))return d;d=Ed(d)}return null})(e)||l}function LB(e,l,a){const n=Ct(l),d=Xa(l),c=Od(e,!0,a==="fixed",l);let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(n||!n&&a!=="fixed")if((Ta(l)!=="body"||ys(d))&&(i=Ms(l)),Ct(l)){const o=Od(l,!0);s.x=o.x+l.clientLeft,s.y=o.y+l.clientTop}else d&&(s.x=M5(d));return{x:c.left+i.scrollLeft-s.x,y:c.top+i.scrollTop-s.y,width:c.width,height:c.height}}var XB={getClippingRect:function(e){let{element:l,boundary:a,rootBoundary:n,strategy:d}=e;const c=[...a==="clippingAncestors"?(function(o,m){const Z=m.get(o);if(Z)return Z;let u=ji(o).filter((p=>La(p)&&Ta(p)!=="body")),r=null;const b=Jt(o).position==="fixed";let h=b?Ed(o):o;for(;La(h)&&!p0(h);){const p=Jt(h),N=Om(h);(b?N||r:N||p.position!=="static"||!r||!["absolute","fixed"].includes(r.position))?r=p:u=u.filter((W=>W!==h)),h=Ed(h)}return m.set(o,u),u})(l,this._c):[].concat(a),n],i=c[0],s=c.reduce(((o,m)=>{const Z=Sr(l,m,d);return o.top=Vd(Z.top,o.top),o.right=gr(Z.right,o.right),o.bottom=gr(Z.bottom,o.bottom),o.left=Vd(Z.left,o.left),o}),Sr(l,i,d));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:l,offsetParent:a,strategy:n}=e;const d=Ct(a),c=Xa(a);if(a===c)return l;let i={scrollLeft:0,scrollTop:0},s={x:1,y:1};const o={x:0,y:0};if((d||!d&&n!=="fixed")&&((Ta(a)!=="body"||ys(c))&&(i=Ms(a)),Ct(a))){const m=Od(a);s=Sn(a),o.x=m.x+a.clientLeft,o.y=m.y+a.clientTop}return{width:l.width*s.x,height:l.height*s.y,x:l.x*s.x-i.scrollLeft*s.x+o.x,y:l.y*s.y-i.scrollTop*s.y+o.y}},isElement:La,getDimensions:function(e){return Ct(e)?G5(e):e.getBoundingClientRect()},getOffsetParent:Fr,getDocumentElement:Xa,getScale:Sn,async getElementRects(e){let{reference:l,floating:a,strategy:n}=e;const d=this.getOffsetParent||Fr,c=this.getDimensions;return{reference:LB(l,await d(a),n),floating:{x:0,y:0,...await c(a)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Jt(e).direction==="rtl"},yB=(e,l,a)=>{const n=new Map,d={platform:XB,...a},c={...d.platform,_c:n};return Y1(e,l,{...d,platform:c})};function T5(e,l){for(const a in l)Object.prototype.hasOwnProperty.call(l,a)&&(typeof l[a]=="object"&&e[a]?T5(e[a],l[a]):e[a]=l[a])}var Lt={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function Bd(e,l){let a=Lt.themes[e]||{},n;do n=a[l],typeof n>"u"?a.$extend?a=Lt.themes[a.$extend]||{}:(a=null,n=Lt[l]):a=null;while(a);return n}function MB(e){const l=[e];let a=Lt.themes[e]||{};do a.$extend&&!a.$resetCss?(l.push(a.$extend),a=Lt.themes[a.$extend]||{}):a=null;while(a);return l.map(n=>`v-popper--theme-${n}`)}function kr(e){const l=[e];let a=Lt.themes[e]||{};do a.$extend?(l.push(a.$extend),a=Lt.themes[a.$extend]||{}):a=null;while(a);return l}var Dn=!1;if(typeof window<"u"){Dn=!1;try{const e=Object.defineProperty({},"passive",{get(){Dn=!0}});window.addEventListener("test",null,e)}catch{}}var I5=!1;typeof window<"u"&&typeof navigator<"u"&&(I5=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);var x5=["auto","top","bottom","left","right"].reduce((e,l)=>e.concat([l,`${l}-start`,`${l}-end`]),[]),fr={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},jr={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Jr(e,l){const a=e.indexOf(l);a!==-1&&e.splice(a,1)}function Xo(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}var Gt=[],Fa=null,Cr={};function Dr(e){let l=Cr[e];return l||(l=Cr[e]=[]),l}var Em=function(){};typeof window<"u"&&(Em=window.Element);function De(e){return function(l){return Bd(l.theme,e)}}var yo="__floating-vue__popper",z5=()=>(0,t.defineComponent)({name:"VPopper",provide(){return{[yo]:{parentPopper:this}}},inject:{[yo]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:De("disabled")},positioningDisabled:{type:Boolean,default:De("positioningDisabled")},placement:{type:String,default:De("placement"),validator:e=>x5.includes(e)},delay:{type:[String,Number,Object],default:De("delay")},distance:{type:[Number,String],default:De("distance")},skidding:{type:[Number,String],default:De("skidding")},triggers:{type:Array,default:De("triggers")},showTriggers:{type:[Array,Function],default:De("showTriggers")},hideTriggers:{type:[Array,Function],default:De("hideTriggers")},popperTriggers:{type:Array,default:De("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:De("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:De("popperHideTriggers")},container:{type:[String,Object,Em,Boolean],default:De("container")},boundary:{type:[String,Em],default:De("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:De("strategy")},autoHide:{type:[Boolean,Function],default:De("autoHide")},handleResize:{type:Boolean,default:De("handleResize")},instantMove:{type:Boolean,default:De("instantMove")},eagerMount:{type:Boolean,default:De("eagerMount")},popperClass:{type:[String,Array,Object],default:De("popperClass")},computeTransformOrigin:{type:Boolean,default:De("computeTransformOrigin")},autoMinSize:{type:Boolean,default:De("autoMinSize")},autoSize:{type:[Boolean,String],default:De("autoSize")},autoMaxSize:{type:Boolean,default:De("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:De("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:De("preventOverflow")},overflowPadding:{type:[Number,String],default:De("overflowPadding")},arrowPadding:{type:[Number,String],default:De("arrowPadding")},arrowOverflow:{type:Boolean,default:De("arrowOverflow")},flip:{type:Boolean,default:De("flip")},shift:{type:Boolean,default:De("shift")},shiftCrossAxis:{type:Boolean,default:De("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:De("noAutoFocus")},disposeTimeout:{type:Number,default:De("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[yo])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,l;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((l=this.popperShowTriggers)==null?void 0:l.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,l)=>(e[l]="$_computePosition",e),{})},created(){this.autoMinSize,this.autoMaxSize},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:l=!1,force:a=!1}={}){var n,d;(n=this.parentPopper)!=null&&n.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(a||!this.disabled)&&(((d=this.parentPopper)==null?void 0:d.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,l),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:l=!1}={}){var a;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:l}),this.parentPopper.lockedChild=null)},1e3));return}((a=this.parentPopper)==null?void 0:a.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,l),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(l=>l.nodeType===l.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(y1({mainAxis:this.distance,crossAxis:this.skidding}));const l=this.placement.startsWith("auto");if(l?e.middleware.push(L1({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(M1({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!l&&this.flip&&e.middleware.push(X1({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(FI({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:n,rects:d,middlewareData:c})=>{let i;const{centerOffset:s}=c.arrow;return n.startsWith("top")||n.startsWith("bottom")?i=Math.abs(s)>d.reference.width/2:i=Math.abs(s)>d.reference.height/2,{data:{overflow:i}}}}),this.autoMinSize||this.autoSize){const n=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:d,placement:c,middlewareData:i})=>{var s;if((s=i.autoSize)!=null&&s.skip)return{};let o,m;return c.startsWith("top")||c.startsWith("bottom")?o=d.reference.width:m=d.reference.height,this.$_innerNode.style[n==="min"?"minWidth":n==="max"?"maxWidth":"width"]=o!=null?`${o}px`:null,this.$_innerNode.style[n==="min"?"minHeight":n==="max"?"maxHeight":"height"]=m!=null?`${m}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(JI({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:n,availableHeight:d})=>{this.$_innerNode.style.maxWidth=n!=null?`${n}px`:null,this.$_innerNode.style.maxHeight=d!=null?`${d}px`:null}})));const a=await yB(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:a.x,y:a.y,placement:a.placement,strategy:a.strategy,arrow:{...a.middlewareData.arrow,...a.middlewareData.arrowOverflow}})},$_scheduleShow(e,l=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),Fa&&this.instantMove&&Fa.instantMove&&Fa!==this.parentPopper){Fa.$_applyHide(!0),this.$_applyShow(!0);return}l?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,l=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(Fa=this),l?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const l=this.delay;return parseInt(l&&l[e]||l||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await Xo(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...ji(this.$_referenceNode),...ji(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const l=this.$_referenceNode.getBoundingClientRect(),a=this.$_popperNode.querySelector(".v-popper__wrapper"),n=a.parentNode.getBoundingClientRect(),d=l.x+l.width/2-(n.left+a.offsetLeft),c=l.y+l.height/2-(n.top+a.offsetTop);this.result.transformOrigin=`${d}px ${c}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let l;for(let a=0;a<Gt.length;a++)l=Gt[a],l.showGroup!==e&&(l.hide(),l.$emit("close-group"))}Gt.push(this),document.body.classList.add("v-popper--some-open");for(const l of kr(this.theme))Dr(l).push(this),document.body.classList.add(`v-popper--some-open--${l}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await Xo(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Jr(Gt,this),Gt.length===0&&document.body.classList.remove("v-popper--some-open");for(const a of kr(this.theme)){const n=Dr(a);Jr(n,this),n.length===0&&document.body.classList.remove(`v-popper--some-open--${a}`)}Fa===this&&(Fa=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const l=this.disposeTimeout;l!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},l)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await Xo(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=a=>{this.isShown&&!this.$_hideInProgress||(a.usedByTooltip=!0,!this.$_preventShow&&this.show({event:a}))};this.$_registerTriggerListeners(this.$_targetNodes,fr,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],fr,this.popperTriggers,this.popperShowTriggers,e);const l=a=>{a.usedByTooltip||this.hide({event:a})};this.$_registerTriggerListeners(this.$_targetNodes,jr,this.triggers,this.hideTriggers,l),this.$_registerTriggerListeners([this.$_popperNode],jr,this.popperTriggers,this.popperHideTriggers,l)},$_registerEventListeners(e,l,a){this.$_events.push({targetNodes:e,eventType:l,handler:a}),e.forEach(n=>n.addEventListener(l,a,Dn?{passive:!0}:void 0))},$_registerTriggerListeners(e,l,a,n,d){let c=a;n!=null&&(c=typeof n=="function"?n(c):n),c.forEach(i=>{const s=l[i];s&&this.$_registerEventListeners(e,s,d)})},$_removeEventListeners(e){const l=[];this.$_events.forEach(a=>{const{targetNodes:n,eventType:d,handler:c}=a;!e||e===d?n.forEach(i=>i.removeEventListener(d,c)):l.push(a)}),this.$_events=l},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,l=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),l&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,l){for(const a of this.$_targetNodes){const n=a.getAttribute(e);n&&(a.removeAttribute(e),a.setAttribute(l,n))}},$_applyAttrsToTarget(e){for(const l of this.$_targetNodes)for(const a in e){const n=e[a];n==null?l.removeAttribute(a):l.setAttribute(a,n)}},$_updateParentShownChildren(e){let l=this.parentPopper;for(;l;)e?l.shownChildren.add(this.randomId):(l.shownChildren.delete(this.randomId),l.pendingHide&&l.hide()),l=l.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(Td>=e.left&&Td<=e.right&&Id>=e.top&&Id<=e.bottom){const l=this.$_popperNode.getBoundingClientRect(),a=Td-ua,n=Id-ra,d=l.left+l.width/2-ua+(l.top+l.height/2)-ra+l.width+l.height,c=ua+a*d,i=ra+n*d;return fc(ua,ra,c,i,l.left,l.top,l.left,l.bottom)||fc(ua,ra,c,i,l.left,l.top,l.right,l.top)||fc(ua,ra,c,i,l.right,l.top,l.right,l.bottom)||fc(ua,ra,c,i,l.left,l.bottom,l.right,l.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(I5){const e=Dn?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",l=>Ur(l,!0),e),document.addEventListener("touchend",l=>Or(l,!0),e)}else window.addEventListener("mousedown",e=>Ur(e,!1),!0),window.addEventListener("click",e=>Or(e,!1),!0);window.addEventListener("resize",TB)}function Ur(e,l){if(Lt.autoHideOnMousedown)w5(e,l);else for(let a=0;a<Gt.length;a++){const n=Gt[a];try{n.mouseDownContains=n.popperNode().contains(e.target)}catch{}}}function Or(e,l){Lt.autoHideOnMousedown||w5(e,l)}function w5(e,l){const a={};for(let n=Gt.length-1;n>=0;n--){const d=Gt[n];try{const c=d.containsGlobalTarget=d.mouseDownContains||d.popperNode().contains(e.target);d.pendingHide=!1,requestAnimationFrame(()=>{if(d.pendingHide=!1,!a[d.randomId]&&Er(d,c,e)){if(d.$_handleGlobalClose(e,l),!e.closeAllPopover&&e.closePopover&&c){let s=d.parentPopper;for(;s;)a[s.randomId]=!0,s=s.parentPopper;return}let i=d.parentPopper;for(;i&&Er(i,i.containsGlobalTarget,e);)i.$_handleGlobalClose(e,l),i=i.parentPopper}})}catch{}}}function Er(e,l,a){return a.closeAllPopover||a.closePopover&&l||VB(e,a)&&!l}function VB(e,l){if(typeof e.autoHide=="function"){const a=e.autoHide(l);return e.lastAutoHide=a,a}return e.autoHide}function TB(){for(let e=0;e<Gt.length;e++)Gt[e].$_computePosition()}var ua=0,ra=0,Td=0,Id=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{ua=Td,ra=Id,Td=e.clientX,Id=e.clientY},Dn?{passive:!0}:void 0);function fc(e,l,a,n,d,c,i,s){const o=((i-d)*(l-c)-(s-c)*(e-d))/((s-c)*(a-e)-(i-d)*(n-l)),m=((a-e)*(l-c)-(n-l)*(e-d))/((s-c)*(a-e)-(i-d)*(n-l));return o>=0&&o<=1&&m>=0&&m<=1}var IB={extends:z5()},Vs=(e,l)=>{const a=e.__vccOpts||e;for(const[n,d]of l)a[n]=d;return a};function xB(e,l,a,n,d,c){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{ref:"reference",class:(0,t.normalizeClass)(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[(0,t.renderSlot)(e.$slots,"default",(0,t.normalizeProps)((0,t.guardReactiveProps)(e.slotData)))],2)}var zB=Vs(IB,[["render",xB]]);function wB(){var e=window.navigator.userAgent,l=e.indexOf("MSIE ");if(l>0)return parseInt(e.substring(l+5,e.indexOf(".",l)),10);if(e.indexOf("Trident/")>0){var a=e.indexOf("rv:");return parseInt(e.substring(a+3,e.indexOf(".",a)),10)}var n=e.indexOf("Edge/");return n>0?parseInt(e.substring(n+5,e.indexOf(".",n)),10):-1}var ai;function Bm(){Bm.init||(Bm.init=!0,ai=wB()!==-1)}var Ts={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Bm(),(0,t.nextTick)(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",ai&&this.$el.appendChild(e),e.data="about:blank",ai||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!ai&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}},gB=(0,t.withScopeId)("data-v-b329ee4c");(0,t.pushScopeId)("data-v-b329ee4c");var RB={class:"resize-observer",tabindex:"-1"};(0,t.popScopeId)();Ts.render=gB((e,l,a,n,d,c)=>((0,t.openBlock)(),(0,t.createBlock)("div",RB)));Ts.__scopeId="data-v-b329ee4c";Ts.__file="src/components/ResizeObserver.vue";var g5=(e="theme")=>({computed:{themeClass(){return MB(this[e])}}}),SB=(0,t.defineComponent)({name:"VPopperContent",components:{ResizeObserver:Ts},mixins:[g5()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),vB=["id","aria-hidden","tabindex","data-popper-placement"],FB={ref:"inner",class:"v-popper__inner"},kB=[(0,t.createElementVNode)("div",{class:"v-popper__arrow-outer"},null,-1),(0,t.createElementVNode)("div",{class:"v-popper__arrow-inner"},null,-1)];function fB(e,l,a,n,d,c){const i=(0,t.resolveComponent)("ResizeObserver");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{id:e.popperId,ref:"popover",class:(0,t.normalizeClass)(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:(0,t.normalizeStyle)(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:l[2]||(l[2]=(0,t.withKeys)(s=>e.autoHide&&e.$emit("hide"),["esc"]))},[(0,t.createElementVNode)("div",{class:"v-popper__backdrop",onClick:l[0]||(l[0]=s=>e.autoHide&&e.$emit("hide"))}),(0,t.createElementVNode)("div",{class:"v-popper__wrapper",style:(0,t.normalizeStyle)(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[(0,t.createElementVNode)("div",FB,[e.mounted?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)("div",null,[(0,t.renderSlot)(e.$slots,"default")]),e.handleResize?((0,t.openBlock)(),(0,t.createBlock)(i,{key:0,onNotify:l[1]||(l[1]=s=>e.$emit("resize",s))})):(0,t.createCommentVNode)("",!0)],64)):(0,t.createCommentVNode)("",!0)],512),(0,t.createElementVNode)("div",{ref:"arrow",class:"v-popper__arrow-container",style:(0,t.normalizeStyle)(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},kB,4)],4)],46,vB)}var R5=Vs(SB,[["render",fB]]),S5={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}},Km=function(){};typeof window<"u"&&(Km=window.Element);var jB=(0,t.defineComponent)({name:"VPopperWrapper",components:{Popper:zB,PopperContent:R5},mixins:[S5,g5("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,Km,Boolean],default:void 0},boundary:{type:[String,Km],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function JB(e,l,a,n,d,c){const i=(0,t.resolveComponent)("PopperContent"),s=(0,t.resolveComponent)("Popper");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:l[0]||(l[0]=()=>e.$emit("show")),onHide:l[1]||(l[1]=()=>e.$emit("hide")),"onUpdate:shown":l[2]||(l[2]=o=>e.$emit("update:shown",o)),onApplyShow:l[3]||(l[3]=()=>e.$emit("apply-show")),onApplyHide:l[4]||(l[4]=()=>e.$emit("apply-hide")),onCloseGroup:l[5]||(l[5]=()=>e.$emit("close-group")),onCloseDirective:l[6]||(l[6]=()=>e.$emit("close-directive")),onAutoHide:l[7]||(l[7]=()=>e.$emit("auto-hide")),onResize:l[8]||(l[8]=()=>e.$emit("resize"))}),{default:(0,t.withCtx)(({popperId:o,isShown:m,shouldMountContent:Z,skipTransition:u,autoHide:r,show:b,hide:h,handleResize:p,onResize:N,classes:W,result:G})=>[(0,t.renderSlot)(e.$slots,"default",{shown:m,show:b,hide:h}),(0,t.createVNode)(i,{ref:"popperContent","popper-id":o,theme:e.finalTheme,shown:m,mounted:Z,"skip-transition":u,"auto-hide":r,"handle-resize":p,classes:W,result:G,onHide:h,onResize:N},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"popper",{shown:m,hide:h})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}var W0=Vs(jB,[["render",JB]]),CB={...W0,name:"VDropdown",vPopperTheme:"dropdown"},DB={...W0,name:"VMenu",vPopperTheme:"menu"},UB={...W0,name:"VTooltip",vPopperTheme:"tooltip"},OB=(0,t.defineComponent)({name:"VTooltipDirective",components:{Popper:z5(),PopperContent:R5},mixins:[S5],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>Bd(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>Bd(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const l=++this.$_fetchId,a=this.content(this);a.then?a.then(n=>this.onResult(l,n)):this.onResult(l,a)}},onResult(e,l){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=l)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),EB=["innerHTML"],BB=["textContent"];function KB(e,l,a,n,d,c){const i=(0,t.resolveComponent)("PopperContent"),s=(0,t.resolveComponent)("Popper");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({ref:"popper"},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:(0,t.withCtx)(({popperId:o,isShown:m,shouldMountContent:Z,skipTransition:u,autoHide:r,hide:b,handleResize:h,onResize:p,classes:N,result:W})=>[(0,t.createVNode)(i,{ref:"popperContent",class:(0,t.normalizeClass)({"v-popper--tooltip-loading":e.loading}),"popper-id":o,theme:e.theme,shown:m,mounted:Z,"skip-transition":u,"auto-hide":r,"handle-resize":h,classes:N,result:W,onHide:b,onResize:p},{default:(0,t.withCtx)(()=>[e.html?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,innerHTML:e.finalContent},null,8,EB)):((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,textContent:(0,t.toDisplayString)(e.finalContent)},null,8,BB))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}var HB=Vs(OB,[["render",KB]]),v5="v-popper--has-tooltip";function PB(e,l){let a=e.placement;if(!a&&l)for(const n of x5)l[n]&&(a=n);return a||(a=Bd(e.theme||"tooltip","placement")),a}function F5(e,l,a){let n;const d=typeof l;return d==="string"?n={content:l}:l&&d==="object"?n=l:n={content:!1},n.placement=PB(n,a),n.targetNodes=()=>[e],n.referenceNode=()=>e,n}var Mo,Kd,QB=0;function AB(){if(Mo)return;Kd=(0,t.ref)([]),Mo=(0,t.createApp)({name:"VTooltipDirectiveApp",setup(){return{directives:Kd}},render(){return this.directives.map(l=>(0,t.h)(HB,{...l.options,shown:l.shown||l.options.shown,key:l.id}))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),Mo.mount(e)}function _B(e,l,a){AB();const n=(0,t.ref)(F5(e,l,a)),d=(0,t.ref)(!1),c={id:QB++,options:n,shown:d};return Kd.value.push(c),e.classList&&e.classList.add(v5),e.$_popper={options:n,item:c,show(){d.value=!0},hide(){d.value=!1}}}function k5(e){if(e.$_popper){const l=Kd.value.indexOf(e.$_popper.item);l!==-1&&Kd.value.splice(l,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(v5)}function Br(e,{value:l,modifiers:a}){const n=F5(e,l,a);if(!n.content||Bd(n.theme||"tooltip","disabled"))k5(e);else{let d;e.$_popper?(d=e.$_popper,d.options.value=n):d=_B(e,l,a),typeof l.shown<"u"&&l.shown!==e.$_popperOldShown&&(e.$_popperOldShown=l.shown,l.shown?d.show():d.hide())}}var $B={beforeMount:Br,updated:Br,beforeUnmount(e){k5(e)}};function Kr(e){e.addEventListener("mousedown",Ji),e.addEventListener("click",Ji),e.addEventListener("touchstart",f5,Dn?{passive:!0}:!1)}function Hr(e){e.removeEventListener("mousedown",Ji),e.removeEventListener("click",Ji),e.removeEventListener("touchstart",f5),e.removeEventListener("touchend",j5),e.removeEventListener("touchcancel",J5)}function Ji(e){const l=e.currentTarget;e.closePopover=!l.$_vclosepopover_touch,e.closeAllPopover=l.$_closePopoverModifiers&&!!l.$_closePopoverModifiers.all}function f5(e){if(e.changedTouches.length===1){const l=e.currentTarget;l.$_vclosepopover_touch=!0,l.$_vclosepopover_touchPoint=e.changedTouches[0],l.addEventListener("touchend",j5),l.addEventListener("touchcancel",J5)}}function j5(e){const l=e.currentTarget;if(l.$_vclosepopover_touch=!1,e.changedTouches.length===1){const a=e.changedTouches[0],n=l.$_vclosepopover_touchPoint;e.closePopover=Math.abs(a.screenY-n.screenY)<20&&Math.abs(a.screenX-n.screenX)<20,e.closeAllPopover=l.$_closePopoverModifiers&&!!l.$_closePopoverModifiers.all}}function J5(e){const l=e.currentTarget;l.$_vclosepopover_touch=!1}var qB={beforeMount(e,{value:l,modifiers:a}){e.$_closePopoverModifiers=a,(typeof l>"u"||l)&&Kr(e)},updated(e,{value:l,oldValue:a,modifiers:n}){e.$_closePopoverModifiers=n,l!==a&&(typeof l>"u"||l?Kr(e):Hr(e))},beforeUnmount(e){Hr(e)}};function eK(e,l={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,T5(Lt,l),e.directive("tooltip",$B),e.directive("close-popper",qB),e.component("VTooltip",UB),e.component("VDropdown",CB),e.component("VMenu",DB))}var lK={version:"5.2.2",install:eK,options:Lt},tK=["src"],aK=(0,t.defineComponent)({__name:"LightboxImage",props:{src:{}},setup(e){const l=e,{imageSrc:a}=e0(()=>l.src);return(n,d)=>((0,t.openBlock)(),(0,t.createElementBlock)("img",{draggable:!1,src:(0,t.unref)(a),alt:"Preview",class:"lightbox-image"},null,8,tK))}}),nK=aK,dK={key:0,class:"center"},cK={key:3},iK={class:"bgl-lightbox-item"},sK={key:2,class:"lightbox-pdf"},oK=["src","title"],mK={key:3,class:"lightbox-file"},ZK={class:"file-info txt-white flex m_block align-items-start gap-025"},uK={class:"txt-start"},rK={class:"mx-0 light"},bK={class:"semi word-break-all"},hK={class:"mx-0"},pK={class:"semi"},WK=(0,t.defineComponent)({__name:"Lightbox",setup(e,{expose:l}){const a=(0,t.ref)(!1),n=(0,t.ref)(null),d=(0,t.ref)([]),c=(0,t.ref)(0),i=(0,t.computed)(()=>d.value[c.value]),s=(0,t.ref)(1),o=(0,t.computed)(()=>s.value===1),m=(0,t.computed)(()=>({allowTouchMove:s.value===1,touchRatio:s.value===1?1:0,simulateTouch:s.value===1}));function Z(b,h){a.value=!0,d.value=h||[b],c.value=d.value.findIndex(p=>{const N=b.src!==void 0&&b.src!==null&&b.src!==""&&p.src===b.src,W=b.pathKey!==void 0&&b.pathKey!==null&&b.pathKey!==""&&p.pathKey===b.pathKey;return N||W}),c.value===-1&&(c.value=0),s.value=1}function u(){a.value=!1}bs(u,a);function r(b){c.value=b,s.value=1}return(0,t.watch)(()=>a.value,async b=>{b?(document.body.style.overflow="hidden",await(0,t.nextTick)(),n.value?.open||n.value?.showModal()):(document.body.style.overflow="",n.value?.open&&n.value.close())}),(0,t.watch)(()=>c.value,()=>{s.value=1}),l({open:Z,close:u}),(b,h)=>((0,t.openBlock)(),(0,t.createBlock)(t.Transition,{name:"fade"},{default:(0,t.withCtx)(()=>[a.value?((0,t.openBlock)(),(0,t.createElementBlock)("dialog",{key:0,ref_key:"dialogRef",ref:n,class:"bgl-lightbox-overlay",onCancel:(0,t.withModifiers)(u,["prevent"])},[(0,t.createElementVNode)("div",{class:"flex start w-100 space-between p-025 z-9",onClick:u},[(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"close",onClick:u}),i.value?.enableZoom&&i.value?.type==="image"?((0,t.openBlock)(),(0,t.createElementBlock)("div",dK,[(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"remove",disabled:s.value===1,onClick:h[0]||(h[0]=p=>s.value--)},null,8,["disabled"]),(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"zoom_in",disabled:s.value===1,onClick:h[1]||(h[1]=p=>s.value=1)},null,8,["disabled"]),(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"add",disabled:s.value===3,onClick:h[2]||(h[2]=p=>s.value++)},null,8,["disabled"])])):(0,t.createCommentVNode)("",!0),i.value?.openFile&&i.value?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:1,class:"color-white",round:"",thin:"",flat:"",iconEnd:"arrow_outward",value:"$t:lightbox.openFile",href:i.value?.src,target:"_blank"},null,8,["href"])):(0,t.createCommentVNode)("",!0),i.value?.download&&i.value?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:2,class:"color-white",round:"",thin:"",flat:"",icon:"download",value:"Download File",onClick:h[3]||(h[3]=p=>(0,t.unref)(q2)(i.value?.src))})):(0,t.createCommentVNode)("",!0),!i.value?.openFile&&!i.value?.download?((0,t.openBlock)(),(0,t.createElementBlock)("div",cK)):(0,t.createCommentVNode)("",!0)]),d.value&&d.value.length>0?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Gp),{key:0,index:c.value,"onUpdate:index":h[6]||(h[6]=p=>c.value=p),items:d.value,"initial-slide":c.value,class:(0,t.normalizeClass)(["bgl-lightbox-swiper",{zoomed:s.value>1}]),navigation:d.value.length>1,"grab-cursor":o.value,keyboard:!0,loop:!1,speed:400,"slides-per-view":1,"space-between":0,effect:"slide","advanced-options":m.value,onClick:h[7]||(h[7]=(0,t.withModifiers)(()=>{},["stop"]))},{default:(0,t.withCtx)(({item:p})=>[(0,t.createElementVNode)("div",iK,[p.type==="image"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Np),{key:0,zoom:s.value,"onUpdate:zoom":h[4]||(h[4]=N=>s.value=N),disabled:!p?.enableZoom,"mouse-wheel-to-zoom":!1,"double-click-to-zoom":!0,"max-scale":5,"min-scale":1,"aspect-ratio":0,"limit-translation":!0,onClick:h[5]||(h[5]=(0,t.withModifiers)(()=>{},["stop"]))},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(nK,{src:p?.src},null,8,["src"])]),_:2},1032,["zoom","disabled"])):p?.type==="video"&&p?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(h2),{key:1,src:p?.src,autoplay:"",controls:"",class:"lightbox-video"},null,8,["src"])):p?.type==="pdf"&&p?.src?((0,t.openBlock)(),(0,t.createElementBlock)("div",sK,[(0,t.createElementVNode)("embed",{src:(0,t.unref)($2)(p?.src),type:"application/pdf",title:p?.name},null,8,oK)])):((0,t.openBlock)(),(0,t.createElementBlock)("div",mK,[(0,t.createElementVNode)("div",ZK,[(0,t.createVNode)((0,t.unref)(Le),{class:"m-0 m_none",icon:"draft",size:10,weight:"12"}),(0,t.createVNode)((0,t.unref)(Le),{class:"m-0 none m_block m_-mb-1",icon:"draft",size:4,weight:"2"}),(0,t.createElementVNode)("div",uK,[(0,t.createElementVNode)("p",rK,[h[9]||(h[9]=(0,t.createTextVNode)(" File: ",-1)),(0,t.createElementVNode)("span",bK,(0,t.toDisplayString)(p?.name),1)]),(0,t.createElementVNode)("p",hK,[h[10]||(h[10]=(0,t.createTextVNode)(" Type: ",-1)),(0,t.createElementVNode)("span",pK,(0,t.toDisplayString)(p?.type),1)]),(0,t.createVNode)((0,t.unref)(oe),{href:p?.src,target:"_blank",round:"",thin:"",class:"mt-1",value:"Open file"},null,8,["href"])])])]))])]),"prev-button":(0,t.withCtx)(({prev:p})=>[(0,t.createVNode)((0,t.unref)(oe),{icon:"arrow_back",color:"black",onClick:p},null,8,["onClick"])]),"next-button":(0,t.withCtx)(({next:p})=>[(0,t.createVNode)((0,t.unref)(oe),{icon:"arrow_forward",color:"black",onClick:p},null,8,["onClick"])]),_:1},8,["index","items","initial-slide","class","navigation","grab-cursor","advanced-options"])):(0,t.createCommentVNode)("",!0),d.value&&d.value.length>1?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,class:"lightbox-thumbnails",onClick:h[8]||(h[8]=(0,t.withModifiers)(()=>{},["stop"]))},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(d.value,(p,N)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:N},[p.type==="image"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Sd),{key:0,class:(0,t.normalizeClass)(["thumbnail",{active:c.value===N}]),src:p.src,alt:"",onClick:(0,t.withModifiers)(W=>r(N),["stop"])},null,8,["src","class","onClick"])):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Le),{key:1,class:(0,t.normalizeClass)(["thumbnail thumbnail-icon",{active:c.value===N}]),icon:"description",onClick:(0,t.withModifiers)(W=>r(N),["stop"])},null,8,["class","onClick"]))],64))),128))])):(0,t.createCommentVNode)("",!0)],544)):(0,t.createCommentVNode)("",!0)]),_:1}))}}),GK=WK,rd={},rn=e=>{},NK={mounted(e,l){Pr(Hm(l,e)),rn=a=>{Qr(a,e,l)},e.addEventListener("click",rn)},updated(e,l){Pr(Hm(l,e)),e.removeEventListener("click",rn),rn=a=>{Qr(a,e,l)},e.addEventListener("click",rn)},unmounted(e){e.removeEventListener("click",rn)},getSSRProps(){return{}}};function Pr(e){e.group&&(rd[e.group]||(rd[e.group]=[]),rd[e.group].findIndex(l=>l.src===e.src)===-1&&rd[e.group].push(e))}function Qr(e,l,a){e.stopPropagation();const n=Hm(a,l),d=MK();if(!d||!d.open)return;const c=d.open;c(n,n&&n.group?rd[n.group]:void 0)}function Hm(e,l){let{group:a,src:n,type:d,name:c,thumbnail:i,enableZoom:s,openFile:o,download:m,pathKey:Z}=e.value||{};return n=dt(n||Z)||e.value||l.getAttribute("src")||"",d=d||yK(n),c=c||XK(n)||l.getAttribute("alt")||"",{src:n,type:d,name:c,thumbnail:i,group:a,enableZoom:s,openFile:o,download:m}}var YK=/youtube\.com|youtu\.be/,LK=/vimeo\.com/;function XK(e){return!e||typeof e!="string"?"":(e.split("/").pop()||"").replace(/\.[^/.]+$/,"")}function yK(e){if(typeof e!="string"||!e)return"unknown";if(e.startsWith("blob:")||/^data:image\//i.test(e))return"image";if(/^data:video\//i.test(e))return"video";const l=(e.split(".").pop()||"").toLowerCase(),a=e.split("?")[0].split(".").pop()?.toLowerCase()||"";return hi.test(l)||hi.test(a)?"image":C1.test(l)||YK.test(e)||LK.test(e)?"video":["pdf"].includes(l)?"pdf":l??"unknown"}var Vo;function MK(){if(!(typeof document>"u")){if(!Vo){const e=document.createElement("div");document.body.prepend(e),Vo=(0,t.createApp)(GK).mount(e)}return Vo}}var VK={install(e){e.directive("lightbox",NK)}},TK=VK,IK={beforeMount(e,l){e.clickOutsideEvent=a=>{e===a.target||e.contains(a.target)||l.value(a)},document.addEventListener("click",e.clickOutsideEvent)},unmounted(e){document.removeEventListener("click",e.clickOutsideEvent)}},C5=$d.__export({EventBus:()=>zs,POSITION:()=>Pd,TYPE:()=>Dl,createToastInterface:()=>Qd,default:()=>aW,globalEventBus:()=>G0,provideToast:()=>bH,toastInjectionKey:()=>ws,useToast:()=>tW},1),xK=Object.defineProperty,Ar=Object.getOwnPropertySymbols,zK=Object.prototype.hasOwnProperty,wK=Object.prototype.propertyIsEnumerable,_r=(e,l,a)=>l in e?xK(e,l,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[l]=a,D5=(e,l)=>{for(var a in l||(l={}))zK.call(l,a)&&_r(e,a,l[a]);if(Ar)for(var a of Ar(l))wK.call(l,a)&&_r(e,a,l[a]);return e},Is=e=>typeof e=="function",xs=e=>typeof e=="string",U5=e=>xs(e)&&e.trim().length>0,gK=e=>typeof e=="number",Oa=e=>typeof e>"u",Hd=e=>typeof e=="object"&&e!==null,RK=e=>Dt(e,"tag")&&U5(e.tag),O5=e=>window.TouchEvent&&e instanceof TouchEvent,E5=e=>Dt(e,"component")&&B5(e.component),SK=e=>Is(e)||Hd(e),B5=e=>!Oa(e)&&(xs(e)||SK(e)||E5(e)),$r=e=>Hd(e)&&["height","width","right","left","top","bottom"].every(l=>gK(e[l])),Dt=(e,l)=>(Hd(e)||Is(e))&&l in e,vK=(e=>()=>e++)(0);function To(e){return O5(e)?e.targetTouches[0].clientX:e.clientX}function qr(e){return O5(e)?e.targetTouches[0].clientY:e.clientY}var FK=e=>{Oa(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},rc=e=>E5(e)?rc(e.component):RK(e)?(0,t.defineComponent)({render(){return e}}):typeof e=="string"?e:(0,t.toRaw)((0,t.unref)(e)),kK=e=>{if(typeof e=="string")return e;const l=Dt(e,"props")&&Hd(e.props)?e.props:{},a=Dt(e,"listeners")&&Hd(e.listeners)?e.listeners:{};return{component:rc(e),props:l,listeners:a}},fK=()=>typeof window<"u",zs=class{constructor(){this.allHandlers={}}getHandlers(e){return this.allHandlers[e]||[]}on(e,l){const a=this.getHandlers(e);a.push(l),this.allHandlers[e]=a}off(e,l){const a=this.getHandlers(e);a.splice(a.indexOf(l)>>>0,1)}emit(e,l){this.getHandlers(e).forEach(a=>a(l))}},jK=e=>["on","off","emit"].every(l=>Dt(e,l)&&Is(e[l])),Dl;(function(e){e.SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.INFO="info",e.DEFAULT="default"})(Dl||(Dl={}));var Pd;(function(e){e.TOP_LEFT="top-left",e.TOP_CENTER="top-center",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_CENTER="bottom-center",e.BOTTOM_RIGHT="bottom-right"})(Pd||(Pd={}));var _l;(function(e){e.ADD="add",e.DISMISS="dismiss",e.UPDATE="update",e.CLEAR="clear",e.UPDATE_DEFAULTS="update_defaults"})(_l||(_l={}));var ea="Vue-Toastification",bt={type:{type:String,default:Dl.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},eb={type:bt.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},jc={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:bt.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},Io={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},lb={transition:{type:[Object,String],default:`${ea}__bounce`}},na={CORE_TOAST:{position:{type:String,default:Pd.TOP_RIGHT},draggable:bt.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:bt.trueBoolean,pauseOnHover:bt.trueBoolean,closeOnClick:bt.trueBoolean,timeout:Io.timeout,hideProgressBar:Io.hideProgressBar,toastClassName:bt.classNames,bodyClassName:bt.classNames,icon:eb.customIcon,closeButton:jc.component,closeButtonClassName:jc.classNames,showCloseButtonOnHover:jc.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new zs}},TOAST:{id:{type:[String,Number],required:!0,default:0},type:bt.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},CONTAINER:{container:{type:[Object,Function],default:()=>document.body},newestOnTop:bt.trueBoolean,maxToasts:{type:Number,default:20},transition:lb.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:bt.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},PROGRESS_BAR:Io,ICON:eb,TRANSITION:lb,CLOSE_BUTTON:jc},K5=(0,t.defineComponent)({name:"VtProgressBar",props:na.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${ea}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function JK(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{style:(0,t.normalizeStyle)(e.style),class:(0,t.normalizeClass)(e.cpClass)},null,6)}K5.render=JK;var CK=K5,H5=(0,t.defineComponent)({name:"VtCloseButton",props:na.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?rc(this.component):"button"},classes(){const e=[`${ea}__close-button`];return this.showOnHover&&e.push("show-on-hover"),e.concat(this.classNames)}}}),DK=(0,t.createTextVNode)(" × ");function UK(e,l){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.buttonComponent),(0,t.mergeProps)({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:(0,t.withCtx)(()=>[DK]),_:1},16,["aria-label","class"])}H5.render=UK;var OK=H5,P5={},EK={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},BK=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1)];function KK(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",EK,BK)}P5.render=KK;var HK=P5,Q5={},PK={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},QK=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1)];function AK(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",PK,QK)}Q5.render=AK;var tb=Q5,A5={},_K={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},$K=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];function qK(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",_K,$K)}A5.render=qK;var eH=A5,_5={},lH={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},tH=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];function aH(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",lH,tH)}_5.render=aH;var nH=_5,$5=(0,t.defineComponent)({name:"VtIcon",props:na.ICON,computed:{customIconChildren(){return Dt(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return xs(this.customIcon)?this.trimValue(this.customIcon):Dt(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Dt(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:B5(this.customIcon)?rc(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[Dl.DEFAULT]:tb,[Dl.INFO]:tb,[Dl.SUCCESS]:HK,[Dl.ERROR]:nH,[Dl.WARNING]:eH}[this.type]},iconClasses(){const e=[`${ea}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,l=""){return U5(e)?e.trim():l}}});function dH(e,l){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.component),{class:(0,t.normalizeClass)(e.iconClasses)},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.customIconChildren),1)]),_:1},8,["class"])}$5.render=dH;var q5=(0,t.defineComponent)({name:"VtToast",components:{ProgressBar:CK,CloseButton:OK,Icon:$5},inheritAttrs:!1,props:Object.assign({},na.CORE_TOAST,na.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const e=[`${ea}__toast`,`${ea}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push("disable-transition"),this.rtl&&e.push(`${ea}__toast--rtl`),e},bodyClasses(){return[`${ea}__toast-${xs(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return $r(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:Dt,getVueComponentFromObj:rc,closeToast(){this.eventBus.emit(_l.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const e=this.$el;e.addEventListener("touchstart",this.onDragStart,{passive:!0}),e.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const e=this.$el;e.removeEventListener("touchstart",this.onDragStart),e.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:To(e),y:qr(e)},this.dragStart=To(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:To(e),y:qr(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,$r(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),cH=["role"];function iH(e,l){const a=(0,t.resolveComponent)("Icon"),n=(0,t.resolveComponent)("CloseButton"),d=(0,t.resolveComponent)("ProgressBar");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(e.classes),style:(0,t.normalizeStyle)(e.draggableStyle),onClick:l[0]||(l[0]=(...c)=>e.clickHandler&&e.clickHandler(...c)),onMouseenter:l[1]||(l[1]=(...c)=>e.hoverPause&&e.hoverPause(...c)),onMouseleave:l[2]||(l[2]=(...c)=>e.hoverPlay&&e.hoverPlay(...c))},[e.icon?((0,t.openBlock)(),(0,t.createBlock)(a,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",{role:e.accessibility.toastRole||"alert",class:(0,t.normalizeClass)(e.bodyClasses)},[typeof e.content=="string"?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(e.content),1)],2112)):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.getVueComponentFromObj(e.content)),(0,t.mergeProps)({key:1,"toast-id":e.id},e.hasProp(e.content,"props")?e.content.props:{},(0,t.toHandlers)(e.hasProp(e.content,"listeners")?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,["toast-id","onCloseToast"]))],10,cH),e.closeButton?((0,t.openBlock)(),(0,t.createBlock)(n,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:(0,t.withModifiers)(e.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):(0,t.createCommentVNode)("v-if",!0),e.timeout?((0,t.openBlock)(),(0,t.createBlock)(d,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):(0,t.createCommentVNode)("v-if",!0)],38)}q5.render=iH;var sH=q5,eW=(0,t.defineComponent)({name:"VtTransition",props:na.TRANSITION,emits:["leave"],methods:{hasProp:Dt,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+"px",e.style.top=e.offsetTop+"px",e.style.width=getComputedStyle(e).width,e.style.position="absolute")}}});function oH(e,l){return(0,t.openBlock)(),(0,t.createBlock)(t.TransitionGroup,{tag:"div","enter-active-class":e.transition.enter?e.transition.enter:`${e.transition}-enter-active`,"move-class":e.transition.move?e.transition.move:`${e.transition}-move`,"leave-active-class":e.transition.leave?e.transition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}eW.render=oH;var lW=(0,t.defineComponent)({name:"VueToastification",devtools:{hide:!0},components:{Toast:sH,VtTransition:eW},props:Object.assign({},na.CORE_TOAST,na.CONTAINER,na.TRANSITION),data(){return{count:0,positions:Object.values(Pd),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const e=this.eventBus;e.on(_l.ADD,this.addToast),e.on(_l.CLEAR,this.clearToasts),e.on(_l.DISMISS,this.dismissToast),e.on(_l.UPDATE,this.updateToast),e.on(_l.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(e){Is(e)&&(e=await e()),FK(this.$el),e.appendChild(this.$el)},setToast(e){Oa(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=kK(e.content);const l=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),a=this.defaults.filterBeforeCreate(l,this.toastArray);a&&this.setToast(a)},dismissToast(e){const l=this.toasts[e];!Oa(l)&&!Oa(l.onClose)&&l.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach(e=>{this.dismissToast(e)})},getPositionToasts(e){const l=this.filteredToasts.filter(a=>a.position===e).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?l.reverse():l},updateDefaults(e){Oa(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:l,create:a}){this.toasts[e]?(l.timeout&&l.timeout===this.toasts[e].timeout&&l.timeout++,this.setToast(Object.assign({},this.toasts[e],l))):a&&this.addToast(Object.assign({},{id:e},l))},getClasses(e){return[`${ea}__container`,e].concat(this.defaults.containerClassName)}}});function mH(e,l){const a=(0,t.resolveComponent)("Toast"),n=(0,t.resolveComponent)("VtTransition");return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.positions,d=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:d},[(0,t.createVNode)(n,{transition:e.defaults.transition,class:(0,t.normalizeClass)(e.getClasses(d))},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.getPositionToasts(d),c=>((0,t.openBlock)(),(0,t.createBlock)(a,(0,t.mergeProps)({key:c.id},c),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}lW.render=mH;var ZH=lW,ab=(e={},l=!0)=>{const a=e.eventBus=e.eventBus||new zs;l&&(0,t.nextTick)(()=>{const c=(0,t.createApp)(ZH,D5({},e)),i=c.mount(document.createElement("div")),s=e.onMounted;if(Oa(s)||s(i,c),e.shareAppContext){const o=e.shareAppContext;o===!0||(c._context.components=o._context.components,c._context.directives=o._context.directives,c._context.mixins=o._context.mixins,c._context.provides=o._context.provides,c.config.globalProperties=o.config.globalProperties)}});const n=(c,i)=>{const s=Object.assign({},{id:vK(),type:Dl.DEFAULT},i,{content:c});return a.emit(_l.ADD,s),s.id};n.clear=()=>a.emit(_l.CLEAR,void 0),n.updateDefaults=c=>{a.emit(_l.UPDATE_DEFAULTS,c)},n.dismiss=c=>{a.emit(_l.DISMISS,c)};function d(c,{content:i,options:s},o=!1){const m=Object.assign({},s,{content:i});a.emit(_l.UPDATE,{id:c,options:m,create:o})}return n.update=d,n.success=(c,i)=>n(c,Object.assign({},i,{type:Dl.SUCCESS})),n.info=(c,i)=>n(c,Object.assign({},i,{type:Dl.INFO})),n.error=(c,i)=>n(c,Object.assign({},i,{type:Dl.ERROR})),n.warning=(c,i)=>n(c,Object.assign({},i,{type:Dl.WARNING})),n},uH=()=>{const e=()=>{};return new Proxy(e,{get(){return e}})};function Qd(e){return fK()?jK(e)?ab({eventBus:e},!1):ab(e,!0):uH()}var ws=Symbol("VueToastification"),G0=new zs,rH=(e,l)=>{l?.shareAppContext===!0&&(l.shareAppContext=e);const a=Qd(D5({eventBus:G0},l));e.provide(ws,a)},bH=e=>{const l=Qd(e);(0,t.getCurrentInstance)()&&(0,t.provide)(ws,l)},tW=e=>{if(e)return Qd(e);const l=(0,t.getCurrentInstance)()?(0,t.inject)(ws,void 0):void 0;return l||Qd(G0)},aW=rH,hH={key:0,class:"custom-toast__icon"},pH={class:"custom-toast__content"},WH=(0,t.defineComponent)({name:"BglToast",__name:"Toast",props:{message:{},type:{},info:{type:Boolean},success:{type:Boolean},warning:{type:Boolean},error:{type:Boolean},showIcon:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},closeToast:{}},setup(e){const l=e,a=(0,t.computed)(()=>l.type?l.type:l.error?"error":l.warning?"warning":l.success?"success":"info");return(n,d)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["custom-toast",`custom-toast--${a.value}`])},[e.showIcon?((0,t.openBlock)(),(0,t.createElementBlock)("div",hH,[a.value==="success"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Le),{key:0,icon:"check_circle"})):(0,t.createCommentVNode)("",!0),a.value==="error"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Le),{key:1,icon:"dangerous"})):(0,t.createCommentVNode)("",!0),a.value==="warning"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Le),{key:2,icon:"report"})):(0,t.createCommentVNode)("",!0),a.value==="info"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Le),{key:3,icon:"info"})):(0,t.createCommentVNode)("",!0)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",pH,(0,t.toDisplayString)(e.message),1),e.showCloseButton?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,class:"custom-toast__close",onClick:d[0]||(d[0]=(...c)=>e.closeToast&&e.closeToast(...c))},[(0,t.createVNode)((0,t.unref)(Le),{icon:"close"})])):(0,t.createCommentVNode)("",!0)],2))}}),id=WH,GH=aW||C5,{POSITION:NH}=C5,bn=tW;const nW=Symbol("toast");var Ci=null;function YH(){const e=(0,t.inject)(nW,null);if(!e){if(Ci)return Ci;throw new Error("Toast API not provided. Make sure ToastPlugin is installed via app.use(ToastPlugin)")}return e}function LH(){if(typeof document>"u")return;let e=document.getElementById("bgl-toast-container");e||(e=document.createElement("div"),e.setAttribute("popover","manual"),e.setAttribute("id","bgl-toast-container"),document.body.appendChild(e));try{e.hidePopover()}catch{}try{e.showPopover()}catch{}return e}const dW={install:(e,l={})=>{const a=LH(),n={position:NH.TOP_RIGHT,timeout:5e3,closeOnClick:!0,pauseOnFocusLoss:!0,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:!1,icon:!1,rtl:!1,transition:"Vue-Toastification__fade",maxToasts:5,newestOnTop:!0,toastClassName:"custom-toast-wrapper",bodyClassName:"custom-toast-body",...a?{container:a}:{},...l};e.use(GH,n);function d(){const i=typeof document<"u"?document.getElementById("bgl-toast-container"):null;if(i){try{i.hidePopover()}catch{}try{i.showPopover()}catch{}}}const c={success:(i,s)=>(d(),bn()({component:id,props:{message:i,type:"success"}},s)),error:(i,s)=>(d(),bn()({component:id,props:{message:i,type:"error"}},s)),info:(i,s)=>(d(),bn()({component:id,props:{message:i,type:"info"}},s)),warning:(i,s)=>(d(),bn()({component:id,props:{message:i,type:"warning"}},s)),show:(i,s)=>(d(),bn()({component:id,props:{message:i,type:"info"}},s)),clear:()=>{bn().clear()}};Ci||(Ci=c),e.provide(nW,c)}};var gs=class extends Event{oldState;newState;constructor(e,{oldState:l="",newState:a="",...n}={}){super(e,n),this.oldState=String(l||""),this.newState=String(a||"")}},nb=new WeakMap;function cW(e,l,a){nb.set(e,setTimeout(()=>{nb.has(e)&&e.dispatchEvent(new gs("toggle",{cancelable:!1,oldState:l,newState:a}))},0))}var N0=globalThis.ShadowRoot||function(){},XH=globalThis.HTMLDialogElement||function(){},ni=new WeakMap,la=new WeakMap,ct=new WeakMap,Un=new WeakMap;function Di(e){return Un.get(e)||"hidden"}var Ui=new WeakMap;function Ad(e){return[...e].pop()}function yH(e){const l=e.popoverTargetElement;if(!(l instanceof HTMLElement))return;const a=Di(l);e.popoverTargetAction==="show"&&a==="showing"||e.popoverTargetAction==="hide"&&a==="hidden"||(a==="showing"?En(l,!0,!0):Ka(l,!1)&&(Ui.set(l,e),Pm(l)))}function Ka(e,l){return!(e.popover!=="auto"&&e.popover!=="manual"&&e.popover!=="hint"||!e.isConnected||l&&Di(e)!=="showing"||!l&&Di(e)!=="hidden"||e instanceof XH&&e.hasAttribute("open")||document.fullscreenElement===e)}function db(e){if(!e)return 0;const l=la.get(document)||new Set,a=ct.get(document)||new Set;return a.has(e)?[...a].indexOf(e)+l.size+1:l.has(e)?[...l].indexOf(e)+1:0}function MH(e){const l=iW(e),a=VH(e);return db(l)>db(a)?l:a}function _d(e){let l;const a=ct.get(e)||new Set,n=la.get(e)||new Set,d=a.size>0?a:n.size>0?n:null;return d?(l=Ad(d),l.isConnected?l:(d.delete(l),_d(e))):null}function cb(e){for(const l of e||[])if(!l.isConnected)e.delete(l);else return l;return null}function On(e){return typeof e.getRootNode=="function"?e.getRootNode():e.parentNode?On(e.parentNode):e}function iW(e){for(;e;){if(e instanceof HTMLElement&&e.popover==="auto"&&Un.get(e)==="showing")return e;if(e=e instanceof Element&&e.assignedSlot||e.parentElement||On(e),e instanceof N0&&(e=e.host),e instanceof Document)return}}function VH(e){for(;e;){const l=e.popoverTargetElement;if(l instanceof HTMLElement)return l;if(e=e.parentElement||On(e),e instanceof N0&&(e=e.host),e instanceof Document)return}}function ib(e,l){const a=new Map;let n=0;for(const i of l||[])a.set(i,n),n+=1;a.set(e,n),n+=1;let d=null;function c(i){if(!i)return;let s=!1,o=null,m=null;for(;!s;){if(o=iW(i)||null,o===null||!a.has(o))return;(e.popover==="hint"||o.popover==="auto")&&(s=!0),s||(i=o.parentElement)}m=a.get(o),(d===null||a.get(d)<m)&&(d=o)}return c(e.parentElement||On(e)),d}function TH(e){return e.hidden||e instanceof N0||(e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement||e instanceof HTMLFieldSetElement)&&e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e instanceof HTMLAnchorElement&&e.href===""?!1:typeof e.tabIndex=="number"&&e.tabIndex!==-1}function IH(e){if(e.shadowRoot&&e.shadowRoot.delegatesFocus!==!0)return null;let l=e;l.shadowRoot&&(l=l.shadowRoot);let a=l.querySelector("[autofocus]");if(a)return a;{const c=l.querySelectorAll("slot");for(const i of c){const s=i.assignedElements({flatten:!0});for(const o of s){if(o.hasAttribute("autofocus"))return o;if(a=o.querySelector("[autofocus]"),a)return a}}}const n=e.ownerDocument.createTreeWalker(l,NodeFilter.SHOW_ELEMENT);let d=n.currentNode;for(;d;){if(TH(d))return d;d=n.nextNode()}}function xH(e){var l;(l=IH(e))==null||l.focus()}var Oi=new WeakMap;function Pm(e){if(!Ka(e,!1))return;const l=e.ownerDocument;if(!e.dispatchEvent(new gs("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!Ka(e,!1))return;let a=!1;const n=e.popover;let d=null;const c=ib(e,la.get(l)||new Set),i=ib(e,ct.get(l)||new Set);if(n==="auto"&&(Qm(ct.get(l)||new Set,a,!0),Ha(c||l,a,!0),d="auto"),n==="hint"&&(i?(Ha(i,a,!0),d="hint"):(Qm(ct.get(l)||new Set,a,!0),c?(Ha(c,a,!0),d="auto"):d="hint")),n==="auto"||n==="hint"){if(n!==e.popover||!Ka(e,!1))return;_d(l)||(a=!0),d==="auto"?(la.has(l)||la.set(l,new Set),la.get(l).add(e)):d==="hint"&&(ct.has(l)||ct.set(l,new Set),ct.get(l).add(e))}Oi.delete(e);const s=l.activeElement;e.classList.add(":popover-open"),Un.set(e,"showing"),ni.has(l)||ni.set(l,new Set),ni.get(l).add(e),sW(Ui.get(e),!0),xH(e),a&&s&&e.popover==="auto"&&Oi.set(e,s),cW(e,"closed","open")}function En(e,l=!1,a=!1){var n,d;if(!Ka(e,!0))return;const c=e.ownerDocument;if(["auto","hint"].includes(e.popover)&&(Ha(e,l,a),!Ka(e,!0)))return;const i=la.get(c)||new Set,s=i.has(e)&&Ad(i)===e;if(sW(Ui.get(e),!1),Ui.delete(e),a&&(e.dispatchEvent(new gs("beforetoggle",{oldState:"open",newState:"closed"})),s&&Ad(i)!==e&&Ha(e,l,a),!Ka(e,!0)))return;(n=ni.get(c))==null||n.delete(e),i.delete(e),(d=ct.get(c))==null||d.delete(e),e.classList.remove(":popover-open"),Un.set(e,"hidden"),a&&cW(e,"open","closed");const o=Oi.get(e);o&&(Oi.delete(e),l&&o.focus())}function zH(e,l=!1,a=!1){let n=_d(e);for(;n;)En(n,l,a),n=_d(e)}function Qm(e,l=!1,a=!1){let n=cb(e);for(;n;)En(n,l,a),n=cb(e)}function sb(e,l,a,n){let d=!1,c=!1;for(;d||!c;){c=!0;let i=null,s=!1;for(const o of l)if(o===e)s=!0;else if(s){i=o;break}if(!i)return;for(;Di(i)==="showing"&&l.size;)En(Ad(l),a,n);l.has(e)&&Ad(l)!==e&&(d=!0),d&&(n=!1)}}function Ha(e,l,a){var n,d;const c=e.ownerDocument||e;if(e instanceof Document)return zH(c,l,a);if((n=ct.get(c))!=null&&n.has(e)){sb(e,ct.get(c),l,a);return}Qm(ct.get(c)||new Set,l,a),(d=la.get(c))!=null&&d.has(e)&&sb(e,la.get(c),l,a)}var xo=new WeakMap;function ob(e){if(!e.isTrusted)return;const l=e.composedPath()[0];if(!l)return;const a=l.ownerDocument;if(!_d(a))return;const n=MH(l);if(n&&e.type==="pointerdown")xo.set(a,n);else if(e.type==="pointerup"){const d=xo.get(a)===n;xo.delete(a),d&&Ha(n||a,!1,!0)}}var zo=new WeakMap;function sW(e,l=!1){if(!e)return;zo.has(e)||zo.set(e,e.getAttribute("aria-expanded"));const a=e.popoverTargetElement;if(a instanceof HTMLElement&&a.popover==="auto")e.setAttribute("aria-expanded",String(l));else{const n=zo.get(e);n?e.setAttribute("aria-expanded",n):e.removeAttribute("aria-expanded")}}var mb=globalThis.ShadowRoot||function(){};function wH(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype=="object"&&"popover"in HTMLElement.prototype}function ka(e,l,a){const n=e[l];Object.defineProperty(e,l,{value(d){return n.call(this,a(d))}})}var gH=/(^|[^\\]):popover-open\b/g;function RH(){return typeof globalThis.CSSLayerBlockRule=="function"}function SH(){const e=RH();return`
460
+ `);r=r.endsWith(".csv")?r:`${r}.csv`,q2(new Blob([W],{type:"text/csv;charset=utf-8"}),r)}async function d(u){const r=await l(),b=await u.arrayBuffer();return r.read(b)}async function c(u){return(await d(u)).SheetNames}async function i(u,r,b=!0){const h=await l(),p=(await d(u)).Sheets[r],N=h.utils.sheet_to_json(p,{header:1});if(N.length===0)return{headers:[],data:[]};let W=[],G=0;b?(W=N[0].map(L=>String(L||"").trim()),G=1):W=N[0].map((L,X)=>String.fromCharCode(65+X));const Y=[];for(let L=G;L<N.length;L++){const X=N[L],T={};for(let V=0;V<W.length;V++)V<X.length?T[W[V]]=X[V]:T[W[V]]="";Y.push(T)}return{headers:W,data:Y}}async function s(u){const r=await l();return new Promise((b,h)=>{const p=new FileReader;p.onload=N=>{try{const W=new Uint8Array(N.target?.result),G=r.read(W,{type:"array"}),Y=G.SheetNames[0],L=G.Sheets[Y];b(r.utils.sheet_to_json(L))}catch(W){h(W)}},p.onerror=()=>{h(new Error("Failed to read file"))},p.readAsArrayBuffer(u)})}function o(u){return typeof u=="number"&&Number.isInteger(u)&&u>=2e4&&u<=5e4}function m(u){const r=new Date(Date.UTC(1899,11,30));return new Date(r.getTime()+u*(1440*60*1e3))}function Z(u,r=!1){if(!(u instanceof Date)||Number.isNaN(u.getTime()))return"";const b=u.getFullYear(),h=String(u.getMonth()+1).padStart(2,"0"),p=String(u.getDate()).padStart(2,"0");return r?`${b}-${h}-${p}T${String(u.getHours()).padStart(2,"0")}:${String(u.getMinutes()).padStart(2,"0")}:${String(u.getSeconds()).padStart(2,"0")}`:`${b}-${h}-${p}`}return{downloadExcel:a,downloadCSV:n,readExcelFile:s,ensureXLSXLoaded:l,getSheetNames:c,readSheetData:i,getWorkbook:d,isExcelSerialDate:o,excelSerialDateToJSDate:m,formatDate:Z}}var Nr={"to-t":"to top","to-b":"to bottom","to-l":"to left","to-r":"to right","to-tl":"to top left","to-tr":"to top right","to-bl":"to bottom left","to-br":"to bottom right"};function KO(e){if(e==null||e==="")return;if(typeof e=="string"&&e in Nr)return Nr[e];const l=Number(e);return Number.isFinite(l)?`${l}deg`:void 0}function HO(e){return typeof e!="string"?[]:e.trim().split(/\s+/).filter(Boolean)}function No(e){const l=e.trim();return l.startsWith("var(")||l.startsWith("#")||/^(rgb|hsl|color-mix|linear-gradient)\(/.test(l)?l:l.startsWith("--")?`var(${l})`:`var(--bgl-${l})`}function Ws({gradient:e,gradientDir:l,color:a}){const n=(0,t.computed)(()=>{const c=(0,t.toValue)(e);return c===!0||typeof c=="string"&&c.trim()!==""}),d=(0,t.computed)(()=>[(0,t.toValue)(a),...HO((0,t.toValue)(e))].filter(Boolean));return{isGradient:n,gradientStyle:(0,t.computed)(()=>{if(!n.value)return{};const c={},i=KO((0,t.toValue)(l));i&&(c["--bgl-grad-angle"]=i);const s=d.value;if(s.length<2)return c;c["--bgl-grad-from"]=No(s[0]),c["--bgl-grad-to"]=No(s[s.length-1]);const o=s.slice(1,-1);return o.length&&(c["--bgl-grad-via"]=`${o.map(No).join(", ")}, `),c}),stops:d}}async function PO(e){if("caches"in window)try{const l=await(await window.caches.open("img-cache")).match(e);if(l)return URL.createObjectURL(await l.blob())}catch{}}async function QO(e,l){if("caches"in window)try{await(await window.caches.open("img-cache")).put(e,new Response(l))}catch{}}async function AO(e){await uc("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");const l=await(await Ud("heic2any"))({blob:await(await fetch($2(e))).blob()});return await QO(e,l),URL.createObjectURL(l)}function e0(e){const l=(0,t.ref)(void 0),a=(0,t.ref)(!1);async function n(){a.value=!1;const d=dt((0,t.toValue)(e));if(d===void 0||d===""){l.value=void 0;return}try{if(d.split(".").pop()?.toLowerCase().split("?")[0]==="heic"){const c=await PO(d);if(c!==void 0&&c!==""){l.value=c;return}l.value=await AO(d)}else l.value=d}catch{a.value=!0,l.value=void 0}}return(0,t.watch)(()=>(0,t.toValue)(e),n,{immediate:!0}),{imageSrc:l,loadingError:a}}var Mn={},Yr=!1,Fm=typeof window<"u";function _O(){!Fm||Yr||(Yr=!0,window.addEventListener("storage",e=>{e.key!==null&&e.key in Mn&&(Mn[e.key].value=e.newValue!==null?JSON.parse(e.newValue):null)}))}function $O(e,l=null){if(!(e in Mn)){const a=Fm?localStorage.getItem(e):null;Mn[e]=(0,t.ref)(a!==null?JSON.parse(a):l),(0,t.watch)(Mn[e],n=>{Fm&&localStorage.setItem(e,JSON.stringify(n))})}return Mn[e]}function Fp(e){return _O(),new Proxy({},{get(l,a){return $O(a,e?.[a]??null)}})}var kp=1e3,qO=60*kp;function eE(e,l={}){const{interval:a=30*kp,inactivityThreshold:n=5*qO,pauseInBackground:d=!0}=l,{idle:c}=jV(n),i=(0,t.ref)(!0),s=(0,t.ref)(null),o=()=>!d||document.visibilityState==="visible",m=()=>{i.value=!1,s.value!==null&&(clearTimeout(s.value),s.value=null)},Z=()=>{s.value!==null&&(clearTimeout(s.value),s.value=null)},u=()=>{s.value!==null&&(clearTimeout(s.value),s.value=null);const h=async()=>{if(i.value&&o()&&!c.value)try{await e()}catch{}i.value&&(s.value=window.setTimeout(h,a))};h()},r=()=>{i.value&&u()};function b(){document.visibilityState==="visible"?i.value&&u():d&&Z()}return(0,t.onMounted)(()=>{document.addEventListener("visibilitychange",b),u()}),(0,t.onUnmounted)(()=>{document.removeEventListener("visibilitychange",b),m()}),{isPolling:i,pausePolling:Z,resumePolling:r,startPolling:u,stopPolling:m}}function lE(){const e=(0,t.ref)(!1);let l;function a(n){e.value=n.matches}return(0,t.onMounted)(()=>{typeof window>"u"||!window.matchMedia||(l=window.matchMedia("(prefers-reduced-motion: reduce)"),e.value=l.matches,l.addEventListener("change",a))}),(0,t.onUnmounted)(()=>{l?.removeEventListener("change",a)}),e}function tE(e,l,a){const n={...e};return a===void 0?delete n[l]:n[l]=a,n}function aE(e){const l=(0,ya.useRoute)(),a=(0,ya.useRouter)(),n={};return new Proxy({},{get(d,c){if(!(c in n)){const i=e?.[c];n[c]=(0,t.computed)({get:()=>l.query[c]??i,set:s=>a.replace({query:tE(l.query,c,s)})})}return n[c]}})}var Nt=(0,t.ref)([{value:"dark",class:"bgl-dark-mode",icon:"cloudy_night",label:"Dark Mode",isDark:!0},{value:"light",class:"bgl-light-mode",icon:"brightness_7",label:"Light Mode",isDark:!1},{value:"system",class:"system",icon:"settings_input_component",label:"System Default"}]),Lr="color-mode",pt=(0,t.ref)("system"),km=(0,t.ref)(!1),l0=(0,t.ref)(!1),gi=(0,t.ref)(!1),t0=typeof window<"u";function nE(){return l0.value&&t0&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}function Xr(e){return Nt.value.find(l=>l.value===e)}function ti(e){if(!t0)return;const l=document.documentElement;if(Nt.value.forEach(a=>{a.class!=="system"&&l.classList.remove(a.class)}),e==="system"){const a=nE();km.value=a;const n=Nt.value.find(i=>i.value==="dark"),d=Nt.value.find(i=>i.value==="light"),c=a?n:d;c&&l.classList.add(c.class)}else{const a=Xr(e),n=a&&a.isDark&&!l0.value?Xr("light"):a;n&&(l.classList.add(n.class),km.value=n.isDark??!1)}}function dE(){const e=Nt.value.filter(l=>l.value!=="system");e.length!==0&&(pt.value=e[(e.findIndex(l=>l.value===pt.value)+1)%e.length].value)}function cE(e={}){e.allowDark!==void 0&&(l0.value=e.allowDark),e.manualSelection!==void 0&&(gi.value=e.manualSelection),fp(),gi.value||(pt.value="system"),ti(pt.value)}function iE(e){if(!Nt.value.some(l=>l.value===e.value)){const l=Nt.value.findIndex(a=>a.value==="system");l>-1?Nt.value.splice(l,0,e):Nt.value.push(e)}}var yr=!1;function fp(){if(!(yr||!t0)){if(yr=!0,gi.value){const e=window.localStorage.getItem(Lr);Nt.value.some(l=>l.value===e)&&(pt.value=e)}else pt.value="system";ti(pt.value),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{pt.value==="system"&&ti("system")}),(0,t.watch)(pt,e=>{gi.value&&localStorage.setItem(Lr,e),ti(e)})}}function sE(){return fp(),{isDark:km,theme:(0,t.computed)(()=>pt.value),themeOptions:Nt,toggleTheme:dE,addTheme:iE,setTheme:e=>{pt.value=e}}}function jp(e,l,a,n){gV(e,(d,c)=>{if(l?.()?.setCustomValidity(""),!a||d===c||!d)return;const i=a(d,n?.());typeof i=="string"&&l?.()?.setCustomValidity(i)},{debounce:500})}function Jp({schema:e,columns:l,data:a}={}){const n=(0,t.computed)(()=>(0,t.toValue)(e)),d=(0,t.computed)(()=>(0,t.toValue)(l));return n.value?d.value&&d.value.length>0?n.value.filter(c=>d.value?.includes(c.id)):n.value:Rp(a,d.value)}const oE={s:"400px",m:"540px",l:"720px",xl:"960px",full:"100%"};var mE={key:0,class:"dialog-grip","aria-hidden":"true"},ZE={key:2,class:"flex-grow-1"},uE=(0,t.defineComponent)({__name:"Dialog",props:{open:{type:Boolean},title:{},width:{default:"m"},position:{default:"center"},dismissable:{type:Boolean,default:!0},flat:{type:Boolean,default:!0},thin:{type:Boolean,default:!1},centerTitle:{type:Boolean,default:!1},ellipsisTitle:{type:Boolean,default:!1},closePlacement:{default:"header-end"},grip:{type:Boolean,default:void 0}},emits:["update:open","close"],setup(e,{expose:l,emit:a}){const n=e,d=(0,t.computed)(()=>n.grip??n.position==="bottom"),c=a,i=(0,t.ref)(null),s=(0,t.ref)(!1),o=(0,t.ref)(!0),m=(0,t.computed)(()=>oE[n.width]),Z=(0,t.computed)(()=>n.position==="left"?"dialog-left ms-1 me-auto mt-1 mb-1 height-100-2 m_m-0 m_h-100vh m_max-h-100vh m_radius-0":n.position==="right"?"dialog-right me-1 ms-auto mt-1 mb-1 height-100-2 m_m-0 m_h-100vh m_max-h-100vh m_radius-0":n.position==="top"?"dialog-top mx-auto mt-1 mb-auto":n.position==="bottom"?"dialog-bottom mx-auto mb-1 mt-auto":"dialog-center mx-auto");(0,t.watch)(()=>n.open,N=>{N?(i.value?.showModal(),s.value=!1,o.value=!1,setTimeout(()=>{o.value=!0},250)):u()}),(0,t.onMounted)(()=>{n.open&&i.value?.showModal()});function u(){s.value||(s.value=!0)}function r(){s.value&&(i.value?.close(),s.value=!1,c("close"))}function b(N){N.target===i.value&&n.dismissable&&c("update:open",!1)}function h(N){if(!n.dismissable){N.preventDefault();return}c("update:open",!1)}function p(){o.value=!1,c("update:open",!1)}return l({close:p}),(N,W)=>((0,t.openBlock)(),(0,t.createElementBlock)("dialog",{ref_key:"dialogRef",ref:i,class:(0,t.normalizeClass)([[Z.value,{"is-closing":s.value}],"border-none shadow-30 p-0 testMe1 dialog-no-focus-outline"]),style:(0,t.normalizeStyle)({"--dialog-width":m.value}),onClick:b,onCancel:h,onAnimationend:r},[(0,t.createElementVNode)("div",{class:"grid grid-dialog max-height-100-2",tabindex:"-1",autofocus:"",onClick:W[0]||(W[0]=(0,t.withModifiers)(()=>{},["stop"]))},[d.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",mE)):(0,t.createCommentVNode)("",!0),e.title||N.$slots.header||e.dismissable?((0,t.openBlock)(),(0,t.createElementBlock)("header",{key:1,class:(0,t.normalizeClass)(["flex space-between flex-shrink-0 align-items-start gap-05",{"border-bottom":!e.flat,"border-none":!e.title&&!N.$slots.header,"m_ps-1":e.title||N.$slots.header,"p-05 m_p-05":!e.title&&!N.$slots.header,"ps-1-5 pe-1 py-1 ":!e.thin&&(e.title||N.$slots.header),"ps-1 pe-05 py-05":e.thin&&(e.title||N.$slots.header)}])},[e.dismissable&&e.closePlacement==="header-start"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:0,flat:"",icon:"close","aria-label":"Close",class:"dialog-close relative z-2",thin:"",onClick:p})):(0,t.createCommentVNode)("",!0),e.title||N.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)("h3",{key:1,class:(0,t.normalizeClass)(["dialog-title m-0 txt20 semi w-100p",{"txt-center balance":e.centerTitle,"word-break-all":!e.centerTitle,"ellipsis-1":e.ellipsisTitle}])},[(0,t.renderSlot)(N.$slots,"header",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)],!0)],2)):(0,t.createCommentVNode)("",!0),!e.title&&!N.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)("div",ZE)):(0,t.createCommentVNode)("",!0),e.dismissable&&e.closePlacement==="header-end"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:3,flat:"",icon:"close","aria-label":"Close",class:"dialog-close relative z-2",thin:"",onClick:p})):(0,t.createCommentVNode)("",!0)],2)):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["overflow-y flex-grow-1 m_p-1",{"px-1 py-05":e.thin,"px-1-5 py-1":!e.thin}])},[(0,t.renderSlot)(N.$slots,"default",{},void 0,!0)],2),N.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)("footer",{key:2,class:(0,t.normalizeClass)(["flex flex-shrink-0 gap-05 m_px-05 m_py-05 justify-content-end",{"border-top":!e.flat,"px-05 py-05":e.thin,"px-1-5 py-1":!e.thin}])},[(0,t.renderSlot)(N.$slots,"footer",{},void 0,!0)],2)):(0,t.createCommentVNode)("",!0)]),e.dismissable&&e.closePlacement==="overlay-start"&&o.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:0,icon:"close","aria-label":"Close",class:"fixed top-1 start-1 z-999 overlay-btn",onClick:p})):(0,t.createCommentVNode)("",!0),e.dismissable&&e.closePlacement==="overlay-end"&&o.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:1,icon:"close","aria-label":"Close",class:"fixed top-1 end-1 z-999 overlay-btn",onClick:p})):(0,t.createCommentVNode)("",!0)],38))}}),At=Ye(uE,[["__scopeId","data-v-42595465"]]),rE=(0,t.defineComponent)({__name:"DialogConfirm",props:{open:{type:Boolean},title:{},message:{},width:{default:"s"},position:{default:"center"},dismissable:{type:Boolean,default:!0},confirmText:{},cancelText:{},confirmColor:{default:"primary"}},emits:["update:open","resolve"],setup(e,{emit:l}){const a=e,n=l,{$t:d}=tl(),c=(0,t.computed)(()=>a.title||d("modalConfirm.title")),i=(0,t.computed)(()=>a.confirmText||d("modalConfirm.confirm")),s=(0,t.computed)(()=>a.cancelText||d("modalConfirm.cancel"));function o(){n("resolve",!0),n("update:open",!1)}function m(){n("resolve",!1),n("update:open",!1)}function Z(){n("resolve",!1)}return(u,r)=>((0,t.openBlock)(),(0,t.createBlock)(At,{open:e.open,title:c.value,width:e.width,position:e.position,dismissable:e.dismissable,"onUpdate:open":r[0]||(r[0]=b=>u.$emit("update:open",b)),onClose:Z},{footer:(0,t.withCtx)(()=>[(0,t.createVNode)(oe,{flat:"",onClick:m},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(s.value),1)]),_:1}),(0,t.createVNode)(oe,{color:e.confirmColor,onClick:o},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(i.value),1)]),_:1},8,["color"])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("p",null,(0,t.toDisplayString)(e.message),1)]),_:1},8,["open","title","width","position","dismissable"]))}}),Cp=rE,Vn=new Map,fm=new Set,Dp=/^[a-z0-9][a-z0-9._-]*:[a-z0-9][a-z0-9._-]*$/i;function bE(e){if(!Dp.test(e.type))throw new Error(`Custom form field type "${e.type}" must be a namespaced ID such as "acme:rating"`);if(Vn.has(e.type))throw new Error(`Custom form field type "${e.type}" is already registered`);return Vn.set(e.type,e),fm.delete(e.type),()=>{Vn.get(e.type)===e&&Vn.delete(e.type)}}function Wt(e){return Vn.get(e)}function hE(){return[...Vn.values()]}function Gs(e){return Dp.test(e)}function Ns(e){!Gs(e)||fm.has(e)||fm.add(e)}function pE(e,l,a={},n=""){return Wt(e)?.display?.(l,{key:n,config:a})}function a0(e,l){const a={...l};for(const[n,d]of Object.entries(e)){const c=Wt(d._type)?.toSubmission;if(!c)continue;const i=c(a[n],{key:n,config:d._config,formData:l});i===void 0?delete a[n]:a[n]=i}return a}const WE=12,GE=12,NE=1;var Up=/^col-(\d{1,2})\/12$/,Op=/^start-col-(\d{1,2})$/,Ep=/^m_col-(\d{1,2})\/12$/,Bp=/^start-row-(\d+)$/,Kp=/^(?:grid-)?span-row-(\d+)$/,Hp=/^m_start-col-(\d{1,2})$/,Pp=/^m_start-row-(\d+)$/,Qp=/^m_(?:grid-)?span-row-(\d+)$/,Ri={"col-1/12":1,"col-1/6":2,"col-2/12":2,"col-1/4":3,"col-3/12":3,"col-1/3":4,"col-4/12":4,"col-5/12":5,"col-1/2":6,"col-6/12":6,"col-7/12":7,"col-2/3":8,"col-8/12":8,"col-3/4":9,"col-9/12":9,"col-5/6":10,"col-10/12":10,"col-11/12":11,"col-full":12,"col-12/12":12},jm=Object.fromEntries(Object.entries(Ri).map(([e,l])=>[`m_${e}`,l]));function wa(e){return Math.max(1,Math.min(12,Math.round(e)))}function Ys(e){return Math.max(1,Math.round(e))}function Ap(e){return`col-${wa(e)}/12`}function _p(e){return`start-col-${wa(e)}`}function $p(e){return`m_col-${wa(e)}/12`}function qp(e){return`span-row-${Ys(e)}`}function YE(e){return`start-row-${Math.max(1,Math.round(e))}`}function e5(e){return`m_start-col-${wa(e)}`}function l5(e){return`m_start-row-${Math.max(1,Math.round(e))}`}function t5(e){return`m_span-row-${Ys(e)}`}function n0(e){if(e)for(const l of e.split(/\s+/)){if(l.startsWith("m_"))continue;const a=l.match(Up);if(a)return wa(Number(a[1]));if(l in Ri)return Ri[l]}}function d0(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Op);if(a)return wa(Number(a[1]))}}function c0(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Ep);if(a)return wa(Number(a[1]));if(l in jm)return jm[l]}}function i0(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Hp);if(a)return wa(Number(a[1]))}}function s0(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Kp);if(a)return Ys(Number(a[1]))}}function o0(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Bp);if(a)return Math.max(1,Number(a[1]))}}function m0(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Pp);if(a)return Math.max(1,Number(a[1]))}}function Z0(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Qp);if(a)return Ys(Number(a[1]))}}function u0(e){return e?e.split(/\s+/).filter(Boolean).filter(l=>!Up.test(l)&&!Op.test(l)&&!Ep.test(l)&&!Bp.test(l)&&!Kp.test(l)&&!Hp.test(l)&&!Pp.test(l)&&!Qp.test(l)&&!(l in Ri)&&!(l in jm)).join(" "):""}function a5(e,l){const a=u0(e),n=a?[a]:[];return l.colSpan!==void 0&&l.colSpan!==12&&n.push(Ap(l.colSpan)),l.colStart!==void 0&&n.push(_p(l.colStart)),l.rowStart!==void 0&&n.push(YE(l.rowStart)),l.rowSpan!==void 0&&l.rowSpan!==1&&n.push(qp(l.rowSpan)),l.mColSpan!==void 0&&l.mColSpan!==12&&n.push($p(l.mColSpan)),l.mColStart!==void 0&&n.push(e5(l.mColStart)),l.mRowStart!==void 0&&n.push(l5(l.mRowStart)),l.mRowSpan!==void 0&&l.mRowSpan!==1&&n.push(t5(l.mRowSpan)),n.join(" ")}function n5(e){return{colSpan:n0(e),colStart:d0(e),rowStart:o0(e),rowSpan:s0(e),mColSpan:c0(e),mColStart:i0(e),mRowStart:m0(e),mRowSpan:Z0(e)}}var LE=(0,t.defineComponent)({__name:"FormFlow",props:{schema:{},modelValue:{},components:{},errors:{},onSubmit:{type:Function}},emits:["update:modelValue"],setup(e,{expose:l,emit:a}){const n=e,d=a,{$t:c}=tl();function i(w,K){const O=K.split(".");let R=w;for(const z of O)R=R?.[z];return R}function s(w,K,O){const R=K.split(".");let z=w;for(let v=0;v<R.length-1;v++){const S=R[v];(z[S]==null||typeof z[S]!="object")&&(z[S]={}),z=z[S]}z[R[R.length-1]]=O}function o(w){if(w==null||typeof w!="object")return w;try{return structuredClone(w)}catch{return JSON.parse(JSON.stringify(w))}}function m(w,K,O,R){const z=Wt(w._type);if(z?.coerce)return z.coerce(K,{key:O,config:w._config,formData:R});if(typeof K!="string")return K;const v=K.trim();switch(w._type){case"checkbox":case"toggle":return v.toLowerCase()==="true"?!0:v.toLowerCase()==="false"?!1:K;case"number":case"range":{if(!v)return K;const S=Number(v);return Number.isNaN(S)?K:S}default:return K}}function Z(w){const K={...w??{}};for(const[O,R]of Object.entries(n.schema._fields)){const z=i(K,O);if(z!==void 0){s(K,O,m(R,z,O,K));continue}const v=R._config.default;v!==void 0&&s(K,O,m(R,o(v),O,K))}return K}function u(w){const K=w._config.schema;if(K&&typeof K.getDefaults=="function"){const R=o(K.getDefaults());if(R&&Object.keys(R).length>0)return R}const O=w._config.default;return Array.isArray(O)&&O.length>0&&O[0]!=null&&typeof O[0]=="object"?o(r(O[0])):{}}function r(w){try{return JSON.parse(JSON.stringify(w))}catch{return{...w}}}const b=(0,t.ref)(Z(n.modelValue)),h=(0,t.ref)({}),p=(0,t.ref)(!1),N=(0,t.ref)("idle"),W=(0,t.ref)();let G=!1;(0,t.watch)(()=>n.modelValue,w=>{G||(b.value=Z(w))},{deep:!0}),(0,t.watch)(b,w=>{G=!0,d("update:modelValue",o(w)),(0,t.nextTick)(()=>{G=!1})},{deep:!0});function Y(w){return w._hidden?!1:w._condition==null?!0:L2(w._condition,b.value)}function L(w,K){if(K._condition==null)return w;const O=K._condition.trim().split(/\s+/)[0];if(!O)return w;const R=i(b.value,O);return R==null?w:`${w}:${String(R)}`}const X=(0,t.computed)(()=>{const w=[];for(const[K,O]of Object.entries(n.schema._fields))Y(O)&&w.push({key:K,field:O});return w});function T(w){if(!n.schema._class?.split(/\s+/).includes("free-grid"))return;const{rowStart:K,rowSpan:O,mRowStart:R,mRowSpan:z}=n5(w._class);if(!(!K&&!R&&!O&&!z))return{...K?{"--bgl-grid-row-start":String(K)}:{},...R?{"--bgl-mobile-grid-row-start":String(R)}:{},...O?{"--bgl-grid-row-span":String(O)}:{},...z?{"--bgl-mobile-grid-row-span":String(z)}:{}}}function V(w,K,O){s(b.value,w,K),(N.value==="success"||N.value==="error")&&(N.value="idle"),p.value&&x(w,O)}function y(w,K,O){const R=Wt(K._type);return R?.isEmpty?R.isEmpty(w,{key:O,config:K._config,formData:b.value}):w==null||w===""||w===!1&&K._type==="checkbox"||Array.isArray(w)&&w.length===0||K._type==="tel"&&typeof w=="string"&&/^\+\d+$/.test(w)}function x(w,K){const O=M(w);if(K._config.required===!0&&y(O,K,w))return h.value={...h.value,[w]:K._config.requiredMessage??c("form.required")},!1;if(K._type==="email"&&O&&!Ja.test(O))return h.value={...h.value,[w]:c("form.invalidEmail")},!1;const R=Wt(K._type)?.validate?.(O,{key:w,config:K._config,formData:b.value});if(R!==void 0&&R!==!0)return h.value={...h.value,[w]:R},!1;if(K._validations!=null)for(const z of K._validations){const v=z(O);if(v!==!0)return h.value={...h.value,[w]:v},!1}return h.value=Object.fromEntries(Object.entries(h.value).filter(([z])=>z!==w)),!0}function M(w){return i(b.value,w)}function F(w,K){return K._config.label!=null?K._config.label:w.split(/[._-]/).map(O=>O.charAt(0).toUpperCase()+O.slice(1)).join(" ")}function g(w){if(typeof w!="string"&&(w._type==="select"||w._type==="multiselect")&&w._config.display==="btn")return n.components?.selectBtn??T2;const K=typeof w=="string"?w:w._type;if(K&&n.components?.[K]!=null)return n.components[K];const O=K?Wt(K)?.component:void 0;return O||(K&&Gs(K)&&Ns(K),{text:fe,email:y2,password:_1,number:St,tel:D2,url:fe,date:Ba,time:fe,datetime:Ba,textarea:fe,richtext:Ni,json:X2,checkbox:Il,toggle:us,radio:q1,select:Cl,multiselect:Cl,array:Wn,heading:ym,divider:ym,upload:kd,color:gt,icon:D1,range:V2}[K]??fe)}const C=(0,t.computed)(()=>{const w={...h.value,...n.errors||{}},K={};for(const[O,R]of Object.entries(w))K[O]=Me(R)??R;return K});function E(w,K){const O=F(K,w),{helpText:R,...z}=w._config,v=n.schema._class?.split(/\s+/).includes("free-grid")??!1,S={label:O,modelValue:M(K),"onUpdate:modelValue":te=>{V(K,te,w)},error:C.value[K],...z,...R!=null?{helptext:R}:{},name:w._config.name??K};if(w._type==="textarea"&&(S.multiline=!0),w._type==="multiselect"&&(S.multiselect=!0),v&&w._type==="richtext"&&(S.fullHeight=!0),v&&(w._type==="upload"||w._type==="file")&&(S.height=w._config.hideLabel?"100%":"calc(100% - 1.75rem)"),(w._type==="select"||w._type==="multiselect")&&typeof S.options=="function"){const te=S.options;S.options=J=>te(J,b.value)}if(w._type==="json"&&(S.language=S.language??"json"),w._type==="array"){delete S.default,delete S.schema,delete S.itemType;const{helpText:te,...J}=Object.fromEntries(Object.entries(w._config).filter(([ie])=>ie!=="schema"&&ie!=="itemType"&&ie!=="default"));Object.assign(S,J),te!=null&&(S.helptext=te),delete S.helpText,S.modelValue=M(K),S["onUpdate:modelValue"]=ie=>{V(K,ie,w)},S.allowAdd=S.allowAdd??!0,S.allowDelete=S.allowDelete??!0}return S}function _(w,K){return{...w._component?.props??{},...E(w,K)}}function $(w){return typeof w=="string"&&n.components?.[w]!=null?n.components[w]:w}function f(w){return w._component!=null}function U(){let w=!0;const K={};for(const{key:O,field:R}of X.value){const z=M(O);if(R._config.required===!0&&y(z,R,O)){K[O]=R._config.requiredMessage??c("form.required"),w=!1;continue}if(R._type==="email"&&z&&!Ja.test(z)){K[O]=c("form.invalidEmail"),w=!1;continue}const v=Wt(R._type)?.validate?.(z,{key:O,config:R._config,formData:b.value});if(v!==void 0&&v!==!0){K[O]=v,w=!1;continue}if(R._validations!=null)for(const S of R._validations){const te=S(z);if(te!==!0){K[O]=te,w=!1;break}}}return h.value=K,w}async function Q(w){w&&w.preventDefault(),p.value=!0;const K=U();if(K){if(n.onSubmit){N.value="submitting";try{await n.onSubmit(a0(n.schema._fields,b.value)),N.value="success"}catch{N.value="error"}}}else{w?.stopPropagation(),W.value?.reportValidity();const O=X.value.find(({key:R})=>h.value[R])?.key;if(O!=null&&W.value){const R=W.value.querySelector(`[name="${O}"]`)||W.value.querySelector(`[id="${O}"]`)||W.value.querySelector(`[data-field="${O}"]`)||W.value.querySelector("input, select, textarea");R&&(R.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{R instanceof HTMLElement&&R.focus()},300))}}return K}return l({validate:U,submit:Q,formState:N}),(w,K)=>{const O=(0,t.resolveComponent)("FormFlow",!0);return(0,t.openBlock)(),(0,t.createElementBlock)("form",{ref_key:"formElement",ref:W,class:(0,t.normalizeClass)(["grid-form",e.schema._class]),onSubmit:Q},[N.value==="success"?(0,t.renderSlot)(w.$slots,"success",{key:0,formData:b.value}):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(X.value,({key:R,field:z})=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:L(R,z),class:(0,t.normalizeClass)([z._class,z._config.class]),style:(0,t.normalizeStyle)(T(z))},[(0,t.renderSlot)(w.$slots,`field:${R}`,{value:M(R),field:z,formData:b.value,error:h.value[R],onChange:v=>{V(R,v,z)}},()=>[z._type==="array"&&z._config.schema?._isSchema?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:0,ref_for:!0},E(z,R),{"create-item":()=>u(z)}),{default:(0,t.withCtx)(({item:v})=>[(0,t.createVNode)(O,{"model-value":v.value,schema:z._config.schema,components:e.components,"onUpdate:modelValue":S=>{v.value=S}},null,8,["model-value","schema","components","onUpdate:modelValue"])]),_:2},1040,["create-item"])):z._type==="array"&&typeof z._config.schema=="string"?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:1,ref_for:!0},E(z,R),{"create-item":()=>""}),{default:(0,t.withCtx)(({item:v})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(g(z._config.schema)),{"model-value":v.value,"onUpdate:modelValue":S=>{v.value=S}},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1040)):z._type==="array"&&z._config.schema?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:2,ref_for:!0},E(z,R),{"create-item":()=>u(z)}),{default:(0,t.withCtx)(({item:v})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)($(z._config.schema)),{modelValue:v.value,"onUpdate:modelValue":S=>v.value=S},null,8,["modelValue","onUpdate:modelValue"]))]),_:2},1040,["create-item"])):z._type==="array"&&z._config.itemType?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:3,ref_for:!0},E(z,R),{"create-item":()=>""}),{default:(0,t.withCtx)(({item:v})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(g(z._config.itemType)),{"model-value":v.value,"onUpdate:modelValue":S=>{v.value=S}},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1040)):f(z)?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)($(z._component.component)),(0,t.mergeProps)({key:4,ref_for:!0},_(z,R)),null,16)):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(g(z)),(0,t.mergeProps)({key:5,ref_for:!0},E(z,R)),null,16))])],6))),128)),(0,t.renderSlot)(w.$slots,"errors",{errors:C.value,errorCount:Object.keys(C.value).filter(R=>C.value[R]).length,visibleFields:X.value}),N.value==="error"?(0,t.renderSlot)(w.$slots,"error",{key:0,formData:b.value}):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(w.$slots,"submit",{submit:Q,validate:U,formData:b.value,errors:C.value,formState:N.value})],64))],34)}}}),Ls=LE,XE={key:0,class:"dialog-form-error bg-red-30 color-red radius-1 mb-1 txt14 px-1 py-075"},yE={key:1,class:"mb-1 mt-0"},ME=(0,t.defineComponent)({__name:"DialogForm",props:{open:{type:Boolean},title:{},width:{default:"m"},position:{default:"center"},dismissable:{type:Boolean,default:!0},schema:{},modelValue:{},message:{},onSubmit:{},onDelete:{},submitText:{},cancelText:{},deleteText:{}},emits:["update:open","resolve"],setup(e,{emit:l}){const a=e,n=l,{$t:d}=tl(),c=(0,t.ref)({...a.modelValue||{}}),i=(0,t.ref)(!1),s=(0,t.ref)(!1),o=(0,t.ref)(null),m=(0,t.ref)(),Z=(0,t.computed)(()=>typeof a.onDelete=="function");async function u(){if(!i.value){if(!m.value?.validate()){o.value=d("dialogForm.validationError");return}o.value=null,i.value=!0;try{a.onSubmit&&await a.onSubmit(c.value),n("resolve",{action:"submit",data:c.value}),n("update:open",!1)}catch(p){o.value=p instanceof Error?p.message:d("dialogForm.errorOccurred")}finally{i.value=!1}}}async function r(){if(!(s.value||!a.onDelete)){o.value=null,s.value=!0;try{await a.onDelete(c.value),n("resolve",{action:"delete",data:c.value}),n("update:open",!1)}catch(p){o.value=p instanceof Error?p.message:d("dialogForm.errorOccurred")}finally{s.value=!1}}}function b(){n("resolve",{action:"cancel",data:c.value}),n("update:open",!1)}function h(){n("resolve",{action:"cancel",data:c.value})}return(p,N)=>((0,t.openBlock)(),(0,t.createBlock)(At,{open:e.open,title:e.title,width:e.width,position:e.position,dismissable:e.dismissable,"onUpdate:open":N[1]||(N[1]=W=>p.$emit("update:open",W)),onClose:h},{footer:(0,t.withCtx)(()=>[Z.value?((0,t.openBlock)(),(0,t.createBlock)(oe,{key:0,color:"red",flat:"",loading:s.value,disabled:i.value,class:"me-auto",thin:"",onClick:r},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.deleteText||(0,t.unref)(d)("dialogForm.delete")),1)]),_:1},8,["loading","disabled"])):(0,t.createCommentVNode)("",!0),N[2]||(N[2]=(0,t.createElementVNode)("div",{class:"flex-grow-1"},null,-1)),(0,t.createVNode)(oe,{flat:"",disabled:i.value||s.value,onClick:b,thin:""},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.cancelText||(0,t.unref)(d)("dialogForm.cancel")),1)]),_:1},8,["disabled"]),(0,t.createVNode)(oe,{color:"primary",loading:i.value,disabled:s.value,onClick:u},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.submitText||(0,t.unref)(d)("dialogForm.save")),1)]),_:1},8,["loading","disabled"])]),default:(0,t.withCtx)(()=>[o.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",XE,(0,t.toDisplayString)(o.value),1)):(0,t.createCommentVNode)("",!0),e.message?((0,t.openBlock)(),(0,t.createElementBlock)("p",yE,(0,t.toDisplayString)(e.message),1)):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(Ls,{ref_key:"formFlowRef",ref:m,modelValue:c.value,"onUpdate:modelValue":N[0]||(N[0]=W=>c.value=W),schema:e.schema,onSubmit:u},null,8,["modelValue","schema"])]),_:1},8,["open","title","width","position","dismissable"]))}}),d5=ME;const r0=Symbol("dialog");var Si=null;function c5(){let e=null;try{e=(0,t.inject)(r0,null)}catch{e=null}if(!e){if(Si)return Si;throw new Error("Dialog API not provided. Make sure DialogPlugin is installed via app.use(DialogPlugin)")}return e}const i5={install:e=>{let l=0;const a=(0,t.reactive)([]),n={form:c=>new Promise(i=>{const s=++l;a.push({id:s,type:"form",options:c,resolve:i,open:!0})}),confirm:c=>new Promise(i=>{const s=++l,o=typeof c=="string"?{message:c}:c;a.push({id:s,type:"confirm",options:o,resolve:i,open:!0})}),open:c=>{const i=++l,s={id:i,type:"open",options:c,resolve:()=>{},open:!0};return a.push(s),{close:()=>{const o=a.findIndex(m=>m.id===i);o!==-1&&(a[o].open=!1,setTimeout(()=>{const m=a.findIndex(Z=>Z.id===i);m!==-1&&a.splice(m,1)},200))}}}};Si||(Si=n),e.provide(r0,n);const d=(0,t.defineComponent)({name:"DialogContainer",setup(){function c(o,m){o.resolve(m),o.open=!1,setTimeout(()=>{const Z=a.findIndex(u=>u.id===o.id);Z!==-1&&a.splice(Z,1)},200)}function i(o,m){o.resolve(m),o.open=!1,setTimeout(()=>{const Z=a.findIndex(u=>u.id===o.id);Z!==-1&&a.splice(Z,1)},200)}function s(o,m){m||(o.open=!1,setTimeout(()=>{const Z=a.findIndex(u=>u.id===o.id);Z!==-1&&a.splice(Z,1)},200))}return{dialogStack:a,handleFormResolve:c,handleConfirmResolve:i,handleOpenUpdate:s}},render(){return this.dialogStack.map(c=>{if(c.type==="form")return(0,t.h)(d5,{key:c.id,open:c.open,...c.options,"onUpdate:open":i=>{i||this.handleFormResolve(c,{action:"cancel",data:c.options.modelValue||{}})},onResolve:i=>{this.handleFormResolve(c,i)}});if(c.type==="confirm")return(0,t.h)(Cp,{key:c.id,open:c.open,...c.options,"onUpdate:open":i=>{i||this.handleConfirmResolve(c,!1)},onResolve:i=>{this.handleConfirmResolve(c,i)}});if(c.type==="open"){const i=c.options;return(0,t.h)(At,{key:c.id,open:c.open,title:i.title,width:i.width,position:i.position,dismissable:i.dismissable,class:i.class,"onUpdate:open":s=>{this.handleOpenUpdate(c,s)}},{default:()=>(0,t.h)((typeof i.component=="string",i.component),i.props||{})})}return null})}});if(e.component("DialogContainer",d),typeof document<"u"&&typeof window<"u"){const c=()=>{if(!document.getElementById("bagelink-dialog-root")){const i=document.createElement("div");i.id="bagelink-dialog-root",document.body.appendChild(i);const s=(0,t.createApp)(d);Object.assign(s._context,e._context),s.mount(i)}};document.body&&c(),e.mixin({mounted(){this.$root===this&&c()}})}}};var b0={pint:{pattern:/\d/},int:{pattern:/[\d-]/},pnum:{pattern:/[\d.]/},tel:{pattern:/[\d.\-()\s+]/},money:{pattern:/[\d.\s,]/},number:{pattern:/[\d\-.]/},num:{pattern:/[\d\-.]/},hex:{pattern:/[0-9a-f]/i},email:{pattern:/[\w.\-@]/},alpha:{pattern:/[a-z_]/i},alphanum:{pattern:/\w/},lower:{pattern:/[a-z]/i,transform:e=>e.toLowerCase()},upper:{pattern:/[A-Z]/i,transform:e=>e.toUpperCase()},slug:{pattern:/[a-z0-9-]/i,transform:e=>e.toLowerCase().replace(/\s/g,"-")},snake:{pattern:/[a-z_]/,transform:e=>e.toLowerCase().replace(/\s/g,"_")}},vc=new WeakMap;function Yo(e){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e;const l=e.querySelector("input, textarea");return l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement?l:null}function Mr(e){const l=Object.keys(e.modifiers);return l.length>0?l[l.length-1]:""}function s5(e){return e.pattern!=null?e.pattern:e.modifier!=null&&e.modifier!==""?b0[e.modifier]?.pattern??/./:/./}function Vr(e,l,a){a.keydownEvent=(n=>{TE(n,l,a)}),a.inputEvent=(n=>{o5(n,l,a)}),a.compositionStartEvent=(()=>{IE(a)}),a.compositionEndEvent=(n=>{xE(n,l,a)}),l.addEventListener("keydown",a.keydownEvent),l.addEventListener("input",a.inputEvent,{capture:!0}),l.addEventListener("compositionstart",a.compositionStartEvent),l.addEventListener("compositionend",a.compositionEndEvent)}function Tr(e,l){l.keydownEvent&&e.removeEventListener("keydown",l.keydownEvent),l.inputEvent&&e.removeEventListener("input",l.inputEvent,{capture:!0}),l.compositionStartEvent&&e.removeEventListener("compositionstart",l.compositionStartEvent),l.compositionEndEvent&&e.removeEventListener("compositionend",l.compositionEndEvent),l.keydownEvent=void 0,l.inputEvent=void 0,l.compositionStartEvent=void 0,l.compositionEndEvent=void 0}function VE(e){const l=["Tab","Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"];return e.ctrlKey||e.altKey||e.metaKey?!0:l.includes(e.key)}function TE(e,l,a){if(a.composing===!0||VE(e)||a.modifier!=null&&a.modifier!==""&&typeof b0[a.modifier]?.transform=="function")return;const n=s5(a),d=e.key;n.test(d)||e.preventDefault()}function IE(e){e.composing=!0}function xE(e,l,a){a.composing=!1,o5(e,l,a)}function Ir(e,l){const a=s5(l);let n;if(l.modifier!=null&&l.modifier!==""){const c=b0[l.modifier]?.transform;n=c?c(e):e}else n=e;let d="";for(let c=0;c<n.length;c++){const i=n[c];a.test(i)&&(d+=i)}return d}function o5(e,l,a){if(a.reformatting===!0||a.composing===!0)return;const n=l.value,d=l.selectionEnd??n.length,c=n.slice(0,d),i=Ir(n,a);if(i===n)return;const s=Ir(c,a).length;a.reformatting=!0,l.value=i,l.setSelectionRange(s,s),a.reformatting=!1}var zE={beforeMount(e,l){const a=Yo(e);if(a===null)return;const n={modifier:Mr(l)};typeof l.value=="object"&&l.value!==null&&(n.pattern=l.value.pattern??/./,n.validateOnly=l.value.validateOnly===!0),vc.set(e,n),Vr(e,a,n)},updated(e,l){const a=Yo(e);if(a===null)return;const n=vc.get(e);n!==void 0&&(Tr(a,n),n.modifier=Mr(l),typeof l.value=="object"&&l.value!==null&&(n.pattern=l.value.pattern??/./,n.validateOnly=l.value.validateOnly===!0),Vr(e,a,n))},unmounted(e){const l=Yo(e),a=vc.get(e);l!==null&&a!==void 0&&Tr(l,a),vc.delete(e)},getSSRProps(){return{}}},m5=zE,wE=()=>typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;function gE(e){const l={y:"up",delay:0,once:!0,threshold:.12};return e?typeof e=="string"?{...l,y:e}:{...l,...e}:l}var Lo=new WeakMap,RE={mounted(e,l){const a=gE(l.value);if(wE())return;e.classList.add("bgl-reveal"),a.y!=="none"&&(e.dataset.revealDir=a.y),a.delay&&e.style.setProperty("--bgl-reveal-delay",`${a.delay}ms`);const n=new IntersectionObserver(d=>{for(const c of d)c.isIntersecting?(e.classList.add("bgl-reveal-in"),a.once&&n.unobserve(e)):a.once||e.classList.remove("bgl-reveal-in")},{threshold:a.threshold,rootMargin:"0px 0px -8% 0px"});n.observe(e),Lo.set(e,n)},unmounted(e){Lo.get(e)?.disconnect(),Lo.delete(e)},getSSRProps(){return{}}},Z5=RE;function SE(e){let l=e.__rippleContainer;return(!l||!l.isConnected)&&(l=document.createElement("span"),Object.assign(l.style,{position:"absolute",inset:"0",overflow:"hidden",borderRadius:"inherit",pointerEvents:"none"}),e.appendChild(l),e.__rippleContainer=l),l}var vE={mounted(e,l){const a=n=>{const d=e.getBoundingClientRect(),c=Math.max(d.width,d.height),i=document.createElement("span");i.className="ripple",Object.assign(i.style,{width:`${c}px`,height:`${c}px`,left:`${n.clientX-d.left-c/2}px`,top:`${n.clientY-d.top-c/2}px`,position:"absolute",borderRadius:"50%",transform:"scale(0)",background:"rgba(0, 0, 0, 0.3)",pointerEvents:"none",animation:"rippleEffect 0.6s ease-out"}),SE(e).appendChild(i),setTimeout(()=>{i.remove()},600)};e.__rippleClickHandler=a,l.value!==!1&&(getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.addEventListener("mousedown",a))},updated(e,l){const a=e.__rippleClickHandler;l.value===!1?e.removeEventListener("mousedown",a):(getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.addEventListener("mousedown",a))},unmounted(e){const l=e.__rippleClickHandler;l&&(e.removeEventListener("mousedown",l),delete e.__rippleClickHandler)},getSSRProps(){return{}}},u5=vE,vi=new WeakMap;function xr(e,l){const a=l.value||{},n=O2();let d=a.handle?e.querySelector(a.handle):e;const c=!d;d||(d=e.ownerDocument.createElement("div"),d.className=a.handle.replace(".","")+(a.handleClass?` ${a.handleClass}`:""),d.style.cssText="position:absolute;bottom:0;left:0;right:0;height:6px;background:rgba(0,0,0,0.1);",e.appendChild(d));const i=d,s={cursor:i.style.cursor,userSelect:i.style.userSelect,touchAction:i.style.touchAction},o=["role","tabindex","aria-orientation","aria-label","aria-valuenow","aria-valuemin","aria-valuemax"].map(r=>[r,i.getAttribute(r)]);i.style.cursor="ns-resize",i.style.userSelect="none",i.style.touchAction="none",i.setAttribute("role","separator"),i.setAttribute("tabindex","0"),i.setAttribute("aria-orientation","horizontal"),i.hasAttribute("aria-label")||i.setAttribute("aria-label","Resize height"),i.setAttribute("aria-valuemin",String(a.minHeight??0)),a.maxHeight!==void 0&&i.setAttribute("aria-valuemax",String(a.maxHeight)),i.setAttribute("aria-valuenow",String(e.offsetHeight));function m(r,b,h){const p={clientY:r,deltaY:r-b,initialHeight:h},N=h+p.deltaY,W=a.gridSize&&a.gridSize>0?Math.round(N/a.gridSize)*a.gridSize:N,G=Math.min(a.maxHeight??1/0,Math.max(a.minHeight??0,W));return e.style.height=`${G}px`,i.setAttribute("aria-valuenow",String(G)),a.onResize?.(p),p}function Z(r){if(r.button!==0||r.isPrimary===!1)return;n.cancel();const b=r.clientY,h=e.offsetHeight,p=e.style.height,N=i.getAttribute("aria-valuenow");a.onStart?.(r),n.start(r,{cursor:"ns-resize",onMove:W=>m(W.clientY,b,h),onEnd(W){const G=m(W.clientY,b,h);a.onEnd?.(G)},onCancel(){e.style.height=p,N!==null&&i.setAttribute("aria-valuenow",N),a.onCancel?.()}})}function u(r){if(!["ArrowUp","ArrowDown","Home","End"].includes(r.key)||r.key==="End"&&a.maxHeight===void 0)return;r.preventDefault(),n.cancel();const b=e.offsetHeight,h=(a.gridSize||10)*(r.shiftKey?5:1),p=r.key==="Home"?a.minHeight??0:r.key==="End"?a.maxHeight:b+(r.key==="ArrowUp"?-h:h);a.onStart?.(r);const N=m(p-b,0,b);a.onEnd?.(N)}i.addEventListener("pointerdown",Z),i.addEventListener("keydown",u),vi.set(e,()=>{n.cancel(),i.removeEventListener("pointerdown",Z),i.removeEventListener("keydown",u),Object.assign(i.style,s);for(const[r,b]of o)b===null?i.removeAttribute(r):i.setAttribute(r,b);c&&i.remove(),vi.delete(e)})}const FE={mounted:xr,unmounted(e){vi.get(e)?.()},updated(e,l){l.value!==l.oldValue&&(vi.get(e)?.(),xr(e,l))},getSSRProps(){return{}}};function Fi(e){return e==="richtext"?3:e==="textarea"||e==="json"||e==="radio"||e==="file"||e==="signature"?2:1}function h0(e){if(e.format)switch(e.format){case"email":return"email";case"tel":return"phone";case"uri":case"url":return"url";case"date":case"date-time":return"date"}if(e.enum)return"select";switch(e.type){case"number":case"integer":return"number";case"boolean":return"checkbox"}return"text"}function r5(e){if(!e?.properties)return[];const l=new Set(e.required??[]),a=[],n=Object.keys(e.properties),d=Array.isArray(e["x-property-order"])?e["x-property-order"].filter(i=>typeof i=="string"&&i in e.properties):[],c=[...new Set([...d,...n])];for(const i of c){const s=e.properties[i],o=s["x-field-type"]??h0(s),m={};s.minLength!==void 0&&(m.minLength=s.minLength),s.maxLength!==void 0&&(m.maxLength=s.maxLength),s.minimum!==void 0&&(m.min=s.minimum),s.maximum!==void 0&&(m.max=s.maximum),s.multipleOf!==void 0&&(m.step=s.multipleOf),s.pattern!==void 0&&(m.pattern=s.pattern),s["x-options"]?m.options=s["x-options"]:s.enum&&(m.options=s.enum.map(r=>({label:String(r),value:String(r)})));const Z=s["x-ui"]?.class,u={id:crypto.randomUUID(),key:i,type:o,label:s.title??i,placeholder:s["x-placeholder"],description:s.description,required:l.has(i)||void 0,colSpan:n0(Z)??12,colStart:d0(Z),rowStart:o0(Z),rowSpan:s0(Z)??Fi(o),mColSpan:c0(Z)??12,mColStart:i0(Z),mRowStart:m0(Z),mRowSpan:Z0(Z),class:u0(Z)||void 0,hideLabel:s["x-hide-label"]??!1,condition:s["x-ui"]?.condition||void 0,hidden:s["x-ui"]?.hidden||o==="hidden"||void 0,richTextVariant:s["x-rich-text-variant"],richTextHeight:s["x-rich-text-height"],markdownShowFormatting:s["x-markdown-show-formatting"],textareaRows:s["x-textarea-rows"],textareaAutoHeight:s["x-textarea-autoheight"],numberLayout:s["x-number-layout"],numberSpinner:s["x-number-spinner"]??!0,phoneOnlyCountries:Array.isArray(s["x-phone-only-countries"])?s["x-phone-only-countries"].join(", "):s["x-phone-only-countries"],selectMultiselect:s["x-select-multiselect"],selectSearchable:s["x-select-searchable"],fileMultiple:s["x-file-multiple"],fileHeight:s["x-file-height"],fileAccept:s["x-file-accept"],fileTheme:s["x-file-theme"],fileShowIcon:s["x-file-show-icon"]===!1?!1:void 0,fileIcon:s["x-file-icon"],dateEnableTime:s["x-date-enable-time"],dateMin:s["x-date-min"],dateMax:s["x-date-max"],rangeMulti:s["x-range-multi"],radioThin:s["x-radio-thin"],radioHideRadio:s["x-radio-hide-radio"],radioHideLabelWhenImage:s["x-radio-hide-label-when-image"],radioAlign:s["x-ui"]?.radioAlign??s["x-radio-align"],radioInline:s["x-radio-inline"],radioSize:s["x-radio-size"],radioTextAlign:s["x-ui"]?.radioTextAlign??s["x-radio-text-align"]??"center",textIcon:s["x-text-icon"],textIconStart:s["x-text-icon-start"],validation:Object.keys(m).length>0?m:void 0,defaultValue:s.default,content:s["x-field-type"]==="heading"?s.title:void 0};a.push(u)}return a}function kE(e,l={}){const a={},n=[];for(const c of e){const i={};if(c.type==="heading"||c.type==="divider")i.type="string",i.title=c.content||c.label,i["x-field-type"]=c.type;else{switch(c.type){case"text":case"textarea":case"richtext":case"markdown":case"email":case"phone":case"url":case"date":case"signature":case"color":case"hidden":i.type="string";break;case"file":c.fileMultiple===!0?(i.type="array",i.items={type:"string"}):i.type="string";break;case"number":case"range":i.type="number";break;case"checkbox":case"toggle":i.type="boolean";break;case"json":i.type="object";break;case"select":case"radio":i.type="string",c.validation?.options&&(i.enum=c.validation.options.map(m=>m.value));break}c.type==="email"&&(i.format="email"),c.type==="phone"&&(i.format="tel"),c.type==="url"&&(i.format="uri"),c.type==="date"&&(i.format=c.dateEnableTime?"date-time":"date"),c.type==="color"&&(i.format="color"),i.title=c.label,c.description&&(i.description=c.description),c.defaultValue!==void 0&&(i.default=c.defaultValue),c.type!=="text"&&(i["x-field-type"]=c.type),c.validation?.minLength!==void 0&&(i.minLength=c.validation.minLength),c.validation?.maxLength!==void 0&&(i.maxLength=c.validation.maxLength),c.validation?.min!==void 0&&(i.minimum=c.validation.min),c.validation?.max!==void 0&&(i.maximum=c.validation.max),c.validation?.step!==void 0&&(i.multipleOf=c.validation.step),c.validation?.pattern!==void 0&&(i.pattern=c.validation.pattern),c.required&&(n.push(c.key),c.type==="checkbox"&&(i.const=!0))}c.placeholder&&(i["x-placeholder"]=c.placeholder),c.validation?.options&&(i["x-options"]=c.validation.options);const s=c.rowSpan??Fi(c.type),o=a5(c.class,{colSpan:c.colSpan,colStart:c.colStart,rowStart:c.rowStart,rowSpan:l.freeGrid?s>1?s:void 0:s===Fi(c.type)?void 0:s,mColSpan:c.mColSpan,mColStart:c.mColStart,mRowStart:c.mRowStart,mRowSpan:c.mRowSpan});o&&(i["x-ui"]={...i["x-ui"],class:o}),c.condition&&(i["x-ui"]={...i["x-ui"],condition:c.condition}),c.hidden===!0&&(i["x-ui"]={...i["x-ui"],hidden:!0}),c.hideLabel===!0&&(i["x-hide-label"]=!0),c.richTextVariant&&(i["x-rich-text-variant"]=c.richTextVariant),c.richTextHeight!==void 0&&(i["x-rich-text-height"]=c.richTextHeight),c.markdownShowFormatting===!0&&(i["x-markdown-show-formatting"]=!0),c.textareaRows!==void 0&&(i["x-textarea-rows"]=c.textareaRows),c.textareaAutoHeight===!0&&(i["x-textarea-autoheight"]=!0),c.numberLayout&&c.numberLayout!=="default"&&(i["x-number-layout"]=c.numberLayout),c.numberSpinner===!1&&(i["x-number-spinner"]=!1),c.phoneOnlyCountries&&(i["x-phone-only-countries"]=c.phoneOnlyCountries),c.selectMultiselect===!0&&(i["x-select-multiselect"]=!0),c.selectSearchable===!0&&(i["x-select-searchable"]=!0),c.fileMultiple===!0&&(i["x-file-multiple"]=!0),c.fileHeight!==void 0&&(i["x-file-height"]=c.fileHeight),c.fileAccept&&(i["x-file-accept"]=c.fileAccept),c.fileTheme&&(i["x-file-theme"]=c.fileTheme),c.fileShowIcon===!1&&(i["x-file-show-icon"]=!1),c.fileIcon&&(i["x-file-icon"]=c.fileIcon),c.dateEnableTime===!0&&(i["x-date-enable-time"]=!0),c.dateMin&&(i["x-date-min"]=c.dateMin),c.dateMax&&(i["x-date-max"]=c.dateMax),c.rangeMulti===!0&&(i["x-range-multi"]=!0),c.radioThin===!0&&(i["x-radio-thin"]=!0),c.radioHideRadio===!0&&(i["x-radio-hide-radio"]=!0),c.radioHideLabelWhenImage===!0&&(i["x-radio-hide-label-when-image"]=!0),c.radioAlign&&(i["x-ui"]={...i["x-ui"],radioAlign:c.radioAlign}),c.radioInline===!0&&(i["x-radio-inline"]=!0),c.radioSize&&(i["x-radio-size"]=c.radioSize),c.radioTextAlign&&(i["x-ui"]={...i["x-ui"],radioTextAlign:c.radioTextAlign}),c.textIcon&&(i["x-text-icon"]=c.textIcon),c.textIconStart&&(i["x-text-icon-start"]=c.textIconStart),a[c.key]=i}const d={$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:a};return n.length>0&&(d.required=n),d}function Jm(e,l){if(typeof l!="string")return l;const a=l.trim();switch(e.type){case"checkbox":case"toggle":return a.toLowerCase()==="true"?!0:a.toLowerCase()==="false"?!1:l;case"number":case"range":{if(!a)return l;const n=Number(a);return Number.isNaN(n)?l:n}default:return l}}function fE(e,l){const a={};for(const n of e)if(!(n.type==="heading"||n.type==="divider")){if(l&&n.key in l){a[n.key]=Jm(n,l[n.key]);continue}if(n.defaultValue!==void 0){a[n.key]=Jm(n,n.defaultValue);continue}switch(n.type){case"checkbox":case"toggle":a[n.key]=!1;break;case"number":case"range":a[n.key]=n.validation?.min??0;break;default:a[n.key]=""}}return a}function jE(e,l){const a={};for(const n of e){if(n.type==="heading"||n.type==="divider"||n.type==="hidden"||n.hidden===!0)continue;const d=l[n.key];if(n.required&&(d==null||d==="")){a[n.key]=`${n.label} is required`;continue}if(d==null||d==="")continue;const c=n.validation;if(typeof d=="string"){if(c?.minLength!==void 0&&d.length<c.minLength){a[n.key]=`${n.label} must be at least ${c.minLength} characters`;continue}if(c?.maxLength!==void 0&&d.length>c.maxLength){a[n.key]=`${n.label} must be at most ${c.maxLength} characters`;continue}if(c?.pattern&&!new RegExp(c.pattern).test(d)){a[n.key]=`${n.label} format is invalid`;continue}}if(typeof d=="number"){if(c?.min!==void 0&&d<c.min){a[n.key]=`${n.label} must be at least ${c.min}`;continue}if(c?.max!==void 0&&d>c.max){a[n.key]=`${n.label} must be at most ${c.max}`;continue}}}return a}function JE(e){return{fields:(0,t.computed)(()=>r5(e.value))}}const CE=!0;var Oe=class{_type;_config;_condition;_hidden;_validations;_onUpdate;_class;_slots;_component;constructor(e,l={}){this._type=e,this._config=l}if(e){return this._condition=e,this}hidden(e=!0){return this._hidden=e,this}validate(e){return this._validations||(this._validations=[]),this._validations.push(e),this}onUpdate(e){return this._onUpdate=e,this}class(e){return this._class=this._class?`${this._class} ${e}`:e,this}required(e){return this._config.required=!0,e&&(this._config.requiredMessage=e),this}slot(e,l,a){return this._slots||(this._slots=[]),typeof e!="string"||l!==void 0&&typeof l!="string"?this._slots.push({component:e,props:l}):this._slots.push({name:e,component:l,props:a}),this}};function nl(e,l){return typeof e=="string"?{...l,label:e}:e??{}}const dl={text(e,l){return new Oe("text",nl(e,l))},email(e,l){return new Oe("email",nl(e,l))},password(e,l){return new Oe("password",nl(e,l))},number(e,l){return new Oe("number",nl(e,l))},tel(e,l){return new Oe("tel",nl(e,l))},url(e,l){return new Oe("url",nl(e,l))},date(e,l){return new Oe("date",nl(e,l))},time(e,l){return new Oe("time",nl(e,l))},datetime(e,l){return new Oe("datetime",nl(e,l))},textarea(e,l){return new Oe("textarea",nl(e,l))},richtext(e,l){return new Oe("richtext",nl(e,l))},json(e,l){const a=nl(e,l);return a.language||(a.language="json"),new Oe("json",a)},checkbox(e,l){return new Oe("checkbox",nl(e,l))},toggle(e,l){return new Oe("toggle",nl(e,l))},radio(e,l,a){if(typeof e=="string"){const n=e,d=l;return new Oe("radio",{...a,label:n,options:d})}return new Oe("radio",{...nl(l,a),options:e})},select(e,l,a){if(typeof e=="string"){const n=e,d=l;return new Oe("select",{...a,label:n,options:d})}return new Oe("select",{...nl(l,a),options:e})},multiselect(e,l,a){if(typeof e=="string"){const n=e,d=l;return new Oe("multiselect",{...a,label:n,options:d,multiple:!0})}return new Oe("multiselect",{...nl(l,a),options:e})},color(e,l){return new Oe("color",nl(e,l))},icon(e,l){return new Oe("icon",nl(e,l))},range(e,l){return new Oe("range",nl(e,l))},custom(e,l,a){return Wt(e)||Ns(e),new Oe(e,nl(l,a))},upload(e,l){return new Oe("upload",nl(e,l))},array(e,l,a){if(typeof e=="string"){const d=e,c=l;return new Oe("array",{...a??{},label:d,schema:c})}const n=e;return new Oe("array",{...nl(l,a),schema:n})},component(e,l={}){const a=new Oe("component",l);return a._component={component:e,props:l},a},display(e,l={}){const a=new Oe("display",l);return a._component={component:e,props:l},a}};var Cm=class b5{_isSchema=!0;_label;_fields;_condition;_class;constructor(l,a){this._fields=l,this._label=a}if(l){return this._condition=l,this}class(l){return this._class=this._class?`${this._class} ${l}`:l,this}defaults(l){for(const[a,n]of Object.entries(l))this._fields[a]&&this._fields[a]._config.default===void 0&&(this._fields[a]._config.default=n);return this}getDefaults(){const l={};for(const[a,n]of Object.entries(this._fields))n._config.default!==void 0&&(l[a]=n._config.default);return l}toJSONSchema(){const l={},a=[];for(const[c,i]of Object.entries(this._fields)){const s=i._config,o=Wt(i._type),m=o?.jsonSchema?.type??b5.getJSONSchemaType(i._type),Z={type:m};if(s.label&&(Z.title=s.label),s.helpText&&(Z.description=s.helpText),s.default!==void 0&&(Z.default=s.default),s.options){const b=s.options.map(h=>Wa(h)??h);i._type==="multiselect"?Z.items={type:"string",enum:b}:Z.enum=b}s.min!==void 0&&(Z[m==="string"?"minLength":"minimum"]=s.min),s.max!==void 0&&(Z[m==="string"?"maxLength":"maximum"]=s.max),i._type==="email"&&(Z.format="email"),i._type==="url"&&(Z.format="uri"),i._type==="date"&&(Z.format="date"),i._type==="time"&&(Z.format="time"),i._type==="datetime"&&(Z.format="date-time");const u={};i._type!=="text"&&(u.fieldType=i._type),o&&(Z["x-field-type"]=i._type),s.placeholder&&(u.placeholder=s.placeholder),s.disabled&&(u.disabled=s.disabled),s.readonly&&(u.readonly=s.readonly),s.autoheight&&(u.autoheight=s.autoheight),s.rows&&(u.rows=s.rows),s.cols&&(u.cols=s.cols),(i._type==="select"||i._type==="multiselect")&&s.searchable!==void 0&&(Z["x-select-searchable"]=s.searchable),i._class&&(u.class=i._class),i._condition&&(u.condition=i._condition),i._hidden&&(u.hidden=!0),i._type==="array"&&(s.allowAdd!==void 0&&(u.allowAdd=s.allowAdd),s.allowDelete!==void 0&&(u.allowDelete=s.allowDelete)),i._component&&(u.component=typeof i._component.component=="string"?i._component.component:i._component.component.name||"CustomComponent",i._component.props&&(u.componentProps=i._component.props)),Object.keys(u).length>0&&(Z["x-ui"]=u);const r=o?.jsonSchema?.serialize?.(s,{key:c,required:s.required===!0});r&&Object.assign(Z,r),l[c]=Z,s.required===!0&&a.push(c)}const n={type:"object",properties:l};a.length>0&&(n.required=a),this._label&&(n.title=this._label);const d={};return this._condition&&(d.condition=this._condition),this._class&&(d.class=this._class),Object.keys(d).length>0&&(n["x-ui"]=d),n}static getJSONSchemaType(l){return{text:"string",email:"string",password:"string",number:"number",tel:"string",url:"string",date:"string",time:"string",datetime:"string",textarea:"string",richtext:"string",json:"object",checkbox:"boolean",toggle:"boolean",radio:"string",select:"string",multiselect:"array",array:"array"}[l]||"string"}};function DE(e,l){if(typeof e=="string"){if(!l)throw new Error("Fields are required when providing a label");return new Cm(l,e)}return new Cm(e)}function UE(e){return e}function OE(e){return async(l,a)=>{if(!l.endpoint.startsWith("/")||l.endpoint.startsWith("//"))throw new Error("Form option endpoints must be same-origin paths");const n={};return l.searchParam&&a&&(n[l.searchParam]=a),l.limitParam&&l.limit!=null&&(n[l.limitParam]=l.limit),(await e.get(l.endpoint,{params:n})).data}}function Fc(e,l){return l?l.split(".").reduce((a,n)=>{if(!(a==null||typeof a!="object"))return a[n]},e):e}function zr(e,l){const a=Fc(e,l.itemsPath);return Array.isArray(a)?a.flatMap(n=>{const d=Fc(n,l.valuePath??"id"),c=Fc(n,l.labelPath??"name");if(d==null||c==null)return[];const i=l.subtitlePath?Fc(n,l.subtitlePath):void 0;return[{label:String(c),value:String(d),...i==null?{}:{subtitle:String(i)}}]}):[]}function Dm(e,l){const a={},n=new Set(e.required||[]);if(e.properties){const c=Object.keys(e.properties),i=Array.isArray(e["x-property-order"])?e["x-property-order"].filter(s=>typeof s=="string"&&s in e.properties):[];for(const s of new Set([...i,...c])){const o=e.properties[s];a[s]=KE(s,o,n.has(s),e,l?.loadOptionsSource)}}const d=new Cm(a,e.title);return e["x-ui"]?.condition&&d.if(e["x-ui"].condition),e["x-ui"]?.class&&d.class(e["x-ui"].class),d}function EE(e,l){const a=e.match(/^#\/(\$defs|definitions)\/(.+)$/);if(!a)return;const[,n,d]=a,c=n==="$defs"?l.$defs:l.definitions;return d?c?.[d]:void 0}function BE(e,l){const a=e.anyOf||e.oneOf;if(!a||a.length===0)return e;const n=a.filter(i=>i.type!=="null");if(n.length===1){const i=n[0];return{...i,...e,type:e.type??i.type,title:e.title||i.title,description:e.description||i.description,default:e.default!==void 0?e.default:i.default,"x-ui":{...i["x-ui"],...e["x-ui"]}}}const d=["object","array","string","number","integer","boolean"],c=n.sort((i,s)=>d.indexOf(i.type||"string")-d.indexOf(s.type||"string"))[0];return{...c,...e,type:e.type??c.type,title:e.title||c.title,description:e.description||c.description,default:e.default!==void 0?e.default:c.default,"x-ui":{...c["x-ui"],...e["x-ui"]}}}function KE(e,l,a,n,d){let c=l;if(l.$ref){const b=EE(l.$ref,n);b&&(c={...b,type:l.type??b.type,enum:l.enum??b.enum,title:l.title??b.title,description:l.description??b.description,default:l.default!==void 0?l.default:b.default,"x-ui":{...b["x-ui"],...l["x-ui"]}})}(c.anyOf||c.oneOf)&&(c=BE(c,n));const i=c["x-ui"]||{};let s=i.fieldType||c["x-field-type"]||wr(c);s==="select"&&c["x-select-multiselect"]&&(s="multiselect");const o=c["x-options"],m={},Z=Wt(s);c.title&&(m.label=c.title),c.description&&(m.helpText=c.description),c.default!==void 0&&(m.default=c.default),(a||i.required===!0)&&(m.required=!0),i.placeholder&&(m.placeholder=i.placeholder),c["x-placeholder"]&&(m.placeholder=c["x-placeholder"]),HE(m,c),Z?.settingsDefaults&&Object.assign(m,Z.settingsDefaults);const u=Z?.jsonSchema?.parse?.(c,{key:e,required:a||i.required===!0});if(u&&Object.assign(m,u),c["x-options-source"]){if(!d)throw new Error(`Field "${e}" requires an x-options-source loader`);const b=c["x-options-source"];let h;m.options=async p=>{const N=b.searchParam?zr(await d(b,p),b):h??=zr(await d(b,b.searchParam?p:""),b);if(b.searchParam||!p.trim())return N;const W=p.trim().toLocaleLowerCase();return N.filter(G=>[G.label,G.subtitle,G.value].some(Y=>Y?.toLocaleLowerCase().includes(W)))},c["x-select-searchable"]===void 0&&(m.searchable=!0)}i.radioAlign!==void 0&&(m.align=i.radioAlign),i.radioTextAlign!==void 0&&(m.textAlign=i.radioTextAlign),i.disabled&&(m.disabled=i.disabled),i.readonly&&(m.readonly=i.readonly),i.autoheight&&(m.autoheight=i.autoheight),i.rows&&(m.rows=i.rows),i.cols&&(m.cols=i.cols),c.minimum!==void 0&&(m.min=c.minimum),c.maximum!==void 0&&(m.max=c.maximum),c.minLength!==void 0&&(m.min=c.minLength),c.maxLength!==void 0&&(m.max=c.maxLength),c.pattern!==void 0&&(m.pattern=c.pattern);let r;switch(s){case"heading":r=new Oe("heading",m);break;case"divider":r=new Oe("divider",m);break;case"email":r=dl.email(m);break;case"password":r=dl.password(m);break;case"number":r=dl.number(m);break;case"tel":case"phone":r=dl.tel(m);break;case"url":r=dl.url(m);break;case"date":r=dl.date(m);break;case"time":r=dl.time(m);break;case"datetime":r=dl.datetime(m);break;case"textarea":r=dl.textarea(m);break;case"richtext":r=dl.richtext(m);break;case"json":r=dl.json(m);break;case"checkbox":r=dl.checkbox(m);break;case"toggle":r=dl.toggle(m);break;case"radio":r=dl.radio(o??c.enum??[],m);break;case"select":r=dl.select(m.options??o??c.enum??[],m);break;case"multiselect":r=dl.multiselect(m.options??o??c.enum??[],m);break;case"icon":r=dl.icon(m);break;case"file":case"upload":r=dl.upload(m);break;case"array":{const b={...m};i.allowAdd!==void 0&&(b.allowAdd=i.allowAdd),i.allowDelete!==void 0&&(b.allowDelete=i.allowDelete),c.items?.type&&(b.itemType=wr(c.items)),r=dl.array(c.title||e,void 0,b);break}case"display":r=dl.display(i.component||"div",i.componentProps||{});break;case"component":r=dl.component(i.component||"div",i.componentProps||{});break;default:Z?r=new Oe(s,m):Gs(s)?(Ns(s),m.missingCustomRegistration=!0,r=new Oe(s,m)):r=dl.text(m);break}if(i.component&&s!=="component"&&s!=="display"&&(r._component={component:i.component,props:i.componentProps||{}}),c.const!==void 0&&r.validate(b=>b===c.const?!0:m.requiredMessage||"form.required"),c.pattern){const b=new RegExp(c.pattern);r.validate(h=>h==null||h===""||b.test(String(h))?!0:"form.pattern")}return i.class&&r.class(i.class),i.condition&&r.if(i.condition),i.hidden&&r.hidden(),r}function HE(e,l){const a=l,n=(i,s)=>{a[s]!==void 0&&(e[i]=a[s])};a["x-radio-inline"]&&(e.inline=!0),a["x-radio-thin"]&&(e.thin=!0),a["x-radio-hide-radio"]&&(e.hideRadio=!0),a["x-radio-hide-label-when-image"]&&(e.hideLabelWhenImage=!0),n("align","x-radio-align"),n("textAlign","x-radio-text-align"),a["x-select-multiselect"]&&(e.multiple=!0),n("searchable","x-select-searchable"),n("rows","x-textarea-rows"),n("autoheight","x-textarea-autoheight"),n("layout","x-number-layout"),a["x-number-spinner"]===!1&&(e.spinner=!1),typeof a["x-phone-only-countries"]=="string"?e.onlyCountries=a["x-phone-only-countries"].split(",").map(i=>i.trim()).filter(Boolean):Array.isArray(a["x-phone-only-countries"])&&(e.onlyCountries=a["x-phone-only-countries"]),n("defaultCountry","x-phone-default-country"),a["x-range-multi"]&&(e.multiRange=!0),a["x-file-multiple"]&&(e.multiple=!0);const d=a["x-file-height"];d!==void 0&&(e.height=typeof d=="number"?`${d}px`:d),n("accept","x-file-accept"),n("theme","x-file-theme"),a["x-file-show-icon"]===!1&&(e.showIcon=!1),n("icon","x-file-icon"),a["x-date-enable-time"]&&(e.enableTime=!0),n("min","x-date-min"),n("max","x-date-max"),n("icon","x-text-icon"),n("iconStart","x-text-icon-start");const c=a["x-rich-text-variant"];c==="basic"?e.basic=!0:c==="simple"&&(e.simple=!0),n("height","x-rich-text-height"),a["x-markdown-show-formatting"]&&(e.showFormatting=!0),a["x-hide-label"]===!0&&(e.hideLabel=!0)}function wr(e){if(e.format)switch(e.format){case"email":return"email";case"uri":return"url";case"date":return"date";case"time":return"time";case"date-time":return"datetime"}if(e.enum)return"select";switch(e.type){case"boolean":return"checkbox";case"number":case"integer":return"number";case"array":return"array";case"object":return"json";default:return"text"}}var PE={class:"multi-step-form"},QE={class:"step-progress"},AE=["onClick"],_E={class:"step-number"},$E={class:"step-label"},qE={key:0},eB={key:0,class:"step-title"},lB={key:1,class:"validation-errors"},tB={class:"step-navigation"},aB=["disabled"],nB={class:"step-counter"},dB=(0,t.defineComponent)({__name:"MultiStepForm",props:{schema:{},modelValue:{},currentStep:{},components:{},validateOnNext:{type:Boolean,default:!0}},emits:["update:modelValue","update:currentStep","stepChange","complete","validationError"],setup(e,{expose:l,emit:a}){const n=e,d=a,{$t:c}=tl(),i=(0,t.useSlots)(),s=(0,t.computed)(()=>Object.keys(i)),o=(0,t.ref)({...n.modelValue||{}}),m=(0,t.ref)(n.currentStep!=null&&n.currentStep!==""?n.currentStep:Object.keys(n.schema)[0]);let Z=!1;(0,t.watch)(()=>n.modelValue,g=>{Z||(o.value={...g||{}})},{deep:!0}),(0,t.watch)(o,g=>{Z=!0,d("update:modelValue",g),setTimeout(()=>{Z=!1},0)},{deep:!0}),(0,t.watch)(()=>n.currentStep,g=>{g!=null&&(m.value=g)}),(0,t.watch)(m,g=>{d("update:currentStep",g),d("stepChange",g)});function u(g,C){const E=C.split(".");let _=g;for(const $ of E)_=_?.[$];return _}function r(g,C){if(!g)return!0;try{const E=Fd(g);if(E.length===0)return!0;let _=!0,$=null;for(let f=0;f<E.length;f++){const U=E[f],Q=u(C,U.field),{op:w,value:K,connector:O}=U;let R=!1;switch(w){case"eq":R=Q===K;break;case"ne":R=Q!==K;break;case"gt":R=K!=null&&Q>K;break;case"ge":R=K!=null&&Q>=K;break;case"lt":R=K!=null&&Q<K;break;case"le":R=K!=null&&Q<=K;break;case"co":R=K!=null&&String(Q).includes(String(K));break;case"sw":R=K!=null&&String(Q).startsWith(String(K));break;case"ew":R=K!=null&&String(Q).endsWith(String(K));break;case"pr":R=Q!=null;break;default:R=!1}f===0?(_=R,$=R):(O==="or"?_=($??!1)||R:O==="and"&&(_=($??!1)&&R),$=_)}return _}catch{return!0}}function b(g){return g._condition==null?!0:r(g._condition,o.value)}const h=(0,t.computed)(()=>Object.entries(n.schema).filter(([,g])=>b(g)).map(([g,C])=>({key:g,schema:C}))),p=(0,t.computed)(()=>h.value.findIndex(g=>g.key===m.value)),N=(0,t.computed)(()=>p.value===0),W=(0,t.computed)(()=>p.value===h.value.length-1),G=(0,t.computed)(()=>h.value[p.value]?.schema),Y=(0,t.ref)({});function L(g){return g._hidden?!1:g._condition==null?!0:r(g._condition,o.value)}function X(g){const C=g.replace(/\[(\d+)\]/g,".$1");return u(o.value,C)}function T(g){return!!(g==null||typeof g=="string"&&g.trim()===""||Array.isArray(g)&&g.length===0)}function V(){if(!n.validateOnNext||G.value==null)return!0;const g={},C=G.value._fields;for(const[E,_]of Object.entries(C)){if(_._type==="display"||!L(_))continue;const $=X(E),f=_._config;if(f.required===!0&&T($)){g[E]=`${typeof f.label=="string"?f.label:E} is required`;continue}if(_._validations&&!T($))for(const U of _._validations){const Q=U($);if(Q!==!0){g[E]=Q;break}}}return Y.value=g,Object.keys(g).length>0?(d("validationError",g),!1):!0}function y(g,C){return C._label!=null?C._label:g.split(/[._-]/).map(E=>E.charAt(0).toUpperCase()+E.slice(1)).join(" ")}function x(g){const C=h.value.findIndex(E=>E.key===g);if(C!==-1){if(C<p.value){m.value=g,Y.value={};return}C>p.value&&!V()||(m.value=g)}}function M(){if(V())if(W.value)d("complete");else{const g=p.value+1;m.value=h.value[g].key,Y.value={}}}function F(){if(!N.value){const g=p.value-1;m.value=h.value[g].key,Y.value={}}}return l({validateCurrentStep:V,stepErrors:Y,nextStep:M,prevStep:F,goToStep:x,visibleSteps:h,activeStep:m,currentStepIndex:p,isFirstStep:N,isLastStep:W}),(g,C)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",PE,[(0,t.createElementVNode)("div",QE,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(h.value,(E,_)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:E.key,class:(0,t.normalizeClass)(["step-indicator",{active:E.key===m.value,completed:_<p.value}]),onClick:$=>x(E.key)},[(0,t.createElementVNode)("div",_E,(0,t.toDisplayString)(_+1),1),(0,t.createElementVNode)("div",$E,(0,t.toDisplayString)(y(E.key,E.schema)),1)],10,AE))),128))]),G.value!=null?((0,t.openBlock)(),(0,t.createElementBlock)("div",qE,[G.value._label?((0,t.openBlock)(),(0,t.createElementBlock)("h2",eB,(0,t.toDisplayString)(G.value._label),1)):(0,t.createCommentVNode)("",!0),Object.keys(Y.value).length>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",lB,[(0,t.createElementVNode)("ul",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(Y.value,(E,_)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:_},(0,t.toDisplayString)(E),1))),128))])])):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(g.$slots,`step:${m.value}`,{schema:G.value,formData:o.value,stepKey:m.value,errors:Y.value},()=>[(0,t.createVNode)(Ls,{modelValue:o.value,"onUpdate:modelValue":C[0]||(C[0]=E=>o.value=E),schema:G.value,components:e.components,errors:Y.value},(0,t.createSlots)({_:2},[(0,t.renderList)(s.value,E=>({name:E,fn:(0,t.withCtx)(_=>[(0,t.renderSlot)(g.$slots,E,(0,t.normalizeProps)((0,t.guardReactiveProps)(_)),void 0,!0)])}))]),1032,["modelValue","schema","components","errors"])],!0)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",tB,[(0,t.createElementVNode)("button",{type:"button",class:"btn-secondary",disabled:N.value,onClick:F},(0,t.toDisplayString)((0,t.unref)(c)("multiStep.previous")),9,aB),(0,t.createElementVNode)("div",nB,(0,t.toDisplayString)((0,t.unref)(c)("multiStep.step",{current:p.value+1,total:h.value.length})),1),(0,t.createElementVNode)("button",{type:"button",class:"btn-primary",onClick:M},(0,t.toDisplayString)(W.value?(0,t.unref)(c)("multiStep.complete"):(0,t.unref)(c)("multiStep.next")),1)])]))}}),cB=Ye(dB,[["__scopeId","data-v-7a55f4bb"]]);function iB(){return{steps:[],transitions:[]}}function sB(e){return!!e&&e.steps.length>1}function Md(e,l){if(l!=null)return e.steps.find(a=>a.key===l)}function h5(e,l){return e.transitions.filter(a=>a.from===l)}function oB(e){const l=e.schema?.properties;return l&&typeof l=="object"?Object.entries(l):[]}function p5(e){return e?.autoAdvance===!0}function W5(e){if(!e)return null;const l=oB(e);return l.length===1?l[0][0]:null}function ki(e){return e.startId&&Md(e,e.startId)?e.startId:e.steps[0]?.key}function Xs(e,l,a){for(const n of h5(e,l))if(!n.condition||n.condition.trim()===""||L2(n.condition,a))return n.to;return null}function mB(e,l,a){return Xs(e,l,a)===null}function Um(e,l,a){const n=ki(e);if(!n||!l)return 0;const d=new Set;let c=n,i=0,s=0,o=!1;for(;c&&!d.has(c);)d.add(c),s++,o||(c===l?o=!0:i++),c=Xs(e,c,a);return s<=1?o?100:0:Math.round(i/(s-1)*100)}function ZB(e){const l={},a=[];for(const d of e.steps){const c=d.schema?.properties;c&&typeof c=="object"&&Object.assign(l,c);const i=d.schema?.required;if(Array.isArray(i))for(const s of i)a.includes(s)||a.push(s)}const n={type:"object",properties:l};return a.length&&(n.required=a),n}var uB={class:"form-flow-player"},rB={class:"ffp-stage"},bB={key:0,class:"ffp-title"},hB={key:1,class:"ffp-empty"},pB={class:"ffp-nav flex flex-center gap-1"},WB={key:0,class:"ffp-counter flex-center round bg-primary-10 color-primary px-075 txt13 medium tabular-nums"},GB=(0,t.defineComponent)({__name:"FormFlowPlayer",props:{structure:{},modelValue:{},components:{},formName:{default:""},animated:{type:Boolean,default:!0},autoAdvance:{type:Boolean,default:!0},autoAdvanceDelay:{default:200},redirect:{type:Boolean,default:!0},hideTitle:{type:Boolean,default:!1},hideCounter:{type:Boolean,default:!1},onComplete:{},beforePrimary:{},loadOptionsSource:{}},emits:["update:modelValue","stepChange","progress","stepEnter","stepComplete","formComplete","redirect","complete"],setup(e,{expose:l,emit:a}){const n=e,d=a,{$t:c}=tl(),i=(0,t.useSlots)(),s=(0,t.computed)(()=>Object.keys(i).filter(U=>U!=="nav"&&U!=="primary-label"&&U!=="step"&&U!=="empty")),o=(0,t.ref)("next"),m=(0,t.computed)(()=>n.animated?o.value==="prev"?"ffp-slide-prev":"ffp-slide-next":""),Z=(0,t.ref)({...n.modelValue||{}});(0,t.watch)(Z,U=>d("update:modelValue",U),{deep:!0}),(0,t.watch)(()=>n.modelValue,U=>{U&&U!==Z.value&&(Z.value={...U})},{deep:!0});const u=(0,t.ref)(ki(n.structure)),r=(0,t.ref)([]);(0,t.watch)(()=>n.structure,()=>{u.value=ki(n.structure),r.value=[]},{deep:!0}),(0,t.watch)(u,U=>{U&&d("stepChange",U)},{immediate:!0});const b=(0,t.computed)(()=>Md(n.structure,u.value??null));function h(U){const Q=Md(n.structure,U),w=Um(n.structure,U,Z.value),K=r.value.length+1,O=w>0?Math.round(K/w*100):null;return{formName:n.formName,stepKey:U,stepTitle:Q?.title??"",stepIndex:K,totalSteps:O,skipSubmit:Q?.skipSubmit??!1,formData:{...Z.value}}}(0,t.watch)(u,(U,Q)=>{U&&U!==Q&&d("stepEnter",h(U))},{immediate:!0});const p=(0,t.computed)(()=>{const U=b.value;return U?Dm(U.schema,{loadOptionsSource:n.loadOptionsSource}):null}),N=(0,t.computed)(()=>Object.assign({},...n.structure.steps.map(U=>Dm(U.schema,{loadOptionsSource:n.loadOptionsSource})._fields))),W=(0,t.computed)(()=>u.value?Xs(n.structure,u.value,Z.value):null),G=(0,t.computed)(()=>W.value===null),Y=(0,t.computed)(()=>r.value.length>0),L=(0,t.computed)(()=>Um(n.structure,u.value,Z.value));(0,t.watch)(L,U=>d("progress",U),{immediate:!0});const X=(0,t.ref)(null),T=(0,t.ref)(!1);function V(U){X.value=U}function y(){return X.value?.validate()??!0}async function x(){if(!y())return;const U=b.value;if(await n.beforePrimary?.({data:{...Z.value},currentStep:U,isTerminal:G.value})===!1)return;if(G.value){T.value=!0;try{const w=a0(N.value,Z.value);U?.skipSubmit||await n.onComplete?.(w),u.value&&d("formComplete",h(u.value));const K=U?.redirectUrl?.trim();K&&(d("redirect",K),n.redirect&&typeof window<"u"&&window.location.assign(K)),d("complete",{...Z.value})}finally{T.value=!1}return}const Q=W.value;if(Q&&u.value){const w=Md(n.structure,Q);d("stepComplete",{...h(u.value),destinationStepKey:Q,destinationStepTitle:w?.title??""}),o.value="next",r.value.push(u.value),u.value=Q}}const M=(0,t.computed)(()=>n.autoAdvance&&p5(b.value)),F=(0,t.computed)(()=>W5(b.value));let g=null;const C=(0,t.ref)(null);function E(){g&&(clearTimeout(g),g=null)}const _=(0,t.ref)(F.value?Z.value[F.value]:void 0);(0,t.watch)(u,()=>{E(),C.value=null,_.value=F.value?Z.value[F.value]:void 0},{flush:"sync"}),(0,t.watch)(()=>F.value?Z.value[F.value]:void 0,U=>{M.value&&C.value!==u.value&&(!(U!=null&&U!=="")||U===_.value||(E(),g=setTimeout(()=>{M.value&&(C.value=u.value??null,x())},n.autoAdvanceDelay)))});function $(){const U=r.value.pop();U&&(o.value="prev",u.value=U)}const f=(0,t.computed)(()=>r.value.length+1);return l({formData:Z,currentKey:u,nextKey:W,isTerminal:G,progress:L,validateStep:y}),(U,Q)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",uB,[(0,t.createElementVNode)("div",rB,[(0,t.createVNode)(t.Transition,{name:m.value,mode:"out-in"},{default:(0,t.withCtx)(()=>[b.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:u.value,class:"ffp-step"},[!e.hideTitle&&b.value.title?((0,t.openBlock)(),(0,t.createElementBlock)("h2",bB,(0,t.toDisplayString)(b.value.title),1)):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(U.$slots,"step",{step:b.value,formData:Z.value,stepKey:u.value,schema:p.value,setFormRef:V},()=>[p.value?((0,t.openBlock)(),(0,t.createBlock)(Ls,{key:0,ref_key:"formRef",ref:X,modelValue:Z.value,"onUpdate:modelValue":Q[0]||(Q[0]=w=>Z.value=w),schema:p.value,components:e.components},(0,t.createSlots)({_:2},[(0,t.renderList)(s.value,w=>({name:w,fn:(0,t.withCtx)(K=>[(0,t.renderSlot)(U.$slots,w,(0,t.normalizeProps)((0,t.guardReactiveProps)(K)),void 0,!0)])}))]),1032,["modelValue","schema","components"])):(0,t.createCommentVNode)("",!0)],!0)])):((0,t.openBlock)(),(0,t.createElementBlock)("div",hB,[(0,t.renderSlot)(U.$slots,"empty",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.empty")??"No steps to display."),1)],!0)]))]),_:3},8,["name"])]),(0,t.renderSlot)(U.$slots,"nav",{canGoBack:Y.value,isTerminal:G.value,submitting:T.value,goBack:$,goPrimary:x,stepPosition:f.value,progress:L.value,currentKey:u.value,primaryLabel:b.value?.primaryLabel,autoAdvances:M.value},()=>[(0,t.createElementVNode)("div",pB,[(0,t.createVNode)(oe,{class:"ffp-nav-btn",flat:"",icon:"arrow_back",value:(0,t.unref)(c)?.("multiStep.previous")??"Back",disabled:!Y.value,onClick:$},null,8,["value","disabled"]),e.hideCounter?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("span",WB,(0,t.toDisplayString)(f.value),1)),G.value?((0,t.openBlock)(),(0,t.createBlock)(oe,{key:1,class:"ffp-nav-btn",value:b.value?.primaryLabel||(0,t.unref)(c)?.("multiStep.complete")||"Submit",loading:T.value,onClick:x},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(U.$slots,"primary-label",{isTerminal:!0},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.complete")??"Submit"),1)],!0)]),_:3},8,["value","loading"])):((0,t.openBlock)(),(0,t.createBlock)(oe,{key:2,class:"ffp-nav-btn","icon-end":"arrow_forward",value:(0,t.unref)(c)?.("multiStep.next")??"Next",disabled:T.value,onClick:x},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(U.$slots,"primary-label",{isTerminal:!1},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.next")??"Next"),1)],!0)]),_:3},8,["value","disabled"]))])],!0)]))}}),NB=Ye(GB,[["__scopeId","data-v-0c1c1939"]]);function st(e){var l;return((l=e.ownerDocument)==null?void 0:l.defaultView)||window}function Jt(e){return st(e).getComputedStyle(e)}var gr=Math.min,Vd=Math.max,fi=Math.round;function G5(e){const l=Jt(e);let a=parseFloat(l.width),n=parseFloat(l.height);const d=e.offsetWidth,c=e.offsetHeight,i=fi(a)!==d||fi(n)!==c;return i&&(a=d,n=c),{width:a,height:n,fallback:i}}function Ta(e){return Y5(e)?(e.nodeName||"").toLowerCase():""}var kc;function N5(){if(kc)return kc;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(kc=e.brands.map((l=>l.brand+"/"+l.version)).join(" "),kc):navigator.userAgent}function Ct(e){return e instanceof st(e).HTMLElement}function La(e){return e instanceof st(e).Element}function Y5(e){return e instanceof st(e).Node}function Rr(e){return typeof ShadowRoot>"u"?!1:e instanceof st(e).ShadowRoot||e instanceof ShadowRoot}function ys(e){const{overflow:l,overflowX:a,overflowY:n,display:d}=Jt(e);return/auto|scroll|overlay|hidden|clip/.test(l+n+a)&&!["inline","contents"].includes(d)}function YB(e){return["table","td","th"].includes(Ta(e))}function Om(e){const l=/firefox/i.test(N5()),a=Jt(e),n=a.backdropFilter||a.WebkitBackdropFilter;return a.transform!=="none"||a.perspective!=="none"||!!n&&n!=="none"||l&&a.willChange==="filter"||l&&!!a.filter&&a.filter!=="none"||["transform","perspective"].some((d=>a.willChange.includes(d)))||["paint","layout","strict","content"].some((d=>{const c=a.contain;return c!=null&&c.includes(d)}))}function L5(){return!/^((?!chrome|android).)*safari/i.test(N5())}function p0(e){return["html","body","#document"].includes(Ta(e))}function X5(e){return La(e)?e:e.contextElement}var y5={x:1,y:1};function Sn(e){const l=X5(e);if(!Ct(l))return y5;const a=l.getBoundingClientRect(),{width:n,height:d,fallback:c}=G5(l);let i=(c?fi(a.width):a.width)/n,s=(c?fi(a.height):a.height)/d;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}function Od(e,l,a,n){var d,c;l===void 0&&(l=!1),a===void 0&&(a=!1);const i=e.getBoundingClientRect(),s=X5(e);let o=y5;l&&(n?La(n)&&(o=Sn(n)):o=Sn(e));const m=s?st(s):window,Z=!L5()&&a;let u=(i.left+(Z&&((d=m.visualViewport)==null?void 0:d.offsetLeft)||0))/o.x,r=(i.top+(Z&&((c=m.visualViewport)==null?void 0:c.offsetTop)||0))/o.y,b=i.width/o.x,h=i.height/o.y;if(s){const p=st(s),N=n&&La(n)?st(n):n;let W=p.frameElement;for(;W&&n&&N!==p;){const G=Sn(W),Y=W.getBoundingClientRect(),L=getComputedStyle(W);Y.x+=(W.clientLeft+parseFloat(L.paddingLeft))*G.x,Y.y+=(W.clientTop+parseFloat(L.paddingTop))*G.y,u*=G.x,r*=G.y,b*=G.x,h*=G.y,u+=Y.x,r+=Y.y,W=st(W).frameElement}}return{width:b,height:h,top:r,right:u+b,bottom:r+h,left:u,x:u,y:r}}function Xa(e){return((Y5(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ms(e){return La(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function M5(e){return Od(Xa(e)).left+Ms(e).scrollLeft}function Ed(e){if(Ta(e)==="html")return e;const l=e.assignedSlot||e.parentNode||Rr(e)&&e.host||Xa(e);return Rr(l)?l.host:l}function V5(e){const l=Ed(e);return p0(l)?l.ownerDocument.body:Ct(l)&&ys(l)?l:V5(l)}function ji(e,l){var a;l===void 0&&(l=[]);const n=V5(e),d=n===((a=e.ownerDocument)==null?void 0:a.body),c=st(n);return d?l.concat(c,c.visualViewport||[],ys(n)?n:[]):l.concat(n,ji(n))}function Sr(e,l,a){return l==="viewport"?Ea((function(n,d){const c=st(n),i=Xa(n),s=c.visualViewport;let o=i.clientWidth,m=i.clientHeight,Z=0,u=0;if(s){o=s.width,m=s.height;const r=L5();(r||!r&&d==="fixed")&&(Z=s.offsetLeft,u=s.offsetTop)}return{width:o,height:m,x:Z,y:u}})(e,a)):La(l)?Ea((function(n,d){const c=Od(n,!0,d==="fixed"),i=c.top+n.clientTop,s=c.left+n.clientLeft,o=Ct(n)?Sn(n):{x:1,y:1};return{width:n.clientWidth*o.x,height:n.clientHeight*o.y,x:s*o.x,y:i*o.y}})(l,a)):Ea((function(n){const d=Xa(n),c=Ms(n),i=n.ownerDocument.body,s=Vd(d.scrollWidth,d.clientWidth,i.scrollWidth,i.clientWidth),o=Vd(d.scrollHeight,d.clientHeight,i.scrollHeight,i.clientHeight);let m=-c.scrollLeft+M5(n);const Z=-c.scrollTop;return Jt(i).direction==="rtl"&&(m+=Vd(d.clientWidth,i.clientWidth)-s),{width:s,height:o,x:m,y:Z}})(Xa(e)))}function vr(e){return Ct(e)&&Jt(e).position!=="fixed"?e.offsetParent:null}function Fr(e){const l=st(e);let a=vr(e);for(;a&&YB(a)&&Jt(a).position==="static";)a=vr(a);return a&&(Ta(a)==="html"||Ta(a)==="body"&&Jt(a).position==="static"&&!Om(a))?l:a||(function(n){let d=Ed(n);for(;Ct(d)&&!p0(d);){if(Om(d))return d;d=Ed(d)}return null})(e)||l}function LB(e,l,a){const n=Ct(l),d=Xa(l),c=Od(e,!0,a==="fixed",l);let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(n||!n&&a!=="fixed")if((Ta(l)!=="body"||ys(d))&&(i=Ms(l)),Ct(l)){const o=Od(l,!0);s.x=o.x+l.clientLeft,s.y=o.y+l.clientTop}else d&&(s.x=M5(d));return{x:c.left+i.scrollLeft-s.x,y:c.top+i.scrollTop-s.y,width:c.width,height:c.height}}var XB={getClippingRect:function(e){let{element:l,boundary:a,rootBoundary:n,strategy:d}=e;const c=[...a==="clippingAncestors"?(function(o,m){const Z=m.get(o);if(Z)return Z;let u=ji(o).filter((p=>La(p)&&Ta(p)!=="body")),r=null;const b=Jt(o).position==="fixed";let h=b?Ed(o):o;for(;La(h)&&!p0(h);){const p=Jt(h),N=Om(h);(b?N||r:N||p.position!=="static"||!r||!["absolute","fixed"].includes(r.position))?r=p:u=u.filter((W=>W!==h)),h=Ed(h)}return m.set(o,u),u})(l,this._c):[].concat(a),n],i=c[0],s=c.reduce(((o,m)=>{const Z=Sr(l,m,d);return o.top=Vd(Z.top,o.top),o.right=gr(Z.right,o.right),o.bottom=gr(Z.bottom,o.bottom),o.left=Vd(Z.left,o.left),o}),Sr(l,i,d));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:l,offsetParent:a,strategy:n}=e;const d=Ct(a),c=Xa(a);if(a===c)return l;let i={scrollLeft:0,scrollTop:0},s={x:1,y:1};const o={x:0,y:0};if((d||!d&&n!=="fixed")&&((Ta(a)!=="body"||ys(c))&&(i=Ms(a)),Ct(a))){const m=Od(a);s=Sn(a),o.x=m.x+a.clientLeft,o.y=m.y+a.clientTop}return{width:l.width*s.x,height:l.height*s.y,x:l.x*s.x-i.scrollLeft*s.x+o.x,y:l.y*s.y-i.scrollTop*s.y+o.y}},isElement:La,getDimensions:function(e){return Ct(e)?G5(e):e.getBoundingClientRect()},getOffsetParent:Fr,getDocumentElement:Xa,getScale:Sn,async getElementRects(e){let{reference:l,floating:a,strategy:n}=e;const d=this.getOffsetParent||Fr,c=this.getDimensions;return{reference:LB(l,await d(a),n),floating:{x:0,y:0,...await c(a)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Jt(e).direction==="rtl"},yB=(e,l,a)=>{const n=new Map,d={platform:XB,...a},c={...d.platform,_c:n};return Y1(e,l,{...d,platform:c})};function T5(e,l){for(const a in l)Object.prototype.hasOwnProperty.call(l,a)&&(typeof l[a]=="object"&&e[a]?T5(e[a],l[a]):e[a]=l[a])}var Lt={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function Bd(e,l){let a=Lt.themes[e]||{},n;do n=a[l],typeof n>"u"?a.$extend?a=Lt.themes[a.$extend]||{}:(a=null,n=Lt[l]):a=null;while(a);return n}function MB(e){const l=[e];let a=Lt.themes[e]||{};do a.$extend&&!a.$resetCss?(l.push(a.$extend),a=Lt.themes[a.$extend]||{}):a=null;while(a);return l.map(n=>`v-popper--theme-${n}`)}function kr(e){const l=[e];let a=Lt.themes[e]||{};do a.$extend?(l.push(a.$extend),a=Lt.themes[a.$extend]||{}):a=null;while(a);return l}var Dn=!1;if(typeof window<"u"){Dn=!1;try{const e=Object.defineProperty({},"passive",{get(){Dn=!0}});window.addEventListener("test",null,e)}catch{}}var I5=!1;typeof window<"u"&&typeof navigator<"u"&&(I5=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);var x5=["auto","top","bottom","left","right"].reduce((e,l)=>e.concat([l,`${l}-start`,`${l}-end`]),[]),fr={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},jr={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Jr(e,l){const a=e.indexOf(l);a!==-1&&e.splice(a,1)}function Xo(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}var Gt=[],Fa=null,Cr={};function Dr(e){let l=Cr[e];return l||(l=Cr[e]=[]),l}var Em=function(){};typeof window<"u"&&(Em=window.Element);function De(e){return function(l){return Bd(l.theme,e)}}var yo="__floating-vue__popper",z5=()=>(0,t.defineComponent)({name:"VPopper",provide(){return{[yo]:{parentPopper:this}}},inject:{[yo]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:De("disabled")},positioningDisabled:{type:Boolean,default:De("positioningDisabled")},placement:{type:String,default:De("placement"),validator:e=>x5.includes(e)},delay:{type:[String,Number,Object],default:De("delay")},distance:{type:[Number,String],default:De("distance")},skidding:{type:[Number,String],default:De("skidding")},triggers:{type:Array,default:De("triggers")},showTriggers:{type:[Array,Function],default:De("showTriggers")},hideTriggers:{type:[Array,Function],default:De("hideTriggers")},popperTriggers:{type:Array,default:De("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:De("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:De("popperHideTriggers")},container:{type:[String,Object,Em,Boolean],default:De("container")},boundary:{type:[String,Em],default:De("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:De("strategy")},autoHide:{type:[Boolean,Function],default:De("autoHide")},handleResize:{type:Boolean,default:De("handleResize")},instantMove:{type:Boolean,default:De("instantMove")},eagerMount:{type:Boolean,default:De("eagerMount")},popperClass:{type:[String,Array,Object],default:De("popperClass")},computeTransformOrigin:{type:Boolean,default:De("computeTransformOrigin")},autoMinSize:{type:Boolean,default:De("autoMinSize")},autoSize:{type:[Boolean,String],default:De("autoSize")},autoMaxSize:{type:Boolean,default:De("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:De("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:De("preventOverflow")},overflowPadding:{type:[Number,String],default:De("overflowPadding")},arrowPadding:{type:[Number,String],default:De("arrowPadding")},arrowOverflow:{type:Boolean,default:De("arrowOverflow")},flip:{type:Boolean,default:De("flip")},shift:{type:Boolean,default:De("shift")},shiftCrossAxis:{type:Boolean,default:De("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:De("noAutoFocus")},disposeTimeout:{type:Number,default:De("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[yo])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,l;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((l=this.popperShowTriggers)==null?void 0:l.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,l)=>(e[l]="$_computePosition",e),{})},created(){this.autoMinSize,this.autoMaxSize},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:l=!1,force:a=!1}={}){var n,d;(n=this.parentPopper)!=null&&n.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(a||!this.disabled)&&(((d=this.parentPopper)==null?void 0:d.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,l),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:l=!1}={}){var a;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:l}),this.parentPopper.lockedChild=null)},1e3));return}((a=this.parentPopper)==null?void 0:a.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,l),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(l=>l.nodeType===l.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(y1({mainAxis:this.distance,crossAxis:this.skidding}));const l=this.placement.startsWith("auto");if(l?e.middleware.push(L1({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(M1({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!l&&this.flip&&e.middleware.push(X1({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(FI({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:n,rects:d,middlewareData:c})=>{let i;const{centerOffset:s}=c.arrow;return n.startsWith("top")||n.startsWith("bottom")?i=Math.abs(s)>d.reference.width/2:i=Math.abs(s)>d.reference.height/2,{data:{overflow:i}}}}),this.autoMinSize||this.autoSize){const n=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:d,placement:c,middlewareData:i})=>{var s;if((s=i.autoSize)!=null&&s.skip)return{};let o,m;return c.startsWith("top")||c.startsWith("bottom")?o=d.reference.width:m=d.reference.height,this.$_innerNode.style[n==="min"?"minWidth":n==="max"?"maxWidth":"width"]=o!=null?`${o}px`:null,this.$_innerNode.style[n==="min"?"minHeight":n==="max"?"maxHeight":"height"]=m!=null?`${m}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(JI({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:n,availableHeight:d})=>{this.$_innerNode.style.maxWidth=n!=null?`${n}px`:null,this.$_innerNode.style.maxHeight=d!=null?`${d}px`:null}})));const a=await yB(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:a.x,y:a.y,placement:a.placement,strategy:a.strategy,arrow:{...a.middlewareData.arrow,...a.middlewareData.arrowOverflow}})},$_scheduleShow(e,l=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),Fa&&this.instantMove&&Fa.instantMove&&Fa!==this.parentPopper){Fa.$_applyHide(!0),this.$_applyShow(!0);return}l?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,l=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(Fa=this),l?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const l=this.delay;return parseInt(l&&l[e]||l||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await Xo(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...ji(this.$_referenceNode),...ji(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const l=this.$_referenceNode.getBoundingClientRect(),a=this.$_popperNode.querySelector(".v-popper__wrapper"),n=a.parentNode.getBoundingClientRect(),d=l.x+l.width/2-(n.left+a.offsetLeft),c=l.y+l.height/2-(n.top+a.offsetTop);this.result.transformOrigin=`${d}px ${c}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let l;for(let a=0;a<Gt.length;a++)l=Gt[a],l.showGroup!==e&&(l.hide(),l.$emit("close-group"))}Gt.push(this),document.body.classList.add("v-popper--some-open");for(const l of kr(this.theme))Dr(l).push(this),document.body.classList.add(`v-popper--some-open--${l}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await Xo(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Jr(Gt,this),Gt.length===0&&document.body.classList.remove("v-popper--some-open");for(const a of kr(this.theme)){const n=Dr(a);Jr(n,this),n.length===0&&document.body.classList.remove(`v-popper--some-open--${a}`)}Fa===this&&(Fa=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const l=this.disposeTimeout;l!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},l)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await Xo(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=a=>{this.isShown&&!this.$_hideInProgress||(a.usedByTooltip=!0,!this.$_preventShow&&this.show({event:a}))};this.$_registerTriggerListeners(this.$_targetNodes,fr,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],fr,this.popperTriggers,this.popperShowTriggers,e);const l=a=>{a.usedByTooltip||this.hide({event:a})};this.$_registerTriggerListeners(this.$_targetNodes,jr,this.triggers,this.hideTriggers,l),this.$_registerTriggerListeners([this.$_popperNode],jr,this.popperTriggers,this.popperHideTriggers,l)},$_registerEventListeners(e,l,a){this.$_events.push({targetNodes:e,eventType:l,handler:a}),e.forEach(n=>n.addEventListener(l,a,Dn?{passive:!0}:void 0))},$_registerTriggerListeners(e,l,a,n,d){let c=a;n!=null&&(c=typeof n=="function"?n(c):n),c.forEach(i=>{const s=l[i];s&&this.$_registerEventListeners(e,s,d)})},$_removeEventListeners(e){const l=[];this.$_events.forEach(a=>{const{targetNodes:n,eventType:d,handler:c}=a;!e||e===d?n.forEach(i=>i.removeEventListener(d,c)):l.push(a)}),this.$_events=l},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,l=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),l&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,l){for(const a of this.$_targetNodes){const n=a.getAttribute(e);n&&(a.removeAttribute(e),a.setAttribute(l,n))}},$_applyAttrsToTarget(e){for(const l of this.$_targetNodes)for(const a in e){const n=e[a];n==null?l.removeAttribute(a):l.setAttribute(a,n)}},$_updateParentShownChildren(e){let l=this.parentPopper;for(;l;)e?l.shownChildren.add(this.randomId):(l.shownChildren.delete(this.randomId),l.pendingHide&&l.hide()),l=l.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(Td>=e.left&&Td<=e.right&&Id>=e.top&&Id<=e.bottom){const l=this.$_popperNode.getBoundingClientRect(),a=Td-ua,n=Id-ra,d=l.left+l.width/2-ua+(l.top+l.height/2)-ra+l.width+l.height,c=ua+a*d,i=ra+n*d;return fc(ua,ra,c,i,l.left,l.top,l.left,l.bottom)||fc(ua,ra,c,i,l.left,l.top,l.right,l.top)||fc(ua,ra,c,i,l.right,l.top,l.right,l.bottom)||fc(ua,ra,c,i,l.left,l.bottom,l.right,l.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(I5){const e=Dn?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",l=>Ur(l,!0),e),document.addEventListener("touchend",l=>Or(l,!0),e)}else window.addEventListener("mousedown",e=>Ur(e,!1),!0),window.addEventListener("click",e=>Or(e,!1),!0);window.addEventListener("resize",TB)}function Ur(e,l){if(Lt.autoHideOnMousedown)w5(e,l);else for(let a=0;a<Gt.length;a++){const n=Gt[a];try{n.mouseDownContains=n.popperNode().contains(e.target)}catch{}}}function Or(e,l){Lt.autoHideOnMousedown||w5(e,l)}function w5(e,l){const a={};for(let n=Gt.length-1;n>=0;n--){const d=Gt[n];try{const c=d.containsGlobalTarget=d.mouseDownContains||d.popperNode().contains(e.target);d.pendingHide=!1,requestAnimationFrame(()=>{if(d.pendingHide=!1,!a[d.randomId]&&Er(d,c,e)){if(d.$_handleGlobalClose(e,l),!e.closeAllPopover&&e.closePopover&&c){let s=d.parentPopper;for(;s;)a[s.randomId]=!0,s=s.parentPopper;return}let i=d.parentPopper;for(;i&&Er(i,i.containsGlobalTarget,e);)i.$_handleGlobalClose(e,l),i=i.parentPopper}})}catch{}}}function Er(e,l,a){return a.closeAllPopover||a.closePopover&&l||VB(e,a)&&!l}function VB(e,l){if(typeof e.autoHide=="function"){const a=e.autoHide(l);return e.lastAutoHide=a,a}return e.autoHide}function TB(){for(let e=0;e<Gt.length;e++)Gt[e].$_computePosition()}var ua=0,ra=0,Td=0,Id=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{ua=Td,ra=Id,Td=e.clientX,Id=e.clientY},Dn?{passive:!0}:void 0);function fc(e,l,a,n,d,c,i,s){const o=((i-d)*(l-c)-(s-c)*(e-d))/((s-c)*(a-e)-(i-d)*(n-l)),m=((a-e)*(l-c)-(n-l)*(e-d))/((s-c)*(a-e)-(i-d)*(n-l));return o>=0&&o<=1&&m>=0&&m<=1}var IB={extends:z5()},Vs=(e,l)=>{const a=e.__vccOpts||e;for(const[n,d]of l)a[n]=d;return a};function xB(e,l,a,n,d,c){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{ref:"reference",class:(0,t.normalizeClass)(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[(0,t.renderSlot)(e.$slots,"default",(0,t.normalizeProps)((0,t.guardReactiveProps)(e.slotData)))],2)}var zB=Vs(IB,[["render",xB]]);function wB(){var e=window.navigator.userAgent,l=e.indexOf("MSIE ");if(l>0)return parseInt(e.substring(l+5,e.indexOf(".",l)),10);if(e.indexOf("Trident/")>0){var a=e.indexOf("rv:");return parseInt(e.substring(a+3,e.indexOf(".",a)),10)}var n=e.indexOf("Edge/");return n>0?parseInt(e.substring(n+5,e.indexOf(".",n)),10):-1}var ai;function Bm(){Bm.init||(Bm.init=!0,ai=wB()!==-1)}var Ts={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Bm(),(0,t.nextTick)(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",ai&&this.$el.appendChild(e),e.data="about:blank",ai||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!ai&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}},gB=(0,t.withScopeId)("data-v-b329ee4c");(0,t.pushScopeId)("data-v-b329ee4c");var RB={class:"resize-observer",tabindex:"-1"};(0,t.popScopeId)();Ts.render=gB((e,l,a,n,d,c)=>((0,t.openBlock)(),(0,t.createBlock)("div",RB)));Ts.__scopeId="data-v-b329ee4c";Ts.__file="src/components/ResizeObserver.vue";var g5=(e="theme")=>({computed:{themeClass(){return MB(this[e])}}}),SB=(0,t.defineComponent)({name:"VPopperContent",components:{ResizeObserver:Ts},mixins:[g5()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),vB=["id","aria-hidden","tabindex","data-popper-placement"],FB={ref:"inner",class:"v-popper__inner"},kB=[(0,t.createElementVNode)("div",{class:"v-popper__arrow-outer"},null,-1),(0,t.createElementVNode)("div",{class:"v-popper__arrow-inner"},null,-1)];function fB(e,l,a,n,d,c){const i=(0,t.resolveComponent)("ResizeObserver");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{id:e.popperId,ref:"popover",class:(0,t.normalizeClass)(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:(0,t.normalizeStyle)(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:l[2]||(l[2]=(0,t.withKeys)(s=>e.autoHide&&e.$emit("hide"),["esc"]))},[(0,t.createElementVNode)("div",{class:"v-popper__backdrop",onClick:l[0]||(l[0]=s=>e.autoHide&&e.$emit("hide"))}),(0,t.createElementVNode)("div",{class:"v-popper__wrapper",style:(0,t.normalizeStyle)(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[(0,t.createElementVNode)("div",FB,[e.mounted?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)("div",null,[(0,t.renderSlot)(e.$slots,"default")]),e.handleResize?((0,t.openBlock)(),(0,t.createBlock)(i,{key:0,onNotify:l[1]||(l[1]=s=>e.$emit("resize",s))})):(0,t.createCommentVNode)("",!0)],64)):(0,t.createCommentVNode)("",!0)],512),(0,t.createElementVNode)("div",{ref:"arrow",class:"v-popper__arrow-container",style:(0,t.normalizeStyle)(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},kB,4)],4)],46,vB)}var R5=Vs(SB,[["render",fB]]),S5={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}},Km=function(){};typeof window<"u"&&(Km=window.Element);var jB=(0,t.defineComponent)({name:"VPopperWrapper",components:{Popper:zB,PopperContent:R5},mixins:[S5,g5("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,Km,Boolean],default:void 0},boundary:{type:[String,Km],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function JB(e,l,a,n,d,c){const i=(0,t.resolveComponent)("PopperContent"),s=(0,t.resolveComponent)("Popper");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:l[0]||(l[0]=()=>e.$emit("show")),onHide:l[1]||(l[1]=()=>e.$emit("hide")),"onUpdate:shown":l[2]||(l[2]=o=>e.$emit("update:shown",o)),onApplyShow:l[3]||(l[3]=()=>e.$emit("apply-show")),onApplyHide:l[4]||(l[4]=()=>e.$emit("apply-hide")),onCloseGroup:l[5]||(l[5]=()=>e.$emit("close-group")),onCloseDirective:l[6]||(l[6]=()=>e.$emit("close-directive")),onAutoHide:l[7]||(l[7]=()=>e.$emit("auto-hide")),onResize:l[8]||(l[8]=()=>e.$emit("resize"))}),{default:(0,t.withCtx)(({popperId:o,isShown:m,shouldMountContent:Z,skipTransition:u,autoHide:r,show:b,hide:h,handleResize:p,onResize:N,classes:W,result:G})=>[(0,t.renderSlot)(e.$slots,"default",{shown:m,show:b,hide:h}),(0,t.createVNode)(i,{ref:"popperContent","popper-id":o,theme:e.finalTheme,shown:m,mounted:Z,"skip-transition":u,"auto-hide":r,"handle-resize":p,classes:W,result:G,onHide:h,onResize:N},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"popper",{shown:m,hide:h})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}var W0=Vs(jB,[["render",JB]]),CB={...W0,name:"VDropdown",vPopperTheme:"dropdown"},DB={...W0,name:"VMenu",vPopperTheme:"menu"},UB={...W0,name:"VTooltip",vPopperTheme:"tooltip"},OB=(0,t.defineComponent)({name:"VTooltipDirective",components:{Popper:z5(),PopperContent:R5},mixins:[S5],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>Bd(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>Bd(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const l=++this.$_fetchId,a=this.content(this);a.then?a.then(n=>this.onResult(l,n)):this.onResult(l,a)}},onResult(e,l){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=l)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),EB=["innerHTML"],BB=["textContent"];function KB(e,l,a,n,d,c){const i=(0,t.resolveComponent)("PopperContent"),s=(0,t.resolveComponent)("Popper");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({ref:"popper"},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:(0,t.withCtx)(({popperId:o,isShown:m,shouldMountContent:Z,skipTransition:u,autoHide:r,hide:b,handleResize:h,onResize:p,classes:N,result:W})=>[(0,t.createVNode)(i,{ref:"popperContent",class:(0,t.normalizeClass)({"v-popper--tooltip-loading":e.loading}),"popper-id":o,theme:e.theme,shown:m,mounted:Z,"skip-transition":u,"auto-hide":r,"handle-resize":h,classes:N,result:W,onHide:b,onResize:p},{default:(0,t.withCtx)(()=>[e.html?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,innerHTML:e.finalContent},null,8,EB)):((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,textContent:(0,t.toDisplayString)(e.finalContent)},null,8,BB))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}var HB=Vs(OB,[["render",KB]]),v5="v-popper--has-tooltip";function PB(e,l){let a=e.placement;if(!a&&l)for(const n of x5)l[n]&&(a=n);return a||(a=Bd(e.theme||"tooltip","placement")),a}function F5(e,l,a){let n;const d=typeof l;return d==="string"?n={content:l}:l&&d==="object"?n=l:n={content:!1},n.placement=PB(n,a),n.targetNodes=()=>[e],n.referenceNode=()=>e,n}var Mo,Kd,QB=0;function AB(){if(Mo)return;Kd=(0,t.ref)([]),Mo=(0,t.createApp)({name:"VTooltipDirectiveApp",setup(){return{directives:Kd}},render(){return this.directives.map(l=>(0,t.h)(HB,{...l.options,shown:l.shown||l.options.shown,key:l.id}))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),Mo.mount(e)}function _B(e,l,a){AB();const n=(0,t.ref)(F5(e,l,a)),d=(0,t.ref)(!1),c={id:QB++,options:n,shown:d};return Kd.value.push(c),e.classList&&e.classList.add(v5),e.$_popper={options:n,item:c,show(){d.value=!0},hide(){d.value=!1}}}function k5(e){if(e.$_popper){const l=Kd.value.indexOf(e.$_popper.item);l!==-1&&Kd.value.splice(l,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(v5)}function Br(e,{value:l,modifiers:a}){const n=F5(e,l,a);if(!n.content||Bd(n.theme||"tooltip","disabled"))k5(e);else{let d;e.$_popper?(d=e.$_popper,d.options.value=n):d=_B(e,l,a),typeof l.shown<"u"&&l.shown!==e.$_popperOldShown&&(e.$_popperOldShown=l.shown,l.shown?d.show():d.hide())}}var $B={beforeMount:Br,updated:Br,beforeUnmount(e){k5(e)}};function Kr(e){e.addEventListener("mousedown",Ji),e.addEventListener("click",Ji),e.addEventListener("touchstart",f5,Dn?{passive:!0}:!1)}function Hr(e){e.removeEventListener("mousedown",Ji),e.removeEventListener("click",Ji),e.removeEventListener("touchstart",f5),e.removeEventListener("touchend",j5),e.removeEventListener("touchcancel",J5)}function Ji(e){const l=e.currentTarget;e.closePopover=!l.$_vclosepopover_touch,e.closeAllPopover=l.$_closePopoverModifiers&&!!l.$_closePopoverModifiers.all}function f5(e){if(e.changedTouches.length===1){const l=e.currentTarget;l.$_vclosepopover_touch=!0,l.$_vclosepopover_touchPoint=e.changedTouches[0],l.addEventListener("touchend",j5),l.addEventListener("touchcancel",J5)}}function j5(e){const l=e.currentTarget;if(l.$_vclosepopover_touch=!1,e.changedTouches.length===1){const a=e.changedTouches[0],n=l.$_vclosepopover_touchPoint;e.closePopover=Math.abs(a.screenY-n.screenY)<20&&Math.abs(a.screenX-n.screenX)<20,e.closeAllPopover=l.$_closePopoverModifiers&&!!l.$_closePopoverModifiers.all}}function J5(e){const l=e.currentTarget;l.$_vclosepopover_touch=!1}var qB={beforeMount(e,{value:l,modifiers:a}){e.$_closePopoverModifiers=a,(typeof l>"u"||l)&&Kr(e)},updated(e,{value:l,oldValue:a,modifiers:n}){e.$_closePopoverModifiers=n,l!==a&&(typeof l>"u"||l?Kr(e):Hr(e))},beforeUnmount(e){Hr(e)}};function eK(e,l={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,T5(Lt,l),e.directive("tooltip",$B),e.directive("close-popper",qB),e.component("VTooltip",UB),e.component("VDropdown",CB),e.component("VMenu",DB))}var lK={version:"5.2.2",install:eK,options:Lt},tK=["src"],aK=(0,t.defineComponent)({__name:"LightboxImage",props:{src:{}},setup(e){const l=e,{imageSrc:a}=e0(()=>l.src);return(n,d)=>((0,t.openBlock)(),(0,t.createElementBlock)("img",{draggable:!1,src:(0,t.unref)(a),alt:"Preview",class:"lightbox-image"},null,8,tK))}}),nK=aK,dK={key:0,class:"center"},cK={key:3},iK={class:"bgl-lightbox-item"},sK={key:2,class:"lightbox-pdf"},oK=["src","title"],mK={key:3,class:"lightbox-file"},ZK={class:"file-info txt-white flex m_block align-items-start gap-025"},uK={class:"txt-start"},rK={class:"mx-0 light"},bK={class:"semi word-break-all"},hK={class:"mx-0"},pK={class:"semi"},WK=(0,t.defineComponent)({__name:"Lightbox",setup(e,{expose:l}){const a=(0,t.ref)(!1),n=(0,t.ref)(null),d=(0,t.ref)([]),c=(0,t.ref)(0),i=(0,t.computed)(()=>d.value[c.value]),s=(0,t.ref)(1),o=(0,t.computed)(()=>s.value===1),m=(0,t.computed)(()=>({allowTouchMove:s.value===1,touchRatio:s.value===1?1:0,simulateTouch:s.value===1}));function Z(b,h){a.value=!0,d.value=h||[b],c.value=d.value.findIndex(p=>{const N=b.src!==void 0&&b.src!==null&&b.src!==""&&p.src===b.src,W=b.pathKey!==void 0&&b.pathKey!==null&&b.pathKey!==""&&p.pathKey===b.pathKey;return N||W}),c.value===-1&&(c.value=0),s.value=1}function u(){a.value=!1}bs(u,a);function r(b){c.value=b,s.value=1}return(0,t.watch)(()=>a.value,async b=>{b?(document.body.style.overflow="hidden",await(0,t.nextTick)(),n.value?.open||n.value?.showModal()):(document.body.style.overflow="",n.value?.open&&n.value.close())}),(0,t.watch)(()=>c.value,()=>{s.value=1}),l({open:Z,close:u}),(b,h)=>((0,t.openBlock)(),(0,t.createBlock)(t.Transition,{name:"fade"},{default:(0,t.withCtx)(()=>[a.value?((0,t.openBlock)(),(0,t.createElementBlock)("dialog",{key:0,ref_key:"dialogRef",ref:n,class:"bgl-lightbox-overlay",onCancel:(0,t.withModifiers)(u,["prevent"])},[(0,t.createElementVNode)("div",{class:"flex start w-100 space-between p-025 z-9",onClick:u},[(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"close",onClick:u}),i.value?.enableZoom&&i.value?.type==="image"?((0,t.openBlock)(),(0,t.createElementBlock)("div",dK,[(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"remove",disabled:s.value===1,onClick:h[0]||(h[0]=p=>s.value--)},null,8,["disabled"]),(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"zoom_in",disabled:s.value===1,onClick:h[1]||(h[1]=p=>s.value=1)},null,8,["disabled"]),(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"add",disabled:s.value===3,onClick:h[2]||(h[2]=p=>s.value++)},null,8,["disabled"])])):(0,t.createCommentVNode)("",!0),i.value?.openFile&&i.value?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:1,class:"color-white",round:"",thin:"",flat:"",iconEnd:"arrow_outward",value:"$t:lightbox.openFile",href:i.value?.src,target:"_blank"},null,8,["href"])):(0,t.createCommentVNode)("",!0),i.value?.download&&i.value?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:2,class:"color-white",round:"",thin:"",flat:"",icon:"download",value:"Download File",onClick:h[3]||(h[3]=p=>(0,t.unref)(q2)(i.value?.src))})):(0,t.createCommentVNode)("",!0),!i.value?.openFile&&!i.value?.download?((0,t.openBlock)(),(0,t.createElementBlock)("div",cK)):(0,t.createCommentVNode)("",!0)]),d.value&&d.value.length>0?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Gp),{key:0,index:c.value,"onUpdate:index":h[6]||(h[6]=p=>c.value=p),items:d.value,"initial-slide":c.value,class:(0,t.normalizeClass)(["bgl-lightbox-swiper",{zoomed:s.value>1}]),navigation:d.value.length>1,"grab-cursor":o.value,keyboard:!0,loop:!1,speed:400,"slides-per-view":1,"space-between":0,effect:"slide","advanced-options":m.value,onClick:h[7]||(h[7]=(0,t.withModifiers)(()=>{},["stop"]))},{default:(0,t.withCtx)(({item:p})=>[(0,t.createElementVNode)("div",iK,[p.type==="image"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Np),{key:0,zoom:s.value,"onUpdate:zoom":h[4]||(h[4]=N=>s.value=N),disabled:!p?.enableZoom,"mouse-wheel-to-zoom":!1,"double-click-to-zoom":!0,"max-scale":5,"min-scale":1,"aspect-ratio":0,"limit-translation":!0,onClick:h[5]||(h[5]=(0,t.withModifiers)(()=>{},["stop"]))},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(nK,{src:p?.src},null,8,["src"])]),_:2},1032,["zoom","disabled"])):p?.type==="video"&&p?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(h2),{key:1,src:p?.src,autoplay:"",controls:"",class:"lightbox-video"},null,8,["src"])):p?.type==="pdf"&&p?.src?((0,t.openBlock)(),(0,t.createElementBlock)("div",sK,[(0,t.createElementVNode)("embed",{src:(0,t.unref)($2)(p?.src),type:"application/pdf",title:p?.name},null,8,oK)])):((0,t.openBlock)(),(0,t.createElementBlock)("div",mK,[(0,t.createElementVNode)("div",ZK,[(0,t.createVNode)((0,t.unref)(Le),{class:"m-0 m_none",icon:"draft",size:10,weight:"12"}),(0,t.createVNode)((0,t.unref)(Le),{class:"m-0 none m_block m_-mb-1",icon:"draft",size:4,weight:"2"}),(0,t.createElementVNode)("div",uK,[(0,t.createElementVNode)("p",rK,[h[9]||(h[9]=(0,t.createTextVNode)(" File: ",-1)),(0,t.createElementVNode)("span",bK,(0,t.toDisplayString)(p?.name),1)]),(0,t.createElementVNode)("p",hK,[h[10]||(h[10]=(0,t.createTextVNode)(" Type: ",-1)),(0,t.createElementVNode)("span",pK,(0,t.toDisplayString)(p?.type),1)]),(0,t.createVNode)((0,t.unref)(oe),{href:p?.src,target:"_blank",round:"",thin:"",class:"mt-1",value:"Open file"},null,8,["href"])])])]))])]),"prev-button":(0,t.withCtx)(({prev:p})=>[(0,t.createVNode)((0,t.unref)(oe),{icon:"arrow_back",color:"black",onClick:p},null,8,["onClick"])]),"next-button":(0,t.withCtx)(({next:p})=>[(0,t.createVNode)((0,t.unref)(oe),{icon:"arrow_forward",color:"black",onClick:p},null,8,["onClick"])]),_:1},8,["index","items","initial-slide","class","navigation","grab-cursor","advanced-options"])):(0,t.createCommentVNode)("",!0),d.value&&d.value.length>1?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,class:"lightbox-thumbnails",onClick:h[8]||(h[8]=(0,t.withModifiers)(()=>{},["stop"]))},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(d.value,(p,N)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:N},[p.type==="image"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Sd),{key:0,class:(0,t.normalizeClass)(["thumbnail",{active:c.value===N}]),src:p.src,alt:"",onClick:(0,t.withModifiers)(W=>r(N),["stop"])},null,8,["src","class","onClick"])):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Le),{key:1,class:(0,t.normalizeClass)(["thumbnail thumbnail-icon",{active:c.value===N}]),icon:"description",onClick:(0,t.withModifiers)(W=>r(N),["stop"])},null,8,["class","onClick"]))],64))),128))])):(0,t.createCommentVNode)("",!0)],544)):(0,t.createCommentVNode)("",!0)]),_:1}))}}),GK=WK,rd={},rn=e=>{},NK={mounted(e,l){Pr(Hm(l,e)),rn=a=>{Qr(a,e,l)},e.addEventListener("click",rn)},updated(e,l){Pr(Hm(l,e)),e.removeEventListener("click",rn),rn=a=>{Qr(a,e,l)},e.addEventListener("click",rn)},unmounted(e){e.removeEventListener("click",rn)},getSSRProps(){return{}}};function Pr(e){e.group&&(rd[e.group]||(rd[e.group]=[]),rd[e.group].findIndex(l=>l.src===e.src)===-1&&rd[e.group].push(e))}function Qr(e,l,a){e.stopPropagation();const n=Hm(a,l),d=MK();if(!d||!d.open)return;const c=d.open;c(n,n&&n.group?rd[n.group]:void 0)}function Hm(e,l){let{group:a,src:n,type:d,name:c,thumbnail:i,enableZoom:s,openFile:o,download:m,pathKey:Z}=e.value||{};return n=dt(n||Z)||e.value||l.getAttribute("src")||"",d=d||yK(n),c=c||XK(n)||l.getAttribute("alt")||"",{src:n,type:d,name:c,thumbnail:i,group:a,enableZoom:s,openFile:o,download:m}}var YK=/youtube\.com|youtu\.be/,LK=/vimeo\.com/;function XK(e){return!e||typeof e!="string"?"":(e.split("/").pop()||"").replace(/\.[^/.]+$/,"")}function yK(e){if(typeof e!="string"||!e)return"unknown";if(e.startsWith("blob:")||/^data:image\//i.test(e))return"image";if(/^data:video\//i.test(e))return"video";const l=(e.split(".").pop()||"").toLowerCase(),a=e.split("?")[0].split(".").pop()?.toLowerCase()||"";return hi.test(l)||hi.test(a)?"image":C1.test(l)||YK.test(e)||LK.test(e)?"video":["pdf"].includes(l)?"pdf":l??"unknown"}var Vo;function MK(){if(!(typeof document>"u")){if(!Vo){const e=document.createElement("div");document.body.prepend(e),Vo=(0,t.createApp)(GK).mount(e)}return Vo}}var VK={install(e){e.directive("lightbox",NK)}},TK=VK,IK={beforeMount(e,l){e.clickOutsideEvent=a=>{e===a.target||e.contains(a.target)||l.value(a)},document.addEventListener("click",e.clickOutsideEvent)},unmounted(e){document.removeEventListener("click",e.clickOutsideEvent)}},C5=$d.__export({EventBus:()=>zs,POSITION:()=>Pd,TYPE:()=>Dl,createToastInterface:()=>Qd,default:()=>aW,globalEventBus:()=>G0,provideToast:()=>bH,toastInjectionKey:()=>ws,useToast:()=>tW},1),xK=Object.defineProperty,Ar=Object.getOwnPropertySymbols,zK=Object.prototype.hasOwnProperty,wK=Object.prototype.propertyIsEnumerable,_r=(e,l,a)=>l in e?xK(e,l,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[l]=a,D5=(e,l)=>{for(var a in l||(l={}))zK.call(l,a)&&_r(e,a,l[a]);if(Ar)for(var a of Ar(l))wK.call(l,a)&&_r(e,a,l[a]);return e},Is=e=>typeof e=="function",xs=e=>typeof e=="string",U5=e=>xs(e)&&e.trim().length>0,gK=e=>typeof e=="number",Oa=e=>typeof e>"u",Hd=e=>typeof e=="object"&&e!==null,RK=e=>Dt(e,"tag")&&U5(e.tag),O5=e=>window.TouchEvent&&e instanceof TouchEvent,E5=e=>Dt(e,"component")&&B5(e.component),SK=e=>Is(e)||Hd(e),B5=e=>!Oa(e)&&(xs(e)||SK(e)||E5(e)),$r=e=>Hd(e)&&["height","width","right","left","top","bottom"].every(l=>gK(e[l])),Dt=(e,l)=>(Hd(e)||Is(e))&&l in e,vK=(e=>()=>e++)(0);function To(e){return O5(e)?e.targetTouches[0].clientX:e.clientX}function qr(e){return O5(e)?e.targetTouches[0].clientY:e.clientY}var FK=e=>{Oa(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},rc=e=>E5(e)?rc(e.component):RK(e)?(0,t.defineComponent)({render(){return e}}):typeof e=="string"?e:(0,t.toRaw)((0,t.unref)(e)),kK=e=>{if(typeof e=="string")return e;const l=Dt(e,"props")&&Hd(e.props)?e.props:{},a=Dt(e,"listeners")&&Hd(e.listeners)?e.listeners:{};return{component:rc(e),props:l,listeners:a}},fK=()=>typeof window<"u",zs=class{constructor(){this.allHandlers={}}getHandlers(e){return this.allHandlers[e]||[]}on(e,l){const a=this.getHandlers(e);a.push(l),this.allHandlers[e]=a}off(e,l){const a=this.getHandlers(e);a.splice(a.indexOf(l)>>>0,1)}emit(e,l){this.getHandlers(e).forEach(a=>a(l))}},jK=e=>["on","off","emit"].every(l=>Dt(e,l)&&Is(e[l])),Dl;(function(e){e.SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.INFO="info",e.DEFAULT="default"})(Dl||(Dl={}));var Pd;(function(e){e.TOP_LEFT="top-left",e.TOP_CENTER="top-center",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_CENTER="bottom-center",e.BOTTOM_RIGHT="bottom-right"})(Pd||(Pd={}));var _l;(function(e){e.ADD="add",e.DISMISS="dismiss",e.UPDATE="update",e.CLEAR="clear",e.UPDATE_DEFAULTS="update_defaults"})(_l||(_l={}));var ea="Vue-Toastification",bt={type:{type:String,default:Dl.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},eb={type:bt.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},jc={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:bt.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},Io={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},lb={transition:{type:[Object,String],default:`${ea}__bounce`}},na={CORE_TOAST:{position:{type:String,default:Pd.TOP_RIGHT},draggable:bt.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:bt.trueBoolean,pauseOnHover:bt.trueBoolean,closeOnClick:bt.trueBoolean,timeout:Io.timeout,hideProgressBar:Io.hideProgressBar,toastClassName:bt.classNames,bodyClassName:bt.classNames,icon:eb.customIcon,closeButton:jc.component,closeButtonClassName:jc.classNames,showCloseButtonOnHover:jc.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new zs}},TOAST:{id:{type:[String,Number],required:!0,default:0},type:bt.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},CONTAINER:{container:{type:[Object,Function],default:()=>document.body},newestOnTop:bt.trueBoolean,maxToasts:{type:Number,default:20},transition:lb.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:bt.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},PROGRESS_BAR:Io,ICON:eb,TRANSITION:lb,CLOSE_BUTTON:jc},K5=(0,t.defineComponent)({name:"VtProgressBar",props:na.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${ea}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function JK(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{style:(0,t.normalizeStyle)(e.style),class:(0,t.normalizeClass)(e.cpClass)},null,6)}K5.render=JK;var CK=K5,H5=(0,t.defineComponent)({name:"VtCloseButton",props:na.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?rc(this.component):"button"},classes(){const e=[`${ea}__close-button`];return this.showOnHover&&e.push("show-on-hover"),e.concat(this.classNames)}}}),DK=(0,t.createTextVNode)(" × ");function UK(e,l){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.buttonComponent),(0,t.mergeProps)({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:(0,t.withCtx)(()=>[DK]),_:1},16,["aria-label","class"])}H5.render=UK;var OK=H5,P5={},EK={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},BK=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1)];function KK(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",EK,BK)}P5.render=KK;var HK=P5,Q5={},PK={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},QK=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1)];function AK(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",PK,QK)}Q5.render=AK;var tb=Q5,A5={},_K={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},$K=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];function qK(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",_K,$K)}A5.render=qK;var eH=A5,_5={},lH={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},tH=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];function aH(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",lH,tH)}_5.render=aH;var nH=_5,$5=(0,t.defineComponent)({name:"VtIcon",props:na.ICON,computed:{customIconChildren(){return Dt(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return xs(this.customIcon)?this.trimValue(this.customIcon):Dt(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Dt(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:B5(this.customIcon)?rc(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[Dl.DEFAULT]:tb,[Dl.INFO]:tb,[Dl.SUCCESS]:HK,[Dl.ERROR]:nH,[Dl.WARNING]:eH}[this.type]},iconClasses(){const e=[`${ea}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,l=""){return U5(e)?e.trim():l}}});function dH(e,l){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.component),{class:(0,t.normalizeClass)(e.iconClasses)},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.customIconChildren),1)]),_:1},8,["class"])}$5.render=dH;var q5=(0,t.defineComponent)({name:"VtToast",components:{ProgressBar:CK,CloseButton:OK,Icon:$5},inheritAttrs:!1,props:Object.assign({},na.CORE_TOAST,na.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const e=[`${ea}__toast`,`${ea}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push("disable-transition"),this.rtl&&e.push(`${ea}__toast--rtl`),e},bodyClasses(){return[`${ea}__toast-${xs(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return $r(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:Dt,getVueComponentFromObj:rc,closeToast(){this.eventBus.emit(_l.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const e=this.$el;e.addEventListener("touchstart",this.onDragStart,{passive:!0}),e.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const e=this.$el;e.removeEventListener("touchstart",this.onDragStart),e.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:To(e),y:qr(e)},this.dragStart=To(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:To(e),y:qr(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,$r(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),cH=["role"];function iH(e,l){const a=(0,t.resolveComponent)("Icon"),n=(0,t.resolveComponent)("CloseButton"),d=(0,t.resolveComponent)("ProgressBar");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(e.classes),style:(0,t.normalizeStyle)(e.draggableStyle),onClick:l[0]||(l[0]=(...c)=>e.clickHandler&&e.clickHandler(...c)),onMouseenter:l[1]||(l[1]=(...c)=>e.hoverPause&&e.hoverPause(...c)),onMouseleave:l[2]||(l[2]=(...c)=>e.hoverPlay&&e.hoverPlay(...c))},[e.icon?((0,t.openBlock)(),(0,t.createBlock)(a,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",{role:e.accessibility.toastRole||"alert",class:(0,t.normalizeClass)(e.bodyClasses)},[typeof e.content=="string"?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(e.content),1)],2112)):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.getVueComponentFromObj(e.content)),(0,t.mergeProps)({key:1,"toast-id":e.id},e.hasProp(e.content,"props")?e.content.props:{},(0,t.toHandlers)(e.hasProp(e.content,"listeners")?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,["toast-id","onCloseToast"]))],10,cH),e.closeButton?((0,t.openBlock)(),(0,t.createBlock)(n,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:(0,t.withModifiers)(e.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):(0,t.createCommentVNode)("v-if",!0),e.timeout?((0,t.openBlock)(),(0,t.createBlock)(d,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):(0,t.createCommentVNode)("v-if",!0)],38)}q5.render=iH;var sH=q5,eW=(0,t.defineComponent)({name:"VtTransition",props:na.TRANSITION,emits:["leave"],methods:{hasProp:Dt,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+"px",e.style.top=e.offsetTop+"px",e.style.width=getComputedStyle(e).width,e.style.position="absolute")}}});function oH(e,l){return(0,t.openBlock)(),(0,t.createBlock)(t.TransitionGroup,{tag:"div","enter-active-class":e.transition.enter?e.transition.enter:`${e.transition}-enter-active`,"move-class":e.transition.move?e.transition.move:`${e.transition}-move`,"leave-active-class":e.transition.leave?e.transition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}eW.render=oH;var lW=(0,t.defineComponent)({name:"VueToastification",devtools:{hide:!0},components:{Toast:sH,VtTransition:eW},props:Object.assign({},na.CORE_TOAST,na.CONTAINER,na.TRANSITION),data(){return{count:0,positions:Object.values(Pd),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const e=this.eventBus;e.on(_l.ADD,this.addToast),e.on(_l.CLEAR,this.clearToasts),e.on(_l.DISMISS,this.dismissToast),e.on(_l.UPDATE,this.updateToast),e.on(_l.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(e){Is(e)&&(e=await e()),FK(this.$el),e.appendChild(this.$el)},setToast(e){Oa(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=kK(e.content);const l=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),a=this.defaults.filterBeforeCreate(l,this.toastArray);a&&this.setToast(a)},dismissToast(e){const l=this.toasts[e];!Oa(l)&&!Oa(l.onClose)&&l.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach(e=>{this.dismissToast(e)})},getPositionToasts(e){const l=this.filteredToasts.filter(a=>a.position===e).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?l.reverse():l},updateDefaults(e){Oa(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:l,create:a}){this.toasts[e]?(l.timeout&&l.timeout===this.toasts[e].timeout&&l.timeout++,this.setToast(Object.assign({},this.toasts[e],l))):a&&this.addToast(Object.assign({},{id:e},l))},getClasses(e){return[`${ea}__container`,e].concat(this.defaults.containerClassName)}}});function mH(e,l){const a=(0,t.resolveComponent)("Toast"),n=(0,t.resolveComponent)("VtTransition");return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.positions,d=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:d},[(0,t.createVNode)(n,{transition:e.defaults.transition,class:(0,t.normalizeClass)(e.getClasses(d))},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.getPositionToasts(d),c=>((0,t.openBlock)(),(0,t.createBlock)(a,(0,t.mergeProps)({key:c.id},c),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}lW.render=mH;var ZH=lW,ab=(e={},l=!0)=>{const a=e.eventBus=e.eventBus||new zs;l&&(0,t.nextTick)(()=>{const c=(0,t.createApp)(ZH,D5({},e)),i=c.mount(document.createElement("div")),s=e.onMounted;if(Oa(s)||s(i,c),e.shareAppContext){const o=e.shareAppContext;o===!0||(c._context.components=o._context.components,c._context.directives=o._context.directives,c._context.mixins=o._context.mixins,c._context.provides=o._context.provides,c.config.globalProperties=o.config.globalProperties)}});const n=(c,i)=>{const s=Object.assign({},{id:vK(),type:Dl.DEFAULT},i,{content:c});return a.emit(_l.ADD,s),s.id};n.clear=()=>a.emit(_l.CLEAR,void 0),n.updateDefaults=c=>{a.emit(_l.UPDATE_DEFAULTS,c)},n.dismiss=c=>{a.emit(_l.DISMISS,c)};function d(c,{content:i,options:s},o=!1){const m=Object.assign({},s,{content:i});a.emit(_l.UPDATE,{id:c,options:m,create:o})}return n.update=d,n.success=(c,i)=>n(c,Object.assign({},i,{type:Dl.SUCCESS})),n.info=(c,i)=>n(c,Object.assign({},i,{type:Dl.INFO})),n.error=(c,i)=>n(c,Object.assign({},i,{type:Dl.ERROR})),n.warning=(c,i)=>n(c,Object.assign({},i,{type:Dl.WARNING})),n},uH=()=>{const e=()=>{};return new Proxy(e,{get(){return e}})};function Qd(e){return fK()?jK(e)?ab({eventBus:e},!1):ab(e,!0):uH()}var ws=Symbol("VueToastification"),G0=new zs,rH=(e,l)=>{l?.shareAppContext===!0&&(l.shareAppContext=e);const a=Qd(D5({eventBus:G0},l));e.provide(ws,a)},bH=e=>{const l=Qd(e);(0,t.getCurrentInstance)()&&(0,t.provide)(ws,l)},tW=e=>{if(e)return Qd(e);const l=(0,t.getCurrentInstance)()?(0,t.inject)(ws,void 0):void 0;return l||Qd(G0)},aW=rH,hH={key:0,class:"custom-toast__icon"},pH={class:"custom-toast__content"},WH=(0,t.defineComponent)({name:"BglToast",__name:"Toast",props:{message:{},type:{},info:{type:Boolean},success:{type:Boolean},warning:{type:Boolean},error:{type:Boolean},showIcon:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},closeToast:{}},setup(e){const l=e,a=(0,t.computed)(()=>l.type?l.type:l.error?"error":l.warning?"warning":l.success?"success":"info");return(n,d)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["custom-toast",`custom-toast--${a.value}`])},[e.showIcon?((0,t.openBlock)(),(0,t.createElementBlock)("div",hH,[a.value==="success"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Le),{key:0,icon:"check_circle"})):(0,t.createCommentVNode)("",!0),a.value==="error"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Le),{key:1,icon:"dangerous"})):(0,t.createCommentVNode)("",!0),a.value==="warning"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Le),{key:2,icon:"report"})):(0,t.createCommentVNode)("",!0),a.value==="info"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Le),{key:3,icon:"info"})):(0,t.createCommentVNode)("",!0)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",pH,(0,t.toDisplayString)(e.message),1),e.showCloseButton?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,class:"custom-toast__close",onClick:d[0]||(d[0]=(...c)=>e.closeToast&&e.closeToast(...c))},[(0,t.createVNode)((0,t.unref)(Le),{icon:"close"})])):(0,t.createCommentVNode)("",!0)],2))}}),id=WH,GH=aW||C5,{POSITION:NH}=C5,bn=tW;const nW=Symbol("toast");var Ci=null;function YH(){const e=(0,t.inject)(nW,null);if(!e){if(Ci)return Ci;throw new Error("Toast API not provided. Make sure ToastPlugin is installed via app.use(ToastPlugin)")}return e}function LH(){if(typeof document>"u")return;let e=document.getElementById("bgl-toast-container");e||(e=document.createElement("div"),e.setAttribute("popover","manual"),e.setAttribute("id","bgl-toast-container"),document.body.appendChild(e));try{e.hidePopover()}catch{}try{e.showPopover()}catch{}return e}const dW={install:(e,l={})=>{const a=LH(),n={position:NH.TOP_RIGHT,timeout:5e3,closeOnClick:!0,pauseOnFocusLoss:!0,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:!1,icon:!1,rtl:!1,transition:"Vue-Toastification__fade",maxToasts:5,newestOnTop:!0,toastClassName:"custom-toast-wrapper",bodyClassName:"custom-toast-body",...a?{container:a}:{},...l};e.use(GH,n);function d(){const i=typeof document<"u"?document.getElementById("bgl-toast-container"):null;if(i){try{i.hidePopover()}catch{}try{i.showPopover()}catch{}}}const c={success:(i,s)=>(d(),bn()({component:id,props:{message:i,type:"success"}},s)),error:(i,s)=>(d(),bn()({component:id,props:{message:i,type:"error"}},s)),info:(i,s)=>(d(),bn()({component:id,props:{message:i,type:"info"}},s)),warning:(i,s)=>(d(),bn()({component:id,props:{message:i,type:"warning"}},s)),show:(i,s)=>(d(),bn()({component:id,props:{message:i,type:"info"}},s)),clear:()=>{bn().clear()}};Ci||(Ci=c),e.provide(nW,c)}};var gs=class extends Event{oldState;newState;constructor(e,{oldState:l="",newState:a="",...n}={}){super(e,n),this.oldState=String(l||""),this.newState=String(a||"")}},nb=new WeakMap;function cW(e,l,a){nb.set(e,setTimeout(()=>{nb.has(e)&&e.dispatchEvent(new gs("toggle",{cancelable:!1,oldState:l,newState:a}))},0))}var N0=globalThis.ShadowRoot||function(){},XH=globalThis.HTMLDialogElement||function(){},ni=new WeakMap,la=new WeakMap,ct=new WeakMap,Un=new WeakMap;function Di(e){return Un.get(e)||"hidden"}var Ui=new WeakMap;function Ad(e){return[...e].pop()}function yH(e){const l=e.popoverTargetElement;if(!(l instanceof HTMLElement))return;const a=Di(l);e.popoverTargetAction==="show"&&a==="showing"||e.popoverTargetAction==="hide"&&a==="hidden"||(a==="showing"?En(l,!0,!0):Ka(l,!1)&&(Ui.set(l,e),Pm(l)))}function Ka(e,l){return!(e.popover!=="auto"&&e.popover!=="manual"&&e.popover!=="hint"||!e.isConnected||l&&Di(e)!=="showing"||!l&&Di(e)!=="hidden"||e instanceof XH&&e.hasAttribute("open")||document.fullscreenElement===e)}function db(e){if(!e)return 0;const l=la.get(document)||new Set,a=ct.get(document)||new Set;return a.has(e)?[...a].indexOf(e)+l.size+1:l.has(e)?[...l].indexOf(e)+1:0}function MH(e){const l=iW(e),a=VH(e);return db(l)>db(a)?l:a}function _d(e){let l;const a=ct.get(e)||new Set,n=la.get(e)||new Set,d=a.size>0?a:n.size>0?n:null;return d?(l=Ad(d),l.isConnected?l:(d.delete(l),_d(e))):null}function cb(e){for(const l of e||[])if(!l.isConnected)e.delete(l);else return l;return null}function On(e){return typeof e.getRootNode=="function"?e.getRootNode():e.parentNode?On(e.parentNode):e}function iW(e){for(;e;){if(e instanceof HTMLElement&&e.popover==="auto"&&Un.get(e)==="showing")return e;if(e=e instanceof Element&&e.assignedSlot||e.parentElement||On(e),e instanceof N0&&(e=e.host),e instanceof Document)return}}function VH(e){for(;e;){const l=e.popoverTargetElement;if(l instanceof HTMLElement)return l;if(e=e.parentElement||On(e),e instanceof N0&&(e=e.host),e instanceof Document)return}}function ib(e,l){const a=new Map;let n=0;for(const i of l||[])a.set(i,n),n+=1;a.set(e,n),n+=1;let d=null;function c(i){if(!i)return;let s=!1,o=null,m=null;for(;!s;){if(o=iW(i)||null,o===null||!a.has(o))return;(e.popover==="hint"||o.popover==="auto")&&(s=!0),s||(i=o.parentElement)}m=a.get(o),(d===null||a.get(d)<m)&&(d=o)}return c(e.parentElement||On(e)),d}function TH(e){return e.hidden||e instanceof N0||(e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement||e instanceof HTMLFieldSetElement)&&e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e instanceof HTMLAnchorElement&&e.href===""?!1:typeof e.tabIndex=="number"&&e.tabIndex!==-1}function IH(e){if(e.shadowRoot&&e.shadowRoot.delegatesFocus!==!0)return null;let l=e;l.shadowRoot&&(l=l.shadowRoot);let a=l.querySelector("[autofocus]");if(a)return a;{const c=l.querySelectorAll("slot");for(const i of c){const s=i.assignedElements({flatten:!0});for(const o of s){if(o.hasAttribute("autofocus"))return o;if(a=o.querySelector("[autofocus]"),a)return a}}}const n=e.ownerDocument.createTreeWalker(l,NodeFilter.SHOW_ELEMENT);let d=n.currentNode;for(;d;){if(TH(d))return d;d=n.nextNode()}}function xH(e){var l;(l=IH(e))==null||l.focus()}var Oi=new WeakMap;function Pm(e){if(!Ka(e,!1))return;const l=e.ownerDocument;if(!e.dispatchEvent(new gs("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!Ka(e,!1))return;let a=!1;const n=e.popover;let d=null;const c=ib(e,la.get(l)||new Set),i=ib(e,ct.get(l)||new Set);if(n==="auto"&&(Qm(ct.get(l)||new Set,a,!0),Ha(c||l,a,!0),d="auto"),n==="hint"&&(i?(Ha(i,a,!0),d="hint"):(Qm(ct.get(l)||new Set,a,!0),c?(Ha(c,a,!0),d="auto"):d="hint")),n==="auto"||n==="hint"){if(n!==e.popover||!Ka(e,!1))return;_d(l)||(a=!0),d==="auto"?(la.has(l)||la.set(l,new Set),la.get(l).add(e)):d==="hint"&&(ct.has(l)||ct.set(l,new Set),ct.get(l).add(e))}Oi.delete(e);const s=l.activeElement;e.classList.add(":popover-open"),Un.set(e,"showing"),ni.has(l)||ni.set(l,new Set),ni.get(l).add(e),sW(Ui.get(e),!0),xH(e),a&&s&&e.popover==="auto"&&Oi.set(e,s),cW(e,"closed","open")}function En(e,l=!1,a=!1){var n,d;if(!Ka(e,!0))return;const c=e.ownerDocument;if(["auto","hint"].includes(e.popover)&&(Ha(e,l,a),!Ka(e,!0)))return;const i=la.get(c)||new Set,s=i.has(e)&&Ad(i)===e;if(sW(Ui.get(e),!1),Ui.delete(e),a&&(e.dispatchEvent(new gs("beforetoggle",{oldState:"open",newState:"closed"})),s&&Ad(i)!==e&&Ha(e,l,a),!Ka(e,!0)))return;(n=ni.get(c))==null||n.delete(e),i.delete(e),(d=ct.get(c))==null||d.delete(e),e.classList.remove(":popover-open"),Un.set(e,"hidden"),a&&cW(e,"open","closed");const o=Oi.get(e);o&&(Oi.delete(e),l&&o.focus())}function zH(e,l=!1,a=!1){let n=_d(e);for(;n;)En(n,l,a),n=_d(e)}function Qm(e,l=!1,a=!1){let n=cb(e);for(;n;)En(n,l,a),n=cb(e)}function sb(e,l,a,n){let d=!1,c=!1;for(;d||!c;){c=!0;let i=null,s=!1;for(const o of l)if(o===e)s=!0;else if(s){i=o;break}if(!i)return;for(;Di(i)==="showing"&&l.size;)En(Ad(l),a,n);l.has(e)&&Ad(l)!==e&&(d=!0),d&&(n=!1)}}function Ha(e,l,a){var n,d;const c=e.ownerDocument||e;if(e instanceof Document)return zH(c,l,a);if((n=ct.get(c))!=null&&n.has(e)){sb(e,ct.get(c),l,a);return}Qm(ct.get(c)||new Set,l,a),(d=la.get(c))!=null&&d.has(e)&&sb(e,la.get(c),l,a)}var xo=new WeakMap;function ob(e){if(!e.isTrusted)return;const l=e.composedPath()[0];if(!l)return;const a=l.ownerDocument;if(!_d(a))return;const n=MH(l);if(n&&e.type==="pointerdown")xo.set(a,n);else if(e.type==="pointerup"){const d=xo.get(a)===n;xo.delete(a),d&&Ha(n||a,!1,!0)}}var zo=new WeakMap;function sW(e,l=!1){if(!e)return;zo.has(e)||zo.set(e,e.getAttribute("aria-expanded"));const a=e.popoverTargetElement;if(a instanceof HTMLElement&&a.popover==="auto")e.setAttribute("aria-expanded",String(l));else{const n=zo.get(e);n?e.setAttribute("aria-expanded",n):e.removeAttribute("aria-expanded")}}var mb=globalThis.ShadowRoot||function(){};function wH(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype=="object"&&"popover"in HTMLElement.prototype}function ka(e,l,a){const n=e[l];Object.defineProperty(e,l,{value(d){return n.call(this,a(d))}})}var gH=/(^|[^\\]):popover-open\b/g;function RH(){return typeof globalThis.CSSLayerBlockRule=="function"}function SH(){const e=RH();return`
461
461
  ${e?"@layer popover-polyfill {":""}
462
462
  :where([popover]) {
463
463
  position: fixed;