(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13785,e=>{"use strict";var t=e.i(178236),n=e.i(902875),a=e.i(465280);e.i(247865),e.s(["NavWrapper",0,e=>{let i,r,o=(0,t.c)(11),{baseClass:l,children:s}=e,{hydrated:u,navOpen:c,navRef:d,shouldAnimate:m}=(0,a.useNav)(),h=c&&`${l}--nav-open`,f=m&&`${l}--nav-animate`,p=u&&`${l}--nav-hydrated`;o[0]!==l||o[1]!==h||o[2]!==f||o[3]!==p?(i=[l,h,f,p].filter(Boolean),o[0]=l,o[1]=h,o[2]=f,o[3]=p,o[4]=i):i=o[4];let b=i.join(" "),g=!c||void 0,y=`${l}__scroll`;return o[5]!==s||o[6]!==d||o[7]!==b||o[8]!==g||o[9]!==y?(r=(0,n.jsx)("aside",{className:b,inert:g,children:(0,n.jsx)("div",{className:y,ref:d,children:s})}),o[5]=s,o[6]=d,o[7]=b,o[8]=g,o[9]=y,o[10]=r):r=o[10],r}])},29969,e=>{"use strict";var t=(0,e.i(703057).createCommand)("INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND");e.s(["a",0,t])},945290,e=>{"use strict";var t=e.i(178236),n=e.i(902875),a=e.i(973776),i=e.i(465280),r=e.i(703057),o=e.i(247865);e.s(["a",0,e=>{let l,s,u=(0,t.c)(21),[c]=(0,a.useLexicalComposerContext)(),[d,m]=(0,o.useState)(null),[h,f]=(0,o.useState)(!1),[p,b,g]=(0,i.useDocumentDrawer)(e),{closeDrawer:y,drawerSlug:v}=g,{modalState:S}=(0,i.useModal)(),w;u[0]!==c?(w=()=>{c.read(()=>{m((0,r.$getSelection)()??(0,r.$getPreviousSelection)())}),f(!0)},u[0]=c,u[1]=w):w=u[1];let k=w,x;u[2]!==c||u[3]!==d?(x=()=>{d&&c.update(()=>{(0,r.$setSelection)(d.clone())},{discrete:!0,skipTransforms:!0})},u[2]=c,u[3]=d,u[4]=x):x=u[4];let C=x,D;u[5]!==y?(D=()=>{y()},u[5]=y,u[6]=D):D=u[6];let F=D,P,_;return u[7]!==v||u[8]!==S||u[9]!==C||u[10]!==h?(P=()=>{if(!h)return;let e=S[v];e&&!e?.isOpen&&(f(!1),setTimeout(()=>{C()},1))},_=[S,v,C,h],u[7]=v,u[8]=S,u[9]=C,u[10]=h,u[11]=P,u[12]=_):(P=u[11],_=u[12]),(0,o.useEffect)(P,_),u[13]!==b||u[14]!==k?(l=e=>(0,n.jsx)(b,{...e,onClick:k}),u[13]=b,u[14]=k,u[15]=l):l=u[15],u[16]!==p||u[17]!==F||u[18]!==v||u[19]!==l?(s={closeDocumentDrawer:F,DocumentDrawer:p,documentDrawerSlug:v,DocumentDrawerToggler:l},u[16]=p,u[17]=F,u[18]=v,u[19]=l,u[20]=s):s=u[20],s}])},351007,e=>{"use strict";var t=e.i(364853),n=e.i(178236),a=e.i(902875),i=e.i(465280),r=e.i(247865),o=e.i(193703),l=e.i(103020),s=e.i(986605),u=e.i(531475),c=e.i(990033),d=e.i(703057),m=({data:e,featureKey:n,fieldMapOverride:d,handleDrawerSubmit:m,schemaFieldsPathOverride:h,schemaPath:f,schemaPathSuffix:p})=>{let{t:b}=(0,l.useTranslation)(),{id:g,collectionSlug:y,getDocPreferences:v,globalSlug:S}=(0,i.useDocumentInfo)(),{fields:w}=(0,i.useDocumentForm)(),k=(0,o.useLexicalEditable)(),x=(0,r.useRef)(new AbortController),[C,D]=(0,r.useState)(!1),{fieldProps:{featureClientSchemaMap:F}}=(0,t.b)(),{getFormState:P}=(0,i.useServerFunctions)(),_=h??`${f}.lexical_internal_feature.${n}${p?`.${p}`:""}`,O=d??F[n]?.[_],M=(0,i.useEffectEvent)(async t=>{let{state:n}=await P({id:g,collectionSlug:y,data:e??{},docPermissions:{fields:!0},docPreferences:await v(),documentFormState:(0,u.deepCopyObjectSimpleWithoutReactComponents)(w,{excludeFiles:!0}),globalSlug:S,initialBlockData:e,operation:"update",readOnly:!k,renderAllFields:!0,schemaPath:_,signal:t.signal});D(n)});(0,r.useEffect)(()=>{let e=new AbortController;return M(e),()=>{(0,s.abortAndIgnore)(e)}},[_,g,e,P,y,k,S,v]);let j=(0,r.useCallback)(async({formState:e})=>{(0,s.abortAndIgnore)(x.current);let t=new AbortController;x.current=t;let{state:n}=await P({id:g,collectionSlug:y,docPermissions:{fields:!0},docPreferences:await v(),documentFormState:(0,u.deepCopyObjectSimpleWithoutReactComponents)(w,{excludeFiles:!0}),formState:e,globalSlug:S,initialBlockFormState:e,operation:"update",readOnly:!k,schemaPath:_,signal:t.signal});return n||e},[P,g,k,y,v,w,S,_]);return(0,r.useEffect)(()=>()=>{(0,s.abortAndIgnore)(x.current)},[]),!1===C?null:(0,a.jsxs)(i.Form,{beforeSubmit:[j],disableValidationOnSubmit:!0,fields:Array.isArray(O)?O:[],initialState:C,onChange:[j],onSubmit:m,uuid:(0,c.v4)(),children:[(0,a.jsx)(i.RenderFields,{fields:Array.isArray(O)?O:[],forceRender:!0,parentIndexPath:"",parentPath:"",parentSchemaPath:_,permissions:!0,readOnly:!k}),(0,a.jsx)(i.FormSubmit,{children:b("fields:saveChanges")})]})},h=(0,d.createCommand)("INSERT_UPLOAD_WITH_DRAWER_COMMAND");e.s(["a",0,e=>{let t,r=(0,n.c)(15),{className:o,data:l,drawerSlug:s,drawerTitle:u,featureKey:c,fieldMapOverride:d,handleDrawerSubmit:h,schemaFieldsPathOverride:f,schemaPath:p,schemaPathSuffix:b}=e,{closeModal:g}=(0,i.useModal)(),y=u??"",v;return r[0]!==g||r[1]!==s||r[2]!==h?(v=(e,t)=>{g(s),setTimeout(()=>{h(e,t)},1)},r[0]=g,r[1]=s,r[2]=h,r[3]=v):v=r[3],r[4]!==o||r[5]!==l||r[6]!==s||r[7]!==c||r[8]!==d||r[9]!==f||r[10]!==p||r[11]!==b||r[12]!==y||r[13]!==v?(t=(0,a.jsx)(i.EditDepthProvider,{children:(0,a.jsx)(i.Drawer,{className:o,slug:s,title:y,children:(0,a.jsx)(m,{data:l,featureKey:c,fieldMapOverride:d,handleDrawerSubmit:v,schemaFieldsPathOverride:f,schemaPath:p,schemaPathSuffix:b})})}),r[4]=o,r[5]=l,r[6]=s,r[7]=c,r[8]=d,r[9]=f,r[10]=p,r[11]=b,r[12]=y,r[13]=v,r[14]=t):t=r[14],t},"b",0,h])},833935,e=>{"use strict";var t=e.i(178236),n=e.i(973776),a=e.i(465280),i=e.i(703057),r=e.i(247865);e.s(["a",0,(e,o)=>{let l,s=(0,t.c)(24),[u]=(0,n.useLexicalComposerContext)(),[c,d]=(0,r.useState)(null),[m,h]=(0,r.useState)(!1),{closeModal:f,modalState:p,toggleModal:b}=(0,a.useModal)(),g;s[0]!==u?(g=()=>{u.read(()=>{d((0,i.$getSelection)()??(0,i.$getPreviousSelection)())})},s[0]=u,s[1]=g):g=s[1];let y=g,v;s[2]!==u||s[3]!==c?(v=()=>{c&&u.update(()=>{(0,i.$setSelection)(c.clone())},{discrete:!0,skipTransforms:!0})},s[2]=u,s[3]=c,s[4]=v):v=s[4];let S=v,w;s[5]!==f||s[6]!==e?(w=()=>{f(e)},s[5]=f,s[6]=e,s[7]=w):w=s[7];let k=w,x=p?.[e]?.isOpen,C;s[8]!==x||s[9]!==S||s[10]!==e||s[11]!==y||s[12]!==b?(C=()=>{x?S():y(),h(!0),b(e)},s[8]=x,s[9]=S,s[10]=e,s[11]=y,s[12]=b,s[13]=C):C=s[13];let D=C,F,P;return s[14]!==p||s[15]!==o||s[16]!==S||s[17]!==e||s[18]!==m?(F=()=>{if(!m)return;let t=p[e];t&&!t?.isOpen&&(h(!1),o?setTimeout(()=>{S()},0):S())},P=[p,e,S,m,o],s[14]=p,s[15]=o,s[16]=S,s[17]=e,s[18]=m,s[19]=F,s[20]=P):(F=s[19],P=s[20]),(0,r.useEffect)(F,P),s[21]!==k||s[22]!==D?(l={closeDrawer:k,toggleDrawer:D},s[21]=k,s[22]=D,s[23]=l):l=s[23],l}])},668659,e=>{"use strict";var t=e.i(833935),n=e.i(364853),a=e.i(902875),i=e.i(973776),r=e.i(193703),o=e.i(929127),l=e.i(465280),s=e.i(402884),u=e.i(117857),c=e.i(103020),d=e.i(986605),m=e.i(703057),h=e.i(531475),f=e.i(789404),p=e.i(247865),b=e.i(990033),g=e.i(756961),y=class extends m.DecoratorNode{__cacheBuster;__fields;constructor({cacheBuster:e,fields:t,key:n}){super(n),this.__fields=t,this.__cacheBuster=e||0}static clone(e){return new this({cacheBuster:e.__cacheBuster,fields:e.__fields,key:e.__key})}static getType(){return"inlineBlock"}static importDOM(){return{}}static importJSON(e){var t;return t=e.fields,(0,m.$applyNodeReplacement)(new y({fields:{...t,id:t?.id||new g.default.default().toHexString()}}))}static isInline(){return!1}canIndent(){return!0}createDOM(e){let t=document.createElement("span");return(0,m.addClassNamesToElement)(t,e?.theme?.inlineBlock),t}decorate(e,t){return null}exportDOM(){let e=document.createElement("span");e.classList.add("inline-block-container");let t=document.createTextNode(this.getTextContent());return e.append(t),{element:e}}exportJSON(){return{type:"inlineBlock",fields:this.getFields(),version:1}}getCacheBuster(){return this.getLatest().__cacheBuster}getFields(){return this.getLatest().__fields}getTextContent(){return"Block Field"}isInline(){return!0}setFields(e,t){let n=this.getWritable();n.__fields=e,t||n.__cacheBuster++}updateDOM(){return!1}},v=p.default.lazy(()=>e.A(778398).then(e=>({default:e.InlineBlockComponent}))),S=class extends y{static clone(e){return super.clone(e)}static getType(){return super.getType()}static importJSON(e){return w(e.fields)}decorate(...[e,t,n,i]){return(0,a.jsx)(v,{cacheBuster:this.getCacheBuster(),className:t.theme.inlineBlock??"LexicalEditorTheme__inlineBlock",CustomBlock:n,CustomLabel:i,formData:this.getFields(),nodeKey:this.getKey()})}exportJSON(){return super.exportJSON()}};function w(e){return(0,m.$applyNodeReplacement)(new S({fields:{...e,id:e?.id||new g.default.default().toHexString()}}))}function k(e){return e instanceof S}var x=(0,p.createContext)({initialState:!1}),C=()=>p.default.use(x);e.s(["a",0,C,"b",0,e=>{let{cacheBuster:g,className:y,CustomBlock:v,CustomLabel:S,formData:w,nodeKey:D}=e,[F]=(0,i.useLexicalComposerContext)(),P=(0,r.useLexicalEditable)(),{i18n:_,t:O}=(0,c.useTranslation)(),{createdInlineBlock:M,fieldProps:{featureClientSchemaMap:j,initialLexicalFormState:E,schemaPath:A},setCreatedInlineBlock:B,uuid:T}=(0,n.b)(),{fields:N}=(0,l.useDocumentForm)(),{getFormState:L}=(0,l.useServerFunctions)(),R=(0,l.useEditDepth)(),I=(0,p.useRef)(!1),[W,$]=p.default.useState(()=>{let e=E?.[w.id]?.formState;return!!e&&Object.fromEntries(Object.entries(e).map(([e,t])=>[e,e in w?{...t,initialValue:w[e],value:w[e]}:t]))}),z=(0,p.useRef)(!1),U=(0,p.useRef)(g);(0,p.useEffect)(()=>{z.current?(U.current!==g&&$(!1),U.current=g):z.current=!0},[g]);let[V]=p.default.useState(()=>(0,b.v4)()),[q,H]=p.default.useState(()=>{if(!S)return W?._components?.customComponents?.BlockLabel??void 0}),[J,K]=p.default.useState(()=>{if(!v)return W?._components?.customComponents?.Block??void 0}),G=(0,p.useMemo)(()=>v?(0,a.jsx)(v,{className:y,formData:w,isEditor:!0,isJSXConverter:!1,nodeKey:D,useInlineBlockComponentContext:C}):J,[v,y,w,D,J]),X=(0,p.useMemo)(()=>S?(0,a.jsx)(S,{className:y,formData:w,isEditor:!0,isJSXConverter:!1,nodeKey:D,useInlineBlockComponentContext:C}):q,[S,y,w,D,q]),Q=(0,l.formatDrawerSlug)({slug:`lexical-inlineBlocks-create-${T}-${w.id}`,depth:R}),{toggleDrawer:Y}=(0,t.a)(Q,!0),Z=(0,p.useRef)(null),{id:ee,collectionSlug:et,getDocPreferences:en,globalSlug:ea}=(0,l.useDocumentInfo)(),{config:ei}=(0,u.useConfig)(),er=`${A}.lexical_internal_feature.blocks.lexical_inline_blocks.${w.blockType}`,eo=j.blocks?.[er]?.[0],el=eo.blockReferences?"string"==typeof eo?.blockReferences?.[0]?ei.blocksMap[eo?.blockReferences?.[0]]:eo?.blockReferences?.[0]:eo?.blocks?.[0],es=el?.fields??[];(0,p.useEffect)(()=>{I.current||M?.getKey()!==D||(es.length>2&&Y(),B?.(void 0),I.current=!0)},[es.length,M,D,B,Y]);let eu=(0,p.useCallback)(()=>{F.update(()=>{(0,m.$getNodeByKey)(D)?.remove()})},[F,D]),ec=el?.labels?.singular?(0,o.getTranslation)(el?.labels.singular,_):el?.slug,ed=(0,p.useRef)(new AbortController),em=`${A}.lexical_internal_feature.blocks.lexical_inline_blocks.${el?.slug}.fields`;(0,p.useEffect)(()=>{let e=new AbortController;return w&&!W&&(async()=>{let{state:t}=await L({id:ee,collectionSlug:et,data:w,docPermissions:{fields:!0},docPreferences:await en(),documentFormState:(0,h.deepCopyObjectSimpleWithoutReactComponents)(N,{excludeFiles:!0}),globalSlug:ea,initialBlockData:w,initialBlockFormState:w,operation:"update",readOnly:!P,renderAllFields:!0,schemaPath:em,signal:e.signal});if(t){let e=(0,f.reduceFieldsToValues)((0,h.deepCopyObjectSimpleWithoutReactComponents)(t,{excludeFiles:!0}),!0);F.update(()=>{let t=(0,m.$getNodeByKey)(D);t&&k(t)&&(e.blockType=w.blockType,t.setFields(e,!0))},{tag:m.SKIP_DOM_SELECTION_TAG}),$(t),S||H(t._components?.customComponents?.BlockLabel),v||K(t._components?.customComponents?.Block)}})(),()=>{(0,d.abortAndIgnore)(e)}},[L,F,D,P,S,v,em,ee,w,W,et,ea,en,N]);let eh=(0,p.useCallback)(async({formState:e,submit:t})=>{(0,d.abortAndIgnore)(ed.current);let n=new AbortController;ed.current=n;let{state:a}=await L({id:ee,collectionSlug:et,docPermissions:{fields:!0},docPreferences:await en(),documentFormState:(0,h.deepCopyObjectSimpleWithoutReactComponents)(N,{excludeFiles:!0}),formState:e,globalSlug:ea,initialBlockFormState:e,operation:"update",readOnly:!P,renderAllFields:!!t,schemaPath:em,signal:n.signal});return a?(t&&(S||H(a._components?.customComponents?.BlockLabel),v||K(a._components?.customComponents?.Block)),a):e},[L,ee,et,en,N,ea,P,em,v,S]);(0,p.useEffect)(()=>()=>{W&&Object.keys(W).some(e=>W[e]&&w[e]!==W[e].value)&&$(!1),(0,d.abortAndIgnore)(ed.current)},[w,W]);let ef=(0,p.useCallback)((e,t)=>{t.blockType=w.blockType,F.update(()=>{let e=(0,m.$getNodeByKey)(D);e&&k(e)&&e.setFields(t,!0)},{tag:m.SKIP_DOM_SELECTION_TAG})},[F,D,w]),ep=(0,p.useMemo)(()=>()=>(0,a.jsx)(l.Button,{buttonStyle:"icon-label",className:`${y}__removeButton`,disabled:!P,icon:"x",onClick:e=>{e.preventDefault(),eu()},round:!0,size:"small",tooltip:O("lexical:blocks:inlineBlocks:remove",{label:ec})}),[y,ec,P,eu,O]),eb=(0,p.useMemo)(()=>()=>(0,a.jsx)(l.Button,{buttonStyle:"icon-label",className:`${y}__editButton`,disabled:!P,el:"button",icon:"edit",onClick:()=>{Y()},round:!0,size:"small",tooltip:O("lexical:blocks:inlineBlocks:edit",{label:ec})}),[y,ec,P,O,Y]),eg=(0,p.useMemo)(()=>({children:e,className:t})=>(0,a.jsx)("div",{className:[`${y}__container`,y+"-"+w.blockType,t].filter(Boolean).join(" "),ref:Z,children:e}),[y,w.blockType]),ey=(0,p.useMemo)(()=>X?()=>X:()=>(0,a.jsx)("div",{children:el?.labels?(0,o.getTranslation)(el?.labels.singular,_):""}),[X,el?.labels,_]);return el?(0,a.jsxs)(l.Form,{beforeSubmit:[async({formState:e})=>await eh({formState:e,submit:!0})],disableValidationOnSubmit:!0,el:"div",fields:el?.fields,initialState:W||{},onChange:[eh],onSubmit:(e,t)=>{ef(e,t),Y()},uuid:V,children:[(0,a.jsx)(l.EditDepthProvider,{children:(0,a.jsx)(l.Drawer,{className:"",slug:Q,title:O(`lexical:blocks:inlineBlocks:${w?.id?"edit":"create"}`,{label:ec??O("lexical:blocks:inlineBlocks:label")}),children:W?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.RenderFields,{fields:el?.fields,forceRender:!0,parentIndexPath:"",parentPath:"",parentSchemaPath:em,permissions:!0,readOnly:!P}),(0,a.jsx)(l.FormSubmit,{programmaticSubmit:!0,children:O("fields:saveChanges")})]}):null})}),G?(0,a.jsx)(x,{value:{EditButton:eb,initialState:W,InlineBlockContainer:eg,Label:ey,nodeKey:D,RemoveButton:ep},children:G}):(0,a.jsxs)(eg,{children:[W?(0,a.jsx)(ey,{}):(0,a.jsx)(s.ShimmerEffect,{height:"15px",width:"40px"}),P?(0,a.jsxs)("div",{className:`${y}__actions`,children:[(0,a.jsx)(eb,{}),(0,a.jsx)(ep,{})]}):null]})]}):(0,a.jsxs)(eg,{className:`${y}-not-found`,children:[(0,a.jsxs)("span",{children:["Error: Block '",w.blockType,"' not found"]}),P?(0,a.jsx)("div",{className:`${y}__actions`,children:(0,a.jsx)(ep,{})}):null]})},"c",0,S,"d",0,w,"e",0,k])},117857,e=>{"use strict";var t=e.i(969515);e.s(["useConfig",()=>t.c])},402884,e=>{"use strict";var t=e.i(969515);e.s(["ShimmerEffect",()=>t.f])},481495,e=>{"use strict";var t=e.i(969515);e.s(["useTheme",()=>t.j])},294237,e=>{"use strict";var t=e.i(7284);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=t.clsx;e.s(["cva",0,(e,t)=>i=>{var r;if((null==t?void 0:t.variants)==null)return a(e,null==i?void 0:i.class,null==i?void 0:i.className);let{variants:o,defaultVariants:l}=t,s=Object.keys(o).map(e=>{let t=null==i?void 0:i[e],a=null==l?void 0:l[e];if(null===t)return null;let r=n(t)||n(a);return o[e][r]}),u=i&&Object.entries(i).reduce((e,t)=>{let[n,a]=t;return void 0===a||(e[n]=a),e},{});return a(e,s,null==t||null==(r=t.compoundVariants)?void 0:r.reduce((e,t)=>{let{class:n,className:a,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...l,...u}[t]):({...l,...u})[t]===n})?[...e,n,a]:e},[]),null==i?void 0:i.class,null==i?void 0:i.className)}])},492421,e=>{"use strict";let t={};e.s(["getDefaultOptions",0,function(){return t}])},539392,e=>{"use strict";var t=e.i(487122);e.s(["normalizeDates",0,function(e,...n){let a=t.constructFrom.bind(null,e||n.find(e=>"object"==typeof e));return n.map(a)}])},487122,511518,e=>{"use strict";let t=Symbol.for("constructDateFrom");e.s(["constructFromSymbol",0,t,"millisecondsInDay",0,864e5,"millisecondsInWeek",0,6048e5],511518),e.s(["constructFrom",0,function(e,n){return"function"==typeof e?e(n):e&&"object"==typeof e&&t in e?e[t](n):e instanceof Date?new e.constructor(n):new Date(n)}],487122)},716609,e=>{"use strict";e.s(["buildFormatLongFn",0,function(e){return (t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}])},649859,e=>{"use strict";e.s(["buildLocalizeFn",0,function(e){return(t,n)=>{let a;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):t;a=e.formattingValues[i]||e.formattingValues[t]}else{let t=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;a=e.values[i]||e.values[t]}return a[e.argumentCallback?e.argumentCallback(t):t]}}])},369796,e=>{"use strict";e.s(["buildMatchFn",0,function(e){return(t,n={})=>{let a,i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(r);if(!o)return null;let l=o[0],s=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?function(e,t){for(let n=0;ne.test(l)):function(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,e=>e.test(l));return a=e.valueCallback?e.valueCallback(u):u,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(l.length)}}}])},91081,e=>{"use strict";e.s(["buildMatchPatternFn",0,function(e){return(t,n={})=>{let a=t.match(e.matchPattern);if(!a)return null;let i=a[0],r=t.match(e.parsePattern);if(!r)return null;let o=e.valueCallback?e.valueCallback(r[0]):r[0];return{value:o=n.valueCallback?n.valueCallback(o):o,rest:t.slice(i.length)}}}])},244874,e=>{"use strict";let t={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};var n=e.i(716609);let a={date:(0,n.buildFormatLongFn)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,n.buildFormatLongFn)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,n.buildFormatLongFn)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},i={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};var r=e.i(649859);let o={ordinalNumber:(e,t)=>{let n=Number(e),a=n%100;if(a>20||ae-1}),month:(0,r.buildLocalizeFn)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,r.buildLocalizeFn)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,r.buildLocalizeFn)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};var l=e.i(369796);let s={ordinalNumber:(0,e.i(91081).buildMatchPatternFn)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:(0,l.buildMatchFn)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,l.buildMatchFn)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:(0,l.buildMatchFn)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,l.buildMatchFn)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,l.buildMatchFn)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};e.s(["enUS",0,{code:"en-US",formatDistance:(e,n,a)=>{let i,r=t[e];if(i="string"==typeof r?r:1===n?r.one:r.other.replace("{{count}}",n.toString()),a?.addSuffix)if(a.comparison&&a.comparison>0)return"in "+i;else return i+" ago";return i},formatLong:a,formatRelative:(e,t,n,a)=>i[e],localize:o,match:s,options:{weekStartsOn:0,firstWeekContainsDate:1}}],244874)},954259,e=>{"use strict";var t=e.i(492421),n=e.i(516467);e.s(["startOfWeek",0,function(e,a){let i=(0,t.getDefaultOptions)(),r=a?.weekStartsOn??a?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,o=(0,n.toDate)(e,a?.in),l=o.getDay();return o.setDate(o.getDate()-(7*(l{"use strict";var t=e.i(487122);e.s(["toDate",0,function(e,n){return(0,t.constructFrom)(n||e,e)}])},514514,e=>{"use strict";var t=e.i(247865);let n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},a=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let r=(0,t.forwardRef)(({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:l="",children:s,iconNode:u,...c},d)=>(0,t.createElement)("svg",{ref:d,...i,width:n,height:n,stroke:e,strokeWidth:o?24*Number(r)/Number(n):r,className:a("lucide",l),...!s&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(c)&&{"aria-hidden":"true"},...c},[...u.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(s)?s:[s]]));e.s(["default",0,(e,i)=>{let o=(0,t.forwardRef)(({className:o,...l},s)=>(0,t.createElement)(r,{ref:s,iconNode:i,className:a(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,o),...l}));return o.displayName=n(e),o}],514514)},232598,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a={callServer:function(){return r.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}};for(var i in a)Object.defineProperty(n,i,{enumerable:!0,get:a[i]});let r=e.r(276247),o=e.r(788443),l=e.r(955011)},107983,(e,t,n)=>{"use strict";var a=e.r(247865),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=a.useState,o=a.useEffect,l=a.useLayoutEffect,s=a.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var c="u"{"use strict";e.i(288906),t.exports=e.r(107983)},990033,e=>{"use strict";let t,n="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),a=new Uint8Array(16),i=[];for(let e=0;e= 16");if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,r){if((s=s||0)r.length)throw RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`);for(let e=0;e{"use strict";var t=e.i(902875),n=e.i(247865),a=e.i(294237),i=e.i(789876);let r=(0,a.cva)("inline-block",{variants:{size:{sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-16 h-16",xxl:"w-32 h-32"},color:{primary:"text-gray-900",brandDark:"text-brand-dark",brandLight:"text-brand-light",inverse:"text-white"}},defaultVariants:{size:"md",color:"primary"}}),o=n.default.forwardRef(({icon:e,size:n,color:a,title:o,desc:l,className:s,ariaHidden:u,...c},d)=>(0,t.jsx)(e,{ref:d,className:(0,i.cn)(r({size:n,color:a}),s),title:o,desc:l,...u&&{"aria-hidden":u},...c}));o.displayName="BaseIcon",e.s(["BaseIcon",0,o])},789876,e=>{"use strict";var t=e.i(7284);let n=(0,e.i(923191).extendTailwindMerge)({extend:{classGroups:{"font-size":[{text:["xxs"]}]},theme:{color:[{brand:["100","200","300","400","dark","light"]}]}}});e.s(["cn",0,function(...e){return n((0,t.clsx)(e))}])},365953,e=>{"use strict";e.s(["SCHEDULED_COLOR",0,"#9ca3af"])},466029,e=>{"use strict";function t(e,t){return t10};let{visible:r,hiddenCount:o}=t(e.fields,10);return{visible:r,hiddenCount:o,hasToggleRow:o>0}}let a="Other collections",i="Globals";e.s(["ACCESS_OPS",0,["create","read","update","delete","admin","unlock","readVersions"],"FIELD_LIST_PADDING",0,14,"FIELD_ROW_HEIGHT",0,19,"LEGEND_GROUPS",0,[{title:"Reference kind",items:[{swatch:"relationship",label:"Relationship",description:"A relationship field pointing at another entity"},{swatch:"upload",label:"Upload",description:"An upload field pointing at a media collection"},{swatch:"join",label:"Join",description:"A join field — the reverse side of a relationship declared elsewhere"},{swatch:"self",label:"Self-reference",description:"The entity references itself, so the line loops back to its own box"}]},{title:"Line style",items:[{swatch:"required",label:"Required",description:"Solid — the field is required"},{swatch:"optional",label:"Optional",description:"Dashed — the field is optional"},{swatch:"polymorphic",label:"Polymorphic",description:"Thicker — one field targeting more than one entity"}]},{title:"Box state",items:[{swatch:"focused",label:"Focused",description:"The entity the graph is focused on"},{swatch:"context",label:"Context only",description:"At the edge of the depth filter — shown for context, but its own relationships were not walked"}]}],"MAX_VISIBLE_NODE_BADGES",0,3,"NODE_HEADER_HEIGHT",0,58,"NODE_WIDTH",0,268,"SELF_LOOP_DROP",0,26,"SELF_LOOP_REACH",0,34,"buildEntityOptions",0,function(e,t){let n=t.trim().toLowerCase(),r=e.filter(e=>!n||e.slug.toLowerCase().includes(n)||e.label.toLowerCase().includes(n)||(e.typeName?.toLowerCase().includes(n)??!1)).map(e=>({slug:e.slug,label:e.label,group:"global"===e.kind?i:e.group??a})),o=new Map;for(let e of r){let t=o.get(e.group);t?t.push(e):o.set(e.group,[e])}let l=e=>e===i?2:+(e===a);return[...o.entries()].sort(([e],[t])=>l(e)-l(t)||e.localeCompare(t)).map(([e,t])=>({group:e,options:[...t].sort((e,t)=>e.label.localeCompare(t.label))}))},"capFieldRows",0,t,"deriveFieldMarkers",0,function(e){let t=[];return e.required&&t.push({key:"required",glyph:"*",label:"required"}),e.unique&&t.push({key:"unique",glyph:"U",label:"unique"}),e.localized&&t.push({key:"localized",glyph:"L",label:"localized"}),e.hasIndex&&t.push({key:"indexed",glyph:"I",label:"indexed"}),t},"deriveNodeBadges",0,function(e){let t=[];return e.internal&&t.push({key:"internal",label:"Internal",title:"Payload's own infrastructure, not part of this project's content model",tone:"neutral"}),"global"===e.kind&&t.push({key:"global",label:"Global",title:"A global — a single document rather than a collection",tone:"info"}),e.auth&&t.push({key:"auth",label:"Auth",title:"Auth-enabled: documents in this collection can log in",tone:"warn"}),e.upload&&t.push({key:"upload",label:"Upload",title:"Upload-enabled: documents carry a file",tone:"info"}),e.versions?.enabled&&t.push({key:"versioned",label:"Versioned",title:"number"==typeof e.versions.maxPerDoc?`Versioned, keeping up to ${e.versions.maxPerDoc} versions per document`:"Versioned",tone:"success"}),e.versions?.drafts&&t.push({key:"drafts",label:"Drafts",title:"Drafts enabled: documents have a published/draft lifecycle",tone:"success"}),e.versions?.autosave&&t.push({key:"autosave",label:"Autosave",title:"number"==typeof e.versions.autosaveInterval?`Autosaves every ${e.versions.autosaveInterval}ms`:"Autosave enabled",tone:"neutral"}),e.versions?.schedulePublish&&t.push({key:"schedule-publish",label:"Scheduled",title:"Scheduled publishing is enabled",tone:"neutral"}),e.rules.localizedFieldCount>0&&t.push({key:"localized",label:"Localized",title:`${e.rules.localizedFieldCount} localized field(s)`,tone:"info"}),t},"describeGraphScope",0,function(e){let t=e.includeGlobals?e.totalCollections+e.totalGlobals:e.totalCollections,n=`${e.includedNodeCount} of ${t} entities, ${e.includedEdgeCount} relationships`,a=[];return e.includeGlobals||a.push("globals excluded"),e.includeInternal||a.push("Payload internals excluded"),e.truncated&&a.push("the depth filter dropped entities that exist in the config"),a.length>0?`${n} — ${a.join("; ")}`:n},"describeVersions",0,function(e){if(!e||!e.enabled)return"Not versioned.";let t=["Versioned"];return"number"==typeof e.maxPerDoc&&t.push(`keeping up to ${e.maxPerDoc} version${1===e.maxPerDoc?"":"s"} per document`),t.push(e.drafts?"with drafts, so documents have a published/draft lifecycle":"without drafts, so every save publishes"),e.autosave&&t.push("number"==typeof e.autosaveInterval?`autosaving every ${e.autosaveInterval}ms`:"autosaving"),e.schedulePublish&&t.push("with scheduled publishing"),`${t.join(", ")}.`},"fieldListState",0,function(e,t){return e.fields.length>0?"listed":t?"empty":"not-requested"},"groupConditionals",0,function(e){let t=new Map;for(let n of e){let e=[...n.dependsOn].sort(),a=e.join(" + "),i=t.get(a);i?i.items.push(n):t.set(a,{key:a,dependsOn:e,items:[n]})}return[...t.values()].sort((e,t)=>""===e.key?1:""===t.key?-1:t.items.length-e.items.length||e.key.localeCompare(t.key))},"isContextOnly",0,function(e,t,n){return!!t&&void 0!==n&&"number"==typeof e.distanceFromFocus&&e.distanceFromFocus>=n&&n>0},"isFocused",0,function(e,t){return!!t&&e.slug===t},"isSelfReferenceField",0,function(e,t){return(e.relationTo?.includes(t)??!1)||e.joinCollection===t},"nodeHeight",0,function(e,t,a=!1){let{visible:i,hasToggleRow:r}=n(e,t,a);return 0===i.length?58:72+(i.length+ +!!r)*19},"visibleFieldRows",0,n])}]);