your-ai-workflow-firebase-os 1.14.52 → 1.14.55
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/{AddressField-B8W53F-j.cjs → AddressField-BZTqPX7-.cjs} +1 -1
- package/dist/{AddressField-LR20w6gf.js → AddressField-CFTvOrZh.js} +1 -1
- package/dist/{ContactPopup-BdbtILAG.js → ContactPopup-DFWtAvfq.js} +72 -72
- package/dist/{ContactPopup-D6djApkD.cjs → ContactPopup-USutXzIL.cjs} +2 -2
- package/dist/PhoneInputField-BWTHQRZK.js +2 -0
- package/dist/{PhoneInputField-DXjjX_3I.cjs → PhoneInputField-BelEqhvM.cjs} +1 -1
- package/dist/{PhoneInputField-QGK9A7QV.js → PhoneInputField-CqjxHhpX.js} +1 -1
- package/dist/{PhoneInputField-C7n20Iy5.cjs → PhoneInputField-_avmh49G.cjs} +1 -1
- package/dist/{bake-D-suKe3J.cjs → bake-DLRZdTzF.cjs} +1 -1
- package/dist/{bake-D7R8dzga.js → bake-pYRyRand.js} +1 -1
- package/dist/lucide-react-BtgevX7o.cjs +1 -0
- package/dist/lucide-react-D2hhoKzU.js +53982 -0
- package/dist/renderer.cjs.js +1 -1
- package/dist/renderer.es.js +1 -1
- package/dist/server.cjs.js +2 -2
- package/dist/server.es.js +283 -277
- package/dist/validate-BUETBii8.js +817 -0
- package/dist/validate-DSTgfHpO.cjs +102 -0
- package/dist/vite.cjs.js +2 -2
- package/dist/vite.es.js +31 -31
- package/dist/your-ai-workflow-firebase-os.cjs.js +37 -37
- package/dist/your-ai-workflow-firebase-os.css +1 -1
- package/dist/your-ai-workflow-firebase-os.es.js +5925 -5733
- package/package.json +2 -2
- package/dist/PhoneInputField-D6v3tlSh.js +0 -2
- package/dist/lucide-react-B5y5fSe6.cjs +0 -1
- package/dist/lucide-react-DF6OAkVU.js +0 -38405
- package/dist/validate-Dfw5UlEt.cjs +0 -102
- package/dist/validate-xhXBsVl3.js +0 -749
- /package/dist/{fileBytes-69DMXMdM.js → fileBytes-CP4SR2MI.js} +0 -0
- /package/dist/{fileBytes-CyP39kjQ.cjs → fileBytes-Cg-oGu9u.cjs} +0 -0
- /package/dist/{tabAudience-D3w48LAz.cjs → tabAudience-B9FjADx2.cjs} +0 -0
- /package/dist/{tabAudience-DKaiLhWr.js → tabAudience-DTuLb6ht.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./lucide-react-
|
|
1
|
+
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./lucide-react-BtgevX7o.cjs`),t=require(`./address-CCq55BsD.cjs`),n=require(`./dist-CNztuGOG.cjs`);let r=require(`react`),i=require(`react/jsx-runtime`);var a=null;function o(){return a||(a=n.t.map(e=>{let t=n.n(e);return{iso2:t.iso2,name:t.name}}).sort((e,t)=>e.name.localeCompare(t.name)),a)}var s=e=>o().find(t=>t.iso2===String(e||``).toLowerCase())?.name||``,c={"united states of america":`us`,usa:`us`,"u.s.":`us`,"u.s.a.":`us`,uk:`gb`,"great britain":`gb`,england:`gb`,scotland:`gb`,wales:`gb`,"northern ireland":`gb`,"russian federation":`ru`,deutschland:`de`,españa:`es`,italia:`it`,brasil:`br`,"south korea":`kr`,"republic of korea":`kr`,"north korea":`kp`,czechia:`cz`,"czech republic":`cz`,"viet nam":`vn`,türkiye:`tr`,"the netherlands":`nl`,holland:`nl`,uae:`ae`,"united arab emirates":`ae`,"hong kong sar":`hk`,macau:`mo`,"ivory coast":`ci`,"côte d'ivoire":`ci`,eswatini:`sz`,"myanmar (burma)":`mm`,burma:`mm`};function l(e){let t=String(e||``).trim().toLowerCase();if(!t)return``;if(/^[a-z]{2}$/.test(t)&&o().some(e=>e.iso2===t))return t;if(c[t])return c[t];let n=o().find(e=>e.name.toLowerCase()===t);return n?n.iso2:o().find(e=>t.startsWith(e.name.toLowerCase())||e.name.toLowerCase().startsWith(t))?.iso2||``}function u(e){let t=l(e);return t?s(t):String(e||``).trim()}var d=`https://photon.komoot.io/api/`;function f(e){let t=(e.street||``).trim(),n=(e.housenumber||``).trim();return t?n?`${n} ${t}`:t:(e.name||``).trim()}var p=e=>(e.city||e.town||e.village||e.district||e.county||``).trim();function m(e,t){let n=e.properties;if(!n)return null;let r=f(n),i=p(n);if(!r&&!i)return null;let a=(n.state||``).trim(),o=(n.postcode||``).trim(),s=(n.country||``).trim(),c=[a,o].filter(Boolean).join(` `);return{id:`${n.osm_type||`x`}${n.osm_id??t}-${t}`,label:[r,i,c,s].filter(Boolean).join(`, `),street:r,city:i,region:a,postcode:o,country:s,countryCode:(n.countrycode||``).trim().toLowerCase()}}function h(e){let t=new Set;return e.filter(e=>{let n=e.label.toLowerCase();return t.has(n)?!1:(t.add(n),!0)})}async function g(e,t={}){let n=String(e||``).trim();if(n.length<3)return[];let r=`${d}?q=${encodeURIComponent(n)}&limit=${t.limit??6}`;try{let e=await fetch(r,{signal:t.signal});if(!e.ok)return[];let n=await e.json();return h((Array.isArray(n?.features)?n.features:[]).map(m).filter(e=>e!==null))}catch{return[]}}var _=`text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1`,v={borderRadius:`var(--input-radius, 0.75rem)`},y=`flex items-center h-12 w-full px-4 text-[15px] text-foreground transition-all duration-300 glass-panel`,b=`block h-12 w-full px-4 py-2 text-[15px] text-foreground transition-all duration-300 placeholder:text-foreground/40 focus:outline-none focus:border-accent glow-focus disabled:cursor-not-allowed disabled:opacity-50 glass-panel`,x=`flex-1 min-w-0 bg-transparent border-none outline-none shadow-none p-0 text-[15px] text-foreground placeholder:text-foreground/40 no-glow`;function S(e){let[t,n]=(0,r.useState)(!1),[i,a]=(0,r.useState)(!1),[o,s]=(0,r.useState)([]),[c,l]=(0,r.useState)(-1),u=(0,r.useRef)(!1),d=(0,r.useRef)(!1),f=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(u.current){u.current=!1;return}if(!d.current){s([]),a(!1),n(!1);return}let t=e.trim();if(t.length<3){s([]),a(!1),n(!1);return}let r=new AbortController;a(!0);let i=setTimeout(async()=>{let e=await g(t,{signal:r.signal});r.signal.aborted||(s(e),l(-1),a(!1),n(e.length>0))},250);return()=>{r.abort(),clearTimeout(i)}},[e]),(0,r.useEffect)(()=>{if(!t)return;let e=e=>{f.current?.contains(e.target)||n(!1)};return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[t]),{open:t,setOpen:n,busy:i,rows:o,active:c,setActive:l,boxRef:f,typed:d,take:e=>{u.current=!0,e(),n(!1),s([]),l(-1)},onKeyDown:(e,r)=>{if(e.key===`Escape`&&t){e.stopPropagation(),n(!1);return}!t||!o.length||(e.key===`ArrowDown`?(e.preventDefault(),l(e=>(e+1)%o.length)):e.key===`ArrowUp`?(e.preventDefault(),l(e=>(e<=0?o.length:e)-1)):e.key===`Enter`&&c>=0&&(e.preventDefault(),r(o[c])))}}}function C({label:t,value:n,disabled:a,onPick:s}){let[c,u]=(0,r.useState)(!1),[d,f]=(0,r.useState)(``),p=(0,r.useRef)(null),m=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!c){f(``);return}m.current?.focus();let e=e=>{p.current?.contains(e.target)||u(!1)};return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[c]);let h=d.trim().toLowerCase(),g=h?o().filter(e=>e.name.toLowerCase().includes(h)):o(),_=l(n);return(0,i.jsxs)(`div`,{className:`relative w-full`,ref:p,children:[(0,i.jsxs)(`button`,{type:`button`,disabled:a,onClick:()=>u(e=>!e),"aria-haspopup":`listbox`,"aria-expanded":c,"aria-label":t,className:`${y} justify-between gap-2 text-left cursor-pointer hover:border-accent/40 disabled:cursor-not-allowed disabled:opacity-50`,style:v,children:[(0,i.jsx)(`span`,{className:`truncate ${n?`text-foreground`:`text-foreground/40`}`,children:n||`Country`}),(0,i.jsx)(e.rn,{className:`w-3.5 h-3.5 shrink-0 text-foreground/50 transition-transform duration-300 ${c?`rotate-180`:``}`})]}),c&&(0,i.jsxs)(`div`,{role:`listbox`,"aria-label":t,className:`absolute z-[999999] top-[calc(100%+8px)] left-0 w-full glass-popover overflow-hidden`,style:v,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-2 px-3 h-11 border-b border-[var(--panel-border)]/50`,children:[(0,i.jsx)(e.P,{className:`w-3.5 h-3.5 shrink-0 text-foreground/35`}),(0,i.jsx)(`input`,{ref:m,value:d,onChange:e=>f(e.target.value),onKeyDown:e=>{if(e.key===`Escape`){e.stopPropagation(),u(!1);return}e.key===`Enter`&&(e.preventDefault(),g[0]&&(s(g[0].name),u(!1)))},placeholder:`Search countries`,"aria-label":`Search countries`,autoComplete:`off`,className:`${x} text-[14px]`})]}),(0,i.jsxs)(`div`,{className:`max-h-56 overflow-y-auto no-scrollbar p-1`,children:[n&&!h&&(0,i.jsxs)(`div`,{role:`option`,"aria-selected":!1,onClick:()=>{s(``),u(!1)},className:`flex items-center gap-2.5 px-3 py-2.5 text-[13px] font-medium text-foreground/60 hover:bg-foreground/5 cursor-pointer`,style:{borderRadius:`calc(var(--input-radius, 0.75rem) - 0.25rem)`},children:[(0,i.jsx)(e.o,{className:`w-3.5 h-3.5 shrink-0 text-foreground/35`}),(0,i.jsx)(`span`,{className:`truncate`,children:`No country`})]}),g.map(e=>(0,i.jsx)(`div`,{role:`option`,"aria-selected":e.iso2===_,onClick:()=>{s(e.name),u(!1)},className:`flex items-center px-3 py-2.5 transition-colors font-medium text-[13px] cursor-pointer ${e.iso2===_?`bg-accent/10 text-accent font-bold`:`text-foreground/80 hover:bg-foreground/5 hover:text-foreground`}`,style:{borderRadius:`calc(var(--input-radius, 0.75rem) - 0.25rem)`},children:(0,i.jsx)(`span`,{className:`truncate`,children:e.name})},e.iso2)),g.length===0&&(0,i.jsx)(`div`,{className:`px-3 py-2.5 text-[13px] text-foreground/40`,children:`No match`})]})]})]})}function w({id:n,label:r,value:a,onChange:o,required:s=!1,disabled:c=!1,placeholder:d,error:f}){let p=S(a.street),m=t.a(l(a.country)),h=e=>o({...a,...e}),g=e=>p.take(()=>o({street:e.street,city:e.city,region:e.region,postcode:e.postcode,country:u(e.countryCode||e.country)||a.country})),w=(e,t,n,o,s)=>(0,i.jsx)(`div`,{className:o,children:(0,i.jsx)(`input`,{type:`text`,disabled:c,value:a[e],onChange:t=>h({[e]:t.target.value}),placeholder:n,"aria-label":`${r} — ${t}`,autoComplete:s,className:b,style:v})},e),T=m.postal?`col-span-1`:`col-span-2`,E=m.region?`col-span-1`:`col-span-2`,D=!!(a.country||a.city||a.region||a.postcode);return(0,i.jsxs)(`div`,{className:`flex flex-col w-full`,ref:p.boxRef,children:[(0,i.jsxs)(`label`,{className:_,htmlFor:n,children:[r,` `,s&&(0,i.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,i.jsxs)(`div`,{className:`relative w-full`,children:[(0,i.jsxs)(`div`,{className:`${y} gap-2.5 focus-within:border-accent glow-focus ${f?`border-red-500/50`:``}`,style:v,children:[(0,i.jsx)(e.ot,{className:`w-4 h-4 shrink-0 text-foreground/40`}),(0,i.jsx)(`input`,{id:n,type:`text`,required:s,disabled:c,value:a.street,onChange:e=>{p.typed.current=!0,h({street:e.target.value})},onFocus:()=>{p.rows.length&&p.setOpen(!0)},onKeyDown:e=>p.onKeyDown(e,g),role:`combobox`,"aria-expanded":p.open,"aria-autocomplete":`list`,"aria-controls":`${n}-list`,placeholder:d||`Start typing your address`,autoComplete:`address-line1`,className:x}),p.busy&&(0,i.jsx)(e.pt,{className:`w-3.5 h-3.5 shrink-0 text-foreground/30 animate-spin`})]}),p.open&&(0,i.jsx)(`div`,{id:`${n}-list`,role:`listbox`,"aria-label":r,className:`absolute z-[999999] top-[calc(100%+8px)] left-0 w-full glass-popover overflow-hidden p-1`,style:v,children:p.rows.map((t,n)=>(0,i.jsxs)(`div`,{role:`option`,"aria-selected":n===p.active,onMouseEnter:()=>p.setActive(n),onClick:()=>g(t),className:`flex items-center gap-2.5 px-3 py-2.5 transition-colors text-[13px] font-medium cursor-pointer ${n===p.active?`bg-accent/10 text-accent`:`text-foreground/80 hover:bg-foreground/5`}`,style:{borderRadius:`calc(var(--input-radius, 0.75rem) - 0.25rem)`},children:[(0,i.jsx)(e.ot,{className:`w-3.5 h-3.5 shrink-0 text-foreground/35`}),(0,i.jsx)(`span`,{className:`truncate`,children:t.label})]},t.id))})]}),(0,i.jsx)(`div`,{className:`mt-2.5`,children:(0,i.jsx)(C,{label:`${r} — country`,value:a.country,disabled:c,onPick:e=>h({country:e})})}),D&&(0,i.jsxs)(`div`,{className:`grid grid-cols-2 gap-2.5 mt-2.5`,children:[w(`city`,`city`,t.t[m.locality],`col-span-2`,`address-level2`),m.region&&w(`region`,`region`,t.t[m.region],T,`address-level1`),m.postal&&w(`postcode`,`postcode`,t.t[m.postal],E,`postal-code`)]}),f&&(0,i.jsx)(`p`,{className:`text-xs text-red-500 font-medium mt-1.5 ml-1`,children:f})]})}exports.AddressField=w,exports.default=w;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P as e, o as t, ot as n, pt as r, rn as i } from "./lucide-react-D2hhoKzU.js";
|
|
2
2
|
import { a, t as o } from "./address-BDU-ls1U.js";
|
|
3
3
|
import { n as s, t as c } from "./dist-C4ycpl2h.js";
|
|
4
4
|
import { useEffect as l, useRef as u, useState as d } from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as e, n as t, r as n } from "./chunk-NnHqS4_Y.js";
|
|
2
2
|
import { _ as r, h as i, p as a, t as o, y as s } from "./verifiedAccount-CWSiPEGw.js";
|
|
3
|
-
import { $t as c,
|
|
3
|
+
import { $t as c, J as l, M as u, Ot as d, P as f, Z as p, cn as m, en as h, in as g, mn as _, nn as v, o as y, on as b, pt as x, qt as S, rn as C, tn as w, un as T, vn as ee, zt as te } from "./lucide-react-D2hhoKzU.js";
|
|
4
4
|
import { i as ne, l as re, r as ie } from "./address-BDU-ls1U.js";
|
|
5
5
|
import * as ae from "react";
|
|
6
6
|
import E, { Children as oe, Component as se, Fragment as ce, Suspense as D, createContext as O, createElement as le, forwardRef as ue, isValidElement as de, lazy as k, useCallback as A, useContext as j, useEffect as M, useId as N, useInsertionEffect as fe, useLayoutEffect as pe, useMemo as P, useRef as F, useState as I } from "react";
|
|
@@ -115,7 +115,7 @@ function pt({ config: e, children: t }) {
|
|
|
115
115
|
children: t
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
|
-
var mt = () => j(ft), ht = "1.14.
|
|
118
|
+
var mt = () => j(ft), ht = "1.14.55", gt = typeof window < "u" ? pe : M, _t = O(void 0), vt = (e) => {
|
|
119
119
|
let t = e?.defaultTheme;
|
|
120
120
|
return t !== "light" && t !== "dark" || e?.showThemeToggle ? null : t;
|
|
121
121
|
};
|
|
@@ -9013,15 +9013,15 @@ Uv.displayName = "Button";
|
|
|
9013
9013
|
//#region src/components/CustomSelect.tsx
|
|
9014
9014
|
var Wv = () => typeof document > "u" ? null : document.querySelector(".firebase-os") || document.body;
|
|
9015
9015
|
function Gv({ value: e = "", options: t, onChange: n, label: r, disabled: i, variant: a = "default", multiple: o = !1, values: s, placeholder: c, footer: l, compact: u = !1, dense: d = !1, direction: f = "up", portal: p = !1, ariaLabel: m, className: h = "" }) {
|
|
9016
|
-
let [
|
|
9016
|
+
let [_, v] = I(!1), [y, b] = I(f === "down" ? "down" : "up"), [x, S] = I(null), w = F(null), T = F(null), ee = F(null);
|
|
9017
9017
|
M(() => {
|
|
9018
9018
|
function e(e) {
|
|
9019
9019
|
let t = e.target;
|
|
9020
|
-
|
|
9020
|
+
w.current?.contains(t) || ee.current?.contains(t) || v(!1);
|
|
9021
9021
|
}
|
|
9022
9022
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
9023
9023
|
}, []), pe(() => {
|
|
9024
|
-
if (!
|
|
9024
|
+
if (!_) return;
|
|
9025
9025
|
let e = () => {
|
|
9026
9026
|
let e = T.current;
|
|
9027
9027
|
if (!e) return;
|
|
@@ -9039,13 +9039,13 @@ function Gv({ value: e = "", options: t, onChange: n, label: r, disabled: i, var
|
|
|
9039
9039
|
return e(), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
9040
9040
|
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
9041
9041
|
};
|
|
9042
|
-
}, [
|
|
9042
|
+
}, [_, f]);
|
|
9043
9043
|
let te = o && s || [], ne = (t) => o ? te.includes(t) : e === t, re = t.find((t) => t.value === e) || (c == null ? t[0] : void 0), ie = t.filter((e) => te.includes(e.value)).map((e) => e.label), ae = o ? ie.length ? ie.map((e, t) => /* @__PURE__ */ R(E.Fragment, { children: [t > 0 ? ", " : "", e] }, t)) : c : re?.label ?? c, oe = !i && (t.length > 1 || o), se = F(null);
|
|
9044
9044
|
M(() => {
|
|
9045
|
-
if (!
|
|
9045
|
+
if (!_) return;
|
|
9046
9046
|
let e = se.current, t = e?.querySelector("[aria-selected=\"true\"]");
|
|
9047
9047
|
!e || !t || (e.scrollTop = t.offsetTop - e.clientHeight / 2 + t.clientHeight / 2);
|
|
9048
|
-
}, [
|
|
9048
|
+
}, [_]);
|
|
9049
9049
|
let ce = /* @__PURE__ */ L(m_.div, {
|
|
9050
9050
|
ref: ee,
|
|
9051
9051
|
role: "listbox",
|
|
@@ -9087,20 +9087,20 @@ function Gv({ value: e = "", options: t, onChange: n, label: r, disabled: i, var
|
|
|
9087
9087
|
"aria-selected": ne(e.value),
|
|
9088
9088
|
"aria-disabled": e.disabled || void 0,
|
|
9089
9089
|
onClick: () => {
|
|
9090
|
-
e.disabled || (n(e.value), o ||
|
|
9090
|
+
e.disabled || (n(e.value), o || v(!1));
|
|
9091
9091
|
},
|
|
9092
9092
|
className: `flex items-center justify-between gap-3 px-3 py-2.5 transition-colors font-medium ${d ? "text-[13.5px]" : "text-[13px]"} ${e.disabled ? "text-foreground/30 cursor-default" : ne(e.value) ? "bg-accent/10 text-accent font-bold cursor-pointer" : "text-foreground/80 hover:bg-foreground/5 hover:text-foreground cursor-pointer"}`,
|
|
9093
9093
|
style: { borderRadius: "calc(var(--input-radius, 0.75rem) - 0.25rem)" },
|
|
9094
9094
|
children: [/* @__PURE__ */ L("span", {
|
|
9095
9095
|
className: "truncate",
|
|
9096
9096
|
children: e.label
|
|
9097
|
-
}), ne(e.value) && !e.disabled && /* @__PURE__ */ L(
|
|
9097
|
+
}), ne(e.value) && !e.disabled && /* @__PURE__ */ L(g, { className: "w-3.5 h-3.5 shrink-0 text-accent" })]
|
|
9098
9098
|
}, e.value)), l]
|
|
9099
9099
|
})
|
|
9100
|
-
}), D = p ? Wv() : null, O = /* @__PURE__ */ L(vh, { children:
|
|
9100
|
+
}), D = p ? Wv() : null, O = /* @__PURE__ */ L(vh, { children: _ && ce });
|
|
9101
9101
|
return /* @__PURE__ */ R("div", {
|
|
9102
9102
|
className: `flex flex-col relative ${u ? "w-auto" : "w-full"} ${i ? "opacity-50 pointer-events-none" : ""} ${h}`,
|
|
9103
|
-
ref:
|
|
9103
|
+
ref: w,
|
|
9104
9104
|
children: [
|
|
9105
9105
|
r && /* @__PURE__ */ L("label", {
|
|
9106
9106
|
className: "text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1",
|
|
@@ -9113,21 +9113,21 @@ function Gv({ value: e = "", options: t, onChange: n, label: r, disabled: i, var
|
|
|
9113
9113
|
role: "button",
|
|
9114
9114
|
tabIndex: i ? -1 : 0,
|
|
9115
9115
|
"aria-haspopup": "listbox",
|
|
9116
|
-
"aria-expanded":
|
|
9116
|
+
"aria-expanded": _,
|
|
9117
9117
|
"aria-label": m || r,
|
|
9118
9118
|
"aria-disabled": i || void 0,
|
|
9119
9119
|
onClick: () => {
|
|
9120
|
-
oe &&
|
|
9120
|
+
oe && v(!_);
|
|
9121
9121
|
},
|
|
9122
9122
|
onKeyDown: (e) => {
|
|
9123
|
-
oe && ((e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
9123
|
+
oe && ((e.key === "Enter" || e.key === " ") && (e.preventDefault(), v((e) => !e)), e.key === "Escape" && v(!1));
|
|
9124
9124
|
},
|
|
9125
|
-
className: `text-foreground transition-all duration-300 flex items-center justify-between outline-none ${u ? "h-9 px-3 gap-2 text-[12.5px] font-semibold" : d ? "w-full h-11 px-4 text-[14px] font-medium" : "w-full h-12 px-4 text-[15px]"} ${oe ? "cursor-pointer" : "cursor-default"} ${a === "ghost" ? "hover:bg-foreground/5 bg-transparent" : `border glass-panel ${u ? "" : "shadow-sm"} ${
|
|
9125
|
+
className: `text-foreground transition-all duration-300 flex items-center justify-between outline-none ${u ? "h-9 px-3 gap-2 text-[12.5px] font-semibold" : d ? "w-full h-11 px-4 text-[14px] font-medium" : "w-full h-12 px-4 text-[15px]"} ${oe ? "cursor-pointer" : "cursor-default"} ${a === "ghost" ? "hover:bg-foreground/5 bg-transparent" : `border glass-panel ${u ? "" : "shadow-sm"} ${_ ? "border-accent select-open" : "border-[var(--panel-border)]"}`}`,
|
|
9126
9126
|
style: { borderRadius: "var(--input-radius, 0.75rem)" },
|
|
9127
9127
|
children: [/* @__PURE__ */ L("span", {
|
|
9128
9128
|
className: "truncate",
|
|
9129
9129
|
children: ae
|
|
9130
|
-
}), (t.length > 1 || o) && /* @__PURE__ */ L(
|
|
9130
|
+
}), (t.length > 1 || o) && /* @__PURE__ */ L(C, { className: `w-4 h-4 text-foreground/50 shrink-0 transition-transform duration-300 ${_ ? "rotate-180" : ""}` })]
|
|
9131
9131
|
}), !(p && D) && O]
|
|
9132
9132
|
}),
|
|
9133
9133
|
p && D ? ot(O, D) : null
|
|
@@ -9393,7 +9393,7 @@ function Ry({ field: e, value: t, error: n, onChange: r }) {
|
|
|
9393
9393
|
"aria-label": `Remove ${Ny(e)}`,
|
|
9394
9394
|
title: "Remove",
|
|
9395
9395
|
className: "p-1 rounded-lg text-foreground/40 hover:text-red-500 hover:bg-red-500/10 transition-colors cursor-pointer shrink-0",
|
|
9396
|
-
children: /* @__PURE__ */ L(
|
|
9396
|
+
children: /* @__PURE__ */ L(y, { className: "w-3.5 h-3.5" })
|
|
9397
9397
|
})
|
|
9398
9398
|
]
|
|
9399
9399
|
}, e))
|
|
@@ -9403,14 +9403,14 @@ function Ry({ field: e, value: t, error: n, onChange: r }) {
|
|
|
9403
9403
|
className: `flex items-center gap-3 w-full rounded-xl px-4 py-3 glass-panel transition-all duration-300 cursor-pointer hover:border-accent ${l ? "opacity-60 pointer-events-none" : ""} ${m ? "!border-accent bg-accent/[0.05]" : ""}`,
|
|
9404
9404
|
style: { borderRadius: "var(--input-radius, 0.75rem)" },
|
|
9405
9405
|
children: [
|
|
9406
|
-
l ? /* @__PURE__ */ L(
|
|
9406
|
+
l ? /* @__PURE__ */ L(x, { className: "w-4 h-4 animate-spin text-accent shrink-0" }) : /* @__PURE__ */ L(S, { className: `w-4 h-4 shrink-0 ${m ? "text-accent" : "text-foreground/40"}` }),
|
|
9407
9407
|
/* @__PURE__ */ L("span", {
|
|
9408
9408
|
className: `flex-1 min-w-0 truncate text-[15px] ${m ? "text-accent" : "text-foreground/40"}`,
|
|
9409
9409
|
children: m ? "Drop to attach" : l ? i > 1 ? `Uploading ${i} files...` : "Uploading..." : u.length ? "Add another file" : e.placeholder || "Attach files, or drop them here"
|
|
9410
9410
|
}),
|
|
9411
9411
|
!l && /* @__PURE__ */ R("span", {
|
|
9412
9412
|
className: "inline-flex items-center gap-1.5 text-[12.5px] font-bold text-foreground/60 shrink-0",
|
|
9413
|
-
children: [/* @__PURE__ */ L(
|
|
9413
|
+
children: [/* @__PURE__ */ L(S, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ L("span", {
|
|
9414
9414
|
className: "max-sm:hidden",
|
|
9415
9415
|
children: "Upload"
|
|
9416
9416
|
})]
|
|
@@ -10333,7 +10333,7 @@ function FS(e, t, n, r, i = n) {
|
|
|
10333
10333
|
//#region src/components/fields/Fields.tsx
|
|
10334
10334
|
var IS = "rounded-2xl border border-[var(--panel-border)] bg-[var(--panel-bg)] transition-colors hover:border-accent/40", LS = "inline-flex items-center justify-center gap-1.5 h-8 px-2.5 sm:h-9 sm:px-3 shrink-0 whitespace-nowrap rounded-[var(--btn-radius,0.75rem)] text-[12.5px] font-semibold border border-[var(--panel-border)] bg-transparent text-foreground/60 hover:text-foreground hover:border-accent/40 hover:bg-foreground/[0.04] active:scale-[0.98] transition-all cursor-pointer disabled:opacity-40 disabled:pointer-events-none", RS = "w-full h-11 px-4 rounded-[var(--input-radius,0.75rem)] border border-[var(--panel-border)] bg-[var(--panel-bg)] text-[14px] text-foreground outline-none transition-all duration-300 placeholder:text-foreground/35 hover:border-accent/40 focus:border-accent disabled:opacity-50 disabled:cursor-not-allowed console-field", zS = "w-full h-11 flex items-center px-4 rounded-[var(--input-radius,0.75rem)] border border-[var(--panel-border)] bg-[var(--panel-bg)] transition-all duration-300 hover:border-accent/40 focus-within:border-accent console-field", BS = "flex-1 min-w-0 h-full bg-transparent border-none outline-none shadow-none text-[14px] text-foreground placeholder:text-foreground/35 disabled:cursor-not-allowed", VS = "text-[12.5px] sm:text-[13px] font-medium text-foreground/50 select-none", HS = "text-[11px] sm:text-[11.5px] text-foreground/40 font-medium leading-snug";
|
|
10335
10335
|
function US({ label: e = "cog" }) {
|
|
10336
|
-
return /* @__PURE__ */ L(
|
|
10336
|
+
return /* @__PURE__ */ L(u, {
|
|
10337
10337
|
role: "img",
|
|
10338
10338
|
"aria-label": e,
|
|
10339
10339
|
className: "inline-block w-[1.1em] h-[1.1em] align-[-0.18em] mx-[0.08em] text-foreground/85"
|
|
@@ -10356,7 +10356,7 @@ function GS({ onClick: e, children: t }) {
|
|
|
10356
10356
|
function KS({ state: e = "saved", label: t }) {
|
|
10357
10357
|
return /* @__PURE__ */ R("span", {
|
|
10358
10358
|
className: "inline-flex items-center gap-1.5 text-[11.5px] font-semibold text-foreground/50 whitespace-nowrap shrink-0",
|
|
10359
|
-
children: [e === "saving" ? /* @__PURE__ */ L(
|
|
10359
|
+
children: [e === "saving" ? /* @__PURE__ */ L(x, { className: "w-3 h-3 animate-spin text-foreground/40 shrink-0" }) : /* @__PURE__ */ L("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 ${e === "saved" ? "bg-emerald-500" : e === "error" ? "bg-red-500" : "bg-foreground/25"}` }), t]
|
|
10360
10360
|
});
|
|
10361
10361
|
}
|
|
10362
10362
|
function qS({ icon: e, children: t, onClick: n, disabled: r, busy: i, tone: a = "default", className: o = "", title: s, compact: c }) {
|
|
@@ -10366,7 +10366,7 @@ function qS({ icon: e, children: t, onClick: n, disabled: r, busy: i, tone: a =
|
|
|
10366
10366
|
onClick: n,
|
|
10367
10367
|
disabled: r || i,
|
|
10368
10368
|
className: `${LS} ${a === "danger" ? "hover:text-red-500 hover:border-red-500/40 hover:bg-red-500/[0.06]" : ""} ${c ? "max-sm:w-8 max-sm:px-0 max-sm:gap-0 max-sm:border-transparent max-sm:hover:border-transparent max-sm:hover:bg-foreground/[0.06]" : ""} ${o}`,
|
|
10369
|
-
children: [i ? /* @__PURE__ */ L(
|
|
10369
|
+
children: [i ? /* @__PURE__ */ L(x, { className: "w-3.5 h-3.5 animate-spin shrink-0" }) : e ? /* @__PURE__ */ L(e, { className: "w-3.5 h-3.5 shrink-0" }) : null, c ? /* @__PURE__ */ L("span", {
|
|
10370
10370
|
className: "max-sm:hidden sm:inline-flex items-center gap-1.5",
|
|
10371
10371
|
children: t
|
|
10372
10372
|
}) : t]
|
|
@@ -10428,7 +10428,7 @@ function ZS({ icon: e, title: t, description: n, actions: r, children: i, defaul
|
|
|
10428
10428
|
"aria-expanded": l,
|
|
10429
10429
|
"aria-label": l ? `Collapse ${t}` : `Expand ${t}`,
|
|
10430
10430
|
className: "row-start-1 col-start-4 row-span-2 self-center w-8 h-8 rounded-xl border border-[var(--panel-border)]/60 hover:border-accent/40 flex items-center justify-center text-foreground/50 hover:text-foreground hover:bg-foreground/5 transition-all cursor-pointer justify-self-end",
|
|
10431
|
-
children: /* @__PURE__ */ L(
|
|
10431
|
+
children: /* @__PURE__ */ L(C, { className: `w-4 h-4 transition-transform duration-200 ${l ? "rotate-180" : ""}` })
|
|
10432
10432
|
}),
|
|
10433
10433
|
n && /* @__PURE__ */ L("span", {
|
|
10434
10434
|
className: "row-start-2 col-start-2 min-w-0 text-[12px] text-foreground/50 font-normal leading-snug truncate self-start",
|
|
@@ -10666,21 +10666,21 @@ function oC({ saving: e, savedAt: t, error: n }) {
|
|
|
10666
10666
|
//#endregion
|
|
10667
10667
|
//#region src/components/fields/TimeZoneField.tsx
|
|
10668
10668
|
function sC({ label: e = "Time zone", hint: t, value: n, onChange: r, compact: i }) {
|
|
10669
|
-
let [a, o] = I(""), s = Mb(), c = (n || "").trim(),
|
|
10669
|
+
let [a, o] = I(""), s = Mb(), c = (n || "").trim(), l = P(() => Ib(a), [a]), u = a.trim().length > 0, p = t ?? (c === s ? "Detected from your browser." : `Your browser is in ${xx(s)}.`), m = /* @__PURE__ */ R("div", {
|
|
10670
10670
|
className: "flex flex-col gap-2",
|
|
10671
10671
|
children: [/* @__PURE__ */ R("div", {
|
|
10672
10672
|
className: zS,
|
|
10673
|
-
children: [c && !
|
|
10673
|
+
children: [c && !u ? /* @__PURE__ */ R("span", {
|
|
10674
10674
|
className: "inline-flex items-center gap-2 mr-2.5 shrink-0 min-w-0 text-accent",
|
|
10675
10675
|
children: [
|
|
10676
|
-
/* @__PURE__ */ L(
|
|
10676
|
+
/* @__PURE__ */ L(d, { className: "w-4 h-4 shrink-0" }),
|
|
10677
10677
|
/* @__PURE__ */ L("span", {
|
|
10678
10678
|
className: "text-[13px] font-semibold truncate",
|
|
10679
10679
|
children: xx(c)
|
|
10680
10680
|
}),
|
|
10681
|
-
/* @__PURE__ */ L(
|
|
10681
|
+
/* @__PURE__ */ L(g, { className: "w-3.5 h-3.5 shrink-0" })
|
|
10682
10682
|
]
|
|
10683
|
-
}) : /* @__PURE__ */ L(
|
|
10683
|
+
}) : /* @__PURE__ */ L(f, { className: "w-4 h-4 mr-2.5 text-foreground/30 shrink-0" }), /* @__PURE__ */ L("input", {
|
|
10684
10684
|
type: "text",
|
|
10685
10685
|
value: a,
|
|
10686
10686
|
onChange: (e) => o(e.target.value),
|
|
@@ -10688,11 +10688,11 @@ function sC({ label: e = "Time zone", hint: t, value: n, onChange: r, compact: i
|
|
|
10688
10688
|
"aria-label": "Search time zones",
|
|
10689
10689
|
className: `${BS} no-glow`
|
|
10690
10690
|
})]
|
|
10691
|
-
}),
|
|
10691
|
+
}), u && /* @__PURE__ */ L("div", {
|
|
10692
10692
|
className: "rounded-[var(--input-radius,0.75rem)] border border-[var(--panel-border)] bg-[var(--panel-bg)] p-1.5 max-h-56 overflow-y-auto",
|
|
10693
|
-
children:
|
|
10693
|
+
children: l.length > 0 ? /* @__PURE__ */ L("div", {
|
|
10694
10694
|
className: "flex flex-col",
|
|
10695
|
-
children:
|
|
10695
|
+
children: l.map((e) => /* @__PURE__ */ R("button", {
|
|
10696
10696
|
type: "button",
|
|
10697
10697
|
"aria-pressed": e === c,
|
|
10698
10698
|
onClick: () => {
|
|
@@ -10723,7 +10723,7 @@ function cC({ timeZone: e, onTimeZone: t, action: n }) {
|
|
|
10723
10723
|
className: `flex gap-3 ${n ? "max-sm:flex-col max-sm:items-stretch sm:items-center sm:justify-between" : ""}`,
|
|
10724
10724
|
children: [/* @__PURE__ */ R("p", {
|
|
10725
10725
|
className: "flex items-center gap-1.5 text-[12px] font-medium text-foreground/50",
|
|
10726
|
-
children: [/* @__PURE__ */ L(
|
|
10726
|
+
children: [/* @__PURE__ */ L(d, {
|
|
10727
10727
|
className: "w-3.5 h-3.5 text-foreground/35 shrink-0",
|
|
10728
10728
|
"aria-hidden": !0
|
|
10729
10729
|
}), /* @__PURE__ */ R("span", { children: [
|
|
@@ -10764,7 +10764,7 @@ function dC({ slots: e, value: t, onChange: n, timeZone: r, members: i, together
|
|
|
10764
10764
|
onClick: () => n(i ? null : e),
|
|
10765
10765
|
className: `${uC} ${i ? "bg-accent border-accent text-[var(--button-fg,#fff)] shadow-md shadow-accent/25" : "border-[var(--panel-border)] bg-transparent text-foreground/75 hover:border-accent/50 hover:text-foreground hover:bg-foreground/[0.04] active:scale-[0.98]"}`,
|
|
10766
10766
|
children: [
|
|
10767
|
-
i && /* @__PURE__ */ L(
|
|
10767
|
+
i && /* @__PURE__ */ L(g, {
|
|
10768
10768
|
className: "absolute left-2.5 w-3.5 h-3.5",
|
|
10769
10769
|
"aria-hidden": !0
|
|
10770
10770
|
}),
|
|
@@ -10855,7 +10855,7 @@ function _C({ slot: e, timeZone: t, who: n, onChange: r }) {
|
|
|
10855
10855
|
children: [
|
|
10856
10856
|
/* @__PURE__ */ L("div", {
|
|
10857
10857
|
className: `w-10 h-10 ${gC}`,
|
|
10858
|
-
children: /* @__PURE__ */ L(
|
|
10858
|
+
children: /* @__PURE__ */ L(T, { className: "w-4 h-4" })
|
|
10859
10859
|
}),
|
|
10860
10860
|
/* @__PURE__ */ R("div", {
|
|
10861
10861
|
className: "flex flex-col min-w-0 flex-1 gap-0.5",
|
|
@@ -10872,7 +10872,7 @@ function _C({ slot: e, timeZone: t, who: n, onChange: r }) {
|
|
|
10872
10872
|
onClick: r,
|
|
10873
10873
|
"aria-label": "Change the time",
|
|
10874
10874
|
className: "shrink-0 cursor-pointer flex items-center justify-center transition-all max-sm:w-9 max-sm:h-9 max-sm:rounded-xl max-sm:border max-sm:border-[var(--panel-border)] max-sm:text-foreground/50 max-sm:hover:text-accent max-sm:hover:border-accent/40 max-sm:active:scale-[0.98] sm:text-[12.5px] sm:font-bold sm:text-accent sm:hover:underline",
|
|
10875
|
-
children: [/* @__PURE__ */ L(
|
|
10875
|
+
children: [/* @__PURE__ */ L(l, {
|
|
10876
10876
|
className: "w-3.5 h-3.5 sm:hidden",
|
|
10877
10877
|
"aria-hidden": !0
|
|
10878
10878
|
}), /* @__PURE__ */ L("span", {
|
|
@@ -10928,15 +10928,15 @@ function EC({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
|
|
|
10928
10928
|
tz: i,
|
|
10929
10929
|
day: f,
|
|
10930
10930
|
month: wC(f || c[0]?.dateKey || u)
|
|
10931
|
-
})), g = p.tz === i, _ = g ? p.day : f,
|
|
10931
|
+
})), g = p.tz === i, _ = g ? p.day : f, y = g ? p.month : wC(f || c[0]?.dateKey || u), b = (e) => h({
|
|
10932
10932
|
tz: i,
|
|
10933
10933
|
day: _,
|
|
10934
|
-
month: e(
|
|
10934
|
+
month: e(y)
|
|
10935
10935
|
}), x = (e) => h({
|
|
10936
10936
|
tz: i,
|
|
10937
10937
|
day: e,
|
|
10938
|
-
month:
|
|
10939
|
-
}), S = _ ? d.get(_) : void 0, C = TC(
|
|
10938
|
+
month: y
|
|
10939
|
+
}), S = _ ? d.get(_) : void 0, C = TC(y), T = S?.slots.length || 0, { ref: ee, moreBelow: te } = SC(T, _);
|
|
10940
10940
|
return /* @__PURE__ */ R("div", {
|
|
10941
10941
|
className: "flex flex-col gap-4 w-full",
|
|
10942
10942
|
children: [
|
|
@@ -10949,7 +10949,7 @@ function EC({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
|
|
|
10949
10949
|
className: bC,
|
|
10950
10950
|
children: [/* @__PURE__ */ L("h4", {
|
|
10951
10951
|
className: "text-[14px] font-bold text-foreground tracking-tight truncate",
|
|
10952
|
-
children: Wb(
|
|
10952
|
+
children: Wb(y)
|
|
10953
10953
|
}), /* @__PURE__ */ R("div", {
|
|
10954
10954
|
className: "flex items-center gap-1.5 shrink-0",
|
|
10955
10955
|
children: [
|
|
@@ -10964,14 +10964,14 @@ function EC({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
|
|
|
10964
10964
|
"aria-label": "Previous month",
|
|
10965
10965
|
onClick: () => b((e) => Gb(e, -1)),
|
|
10966
10966
|
className: xC,
|
|
10967
|
-
children: /* @__PURE__ */ L(
|
|
10967
|
+
children: /* @__PURE__ */ L(v, { className: "w-4 h-4" })
|
|
10968
10968
|
}),
|
|
10969
10969
|
/* @__PURE__ */ L("button", {
|
|
10970
10970
|
type: "button",
|
|
10971
10971
|
"aria-label": "Next month",
|
|
10972
10972
|
onClick: () => b((e) => Gb(e, 1)),
|
|
10973
10973
|
className: xC,
|
|
10974
|
-
children: /* @__PURE__ */ L(
|
|
10974
|
+
children: /* @__PURE__ */ L(w, { className: "w-4 h-4" })
|
|
10975
10975
|
})
|
|
10976
10976
|
]
|
|
10977
10977
|
})]
|
|
@@ -10980,7 +10980,7 @@ function EC({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
|
|
|
10980
10980
|
children: /* @__PURE__ */ R("div", {
|
|
10981
10981
|
className: "grid grid-cols-7 gap-1 w-full max-w-[26rem] mx-auto",
|
|
10982
10982
|
role: "grid",
|
|
10983
|
-
"aria-label": Wb(
|
|
10983
|
+
"aria-label": Wb(y),
|
|
10984
10984
|
children: [vC.map((e, t) => /* @__PURE__ */ L("div", {
|
|
10985
10985
|
className: "text-center text-[10.5px] font-bold uppercase tracking-wider text-foreground/35 pb-1",
|
|
10986
10986
|
children: e
|
|
@@ -11013,12 +11013,12 @@ function EC({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
|
|
|
11013
11013
|
children: [/* @__PURE__ */ L("p", {
|
|
11014
11014
|
className: "text-[13px] font-bold text-foreground tracking-tight truncate",
|
|
11015
11015
|
children: S ? S.label : "Pick a day"
|
|
11016
|
-
}),
|
|
11016
|
+
}), T > 0 && /* @__PURE__ */ R("span", {
|
|
11017
11017
|
className: "text-[11.5px] font-semibold text-foreground/40 shrink-0 tabular-nums",
|
|
11018
11018
|
children: [
|
|
11019
|
-
|
|
11019
|
+
T,
|
|
11020
11020
|
" ",
|
|
11021
|
-
|
|
11021
|
+
T === 1 ? "time" : "times"
|
|
11022
11022
|
]
|
|
11023
11023
|
})]
|
|
11024
11024
|
}), /* @__PURE__ */ R("div", {
|
|
@@ -11798,7 +11798,7 @@ var zw = new Set([
|
|
|
11798
11798
|
let r = {};
|
|
11799
11799
|
for (let [e, i] of Object.entries(n || {})) zw.has(e) || e in t || (r[e] = i);
|
|
11800
11800
|
return r;
|
|
11801
|
-
}, Vw = Lt(() => import("./PhoneInputField-
|
|
11801
|
+
}, Vw = Lt(() => import("./PhoneInputField-BWTHQRZK.js")), Hw = Lt(() => import("./AddressField-CFTvOrZh.js")), Uw = /^[^\s@,;]+@[^\s@,;.]+(\.[^\s@,;.]+)*\.[a-z]{2,}$/i;
|
|
11802
11802
|
function Ww({ field: e, value: t, error: n, timeZone: r, onTimeZone: i, onChange: a }) {
|
|
11803
11803
|
let { schedules: o } = ew(), s = cS(e), c = o.filter((e) => s.includes(e.id) && Mx(e)), l = new Set(c.map((e) => e.memberId)).size > 1, u = sS(e), d = u === "choose" && l, [f, p] = I(!1), m = l && (u === "all" || d && f), h = m ? rx(c) : [], [g] = I(() => /* @__PURE__ */ new Date()), _ = uw(c.map((e) => e.memberId), g), v = wx(t), y = e.look === "calendar" ? EC : hC;
|
|
11804
11804
|
return /* @__PURE__ */ R("div", {
|
|
@@ -11873,7 +11873,7 @@ function Jw(e, t) {
|
|
|
11873
11873
|
}
|
|
11874
11874
|
var Yw = (e, t) => Object.fromEntries(e.filter((e) => e.type !== "schedule" && e.name && t[e.name] !== void 0 && t[e.name] !== "").map((e) => [e.name, String(t[e.name])])), Xw = (e, t) => Object.fromEntries(Object.entries(Bw(e, t)).filter(([, e]) => e != null && e !== "").map(([e, t]) => [e, typeof t == "object" ? JSON.stringify(t) : String(t)]));
|
|
11875
11875
|
function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubmitted: a, extra: o }) {
|
|
11876
|
-
let [s, l] = I({}), [u, d] = I("idle"), [f, p] = I(""), [m,
|
|
11876
|
+
let [s, l] = I({}), [u, d] = I("idle"), [f, p] = I(""), [m, g] = I({}), [_, v] = I(() => Mb()), [y, S] = I(""), C = F(null), [w, T] = I(n || null), [ee, te] = I(!n), ae = at(), E = mt(), { user: oe } = xo(), se = Jw(w?.fields || [], oe), ce = String(oe?.displayName || "").trim(), O = String(oe?.email || "").trim(), le = (e) => {
|
|
11877
11877
|
let t = (typeof window < "u" ? window.__FBOS_FORMS__ : null) || {};
|
|
11878
11878
|
return E?.defaultConfigs?.[e] || E?.defaultConfigs?.[`${e}Form`] || t[e] || (e === "contact" ? ct : e === "support" ? ut : null);
|
|
11879
11879
|
};
|
|
@@ -11956,12 +11956,12 @@ function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubm
|
|
|
11956
11956
|
if (f.filter((e) => e.required && !wx(s[e.name])).forEach((e) => {
|
|
11957
11957
|
c[e.name] = "Pick a time before sending.";
|
|
11958
11958
|
}), Object.keys(c).length > 0) {
|
|
11959
|
-
|
|
11959
|
+
g(c);
|
|
11960
11960
|
return;
|
|
11961
11961
|
}
|
|
11962
|
-
|
|
11962
|
+
g({}), d("loading"), p("");
|
|
11963
11963
|
try {
|
|
11964
|
-
let r = h_(w), i = t || w?.systemName || w?.title || "unknown", c = [], m = [],
|
|
11964
|
+
let r = h_(w), i = t || w?.systemName || w?.title || "unknown", c = [], m = [], h = async () => {
|
|
11965
11965
|
for (let e of m) await vw(e);
|
|
11966
11966
|
};
|
|
11967
11967
|
for (let e of f) {
|
|
@@ -11980,7 +11980,7 @@ function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubm
|
|
|
11980
11980
|
});
|
|
11981
11981
|
}
|
|
11982
11982
|
if (a) {
|
|
11983
|
-
await
|
|
11983
|
+
await h(), g({ [e.name]: a }), d("idle");
|
|
11984
11984
|
return;
|
|
11985
11985
|
}
|
|
11986
11986
|
c.push({
|
|
@@ -12001,10 +12001,10 @@ function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubm
|
|
|
12001
12001
|
submitterName: B.currentUser.displayName || "",
|
|
12002
12002
|
submitterEmail: B.currentUser.email || "",
|
|
12003
12003
|
submitterAvatar: B.currentUser.photoURL || ""
|
|
12004
|
-
} : { uid: "guest" },
|
|
12005
|
-
if (
|
|
12004
|
+
} : { uid: "guest" }, b = c.length > 0, x;
|
|
12005
|
+
if (b) x = z(Re(V, r));
|
|
12006
12006
|
else try {
|
|
12007
|
-
|
|
12007
|
+
x = await Le(Re(V, r), {
|
|
12008
12008
|
...Bw(o, v),
|
|
12009
12009
|
...v,
|
|
12010
12010
|
...y,
|
|
@@ -12013,7 +12013,7 @@ function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubm
|
|
|
12013
12013
|
...w?.transaction === !0 ? { transaction: !0 } : {}
|
|
12014
12014
|
});
|
|
12015
12015
|
} catch (e) {
|
|
12016
|
-
throw await
|
|
12016
|
+
throw await h(), e;
|
|
12017
12017
|
}
|
|
12018
12018
|
let C = w?.fields || [], T = "";
|
|
12019
12019
|
for (let e of c) for (let t of e.each) {
|
|
@@ -12029,26 +12029,26 @@ function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubm
|
|
|
12029
12029
|
...Yw(C, v)
|
|
12030
12030
|
},
|
|
12031
12031
|
formId: i,
|
|
12032
|
-
entryId:
|
|
12032
|
+
entryId: x.id
|
|
12033
12033
|
});
|
|
12034
12034
|
if (e) {
|
|
12035
|
-
await
|
|
12035
|
+
await h(), d("error"), p(e);
|
|
12036
12036
|
return;
|
|
12037
12037
|
}
|
|
12038
12038
|
T ||= qb(t.slot.memberId, t.slot.start);
|
|
12039
12039
|
}
|
|
12040
|
-
c.length &&
|
|
12040
|
+
c.length && S(c.map((e) => Sx(e.slot, e.whoName, _)).join("; ")), d("success");
|
|
12041
12041
|
try {
|
|
12042
|
-
a?.(Object.fromEntries(Object.entries(v).map(([e, t]) => [e, String(t ?? "")])),
|
|
12042
|
+
a?.(Object.fromEntries(Object.entries(v).map(([e, t]) => [e, String(t ?? "")])), b ? {
|
|
12043
12043
|
collection: pb,
|
|
12044
12044
|
id: T
|
|
12045
12045
|
} : {
|
|
12046
12046
|
collection: r,
|
|
12047
|
-
id:
|
|
12047
|
+
id: x.id
|
|
12048
12048
|
});
|
|
12049
12049
|
} catch {}
|
|
12050
12050
|
setTimeout(() => {
|
|
12051
|
-
w?.redirectTo && !n && (w.redirectTo.startsWith("/") ? ae(w.redirectTo) : window.location.href = w.redirectTo), e?.(), d("idle"), l({}),
|
|
12051
|
+
w?.redirectTo && !n && (w.redirectTo.startsWith("/") ? ae(w.redirectTo) : window.location.href = w.redirectTo), e?.(), d("idle"), l({}), S("");
|
|
12052
12052
|
}, 3e3);
|
|
12053
12053
|
} catch (e) {
|
|
12054
12054
|
console.error("Submission error:", e), d("error"), p("We could not send your message right now. Please try again.");
|
|
@@ -12065,7 +12065,7 @@ function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubm
|
|
|
12065
12065
|
className: "w-full flex items-center justify-center py-[10vh]",
|
|
12066
12066
|
children: /* @__PURE__ */ R("div", {
|
|
12067
12067
|
className: "p-4 rounded-2xl glass-panel border border-[var(--panel-border)]/40 bg-background/80 shadow-md flex items-center gap-3",
|
|
12068
|
-
children: [/* @__PURE__ */ L(
|
|
12068
|
+
children: [/* @__PURE__ */ L(x, { className: "w-4 h-4 animate-spin text-accent" }), /* @__PURE__ */ L("span", {
|
|
12069
12069
|
className: "text-[12px] font-medium text-foreground/60 tracking-wide",
|
|
12070
12070
|
children: "Loading form..."
|
|
12071
12071
|
})]
|
|
@@ -12074,7 +12074,7 @@ function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubm
|
|
|
12074
12074
|
className: "fixed inset-0 z-[100] flex items-center justify-center bg-background/10 backdrop-blur-sm",
|
|
12075
12075
|
children: /* @__PURE__ */ R("div", {
|
|
12076
12076
|
className: "p-4 rounded-2xl glass-panel border border-[var(--panel-border)]/40 bg-background/80 shadow-xl flex items-center gap-3",
|
|
12077
|
-
children: [/* @__PURE__ */ L(
|
|
12077
|
+
children: [/* @__PURE__ */ L(x, { className: "w-4 h-4 animate-spin text-accent" }), /* @__PURE__ */ L("span", {
|
|
12078
12078
|
className: "text-[12px] font-medium text-foreground/60 tracking-wide",
|
|
12079
12079
|
children: "Loading form..."
|
|
12080
12080
|
})]
|
|
@@ -12121,7 +12121,7 @@ function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubm
|
|
|
12121
12121
|
},
|
|
12122
12122
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
12123
12123
|
children: [
|
|
12124
|
-
/* @__PURE__ */ L(
|
|
12124
|
+
/* @__PURE__ */ L(x, { className: "w-10 h-10 animate-spin text-accent mb-4" }),
|
|
12125
12125
|
/* @__PURE__ */ L("h4", {
|
|
12126
12126
|
className: "text-lg font-bold text-foreground tracking-tight",
|
|
12127
12127
|
children: "Processing"
|
|
@@ -12152,7 +12152,7 @@ function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubm
|
|
|
12152
12152
|
y: 0
|
|
12153
12153
|
},
|
|
12154
12154
|
className: "mb-4 p-3 sm:p-4 rounded-xl bg-red-500/10 border border-red-500/20 flex items-start gap-3",
|
|
12155
|
-
children: [/* @__PURE__ */ L(
|
|
12155
|
+
children: [/* @__PURE__ */ L(h, { className: "w-5 h-5 text-red-500 shrink-0 mt-0.5" }), /* @__PURE__ */ L("p", {
|
|
12156
12156
|
className: "text-[14px] font-medium text-red-500/90",
|
|
12157
12157
|
children: f
|
|
12158
12158
|
})]
|
|
@@ -12205,7 +12205,7 @@ function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubm
|
|
|
12205
12205
|
l((n) => ({
|
|
12206
12206
|
...n,
|
|
12207
12207
|
[e.name]: t
|
|
12208
|
-
})), m[e.name] &&
|
|
12208
|
+
})), m[e.name] && g((t) => {
|
|
12209
12209
|
let n = { ...t };
|
|
12210
12210
|
return delete n[e.name], n;
|
|
12211
12211
|
});
|
|
@@ -12235,7 +12235,7 @@ function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubm
|
|
|
12235
12235
|
l((n) => ({
|
|
12236
12236
|
...n,
|
|
12237
12237
|
...ie(e.name, t)
|
|
12238
|
-
})), m[e.name] &&
|
|
12238
|
+
})), m[e.name] && g((t) => {
|
|
12239
12239
|
let n = { ...t };
|
|
12240
12240
|
return delete n[e.name], n;
|
|
12241
12241
|
});
|
|
@@ -12250,7 +12250,7 @@ function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubm
|
|
|
12250
12250
|
l((n) => ({
|
|
12251
12251
|
...n,
|
|
12252
12252
|
[e.name]: t(n[e.name] || "")
|
|
12253
|
-
})), m[e.name] &&
|
|
12253
|
+
})), m[e.name] && g((t) => {
|
|
12254
12254
|
let n = { ...t };
|
|
12255
12255
|
return delete n[e.name], n;
|
|
12256
12256
|
});
|
|
@@ -12333,7 +12333,7 @@ function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubm
|
|
|
12333
12333
|
})),
|
|
12334
12334
|
className: `date-field block h-12 w-full text-[15px] pl-4 pr-11 py-2 transition-all duration-300 focus:outline-none focus:border-accent glow-focus disabled:cursor-not-allowed disabled:opacity-50 glass-panel ${n ? "text-foreground" : "text-foreground/40"}`,
|
|
12335
12335
|
style: { borderRadius: "var(--input-radius, 0.75rem)" }
|
|
12336
|
-
}), /* @__PURE__ */ L(
|
|
12336
|
+
}), /* @__PURE__ */ L(b, { className: "w-4 h-4 text-foreground/50 absolute right-4 pointer-events-none" })]
|
|
12337
12337
|
})]
|
|
12338
12338
|
}, t);
|
|
12339
12339
|
}
|
|
@@ -12394,7 +12394,7 @@ function Zw({ onClose: e, formId: t, formConfig: n, isInline: r, bare: i, onSubm
|
|
|
12394
12394
|
l((n) => ({
|
|
12395
12395
|
...n,
|
|
12396
12396
|
[e.name]: t.target.value
|
|
12397
|
-
})), m[e.name] &&
|
|
12397
|
+
})), m[e.name] && g((t) => {
|
|
12398
12398
|
let n = { ...t };
|
|
12399
12399
|
return delete n[e.name], n;
|
|
12400
12400
|
});
|