@prismicio/editor-fields 0.4.49-alpha.feat-onboarding-guide.2 → 0.4.49-alpha.feat-onboarding-guide.4

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.js CHANGED
@@ -31,7 +31,7 @@ ${g.map(b=>` - ${b}`).join(`
31
31
  `)}
32
32
  `}}function u(T){return r.exact(r.intersection([r.type({id:r.string,label:o.StringOrNull,repeatable:(0,i.withFallback)(r.boolean,!0),json:r.record(r.string,T),status:(0,i.withFallback)(r.boolean,!0)}),r.partial({hash:r.string,format:(0,i.withFallback)(r.keyof(e.CustomTypeFormat),"custom")})]))}e.StaticCustomType=u(a.StaticSection),e.CustomType=u(a.DynamicSection);function c(T){return Object.entries(T.json).reduce((g,[,y])=>{const b=Object.entries(y);return g.concat(b)},[])}e.flattenWidgets=c;function l(T){return Object.entries(T.json).reduce((g,[,y])=>{const b=Object.entries(y);return g.concat(b)},[])}e.flattenSections=l;function f(T){return c(T).filter(([,b])=>b.type==="Slices").reduce((b,[,x])=>{const w=Object.entries(x.config&&x.config.choices?x.config.choices:{}).filter(([,F])=>F.type==="SharedSlice").map(([F])=>F);return b.concat(w)},[])}function p(T){const g=f(T);return function(y){return g.map(y)}}function A(T,g){const y=Object.entries(T.json).reduce((b,[x,w])=>({...b,[x]:a.Sections.toStatic(w,g)}),{});return{...T,json:y}}e.toStatic=A;function m(T,g){const y=p(T)(b=>{if(!g.get(b))return b}).filter(Boolean);return y.length>0?(0,n.left)(new s(y)):(0,n.right)(T)}e.validateSlices=m;function v(T,g){const y=Object.entries(T.json).reduce((b,[x,w])=>{const F=Object.entries(w).reduce((O,[M,P])=>{const K=g(M,P);return K?{...O,[M]:K}:O},{});return{...b,[x]:F}},{});return{...T,json:y}}e.collectWidgets=v;function _(T,g){return v(T,(y,b)=>{if(b.type==="Slices"){if(!b.config||!b.config.choices)return b;const x=Object.entries(b.config.choices).reduce((F,[O,M])=>M.type==="SharedSlice"&&!g.get(O)?F:{...F,[O]:M},{}),w={...b.config,choices:x};return{...b,config:w}}return b})}e.filterMissingSharedSlices=_;function S(T){return Object.values(T.json).reduce((g,y)=>({...g,...y}),{})}e.flattenCustomTypeFields=S;function I(T){return Object.entries(T.fields).reduce((g,[,y])=>{var b;return y.type==="Slices"||y.type==="Choice"?{...g,...Object.entries(((b=y.config)===null||b===void 0?void 0:b.choices)||{}).reduce((x,[w,F])=>F.type==="SharedSlice"?{...x,[w]:F}:x,{})}:g},{})}e.collectSharedSlices=I})(K9);var Y9={},L0={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiffOperation=void 0,function(t){t.Added="added",t.Removed="removed",t.Updated="updated"}(e.DiffOperation||(e.DiffOperation={}))})(L0);var j0={},Xo={},U0={};Object.defineProperty(U0,"__esModule",{value:!0});U0.HexaColor=void 0;const fTe=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;U0.HexaColor={is:e=>fTe.test(e)};var B0={};Object.defineProperty(B0,"__esModule",{value:!0});B0.toRecord=void 0;function dTe(e,t){return e.reduce((n,r)=>{const i=t(r);return{...n,[i]:r}},{})}B0.toRecord=dTe;var Er={};Object.defineProperty(Er,"__esModule",{value:!0});Er.mapValues=Er.isObject=Er.withOptionals=Er.isNotEmpty=Er.zipObjects=void 0;const pTe=V,ATe=un,mb=(0,pTe.__importStar)(G);function hTe(e,t){return[...new Set(Object.keys(e||{}).concat(Object.keys(t||{})))].reduce((r,i)=>{const o=e==null?void 0:e[i],a=t==null?void 0:t[i];return{...r,[i]:{left:o,right:a}}},{})}Er.zipObjects=hTe;function mTe(e){return!!Object.keys(e).length}Er.isNotEmpty=mTe;function gTe(e,t){return{...e,...t.reduce((n,[r,i])=>i?{...n,[r]:i}:n,{})}}Er.withOptionals=gTe;const vTe=mb.record(mb.string,mb.unknown);function yTe(e){return(0,ATe.isRight)(vTe.decode(e))}Er.isObject=yTe;function bTe(e,t){return Object.entries(e).reduce((n,[r,i])=>({...n,[r]:t(i,r)}),{})}Er.mapValues=bTe;Object.defineProperty(Xo,"__esModule",{value:!0});Xo.Objects=Xo.Arrays=Xo.HexaColorCode=void 0;const CR=V;Xo.HexaColorCode=(0,CR.__importStar)(U0);Xo.Arrays=(0,CR.__importStar)(B0);Xo.Objects=(0,CR.__importStar)(Er);var bh={};Object.defineProperty(bh,"__esModule",{value:!0});bh.VariationComparator=void 0;const xm=Xo,gb=dd,Za=L0;function CTe(e,t){const n=xm.Objects.zipObjects(e,t);return Object.entries(n).reduce((r,[i,o])=>i==="primary"||i==="items"||(o==null?void 0:o.left)===(o==null?void 0:o.right)?r:{...r,[i]:o==null?void 0:o.right},{})}function wm(e,t){const n=xm.Objects.zipObjects(e,t),r=Object.entries(n).reduce((i,[o,a])=>{if(JSON.stringify(a==null?void 0:a.left)===JSON.stringify(a==null?void 0:a.right))return i;const s=(()=>{var u,c,l,f,p,A,m;if(!(!(a!=null&&a.left)&&!(a!=null&&a.right))){if(a!=null&&a.left&&!a.right)return{op:Za.DiffOperation.Removed};if(!(a!=null&&a.left)&&(a!=null&&a.right)){if(((u=a.right)===null||u===void 0?void 0:u.type)===gb.GroupFieldType){const v={...a.right,config:{...a.right.config,fields:{}}};return v.config.fields=wm(void 0,(c=a.right.config)===null||c===void 0?void 0:c.fields)||{},{op:Za.DiffOperation.Added,value:v}}return{op:Za.DiffOperation.Added,value:a.right}}if(((l=a.right)===null||l===void 0?void 0:l.type)===gb.GroupFieldType){const v={...a.right,config:{...a.right.config,fields:{}}};return v.config.fields=wm(((f=a.left)===null||f===void 0?void 0:f.type)===gb.GroupFieldType?(A=(p=a.left)===null||p===void 0?void 0:p.config)===null||A===void 0?void 0:A.fields:void 0,(m=a.right.config)===null||m===void 0?void 0:m.fields)||{},{op:Za.DiffOperation.Updated,value:v}}return{op:Za.DiffOperation.Updated,value:a.right}}})();return s?{...i,[o]:s}:i},{});return xm.Objects.isNotEmpty(r)?r:void 0}bh.VariationComparator={compare(e,t){if(e&&!t)return{op:Za.DiffOperation.Removed};if(!e&&t)return{op:Za.DiffOperation.Added,value:t};const n=CTe(e,t),r=wm(e==null?void 0:e.primary,t==null?void 0:t.primary),i=wm(e==null?void 0:e.items,t==null?void 0:t.items),o={...n,...r?{primary:r}:{},...i?{items:i}:{}};if(xm.Objects.isNotEmpty(o))return{op:Za.DiffOperation.Updated,value:o}}};Object.defineProperty(j0,"__esModule",{value:!0});j0.SliceComparator=void 0;const el=Xo,vb=L0,STe=bh;function _Te(e,t){const n=el.Objects.zipObjects(e,t);return Object.entries(n).reduce((r,[i,o])=>i==="variations"||(o==null?void 0:o.left)===(o==null?void 0:o.right)?r:{...r,[i]:o==null?void 0:o.right},{})}j0.SliceComparator={compare(e,t){if(!e&&t)return{op:vb.DiffOperation.Added,value:t};if(e&&!t)return{op:vb.DiffOperation.Removed};const n=_Te(e,t),r=el.Objects.zipObjects(e&&el.Arrays.toRecord(e.variations,a=>a.id),t&&el.Arrays.toRecord(t.variations,a=>a.id)),i=Object.entries(r).reduce((a,[s,u])=>{if(!u)return a;const c=STe.VariationComparator.compare(u.left,u.right);return c?{...a,[s]:c}:a},{}),o={...n,...el.Objects.isNotEmpty(i)?{variations:i}:{}};if(el.Objects.isNotEmpty(o))return{op:vb.DiffOperation.Updated,value:o}}};var G9={};Object.defineProperty(G9,"__esModule",{value:!0});(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=V;(0,t.__exportStar)(L0,e),(0,t.__exportStar)(j0,e),(0,t.__exportStar)(bh,e),(0,t.__exportStar)(G9,e)})(Y9);var ko={},J9={};(function(e){var t=Ae&&Ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImageConstraint=void 0;var n=mh;Object.defineProperty(e,"ImageConstraint",{enumerable:!0,get:function(){return t(n).default}})})(J9);var Z9={},X9={};Object.defineProperty(X9,"__esModule",{value:!0});var P0={};Object.defineProperty(P0,"__esModule",{value:!0});P0.SlicesTypes=void 0;const ITe=V,TTe=(0,ITe.__importStar)(G),xTe=k0,wTe=vh;P0.SlicesTypes=TTe.keyof({[xTe.CompositeSliceType]:null,[wTe.SharedSliceType]:null});(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=V;(0,t.__exportStar)(k0,e),(0,t.__exportStar)(Ru,e),(0,t.__exportStar)(vh,e),(0,t.__exportStar)(yh,e),(0,t.__exportStar)(X9,e),(0,t.__exportStar)(Ou,e),(0,t.__exportStar)(mR,e),(0,t.__exportStar)(P0,e)})(Z9);(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=V;(0,t.__exportStar)(dd,e),(0,t.__exportStar)(gh,e),(0,t.__exportStar)(J9,e),(0,t.__exportStar)(Z9,e),(0,t.__exportStar)(gR,e),(0,t.__exportStar)(wr,e)})(ko);(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=V;(0,t.__exportStar)(K9,e),(0,t.__exportStar)(Y9,e),(0,t.__exportStar)(Ii,e),(0,t.__exportStar)(ko,e)})(le);var yb={},bb={},Xs={},JO;function Pt(){if(JO)return Xs;JO=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.hasContentType=Xs.hasFieldContentType=void 0;const e=un,t=xR();function n(i){var o;return r(i)&&i.__TYPE__===t.FieldContentType&&((o=i)===null||o===void 0?void 0:o.type)!==void 0&&typeof i.type=="string"&&(0,e.isRight)(t.FieldType.decode(i.type))}Xs.hasFieldContentType=n;function r(i){return typeof i=="object"&&i!==null&&"__TYPE__"in i}return Xs.hasContentType=r,Xs}var ZO;function eq(){return ZO||(ZO=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyContent=e.EmptyLegacy=e.isEmptyContent=e.EmptyContentType=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=Pt();e.EmptyContentType="EmptyContent";const a=c=>(0,o.hasContentType)(c)&&c.__TYPE__===e.EmptyContentType;e.isEmptyContent=a;const s=i.union([i.null,i.type({value:i.null})]),u=c=>new i.Type("EmptyLegacy",e.isEmptyContent,l=>(0,r.pipe)(s.decode(l),n.either.map(()=>({type:c,__TYPE__:e.EmptyContentType}))),()=>null);e.EmptyLegacy=u,e.EmptyContent=i.strict({type:i.string,__TYPE__:i.literal(e.EmptyContentType)})}(bb)),bb}var Cb={},Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.defaultCtx=Qn.getFieldCtx=Qn.LegacyContentCtx=Qn.FieldOrSliceType=void 0;const ETe=V,$Te=(0,ETe.__importStar)(G),XO=ko;Qn.FieldOrSliceType=$Te.union([XO.FieldType,XO.SlicesTypes]);class SR{constructor(t,n,r){Object.defineProperty(this,"fieldKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"prefixedKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"keyOfType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fieldKey=t,this.fieldPath=n||[],this.allTypes=r||new Map;const i=Array.of(this.fieldPath,[this.fieldKey]).flat().join(".");this.prefixedKey=i,this.keyOfType=`${i}_TYPE`,this.fieldType=this.allTypes.get(this.prefixedKey)}}Qn.LegacyContentCtx=SR;function RTe(e,t,n){return new SR(e,[...t.fieldPath,t.fieldKey,...n||[]],t.allTypes)}Qn.getFieldCtx=RTe;function OTe(e,t=new Map){return new SR(e,[],t)}Qn.defaultCtx=OTe;var Sb={},_b={},eF;function tq(){return eF||(eF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BooleanContentDefaultValue=e.BooleanContent=e.BooleanLegacy=e.isBooleanContent=e.BooleanContentType=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=Pt();e.BooleanContentType="BooleanContent";const a=c=>(0,o.hasContentType)(c)&&c.__TYPE__===e.BooleanContentType;e.isBooleanContent=a;const s=c=>new i.Type("BooleanLegacy",e.isBooleanContent,l=>(0,r.pipe)(i.boolean.decode(l),n.either.map(f=>e.BooleanContent.encode({value:f,__TYPE__:e.BooleanContentType}))),l=>({content:l.value,types:{[c.keyOfType]:"Boolean"}}));e.BooleanLegacy=s,e.BooleanContent=i.strict({__TYPE__:i.literal(e.BooleanContentType),value:i.boolean});const u=c=>{var l;return((l=c.config)===null||l===void 0?void 0:l.default_value)!==void 0?{__TYPE__:e.BooleanContentType,value:c.config.default_value||!1}:void 0};e.BooleanContentDefaultValue=u}(_b)),_b}var Ib={},tF;function _R(){return tF||(tF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmbedContent=e.EmbedLegacy=e.EmbedContentLegacy=e.isEmbedContent=e.EmbedContentType=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=lt(),a=Pt();e.EmbedContentType="EmbedContent";const s=c=>(0,a.hasContentType)(c)&&c.__TYPE__===e.EmbedContentType;e.isEmbedContent=s,e.EmbedContentLegacy=i.exact(i.intersection([i.type({embed_url:i.string,type:i.string}),i.partial({version:i.union([i.string,i.number,i.null]),title:o.StringOrNull,author_name:o.StringOrNull,author_url:o.StringOrNull,provider_name:o.StringOrNull,provider_url:o.StringOrNull,cache_age:i.union([i.string,i.number,i.null]),thumbnail_url:o.StringOrNull,thumbnail_width:o.NumberOrNull,thumbnail_height:o.NumberOrNull,html:o.StringOrNull})]));const u=c=>new i.Type("EmbedLegacy",e.isEmbedContent,l=>(0,r.pipe)(e.EmbedContentLegacy.decode(l),n.either.map(f=>({...f,all:l,__TYPE__:e.EmbedContentType}))),l=>({content:l.all,types:{[c.keyOfType]:"Embed"}}));e.EmbedLegacy=u,e.EmbedContent=i.intersection([e.EmbedContentLegacy,i.strict({__TYPE__:i.literal(e.EmbedContentType),all:i.unknown})])}(Ib)),Ib}var Tb={},xb={},Va={};Object.defineProperty(Va,"__esModule",{value:!0});const FTe=V,MTe=Na,kTe=Zi,Wh=(0,FTe.__importStar)(G);function LTe(e){let t=0;for(;t<e.length&&e[t]<=" ";)t++;let n=e.length;for(;t<n&&e[n-1]<=" ";)n--;return e.substring(t,n)}Va.default=new Wh.Type("TrimmedString",Wh.string.is,(e,t)=>(0,kTe.pipe)(Wh.string.validate(e,t),(0,MTe.chain)(n=>Wh.success(LTe(n)))),e=>e);var Ai={};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.FieldContentType=void 0;Ai.FieldContentType="FieldContent";var nF;function rF(){return nF||(nF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContent=e.ColorLegacy=e.isColorContent=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=ko,a=(0,t.__importDefault)(Va),s=Pt(),u=Ai,c=f=>(0,s.hasContentType)(f)&&f.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(f)&&f.type==="Color";e.isColorContent=c;const l=f=>new i.Type("ColorLegacy",e.isColorContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.ColorContent.encode({value:A,type:o.ColorFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[f.keyOfType]:o.ColorFieldType}}));e.ColorLegacy=l,e.ColorContent=i.strict({type:i.literal(o.ColorFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(xb)),xb}var wb={},iF;function oF(){return iF||(iF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DateContent=e.DateLegacy=e.isDateContent=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=ko,a=(0,t.__importDefault)(Va),s=Pt(),u=Ai,c=f=>(0,s.hasContentType)(f)&&f.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(f)&&f.type==="Date";e.isDateContent=c;const l=f=>new i.Type("DateLegacy",e.isDateContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.DateContent.encode({value:A,type:o.DateFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[f.keyOfType]:o.DateFieldType}}));e.DateLegacy=l,e.DateContent=i.strict({type:i.literal(o.DateFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(wb)),wb}var Eb={},aF;function sF(){return aF||(aF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberContent=e.NumberLegacy=e.isNumberContent=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=ko,a=(0,t.__importDefault)(Va),s=Pt(),u=Ai,c=f=>(0,s.hasContentType)(f)&&f.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(f)&&f.type==="Number";e.isNumberContent=c;const l=f=>new i.Type("NumberLegacy",e.isNumberContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.NumberContent.encode({value:A,type:o.NumberFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[f.keyOfType]:o.NumberFieldType}}));e.NumberLegacy=l,e.NumberContent=i.strict({type:i.literal(o.NumberFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Eb)),Eb}var $b={},uF;function cF(){return uF||(uF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RangeContent=e.RangeLegacy=e.isRangeContent=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=ko,a=(0,t.__importDefault)(Va),s=Pt(),u=Ai,c=f=>(0,s.hasContentType)(f)&&f.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(f)&&f.type==="Range";e.isRangeContent=c;const l=f=>new i.Type("RangeLegacy",e.isRangeContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.RangeContent.encode({value:A,type:o.RangeFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[f.keyOfType]:o.RangeFieldType}}));e.RangeLegacy=l,e.RangeContent=i.strict({type:i.literal(o.RangeFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}($b)),$b}var Rb={},lF;function fF(){return lF||(lF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectContentDefaultValue=e.SelectContent=e.SelectLegacy=e.isSelectContent=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=ko,a=(0,t.__importDefault)(Va),s=Pt(),u=Ai,c=p=>(0,s.hasContentType)(p)&&p.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(p)&&p.type==="Select";e.isSelectContent=c;const l=p=>new i.Type("SelectLegacy",e.isSelectContent,A=>(0,r.pipe)(a.default.decode(A),n.either.map(m=>e.SelectContent.encode({value:m,type:o.SelectFieldType,__TYPE__:u.FieldContentType}))),A=>({content:A.value,types:{[p.keyOfType]:o.SelectFieldType}}));e.SelectLegacy=l,e.SelectContent=i.strict({type:i.literal(o.SelectFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)});const f=p=>{var A;return!((A=p.config)===null||A===void 0)&&A.default_value?{__TYPE__:u.FieldContentType,type:o.SelectFieldType,value:p.config.default_value||""}:void 0};e.SelectContentDefaultValue=f}(Rb)),Rb}var Ob={},dF;function pF(){return dF||(dF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TextContent=e.TextLegacy=e.isTextContent=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=ko,a=(0,t.__importDefault)(Va),s=Pt(),u=Ai,c=f=>(0,s.hasContentType)(f)&&f.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(f)&&f.type==="Text";e.isTextContent=c;const l=f=>new i.Type("TextLegacy",e.isTextContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.TextContent.encode({value:A,type:o.TextFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[f.keyOfType]:o.TextFieldType}}));e.TextLegacy=l,e.TextContent=i.strict({type:i.literal(o.TextFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Ob)),Ob}var Fb={},AF;function hF(){return AF||(AF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampContent=e.TimestampLegacy=e.isTimestampContent=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=ko,a=(0,t.__importDefault)(Va),s=Pt(),u=Ai,c=f=>(0,s.hasContentType)(f)&&f.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(f)&&f.type==="Timestamp";e.isTimestampContent=c;const l=f=>new i.Type("TimestampLegacy",e.isTimestampContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.TimestampContent.encode({value:A,type:o.TimestampFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[f.keyOfType]:o.TimestampFieldType}}));e.TimestampLegacy=l,e.TimestampContent=i.strict({type:i.literal(o.TimestampFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Fb)),Fb}var mF;function nq(){return mF||(mF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FieldContent=e.FieldType=void 0;const t=V,n=(0,t.__importStar)(G),r=rF(),i=oF(),o=sF(),a=cF(),s=fF(),u=pF(),c=hF();e.FieldType=n.keyof({Text:null,Date:null,Timestamp:null,Color:null,Number:null,Range:null,Select:null}),e.FieldContent=n.union([i.DateContent,r.ColorContent,o.NumberContent,a.RangeContent,s.SelectContent,u.TextContent,c.TimestampContent]),(0,t.__exportStar)(rF(),e),(0,t.__exportStar)(Ai,e),(0,t.__exportStar)(oF(),e),(0,t.__exportStar)(sF(),e),(0,t.__exportStar)(cF(),e),(0,t.__exportStar)(fF(),e),(0,t.__exportStar)(pF(),e),(0,t.__exportStar)(hF(),e)}(Tb)),Tb}var Mb={},gF;function rq(){return gF||(gF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPointContent=e.GeoPointLegacy=e.isGeoPointContent=e.GeoPointContentType=void 0;const t=V,n=ct,r=Zi,i=(0,t.__importStar)(G),o=Pt();e.GeoPointContentType="GeoPointContent";const a=c=>(0,o.hasContentType)(c)&&c.__TYPE__===e.GeoPointContentType;e.isGeoPointContent=a;const s=i.strict({position:i.strict({lat:i.number,lng:i.number})}),u=c=>new i.Type("GeoPointLegacy",e.isGeoPointContent,l=>(0,r.pipe)(s.decode(l),n.either.map(f=>e.GeoPointContent.encode({...f,__TYPE__:e.GeoPointContentType}))),l=>({content:{position:l.position},types:{[c.keyOfType]:"GeoPoint"}}));e.GeoPointLegacy=u,e.GeoPointContent=i.intersection([s,i.strict({__TYPE__:i.literal(e.GeoPointContentType)})])}(Mb)),Mb}var kb={},vF;function IR(){return vF||(vF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImageContent=e.ImageLegacy=e.ImageContentView=e.isImageContent=e.ImageContentType=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=Er,a=lt(),s=Pt();e.ImageContentType="ImageContent";const u=p=>(0,s.hasContentType)(p)&&p.__TYPE__===e.ImageContentType;e.isImageContent=u;const c=i.exact(i.type({id:i.string,url:i.string,width:i.number,height:i.number}));e.ImageContentView=i.exact(i.intersection([i.type({origin:c,width:i.number,height:i.number,edit:i.type({zoom:i.number,crop:i.type({x:i.number,y:i.number}),background:i.string})}),i.partial({url:i.string,credits:a.NonEmptyStringOrNull,alt:a.NonEmptyStringOrNull,provider:a.StringOrNull})]));const l=i.intersection([e.ImageContentView,i.partial({thumbnails:i.record(i.string,e.ImageContentView)})]),f=p=>new i.Type("ImageLegacy",e.isImageContent,A=>(0,r.pipe)(l.decode(A),n.either.map(m=>e.ImageContent.encode({...m,__TYPE__:e.ImageContentType}))),A=>({content:(0,o.withOptionals)({edit:A.edit,height:A.height,origin:A.origin,width:A.width},[["alt",A.alt],["credits",A.credits],["provider",A.provider],["thumbnails",A.thumbnails],["url",A.url]]),types:{[p.keyOfType]:"Image"}}));e.ImageLegacy=f,e.ImageContent=i.intersection([l,i.strict({__TYPE__:i.literal(e.ImageContentType)})])}(kb)),kb}var Lb={},yF;function iq(){return yF||(yF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrationFieldContent=e.IntegrationFieldLegacy=e.isIntegrationFieldContent=e.IntegrationFieldContentType=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=Pt();e.IntegrationFieldContentType="IntegrationFieldsContent";const a=u=>(0,o.hasContentType)(u)&&u.__TYPE__===e.IntegrationFieldContentType;e.isIntegrationFieldContent=a;const s=u=>new i.Type("IntegrationFieldLegacy",e.isIntegrationFieldContent,c=>(0,r.pipe)(i.string.decode(c),n.either.map(l=>e.IntegrationFieldContent.encode({value:l,__TYPE__:e.IntegrationFieldContentType}))),c=>({content:c.value,types:{[u.keyOfType]:"IntegrationFields"}}));e.IntegrationFieldLegacy=s,e.IntegrationFieldContent=i.strict({__TYPE__:i.literal(e.IntegrationFieldContentType),value:i.string})}(Lb)),Lb}var jb={},bF;function TR(){return bF||(bF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkContent=e.Link=e.LinkContentLegacy=e.LinkLegacy=e.isLinkContent=e.LinkContentType=e.ExternalLinkContent=e.ExternalLinkType=e.DocumentLinkContent=e.DocumentLinkType=e.FileLinkContent=e.FileLinkType=e.ImageLinkContent=e.ImageLinkType=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=$0,a=lt(),s=Ze,u=Pt();e.ImageLinkType="ImageLink";const c=i.exact(i.intersection([i.type({id:i.string,url:i.string,height:i.string,width:i.string,size:i.string,name:i.string,kind:i.string}),i.partial({date:a.StringOrNull})])),l=new i.Type("ImageLink",T=>(0,u.hasContentType)(T)&&T.__TYPE__===e.ImageLinkType,T=>(0,r.pipe)(c.decode(T),n.either.map(g=>e.ImageLinkContent.encode({...g,__TYPE__:e.ImageLinkType}))),T=>c.encode(T));e.ImageLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.ImageLinkType)}),c]),e.FileLinkType="FileLink";const f=i.exact(i.intersection([i.type({id:i.string,url:i.string,name:i.string,kind:i.string,size:(0,o.withFallback)(i.string,"0")}),i.partial({date:(0,s.nullable)(i.string)})])),p=new i.Type("FileLink",T=>(0,u.hasContentType)(T)&&T.__TYPE__===e.FileLinkType,T=>(0,r.pipe)(f.decode(T),n.either.map(g=>e.FileLinkContent.encode({...g,__TYPE__:e.FileLinkType}))),T=>f.encode(T));e.FileLinkContent=i.intersection([f,i.exact(i.intersection([i.type({__TYPE__:i.literal(e.FileLinkType)}),i.partial({size:(0,o.withFallback)(i.string,"0")})]))]),e.DocumentLinkType="DocumentLink";const A=i.strict({id:a.NonEmptyString}),m=new i.Type("DocumentLink",T=>(0,u.hasContentType)(T)&&T.__TYPE__===e.DocumentLinkType,T=>(0,r.pipe)(A.decode(T),n.either.map(g=>e.DocumentLinkContent.encode({...g,__TYPE__:e.DocumentLinkType}))),T=>A.encode(T));e.DocumentLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.DocumentLinkType)}),A]),e.ExternalLinkType="ExternalLink";const v=i.exact(i.intersection([i.type({url:i.string}),i.partial({kind:i.literal("web"),target:a.StringOrNull,preview:(0,s.nullable)(i.partial({title:i.string}))})])),_=new i.Type("ExternalLink",T=>(0,u.hasContentType)(T)&&T.__TYPE__===e.ExternalLinkType,T=>(0,r.pipe)(v.decode(T),n.either.map(g=>e.ExternalLinkContent.encode({...g,__TYPE__:e.ExternalLinkType}))),T=>v.encode(T));e.ExternalLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.ExternalLinkType)}),v]),e.LinkContentType="LinkContent";const S=T=>(0,u.hasContentType)(T)&&T.__TYPE__===e.LinkContentType;e.isLinkContent=S,e.LinkLegacy=i.union([l,p,m,_]);const I=T=>new i.Type("LinkLegacy",e.isLinkContent,g=>(0,r.pipe)(e.LinkLegacy.decode(g),n.either.map(y=>e.LinkContent.encode({value:y,__TYPE__:e.LinkContentType}))),g=>({content:e.LinkLegacy.encode(g.value),types:{[T.keyOfType]:"Link"}}));e.LinkContentLegacy=I,e.Link=i.union([e.ImageLinkContent,e.FileLinkContent,e.DocumentLinkContent,e.ExternalLinkContent]),e.LinkContent=i.strict({__TYPE__:i.literal(e.LinkContentType),value:e.Link})}(jb)),jb}var bi={},Ub={},Bb={},CF;function SF(){return CF||(CF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Block=e.BlockLegacy=e.TextBlock=e.checkEmbedBlock=e.EmbedBlock=e.checkImageBlock=e.ImageBlock=e.ValidatedSpans=e.SpanLegacy=e.Span=void 0;const t=V,n=ct,r=un,i=Ye,o=(0,t.__importStar)(G),a=$0,s=gh,u=lt(),c=Ze,l=_R(),f=IR(),p=TR(),A=O=>o.strict({data:O,start:o.number,end:o.number,type:o.literal(s.RichTextNodeType.hyperlink)}),m=o.strict({data:(0,a.withFallback)(o.string,""),start:o.number,end:o.number,type:o.literal("label")}),v=o.strict({start:o.number,end:o.number,type:o.keyof({[s.RichTextNodeType.strong]:null,[s.RichTextNodeType.em]:null,"list-item":null})});e.Span=o.union([A(p.Link),m,v]),e.SpanLegacy=o.union([A(p.LinkLegacy),m,v]);const _=O=>new o.Type("ValidatedSpans",M=>Array.isArray(M)&&M.every(O.is),(M,P)=>{if(Array.isArray(M)){const K=M.reduce((Y,Z)=>{const ie=O.decode(Z);return(0,r.isLeft)(ie)?Y:[...Y,ie.right]},[]).sort((Y,Z)=>Y.start-Z.start);return o.success(K)}else return o.failure(M,P)},M=>M.reduce((P,K)=>{const Y=O.encode(K);return[...P,Y]},[]));e.ValidatedSpans=_;const S=O=>o.exact(o.intersection([o.type({type:o.literal(s.RichTextNodeType.image),data:o.intersection([f.ImageContentView,o.partial({linkTo:(0,c.nullable)(O)})])}),o.partial({label:u.StringOrNull,direction:u.StringOrNull})]));e.ImageBlock=S(p.Link);const I=S(p.LinkLegacy);function T(O){return O.type===s.RichTextNodeType.image}e.checkImageBlock=T;const g=o.exact(o.intersection([o.type({type:o.literal(s.RichTextNodeType.embed),data:o.unknown}),o.partial({label:u.StringOrNull,direction:u.StringOrNull})])),y=new o.Type("EmbedBlockLegacy",O=>O.type==="embed",O=>(0,i.pipe)(g.decode(O),n.either.chain(M=>n.either.map(P=>[M,P])(l.EmbedContentLegacy.decode(M.data))),n.either.map(([M,P])=>e.EmbedBlock.encode({...M,data:{...P,__TYPE__:l.EmbedContentType,all:M.data}}))),O=>({...g.encode(O),data:l.EmbedContentLegacy.encode(O.data)}));e.EmbedBlock=o.exact(o.intersection([o.type({type:o.literal(s.RichTextNodeType.embed),data:l.EmbedContent}),o.partial({label:u.StringOrNull,direction:u.StringOrNull})]));function b(O){return O.type===s.RichTextNodeType.embed}e.checkEmbedBlock=b;const x=O=>o.exact(o.intersection([o.type({type:(0,c.refineType)(s.RichTextNodeTypeCodec,`string which isn't ${s.RichTextNodeType.image} ${s.RichTextNodeType.embed}`,M=>M!==s.RichTextNodeType.image&&M!==s.RichTextNodeType.embed),content:o.intersection([o.type({text:o.string}),o.partial({spans:(0,e.ValidatedSpans)(O)})])}),o.partial({label:o.string,direction:o.string})]));e.TextBlock=x(e.Span);const w=x(e.SpanLegacy),F=o.union([y,I,w]);e.BlockLegacy=new o.Type("BlockLegacy",O=>y.is(O)||I.is(O)||w.is(O),O=>F.decode(O),O=>(()=>e.ImageBlock.is(O)?I.encode(O):e.EmbedBlock.is(O)?y.encode(O):w.encode(O))()),e.Block=o.union([e.ImageBlock,e.EmbedBlock,e.TextBlock])}(Bb)),Bb}var _F;function oq(){return _F||(_F=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RichTextLegacy=e.RichTextContent=e.isRichTextContent=e.RichTextContentType=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=Pt(),a=SF();e.RichTextContentType="StructuredTextContent";const s=l=>(0,o.hasContentType)(l)&&l.__TYPE__===e.RichTextContentType;e.isRichTextContent=s;const u=i.array(a.BlockLegacy);e.RichTextContent=i.strict({__TYPE__:i.literal(e.RichTextContentType),value:i.array(a.Block)}),(0,t.__exportStar)(SF(),e);const c=l=>new i.Type("RichTextLegacy",e.isRichTextContent,f=>(0,r.pipe)(u.decode(f),n.either.map(p=>({value:p,__TYPE__:e.RichTextContentType}))),f=>({content:u.encode(f.value),types:{[l.keyOfType]:"StructuredText"}}));e.RichTextLegacy=c}(Ub)),Ub}var Pb={},IF;function aq(){return IF||(IF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SeparatorContent=e.SeparatorLegacy=e.isSeparatorContent=e.SeparatorContentType=void 0;const n=(0,V.__importStar)(G),r=Pt();e.SeparatorContentType="SeparatorContent";const i=a=>(0,r.hasContentType)(a)&&a.__TYPE__===e.SeparatorContentType;e.isSeparatorContent=i;const o=a=>new n.Type("SeparatorLegacy",e.isSeparatorContent,()=>n.success(e.SeparatorContent.encode({__TYPE__:e.SeparatorContentType})),()=>({content:{},types:{[a.keyOfType]:"Separator"}}));e.SeparatorLegacy=o,e.SeparatorContent=n.strict({__TYPE__:n.literal(e.SeparatorContentType)})}(Pb)),Pb}var TF;function jTe(){if(TF)return bi;TF=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.NestableLegacy=bi.isNestableContent=bi.NestableContentDefaultValue=bi.NestableContent=void 0;const e=V,t=un,n=(0,e.__importStar)(G),r=eq(),i=tq(),o=_R(),a=nq(),s=Ai,u=rq(),c=IR(),l=iq(),f=TR(),p=oq(),A=aq();bi.NestableContent=n.union([r.EmptyContent,i.BooleanContent,o.EmbedContent,a.TextContent,a.TimestampContent,a.SelectContent,a.RangeContent,a.NumberContent,a.DateContent,a.ColorContent,u.GeoPointContent,c.ImageContent,l.IntegrationFieldContent,f.LinkContent,p.RichTextContent,A.SeparatorContent]);const m=S=>{switch(S.type){case"Boolean":return(0,i.BooleanContentDefaultValue)(S);case"Select":return(0,a.SelectContentDefaultValue)(S);default:return}};bi.NestableContentDefaultValue=m;const v=S=>(0,a.isTextContent)(S)||(0,a.isColorContent)(S)||(0,a.isDateContent)(S)||(0,a.isTimestampContent)(S)||(0,a.isNumberContent)(S)||(0,a.isRangeContent)(S)||(0,a.isSelectContent)(S)||(0,u.isGeoPointContent)(S)||(0,p.isRichTextContent)(S)||(0,i.isBooleanContent)(S)||(0,o.isEmbedContent)(S)||(0,c.isImageContent)(S)||(0,l.isIntegrationFieldContent)(S)||(0,f.isLinkContent)(S)||(0,A.isSeparatorContent)(S)||(0,r.isEmptyContent)(S);bi.isNestableContent=v;const _=S=>({decode(I){if(!S.fieldType)return;const T=(0,r.EmptyLegacy)(S.fieldType).decode(I);if((0,t.isRight)(T))return T;const g=(()=>{switch(S.fieldType){case"Text":return(0,a.TextLegacy)(S);case"Color":return(0,a.ColorLegacy)(S);case"Date":return(0,a.DateLegacy)(S);case"Timestamp":return(0,a.TimestampLegacy)(S);case"Number":return(0,a.NumberLegacy)(S);case"Range":return(0,a.RangeLegacy)(S);case"Select":return(0,a.SelectLegacy)(S);case"GeoPoint":return(0,u.GeoPointLegacy)(S);case"StructuredText":return(0,p.RichTextLegacy)(S);case"Boolean":return(0,i.BooleanLegacy)(S);case"Embed":return(0,o.EmbedLegacy)(S);case"Image":return(0,c.ImageLegacy)(S);case"IntegrationFields":return(0,l.IntegrationFieldLegacy)(S);case"Link":return(0,f.LinkContentLegacy)(S);case"Separator":return(0,A.SeparatorLegacy)(S);default:return}})();if(g)return g.decode(I)},encode(I){switch(I.__TYPE__){case s.FieldContentType:return I.type==="Text"?(0,a.TextLegacy)(S).encode(I):I.type==="Color"?(0,a.ColorLegacy)(S).encode(I):I.type==="Range"?(0,a.RangeLegacy)(S).encode(I):I.type==="Date"?(0,a.DateLegacy)(S).encode(I):I.type==="Number"?(0,a.NumberLegacy)(S).encode(I):I.type==="Timestamp"?(0,a.TimestampLegacy)(S).encode(I):I.type==="Select"?(0,a.SelectLegacy)(S).encode(I):void 0;case u.GeoPointContentType:return(0,u.GeoPointLegacy)(S).encode(I);case p.RichTextContentType:return(0,p.RichTextLegacy)(S).encode(I);case o.EmbedContentType:return(0,o.EmbedLegacy)(S).encode(I);case i.BooleanContentType:return(0,i.BooleanLegacy)(S).encode(I);case c.ImageContentType:return(0,c.ImageLegacy)(S).encode(I);case l.IntegrationFieldContentType:return(0,l.IntegrationFieldLegacy)(S).encode(I);case f.LinkContentType:return(0,f.LinkContentLegacy)(S).encode(I);case A.SeparatorContentType:return(0,A.SeparatorLegacy)(S).encode(I);default:return}}});return bi.NestableLegacy=_,bi}var xF;function Lo(){return xF||(xF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=V;(0,t.__exportStar)(tq(),e),(0,t.__exportStar)(_R(),e),(0,t.__exportStar)(nq(),e),(0,t.__exportStar)(rq(),e),(0,t.__exportStar)(IR(),e),(0,t.__exportStar)(iq(),e),(0,t.__exportStar)(TR(),e),(0,t.__exportStar)(jTe(),e),(0,t.__exportStar)(oq(),e),(0,t.__exportStar)(aq(),e)}(Sb)),Sb}var Ko={},wF;function W0(){if(wF)return Ko;wF=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.repeatableContentWithDefaultNestableContentValues=Ko.withDefaultNestableContentValues=Ko.withDefaultSlicePrimaryContentValues=void 0;const e=le,t=Qa(),n=Lo();function r(a,s){const u=s;for(const[c,l]of Object.entries(a)){const f=s[c];if(f===void 0){if(l.type===e.GroupFieldType)u[c]=(0,t.groupContentWithDefaultValues)(l,t.GroupContentDefaultValue);else{const p=(0,n.NestableContentDefaultValue)(l);p&&(u[c]=p)}continue}l.type===e.GroupFieldType&&(0,t.isGroupContent)(f)&&(u[c]=(0,t.groupContentWithDefaultValues)(l,f))}return u}Ko.withDefaultSlicePrimaryContentValues=r;function i(a,s){return Object.entries(a).reduce((u,[c,l])=>{if(s[c]===void 0){const f=(0,n.NestableContentDefaultValue)(l);return f!==void 0?{...u,[c]:f}:u}return u},s)}Ko.withDefaultNestableContentValues=i;function o(a,s){const u=Object.entries(a);return s.map(c=>u.reduce((l,[f,p])=>{var A;const m=c.value.find(([v])=>v===f);if(p.type==="Group"){const v=(0,t.groupContentWithDefaultValues)(p,(A=m==null?void 0:m[1])!==null&&A!==void 0?A:{__TYPE__:t.GroupContentType,value:[]});return{...l,value:[...l.value.filter(([_])=>_!==f),...v?[[f,v]]:[]]}}else if(!m){const v=(0,n.NestableContentDefaultValue)(p);return{...l,value:[...l.value,...v?[[f,v]]:[]]}}return l},c))}return Ko.repeatableContentWithDefaultNestableContentValues=o,Ko}var EF;function Qa(){return EF||(EF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseGroupItemsContent=e.traverseGroupContent=e.groupContentWithDefaultValues=e.GroupLegacy=e.GroupItemLegacy=e.GroupContentDefaultValue=e.isGroupContent=e.GroupContent=e.GroupItemContent=e.GroupContentType=e.GroupItemContentType=void 0;const t=V,n=ct,r=un,i=Ye,o=(0,t.__importStar)(G),a=le,s=Qn,u=Pt(),c=Lo(),l=W0();e.GroupItemContentType="GroupItemContent",e.GroupContentType="GroupContentType",e.GroupItemContent=o.recursion("GroupItemContent",()=>o.strict({__TYPE__:o.literal(e.GroupItemContentType),value:o.array(o.tuple([o.string,o.union([c.NestableContent,e.GroupContent])]))})),e.GroupContent=o.recursion("GroupContent",()=>o.strict({__TYPE__:o.literal(e.GroupContentType),value:o.array(e.GroupItemContent)})),e.isGroupContent=e.GroupContent.is,e.GroupContentDefaultValue={__TYPE__:e.GroupContentType,value:[]};const f=o.record(o.string,o.unknown),p=S=>new o.Type("GroupItemLegacy",I=>(0,u.hasContentType)(I)&&I.__TYPE__===e.GroupItemContentType,I=>(0,i.pipe)(f.decode(I),n.either.map(g=>({value:Object.entries(g).reduce((b,[x,w])=>{const F=(0,s.getFieldCtx)(x,S),O=F.fieldType===a.GroupFieldType?(0,e.GroupLegacy)(F).decode(w):(0,c.NestableLegacy)(F).decode(w);return!O||(0,r.isLeft)(O)?b:[...b,[x,O.right]]},[]),__TYPE__:e.GroupItemContentType}))),I=>I.value.reduce((T,[g,y])=>{const b=(0,s.getFieldCtx)(g,S),x=(0,e.isGroupContent)(y)?(0,e.GroupLegacy)(b).encode(y):(0,c.NestableLegacy)(b).encode(y);return x?{content:{...T.content,[g]:x.content},types:{...T.types,...x.types}}:T},{content:{},types:{}}));e.GroupItemLegacy=p;const A=S=>{const I=o.array(o.union([o.null,(0,e.GroupItemLegacy)(S)])),T=o.array((0,e.GroupItemLegacy)(S));return new o.Type("GroupLegacy",e.isGroupContent,g=>(0,i.pipe)(I.decode(g),n.either.map(y=>({value:y.map(b=>b===null?{__TYPE__:e.GroupItemContentType,value:[]}:b),__TYPE__:e.GroupContentType}))),g=>{const y=T.encode(g.value);return{content:y.map(b=>b.content),types:y.reduce((b,x)=>({...b,...x.types}),{[S.keyOfType]:a.GroupFieldType})}})};e.GroupLegacy=A;function m(S,I){var T;const g=(T=S.config)===null||T===void 0?void 0:T.fields;return g?{...I,value:(0,l.repeatableContentWithDefaultNestableContentValues)(g,I.value)}:I}e.groupContentWithDefaultValues=m;function v({path:S,key:I,apiId:T,model:g,content:y}){return b=>{var x;const w=_({path:S,model:(x=g==null?void 0:g.config)===null||x===void 0?void 0:x.fields,content:y.value})(b);return b({path:S,key:I,apiId:T,model:g,content:{__TYPE__:y.__TYPE__,value:w}})}}e.traverseGroupContent=v;function _({path:S,model:I,content:T}){return g=>T.map((y,b)=>{const x=S.concat([{key:b.toString(),type:"GroupItem"}]),w=y.value.reduce((F,[O,M])=>{const P=I==null?void 0:I[O];let K;return(!P||(P==null?void 0:P.type)===a.GroupFieldType)&&M.__TYPE__===e.GroupContentType?K=v({path:x.concat([{key:O,type:"Widget"}]),key:O,apiId:O,model:P,content:M})(g):K=g({path:x.concat([{key:O,type:"Widget"}]),key:O,apiId:O,model:P,content:M}),!K||!((0,c.isNestableContent)(K)||(0,e.isGroupContent)(K))?F:F.concat([[O,K]])},[]);return{__TYPE__:y.__TYPE__,value:w}})}e.traverseGroupItemsContent=_}(Cb)),Cb}var Wb={},Db={},Kb={},eu={},$F;function sq(){if($F)return eu;$F=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.RepeatableWidgets=eu.RepeatableWidgetsLegacy=void 0;const t=(0,V.__importStar)(G),n=Qa(),r=Lo(),i=s=>t.array((0,n.GroupItemLegacy)(s));eu.RepeatableWidgetsLegacy=i;const o=t.tuple([t.string,t.union([r.NestableContent,n.GroupContent])]),a=t.strict({__TYPE__:t.literal(n.GroupItemContentType),value:t.array(o)});return eu.RepeatableWidgets=t.array(a),eu}var RF;function Em(){return RF||(RF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.migrateCompositeSlice=e.traverseCompositeSliceContent=e.compositeSliceContentWithDefaultValues=e.CompositeSliceContent=e.CompositeSliceLegacy=e.isCompositeSliceContent=e.CompositeSliceContentType=void 0;const t=V,n=ct,r=un,i=Ye,o=(0,t.__importStar)(G),a=Qn,s=Pt(),u=Qa(),c=Lo(),l=W0(),f=sq();e.CompositeSliceContentType="CompositeSliceContent";const p=I=>(0,s.hasContentType)(I)&&I.__TYPE__===e.CompositeSliceContentType;e.isCompositeSliceContent=p;const A=o.exact(o.partial({repeat:o.array(o.unknown),"non-repeat":o.UnknownRecord})),m=I=>new o.Type("CompositeSliceLegacy",e.isCompositeSliceContent,T=>(0,i.pipe)(A.decode(T),n.either.map(g=>{const y=(()=>{const x=(0,a.getFieldCtx)("repeat",I),w=(0,f.RepeatableWidgetsLegacy)(x).decode(g.repeat);if(!(!w||(0,r.isLeft)(w)))return w.right})()||[];return{nonRepeat:Object.entries(g["non-repeat"]||{}).reduce((x,[w,F])=>{const O=(0,a.getFieldCtx)(w,I,["non-repeat"]);if(!O)return x;const M=(0,c.NestableLegacy)(O).decode(F);return!M||(0,r.isLeft)(M)?x:{...x,[w]:M.right}},{}),repeat:y,__TYPE__:e.CompositeSliceContentType}})),T=>{const g=Object.entries(T.nonRepeat).reduce((b,[x,w])=>{const F=(0,a.getFieldCtx)(x,I,["non-repeat"]),O=(0,c.NestableLegacy)(F).encode(w);return O?{content:{...b.content,[x]:O.content},types:{...b.types,...O.types}}:b},{content:{},types:{}}),y=(()=>{const b=(0,a.getFieldCtx)("repeat",I);return(0,f.RepeatableWidgetsLegacy)(b).encode(T.repeat)})()||[];return{content:{"non-repeat":g.content,repeat:y.map(b=>b.content)},types:{[I.keyOfType]:"Slice",...g.types,...y.reduce((b,x)=>({...b,...x.types}),{})}}});e.CompositeSliceLegacy=m,e.CompositeSliceContent=o.strict({__TYPE__:o.literal(e.CompositeSliceContentType),nonRepeat:o.record(o.string,c.NestableContent),repeat:f.RepeatableWidgets});function v(I,T){var g,y;const b=(0,l.withDefaultNestableContentValues)((g=I["non-repeat"])!==null&&g!==void 0?g:{},T.nonRepeat),x=(0,l.repeatableContentWithDefaultNestableContentValues)((y=I.repeat)!==null&&y!==void 0?y:{},T.repeat);return{...T,nonRepeat:b,repeat:x}}e.compositeSliceContentWithDefaultValues=v;function _({path:I,sliceKey:T,sliceName:g,model:y,content:b}){return(x,w)=>{const F=Object.entries(b.widget.nonRepeat).reduce((M,[P,K])=>{const Y=(()=>{var ie,he,ue;return(y==null?void 0:y.type)==="SharedSlice"?(he=(ie=y==null?void 0:y.fields)===null||ie===void 0?void 0:ie.primary)===null||he===void 0?void 0:he[P]:(ue=y==null?void 0:y["non-repeat"])===null||ue===void 0?void 0:ue[P]})(),Z=x({path:I.concat([{key:"non-repeat",type:"primary"},{key:P,type:"Widget"}]),key:P,apiId:g,model:Y,content:K});return Z?(0,c.isNestableContent)(Z)?{...M,[P]:Z}:(console.warn(`Warn: Non nestable content with key [${P}] detected in a composite slice [${g}] with key [${T}]`),M):M},{}),O=(0,u.traverseGroupItemsContent)({path:I.concat([{key:"repeat",type:"items"}]),model:(y==null?void 0:y.type)==="SharedSlice"?y==null?void 0:y.fields.items:y==null?void 0:y.repeat,content:b.widget.repeat})(x);return w({key:T,apiId:g,path:I,model:y,content:{...b,widget:{__TYPE__:"CompositeSliceContent",repeat:O,nonRepeat:F}}})}}e.traverseCompositeSliceContent=_;function S(I,T){const[,g]=T.key.split("$");return{key:`${I.sliceName}$${g}`,name:I.sliceName,maybeLabel:T.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:I.variationId,primary:Object.entries(T.widget.nonRepeat).reduce((y,[b,x])=>{var w;return!((w=I.fields.primary)===null||w===void 0)&&w[b]?{...y,[b]:x}:(console.warn(`The widget ${b} in the non-repeat zone of the composite slice [${I.sliceName}] with key [${T.key}] doesn't exist in the model.`),y)},{}),items:T.widget.repeat.map(y=>({__TYPE__:"GroupItemContent",value:y.value.reduce((b,[x,w])=>{var F;return!((F=I.fields.items)===null||F===void 0)&&F[x]?b.concat([[x,w]]):(console.warn(`The widget ${x} in the repeat zone of the composite slice [${I.sliceName}] with key [${T.key}] doesn't exist in the model.`),b)},[])}),[])}}}e.migrateCompositeSlice=S}(Kb)),Kb}var Nb={},No={},OF;function uq(){if(OF)return No;OF=1,Object.defineProperty(No,"__esModule",{value:!0}),No.isSlicePrimaryContent=No.SlicePrimaryLegacy=No.SlicePrimaryContent=void 0;const t=(0,V.__importStar)(G),n=le,r=Qa(),i=Lo();No.SlicePrimaryContent=t.union([i.NestableContent,r.GroupContent]);const o=s=>{const u=(0,r.GroupLegacy)(s),c=(0,i.NestableLegacy)(s);return{decode(l){return s.fieldType===n.GroupFieldType?u.decode(l):c.decode(l)},encode(l){return(0,r.isGroupContent)(l)?u.encode(l):c.encode(l)}}};No.SlicePrimaryLegacy=o;const a=s=>(0,i.isNestableContent)(s)||(0,r.isGroupContent)(s);return No.isSlicePrimaryContent=a,No}var FF;function $m(){return FF||(FF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSharedSliceContent=e.sharedSliceContentWithDefaultValues=e.SharedSliceContent=e.SharedSliceLegacy=e.isSharedSliceContent=e.SharedSliceContentType=void 0;const t=V,n=ct,r=un,i=Ye,o=(0,t.__importStar)(G),a=$0,s=le,u=Qn,c=Pt(),l=Qa(),f=Lo(),p=W0(),A=sq(),m=uq();e.SharedSliceContentType="SharedSliceContent";const v=g=>(0,c.hasContentType)(g)&&g.__TYPE__===e.SharedSliceContentType;e.isSharedSliceContent=v;const _=o.exact(o.type({variation:o.string,items:(0,a.withFallback)(o.array(o.unknown),[]),primary:(0,a.withFallback)(o.UnknownRecord,{})})),S=g=>new o.Type("SharedSliceLegacy",e.isSharedSliceContent,y=>(0,i.pipe)(_.decode(y),n.either.map(b=>{const x=(()=>{const F=(0,u.getFieldCtx)("items",g,["variations",b.variation]),O=(0,A.RepeatableWidgetsLegacy)(F).decode(b.items);if(!(!O||(0,r.isLeft)(O)))return O.right})()||[],w=Object.entries(b.primary).reduce((F,[O,M])=>{const P=(0,u.getFieldCtx)(O,g,["variations",b.variation,"primary"]),K=(0,m.SlicePrimaryLegacy)(P).decode(M);return!K||(0,r.isLeft)(K)?F:{...F,[O]:K.right}},{});return{variation:b.variation,primary:w,items:x,__TYPE__:e.SharedSliceContentType}})),y=>{const b=Object.entries(y.primary).reduce((w,[F,O])=>{const M=(0,u.getFieldCtx)(F,g,["variations",y.variation,"primary"]),P=(0,m.SlicePrimaryLegacy)(M).encode(O);return P?{content:{...w.content,[F]:P.content},types:{...w.types,...P.types}}:w},{content:{},types:{}}),x=(()=>{const w=(0,u.getFieldCtx)("items",g,["variations",y.variation]);return(0,A.RepeatableWidgetsLegacy)(w).encode(y.items)})()||[];return{content:{primary:b.content,items:x.map(w=>w.content),variation:y.variation},types:{[g.keyOfType]:"SharedSlice",...b.types,...x.reduce((w,F)=>({...w,...F.types}),{})}}});e.SharedSliceLegacy=S,e.SharedSliceContent=o.strict({__TYPE__:o.literal(e.SharedSliceContentType),variation:o.string,primary:o.record(o.string,m.SlicePrimaryContent),items:A.RepeatableWidgets});function I(g,y){var b,x;const w=g.variations.find(K=>K.id===y.variation),F=(b=w==null?void 0:w.primary)!==null&&b!==void 0?b:{},O=(x=w==null?void 0:w.items)!==null&&x!==void 0?x:{},M=(0,p.withDefaultSlicePrimaryContentValues)(F,y.primary),P=(0,p.repeatableContentWithDefaultNestableContentValues)(O,y.items);return{...y,primary:M,items:P}}e.sharedSliceContentWithDefaultValues=I;function T({path:g,sliceKey:y,sliceName:b,model:x,content:w}){return(F,O)=>{const M=Object.entries(w.widget.primary).reduce((K,[Y,Z])=>{var ie,he;const ue=(he=(ie=x==null?void 0:x.fields)===null||ie===void 0?void 0:ie.primary)===null||he===void 0?void 0:he[Y],k=(()=>(0,l.isGroupContent)(Z)?(0,l.traverseGroupContent)({path:g.concat([{key:"primary",type:"primary"},{key:Y,type:"Widget"}]),key:Y,apiId:Y,content:Z,model:(ue==null?void 0:ue.type)===s.GroupFieldType?ue:void 0})(F):(0,f.isNestableContent)(Z)?F({path:g.concat([{key:"primary",type:"primary"},{key:Y,type:"Widget"}]),key:Y,apiId:Y,model:ue,content:Z}):void 0)();return k?((0,m.isSlicePrimaryContent)(k)||console.warn(`Warn: Non nestable or group content with key [${Y}] detected in a shared slice [${b}] with key [${y}]`),{...K,[Y]:k}):K},{}),P=(0,l.traverseGroupItemsContent)({path:g.concat([{key:"items",type:"items"}]),model:x==null?void 0:x.fields.items,content:w.widget.items})(F);return O({key:y,apiId:b,path:g,model:x,content:{...w,widget:{__TYPE__:"SharedSliceContent",variation:w.widget.variation,primary:M,items:P}}})}}e.traverseSharedSliceContent=T}(Nb)),Nb}var Tr={},MF;function Rm(){if(MF)return Tr;MF=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.migrateSimpleSlice=Tr.traverseSimpleSliceContent=Tr.SimpleSliceLegacy=Tr.isSimpleSliceContent=Tr.SimpleSliceContent=void 0;const t=(0,V.__importStar)(G),n=Qa(),r=Lo();Tr.SimpleSliceContent=t.union([r.NestableContent,n.GroupContent]);const i=u=>(0,r.isNestableContent)(u)||(0,n.isGroupContent)(u);Tr.isSimpleSliceContent=i;const o=u=>({decode:(()=>u.fieldType==="Group"?(0,n.GroupLegacy)(u).decode.bind(null):(0,r.NestableLegacy)(u).decode.bind(null))(),encode:c=>{switch(c.__TYPE__){case"GroupContentType":return(0,n.GroupLegacy)(u).encode(c);default:return(0,r.NestableLegacy)(u).encode(c)}}});Tr.SimpleSliceLegacy=o;function a({path:u,sliceKey:c,sliceName:l,model:f,content:p}){return(A,m)=>{if((0,n.isGroupContent)(p.widget)){const _=(0,n.traverseGroupContent)({path:u,key:p.key,apiId:p.name,model:(()=>{if((f==null?void 0:f.type)==="Group")return f;if((f==null?void 0:f.type)==="SharedSlice")return{type:"Group",config:{fields:f.fields.items||{}}}})(),content:p.widget})(A);return _&&m({key:p.key,apiId:p.name,path:u,model:f,content:{...p,widget:_}})}const v=A({key:p.key,apiId:p.name,path:u,model:(()=>{var _;if((f==null?void 0:f.type)==="SharedSlice")return(_=f.fields.primary)===null||_===void 0?void 0:_[p.name];if((f==null?void 0:f.type)!=="Group")return f})(),content:p.widget});return v&&m({key:c,apiId:l,path:u,model:f,content:{...p,widget:v}})}}Tr.traverseSimpleSliceContent=a;function s(u,c){var l;const[,f]=c.key.split("$"),p=`${u.sliceName}$${f}`;return c.widget.__TYPE__==="GroupContentType"?{key:p,name:u.sliceName,maybeLabel:c.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:u.variationId,primary:{},items:c.widget.value.map(A=>({__TYPE__:"GroupItemContent",value:A.value.reduce((m,[v,_])=>{var S;return!((S=u.fields.items)===null||S===void 0)&&S[v]?m.concat([[v,_]]):m},[])}),[])}}:{key:p,name:u.sliceName,maybeLabel:c.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:u.variationId,primary:!((l=u.fields.primary)===null||l===void 0)&&l[c.name]?{[c.name]:c.widget}:{},items:[]}}}return Tr.migrateSimpleSlice=s,Tr}var kF;function cq(){return kF||(kF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SliceContent=e.SliceLegacy=void 0;const t=V,n=(0,t.__importStar)(G),r=Em(),i=$m(),o=Rm(),a=s=>({decode:u=>(()=>{switch(s.fieldType){case"Slice":return(0,r.CompositeSliceLegacy)(s);case"SharedSlice":return(0,i.SharedSliceLegacy)(s);default:return(0,o.SimpleSliceLegacy)(s)}})().decode(u),encode:u=>{switch(u.__TYPE__){case"SharedSliceContent":return(0,i.SharedSliceLegacy)(s).encode(u);case"CompositeSliceContent":return(0,r.CompositeSliceLegacy)(s).encode(u);default:return(0,o.SimpleSliceLegacy)(s).encode(u)}}});e.SliceLegacy=a,e.SliceContent=n.union([r.CompositeSliceContent,i.SharedSliceContent,o.SimpleSliceContent]),(0,t.__exportStar)(Em(),e),(0,t.__exportStar)($m(),e),(0,t.__exportStar)(Rm(),e),(0,t.__exportStar)(uq(),e)}(Db)),Db}var ln={},LF;function lq(){if(LF)return ln;LF=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.migrateSliceItem=ln.SlicesItemLegacy=ln.sliceItemContentWithDefaultValues=ln.isSimpleSliceItemContent=ln.isCompositeSliceItemContent=ln.isSharedSliceItemContent=ln.SliceItemContent=void 0;const e=V,t=ct,n=un,r=Ye,i=(0,e.__importStar)(G),o=Ze,a=Qn,s=Qa(),u=Lo(),c=W0(),l=cq(),f=Em(),p=$m(),A=Rm();ln.SliceItemContent=i.type({key:i.string,name:i.string,maybeLabel:i.union([i.string,i.undefined]),widget:l.SliceContent});function m(y){return(0,p.isSharedSliceContent)(y.widget)}ln.isSharedSliceItemContent=m;function v(y){return(0,f.isCompositeSliceContent)(y.widget)}ln.isCompositeSliceItemContent=v;function _(y){return(0,s.isGroupContent)(y.widget)||(0,u.isNestableContent)(y.widget)}ln.isSimpleSliceItemContent=_;function S(y,b){var x;if(y.type==="SharedSlice"&&(0,p.isSharedSliceContent)(b))return(0,l.sharedSliceContentWithDefaultValues)(y,b);if(y.type==="Slice"&&(0,f.isCompositeSliceContent)(b))return(0,l.compositeSliceContentWithDefaultValues)(y,b);if(y.type==="Group"&&(0,s.isGroupContent)(b)&&(!((x=y.config)===null||x===void 0)&&x.fields)){const w=(0,c.repeatableContentWithDefaultNestableContentValues)(y.config.fields,b.value);return{...b,value:w}}return b}ln.sliceItemContentWithDefaultValues=S;const I=i.exact(i.intersection([i.type({key:i.string,value:i.unknown}),i.partial({label:(0,o.nullable)(i.string)})])),T=y=>new i.Type("SlicesItemLegacy",b=>((0,p.isSharedSliceContent)(b.widget),(0,f.isCompositeSliceContent)(b.widget),(0,A.isSimpleSliceContent)(b.widget)),(b,x)=>(0,r.pipe)(I.decode(b),t.either.chain(w=>{var F;const O=w.key.indexOf("$"),M=w.key.substring(0,O>0?O:void 0),P=(0,a.getFieldCtx)(M,y),K=(0,l.SliceLegacy)(P).decode(w.value);return!K||(0,n.isLeft)(K)?i.failure(b,x):i.success({key:w.key,name:M,maybeLabel:(F=w.label)!==null&&F!==void 0?F:void 0,widget:K.right})})),b=>{const x=(0,a.getFieldCtx)(b.name,y),w=(0,l.SliceLegacy)(x).encode(b.widget);return{content:{key:b.key,label:b.maybeLabel,value:(w==null?void 0:w.content)||{}},types:(w==null?void 0:w.types)||{}}});ln.SlicesItemLegacy=T;const g=({model:y,content:b})=>v(b)&&(y==null?void 0:y.type)==="SharedSlice"?(0,f.migrateCompositeSlice)(y,b):_(b)&&(y==null?void 0:y.type)==="SharedSlice"?(0,A.migrateSimpleSlice)(y,b):b;return ln.migrateSliceItem=g,ln}var qb={},jF;function UTe(){return jF||(jF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSlices=e.slicesContentWithDefaultValues=e.SlicesContent=e.SlicesLegacy=e.isSlicesContent=e.SlicesContentType=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=ph,a=le,s=Pt(),u=Em(),c=$m(),l=Rm(),f=lq();e.SlicesContentType="SliceContentType";const p=S=>(0,s.hasContentType)(S)&&S.__TYPE__===e.SlicesContentType;e.isSlicesContent=p;const A=S=>{const I=i.array((0,f.SlicesItemLegacy)(S));return new i.Type("SlicesLegacy",e.isSlicesContent,T=>(0,r.pipe)(I.decode(T),n.either.map(g=>({__TYPE__:e.SlicesContentType,value:g}))),T=>{const g=I.encode(T.value);return{content:g.map(y=>y.content),types:g.reduce((y,b)=>({...y,...b.types}),{[S.keyOfType]:"Slices"})}})};e.SlicesLegacy=A,e.SlicesContent=i.type({__TYPE__:i.literal(e.SlicesContentType),value:i.array(f.SliceItemContent)});function m(S,I){var T;const g=(T=S==null?void 0:S.config)===null||T===void 0?void 0:T.choices;if(g===void 0)return I;const y=I.value.map(b=>{const x=g[b.name];if(x){const w=(0,f.sliceItemContentWithDefaultValues)(x,b.widget);return{...b,widget:w}}return b});return{...I,value:y}}e.slicesContentWithDefaultValues=m;function v(S,I,T){var g,y;const b=(y=(g=I==null?void 0:I.config)===null||g===void 0?void 0:g.choices)===null||y===void 0?void 0:y[T.name],x=()=>{if((0,f.isSharedSliceItemContent)(T)&&b&&(0,a.isStaticSharedSlice)(b)){const O=b.variations.find(M=>M.id===T.widget.variation);return O?{type:"SharedSlice",sliceName:b.id,variationId:O.id,fields:{primary:O.primary||{},items:O.items||{}}}:void 0}},w=()=>{var O;const M=o.ContentPath.append(o.ContentPath.serialize(S),T.name),P=Object.values(((O=I==null?void 0:I.config)===null||O===void 0?void 0:O.choices)||{}).find(Y=>{var Z;return(0,a.isStaticSharedSlice)(Y)?!!(!((Z=Y.legacyPaths)===null||Z===void 0)&&Z[M]):!1});if(!P)return;const K=P==null?void 0:P.variations.find(Y=>{var Z;return Y.id===((Z=P.legacyPaths)===null||Z===void 0?void 0:Z[M])});if(K)return{type:"SharedSlice",sliceName:P.id,variationId:K.id,fields:{primary:K.primary||{},items:K.items||{}}}},F=()=>{if(b){if((0,a.isCompositeSlice)(b))return{type:"Slice","non-repeat":b["non-repeat"]||{},repeat:b.repeat||{}};if((0,a.isLegacySlice)(b))return b}};return x()||w()||F()}function _({path:S,key:I,model:T,content:g}){return({transformWidget:y=({content:x})=>x,transformSlice:b=({content:x})=>x})=>{const x=g.value.reduce((w,F)=>{const O=T&&v(S,T,F),M=(()=>{if((0,f.isSharedSliceItemContent)(F))return(0,c.traverseSharedSliceContent)({path:S.concat({key:F.key,type:"SharedSlice"}),sliceKey:F.key,sliceName:F.name,model:(O==null?void 0:O.type)==="SharedSlice"?O:void 0,content:F})(y,b);if((0,f.isCompositeSliceItemContent)(F))return(0,u.traverseCompositeSliceContent)({path:S.concat({key:F.key,type:"Slice"}),sliceKey:F.key,sliceName:F.name,model:(O==null?void 0:O.type)==="Slice"||(O==null?void 0:O.type)==="SharedSlice"?O:void 0,content:F})(y,b);if((0,f.isSimpleSliceItemContent)(F))return(0,l.traverseSimpleSliceContent)({path:S.concat({key:F.key,type:"LegacySlice"}),sliceKey:F.key,sliceName:F.name,model:O&&(O==null?void 0:O.type)!=="Slice"?O:void 0,content:F})(y,b)})();return M?w.concat(M):w},[]);return y({path:S,key:I,apiId:I,model:T,content:{__TYPE__:g.__TYPE__,value:x}})}}e.traverseSlices=_}(qb)),qb}var UF;function fq(){return UF||(UF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=V;(0,t.__exportStar)(cq(),e),(0,t.__exportStar)(lq(),e),(0,t.__exportStar)(UTe(),e)}(Wb)),Wb}var Vb={},BF;function dq(){return BF||(BF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UIDContent=e.UIDLegacy=e.isUIDContent=e.UIDContentType=void 0;const t=V,n=ct,r=Ye,i=(0,t.__importStar)(G),o=Pt();e.UIDContentType="UIDContent";const a=u=>(0,o.hasContentType)(u)&&u.__TYPE__===e.UIDContentType;e.isUIDContent=a;const s=u=>new i.Type("UIDLegacy",e.isUIDContent,c=>(0,r.pipe)(i.string.decode(c),n.either.map(l=>e.UIDContent.encode({value:l,__TYPE__:e.UIDContentType}))),c=>({content:c.value,types:{[u.keyOfType]:"UID"}}));e.UIDLegacy=s,e.UIDContent=i.type({__TYPE__:i.literal(e.UIDContentType),value:i.string})}(Vb)),Vb}var qo={},PF;function BTe(){if(PF)return qo;PF=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.WidgetLegacy=qo.isWidgetContent=qo.WidgetContent=void 0;const t=(0,V.__importStar)(G),n=Qa(),r=Lo(),i=fq(),o=dq();qo.WidgetContent=t.union([n.GroupContent,r.NestableContent,o.UIDContent,i.SlicesContent]);const a=u=>(0,n.isGroupContent)(u)||(0,r.isNestableContent)(u)||(0,o.isUIDContent)(u)||(0,i.isSlicesContent)(u);qo.isWidgetContent=a;const s=u=>({decode(c){if(!u.fieldType)return;const l=(()=>{switch(u.fieldType){case"UID":return(0,o.UIDLegacy)(u);case"Group":return(0,n.GroupLegacy)(u);case"Choice":case"Slices":return(0,i.SlicesLegacy)(u);default:return(0,r.NestableLegacy)(u)}})();if(l)return l.decode(c)},encode(c){switch(c.__TYPE__){case o.UIDContentType:return(0,o.UIDLegacy)(u).encode(c);case n.GroupContentType:return(0,n.GroupLegacy)(u).encode(c);case i.SlicesContentType:return(0,i.SlicesLegacy)(u).encode(c);default:return(0,r.NestableLegacy)(u).encode(c)}}});return qo.WidgetLegacy=s,qo}var WF;function xR(){return WF||(WF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=V;(0,t.__exportStar)(eq(),e),(0,t.__exportStar)(Qa(),e),(0,t.__exportStar)(Lo(),e),(0,t.__exportStar)(fq(),e),(0,t.__exportStar)(dq(),e),(0,t.__exportStar)(BTe(),e)}(yb)),yb}Object.defineProperty(ir,"__esModule",{value:!0});ir.migrateDocument=ir.collectWidgets=ir.traverseDocument=ir.fillDocumentWithDefaultValues=ir.DocumentLegacy=ir.Document=void 0;const PTe=V,pq=ct,wR=un,Aq=Ye,Rl=(0,PTe.__importStar)(G),hq=ph,ER=kc,Ol=le,Si=xR(),X1=Qn;ir.Document=Rl.record(ER.WidgetKey,Si.WidgetContent);const WTe=Rl.record(ER.WidgetKey,Rl.unknown),$R=e=>new Rl.Type("Document",t=>!!t&&typeof t=="object",t=>(0,Aq.pipe)(WTe.decode(t),pq.either.map(n=>Object.entries(n).reduce((r,[i,o])=>{const a=(0,X1.defaultCtx)(i,e),s=(0,Si.WidgetLegacy)(a).decode(o);return!s||(0,wR.isLeft)(s)?r:{...r,[i]:s.right}},{}))),t=>Object.entries(t).reduce((n,[r,i])=>{const o=(0,X1.defaultCtx)(r,e),a=(0,Si.WidgetLegacy)(o).encode(i);return a?{content:{...n.content,[r]:a.content},types:{...n.types,...a.types}}:n},{content:{},types:{}}));function mq(e){const t=Object.entries(e),{types:n,widgets:r}=t.reduce((a,[s,u])=>{if(s.endsWith("_TYPE")){const c=X1.FieldOrSliceType.decode(u);if((0,wR.isRight)(c))return{...a,types:a.types.set(s.substring(0,s.length-5),c.right)}}return!s.endsWith("_POSITION")&&!s.endsWith("_TYPE")?{...a,widgets:{...a.widgets,[s]:u}}:a},{types:new Map,widgets:{}}),i=e.slugs_INTERNAL||[],o=e.uid;return{widgets:r,types:n,uid:o,slugs:i}}function DTe(e,t){const n=(0,Aq.pipe)(Rl.record(ER.WidgetKey,Rl.unknown).decode(e),pq.either.chain(r=>{const{types:i,widgets:o}=mq(r);return $R(i).decode(o)}));return(0,wR.isLeft)(n)?void 0:gq(n.right,t)}function KTe(e){const t=$R().encode(e);return{...t.content,...t.types}}ir.DocumentLegacy={_codec:$R,extractMetadata:mq,parse:DTe,encode:KTe};function RR(e){return{customTypeId:e==null?void 0:e.id,fields:Object.fromEntries((0,Ol.flattenSections)(e))}}function NTe(e,t){const{fields:n}=e&&Ol.StaticCustomType.is(e)?RR(e):e;return Object.entries(n).reduce((r,[i,o])=>{const a=t[i],s=(()=>{switch(o.type){case"Group":return(0,Si.isGroupContent)(a)?(0,Si.groupContentWithDefaultValues)(o,a):a;case"Choice":case"Slices":return(0,Si.isSlicesContent)(a)?(0,Si.slicesContentWithDefaultValues)(o,a):a;default:return a===void 0&&Ol.NestableWidget.is(o)?(0,Si.NestableContentDefaultValue)(o):a}})();return s?{...r,[i]:s}:r},t)}ir.fillDocumentWithDefaultValues=NTe;function OR({document:e,customType:t}){const n=t&&Ol.StaticCustomType.is(t)?RR(t):t;return({transformWidget:r=({content:o})=>o,transformSlice:i=({content:o})=>o})=>{const o=n&&Object.entries(n.fields).reduce((a,[s,u])=>({...a,[s]:u}),{});return Object.entries(e).reduce((a,[s,u])=>{const c=o&&o[s],l=hq.ContentPath.make([{key:n==null?void 0:n.customTypeId,type:"CustomType"},{key:s,type:"Widget"}]),f=(()=>{switch(u.__TYPE__){case"SliceContentType":return(0,Si.traverseSlices)({path:l,key:s,model:(c==null?void 0:c.type)==="Slices"||(c==null?void 0:c.type)==="Choice"?c:void 0,content:u})({transformWidget:r,transformSlice:i});case"GroupContentType":return(0,Si.traverseGroupContent)({path:l,key:s,apiId:s,model:(c==null?void 0:c.type)==="Group"?c:void 0,content:u})(r);default:return r({path:l,key:s,apiId:s,model:(c==null?void 0:c.type)!=="Group"&&(c==null?void 0:c.type)!=="Slices"&&(c==null?void 0:c.type)!=="Choice"?c:void 0,content:u})}})();return{...a,...f?{[s]:f}:{}}},{})}}ir.traverseDocument=OR;function qTe(e,t){const n={};return OR({document:e})({transformWidget:({content:r,path:i})=>{const o=hq.ContentPath.serialize(i);return t(r,i)&&(n[o]=r),r}}),n}ir.collectWidgets=qTe;function gq(e,t){const n=Ol.StaticCustomType.is(t)?RR(t):t;return Object.values((0,Ol.collectSharedSlices)(n)).some(i=>!!i.legacyPaths)?OR({document:e,customType:t})({transformSlice:Si.migrateSliceItem}):e}ir.migrateDocument=gq;(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=V;(0,t.__exportStar)(ir,e),(0,t.__exportStar)(xR(),e),(0,t.__exportStar)(Qn,e)})(ke);function VTe(e,t){const n=QTe(e,t),r=zTe(e,n);return ke.fillDocumentWithDefaultValues(e,r)}function QTe(e,t){return le.flattenSections(e).reduce((r,[i,o])=>!t[i]&&o.type==="Group"?{...r,[i]:vq}:r,t)}function zTe(e,t){return ke.traverseDocument({document:t,customType:e})({transformWidget({model:n,content:r}){return n?r:void 0},transformSlice(n){return n.model?n.content:void 0}})}const vq={__TYPE__:"GroupContentType",value:[{__TYPE__:"GroupItemContent",value:[]}]},yq={unclassified:{title:"Draft",color:"amber"},published:{title:"Live",color:"green"},release:{title:"Planned",color:"purple"},archived:{title:"Archived",color:"grey"}},bq={unclassified:["unclassified","published"],archived:["unclassified","published"],release:["release","published"],published:["published"]};function FR(e){const{documentId:t,versionId:n,baseUrl:r,status:i,releaseId:o}=e,a={s:i,v:n,r:o},s=Fr.createRouteParams({params:a}),u=new URLSearchParams(s).toString();return new URL(`pages/${t}?${u}`,r)}const HTe="media-library-",DF=`${HTe}newMediaLibraryFeaturesBannerClosed`;function Cq(e){const{maxWidth:t}=e,[n,r]=E.useState(()=>!(Sd.localStorage.isAvailable()&&Sd.localStorage.read(DF)));function i(){r(!1),Sd.localStorage.isAvailable()&&Sd.localStorage.write(DF,String(Date.now()))}return n?d.jsx(h.Box,{justifyContent:"center",padding:{inline:16,block:12},backgroundColor:"purple9",children:d.jsxs(h.Box,{maxWidth:t,width:"100%",alignItems:"center",gap:8,children:[d.jsx(h.Box,{borderRadius:"100%",alignItems:"center",justifyContent:"center",width:28,height:28,border:!0,borderColor:"purple8",flexShrink:0,children:d.jsx(h.Icon,{name:"autoFixHigh",color:"white",size:"small"})}),d.jsxs("div",{children:[d.jsx(h.Text,{color:"white",variant:"bold",children:"New features on the Media Library now available!"}),d.jsxs(h.Box,{gap:4,flexWrap:"wrap",children:[d.jsx(h.Text,{color:"white",children:"Media Tagging, Filtering, Improved Search & Bulk Deletion"}),d.jsx(h.Text,{color:"white",variant:"bold",href:"https://prismic.io/lp/new-media-library",target:"_blank",rel:"noopener noreferrer",underline:!0,children:"Find out More →"})]})]}),d.jsx(h.Button,{invisible:!0,color:"white",sx:{marginLeft:"auto",marginBottom:"auto",flexShrink:0},underline:!0,onClick:i,children:"Close"})]})}):null}const Sq=E.createContext(void 0),YTe={selectedIds:new Set,excludedIds:new Set,isAllSelected:!1};function _q(e){const{children:t,initialTotalItemCount:n,isSelectAllEnabled:r=!1}=e,[i,o]=E.useState(YTe),a=E.useRef(),s=E.useRef(n||0),u=E.useMemo(()=>{const{selectedIds:y,excludedIds:b,isAllSelected:x}=i;return x?s.current-b.size:y.size},[i]),c=E.useCallback(y=>{const{isAllSelected:b,selectedIds:x,excludedIds:w}=i;return b?!w.has(y):x.has(y)},[i]),l=Qe.useStableCallback(()=>{const{isAllSelected:y,selectedIds:b,excludedIds:x}=i;return{selectedIds:[...b],excludedIds:[...x],isAllSelected:y,selectedCount:u}}),f=Qe.useStableCallback(()=>{r&&o({isAllSelected:!0,selectedIds:new Set,excludedIds:new Set})}),p=Qe.useStableCallback(()=>{o({isAllSelected:!1,selectedIds:new Set,excludedIds:new Set})});E.useEffect(()=>{const{isAllSelected:y,selectedIds:b,excludedIds:x}=i,w=s.current;if(!(w===0||!r)){if(y&&x.size===w){p();return}if(!y&&b.size===w){f();return}}},[i,r,f,p]);const A=Qe.useStableCallback(y=>{const{id:b,isSingleSelection:x,metaKey:w,shiftKey:F,ids:O}=y;return F&&O&&O.length>0&&a.current?v(b,O,a.current):x&&!w?m(b):c(b)?I([b]):S([b]),a.current=b,c(b)});function m(y){c(y)&&u===1?o(b=>({...b,selectedIds:new Set})):o({isAllSelected:!1,selectedIds:new Set([y]),excludedIds:new Set})}function v(y,b,x){const w=GTe(b,x,y),F=c(y);return F?I(w):S(w),F}const _=Qe.useStableCallback(()=>{u>0?p():f()});function S(y){const{isAllSelected:b}=i;if(b){o(x=>({...x,excludedIds:KF(x.excludedIds,y)}));return}o(x=>({...x,selectedIds:NF(x.selectedIds,y)}))}function I(y){const{isAllSelected:b}=i;if(b){o(x=>({...x,excludedIds:NF(x.excludedIds,y)}));return}o(x=>({...x,selectedIds:KF(x.selectedIds,y)}))}function T(y){s.current=y}const g=E.useMemo(()=>({selectedCount:u,state:i,totalItemCount:s.current,isSelected:c,isSelectAllEnabled:r,getSelectionState:l,toggleSelection:A,toggleSelectAll:_,clearSelection:p,setTotalItemCount:T}),[i,p,l,r,c,u,_,A]);return d.jsx(Sq.Provider,{value:g,children:t})}function Vs(e){const t=E.useContext(Sq);if(t===void 0)throw new Error("useSelectionManagerContext must be used within a SelectionManagerProvider");const{totalItemCount:n,onChangeSelection:r}=e||{},{setTotalItemCount:i,totalItemCount:o,state:a,getSelectionState:s,...u}=t;n!==void 0&&n!==o&&i(n);const c=Qe.useStableCallback(r);return E.useEffect(()=>{c==null||c(s())},[s,c,a]),{...u,getSelectionState:s,isAllSelected:a.isAllSelected}}function GTe(e,t,n){const r=e.indexOf(t),i=e.indexOf(n);if(r===-1||i===-1)throw new Error("Both startValue and endValue must be in the array");return r<=i?e.slice(r,i+1):e.slice(i,r+1)}function KF(e,t){const n=new Set(e);return t.forEach(r=>n.delete(r)),n}function NF(e,t){return new Set([...e,...t])}const D0=E.createContext(void 0);function Oe(){const e=E.useContext(D0);if(!e)throw new Error("Missing EditorConfigContext.Provider");return e}class eC extends Error{}function Pn(e){throw new eC(`Missing EditorConfig.${e}`)}function JTe(){if(new URL(location.href).searchParams.has("debug"))return;const n=console.error.bind(console);console.error=(...r)=>{r[0]instanceof eC||ZTe(r)||n(...r)},window.addEventListener("error",r=>{r.error instanceof eC&&r.preventDefault(),XTe(r.error)&&r.preventDefault()})}function ZTe(e){const t="Warning: flushSync was called from inside a lifecycle method",n=typeof e[0]=="string"&&e[0].includes(t),r=typeof e[1]=="string"&&e[1].includes("RichTextField");return n&&r}function XTe(e){const t=/Invalid content for node document: <(bulletList|orderedList)\(listItem*/,n=e.message;return!!(typeof n=="string"&&n.match(t))}const exe="https://prismic.io/docs/guides/manage-images#supported-media";var ze;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(ze||(ze={}));var tC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(tC||(tC={}));const ee=ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xa=e=>{switch(typeof e){case"undefined":return ee.undefined;case"string":return ee.string;case"number":return isNaN(e)?ee.nan:ee.number;case"boolean":return ee.boolean;case"function":return ee.function;case"bigint":return ee.bigint;case"symbol":return ee.symbol;case"object":return Array.isArray(e)?ee.array:e===null?ee.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ee.promise:typeof Map<"u"&&e instanceof Map?ee.map:typeof Set<"u"&&e instanceof Set?ee.set:typeof Date<"u"&&e instanceof Date?ee.date:ee.object;default:return ee.unknown}},H=ze.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),txe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class wi extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,u=0;for(;u<a.path.length;){const c=a.path[u];u===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],u++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,ze.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}wi.create=e=>new wi(e);const np=(e,t)=>{let n;switch(e.code){case H.invalid_type:e.received===ee.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case H.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ze.jsonStringifyReplacer)}`;break;case H.unrecognized_keys:n=`Unrecognized key(s) in object: ${ze.joinValues(e.keys,", ")}`;break;case H.invalid_union:n="Invalid input";break;case H.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ze.joinValues(e.options)}`;break;case H.invalid_enum_value:n=`Invalid enum value. Expected ${ze.joinValues(e.options)}, received '${e.received}'`;break;case H.invalid_arguments:n="Invalid function arguments";break;case H.invalid_return_type:n="Invalid function return type";break;case H.invalid_date:n="Invalid date";break;case H.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ze.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case H.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case H.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case H.custom:n="Invalid input";break;case H.invalid_intersection_types:n="Intersection results could not be merged";break;case H.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case H.not_finite:n="Number must be finite";break;default:n=t.defaultError,ze.assertNever(e)}return{message:n}};let Iq=np;function nxe(e){Iq=e}function Om(){return Iq}const Fm=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};let s="";const u=r.filter(c=>!!c).slice().reverse();for(const c of u)s=c(a,{data:t,defaultError:s}).message;return{...i,path:o,message:i.message||s}},rxe=[];function ne(e,t){const n=Fm({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Om(),np].filter(r=>!!r)});e.common.issues.push(n)}class kn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return _e;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return kn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return _e;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const _e=Object.freeze({status:"aborted"}),Tq=e=>({status:"dirty",value:e}),Hn=e=>({status:"valid",value:e}),nC=e=>e.status==="aborted",rC=e=>e.status==="dirty",Mm=e=>e.status==="valid",km=e=>typeof Promise<"u"&&e instanceof Promise;var de;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(de||(de={}));class po{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const qF=(e,t)=>{if(Mm(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new wi(e.common.issues);return this._error=n,this._error}}};function we(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}class Me{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Xa(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Xa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new kn,ctx:{common:t.parent.common,data:t.data,parsedType:Xa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(km(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xa(t)},o=this._parseSync({data:t,path:i.path,parent:i});return qF(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xa(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(km(i)?i:Promise.resolve(i));return qF(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:H.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new ki({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return ea.create(this,this._def)}nullable(){return ku.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ei.create(this,this._def)}promise(){return Ml.create(this,this._def)}or(t){return ap.create([this,t],this._def)}and(t){return sp.create(this,t,this._def)}transform(t){return new ki({...we(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new dp({...we(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new wq({typeName:ve.ZodBranded,type:this,...we(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Bm({...we(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ch.create(this,t)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ixe=/^c[^\s-]{8,}$/i,oxe=/^[a-z][a-z0-9]*$/,axe=/[0-9A-HJKMNP-TV-Z]{26}/,sxe=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,uxe=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,cxe=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),lxe=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,fxe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,dxe=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function pxe(e,t){return!!((t==="v4"||!t)&&lxe.test(e)||(t==="v6"||!t)&&fxe.test(e))}class Ti extends Me{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(i=>t.test(i),{validation:n,code:H.invalid_string,...de.errToObj(r)}),this.nonempty=t=>this.min(1,de.errToObj(t)),this.trim=()=>new Ti({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new Ti({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new Ti({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ee.string){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_type,expected:ee.string,received:o.parsedType}),_e}const r=new kn;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),ne(i,{code:H.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),ne(i,{code:H.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(t,i),a?ne(i,{code:H.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&ne(i,{code:H.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")uxe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"email",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")cxe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"emoji",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")sxe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"uuid",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")ixe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"cuid",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")oxe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"cuid2",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")axe.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"ulid",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),ne(i,{validation:"url",code:H.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"regex",code:H.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),ne(i,{code:H.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),ne(i,{code:H.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),ne(i,{code:H.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?dxe(o).test(t.data)||(i=this._getOrReturnCtx(t,i),ne(i,{code:H.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?pxe(t.data,o.version)||(i=this._getOrReturnCtx(t,i),ne(i,{validation:"ip",code:H.invalid_string,message:o.message}),r.dirty()):ze.assertNever(o);return{status:r.value,value:t.data}}_addCheck(t){return new Ti({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...de.errToObj(t)})}url(t){return this._addCheck({kind:"url",...de.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...de.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...de.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...de.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...de.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...de.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...de.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...de.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...de.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...de.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...de.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...de.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...de.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...de.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...de.errToObj(n)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ti.create=e=>{var t;return new Ti({checks:[],typeName:ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...we(e)})};function Axe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class fs extends Me{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ee.number){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_type,expected:ee.number,received:o.parsedType}),_e}let r;const i=new kn;for(const o of this._def.checks)o.kind==="int"?ze.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ne(r,{code:H.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Axe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ne(r,{code:H.not_finite,message:o.message}),i.dirty()):ze.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,de.toString(n))}gt(t,n){return this.setLimit("min",t,!1,de.toString(n))}lte(t,n){return this.setLimit("max",t,!0,de.toString(n))}lt(t,n){return this.setLimit("max",t,!1,de.toString(n))}setLimit(t,n,r,i){return new fs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:de.toString(i)}]})}_addCheck(t){return new fs({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:de.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:de.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:de.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:de.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:de.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:de.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:de.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:de.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:de.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ze.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}fs.create=e=>new fs({checks:[],typeName:ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...we(e)});class ds extends Me{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ee.bigint){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_type,expected:ee.bigint,received:o.parsedType}),_e}let r;const i=new kn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:H.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):ze.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,de.toString(n))}gt(t,n){return this.setLimit("min",t,!1,de.toString(n))}lte(t,n){return this.setLimit("max",t,!0,de.toString(n))}lt(t,n){return this.setLimit("max",t,!1,de.toString(n))}setLimit(t,n,r,i){return new ds({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:de.toString(i)}]})}_addCheck(t){return new ds({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:de.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:de.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:de.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:de.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:de.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ds.create=e=>{var t;return new ds({checks:[],typeName:ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...we(e)})};class rp extends Me{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ee.boolean){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.boolean,received:r.parsedType}),_e}return Hn(t.data)}}rp.create=e=>new rp({typeName:ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...we(e)});class Fu extends Me{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ee.date){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_type,expected:ee.date,received:o.parsedType}),_e}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ne(o,{code:H.invalid_date}),_e}const r=new kn;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),ne(i,{code:H.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),ne(i,{code:H.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):ze.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Fu({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:de.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:de.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Fu.create=e=>new Fu({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ve.ZodDate,...we(e)});class Lm extends Me{_parse(t){if(this._getType(t)!==ee.symbol){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.symbol,received:r.parsedType}),_e}return Hn(t.data)}}Lm.create=e=>new Lm({typeName:ve.ZodSymbol,...we(e)});class ip extends Me{_parse(t){if(this._getType(t)!==ee.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.undefined,received:r.parsedType}),_e}return Hn(t.data)}}ip.create=e=>new ip({typeName:ve.ZodUndefined,...we(e)});class op extends Me{_parse(t){if(this._getType(t)!==ee.null){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.null,received:r.parsedType}),_e}return Hn(t.data)}}op.create=e=>new op({typeName:ve.ZodNull,...we(e)});class Fl extends Me{constructor(){super(...arguments),this._any=!0}_parse(t){return Hn(t.data)}}Fl.create=e=>new Fl({typeName:ve.ZodAny,...we(e)});class du extends Me{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Hn(t.data)}}du.create=e=>new du({typeName:ve.ZodUnknown,...we(e)});class oa extends Me{_parse(t){const n=this._getOrReturnCtx(t);return ne(n,{code:H.invalid_type,expected:ee.never,received:n.parsedType}),_e}}oa.create=e=>new oa({typeName:ve.ZodNever,...we(e)});class jm extends Me{_parse(t){if(this._getType(t)!==ee.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.void,received:r.parsedType}),_e}return Hn(t.data)}}jm.create=e=>new jm({typeName:ve.ZodVoid,...we(e)});class Ei extends Me{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ee.array)return ne(n,{code:H.invalid_type,expected:ee.array,received:n.parsedType}),_e;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(a||s)&&(ne(n,{code:a?H.too_big:H.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ne(n,{code:H.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ne(n,{code:H.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new po(n,a,n.path,s)))).then(a=>kn.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new po(n,a,n.path,s)));return kn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Ei({...this._def,minLength:{value:t,message:de.toString(n)}})}max(t,n){return new Ei({...this._def,maxLength:{value:t,message:de.toString(n)}})}length(t,n){return new Ei({...this._def,exactLength:{value:t,message:de.toString(n)}})}nonempty(t){return this.min(1,t)}}Ei.create=(e,t)=>new Ei({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...we(t)});function tl(e){if(e instanceof Ct){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ea.create(tl(r))}return new Ct({...e._def,shape:()=>t})}else return e instanceof Ei?new Ei({...e._def,type:tl(e.element)}):e instanceof ea?ea.create(tl(e.unwrap())):e instanceof ku?ku.create(tl(e.unwrap())):e instanceof Ao?Ao.create(e.items.map(t=>tl(t))):e}class Ct extends Me{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ze.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ee.object){const c=this._getOrReturnCtx(t);return ne(c,{code:H.invalid_type,expected:ee.object,received:c.parsedType}),_e}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof oa&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||s.push(c);const u=[];for(const c of a){const l=o[c],f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new po(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof oa){const c=this._def.unknownKeys;if(c==="passthrough")for(const l of s)u.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(c==="strict")s.length>0&&(ne(i,{code:H.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const l of s){const f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new po(i,f,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const l of u){const f=await l.key;c.push({key:f,value:await l.value,alwaysSet:l.alwaysSet})}return c}).then(c=>kn.mergeObjectSync(r,c)):kn.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return de.errToObj,new Ct({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=de.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new Ct({...this._def,unknownKeys:"strip"})}passthrough(){return new Ct({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ct({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ct({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ct({...this._def,catchall:t})}pick(t){const n={};return ze.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ct({...this._def,shape:()=>n})}omit(t){const n={};return ze.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Ct({...this._def,shape:()=>n})}deepPartial(){return tl(this)}partial(t){const n={};return ze.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Ct({...this._def,shape:()=>n})}required(t){const n={};return ze.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof ea;)o=o._def.innerType;n[r]=o}}),new Ct({...this._def,shape:()=>n})}keyof(){return xq(ze.objectKeys(this.shape))}}Ct.create=(e,t)=>new Ct({shape:()=>e,unknownKeys:"strip",catchall:oa.create(),typeName:ve.ZodObject,...we(t)});Ct.strictCreate=(e,t)=>new Ct({shape:()=>e,unknownKeys:"strict",catchall:oa.create(),typeName:ve.ZodObject,...we(t)});Ct.lazycreate=(e,t)=>new Ct({shape:e,unknownKeys:"strip",catchall:oa.create(),typeName:ve.ZodObject,...we(t)});class ap extends Me{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new wi(s.ctx.common.issues));return ne(n,{code:H.invalid_union,unionErrors:a}),_e}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const u of r){const c={...n,common:{...n.common,issues:[]},parent:null},l=u._parseSync({data:n.data,path:n.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(u=>new wi(u));return ne(n,{code:H.invalid_union,unionErrors:s}),_e}}get options(){return this._def.options}}ap.create=(e,t)=>new ap({options:e,typeName:ve.ZodUnion,...we(t)});const nm=e=>e instanceof cp?nm(e.schema):e instanceof ki?nm(e.innerType()):e instanceof lp?[e.value]:e instanceof ps?e.options:e instanceof fp?Object.keys(e.enum):e instanceof dp?nm(e._def.innerType):e instanceof ip?[void 0]:e instanceof op?[null]:null;class K0 extends Me{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.object)return ne(n,{code:H.invalid_type,expected:ee.object,received:n.parsedType}),_e;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(ne(n,{code:H.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),_e)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=nm(o.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new K0({typeName:ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...we(r)})}}function iC(e,t){const n=Xa(e),r=Xa(t);if(e===t)return{valid:!0,data:e};if(n===ee.object&&r===ee.object){const i=ze.objectKeys(t),o=ze.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const u=iC(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(n===ee.array&&r===ee.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const a=e[o],s=t[o],u=iC(a,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===ee.date&&r===ee.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class sp extends Me{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,a)=>{if(nC(o)||nC(a))return _e;const s=iC(o.value,a.value);return s.valid?((rC(o)||rC(a))&&n.dirty(),{status:n.value,value:s.data}):(ne(r,{code:H.invalid_intersection_types}),_e)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}sp.create=(e,t,n)=>new sp({left:e,right:t,typeName:ve.ZodIntersection,...we(n)});class Ao extends Me{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.array)return ne(r,{code:H.invalid_type,expected:ee.array,received:r.parsedType}),_e;if(r.data.length<this._def.items.length)return ne(r,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_e;!this._def.rest&&r.data.length>this._def.items.length&&(ne(r,{code:H.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new po(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>kn.mergeArray(n,a)):kn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ao({...this._def,rest:t})}}Ao.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ao({items:e,typeName:ve.ZodTuple,rest:null,...we(t)})};class up extends Me{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.object)return ne(r,{code:H.invalid_type,expected:ee.object,received:r.parsedType}),_e;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new po(r,s,r.path,s)),value:a._parse(new po(r,r.data[s],r.path,s))});return r.common.async?kn.mergeObjectAsync(n,i):kn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Me?new up({keyType:t,valueType:n,typeName:ve.ZodRecord,...we(r)}):new up({keyType:Ti.create(),valueType:t,typeName:ve.ZodRecord,...we(n)})}}class Um extends Me{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.map)return ne(r,{code:H.invalid_type,expected:ee.map,received:r.parsedType}),_e;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,u],c)=>({key:i._parse(new po(r,s,r.path,[c,"key"])),value:o._parse(new po(r,u,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of a){const c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return _e;(c.status==="dirty"||l.status==="dirty")&&n.dirty(),s.set(c.value,l.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of a){const c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return _e;(c.status==="dirty"||l.status==="dirty")&&n.dirty(),s.set(c.value,l.value)}return{status:n.value,value:s}}}}Um.create=(e,t,n)=>new Um({valueType:t,keyType:e,typeName:ve.ZodMap,...we(n)});class Mu extends Me{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.set)return ne(r,{code:H.invalid_type,expected:ee.set,received:r.parsedType}),_e;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(ne(r,{code:H.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(ne(r,{code:H.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(u){const c=new Set;for(const l of u){if(l.status==="aborted")return _e;l.status==="dirty"&&n.dirty(),c.add(l.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((u,c)=>o._parse(new po(r,u,r.path,c)));return r.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,n){return new Mu({...this._def,minSize:{value:t,message:de.toString(n)}})}max(t,n){return new Mu({...this._def,maxSize:{value:t,message:de.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Mu.create=(e,t)=>new Mu({valueType:e,minSize:null,maxSize:null,typeName:ve.ZodSet,...we(t)});class dl extends Me{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.function)return ne(n,{code:H.invalid_type,expected:ee.function,received:n.parsedType}),_e;function r(s,u){return Fm({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Om(),np].filter(c=>!!c),issueData:{code:H.invalid_arguments,argumentsError:u}})}function i(s,u){return Fm({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Om(),np].filter(c=>!!c),issueData:{code:H.invalid_return_type,returnTypeError:u}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;return this._def.returns instanceof Ml?Hn(async(...s)=>{const u=new wi([]),c=await this._def.args.parseAsync(s,o).catch(p=>{throw u.addIssue(r(s,p)),u}),l=await a(...c);return await this._def.returns._def.type.parseAsync(l,o).catch(p=>{throw u.addIssue(i(l,p)),u})}):Hn((...s)=>{const u=this._def.args.safeParse(s,o);if(!u.success)throw new wi([r(s,u.error)]);const c=a(...u.data),l=this._def.returns.safeParse(c,o);if(!l.success)throw new wi([i(c,l.error)]);return l.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new dl({...this._def,args:Ao.create(t).rest(du.create())})}returns(t){return new dl({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new dl({args:t||Ao.create([]).rest(du.create()),returns:n||du.create(),typeName:ve.ZodFunction,...we(r)})}}class cp extends Me{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}cp.create=(e,t)=>new cp({getter:e,typeName:ve.ZodLazy,...we(t)});class lp extends Me{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ne(n,{received:n.data,code:H.invalid_literal,expected:this._def.value}),_e}return{status:"valid",value:t.data}}get value(){return this._def.value}}lp.create=(e,t)=>new lp({value:e,typeName:ve.ZodLiteral,...we(t)});function xq(e,t){return new ps({values:e,typeName:ve.ZodEnum,...we(t)})}class ps extends Me{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{expected:ze.joinValues(r),received:n.parsedType,code:H.invalid_type}),_e}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{received:n.data,code:H.invalid_enum_value,options:r}),_e}return Hn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return ps.create(t)}exclude(t){return ps.create(this.options.filter(n=>!t.includes(n)))}}ps.create=xq;class fp extends Me{_parse(t){const n=ze.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ee.string&&r.parsedType!==ee.number){const i=ze.objectValues(n);return ne(r,{expected:ze.joinValues(i),received:r.parsedType,code:H.invalid_type}),_e}if(n.indexOf(t.data)===-1){const i=ze.objectValues(n);return ne(r,{received:r.data,code:H.invalid_enum_value,options:i}),_e}return Hn(t.data)}get enum(){return this._def.values}}fp.create=(e,t)=>new fp({values:e,typeName:ve.ZodNativeEnum,...we(t)});class Ml extends Me{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.promise&&n.common.async===!1)return ne(n,{code:H.invalid_type,expected:ee.promise,received:n.parsedType}),_e;const r=n.parsedType===ee.promise?n.data:Promise.resolve(n.data);return Hn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ml.create=(e,t)=>new Ml({type:e,typeName:ve.ZodPromise,...we(t)});class ki extends Me{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null;if(i.type==="preprocess"){const a=i.transform(r.data);return r.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}const o={addIssue:a=>{ne(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="refinement"){const a=s=>{const u=i.refinement(s,o);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?_e:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?_e:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Mm(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Mm(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);ze.assertNever(i)}}ki.create=(e,t,n)=>new ki({schema:e,typeName:ve.ZodEffects,effect:t,...we(n)});ki.createWithPreprocess=(e,t,n)=>new ki({schema:t,effect:{type:"preprocess",transform:e},typeName:ve.ZodEffects,...we(n)});class ea extends Me{_parse(t){return this._getType(t)===ee.undefined?Hn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ea.create=(e,t)=>new ea({innerType:e,typeName:ve.ZodOptional,...we(t)});class ku extends Me{_parse(t){return this._getType(t)===ee.null?Hn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ku.create=(e,t)=>new ku({innerType:e,typeName:ve.ZodNullable,...we(t)});class dp extends Me{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ee.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}dp.create=(e,t)=>new dp({innerType:e,typeName:ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...we(t)});class Bm extends Me{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return km(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new wi(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new wi(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Bm.create=(e,t)=>new Bm({innerType:e,typeName:ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...we(t)});class Pm extends Me{_parse(t){if(this._getType(t)!==ee.nan){const r=this._getOrReturnCtx(t);return ne(r,{code:H.invalid_type,expected:ee.nan,received:r.parsedType}),_e}return{status:"valid",value:t.data}}}Pm.create=e=>new Pm({typeName:ve.ZodNaN,...we(e)});const hxe=Symbol("zod_brand");class wq extends Me{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ch extends Me{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?_e:o.status==="dirty"?(n.dirty(),Tq(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?_e:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new Ch({in:t,out:n,typeName:ve.ZodPipeline})}}const Eq=(e,t={},n)=>e?Fl.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,c=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...c,fatal:u})}}):Fl.create(),mxe={object:Ct.lazycreate};var ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"})(ve||(ve={}));const gxe=(e,t={message:`Input not instance of ${e.name}`})=>Eq(n=>n instanceof e,t),Go=Ti.create,Wm=fs.create,vxe=Pm.create,yxe=ds.create,$q=rp.create,bxe=Fu.create,Cxe=Lm.create,Sxe=ip.create,_xe=op.create,Ixe=Fl.create,Txe=du.create,xxe=oa.create,wxe=jm.create,Rq=Ei.create,pp=Ct.create,Exe=Ct.strictCreate,$xe=ap.create,Rxe=K0.create,Oxe=sp.create,Fxe=Ao.create,Mxe=up.create,kxe=Um.create,Lxe=Mu.create,jxe=dl.create,Uxe=cp.create,Bxe=lp.create,Pxe=ps.create,Wxe=fp.create,Dxe=Ml.create,VF=ki.create,Kxe=ea.create,Nxe=ku.create,qxe=ki.createWithPreprocess,Vxe=Ch.create,Qxe=()=>Go().optional(),zxe=()=>Wm().optional(),Hxe=()=>$q().optional(),Yxe={string:e=>Ti.create({...e,coerce:!0}),number:e=>fs.create({...e,coerce:!0}),boolean:e=>rp.create({...e,coerce:!0}),bigint:e=>ds.create({...e,coerce:!0}),date:e=>Fu.create({...e,coerce:!0})},Gxe=_e;var B=Object.freeze({__proto__:null,defaultErrorMap:np,setErrorMap:nxe,getErrorMap:Om,makeIssue:Fm,EMPTY_PATH:rxe,addIssueToContext:ne,ParseStatus:kn,INVALID:_e,DIRTY:Tq,OK:Hn,isAborted:nC,isDirty:rC,isValid:Mm,isAsync:km,get util(){return ze},get objectUtil(){return tC},ZodParsedType:ee,getParsedType:Xa,ZodType:Me,ZodString:Ti,ZodNumber:fs,ZodBigInt:ds,ZodBoolean:rp,ZodDate:Fu,ZodSymbol:Lm,ZodUndefined:ip,ZodNull:op,ZodAny:Fl,ZodUnknown:du,ZodNever:oa,ZodVoid:jm,ZodArray:Ei,ZodObject:Ct,ZodUnion:ap,ZodDiscriminatedUnion:K0,ZodIntersection:sp,ZodTuple:Ao,ZodRecord:up,ZodMap:Um,ZodSet:Mu,ZodFunction:dl,ZodLazy:cp,ZodLiteral:lp,ZodEnum:ps,ZodNativeEnum:fp,ZodPromise:Ml,ZodEffects:ki,ZodTransformer:ki,ZodOptional:ea,ZodNullable:ku,ZodDefault:dp,ZodCatch:Bm,ZodNaN:Pm,BRAND:hxe,ZodBranded:wq,ZodPipeline:Ch,custom:Eq,Schema:Me,ZodSchema:Me,late:mxe,get ZodFirstPartyTypeKind(){return ve},coerce:Yxe,any:Ixe,array:Rq,bigint:yxe,boolean:$q,date:bxe,discriminatedUnion:Rxe,effect:VF,enum:Pxe,function:jxe,instanceof:gxe,intersection:Oxe,lazy:Uxe,literal:Bxe,map:kxe,nan:vxe,nativeEnum:Wxe,never:xxe,null:_xe,nullable:Nxe,number:Wm,object:pp,oboolean:Hxe,onumber:zxe,optional:Kxe,ostring:Qxe,pipeline:Vxe,preprocess:qxe,promise:Dxe,record:Mxe,set:Lxe,strictObject:Exe,string:Go,symbol:Cxe,transformer:VF,tuple:Fxe,undefined:Sxe,union:$xe,unknown:Txe,void:wxe,NEVER:Gxe,ZodIssueCode:H,quotelessJson:txe,ZodError:wi});const Jxe=B.object({id:B.string(),label:B.string(),repeatable:B.boolean(),status:B.boolean()}),Zxe=B.array(Jxe);function Oq(e,t,n){return xe.request(new URL("customtypes",e),{headers:{repository:t},credentials:xe.getRequestCredentials(n),okType:Zxe})}const Xxe=B.object({first_name:B.string().optional(),last_name:B.string().optional(),email:B.string().optional()}),MR=B.object({id:B.string(),name:B.string(),is_master:B.boolean().optional()}),ewe=B.discriminatedUnion("status",[B.object({status:B.literal("unclassified")}),B.object({status:B.literal("published")}),B.object({status:B.literal("release"),release_id:B.string()}),B.object({status:B.literal("archived")})]).and(B.object({version_id:B.string(),tags:B.array(B.string()),custom_type_label:B.string(),preview_summary:B.string().optional(),preview_image:B.string().optional(),last_modified_date:B.coerce.date(),author:Xxe,uid:B.string().optional()})),kR=B.object({id:B.string(),title:B.string().nullish().transform(e=>e??"Untitled"),custom_type_id:B.string(),group_lang_id:B.string(),language:MR,versions:B.array(ewe)}),twe=B.object({total:B.number(),cursor:B.string().optional(),results:B.array(kR)}),nwe=B.object({id:B.string(),title:B.string(),repository_id:B.string(),tags:B.array(B.string()).optional()}).passthrough(),rwe=B.object({results:B.array(nwe)});function N0(e,t,n,r,i){const o=new URL("documents",e);return r&&o.searchParams.set("limit",r.toString()),i&&o.searchParams.set("cursor",i),o.search+=`&${n}`,xe.request(o,{credentials:xe.getRequestCredentials(t),okType:twe})}function Fq(e,t,n,r){const i=new URL(e);return i.search=n,xe.request(i,{credentials:xe.getRequestCredentials(t),okType:rwe,...r})}function Mq(e){const{repository:t,searchTerm:n,tags:r,localeId:i,customTypesIds:o}=e,a=new URLSearchParams;return a.append("repository",t),n&&a.append("searchTerm",n),r!=null&&r.length&&a.append("tags",r.toString()),i&&a.append("localeId",i),o!=null&&o.length&&a.append("customTypesIds",o.toString()),a.toString()}function LR(e){return e.reduce((t,n)=>{if(n.values.every(i=>i===""))return t;const r=n.values.map(i=>[n.name,i]);return t.concat(r)},[])}function kq(e,t,n){return xe.request(new URL(`documents/${n}`,e),{credentials:xe.getRequestCredentials(t),okType:kR})}function Lq(e,t,n){const r=q0({document_id:n});return N0(e,t,r,n.length)}const iwe=B.custom().transform((e,t)=>{const n=ke.Document.decode(e);return n._tag==="Left"?(t.addIssue({code:B.ZodIssueCode.custom,message:"Invalid document."}),B.NEVER):n.right});function q0(e){const t=Nl.keys(e).flatMap(r=>{const i=e[r];return i?{name:r,values:i}:[]});return new URLSearchParams(LR(t)).toString()}async function jq(e,t,n){if(n.length===0)return[];const r=n.slice(0,50).map(({id:a})=>a),i=await Lq(e,t,r),o=new Map(r.map((a,s)=>[a,s]));return i.results.sort((a,s)=>{const u=o.get(a.id),c=o.get(s.id);return(u??1/0)-(c??1/0)})}const owe=B.unknown().transform((e,t)=>{const n=ke.SliceItemContent.decode(e);return n._tag==="Right"?n.right:(t.addIssue({code:B.ZodIssueCode.custom,message:"Invalid slice content."}),B.NEVER)}),awe=B.object({id:B.string(),firstname:B.string().optional(),lastname:B.string().optional(),email:B.string()}),swe=B.array(awe),uwe=B.object({slicemachineEnabled:B.boolean()}),Uq=["next","nuxt","sveltekit"];function cwe(e){return Uq.includes(e)}const lwe=B.preprocess(e=>typeof e=="string"&&cwe(e)?e:"other",B.enum([...Uq,"other"])),fwe=B.object({simulator_url:B.string().url().nullish(),languages:B.array(MR).transform(e=>vn.sort(e,t=>t.name)),authors:swe.optional().default([]),quotas:uwe.optional().default({slicemachineEnabled:!1}),framework:lwe.optional().default("other"),storageVersion:B.object({major:B.number().int(),minor:B.number().int()})}).transform(({simulator_url:e,framework:t,...n})=>{const r=e&&Bq(e)?e:void 0;return{...n,simulatorUrl:r,isSupportedFramework:t!=="other"}});function jR(e,t){return xe.request(new URL("repository",e),{credentials:xe.getRequestCredentials(t),okType:fwe})}function Bq(e){const t=Fr.toURL(e);return t?t.pathname.endsWith("/slice-simulator"):!1}const dwe=B.object({results:B.array(B.string())});function Pq(e,t){return xe.request(new URL("repository/tags",e),{credentials:xe.getRequestCredentials(t),okType:dwe})}function Sh(){const e=Oe();e.mediaLibrary||Pn("mediaLibrary");const{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e,{items:i}=Xe.useRequest(Wq,[t,r,n]);return{tags:i}}function Wq(e,t,n){return xe.request(new URL("tags",e),{credentials:xe.getRequestCredentials(n),okType:pwe,headers:{repository:t}})}const Dq=1,Kq=20,UR=B.string().min(Dq).max(Kq),BR=B.object({id:B.string(),name:UR,uploader_id:B.string().optional(),created_at:B.number(),last_modified:B.number(),count:B.number().optional().default(0)}),pwe=B.object({items:B.array(BR)});function _h(e){Xe.updateFetcherData(Wq,t=>{const{items:n}=t,r=e(n);if(r)return{items:r}})}function Awe(e){const{assetType:t,keyword:n,mode:r,tagIds:i}=e,o=Oe();o.mediaLibrary||Pn("mediaLibrary");const{onAnalyticsEvent:a}=o,s=Xe.useFetcherData(hi),u=s[s.length-1],c=E.useRef(u);c.current=u,E.useEffect(()=>{if(!a||!n||!c.current||c.current.keyword!==n)return;const l=String(n.split(" ").length),f=String(c.current.total),p=i.join(",");a("Media Library Search",{searchQuery:n,numberOfWords:l,numberOfResults:f,timeToGetResults:c.current.time,assetType:t,mode:r,tags:p})},[n,t,r,a,i])}function hwe(e){const{assetType:t,mediaDialogOpen:n}=e,r=Oe(),i=Xe.useFetcherData(hi),o=E.useRef(0);E.useEffect(()=>{n&&(o.current=performance.now())},[n]);function a(s){if(!r.onAnalyticsEvent||!r.mediaLibrary)return;const u=i[i.length-1];if(!u)return;const{keyword:c,tags:l}=u,f=Vq(i,t,c,l),p=String(c.split(" ").length),A=String(u.total),m=f.findIndex(I=>I.id===s),v=String(m+1),_=[s].join(","),S=(performance.now()-o.current).toFixed(0);r.onAnalyticsEvent("Media Added To Page",{assetType:t,searchQuery:c,numberOfWords:p,numberOfResults:A,searchPosition:v,mediaIds:_,timeToAddMediaToPage:S,tags:l})}return a}const Dh=B.array(B.string()).optional().transform(e=>e==null?void 0:e[0]),V0=B.object({id:B.string(),kind:B.string(),extension:B.string().optional(),filename:B.string(),width:B.number().optional(),height:B.number().optional(),last_modified:B.number(),url:B.string(),alt:B.string().optional(),size:B.number(),notes:B.string().optional(),credits:B.string().optional(),search_highlight:B.object({filename:Dh,alt:Dh,notes:Dh,credits:Dh}).optional(),tags:B.array(BR)}),Nq={"X-Prismic-Source":"Wroom"},mwe=B.object({total:B.number(),cursor:B.string().optional(),items:B.array(V0)}),qq=30;function hi(e,t,n,r,i,o,a,s){const u=e?new URL("assets",e):void 0,c=new URLSearchParams(LR([{name:"limit",values:[`${qq}`]},{name:"cursor",values:[s??""]},{name:"keyword",values:[i]},{name:"tags",values:o.split(",")},{name:"assetType",values:[r]}])).toString(),l=mwe.transform(p=>({...p,assetType:r,keyword:i,page:a,tags:o})),f=performance.now();return xe.request(`${(u==null?void 0:u.href)??""}?${c}`,{headers:{repository:t,...Nq},credentials:xe.getRequestCredentials(n),okType:l}).then(p=>({...p,time:(performance.now()-f).toFixed(0)}))}Xe.cache.registerFetcherConfig(hi,{revalidationStrategy:{type:"never"}});const ar={keyword:"",assetType:"all",tagIds:[]};function gwe(e){const{initialAssetType:t=ar.assetType,mode:n}=e,r=Oe(),[i,o]=E.useState({...ar,assetType:t,page:0});r.mediaLibrary||Pn("mediaLibrary");const{assetsApiBaseUrl:a,authStrategy:s,repository:u}=r,{keyword:c,page:l,cursor:f,assetType:p,tagIds:A}=i,m=Xe.useRequest(hi,Ap({assetsApiBaseUrl:a,authStrategy:s,repository:u,assetType:p,keyword:c,tagIds:A,page:l,cursor:f}));Awe({assetType:p,keyword:c,tagIds:A,mode:n});const v=Cwe(p,c,A),_=m.total!==v.length;function S(){m.cursor!==void 0&&o(y=>({...y,page:y.page+1,cursor:m.cursor}))}function I(y){o(b=>({...b,page:0,cursor:void 0})),Lu((b,x)=>{if(x.page===0)return[...y,...b]})}function T(y){o(b=>({...b,...y,page:0,cursor:void 0}))}function g(){o(y=>({...y,...ar,assetType:t==="all"?ar.assetType:y.assetType,page:0,cursor:void 0}))}return{keyword:c,assetType:p,tagIds:A,setFilters:T,resetFilters:g,media:v,mediaTotal:m.total,limit:qq,hasNextPage:_,fetchNextPage:S,updateMedia:vwe,unshiftMedia:I,deleteMedia:ywe,deleteSearchData:bwe,revalidateFirstPage:Qq}}function vwe(e){Lu(t=>t.flatMap(n=>{const r=e.find(i=>i.id===n.id);return r?r.response===void 0?[]:{...n,...r.response}:n}))}function ywe(e){Lu(t=>t.filter(n=>!e.includes(n.id)))}function bwe(e){const{keyword:t,assetType:n,tagIds:r}=e,i=r==null?void 0:r.join(",");Xe.updateFetcherData(hi,o=>{if(!(o.keyword===t&&o.tags===i&&o.assetType===n))return o})}function Vq(e,t,n,r){const i=e.filter(s=>s.assetType===t&&s.keyword===n&&s.tags===r),a=vn.sort(i,s=>s.page).flatMap(s=>s.items);return n?vn.uniqBy(a,s=>s.id):a}function Cwe(e,t,n){const r=Xe.useFetcherData(hi);return Vq(r,e,t,n.join(","))}function Lu(e){Xe.updateFetcherData(hi,t=>{const{items:n,total:r}=t,i=e(n,t);if(i)return{...t,total:r+(i.length-n.length),items:i}})}function Qq(e){const{config:t,keyword:n=ar.keyword,assetType:r=ar.assetType,tagIds:i=ar.tagIds}=e;if(!t.mediaLibrary)throw new Error("media library is not configured");const{assetsApiBaseUrl:o,authStrategy:a,repository:s}=t;Xe.revalidateData(hi,Ap({assetsApiBaseUrl:o,repository:s,authStrategy:a,keyword:n,assetType:r,tagIds:i,page:0}))}function zq(e){const{config:t,keyword:n=ar.keyword,assetType:r=ar.assetType,tagIds:i=ar.tagIds}=e;if(!t.mediaLibrary)throw new Error("media library is not configured");Xe.updateFetcherData(hi,o=>o.page===0?o:void 0),Qq({config:t,keyword:n,assetType:r,tagIds:i})}function Ap(e){return[e.assetsApiBaseUrl,e.repository,e.authStrategy,e.assetType,e.keyword,e.tagIds.join(","),e.page,e.cursor]}function Swe(e){const{revalidate:t,config:n,keyword:r,assetType:i,tagIds:o}=e,{assetsApiBaseUrl:a=void 0,repository:s="",authStrategy:u="token"}=n.mediaLibrary?n:{},[c,l]=E.useState(!1),[f,p]=E.useState(!1),A={assetsApiBaseUrl:a,repository:s,authStrategy:u,keyword:r,assetType:i,tagIds:o,page:0},{revalidateData:m}=Xe.useCacheRevalidation({fetcher:hi,requestParams:Ap(A),validator:(S,I)=>{var y,b;const T=((y=S.items[0])==null?void 0:y.id)??"",g=((b=I.items[0])==null?void 0:b.id)??"";return T!==g||S.total!==(I==null?void 0:I.total)},onCacheInvalidated:()=>p(!0),every:6e4}),v=S=>{m(Ap({...A,...S}))};E.useEffect(()=>{c&&(p(!1),l(!1))},[c]);function _(){l(!0),t()}return{isMediaRevalidationInProgress:c,isMediaCacheInvalid:f,revalidateMedia:_,revalidateWithParams:v}}let Kh;const _we=new Uint8Array(16);function Iwe(){if(!Kh&&(Kh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Kh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Kh(_we)}const fn=[];for(let e=0;e<256;++e)fn.push((e+256).toString(16).slice(1));function Twe(e,t=0){return fn[e[t+0]]+fn[e[t+1]]+fn[e[t+2]]+fn[e[t+3]]+"-"+fn[e[t+4]]+fn[e[t+5]]+"-"+fn[e[t+6]]+fn[e[t+7]]+"-"+fn[e[t+8]]+fn[e[t+9]]+"-"+fn[e[t+10]]+fn[e[t+11]]+fn[e[t+12]]+fn[e[t+13]]+fn[e[t+14]]+fn[e[t+15]]}const xwe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),QF={randomUUID:xwe};function wwe(e,t,n){if(QF.randomUUID&&!t&&!e)return QF.randomUUID();e=e||{};const r=e.random||(e.rng||Iwe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return Twe(r)}function Ewe(e){const{onBeforeUpload:t,onComplete:n}=e,[r,i]=E.useState([]),o=r.some(l=>l.status==="idle"||l.status==="uploading"),a=Oe();function s(){if(!r.length||r.some(A=>A.status==="uploading")||r.every(A=>A.status==="error"))return;const l=r.find(A=>A.status==="idle");if(!l)return;let f=r;function p(A){f=A(f),i(f),f.every(v=>v.status==="success"||v.status==="error")&&setTimeout(()=>{i([]),n==null||n(f)},1500)}p(A=>A.map(m=>m.id===l.id?{...m,status:"uploading"}:m)),$we({file:l.file,config:a}).then(A=>{p(m=>m.map(v=>v.id===l.id?{...v,status:"success",response:A}:v))}).catch(()=>{p(A=>A.map(m=>m.id===l.id?{...m,status:"error"}:m))})}function u(l){const f=l.map(p=>({id:`temp-${wwe()}`,file:p,status:"idle"}));i(f),t(f)}const c=E.useCallback(l=>{const f=[{...l,status:"idle"},...r.filter(p=>p.id!==l.id)];i(f),t(f)},[t,r]);return E.useEffect(s,[a,r,n]),{isUploading:o,uploadingFiles:r,onFilesSelected:u,onRetry:c}}function $we(e){const{file:t,config:n}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n,a=new FormData;return a.append(t.name,t),xe.request(new URL("assets",r),{headers:{repository:i,"Content-Type":"multipart/form-data",...Nq},method:"POST",body:a,credentials:xe.getRequestCredentials(o),okType:V0})}const Hq=E.createContext(void 0);function Rwe(e){const{children:t,assetType:n=ar.assetType,onSelectedChange:r,actionContainerRef:i}=e,o=r?"select":"browse",[a,s]=E.useTransition(),[u,c]=E.useTransition(),l=Oe(),{showAlert:f}=h.useAlert(),{keyword:p,tagIds:A,assetType:m,setFilters:v,resetFilters:_,media:S,fetchNextPage:I,hasNextPage:T,updateMedia:g,unshiftMedia:y,deleteMedia:b,mediaTotal:x,deleteSearchData:w,revalidateFirstPage:F}=gwe({initialAssetType:n,mode:o}),[O,M]=E.useState();function P(){zq({config:l,keyword:p,assetType:m,tagIds:A})}const{isMediaRevalidationInProgress:K,isMediaCacheInvalid:Y,revalidateMedia:Z,revalidateWithParams:ie}=Swe({config:l,revalidate:P,keyword:p,assetType:m,tagIds:A});function he(Fe){const it=Fe.keyword===ar.keyword,$t=Fe.assetType===n,bt=Fe.tagIds.length===ar.tagIds.length&&Fe.tagIds.every((Gt,_r)=>Gt===ar.tagIds[_r]);return it&&$t&&bt}function ue(Fe){const it={keyword:p,assetType:m,tagIds:A,...Fe};he(it)?ie(Fe):w(it),c(()=>{v(Fe),$e.clearSelection()})}const{isUploading:k,onFilesSelected:R,uploadingFiles:N,onRetry:ae}=Ewe({onBeforeUpload:Fe=>{_();const it=Fe.filter(bt=>bt.status==="idle").map(bt=>({id:bt.id,url:URL.createObjectURL(bt.file),filename:bt.file.name,size:bt.file.size,extension:bt.file.type,kind:bt.file.type,last_modified:bt.file.lastModified,tags:[]}));y(it);const[$t]=it??[];$t&&$e.toggleSelection({id:$t.id,isSingleSelection:!0})},onComplete:Fe=>{const it=Fe.flatMap(Gt=>Gt.status==="success"?Gt:(cn(Gt),{id:Gt.id,response:void 0}));g(it),F({config:l,assetType:m,tagIds:A});const $t=it[0];!$t||!$t.response||!$e.isSelected($t.id)||$e.toggleSelection({id:$t.response.id,isSingleSelection:!0})}}),$e=Vs({totalItemCount:x,onChangeSelection:({selectedIds:Fe,selectedCount:it})=>{if(Dn(!1),!!r){if(it===1){const[$t]=[...Fe];if(N.some(Gt=>Gt.id===$t&&Gt.status!=="success")){r(new Set);return}}r(new Set(Fe))}}});function Se(Fe){k||R(Fe)}function rt(){T&&s(I)}function yt(Fe,it){g([{id:Fe,response:it}])}function cn(Fe){const it=wp.overflow(Fe.file.name,30);f({id:Fe.id,title:`The specified file "${it}" could not be uploaded.`,subtitle:d.jsxs(h.Text,{color:"inherit",children:["Read more about our"," ",d.jsx(h.Text,{color:"tomato11",href:exe,underline:!0,children:"supported media"}),"."]}),buttons:{action:{text:"Retry upload",icon:"cloudUpload",onClick:()=>ae(Fe)}}})}const[Yt,Dn]=E.useState(!1);return d.jsx(Hq.Provider,{value:{isFetchingMedia:a,media:S,mediaTotal:x,onScrollToBottom:rt,actionContainerRef:i,onFilesUpload:Se,isUploading:k,uploadingFiles:N,isMediaRevalidationInProgress:K,isMediaCacheInvalid:Y,revalidateMedia:Z,deleteMedia:b,updateMedia:yt,keyword:p,isSearchingMedia:u,assetType:m,initialAssetType:n,tagManagerOpen:Yt,setTagManagerOpen:Dn,tagIds:A,onFilterChange:ue,openMediaSection:O,setOpenMediaSection:M},children:t})}function It(){const e=E.useContext(Hq);if(!e)throw new Error("useMediaLibrary must be used within a MediaLibraryProvider");return e}function Owe(){const e=Oe(),{initialAssetType:t}=It(),{assetsApiBaseUrl:n=void 0,repository:r="",authStrategy:i="token"}=e.mediaLibrary?e:{},{total:o}=Xe.useRequest(hi,Ap({assetsApiBaseUrl:n,authStrategy:i,repository:r,assetType:t,keyword:"",tagIds:[],page:0}));return o}function Yq(){return Owe()===0}function Fwe(){return Yq()?d.jsx(Mwe,{}):d.jsx(Jq,{})}function Gq(e){const{children:t}=e;return d.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",backgroundColor:"grey3",children:t})}function Jq(){return d.jsx(Gq,{children:d.jsxs(h.BlankSlate,{children:[d.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),d.jsx(h.BlankSlateTitle,{size:"big",children:"Oops!"}),d.jsx(h.BlankSlateDescription,{width:360,children:"No items found matching your search"})]})})}function Mwe(){const{onFilesUpload:e}=It();return d.jsx(Gq,{children:d.jsxs(h.Box,{gap:20,flexDirection:"column",alignItems:"center",children:[d.jsx(h.Box,{maxWidth:375,children:d.jsx(h.BlankSlateTitle,{size:"big",children:"Start by uploading your files!"})}),d.jsx(h.Box,{border:!0,borderStyle:"dashed",borderRadius:4,justifyContent:"center",children:d.jsxs(h.BlankSlate,{sx:{marginBlock:80,marginInline:48},children:[d.jsx(h.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),d.jsx(h.BlankSlateTitle,{children:"Drop your files anywhere to upload or ..."}),d.jsx(h.FileUploadButton,{onFilesSelected:e,renderButton:t=>d.jsx(h.Box,{display:"inline-flex",as:"span",children:d.jsx(h.Button,{onClick:t,color:"grey",children:"Upload media"})})}),d.jsx(h.BlankSlateDescription,{children:"Maximum upload size file: 128Mb"})]})})]})})}const kl={warning:{uploadWhileUploading:{title:"Hang tight!",description:"Your current images are still being uploaded. Once they're all set, you'll be free to upload more."}}};function kwe(){const{actionContainerRef:e,isUploading:t,onFilesUpload:n,assetType:r}=It(),i=e==null?void 0:e.current;return d.jsx(Zq,{actionContainerRef:e,children:d.jsxs(h.Box,{width:"100%",gap:16,children:[d.jsx(Lwe,{}),d.jsx(h.Tooltip,{title:kl.warning.uploadWhileUploading.title,content:kl.warning.uploadWhileUploading.description,visible:t,stableMount:!0,children:d.jsx(h.FileUploadButton,{disabled:t,onFilesSelected:n,startIcon:"cloudUpload",color:i?"purple":"grey",size:"large",assetType:r,children:"Upload media"})})]})})}function Lwe(){const{keyword:e,onFilterChange:t,isFetchingMedia:n}=It(),[r,i]=E.useState(e);return Qe.useOnChange(e,()=>{e===""&&i("")}),Qe.useDebounce(r,300,Qe.useStableCallback(o=>t({keyword:o}))),d.jsx(h.Box,{width:"100%",flexDirection:"column",children:d.jsx(h.FormSearchInput,{value:r,placeholder:"Search",onValueChange:i,maxLength:200,isLoading:n&&e!==r})})}function Zq(e){const{children:t,actionContainerRef:n}=e,r=n==null?void 0:n.current,i=r?h.Portal:E.Fragment,o=r?{container:n.current,asChild:!0}:{};return d.jsx(i,{...o,children:t})}function jwe(e){const{children:t}=e,{onFilesUpload:n,assetType:r}=It();return d.jsx(h.FileDropZone,{overlay:d.jsx(Uwe,{}),onFilesSelected:n,assetType:r,children:t})}function Uwe(){const{isUploading:e}=It(),t=e?kl.warning.uploadWhileUploading.title:"Drop files here",n=e?kl.warning.uploadWhileUploading.description:"Drop your files to upload them instantly to the media library.";return d.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",backgroundColor:"grey3",children:d.jsxs(h.BlankSlate,{children:[d.jsx(h.BlankSlateIcon,{name:e?"block":"cloudUpload",lineColor:e?"tomato11":"purple10",backgroundColor:e?"tomato2":"purple3",borderColor:e?"tomato6":"purple6",borderStyle:"dashed",size:"xlarge"}),d.jsx(h.BlankSlateTitle,{size:"big",children:t}),d.jsx(h.BlankSlateDescription,{width:360,children:n})]})})}function Xq(){return d.jsx(h.DefaultErrorMessage,{title:"Oops! Something went wrong",description:"An error occurred while searching for your image.",errorImageSrc:h.dialogErrorImage,sx:{marginBlock:"auto",marginInline:"auto"}})}function e7(e){const{mediaList:t,mediaActions:n,mediaToolbar:r,sidePane:i}=e,o=h.useMediaQuery({min:"medium"}),a=i&&o;return d.jsxs(h.Box,{display:"grid",gridTemplateRows:"auto auto 1fr",gridTemplateColumns:a?"1fr 380px":"1fr",width:"100%",height:"100%",children:[d.jsxs(h.Box,{position:"relative",display:"grid",gap:16,gridColumn:"1",gridRow:"1",padding:{right:16,bottom:16},children:[n,r]}),d.jsx(h.Box,{position:"relative",display:"grid",gridColumn:"1",gridRow:"2 / -1",children:t}),a&&i]})}function t7(e){const{count:t}=e;return d.jsxs(h.Text,{variant:"bold",children:[t," items"]})}function Bwe(){var p;const{onScrollToBottom:e,media:t,isUploading:n,uploadingFiles:r,isSearchingMedia:i,isMediaRevalidationInProgress:o,setOpenMediaSection:a,isFetchingMedia:s}=It(),u=Vs(),c=E.useRef(null);function l(A){u.toggleSelection({id:A,isSingleSelection:!0}),a("tags")}(n||i||o)&&((p=c.current)==null||p.scrollTo({top:0,behavior:"instant"}));function f(A,m,v){const _=m.shiftKey?t.map(({id:S})=>S):void 0;u.toggleSelection({id:A,isSingleSelection:v==="single",metaKey:m.metaKey,shiftKey:m.shiftKey,ids:_})}return d.jsxs(n7,{onScrollToBottom:e,scrollAreaRef:c,children:[t.map(A=>{var m,v;return d.jsx(h.MediaCard,{"aria-label":"media item",...A,filenameHighlight:(m=A.search_highlight)==null?void 0:m.filename,loading:i,status:(v=r.find(_=>_.id===A.id))==null?void 0:v.status,selected:u.isSelected(A.id),onCardClick:_=>f(A.id,_,"single"),onCheckedChange:(_,S)=>f(A.id,S,"multi"),onAddTagClick:()=>l(A.id)},A.id)}),d.jsx(h.Box,{gridColumn:"1 / -1",justifyContent:"center",children:d.jsx(h.AnimatedElement,{animation:{name:"fade"},children:s&&d.jsx(h.Text,{align:"center",color:"grey11",sx:{marginBlock:8},children:"Loading more items ..."})})})]})}function n7(e){const{children:t,scrollAreaRef:n,onScrollToBottom:r}=e,i=16,o=4,a="250px",s=`calc((100% - ${i*(o-1)}px) / ${o})`;return d.jsx(h.ScrollArea,{"aria-label":"Media list",ref:n,style:{display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(max(${a}, ${s}), 1fr))`,gridTemplateRows:"1fr 1fr 1fr ",gap:i,padding:2,paddingBottom:16,position:"relative"},onScrollToBottom:r,threshold:500,children:t})}function r7(e){const{children:t,hasSelectedMedia:n}=e;return d.jsx(h.Box,{overflow:"hidden",gridColumn:"2 / -1",gridRow:"1 / -1",children:d.jsx(h.ScrollArea,{style:{display:"grid",height:"100%"},children:d.jsx(h.Box,{flexGrow:1,borderRadius:{topRight:8,topLeft:8},borderStyle:n?"solid":"dashed",border:{top:!0,right:!0,left:!0,bottom:!1},minWidth:0,children:t})})})}function i7(e){const{onFilesUpload:t,isUploading:n,isInitialLoad:r=!1}=e,i=r||n;return d.jsxs(h.Box,{flexDirection:"column",justifyContent:"center",alignItems:"center",padding:16,gap:16,width:"100%",children:[d.jsx(h.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),d.jsx(h.Box,{flexDirection:"column",gap:4,children:d.jsxs(h.Text,{align:"center",children:["Select or"," ",d.jsx(h.FileUploadButton,{disabled:i,onFilesSelected:t,renderButton:o=>d.jsx(h.Tooltip,{title:kl.warning.uploadWhileUploading.title,content:kl.warning.uploadWhileUploading.description,visible:n,children:d.jsx(h.Box,{display:"inline-flex",as:"span",children:d.jsx(h.Button,{disabled:i,onClick:o,invisible:!0,children:"upload"})})})})," ","media."]})}),d.jsx(h.FileUploadButton,{disabled:i,onFilesSelected:t,color:"grey",children:"Upload media"})]})}function Pwe(e){const{actionContainerRef:t}=e;return d.jsx(e7,{sidePane:d.jsx(Kwe,{}),mediaActions:d.jsx(Dwe,{actionContainerRef:t}),mediaToolbar:d.jsx(h.Skeleton,{color:"grey5",borderRadius:12,children:d.jsx(t7,{count:888})}),mediaList:d.jsx(Wwe,{})})}function Wwe(){return d.jsx(n7,{children:vn.range(1,24).map(e=>d.jsx(o7,{},e))})}function Dwe(e){const{actionContainerRef:t}=e,n=Qe.useForceUpdate();return E.useLayoutEffect(()=>{n()},[n]),d.jsx(Zq,{actionContainerRef:t,children:d.jsxs(h.Box,{width:"100%",gap:16,children:[d.jsx(h.Box,{width:"100%",flexDirection:"column",children:d.jsx(h.FormSearchInput,{placeholder:"Search",maxLength:200,value:"",disabled:!0,onValueChange:()=>{}})}),d.jsx(h.FileUploadButton,{disabled:!0,onFilesSelected:()=>{},startIcon:"cloudUpload",color:t?"purple":"grey",size:"large",children:"Upload media"})]})})}function Kwe(){return d.jsx(r7,{hasSelectedMedia:!1,children:d.jsx(i7,{onFilesUpload:()=>{},isUploading:!1,isInitialLoad:!0})})}function o7(){return d.jsxs(h.Box,{height:302,width:"100%",flexDirection:"column",padding:16,backgroundColor:"grey1",border:!0,borderStyle:"solid",borderRadius:6,children:[d.jsx(h.Skeleton,{height:164,width:"100%"}),d.jsx(h.Skeleton,{height:16,width:"100%",sx:{marginTop:12}}),d.jsx(h.Skeleton,{height:10,width:100,sx:{marginTop:8}}),d.jsx(h.Skeleton,{height:1,width:"100%",sx:{marginTop:20,marginBottom:16}}),d.jsxs(h.Box,{flexDirection:"row",gap:8,children:[d.jsx(h.Skeleton,{height:24,width:54}),d.jsx(h.Skeleton,{height:24,width:45}),d.jsx(h.Skeleton,{height:24,width:62})]})]})}const a7=E.createContext({showToast:()=>{}});function Nwe(e){const{children:t}=e,[n,r]=E.useState({title:"",seconds:5}),[i,o]=E.useState(!1),{title:a,action:s,seconds:u=1,icon:c="check"}=n,l=E.useMemo(()=>({showToast:f=>{r({seconds:u,...f}),o(!0)}}),[u]);return d.jsxs(d.Fragment,{children:[d.jsx(qwe,{}),d.jsx(h.Toast,{anchor:d.jsx(h.Box,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:i,onOpenChange:o,title:a,action:s,seconds:u,icon:c}),d.jsx(a7.Provider,{value:l,children:t})]})}function s7(){return E.useContext(a7)}function qwe(){const{revalidateMedia:e,isMediaCacheInvalid:t}=It(),[n,r]=E.useState(t);return Qe.useOnChange(t,r),d.jsx(h.Toast,{anchor:d.jsx(h.Box,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:n,title:"There have been changes to your media library",action:{title:"Update",onClick:e},cancel:{onClick:()=>r(!1)}})}function Vwe(){const{media:e,mediaTotal:t}=It(),n=Vs();return d.jsxs(h.Box,{alignItems:"center",gap:16,children:[n.isSelectAllEnabled&&d.jsx(h.Checkbox,{onCheckedChange:n.toggleSelectAll,checked:n.selectedCount>0,indeterminate:n.selectedCount!==t,onClick:r=>r.stopPropagation(),disabled:e.length===0}),e.length!==0&&d.jsx(t7,{count:t}),d.jsxs(h.Box,{gap:8,alignItems:"center",children:[d.jsx(h.Text,{children:"Filter:"}),d.jsx(zwe,{}),d.jsx(Gwe,{})]})]})}const oC={all:{name:"All media",icon:"public"},image:{name:"Images",icon:"image"},video:{name:"Videos",icon:"videocam"},document:{name:"Documents",icon:"insertDriveFile"},audio:{name:"Audio files",icon:"musicNote"}},Qwe=Object.entries(oC);function zwe(){const{assetType:e,initialAssetType:t,onFilterChange:n}=It(),[r,i]=E.useState(e);Qe.useOnChange(e,()=>{i(e)});const[o,a]=E.useState(!1);function s(p){a(!1),i(p),n({assetType:p})}const{icon:u,name:c}=oC[r],l=oC[t].name,f=t!=="all";return d.jsxs(h.DropdownMenu,{open:o,onOpenChange:a,children:[d.jsx(h.DropdownMenuTrigger,{disabled:f,children:d.jsx(Hwe,{icon:u,isDropdownDisabled:f,buttonName:c,tooltipAssetTypeName:l})}),d.jsx(h.DropdownMenuContent,{minWidth:256,align:"start",childrenFocusScope:!0,children:d.jsx(d.Fragment,{children:Qwe.filter(([p])=>p!==r).map(([p,{icon:A,name:m}])=>d.jsx(h.DropdownMenuItem,{startIcon:d.jsx(h.Icon,{name:A}),onSelect:()=>s(p),children:m},p))})})]})}const Hwe=E.forwardRef(function(t,n){const{icon:r,isDropdownDisabled:i,buttonName:o,tooltipAssetTypeName:a,...s}=t;return d.jsx(h.Tooltip,{content:`You can only pick ${(a==null?void 0:a.toLocaleLowerCase())??"this type of media"}`,visible:i,children:d.jsx(h.Button,{startIcon:r,endIcon:"arrowDropDown",size:"small",color:"grey",disabled:i,ref:n,...s,children:o})})});function Ywe(e){const{optimisticTagIds:t,setOptimisticTagIds:n}=e,{onFilterChange:r}=It(),{tags:i}=Sh(),o=E.useMemo(()=>WQ.groupBy(i,s=>s.id),[i]);function a(s){const u=t.filter(c=>c!==s.id);n(u),r({tagIds:u})}return d.jsx(d.Fragment,{children:t.map(s=>{var c;const u=(c=o.get(s))==null?void 0:c[0];return u?d.jsx(h.Badge,{title:u.name,size:"medium",color:"purple",onClose:()=>a(u),selected:!0},u.id):null})})}function Gwe(){const{setTagManagerOpen:e,tagIds:t,onFilterChange:n}=It(),[r,i]=E.useState(""),[o,a]=E.useState(!1),[s,u]=E.useState(t);Qe.useOnChange(JSON.stringify(t),()=>{u(t)});function c(p){a(p),p||i("")}function l(p){const A=s.includes(p.id)?t.filter(m=>m!==p.id):[...t,p.id];u(A),n({tagIds:A}),a(!1)}function f(){a(!1),e(!0)}return d.jsxs(d.Fragment,{children:[d.jsxs(h.DropdownMenu,{open:o,onOpenChange:c,children:[d.jsx(h.DropdownMenuTrigger,{children:d.jsx(h.Button,{startIcon:"label",endIcon:"arrowDropDown",size:"small",color:"grey",children:"Tags"})}),d.jsx(h.DropdownMenuContent,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:d.jsxs(h.ComboBox,{variant:"attached",children:[d.jsx(h.ComboBoxInput,{value:r,onValueChange:i,placeholder:"Search for a tag",autoFocus:!0}),d.jsx(h.ComboBoxContent,{children:d.jsx(h.ErrorBoundary,{renderError:()=>d.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:d.jsx(E.Suspense,{fallback:d.jsx(h.Box,{padding:8,flexDirection:"column",gap:8,children:vn.range(1,6).map(p=>d.jsx(h.Skeleton,{height:24,width:85},p))}),children:d.jsx(Jwe,{searchTerm:r,setSearchTerm:i,onTagToggle:l,optimisticTagIds:s})})})}),d.jsx(h.ComboboxAction,{children:d.jsx(h.Button,{invisible:!0,startIcon:"edit",textWeight:"normal",color:"dark",onClick:f,children:"Manage tags"})})]})})]}),s.length>0&&d.jsx(h.ErrorBoundary,{children:d.jsx(E.Suspense,{children:d.jsx(Ywe,{optimisticTagIds:s,setOptimisticTagIds:u})})})]})}function Jwe(e){const{onTagToggle:t,searchTerm:n,optimisticTagIds:r}=e,{tags:i}=Sh(),o=E.useMemo(()=>{const a=n.toLowerCase();return i.filter(s=>s.name.toLowerCase().includes(a))},[i,n]);return d.jsxs(d.Fragment,{children:[!o.length&&d.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),o.map((a,s)=>{const u=r.includes(a.id);return d.jsx(h.ComboBoxItem,{value:a.id,onCheckedChange:()=>t(a),checked:u,children:d.jsx(h.Badge,{title:a.name,color:"purple",sx:{marginLeft:8,marginBottom:s===o.length-1?8:4,marginTop:s===0?8:4},size:"medium"})},a.id)})]})}function Bc(){const{media:e}=It(),t=Vs();return e.filter(({id:n})=>t.isSelected(n))}function Zwe(){const[e,t]=E.useState(!1),n=Bc(),r=Vs(),i=E.useMemo(()=>n.some(({id:a})=>a.startsWith("temp")),[n]),[o]=n;return o?r.selectedCount>1?d.jsxs(h.Box,{gap:8,alignItems:"center",children:[d.jsxs(h.Text,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:[r.selectedCount," media selected"]}),d.jsx(h.Tooltip,{content:"Open all selected media in new tabs",children:d.jsx(h.IconButton,{icon:"openInFull",variant:"solid",size:"small",onClick:()=>n.forEach(a=>window.open(a.url,"_blank"))})}),d.jsx(h.Tooltip,{content:"Remove selected media",children:d.jsx(h.IconButton,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),d.jsx(zF,{open:e,onOpenChange:t,media:n})]}):d.jsxs(h.Box,{gap:8,alignItems:"center",children:[d.jsx(h.Text,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:o.filename}),d.jsxs(h.Box,{gap:8,children:[d.jsx(h.Tooltip,{content:"Open media in new tab",children:d.jsx(h.IconButton,{icon:"openInFull",variant:"solid",size:"small",hiddenLabel:"Open media in new tab",onClick:()=>window.open(o.url,"_blank"),disabled:i})}),d.jsx(h.Tooltip,{content:"Copy media URL",children:d.jsx(h.IconButton,{icon:"link",variant:"solid",size:"small",hiddenLabel:"Copy media URL",onClick:()=>navigator.clipboard.writeText(o.url),disabled:i})}),d.jsx(h.Tooltip,{content:"Remove media",children:d.jsx(h.IconButton,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),d.jsx(zF,{open:e,onOpenChange:t,media:o})]})]}):null}function zF(e){const{open:t,onOpenChange:n,media:r}=e,i=Oe(),{showAlert:o}=h.useAlert(),{deleteMedia:a}=It(),s=Vs(),[u,c]=E.useState(!1),l=Array.isArray(r),f=l?"these items":"this item";function p(){c(!0);const m=s.getSelectionState().selectedIds;eEe({ids:m,config:i}).then(()=>{n(!1),a(m),s.clearSelection()}).catch(()=>{n(!1),o({title:"Error",subtitle:`Something went wrong when removing ${f}.`})}).finally(()=>{c(!1)})}return d.jsxs(h.Dialog,{onOpenChange:n,open:t,size:"small",children:[d.jsx(h.DialogHeader,{icon:"alert",title:`Remove ${f} from your media library?`}),d.jsx(h.DialogContent,{children:d.jsx(h.Box,{padding:16,children:d.jsxs(h.Text,{children:["You are about to delete ",f,":  ",l?d.jsx(Xwe,{media:r}):d.jsx("b",{children:r.filename})]})})}),d.jsxs(h.DialogActions,{children:[d.jsx(h.DialogCancelButton,{}),d.jsxs(h.DialogActionButton,{onClick:p,color:"tomato",loading:u,children:["Yes, I want to remove ",f]})]})]})}const Qb=15;function Xwe({media:e}){const t=e.slice(0,Qb),n=e.length>Qb,r=n?e.length-Qb:0,i=r===1?"item":"items";return d.jsxs("ul",{children:[t.map((o,a)=>d.jsx("li",{children:d.jsx("b",{children:o.filename})},a)),n&&d.jsxs("span",{children:[d.jsx("br",{}),"And ",d.jsx("b",{children:r})," more ",i,"..."]})]})}function eEe(e){const{ids:t,config:n}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");if(t.length===0)throw new Error("No ids provided during media deletion");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;if(t.length===1){const[a]=t;return xe.request(new URL(`assets/${a}`,r),{headers:{repository:i},method:"DELETE",credentials:xe.getRequestCredentials(o),okType:B.unknown()})}return xe.request(new URL("assets/bulk-delete",r),{headers:{repository:i},method:"POST",credentials:xe.getRequestCredentials(o),okType:B.unknown(),body:{ids:t}})}function tEe(){var o;const e=Bc(),{uploadingFiles:t}=It(),[n]=e;if(!n)return null;if(e.length===2)return d.jsx(zb,{children:e.map((a,s)=>d.jsx("div",{style:{position:"absolute",transform:s===0?"translateX(25%) rotate(15deg) ":"translateX(-25%) rotate(-15deg) "},children:d.jsx(HF,{media:a})},a.id))});if(e.length>2)return d.jsx(zb,{children:e.slice(-4).map((a,s)=>d.jsx("div",{style:{position:"absolute",paddingRight:s*16},children:d.jsx(HF,{media:a})},a.id))});const r=(o=t.find(a=>a.id===n.id))==null?void 0:o.status,i=n.kind.startsWith("image");return d.jsx(h.Box,{flexDirection:"column",children:d.jsx(h.CheckerBoard,{children:d.jsx(zb,{uploadStatus:r,hasImage:i,children:i?d.jsx(h.Image,{src:n.url,alt:n.alt,sizing:"contain"}):d.jsx(h.MediaCardPlaceholder,{kind:n.kind,filename:n.filename})})})})}function zb(e){const{children:t,uploadStatus:n,hasImage:r}=e;return d.jsxs(h.Box,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:200,width:"100%",backgroundColor:r?"transparent":"purple2",children:[t,n&&d.jsx(nEe,{uploadStatus:n})]})}function nEe(e){const{uploadStatus:t}=e,{value:n,color:r,height:i,transition:o}=rEe(t);return d.jsx(h.Box,{position:"absolute",backgroundColor:"greyAlpha1",width:"100%",height:"100%",padding:{inline:16},justifyContent:"end",flexDirection:"column",children:d.jsx(h.ProgressBar,{value:n,color:r,height:i,transition:o})})}function rEe(e){switch(e){case"idle":return{value:0,height:"collapsed",color:"grey4"};case"uploading":return{value:90,transition:"slow",color:"purple9"};case"success":return{value:100,height:"collapsed",color:"purple9"};case"error":return{value:100,color:"tomato11"}}}function HF(e){const{media:t}=e;return d.jsx(h.Box,{width:111,height:152,children:t.kind==="image"?d.jsx(h.Image,{borderRadius:8,src:t.url,alt:t.alt,sizing:"cover"}):d.jsx(h.MediaCardPlaceholder,{kind:t.kind,filename:t.filename})})}const es=2e3,Ad="__MAIN_THUMBNAIL__";function aC(e,t,n){const r=e.name===Ad?void 0:e.name;let i;return t?io.isDefined(n)?i=[n.width,n.height]:io.isDefined(e.width)||io.isDefined(e.height)?i=[e.width??void 0,e.height??void 0]:i=[t.origin.width,t.origin.height]:i=void 0,[r,i?`${i[0]??"auto"}×${i[1]??"auto"}px`:void 0]}function iEe(e){var t,n;return[{...(t=e.config)==null?void 0:t.constraint,name:Ad}].concat(((n=e.config)==null?void 0:n.thumbnails)??[])}function oEe(e,t){var a,s;const{__TYPE__:n,thumbnails:r,...i}=t,o=(s=(a=e.config)==null?void 0:a.thumbnails)==null?void 0:s.map(({name:u})=>r==null?void 0:r[u]);return[i,...o??[]]}function aEe(e,t,n,r){const i=r.length===0?void 0:r;return e===Ad||!ke.isImageContent(t)?{...t,alt:i}:{...t,thumbnails:{...t.thumbnails,[e]:{...n,alt:i}}}}function sEe(e,t){const{width:n,height:r}=t??{};return n&&r?[n,r]:n?[n,Math.round(e.height*(n/e.width))]:r?[Math.round(e.width*(r/e.height)),r]:[e.width,e.height]}function uEe(e,t,n,r,i){if(AEe(e)==="svg")return e;const o=new URL(e);if(i){const{x:a,y:s,width:u,height:c}=t,l=[...o.searchParams.entries(),["rect",[a,s,u,c].join(",")],["w",n],["h",r]];o.search=l.map(f=>f.join("=")).join("&")}return o.toString()}function u7(e){const t=new URL(e);return t.searchParams.delete("q"),t.searchParams.set("w","800"),t.searchParams.set("h","800"),t.searchParams.set("auto","compress,format"),t.searchParams.set("fit","max"),t.toString()}function cEe(e){const t=new URL(e);return t.searchParams.delete("q"),t.searchParams.delete("fm"),t.searchParams.set("w","300"),t.searchParams.set("auto","compress,format"),t.toString()}function lEe(e){return e!=null&&e.url?u7(e.url):void 0}function fEe(e,t,n,r){var s,u,c,l,f;if(!n||e===Ad){const p=(s=t.config)==null?void 0:s.thumbnails,A=p&&Object.fromEntries(p.map(m=>[m.name,rm(r,m)]));return{__TYPE__:"ImageContent",...rm(r,(u=t.config)==null?void 0:u.constraint),thumbnails:A}}const i=(l=(c=t.config)==null?void 0:c.thumbnails)==null?void 0:l.find(p=>p.name===e);if(!i)return n;const o=(f=n.thumbnails)==null?void 0:f[e],a=rm(r,i);return a.url===(o==null?void 0:o.url)?n:{...n,thumbnails:Nl.mapValues(n.thumbnails??{},(p,A)=>A===e?a:p)}}function dEe(e){return"kind"in e&&"extension"in e}function rm(e,t){const{width:n,height:r,rect:i}=pEe({...e,width:(e==null?void 0:e.width)??es,height:(e==null?void 0:e.height)??es},t),o=!!(t!=null&&t.width||t!=null&&t.height);return{provider:"imgix",url:uEe(e.url,i,n,r,o),alt:e.alt,...dEe(e)?{credits:e.credits}:{},origin:{id:e.id,url:e.url,width:e.width??es,height:e.height??es},width:n,height:r,edit:{background:"transparent",zoom:1,crop:{x:i.x,y:i.y}}}}function pEe(e,t){const[n,r]=sEe(e,t),i=Math.max(n/e.width,r/e.height),o=Math.round((e.width-n/i)/2),a=Math.round((e.height-r/i)/2),s=Math.round(n/i),u=Math.round(r/i);return{width:n,height:r,rect:{x:o,y:a,width:s,height:u}}}function AEe(e){const{pathname:t}=new URL(e),n=t.lastIndexOf(".");if(n!==-1)return t.substring(n).slice(1).toLowerCase()}function hEe(e){if(!e)return"";const{filename:t,extension:n}=e;if(!n)return t;const r=new RegExp(`\\.${n}$`);return t.replace(r,"")}function mEe(e){const t=e.length,n={},r=[];return e.forEach(o=>{o.tags.forEach(a=>{n[a.id]||(n[a.id]=0,r.push(a)),n[a.id]++})}),r.filter(o=>n[o.id]===t)}function c7(e){const{tags:t,toggleAssetTag:n,getTagsLabel:r}=e,{setTagManagerOpen:i}=It(),{showToast:o}=s7(),{showAlert:a}=h.useAlert(),[s,u]=E.useState("");async function c(l,f){u("");try{await n(l,f),o({title:"Media tags were updated",seconds:3})}catch{a({title:"Error",subtitle:"Something went wrong when updating media tags"})}}return d.jsxs(h.Box,{flexDirection:"column",children:[d.jsxs(h.Box,{justifyContent:"space-between",children:[d.jsx(h.Text,{color:"grey12",variant:"bold",children:r()}),d.jsx(h.Button,{startIcon:"edit",invisible:!0,color:"dark",onClick:()=>i(!0),children:"Manage tags"})]}),d.jsxs(h.ComboBox,{sx:{marginTop:4,marginBottom:8},children:[d.jsx(gEe,{searchTerm:s,setSearchTerm:u}),d.jsx(h.ComboBoxContent,{children:d.jsx(h.ErrorBoundary,{renderError:()=>d.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:d.jsx(E.Suspense,{fallback:d.jsx(h.Box,{padding:8,flexDirection:"column",gap:8,children:vn.range(1,6).map(l=>d.jsx(h.Skeleton,{height:24,width:85},l))}),children:d.jsx(vEe,{searchTerm:s,assignedTags:t,onToggleAssetTag:c})})})})]}),d.jsx(h.Box,{flexDirection:"column",alignItems:"flex-start",gap:8,children:t.map(l=>d.jsx(h.Badge,{title:l.name,size:"medium",color:"purple",selected:!0,onClose:()=>c(l,"remove")},l.id))})]})}function gEe(e){const{searchTerm:t,setSearchTerm:n}=e,r=E.useRef(null),{openMediaSection:i,setOpenMediaSection:o}=It();return E.useEffect(()=>{var a;i==="tags"&&((a=r.current)==null||a.focus(),o(void 0))},[i,o]),d.jsx(h.ComboBoxInput,{value:t,onValueChange:n,placeholder:"Add or create a new tag",ref:r})}function vEe(e){const{searchTerm:t,assignedTags:n,onToggleAssetTag:r}=e,[i]=Bc(),o=Oe(),{showAlert:a}=h.useAlert(),{tags:s}=Sh(),u=E.useMemo(()=>{const p=t.toLowerCase();return s.filter(A=>A.name.toLowerCase().includes(p))},[s,t]),l=UR.safeParse(t).success&&s.every(p=>p.name!==t);async function f(){if(!t||!i)return;let p;try{p=await yEe({name:t,config:o}),_h(A=>[p,...A])}catch{a({title:"Error",subtitle:`Something went wrong when creating the tag ${t}`});return}await r(p,"add")}return i?d.jsxs(d.Fragment,{children:[!u.length&&d.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),u.map((p,A)=>d.jsx(h.ComboBoxItem,{value:p.id,onCheckedChange:m=>r(p,m?"add":"remove"),checked:n.some(m=>m.id===p.id),children:d.jsx(h.Badge,{title:p.name,color:"purple",size:"medium",sx:{marginInline:8,marginBottom:A===u.length-1?8:4,marginTop:A===0?8:4}})},p.id)),l&&d.jsx(h.ComboBoxItem,{value:"new",onCheckedChange:f,children:d.jsxs(h.Box,{padding:8,flexDirection:"row",alignItems:"center",gap:4,children:[d.jsx(h.Icon,{name:"add",size:"small",color:"grey11"}),d.jsxs(h.Text,{color:"grey12",children:['Create tag "',t,'"']})]})})]}):null}function yEe(e){const{name:t,config:n}=e;n.mediaLibrary||Pn("mediaLibrary");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return xe.request(new URL("tags",r),{headers:{repository:i},body:{name:t},method:"POST",credentials:xe.getRequestCredentials(o),okType:BR})}function bEe(e){const{selectedMedia:t}=e,n=Oe(),r=E.useMemo(()=>mEe(t),[t]);async function i(a,s){const u=s==="remove",c=t.map(f=>f.id);let l=[];Lu(f=>(l=f,f.map(p=>c.includes(p.id)?u?_Ee(p,a):SEe(p,a):p)));try{await CEe({tagId:a.id,assetIds:c,operation:u?"remove":"add",config:n});const f=t.length*(u?-1:1);_h(p=>p.map(A=>A.id===a.id?{...A,count:A.count+f}:A))}catch(f){throw Lu(()=>l),f}}function o(){const a=r.length;return a>1?`${a} tags in common`:a===1?"1 tag in common":"Common tags"}return d.jsx(c7,{tags:r,getTagsLabel:o,toggleAssetTag:i})}function CEe(e){const{tagId:t,assetIds:n,config:r,operation:i}=e;if(!r.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:o,repository:a,authStrategy:s}=r;return xe.request(new URL(`tags/${t}/assets`,o),{headers:{repository:a},body:{assetIds:n},method:i==="add"?"POST":"DELETE",credentials:xe.getRequestCredentials(s),okType:B.unknown()})}function SEe(e,t){return e.tags.some(({id:r})=>r===t.id)?e:{...e,tags:[...e.tags,t]}}function _Ee(e,t){const n=e.tags.filter(r=>r.id!==t.id);return{...e,tags:n}}function IEe(e){const{selectedMedia:t}=e,n=t.tags,r=Oe(),{updateMedia:i}=It();async function o(s,u){const c=t.tags,l=u==="remove",f=l?c.filter(p=>p.id!==s.id):[...c,s];i(t.id,{tags:f});try{await TEe({mediaId:t.id,config:r,tags:f.map(p=>p.id)}),_h(p=>p.map(A=>A.id===s.id?{...A,count:A.count+(l?-1:1)}:A))}catch(p){throw i(t.id,{tags:c}),p}}function a(){const s=n.length;return s>1?`${s} tags`:s===1?"1 tag":"Tags"}return d.jsx(c7,{tags:n,getTagsLabel:a,toggleAssetTag:o})}function TEe(e){const{mediaId:t,config:n,tags:r}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return xe.request(new URL(`assets/${t}`,i),{headers:{repository:o},body:{tags:r},method:"PATCH",credentials:xe.getRequestCredentials(a),okType:V0})}function xEe(){const[e,t]=E.useState("description");if(Bc().length!==1)return d.jsx(REe,{});const r=e==="description",i=e==="more-info";return d.jsxs(d.Fragment,{children:[d.jsxs(h.Box,{border:!0,borderStyle:"solid",borderRadius:8,backgroundColor:"grey2",children:[d.jsx(h.Tab,{title:"Description",selected:r,onSelect:()=>t("description"),outline:r,background:r?void 0:"transparent",sx:{flexGrow:1,flexBasis:0}}),d.jsx(h.Tab,{title:"More info",selected:i,onSelect:()=>t("more-info"),outline:i,background:i?void 0:"transparent",sx:{flexGrow:1,flexBasis:0}})]}),d.jsx(wEe,{tab:e})]})}function wEe(e){const{tab:t}=e;switch(t){case"description":return d.jsx(EEe,{});case"more-info":return d.jsx($Ee,{})}}function EEe(){const{title:e,alt:t,onBlur:n,isUploading:r,selectedMedia:i}=l7();if(!i)return null;const{extension:o}=i;return d.jsxs(h.Box,{flexDirection:"column",gap:16,children:[d.jsx(h.FormInput,{value:e.value,onValueChange:e.set,label:"Media title",placeholder:"Media title",onBlur:n,disabled:r,suffix:o?`.${o}`:void 0}),d.jsx(h.FormInputField,{label:"Alternative text",children:d.jsx(h.ContentEditable,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"A short description of the media for accessibility",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})}),!r&&d.jsx(IEe,{selectedMedia:i})]})}function $Ee(){const{credits:e,notes:t,onBlur:n,isUploading:r,selectedMedia:i}=l7();if(!i)return null;const o=MEe(i);return d.jsxs(h.Box,{gap:8,flexDirection:"column",children:[o.map(a=>d.jsxs(h.Box,{gap:8,children:[d.jsxs(h.Text,{color:"grey11",children:[a.label,":"]}),d.jsx(h.Text,{children:a.value})]},a.label)),d.jsx(h.FormInputField,{label:"Copyright",children:d.jsx(h.ContentEditable,{content:e.displayValue,contentVersion:e.version,readOnly:r,placeholder:"Media copyrights or credits",multiline:!0,decorations:{em:"highlight"},onChange:e.onChange,onBlur:n})}),d.jsx(h.FormInputField,{label:"Private notes",children:d.jsx(h.ContentEditable,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"Private notes are never shared publicly",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})})]})}function REe(){const e=Bc(),{uploadingFiles:t}=It(),n=E.useMemo(()=>t.some(r=>e.some(i=>r.id===i.id)&&r.status!=="success"),[e,t]);return d.jsx(d.Fragment,{children:!n&&d.jsx(bEe,{selectedMedia:e})})}function l7(){const[e]=Bc(),{updateMedia:t,uploadingFiles:n}=It(),r=Oe(),{showToast:i}=s7(),o=(e==null?void 0:e.id)??"",a=Nh(e,"alt"),s=Nh(e,"notes"),u=Nh(e,"credits"),c=Nh(e,"filename",hEe),l=n.some(p=>p.id===(e==null?void 0:e.id)&&p.status!=="success");function f(){if(!e||!c.changed&&!a.changed&&!u.changed&&!s.changed)return;const{extension:p,search_highlight:A}=e,m=p?`${c.value}.${p}`:c.value;t(o,{filename:m,alt:a.value,credits:u.value,notes:s.value,search_highlight:{alt:a.changed||A==null?void 0:A.alt,credits:u.changed||A==null?void 0:A.credits,filename:c.changed||A==null?void 0:A.filename,notes:s.changed||A==null?void 0:A.notes}}),FEe({id:o,config:r,metadata:{filename:m,alt:a.value,credits:u.value,notes:s.value}}).then(()=>{i({title:"Media metadata has been saved.",seconds:3})}).catch(v=>{console.error(v)})}return{selectedMedia:e,onBlur:f,isUploading:l,title:c,alt:a,credits:u,notes:s,extension:e==null?void 0:e.extension}}function Nh(e,t,n=r=>r==null?void 0:r[t]){var c;const r=n(e)??"",[i,o]=E.useState(r);Qe.useOnChange(e==null?void 0:e.id,()=>o(r));const a=(c=e==null?void 0:e.search_highlight)==null?void 0:c[t],s=!!a;function u(l){const{from:f,to:p}=l.state.selection;l.commands.selectAll(),l.commands.unsetAllMarks(),l.commands.setTextSelection({from:f,to:p}),o(l.getText())}return{value:i,set:o,displayValue:OEe(a??i)??"",onChange:u,version:`${(e==null?void 0:e.id)??""}_${s}`,changed:i!==r}}function OEe(e){return e==null?void 0:e.replace(/\n/g,"<br>")}function FEe(e){const{id:t,config:n,metadata:r}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return xe.request(new URL(`assets/${t}`,i),{headers:{repository:o},body:{...r},method:"PATCH",credentials:xe.getRequestCredentials(a),okType:V0})}function MEe(e){const{width:t,height:n,last_modified:r,size:i,extension:o}=e,a=t&&n,s={label:"Date",value:GC.prettyPrintDate(new Date(r))},u={label:"File size",value:wp.formatBytes(i)},c=a?{label:"Dimensions",value:`${t}×${n}`}:void 0,l=a?{label:"Ratio",value:((t??0)/(n??0)).toFixed(1)}:void 0,f=o?{label:"Extension",value:o.toUpperCase()}:void 0;return[s,u,c,l,f].filter(io.isDefined)}function kEe(){const{setTagManagerOpen:e}=It(),[t,n]=E.useState("");return d.jsxs(h.Box,{gap:20,flexDirection:"column",height:"100%",children:[d.jsxs(h.Box,{alignItems:"center",gap:4,children:[d.jsx(h.IconButton,{icon:"close",size:"small",hasPadding:!1,onClick:()=>e(!1)}),d.jsx(h.Text,{variant:"bold",children:"Tags management"})]}),d.jsxs(h.Box,{gap:16,flexDirection:"column",height:"100%",children:[d.jsx(h.FormSearchInput,{value:t,onValueChange:n,placeholder:"Search for tags",endAdornment:!1,autoFocus:!0}),d.jsx(h.ErrorBoundary,{renderError:()=>d.jsx(BEe,{}),children:d.jsx(E.Suspense,{fallback:d.jsx(DEe,{}),children:d.jsx(LEe,{searchTerm:t})})})]})]})}function LEe(e){const{searchTerm:t}=e,{tags:n}=Sh(),r=n.filter(i=>i.name.toLowerCase().includes(t.toLowerCase()));return r.length===0?d.jsx(h.Text,{color:"grey9",variant:"small",children:"No tags found"}):d.jsx(h.AnimatedList,{ariaLabel:"Tags list",getItemKey:i=>i.id,gap:16,items:r,children:i=>d.jsx(jEe,{tag:i})})}function jEe(e){const{tag:t}=e,[n,r]=E.useState(!1),i=Oe(),{showAlert:o}=h.useAlert(),{showToast:a}=h.useToast(),{tags:s}=Sh();async function u(c){if(!UR.safeParse(c).success){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${c}". Tag name must be at least ${Dq} and at maximum ${Kq} characters long.`});return}if(s.some(p=>p.name===c)){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${c}". Tag with name "${c}" already exists.`});return}try{await WEe({id:t.id,name:c,config:i}),_h(p=>p.map(A=>A.id===t.id?{...A,name:c}:A)),Lu(p=>p.map(A=>{if(A.tags.findIndex(v=>v.id===t.id)!==-1){const v=A.tags.map(_=>_.id===t.id?{..._,name:c}:_);return{...A,tags:v}}return A})),a({title:`Tag "${t.name}" renamed to "${c}"`,seconds:3})}catch{o({title:"Error",subtitle:"Something went wrong when renaming the tag."})}}return d.jsxs(d.Fragment,{children:[d.jsxs(h.Box,{justifyContent:"space-between",children:[d.jsx(h.Badge,{title:t.name,color:"purple",size:"medium",onEdit:u}),d.jsx(h.Button,{invisible:!0,color:"tomato",textWeight:"normal",onClick:()=>r(!0),children:"Delete"})]}),d.jsx(UEe,{open:n,onOpenChange:r,tag:t})]})}function UEe(e){const{open:t,onOpenChange:n,tag:r}=e,{id:i,name:o,count:a}=r,s=Oe(),{showAlert:u}=h.useAlert(),[c,l]=E.useState(!1);async function f(){l(!0);try{await PEe({id:i,config:s}),_h(p=>p.filter(A=>A.id!==i)),Lu(p=>p.map(A=>{if(A.tags.findIndex(v=>v.id===i)!==-1){const v=A.tags.filter(_=>_.id!==i);return{...A,tags:v}}return A}))}catch{u({title:"Error",subtitle:"Something went wrong when removing the tag."})}finally{l(!1),n(!1)}}return d.jsxs(h.Dialog,{onOpenChange:n,open:t,size:"small",children:[d.jsx(h.DialogHeader,{title:`This tag is being used on ${a} media item${a===1?"":"s"}`}),d.jsx(h.DialogContent,{padding:16,children:d.jsxs(h.Text,{children:["You are about to delete the tag name ",d.jsx("b",{children:o}),"."," ",a>0&&`This tag is being
33
33
  used on ${a} media item${a===1?"":"s"} and will be deleted
34
- from ${a===1?"it":"them"}.`]})}),d.jsxs(h.DialogActions,{children:[d.jsx(h.DialogCancelButton,{}),d.jsx(h.DialogActionButton,{onClick:f,color:"tomato",loading:c,children:"Yes, I want to delete"})]})]})}function BEe(){const e=E.useContext(Xe.ErrorBoundaryContext);return d.jsx(h.Box,{flexDirection:"column",children:d.jsxs(h.BlankSlate,{children:[d.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed"}),d.jsx(h.BlankSlateTitle,{size:"big",children:"Oops!"}),d.jsx(h.BlankSlateDescription,{width:360,children:"We couldn't load your media tags."}),d.jsx(h.BlankSlateActions,{children:d.jsx(h.Button,{onClick:e==null?void 0:e.reset,size:"medium",children:"Try again"})})]})})}function PEe(e){const{id:t,config:n}=e;n.mediaLibrary||Pn("mediaLibrary");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return xe.request(new URL(`tags/${t}`,r),{headers:{repository:i},method:"DELETE",credentials:xe.getRequestCredentials(o),okType:B.unknown()})}function WEe(e){const{id:t,name:n,config:r}=e;r.mediaLibrary||Pn("mediaLibrary");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=r;return xe.request(new URL(`tags/${t}`,i),{headers:{repository:o},method:"PATCH",credentials:xe.getRequestCredentials(a),body:{name:n},okType:B.unknown()})}function DEe(){return d.jsx(h.Box,{flexDirection:"column",gap:16,children:vn.range(1,6).map(e=>d.jsxs(h.Box,{justifyContent:"space-between",children:[d.jsx(h.Skeleton,{height:24,width:85}),d.jsx(h.Skeleton,{height:24,width:45})]},e))})}function KEe(){const e=Bc(),{onFilesUpload:t,isUploading:n,tagManagerOpen:r}=It();return e.length===0&&r===!1?d.jsx(i7,{onFilesUpload:t,isUploading:n}):d.jsx(h.Box,{flexDirection:"column",backgroundColor:"grey1",width:"100%",padding:16,gap:16,borderRadius:{topLeft:8,topRight:8},children:r?d.jsx(kEe,{}):d.jsxs(d.Fragment,{children:[d.jsx(Zwe,{}),d.jsx(tEe,{}),d.jsx(xEe,{})]})})}function NEe(){const e=Vs();return d.jsx(r7,{hasSelectedMedia:e.selectedCount!==0,children:d.jsx(KEe,{})})}function f7(e){const{assetType:t,onSelectedChange:n,actionContainerRef:r}=e;return d.jsx(h.ErrorBoundary,{renderError:()=>d.jsx(Xq,{}),children:d.jsx(E.Suspense,{fallback:d.jsx(Pwe,{actionContainerRef:r}),children:d.jsx(_q,{children:d.jsx(Rwe,{assetType:t,actionContainerRef:r,onSelectedChange:n,children:d.jsx(jwe,{children:d.jsx(qEe,{})})})})})})}function qEe(){const{media:e}=It(),t=Yq();return d.jsx(Nwe,{children:d.jsx(e7,{sidePane:t?void 0:d.jsx(NEe,{}),mediaActions:d.jsx(kwe,{}),mediaToolbar:d.jsx(Vwe,{}),mediaList:e.length===0?d.jsx(Fwe,{}):d.jsx(Bwe,{})})})}var d7={};Object.defineProperty(d7,"__esModule",{value:!0});var VEe=d7.confetti=XEe,QEe=["#a864fd","#29cdff","#78ff44","#ff718d","#fdff6a"];function zEe(e,t,n,r,i){return Array.from({length:t}).map(function(o,a){var s=document.createElement("div"),u=n[a%n.length];return s.style["background-color"]=u,s.style.width=r,s.style.height=i,s.style.position="absolute",s.style.willChange="transform, opacity",s.style.visibility="hidden",e.appendChild(s),s})}function HEe(e,t,n,r){var i=e*(Math.PI/180),o=t*(Math.PI/180);return{x:0,y:0,z:0,wobble:r()*10,wobbleSpeed:.1+r()*.1,velocity:n*.5+r()*n,angle2D:-i+(.5*o-r()*o),angle3D:-(Math.PI/4)+r()*(Math.PI/2),tiltAngle:r()*Math.PI,tiltAngleSpeed:.1+r()*.3}}function YEe(e,t,n,r){e.physics.x+=Math.cos(e.physics.angle2D)*e.physics.velocity,e.physics.y+=Math.sin(e.physics.angle2D)*e.physics.velocity,e.physics.z+=Math.sin(e.physics.angle3D)*e.physics.velocity,e.physics.wobble+=e.physics.wobbleSpeed,r?e.physics.velocity*=r:e.physics.velocity-=e.physics.velocity*n,e.physics.y+=3,e.physics.tiltAngle+=e.physics.tiltAngleSpeed;var i=e.physics,o=i.x,a=i.y,s=i.z,u=i.tiltAngle,c=i.wobble,l=o+10*Math.cos(c),f=a+10*Math.sin(c),p="translate3d("+l+"px, "+f+"px, "+s+"px) rotate3d(1, 1, 1, "+u+"rad)";e.element.style.visibility="visible",e.element.style.transform=p,e.element.style.opacity=1-t}function GEe(e,t,n,r,i,o){var a=void 0;return new Promise(function(s){function u(c){a||(a=c);var l=c-a,f=a===c?0:(c-a)/i;t.slice(0,Math.ceil(l/o)).forEach(function(p){YEe(p,f,n,r)}),c-a<i?requestAnimationFrame(u):(t.forEach(function(p){if(p.element.parentNode===e)return e.removeChild(p.element)}),s())}requestAnimationFrame(u)})}var JEe={angle:90,spread:45,startVelocity:45,elementCount:50,width:"10px",height:"10px",perspective:"",colors:QEe,duration:3e3,stagger:0,dragFriction:.1,random:Math.random};function ZEe(e){return!e.stagger&&e.delay&&(e.stagger=e.delay),e}function XEe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Object.assign({},JEe,ZEe(t)),r=n.elementCount,i=n.colors,o=n.width,a=n.height,s=n.perspective,u=n.angle,c=n.spread,l=n.startVelocity,f=n.decay,p=n.dragFriction,A=n.duration,m=n.stagger,v=n.random;e.style.perspective=s;var _=zEe(e,r,i,o,a),S=_.map(function(I){return{element:I,physics:HEe(u,c,l,v)}});return GEe(e,S,p,f,A,m)}function e$e(e){const{href:t,variant:n}=e,r=n==="dark"?"white":"grey11";return d.jsx(h.Box,{justifyContent:"center",padding:{block:6},children:d.jsxs(h.Text,{href:t,variant:"smallBold",color:r,children:["Or watch our full course",d.jsx(h.Icon,{name:"playCircle",color:r,size:"small",sx:{marginLeft:4}})]})})}const t$e=[{id:"createPageType",title:"Create a Page Type",description:"Build the structure for your page.",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Create_page_type_xdn13j.mp4",content:d.jsx(h.Text,{children:"A page type is a base content structure editors will use to create pages in the Page Builder (Prismic's content creation UI). A page type can be reusable (e.g., for multiple blog posts) or single (e.g., for a one-time page like the homepage)."})},{id:"codePage",title:"Code Your Page Type",description:"Prepare code to fetch content.",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Step2_code_your_page_jatiur.mp4",content:d.jsx(h.Text,{children:"Prepare your code to query the content from the Prismic API."})},{id:"createSlice",title:"Create a Slice",description:"Build a reusable website section.",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918322/DEV_TOOLS/ONBOARDING_GUIDE/Step3_add_slice_qzmvxf.mp4",content:d.jsx(h.Text,{children:"Slices are website sections that can be reused on different pages with different content. Each slice has a code component automatically generated by Slice Machine. Start with a template and look at your code to see how it's structured."})},{id:"reviewAndPush",title:"Review and Push Changes",description:"Enable editors to create content.",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/DevTools_Squad_push_changes_ovvmul.mp4",content:d.jsx(h.Text,{children:"Your page types and slices currently exist only in your local project. Push them to your repository to make them available for your content editors."})},{id:"createContent",title:"Create Content",description:"Publish a page to the Prismic API.",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918324/DEV_TOOLS/ONBOARDING_GUIDE/Cre%CC%81er_contenu_e%CC%81tape_4_z9vlzt.mp4",content:d.jsx(h.Text,{children:"In Prismic, content creation takes place in the Prismic Page Builder UI. Open the Page Builder and start creating your first page."})},{id:"renderPage",title:"Render your page",description:"View your page in the browser.",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918321/DEV_TOOLS/ONBOARDING_GUIDE/Step_6_Render_Page_tnauh9.mp4",content:d.jsxs(h.Text,{children:["Now that your content is published, you can run your project in your terminal and visit the page on your local server (e.g.,"," ",d.jsx(h.Text,{component:"code",children:"localhost:3000/example-page"}),"). Your content should now be visible!"]})}],n$e=[{id:"createProject",title:"Create your Prismic website",description:"Create and set up your project",defaultCompleted:!0},{id:"createPageType",title:"Create your first Page Type",description:"Build the structure of your page",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Create_page_type_xdn13j.mp4",content:d.jsx(h.Text,{children:"A page type is a base content structure editors will use to create pages in the Page Builder (Prismic's content creation UI). A page type can be reusable (e.g., for multiple blog posts) or single (e.g., for a one-time page like the homepage)."})},{id:"codePage",title:"Code your Page",description:"Prepare code to fetch content",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Step2_code_your_page_jatiur.mp4",content:d.jsx(h.Text,{children:"Prepare your code to query the content from the Prismic API."})},{id:"createSlice",title:"Create your first Slice",description:"Build a reusable section",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918322/DEV_TOOLS/ONBOARDING_GUIDE/Step3_add_slice_qzmvxf.mp4",content:d.jsx(h.Text,{children:"Slices are website sections that can be reused on different pages with different content. Each slice has a code component automatically generated by Slice Machine. Start with a template and look at your code to see how it's structured."})},{id:"reviewAndPush",title:"Review & push changes",description:"Enable editors to create content",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/DevTools_Squad_push_changes_ovvmul.mp4",content:d.jsx(h.Text,{children:"Your page types and slices currently exist only in your local project. Push them to your repository to make them available for your content editors."})},{id:"createContent",title:"Create content for your page",description:"Publish your page to the API",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918324/DEV_TOOLS/ONBOARDING_GUIDE/Cre%CC%81er_contenu_e%CC%81tape_4_z9vlzt.mp4",content:d.jsx(h.Text,{children:"In Prismic, content creation takes place in the Prismic Page Builder UI. Open the Page Builder and start creating your first page."})},{id:"renderPage",title:"Preview your page",description:"View your page in the browser",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918321/DEV_TOOLS/ONBOARDING_GUIDE/Step_6_Render_Page_tnauh9.mp4",content:d.jsxs(h.Text,{children:["Now that your content is published, you can run your project in your terminal and visit the page on your local server (e.g.,"," ",d.jsx(h.Text,{component:"code",children:"localhost:3000/example-page"}),"). Your content should now be visible!"]})}],r$e={next:"https://prismic.dev/course/next",nuxt:"https://prismic.dev/course/nuxt",sveltekit:"https://prismic.dev/course/sveltekit",other:""};function i$e(e){const{children:t,variant:n,framework:r,onComplete:i,track:o,fetchState:a,toggleStep:s}=e,[u,c]=E.useState();E.useEffect(()=>{(async()=>{try{const T=await a();c(T)}catch(T){console.error("Error fetching onboarding progress state:",T)}})()});const l=n==="default"?t$e:n$e,f=l.map(({id:I})=>I),p=l.filter(I=>I.defaultCompleted).length,A=((u==null?void 0:u.completedSteps.filter(I=>f.includes(I)).length)??0)+p,m=n!=="default"&&r$e[r]||void 0;async function v(I){try{const T=await s(I.id);c({isResolved:!!(u!=null&&u.isResolved),completedSteps:T}),T.includes(I.id)&&o({event:"onboarding:step-completed",stepId:I.id,stepTitle:I.title}),T.length+p===l.length&&(i==null||i(),o({event:"onboarding:completed"}))}catch(T){console.error("Error toggling step completion",T)}}function _(I){return!!(u!=null&&u.completedSteps.includes(I.id)||I.defaultCompleted)}function S(I){return l.findIndex(({id:T})=>T===I)}return d.jsx(p7.Provider,{value:{steps:l,variant:n,tutorialLink:m,completedStepsCount:A,isResolved:u==null?void 0:u.isResolved,isStepComplete:_,getStepIndex:S,toggleStepComplete:v,track:o},children:t})}const p7=E.createContext(void 0),PR=()=>{const e=E.useContext(p7);if(e==null)throw new Error("useOnboardingContext must be used within an OnboardingProvider");return e};function o$e(e){const{step:t,stepIndex:n,isOpen:r,isStepComplete:i,onActionClick:o,onClose:a}=e,[s,u]=E.useState(c);function c(){return i?"Undo step":"Mark as done"}function l(){r&&u(c())}return d.jsxs(h.Dialog,{open:r,onOpenChange:a,onAnimationEnd:l,onAnimationStart:l,size:"small",children:[d.jsx(h.DialogHeader,{title:"Onboarding"}),d.jsxs(h.DialogContent,{children:[d.jsx(h.ScrollArea,{children:d.jsxs(h.Box,{as:"article",flexDirection:"column",padding:16,gap:16,children:[d.jsxs("section",{children:[d.jsxs(h.Text,{sx:{marginBottom:4},color:"purple9",variant:"bold",children:["Step ",n]}),d.jsx(h.Text,{variant:"h3",children:t.title}),t.content]}),t.videoUrl&&d.jsx(h.Video,{src:t.videoUrl,sizing:"contain",autoPlay:!0,loop:!0})]})}),d.jsxs(h.DialogActions,{children:[d.jsx(h.DialogCancelButton,{size:"medium",children:"Close"}),d.jsx(h.DialogActionButton,{size:"medium",onClick:o,children:s})]})]})]})}function a$e(e){const{variant:t}=e,{steps:n,completedStepsCount:r,getStepIndex:i,isStepComplete:o,toggleStepComplete:a,track:s}=PR(),[u,c]=E.useState(!1),[l,f]=E.useState(n[0]);if(!l)return null;function p(m){m.defaultCompleted||(f(m),c(!0),s({event:"onboarding:step-opened",stepId:m.id,stepTitle:m.title}))}function A(){l&&a(l),c(!1)}return d.jsxs(d.Fragment,{children:[d.jsx(o$e,{isOpen:u,step:l,stepIndex:i(l.id)+1,isStepComplete:o(l),onClose:()=>c(!1),onActionClick:A}),d.jsxs(h.DropdownMenu,{children:[d.jsx(h.DropdownMenuTrigger,{children:d.jsx(h.Button,{size:t==="default"?"medium":"large",color:"grey",sx:{width:"100%"},renderStartIcon:s$e,children:r>0?"Continue":"Start now"})}),d.jsxs(h.DropdownMenuContent,{side:"right",minWidth:256,collisionPadding:8,children:[d.jsx(h.DropdownMenuLabel,{children:d.jsx(h.Text,{variant:"small",color:"grey11",sx:{marginInline:8},children:"Progress"})}),n.map((m,v)=>{const _=o(m);return d.jsx(h.DropdownMenuItem,{onSelect:()=>p(m),description:m.description,completed:_,readOnly:m.defaultCompleted,endAdornment:m.defaultCompleted!==!0&&d.jsx(h.Icon,{name:"chevronRight",size:"small",color:"grey11"}),children:t==="default"?m.title:`${v+1} ${m.title}`},m.id)})]})]})]})}function s$e(){return d.jsx(h.Icon,{name:"arrowForward",size:"small",color:"grey11"})}function u$e(e){const{onClose:t}=e,{steps:n,completedStepsCount:r,tutorialLink:i,variant:o}=PR(),{cardColor:a,cardVariant:s,cardDescription:u,cardTitle:c,descriptionColor:l,descriptionVariant:f,progressColor:p,progressBackgroundColor:A,progressLabelColor:m,titleColor:v}=c$e({variant:o,stepsCount:n.length});return d.jsx(h.Card,{color:a,variant:s,paddingBlock:16,onClose:t,children:d.jsxs(h.CardContent,{children:[d.jsxs("div",{children:[d.jsx(h.Text,{variant:"bold",color:v,children:c}),d.jsx(h.Text,{color:l,variant:f,children:u})]}),d.jsx(h.ProgressBar,{color:p,backgroundColor:A,labelColor:m,value:r,max:n.length,displayLabel:!0,getValueLabel:(_,S)=>`${_}/${S}`}),d.jsx(a$e,{variant:o}),o!=="default"&&i&&d.jsx(e$e,{href:i,variant:o})]})})}function c$e({variant:e,stepsCount:t}){const n=t.toString();switch(e){case"light":return{cardDescription:"Render a live page with content coming from Prismic in 5 mins",cardTitle:`Build your first Prismic Page in ${n} simple steps`,cardVariant:"animated-light",descriptionColor:"grey11",titleColor:"grey12"};case"dark":return{cardDescription:"Render a live page with content coming from Prismic in 5 mins",cardTitle:`Build your first Prismic Page in ${n} simple steps`,cardVariant:"animated-dark",descriptionColor:"purple6",progressColor:"white",progressBackgroundColor:"purple8",progressLabelColor:"purple3",titleColor:"purple1"};default:return{cardColor:"grey2",cardVariant:"outlined",cardTitle:`Build a page in ${n} steps`,cardDescription:"Render a live page with content coming from Prismic",descriptionColor:"grey11",descriptionVariant:"small",titleColor:"grey12"}}}function l$e(e){const{isOnboardingVisible:t,isFadedOut:n,resolveGuide:r}=e,{isResolved:i}=PR(),[o,a]=E.useState(!1),[s,u]=E.useState(!1),[c,l]=E.useState(!0),f=E.useRef(null),p=E.useRef(null);function A(){u(!1),a(!0),l(!0)}function m(){a(!1)}function v(){const{current:_}=f,{current:S}=p;_&&S&&(S.style.overflow="hidden",l(!1),VEe(_,Dm)),setTimeout(()=>{u(!0)},f$e),setTimeout(()=>{a(!1),r()},Dm.duration)}return Qe.useOnChange(n,()=>{n&&v()}),Qe.useOnChange(i,()=>{a(!i)}),d.jsxs(d.Fragment,{children:[!o&&t&&d.jsx(h.ActionListItem,{textVariant:"normal",backgroundColor:"transparent",startIcon:"notStarted",onClick:A,children:"Get started"}),o&&t&&d.jsx(h.AnimatedElement,{enterDuration:0,exitDuration:A7,children:!s&&d.jsxs("div",{ref:p,style:{position:"relative"},children:[d.jsx(u$e,{onClose:c?m:void 0}),d.jsx("div",{ref:f,style:{position:"absolute",bottom:0,left:0}})]})})]})}const Dm={colors:["#8E44EC","#E8C7FF","#59B5F8","#C3EEFE"],elementCount:300,width:"8px",height:"8px",stagger:.2,startVelocity:35,spread:90,duration:3e3},A7=400,f$e=Dm.duration?Dm.duration-A7:0;function d$e(e){const{isOnboardingVisible:t=!0,variant:n="default",framework:r="other",track:i,fetchState:o,toggleStep:a,resolveGuide:s}=e,[u,c]=E.useState(!1);return d.jsx(i$e,{variant:n,framework:r,onComplete:()=>c(!0),track:i,fetchState:o,toggleStep:a,children:d.jsx(l$e,{isOnboardingVisible:t,isFadedOut:u,resolveGuide:s})})}const h7=E.createContext({editedUID:{current:!1},onEditUID:()=>{}});function m7(e){return Object.values(e.json).some(t=>{var n;return((n=t.uid)==null?void 0:n.type)==="UID"})}function p$e(e){const{content:t,customType:n}=e;return m7(n)&&!t.uid}function g7(e){const{documentId:t,documentsWithUid:n,uid:r}=e;return n.filter(i=>t!==i.id&&h$e({document:i,uid:r})&&A$e({...e,document:i}))}function A$e(e){const{customTypeId:t,languageId:n,document:r}=e,i=t===r.custom_type_id,o=n===r.language.id;return i&&o}function h$e(e){const{document:t,uid:n}=e,r=t.versions.filter(i=>i.uid===n);return r.length===0?!0:r.some(i=>i.status!=="archived")}function v7(e,t){if(t)return`${e}___${t}`}const y7=E.createContext({update:()=>{}});function Q0(e){const{sliceKey:t}=e||{},n=E.useContext(y7),r=v7("sliceFieldSet",t),i=t===(n==null?void 0:n.id);return{selectionId:r,selected:i,selection:n}}function nr(e){var t;return((t=e.config)==null?void 0:t.label)??(e.type==="Boolean"||e.type==="Separator"?void 0:e.fieldset)??e.type}const WR="...";function m$e(e,t,n=WR){var r,i;return(t?(r=e.config)==null?void 0:r.placeholder_true:(i=e.config)==null?void 0:i.placeholder_false)||n}function Pc(e,t=WR){var n;return((n=e.config)==null?void 0:n.placeholder)||t}function g$e(e){var s;const{content:t,field:n,id:r,readOnly:i,onContentChange:o}=e,a=(t==null?void 0:t.value)??((s=n.config)==null?void 0:s.default_value)??!1;return d.jsxs(h.Field,{children:[d.jsx(h.FieldIcon,{name:"biToggle"}),d.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),d.jsxs(h.FieldControl,{children:[d.jsx(h.Box,{padding:4,alignItems:"center",children:d.jsx(h.Text,{children:m$e(n,a)})}),d.jsx(h.Switch,{id:r,sx:{alignSelf:"center",marginLeft:"auto",marginRight:12},checked:a,onCheckedChange:u=>{i||o(v$e(u))}})]})]})}function v$e(e){return{__TYPE__:"BooleanContent",value:e}}function y$e(e){const{id:t,field:n,content:r,onContentChange:i}=e;return d.jsxs(h.Field,{children:[d.jsx(h.FieldIcon,{name:"colorLens"}),d.jsx(h.FieldLabel,{id:t,children:nr(n)}),d.jsx(h.FieldControl,{children:d.jsx(h.Box,{padding:{left:4},alignItems:"center",children:d.jsx(h.ColorInput,{onValueChange:o=>i(b$e(o)),value:r==null?void 0:r.value,"aria-labelledby":t,placeholder:Pc(n)})})})]})}function b$e(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Color",value:e}}function C$e(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=i!=null&&i.value?GC.dateFromISOString(i.value):void 0;return d.jsxs(h.Field,{children:[d.jsx(h.FieldIcon,{name:"dateRange"}),d.jsx(h.FieldLabel,{id:t,children:nr(r)}),d.jsx(h.FieldControl,{children:d.jsx(h.Box,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:d.jsx(h.DateInput,{mode:"date","aria-labelledby":t,disabled:n,value:a,onValueChange:s=>o(S$e(s))})})})]})}function S$e(e){if(e)return{__TYPE__:"FieldContent",type:"Date",value:_$e(e)}}function _$e(e){const t=`${e.getFullYear()}`.padStart(4,"0"),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0");return`${t}-${n}-${r}`}const Qs=E.forwardRef(function(t,n){return d.jsx(h.TextInput,{padding:b7,...t,ref:n,sx:{...t.sx,alignSelf:"stretch"}})}),b7={input:{inline:4},adornment:{inline:12}},I$e=({provider:e})=>T$e[e.toLowerCase()]??d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6524_22412)",children:d.jsx("path",{d:"M7.99992 1.33333C4.31992 1.33333 1.33325 4.32 1.33325 8C1.33325 11.68 4.31992 14.6667 7.99992 14.6667C11.6799 14.6667 14.6666 11.68 14.6666 8C14.6666 4.32 11.6799 1.33333 7.99992 1.33333ZM2.66659 8C2.66659 7.59333 2.71992 7.19333 2.80659 6.81333L5.99325 10V10.6667C5.99325 11.4 6.59325 12 7.32658 12V13.2867C4.70658 12.9533 2.66659 10.7133 2.66659 8ZM11.9266 11.6C11.7533 11.06 11.2599 10.6667 10.6599 10.6667H9.99325V8.66667C9.99325 8.3 9.69325 8 9.32658 8H5.32658V6.66667H6.65992C7.02658 6.66667 7.32658 6.36667 7.32658 6V4.66667H8.65992C9.39325 4.66667 9.99325 4.06667 9.99325 3.33333V3.06C11.9466 3.84667 13.3333 5.76667 13.3333 8C13.3333 9.38667 12.7933 10.6533 11.9266 11.6Z",fill:"#6F6E77"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6524_22412",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),T$e={codepen:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6523_22409)",children:d.jsx("path",{d:"M15.9879 5.44292C15.9843 5.42352 15.981 5.40413 15.9759 5.38517C15.9726 5.37375 15.9688 5.36298 15.9651 5.35177C15.9597 5.33497 15.9541 5.31816 15.9474 5.30179C15.9427 5.29037 15.9373 5.27938 15.9321 5.26839C15.9248 5.25288 15.9173 5.23758 15.9086 5.22271C15.9026 5.21172 15.8957 5.20138 15.889 5.19082C15.8798 5.1766 15.8703 5.1626 15.8599 5.14902C15.8524 5.13889 15.8446 5.1292 15.8365 5.1195C15.8257 5.10657 15.8141 5.09429 15.8024 5.08223C15.7934 5.07318 15.7843 5.06413 15.7748 5.05529C15.7623 5.04387 15.7494 5.0331 15.7358 5.02276C15.7255 5.01479 15.7154 5.0066 15.7046 4.99927C15.7007 4.99647 15.6973 4.99324 15.6932 4.99065L8.38116 0.115543C8.15039 -0.0385144 7.84939 -0.0385144 7.61863 0.115543L0.306176 4.99044C0.302082 4.99302 0.29885 4.99626 0.294756 4.99906C0.283983 5.0066 0.273856 5.01457 0.263514 5.02254C0.250155 5.0331 0.237011 5.04387 0.224515 5.05486C0.215034 5.06348 0.205985 5.07253 0.19715 5.0818C0.185084 5.09386 0.17388 5.10614 0.162892 5.11907C0.154704 5.12877 0.146947 5.13846 0.139406 5.14924C0.129064 5.16281 0.119583 5.1766 0.110318 5.19104C0.103639 5.20159 0.0969593 5.21194 0.0907108 5.22293C0.0820922 5.23779 0.0745509 5.25309 0.0674405 5.26817C0.0622694 5.27916 0.0566673 5.29037 0.0521425 5.30157C0.0454631 5.31795 0.0396456 5.33475 0.0342589 5.35156C0.030596 5.36276 0.0267177 5.37375 0.0237011 5.38388C0.0187455 5.40284 0.0150825 5.42201 0.0116351 5.44162C0.00969592 5.45153 0.00732581 5.46123 0.00603302 5.47136C0.00215465 5.50109 0 5.53082 0 5.56121V10.4372C0 10.4673 0.00215465 10.4975 0.00646395 10.527C0.00797221 10.5378 0.0107733 10.5464 0.0129279 10.5568C0.0163753 10.5762 0.0193919 10.5955 0.0258558 10.6149C0.0288723 10.6257 0.0323198 10.6365 0.0366291 10.6483C0.0420157 10.6656 0.0474023 10.6828 0.0538662 10.6985C0.058391 10.7093 0.0646395 10.7201 0.0689488 10.7309C0.0760591 10.7459 0.0840314 10.761 0.09265 10.7768C0.098683 10.7875 0.105578 10.7983 0.112042 10.8082C0.121307 10.8233 0.131434 10.8362 0.142207 10.8491C0.149748 10.8599 0.157289 10.8685 0.165908 10.8789C0.176897 10.8918 0.187455 10.9047 0.200382 10.9162C0.209217 10.9248 0.21762 10.9355 0.228393 10.942C0.24089 10.9528 0.254249 10.9636 0.267177 10.9748C0.277519 10.9834 0.288723 10.9898 0.297342 10.9982C0.301436 11.0004 0.303806 11.0047 0.308115 11.0067L7.61863 15.8841C7.73412 15.9617 7.86641 16.0005 8 15.9998C8.13359 15.9992 8.26588 15.9611 8.38137 15.8841L15.6938 11.0092C15.6979 11.0067 15.7014 11.0036 15.7052 11.0008C15.716 10.9933 15.7261 10.9853 15.7365 10.9773C15.7498 10.9668 15.763 10.9558 15.7755 10.9446C15.785 10.9362 15.794 10.9269 15.8031 10.9179C15.8149 10.9058 15.8263 10.8935 15.8371 10.8806C15.8453 10.8709 15.8531 10.8612 15.8606 10.8509C15.8709 10.8373 15.8804 10.8233 15.8897 10.8091C15.8964 10.7987 15.903 10.7882 15.9093 10.7776C15.9179 10.7625 15.9254 10.7472 15.9328 10.7317C15.9379 10.7207 15.9433 10.7097 15.9481 10.6985C15.9548 10.6819 15.9604 10.6651 15.9657 10.6483C15.9694 10.6371 15.9733 10.6261 15.9765 10.6149C15.9815 10.596 15.9849 10.5766 15.9886 10.5572C15.9903 10.5473 15.9929 10.5376 15.994 10.5275C15.9978 10.4977 16 10.468 16 10.4376V5.5625C16 5.53212 15.9976 5.50238 15.994 5.47265C15.9922 5.46209 15.989 5.45347 15.9869 5.44292H15.9879ZM7.99978 9.62638L5.56826 8.00005L7.99978 6.37351L10.4315 8.00005L7.99978 9.62638ZM7.31245 5.17919L4.33171 7.17288L1.92561 5.56336L7.31245 1.97221V5.17919ZM3.09515 7.99984L1.37531 9.15021V6.84947L3.09515 7.99984ZM4.33171 8.82765L7.31245 10.8211V14.0281L1.92561 10.4365L4.33171 8.82722V8.82765ZM8.68733 10.8207L11.6681 8.82722L14.0744 10.4365L8.68733 14.0277V10.8207ZM12.9046 8.00027L14.6247 6.84969V9.15064L12.9046 7.99984V8.00027ZM11.6681 7.17288L8.68733 5.1794V1.97221L14.0744 5.56336L11.6681 7.17288Z",fill:"black"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22409",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),codesandbox:d.jsxs("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6523_22406)",children:d.jsx("path",{d:"M6.24312 14.1129V8.35021L1.28724 5.49888V8.78388L3.55732 10.0999V12.5702L6.24312 14.1129ZM7.53036 14.1468L10.2658 12.571V10.0422L12.5506 8.71812V5.47426L7.53036 8.3727V14.1468ZM11.8904 4.36906L9.25164 2.83995L6.93472 4.18436L4.60022 2.8386L1.93795 4.38817L6.90626 7.24665L11.8904 4.36906ZM0 12.0115V4.02675L6.91821 0L13.8378 4.00984V11.9988L6.91805 15.985L0 12.0115Z",fill:"black"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22406",children:d.jsx("rect",{width:"13.8378",height:"16",fill:"white"})})})]}),dailymotion:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsxs("g",{clipPath:"url(#clip0_6523_22345)",children:[d.jsx("path",{d:"M16 0H0V16H16V0Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.73038 10.3003C8.40789 10.6268 8.00377 10.7901 7.51804 10.7901C7.04025 10.7901 6.64411 10.6308 6.32956 10.3122C6.01503 9.99367 5.85776 9.58351 5.85776 9.08176C5.85776 8.60389 6.01901 8.20766 6.3415 7.89306C6.66401 7.57847 7.06016 7.42118 7.52998 7.42118C7.84849 7.42118 8.13715 7.49484 8.39594 7.64219C8.65474 7.78953 8.8558 7.99063 8.99913 8.2455C9.14246 8.50034 9.21412 8.77908 9.21412 9.08176C9.21412 9.56757 9.05287 9.97376 8.73038 10.3003ZM9.10662 3.58632V6.35792C8.82791 6.07918 8.53131 5.87808 8.21678 5.75463C7.90223 5.63118 7.54988 5.56946 7.1597 5.56946C6.53062 5.56946 5.96527 5.72476 5.4636 6.03538C4.96193 6.34597 4.57176 6.77007 4.29305 7.30768C4.01435 7.84528 3.875 8.44062 3.875 9.09369C3.875 9.76269 4.01236 10.366 4.28708 10.9036C4.5618 11.4412 4.95197 11.8653 5.45763 12.1759C5.96328 12.4865 6.54258 12.6418 7.19553 12.6418C8.14312 12.6418 8.80403 12.3312 9.17831 11.71H9.20218V12.5595H11.0894V3.15625L9.10662 3.58632Z",fill:"#232323"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22345",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),flickr:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("rect",{width:"16",height:"16",fill:"white"}),d.jsxs("g",{clipPath:"url(#clip0_6523_22379)",children:[d.jsx("path",{d:"M8.43286 7.78387C8.43286 9.321 9.67925 10.5674 11.2166 10.5674C12.7538 10.5674 13.9999 9.321 13.9999 7.78387C13.9999 6.24675 12.7538 5.00061 11.2166 5.00061C9.67925 5.00061 8.43286 6.24675 8.43286 7.78387Z",fill:"#FF0084"}),d.jsx("path",{d:"M2 7.78408C2 9.32121 3.24614 10.5676 4.78352 10.5676C6.32089 10.5676 7.56703 9.32121 7.56703 7.78408C7.56703 6.24695 6.32089 5.00081 4.78352 5.00081C3.24614 5.00081 2 6.24695 2 7.78408Z",fill:"#0063DC"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22379",children:d.jsx("rect",{width:"12",height:"5.568",fill:"white",transform:"translate(2 5)"})})})]}),giphy:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("rect",{width:"16",height:"16",fill:"#121212"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3.38889V12.2778H5.11111V3.38889H4Z",fill:"#00FF99"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6663 5.61111V12.2778H11.7774V5.61111H10.6663Z",fill:"#9933FF"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.75 3H4V4.11111H8.83333V3H7.75Z",fill:"#FFF35C"}),d.jsx("path",{d:"M9.00041 4.11111H7.33374H8.83374V3.77778L9.00041 4.11111Z",fill:"#999999"}),d.jsx("path",{d:"M8.83374 4.11111H7.33374L8.44485 3L8.83374 3.77778V4.11111Z",fill:"#999237"}),d.jsx("path",{d:"M10.6663 7.44444V5.77778L11.7774 6.33333L10.6663 7.44444Z",fill:"#5C1F99"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6667 11.8889H4V13H11.7778V11.8889H10.6667Z",fill:"#00CCFF"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6668 5.22222V4.11111H9.55569V3H8.44458V3.90739V5.0185V6.33333H9.55569H10.6668H11.7779V5.22222H10.6668Z",fill:"#FF6666"})]}),instagram:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[d.jsxs("g",{clipPath:"url(#clip0_6523_22356)",children:[d.jsx("mask",{id:"mask0_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:d.jsx("path",{d:"M4.70325 0.0949238C3.85627 0.1349 3.27778 0.270564 2.77227 0.468642C2.24897 0.672648 1.80537 0.946046 1.36408 1.38914C0.922279 1.83249 0.650958 2.27688 0.448504 2.8007C0.252489 3.3075 0.119662 3.88627 0.0822604 4.73377C0.045126 5.58283 0.0366102 5.85363 0.0407495 8.01522C0.0448729 10.1765 0.0544124 10.4479 0.0949012 11.2972C0.135388 12.1439 0.270546 12.7222 0.468623 13.2279C0.672886 13.7512 0.946004 14.1946 1.38935 14.6361C1.83245 15.0777 2.27708 15.3487 2.80115 15.5515C3.30744 15.7472 3.88644 15.8806 4.73369 15.9177C5.58273 15.9551 5.85379 15.9634 8.01483 15.9592C10.1769 15.9551 10.448 15.9456 11.297 15.9053C12.144 15.8648 12.722 15.7292 13.228 15.5316C13.7513 15.3268 14.1949 15.0542 14.6362 14.6109C15.0775 14.1678 15.3488 13.7231 15.5512 13.199C15.7473 12.6927 15.8806 12.1137 15.9175 11.267C15.9546 10.4174 15.9634 10.1461 15.9593 7.98478C15.9551 5.8232 15.9453 5.55239 15.9051 4.7036C15.8649 3.85609 15.7292 3.27811 15.5314 2.77208C15.3269 2.24877 15.054 1.80567 14.6109 1.36387C14.1678 0.922574 13.7232 0.650729 13.1991 0.448785C12.6926 0.252768 12.1138 0.119166 11.2666 0.0825425C10.4175 0.0448876 10.1465 0.0366393 7.98465 0.0407642C5.82336 0.0448892 5.5523 0.0541772 4.70325 0.0949238ZM4.79611 14.485C4.02004 14.4512 3.59863 14.3222 3.31776 14.2142C2.94585 14.0703 2.68046 13.8977 2.40114 13.6205C2.12234 13.3422 1.94928 13.0776 1.80408 12.7064C1.69497 12.4255 1.5637 12.0046 1.52734 11.2286C1.48788 10.3896 1.47886 10.1378 1.47498 8.01237C1.47086 5.88742 1.47859 5.63569 1.51522 4.79593C1.54848 4.02038 1.67822 3.59843 1.78602 3.31782C1.92993 2.94539 2.10196 2.68051 2.37973 2.4012C2.65801 2.12187 2.92263 1.94933 3.29402 1.80412C3.57463 1.69451 3.99555 1.56426 4.77134 1.52738C5.61084 1.48766 5.8623 1.47915 7.98723 1.47502C10.1127 1.47089 10.3644 1.47838 11.2042 1.51526C11.9797 1.54904 12.4016 1.67749 12.682 1.78607C13.0541 1.92998 13.3195 2.1015 13.5986 2.37979C13.8777 2.65808 14.0507 2.92218 14.1959 3.29435C14.3055 3.57418 14.4358 3.99562 14.4724 4.77117C14.5124 5.61068 14.5214 5.8624 14.5253 7.98736C14.5294 10.1128 14.5217 10.3646 14.4848 11.2038C14.451 11.9799 14.3223 12.4016 14.214 12.6827C14.0701 13.0543 13.898 13.3197 13.62 13.5991C13.342 13.8773 13.0774 14.0509 12.7057 14.1961C12.4256 14.3055 12.0042 14.436 11.2289 14.4729C10.3894 14.5123 10.1379 14.5214 8.01225 14.5252C5.88732 14.5294 5.63586 14.5214 4.79611 14.485ZM11.2854 3.74493C11.2864 4.27211 11.7151 4.69896 12.2422 4.69792C12.7697 4.69689 13.1965 4.2685 13.1957 3.74132C13.1947 3.21414 12.7661 2.78704 12.2386 2.78807C11.7112 2.7891 11.2844 3.21775 11.2854 3.74493ZM3.91277 8.00773C3.91714 10.2653 5.75063 12.0913 8.0076 12.0869C10.2648 12.0825 12.0919 10.2495 12.0875 7.99201C12.0831 5.73526 10.2494 3.90819 7.99188 3.91257C5.73489 3.91696 3.90837 5.75073 3.91277 8.00773ZM5.34648 8.0049C5.3439 6.53969 6.52978 5.34942 7.99471 5.34683C9.45991 5.344 10.6504 6.52937 10.6533 7.99484C10.6561 9.46031 9.47022 10.6503 8.00477 10.6532C6.53984 10.656 5.34932 9.47037 5.34648 8.0049Z",fill:"white"})}),d.jsxs("g",{mask:"url(#mask0_6523_22356)",children:[d.jsx("mask",{id:"mask1_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:d.jsx("path",{d:"M16.5905 -0.583628H-0.603516V16.6106H16.5905V-0.583628Z",fill:"white"})}),d.jsxs("g",{mask:"url(#mask1_6523_22356)",children:[d.jsx("mask",{id:"mask2_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:d.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),d.jsxs("g",{mask:"url(#mask2_6523_22356)",children:[d.jsx("mask",{id:"mask3_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:d.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),d.jsx("g",{mask:"url(#mask3_6523_22356)",children:d.jsx("rect",{x:"-0.688721",y:"-0.665792",width:"17.3622",height:"17.3622",fill:"url(#pattern0)"})})]})]})]})]}),d.jsxs("defs",{children:[d.jsx("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:d.jsx("use",{xlinkHref:"#image0_6523_22356",transform:"scale(0.000439947)"})}),d.jsx("clipPath",{id:"clip0_6523_22356",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})}),d.jsx("image",{id:"image0_6523_22356",width:"2273",height:"2275",xlinkHref:"data:image/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LAAKSiLALQAAAoCAKIogAAAAAPU8vVzfO8eK15xRFEURRFEURRFEURRFEURRFEVEURRFEUSgAAAAAAAAURVRRFEURRFJFEURVAAAAAABQAEURRFLFVFgAAlEVUURRFgFsURRABUUsWAVFEWALFVFgFRSwEVUWKlVFgBFWwEVUCpRBUUsFRRBbFEFRVsBFlAsWUlEFqVUCxZQEWWpVQKlVAJVsFJYBbFgFRZaAlVAoVFgFAsWUAAFRYAoAUAAAABFVFEoRRFEUeo5url+c44a8wAAAAAAACiKIoiiKIoiiKIoiiKIpJQAAAAAAAFIoiiKIoiiKIqgAAAAAAAoAAACKIqooiiLAAKSiKIpYogpKIoiwC2KIogpKIpYKiiLALYogIq2ASqiwBYqoCKtgIqoFiykoixUqosEq2LKSlgpKILYsEqostSiC2LAKiy1KILUqoBKtgIsoFiygqLFCkogtAiygAtSiACgEoiygUAAAKAAAAAAA9TzdPN87xg15gAAAAAAAAABAABRFEURRFEURRFEURQAAAACAACkURVRRFEUAAAAAABQAAAACURVRRFEURYBaAlEURRFlARSxZQCURRBalEUQVFLFglVFEFsUQEVbFglEWUlLFlJRFlqURZalEFRSwEWUFsWCVUWKlVAsWUFRYqVUFqUQVFipVQWpRBUWKFRZQLFlARZaAlVAoVFgFAJVsAAFAJRFgChQAAAAAAAHquXq5vneMGvMAABKAAAAAAAAAAQAAAAAoiiKIoigAAAAAAAUiiKIpIolAAAAKAAAAAAACkoiiKWKIqoAACKIqoogVKIqoBKIq2ASiKILYoiykoixQqKIFiqgEoiy1KIspKWCopYKiwC2LBKqBYqoFiygIstSqgWLKAiy1KqBUsoCLLUqoFSygIstCosAtiwCostASqgUCKqACgWLAKAAASqiwABQAAAAAPVc3VzfPcWK15xRFEURRFEURRFEURRKAAAAAQAAAAAURRFEUgAAAAAABRFEURQAFAAAAAAAgAWgAAJRFEVUURYAAJRFVFLAJRFVFglLFVFgBFWwEURZSUsWAVFLARVQLFVARSwVFEFsWCVUWKlVAqVUlEWWpRBalEFRZalEFqUQVF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BallAsWUFRYoVFgFqWAUCwAUBFgFoAEUQUAAAAB674ff4cXhhqyAAAAAAAKIolAAAEAFiUAAAABQEAAFgAAEFAAAgpAAAFAAJACgAAAUlEAACAAAAAAAAEqopYACLAKSlgEqoFiwBYsoCBUsoFgEstSiCosVKILYBLFSqgWLKSxQqBYsEq2AgWLKSxUqoFgIstSy1KILYKixUspLLQqBYspLLQILUsoFgpLLQILUsoBKtgEsoFCoAKSxQApKIALQAEogAAAAPXfD7/DjcMNWQAAAACgAAAACABBQAAAAAogAAAsAAAgoAALEogAAoAAEgoAAAKSiABAAApFEUAJRFEURRFEAAlVFigRRAJVsAlgFsWALAJZQLBSWKFQKlglWwEWKlVAsFRYqUQWxYJZalECxZSWKlEFsBFlqWCVbAQWwVFipZalVBbARZallAsFJZaBBallAQWpZQLBQEFqVUChUWAAWwAAUlgCgBQAEURYAAeu+H3+HF4Ya8gCiKAAAAAAQAWJQAAAAAFJRAAAgUAABBQAAIUQAAoACQAUAAAUQAIAAAKAAAQAAAAAAFSiACosUBKIBLLQIsUKgEsUKgVLALYBLLQICLLUogWLKSlgqBYsEq2AgtiwSxQqBYKSxUsUKgWCostSwSrYKgWC2LKSy1KILYspKWCospKWCostAgtSygIstAiygVKqAASy0AAKgAUAKAAAAA9d8Pv8OLwg15gAAAAAAgAsSgAAAAAAKgAAAQUAAAgCgAELKgACgAEgCgAAAogQAAKSgAACAFAAACURRFEWACUsWACVUCxYBbFglECpZQLBSWALBSWKBBalgCwVFipVQLAJZalgFsAlipZQLBUCpYJZaBBbAqWUlipVQWwEFsWUllqWKFQUlihUFqWAWwUlihUFqWAUlihSWAWgRZQAWwAACVUACgAABQAHrvh9/hxeEGvMAAAEAAAKgAAAAAABZUAAACFAAAEAUAAgUBABQAJAFAAABRAgABQABAABSUAgAAAAAAKiwABYsAIstAgEq2ASxQqASxQqBUsAtgEsUKgEstSwBYLYsEstAgWCksUKgWASy1LALYCC2ASy1KILYFiykstSykpYKgtSwC2CoLUsAtiykpYK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fww7ddj+GHbrsfww7ddj+GHbrsfww7ddj+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfw5h277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3XY/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26j+GHbqP4Yduo38MO3Ub+GHbqP4Yduo/hh26j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmNh25jYduY2HbmNh25jYduY2HbmNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiN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9csPWrD1qw9asPWrD1qw9asPWrD1qw9asPWrD1qw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrB34/8Ay/z/AH/53yHY/wDU/E/0v+P7/wCz/9k="})]})]}),pinterest:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsxs("g",{clipPath:"url(#clip0_6570_25513)",children:[d.jsx("rect",{width:"15.996",height:"16",rx:"2",fill:"#CC2127"}),d.jsx("path",{d:"M7.999 2C4.68555 2 2 4.68555 2 7.999C2 10.5406 3.58174 12.7102 5.81336 13.5861C5.76137 13.1121 5.71338 12.3843 5.83336 11.8644C5.94134 11.3964 6.53724 8.88285 6.53724 8.88285C6.53724 8.88285 6.35727 8.52291 6.35727 7.993C6.35727 7.15914 6.84119 6.53524 7.44309 6.53524C7.95501 6.53524 8.20297 6.91918 8.20297 7.3811C8.20297 7.89502 7.87502 8.66489 7.70705 9.37877C7.56507 9.97667 8.007 10.4626 8.5949 10.4626C9.66072 10.4626 10.4806 9.33878 10.4806 7.71505C10.4806 6.27929 9.44876 5.27345 7.975 5.27345C6.26729 5.27345 5.26546 6.55324 5.26546 7.87702C5.26546 8.39293 5.46342 8.94484 5.71138 9.24679C5.75937 9.30678 5.76737 9.35877 5.75337 9.41876C5.70738 9.60873 5.6074 10.0167 5.5874 10.0987C5.56141 10.2086 5.50142 10.2326 5.38743 10.1786C4.63756 9.83069 4.16964 8.73488 4.16964 7.85502C4.16964 5.96334 5.54541 4.22563 8.13298 4.22563C10.2146 4.22563 11.8304 5.70938 11.8304 7.69105C11.8304 9.75871 10.5266 11.4224 8.71688 11.4224C8.10898 11.4224 7.53708 11.1065 7.34111 10.7345C7.34111 10.7345 7.04116 11.8804 6.96717 12.1603C6.83119 12.6822 6.46526 13.3341 6.2213 13.732C6.7832 13.906 7.3791 14 7.997 14C11.3104 14 13.996 11.3144 13.996 8.001C13.998 4.68555 11.3124 2 7.999 2Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6570_25513",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),spotify:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6523_22402)",children:d.jsx("path",{d:"M12.6609 7.10585C10.121 5.59751 5.93158 5.45882 3.50697 6.1947C3.11759 6.31287 2.70584 6.09298 2.5879 5.70373C2.46988 5.31411 2.68945 4.90265 3.07911 4.78429C5.86241 3.93945 10.4892 4.1026 13.4132 5.83828C13.7634 6.04622 13.8782 6.49851 13.6707 6.84813C13.4629 7.19833 13.0103 7.31376 12.6609 7.10585ZM12.5777 9.33993C12.3995 9.62908 12.0215 9.71979 11.7327 9.54223C9.61522 8.24063 6.38637 7.86357 3.88123 8.624C3.55636 8.72218 3.21323 8.53899 3.11455 8.21475C3.01666 7.88989 3.19992 7.54738 3.5242 7.44859C6.38597 6.58018 9.9436 7.00081 12.3756 8.49536C12.6644 8.67322 12.7553 9.05146 12.5777 9.33993ZM11.6136 11.4855C11.472 11.7177 11.1697 11.7904 10.9383 11.6489C9.08801 10.518 6.75909 10.2627 4.01637 10.8891C3.75207 10.9497 3.48866 10.7841 3.42838 10.5198C3.36785 10.2556 3.53284 9.99217 3.79772 9.93186C6.79916 9.2457 9.37381 9.54101 11.4506 10.8101C11.6822 10.9515 11.7551 11.254 11.6136 11.4855ZM8.00002 0.120623C3.64839 0.120623 0.120605 3.64834 0.120605 7.99989C0.120605 12.352 3.64839 15.8794 8.00002 15.8794C12.3517 15.8794 15.8794 12.352 15.8794 7.99989C15.8794 3.64834 12.3517 0.120623 8.00002 0.120623Z",fill:"#1ED760"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22402",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),twitter:d.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d.jsx("path",{d:"M14.3193 4.31285C14.329 4.45301 14.329 4.59317 14.329 4.73462C14.329 9.04475 11.0516 14.0156 5.05865 14.0156V14.0131C3.28832 14.0156 1.55478 13.508 0.0644531 12.5507C0.321873 12.5817 0.580582 12.5972 0.839937 12.5979C2.30703 12.5992 3.7322 12.1063 4.88639 11.1988C3.4922 11.1724 2.26961 10.2623 1.84252 8.93366C2.3309 9.02796 2.83413 9.00858 3.31349 8.87746C1.79349 8.57001 0.699937 7.23299 0.699937 5.68023C0.699937 5.66602 0.699937 5.65246 0.699937 5.63889C1.15284 5.89144 1.65994 6.0316 2.17865 6.0471C0.747034 5.08923 0.305743 3.18251 1.17026 1.69176C2.82445 3.7296 5.2651 4.96844 7.8851 5.09956C7.62252 3.96664 7.98123 2.77947 8.82768 1.98307C10.1399 0.748096 12.2038 0.811395 13.4374 2.12452C14.167 1.98048 14.8664 1.71243 15.5064 1.33264C15.2632 2.0877 14.7541 2.72909 14.0741 3.13665C14.7199 3.06044 15.3509 2.88734 15.9451 2.62316C15.5077 3.2794 14.9567 3.85103 14.3193 4.31285Z",fill:"#1D9BF0"})}),vimeo:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsxs("g",{clipPath:"url(#clip0_6523_22340)",children:[d.jsx("path",{d:"M16 14.4C16 15.28 15.28 16 14.4 16H1.6C0.72 16 0 15.28 0 14.4V1.6C0 0.72 0.72 0 1.6 0H14.4C15.28 0 16 0.72 16 1.6V14.4Z",fill:"#1AB7EA"}),d.jsx("path",{d:"M13.9945 5.3084C13.9391 6.42815 13.1229 7.97447 11.5458 9.93402C9.91331 11.9736 8.52987 13 7.40928 13C6.70372 13 6.12267 12.3735 5.63846 11.1338C5.32027 9.98735 4.98824 8.85427 4.67005 7.70786C4.31036 6.46814 3.92299 5.84161 3.50796 5.84161C3.42495 5.84161 3.10676 6.02824 2.56721 6.38816L2 5.68165C2.59488 5.1751 3.17593 4.68187 3.75698 4.17532C4.54554 3.52214 5.14042 3.17555 5.54162 3.13556C6.46853 3.05557 7.04958 3.66877 7.27093 4.97514C7.50612 6.40149 7.67213 7.28129 7.75514 7.62788C8.01799 8.80095 8.32235 9.40081 8.64054 9.40081C8.88956 9.40081 9.26309 9.01423 9.77497 8.2544C10.273 7.49457 10.5497 6.90804 10.5774 6.50813C10.6465 5.85494 10.3837 5.52169 9.77497 5.52169C9.48444 5.52169 9.19392 5.58834 8.88956 5.70831C9.48444 3.84206 10.605 2.94893 12.2652 3.00225C13.4826 3.02891 14.0637 3.80207 13.9945 5.3084Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22340",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),youtube:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("path",{d:"M15.6656 3.75817C15.4816 3.06609 14.9395 2.5211 14.2511 2.33614C13.0034 2 8 2 8 2C8 2 2.99666 2 1.7489 2.33614C1.06051 2.5211 0.518324 3.06609 0.334339 3.75817C0 5.01251 0 7.62963 0 7.62963C0 7.62963 0 10.2467 0.334339 11.5012C0.518324 12.1932 1.06051 12.7381 1.7489 12.9232C2.99666 13.2593 8 13.2593 8 13.2593C8 13.2593 13.0034 13.2593 14.2511 12.9232C14.9395 12.7381 15.4816 12.1932 15.6656 11.5012C16 10.2467 16 7.62963 16 7.62963C16 7.62963 16 5.01251 15.6656 3.75817Z",fill:"#ED1D24"}),d.jsx("path",{d:"M6.36353 10.0058L10.5453 7.62974L6.36353 5.25349V10.0058Z",fill:"white"})]})};function C7(e){const{debouncedUrl:t,content:n,onContentChange:r,selected:i}=e,o=E.useRef(null),[a,s]=E.useState(!1);Qe.useOnChange(t,()=>{var c;a&&(s(!1),(c=o.current)==null||c.reset())});function u(){s(!0),r(void 0)}return Fr.toURL(t)?t===(n==null?void 0:n.embed_url)?d.jsx(sC,{content:n,selected:i}):d.jsx(h.ErrorBoundary,{ref:o,renderError:x$e,onError:u,children:d.jsx(E.Suspense,{fallback:n&&d.jsx(sC,{content:n,selected:i}),children:d.jsx(w$e,{url:t,selected:i,onContentChange:r})})}):null}function x$e(){return d.jsxs(h.Box,{backgroundColor:"grey2",borderRadius:6,padding:16,gap:4,children:[d.jsx(h.Icon,{name:"alert",size:"small",color:"grey11"}),d.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"There is no embed data available."})]})}function sC(e){const{content:t,selected:n}=e,{thumbnail:r,provider:i,author:o,url:a,subtitle:s}=O$e(t);return d.jsxs(h.PreviewCard,{selected:n,children:[d.jsx(h.PreviewImage,{src:r.url,aspectRatio:r.aspectRatio}),d.jsxs(h.PreviewContent,{children:[d.jsxs(h.Box,{display:"flex",alignItems:"center",gap:4,children:[d.jsx(I$e,{provider:i}),d.jsx(h.Text,{variant:"smallBold",color:"grey12",noWrap:!0,children:i}),o&&d.jsx(h.Text,{variant:"small",color:"grey11",noWrap:!0,children:o})]}),d.jsx(h.Text,{variant:"smallBold",href:a,children:s})]})]})}function w$e(e){const{url:t,onContentChange:n,selected:r}=e,i=E$e({url:t,onContentChange:n});return d.jsx(sC,{content:i,selected:r})}function E$e(e){const{url:t,onContentChange:n}=e,{embedApiEndpoint:r}=Oe(),i=Xe.useRequest($$e,[t,r]),o=Qe.useStableCallback(n);return E.useEffect(()=>{const a=h.handleEditorFlushSyncError(()=>o(i));return()=>{clearTimeout(a)}},[i,o]),i}function $$e(e,t){const n=new URL(t);return n.searchParams.set("url",e),xe.request(n,{okType:R$e(e)})}function R$e(e){return B.object({type:B.string(),version:B.string().or(B.number()).nullish(),title:B.string().nullish(),author_name:B.string().nullish(),author_url:B.string().nullish(),provider_name:B.string().nullish(),provider_url:B.string().nullish(),cache_age:B.string().or(B.number()).nullish(),thumbnail_url:B.string().nullish(),thumbnail_width:B.number().nullish(),thumbnail_height:B.number().nullish(),html:B.string().nullish()}).passthrough().transform(t=>{const n={embed_url:e};return{...n,__TYPE__:"EmbedContent",type:t.type,version:t.version,title:t.title,author_name:t.author_name,author_url:t.author_url,provider_name:t.provider_name,provider_url:t.provider_url,cache_age:t.cache_age,thumbnail_url:t.thumbnail_url,thumbnail_width:t.thumbnail_width,thumbnail_height:t.thumbnail_height,html:t.html,all:{...n,...t}}})}function O$e(e){let t="";switch(e.type){case"video":t=e.title??"";break;case"photo":t=`View this post${e.provider_name?` on ${e.provider_name}`:""}`;break;default:t=`Open${e.provider_name?` on ${e.provider_name}`:""}`}return{url:e.embed_url,thumbnail:{url:e.thumbnail_url??"",aspectRatio:e.type==="video"?"16:9":"1:1"},provider:e.provider_name??"",author:e.author_name??"",subtitle:t}}function F$e(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=Qe.useDebounceState({initialState:(i==null?void 0:i.embed_url)??"",startTransition:E.startTransition});function s(u){a.set(u),Fr.toURL(u)||o(void 0)}return d.jsxs(h.Field,{footer:Fr.toURL(a.value)&&d.jsx(h.FieldFooter,{children:d.jsx(C7,{debouncedUrl:a.debouncedValue,content:i,onContentChange:o})}),children:[d.jsx(h.FieldIcon,{name:"cloud"}),d.jsx(h.FieldLabel,{htmlFor:t,children:nr(r)}),d.jsx(h.FieldControl,{children:d.jsx(Qs,{id:t,readOnly:n,placeholder:Pc(r),value:a.value,onValueChange:s,variant:Fr.toURL(a.value)?"link":"normal",endAdornment:d.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:()=>s("")})})})]})}function S7(e){return!(e.lat>85||e.lat<-85||e.lng>180||e.lng<-180)}function Hb(e){const t=/^.*@(-?\d+.\d+),(-?\d+.\d+).*$/,n=e.match(t);if(!n)return;const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return;const o={lat:r,lng:i};if(S7(o))return o}function YF(e){return e?`${e.lat}, ${e.lng}`:""}function GF(e){const t=/\(?([\d|.|-]*)[\s+]*,[\s]*([\d|.|-]*)\)?/,n=e.match(t);if(!n)return Hb(e);const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return Hb(e);const o={lat:r,lng:i};return S7(o)?o:Hb(e)}function M$e(e){const{field:t,id:n,readOnly:r,...i}=e,{onValueChange:o,displayedValue:a,onBlur:s,clearValue:u,isValidCoordinates:c}=k$e(i);return d.jsxs(h.Field,{children:[d.jsx(h.FieldIcon,{name:"place"}),d.jsx(h.FieldLabel,{htmlFor:n,children:nr(t)}),d.jsx(h.FieldControl,{children:d.jsx(Qs,{id:n,onValueChange:o,placeholder:WR,readOnly:r,value:a,onBlur:s,variant:c?"link":"normal",endAdornment:d.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:u})})})]})}function k$e(e){const{content:t,onContentChange:n}=e,r=YF(t==null?void 0:t.position),[i,o]=E.useState(r);function a(){const c=GF(i);if(!c)return o(""),n(void 0);const{lat:l,lng:f}=c;o(YF({lat:l,lng:f})),n({__TYPE__:"GeoPointContent",position:{lat:l,lng:f}})}function s(){o(""),n(void 0)}const u=!!GF(i);return{displayedValue:i,isValidCoordinates:u,onValueChange:o,onBlur:a,clearValue:s}}function _7(e){const{fieldLabel:t,imageLabel:n=[]}=e;return d.jsxs(h.CardHeaderTitle,{children:[d.jsx(h.Text,{variant:"bold",noWrap:!0,children:wp.overflow(t,30)}),n.length!==0&&d.jsx(h.Text,{color:"grey11",noSelect:!0,children:` • ${n.join(" • ")}`})]})}function I7(e){const{fieldLabel:t,isUpdating:n,readOnly:r,onMediaDialogOpenChange:i}=e;return d.jsxs(d.Fragment,{children:[d.jsx(h.CardHeader,{sx:{flexWrap:"wrap"},children:d.jsx(_7,{fieldLabel:t})}),d.jsx(h.CardContent,{children:d.jsx(h.Card,{color:"grey2",variant:"dashed",paddingBlock:12,radius:4,sx:{width:"100%"},children:d.jsx(h.CardContent,{children:d.jsxs(h.BlankSlate,{variant:"horizontal",children:[d.jsx(h.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple9",backgroundColor:"purple4",size:"small"}),d.jsx(h.BlankSlateTitle,{children:n?"Preparing your image...":"You haven't selected an image"}),!r&&d.jsx(h.BlankSlateActions,{children:d.jsx(h.Button,{disabled:n,onClick:()=>i(!0),size:"medium",children:"Select image"})})]})})})})]})}const L$e=pp({id:Go(),width:Wm(),height:Wm(),urls:pp({full:Go(),small:Go().transform(cEe)}),alt_description:Go().optional(),description:Go().nullable()}),j$e=pp({results:Rq(L$e)}).transform(e=>e.results);function T7(e,t){const n=new URL("search/photos",e);return n.searchParams.set("page","1"),n.searchParams.set("per_page","28"),n.searchParams.set("query",t),xe.request(n,{okType:j$e})}Xe.cache.registerFetcherConfig(T7,{cacheCapacity:5,revalidationStrategy:{type:"never"}});function U$e(e,t){const n=E.useRef(),r=Oe(),i=Xe.useRequest(T7,[e,t]);return Qe.useDebounce(t,1e3,()=>{var o;n.current&&t!==n.current&&((o=r.onAnalyticsEvent)==null||o.call(r,"Unsplash Image Searched")),n.current=t}),i}function B$e(e){const{onSelectedChange:t}=e,[n,r]=E.useTransition(),i=Qe.useDebounceState({initialState:"",ms:300,startTransition:r});return d.jsxs(h.Box,{flexDirection:"column",gap:16,width:"100%",position:"relative",children:[d.jsx(h.FormSearchInput,{value:i.value,placeholder:"Search on Unsplash.com",onValueChange:i.set}),d.jsx(h.ErrorBoundary,{renderError:()=>d.jsx(Xq,{}),children:d.jsx(E.Suspense,{fallback:d.jsx(W$e,{}),children:d.jsx(P$e,{term:i.debouncedValue,loading:n,onSelectedChange:t})})})]})}function P$e(e){const{term:t,onSelectedChange:n,loading:r}=e,{media:i,toggleSelected:o,selectedImageId:a}=D$e({term:t,onSelectedChange:n});return d.jsxs(d.Fragment,{children:[i.length>0&&d.jsx(x7,{children:i==null?void 0:i.map(s=>{const c=new URL(s.urls.full).searchParams.get("fm")??"jpg";return d.jsx(h.MediaCard,{url:s.urls.small,filename:s.description??"Unsplash Image",selected:a===s.id,onCardClick:()=>o(s),onCheckedChange:()=>o(s),extension:c,kind:"image",width:s.width,height:s.height,loading:r},s.id)})}),i.length===0&&d.jsx(Jq,{})]})}function x7(e){const{children:t}=e;return d.jsx(h.ScrollArea,{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 250px), 1fr))",gap:16,padding:2,paddingBottom:16,position:"relative",width:"100%"},children:t})}function W$e(){return d.jsx(x7,{children:vn.range(1,24).map(e=>d.jsx(o7,{},e))})}function D$e(e){var c;const{term:t,onSelectedChange:n}=e,{unsplashApiBaseUrl:r}=Oe(),i=U$e(r,t||"citrus fruit"),o=(c=i==null?void 0:i[0])==null?void 0:c.id,[a,s]=E.useState();E.useEffect(()=>{n==null||n([]),s(void 0)},[o,n]);function u(l){if(l.id===a)return s(void 0),n==null?void 0:n([]);s(l.id),n==null||n([{...l,url:l.urls.full,alt:l.alt_description}])}return{media:i,toggleSelected:u,selectedImageId:a}}function DR(e){const{open:t,onOpenChange:n,onMediaSelected:r,assetType:i}=e,o=Oe(),a=o.mediaLibrary,[s,u]=E.useState(()=>a?"media":"unsplash"),[c,l]=E.useState(new Set),[f,p]=E.useState([]),A=c.size+f.length,m=Xe.useFetcherData(hi);E.useEffect(()=>{!t||!a||zq({config:o,assetType:i})},[t,o,i,a]);function v(y){if(y!=="media"&&y!=="unsplash")throw new Error(`Invalid option ${y}.`);u(y)}function _(y){y||l(new Set),n(y)}const S=hwe({assetType:i,mediaDialogOpen:t});function I(){var y;if(s==="unsplash"){const b=f[0];if(!b)return;r(b),(y=o.onAnalyticsEvent)==null||y.call(o,"Unsplash Image Added")}else if(s==="media"){const w=m.flatMap(F=>F.items).filter(F=>c.has(F.id))[0];if(!w)return;r(w),S(w.id)}_(!1)}function T(){if(A===0)return"Select a media item to add to the page";if(A>1)return"Only one media item can be added to the page"}const{containerRef:g}=h.useAlert();return d.jsxs(h.Dialog,{open:t,onOpenChange:_,size:{width:"min(calc(100% - 48px), 2000px)",height:"calc(100% - 30px)"},position:"center",onPointerDownOutside:y=>{g&&Qe.refContainsTarget(g,y.target)&&y.preventDefault()},children:[d.jsx(h.DialogHeader,{icon:"image",title:"Media library"}),d.jsxs(h.DialogOptions,{value:s,onValueChange:v,padding:"small",width:"auto",children:[a&&d.jsx(h.DialogOptionsItem,{value:"media",icon:"photo"}),d.jsx(h.DialogOptionsItem,{value:"unsplash",icon:"unsplash"})]}),d.jsx(h.DialogContent,{children:d.jsxs(h.Box,{flexDirection:"column",flexGrow:1,overflow:"hidden",children:[d.jsx(Cq,{}),d.jsxs(h.Box,{overflow:"hidden",backgroundColor:"grey3",padding:{top:16,inline:16},flexGrow:1,children:[s==="media"&&d.jsx(f7,{assetType:i,onSelectedChange:l}),s==="unsplash"&&d.jsx(B$e,{onSelectedChange:p})]})]})}),d.jsxs(h.DialogActions,{children:[d.jsx(h.DialogCancelButton,{}),d.jsx(h.DialogActionButton,{onClick:I,disabled:A!==1,tooltipLabel:T(),children:"Add to page"})]})]})}const w7=E.forwardRef(function(t,n){const{isMediaDialogOpen:r,selected:i,children:o,onMediaSelected:a,onMediaDialogOpenChange:s}=t;return d.jsxs(h.Card,{ref:n,color:i?"indigo2":"grey2",variant:i?"selected":"dashed",paddingBlock:12,radius:4,children:[o,d.jsx(DR,{open:r,onOpenChange:s,onMediaSelected:a,assetType:"image"})]})});function E7(e){const{contentView:t,croppedImage:n}=e,{width:r,height:i,x:o,y:a,zoom:s}=n,u=N$e({origin:t.origin,croppedImage:n});return{...t,width:r,height:i,url:u,edit:{...t.edit,zoom:s,crop:{x:o,y:a}}}}function K$e(e){var c,l,f;const{field:t,content:n,thumbnail:r,croppedImage:i}=e;if(r===Ad)return $7({content:n,croppedImage:i});const o=ke.isImageContent(n),a=(l=(c=t==null?void 0:t.config)==null?void 0:c.thumbnails)==null?void 0:l.find(p=>p.name===r),s=o?(f=n.thumbnails)==null?void 0:f[r]:void 0;if(!a||!s)return n;const u=E7({contentView:s,croppedImage:i});return u.url===s.url?n:{...n,thumbnails:o?{...n.thumbnails,[r]:u}:void 0}}function $7(e){const{content:t,croppedImage:n}=e,r=E7({contentView:t,croppedImage:n});return r.url===t.url?t:{...t,...r}}function N$e(e){const{origin:t,croppedImage:n}=e,{x:r,y:i,width:o,height:a,cropHeight:s,cropWidth:u}=n,c=new URL(t.url),l=t.height!==a||t.width!==o;if(r!==0||i!==0||s!==t.height||u!==t.width){const p=[r,i,u,s].map(Math.round).join(",");c.searchParams.set("rect",p),c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())}return l&&(c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())),c.toString()}function q$e(e){const{x:t,y:n}=e.edit.crop,r=e.edit.zoom,{width:i,height:o}=e,{width:a,height:s}=e.origin,u=i/o,c=Math.min(a,s*u/r),l=c/u;return{x:t,y:n,width:i,height:o,zoom:r,cropWidth:c,cropHeight:l}}function V$e(e){const{selectedImage:t,imageCrop:n,setImageCrop:r}=e,{width:i,height:o,zoom:a,cropHeight:s,cropWidth:u}=n,c=t.contentView,l={x:n.x,y:n.y,width:u,height:s},[f,p]=E.useState(),A=(c==null?void 0:c.origin.url)??"",m=!(t!=null&&t.thumbnail.height&&(t!=null&&t.thumbnail.width));function v(g,y){const b=parseInt(y);isNaN(b)||b<=0||!m||r({...n,[g]:b})}function _(g){r({...n,cropWidth:g.width,cropHeight:g.height,x:g.x,y:g.y})}function S(g){r({...n,zoom:g})}function I(){p(qh),r({...n,...qh})}function T(){c&&(p(qh),r({...n,...qh,zoom:1,cropWidth:c.width,cropHeight:c.height}))}return d.jsxs(h.Box,{padding:{inline:24,block:16},flexDirection:"column",gap:16,height:"100%",overflowY:"auto",alignItems:"center",children:[d.jsxs(h.Box,{gap:8,height:32,alignItems:"flex-start",width:"100%",children:[d.jsx(h.Tooltip,{content:"Center",children:d.jsx(h.Button,{color:"grey",size:"medium",startIcon:"centerFocusWeak",onClick:I})}),d.jsx(h.Tooltip,{content:"Cover",children:d.jsx(h.Button,{color:"grey",size:"medium",startIcon:"zoomOutMap",onClick:T})}),d.jsx(h.Separator,{orientation:"vertical"}),d.jsx(h.FormInput,{prefix:"W",prefixTooltip:"Width",placeholder:"width",type:"number",size:"medium",value:String(i),onValueChange:g=>v("width",g),sx:{width:100},disabled:!m}),d.jsx(h.FormInput,{prefix:"H",prefixTooltip:"Height",placeholder:"height",type:"number",size:"medium",value:String(o),onValueChange:g=>v("height",g),sx:{width:100},disabled:!m})]}),d.jsx(h.Cropper,{image:A,aspect:i/o,crop:f??{x:0,y:0},onCropChange:p,zoom:a,onZoomChange:S,onCropAreaChange:(g,y)=>_(y),initialCroppedAreaPixels:l}),d.jsx(h.Box,{width:"100%",maxWidth:320,children:d.jsx(h.Slider,{min:1,max:3,step:.01,value:[a],onValueChange:([g])=>S(g??1)})})]})}const qh={x:0,y:0};function Q$e(e){const{trigger:t,initialImages:n,renderTooltip:r}=e,{open:i,onOpenChange:o,ready:a,option:s,selectedImage:u,croppedImage:c,setCroppedImage:l,setReady:f,setOption:p}=z$e(e);return d.jsxs(h.Dialog,{trigger:t,onAnimationEnd:()=>f(!0),open:i,onOpenChange:o,renderTooltip:r,children:[d.jsx(h.DialogHeader,{icon:"photo",title:"Image editor"}),d.jsx(h.DialogOptions,{value:String(s),onValueChange:A=>p(Number(A)),children:n.map((A,m)=>d.jsx(h.DialogOptionsItem,{value:String(m),icon:"photo",title:A.labels[0]??"Main",subtitle:A.labels[1]??""},A.thumbnail.name))}),u&&d.jsx(h.DialogContent,{children:a&&c&&d.jsx(V$e,{selectedImage:u,imageCrop:c,setImageCrop:l},u.thumbnail.name)})]})}function z$e(e){const{initialImages:t,initialOption:n,onClose:r}=e,[i,o]=E.useState(_),[a,s]=E.useState(!1),[u,c]=E.useState(!1),[l,f]=E.useState(n);function p(S){S?(f(n),o(_())):(c(!1),r({option:l,croppedImages:i})),s(S)}const A=t[l],m=i[(A==null?void 0:A.thumbnail.name)??""];function v(S){if(!A)return;const I=A.thumbnail.name;o({...i,[I]:S})}function _(){return t.reduce((S,I)=>(I.contentView&&(S[I.thumbnail.name]=q$e(I.contentView)),S),{})}return{open:a,ready:u,option:l,selectedImage:A,croppedImage:m,setCroppedImage:v,setReady:c,setOption:f,onClose:r,onOpenChange:p}}function H$e(e){const{readOnly:t,altText:n,selected:r,onValueChange:i}=e,o=E.useId();return d.jsxs(h.Field,{selected:r,children:[d.jsx(h.FieldLabel,{htmlFor:o,children:"Alt text"}),d.jsx(h.FieldControl,{children:d.jsx(h.Box,{flexGrow:1,height:40,children:d.jsx(Qs,{id:o,placeholder:"Short description for the visually impaired",readOnly:t,value:n,padding:{input:{inline:12}},onValueChange:i})})})]})}function Y$e(e){const{fieldLabel:t,imageLabel:n,initialImages:r,page:i,displaySeparator:o=!0,isSVGContentView:a,visibility:s,onClear:u,onCropperDialogClose:c,onMediaDialogOpenChange:l}=e;return d.jsxs(h.Box,{display:"flex",flexDirection:"column",gap:12,children:[d.jsxs(h.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:4,children:[d.jsx(_7,{fieldLabel:t,imageLabel:n}),d.jsxs(h.CardHeaderActions,{sx:{visibility:s},children:[d.jsx(Q$e,{trigger:d.jsx(h.Button,{startIcon:"crop",disabled:a,hiddenLabel:"Crop & Resize"}),renderTooltip:f=>d.jsx(h.Tooltip,{content:"Crop & Resize",children:f}),initialImages:r,initialOption:i,onClose:c}),d.jsx(h.Tooltip,{content:"Replace",children:d.jsx(h.Button,{startIcon:"imageSearch",hiddenLabel:"Replace",onClick:()=>l(!0)})}),d.jsx(h.Tooltip,{content:"Clear",children:d.jsx(h.Button,{onClick:u,startIcon:"delete",hiddenLabel:"Clear"})})]})]}),o&&d.jsx(h.Separator,{style:"dashed",decorative:!0})]})}function G$e(e){const{documentType:t,documentUrl:n,title:r,statusColor:i,description:o,tags:a,tagsFilter:s,previewImageUrl:u,onSelect:c}=e;function l(f){return f.nativeEvent instanceof MouseEvent&&(f.metaKey||f.ctrlKey)?window.open(n,"_blank"):c()}return d.jsxs(h.Card,{paddingBlock:16,onSelect:l,children:[d.jsx(h.CardContent,{children:d.jsxs(h.Box,{justifyContent:"space-between",children:[d.jsxs(h.Box,{flexDirection:"column",gap:4,alignItems:"flex-start",flexGrow:1,children:[d.jsx(J$e,{documentType:t}),d.jsx(Z$e,{title:r,statusColor:i}),d.jsx(X$e,{description:o})]}),d.jsx(eRe,{previewImageUrl:u})]})}),a.length>0&&d.jsx(tRe,{tags:a,tagsFilter:s})]})}function J$e(e){const{documentType:t}=e;return d.jsx(h.Badge,{maxWidth:150,size:"medium",title:`Type: ${t}`,icon:"description"})}function Z$e(e){const{title:t,statusColor:n}=e;return d.jsxs(h.Box,{gap:8,alignItems:"center",children:[d.jsx(h.Dot,{color:n}),d.jsx(h.Text,{variant:"bold",children:t})]})}function X$e(e){const{description:t}=e,n=t==null?void 0:t.substring(0,150);return n?d.jsx(h.Text,{variant:"small",color:"grey11",children:`${n}${n!==t?"...":""}`}):d.jsx(h.Text,{variant:"smallItalic",color:"grey11",children:"No description available"})}function eRe(e){const{previewImageUrl:t}=e;return d.jsx(h.Box,{width:142,height:90,backgroundColor:"grey2",border:!0,borderRadius:6,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,flexShrink:0,padding:8,children:t?d.jsx(h.Image,{src:t,sizing:"cover"}):d.jsxs(d.Fragment,{children:[d.jsx(h.Icon,{name:"hideImage",size:"large",color:"grey11"}),d.jsx(h.Text,{color:"grey11",variant:"small",children:"No preview available"})]})})}function tRe(e){const{tags:t}=e;return d.jsxs(h.CardFooter,{children:[d.jsxs(h.Box,{gap:4,alignItems:"center",children:[d.jsx(h.Icon,{name:"label",size:"small",color:"grey11"}),d.jsx(h.Text,{variant:"small",color:"grey11",children:"Tags:"})]}),d.jsx(h.TextOverflow,{children:t.map(n=>d.jsx(h.Badge,{size:"medium",title:n,sx:{marginRight:8}},n))})]})}function nRe(e){var y,b;const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i}=e,o=Oe();o.searchDocuments||Pn("searchDocuments");const{coreApiBaseUrl:a,documentSearchBaseUrl:s,authStrategy:u,status:c,documentListOpenSearchEnabled:l,repository:f}=o,{storageVersion:p}=Xe.useRequest(jR,[a,u]),A=p.major>=7&&l;function m(){return A?Mq({repository:f,searchTerm:t,customTypesIds:[...On.map(r,x=>x.id)],tags:[...On.map(n,x=>x.id)],localeId:[...On.map(i,x=>x.id)][0]}):q0({tags:[...On.map(n,x=>x.id)],customTypes:[...On.map(r,x=>x.id)],language:[...On.map(i,x=>x.id)],term:[t]})}const[v,_]=E.useState([]),[S,I]=E.useState(""),T=m(),g=Xe.useRequest(R7,[a,s,u,T,c,A]);return T!==S?(I(T),_(g.results)):g.results.length>0&&((y=vn.last(v))==null?void 0:y.id)!==((b=vn.last(g.results))==null?void 0:b.id)&&_(x=>x.concat(g.results)),{documents:v,response:g}}Xe.cache.registerFetcherConfig(R7,{cacheCapacity:500,revalidationStrategy:{type:"never"}});async function R7(e,t,n,r,i,o){const a=bq[i];if(!o){const l=await N0(e,n,r,200);return JF(l.results,a)}const s=await Fq(t,n,r),u=await jq(e,n,s.results);return JF(u,a)}function JF(e,t){return{results:e.flatMap(r=>{const i=r.versions.filter(o=>t.includes(o.status));return i.length===0?[]:{...r,versions:i}})}}function ZF(){const e=Oe();e.searchDocuments||Pn("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=Xe.useRequest(jR,[t,n]);return new Set(r.languages.map(i=>({id:i.id,label:i.name})))}function rRe(){const e=Oe();e.searchDocuments||Pn("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=Xe.useRequest(Pq,[t,n]);return new Set(r.results.map(i=>({id:i,label:i})))}function iRe(){const e=Oe();e.searchDocuments||Pn("searchDocuments");const{customTypesApiBaseUrl:t,repository:n,authStrategy:r}=e,i=Xe.useRequest(Oq,[t,n,r]);return new Set(i)}function oRe(e,t){const n=Oe(),r=Qe.useDebounceState({initialState:""}),[i,o]=E.useState(new Set),[a,s]=E.useState(new Set);function u(){return!n.searchDocuments||!n.localeId?new Set:new Set([{id:n.localeId,label:n.localeId}])}const[c,l]=E.useState(u),f=On.union(a,Km(e)),p=On.union(i,Km(t));return{searchTerm:r,filteredTags:i,setFilteredTags:o,filteredCustomTypes:a,setFilteredCustomTypes:s,filteredLocales:c,setFilteredLocales:l,typesFilter:f,tagsFilter:p}}function Km(e){return e?On.map(e,t=>({id:t,label:t})):new Set}function aRe(e){const{filteredLocales:t,setFilteredLocales:n,filteredTags:r,setFilteredTags:i,filteredCustomTypes:o,setFilteredCustomTypes:a,fixedTags:s,fixedCustomTypes:u}=e;return d.jsxs(d.Fragment,{children:[d.jsx(uRe,{selectedValues:t,onSelectedValuesChange:n}),d.jsx(uC,{selectedValues:r,fixedSelectedValues:Km(s),onSelectedValuesChange:i,label:"Tags",icon:"label",fetchFilters:rRe}),d.jsx(uC,{selectedValues:o,fixedSelectedValues:Km(u),onSelectedValuesChange:a,label:"Type",icon:"description",fetchFilters:iRe})]})}function uC(e){const[t,n]=E.useState(!1),r=E.useRef(null);return d.jsx(h.ErrorBoundary,{ref:r,renderError:()=>{var i;return d.jsx(h.FilterField,{mode:"error",onErrorRetry:(i=r.current)==null?void 0:i.reset,open:t,setOpen:n,values:new Set,...e})},children:d.jsx(E.Suspense,{fallback:d.jsx(h.FilterField,{mode:"loading",open:t,setOpen:n,values:new Set,...e}),children:d.jsx(sRe,{open:t,setOpen:n,...e})})})}function sRe(e){const{open:t,setOpen:n,onSelectedValuesChange:r,fixedSelectedValues:i,selectedValues:o,label:a,icon:s,fetchFilters:u,multiple:c}=e,l=u();return d.jsx(h.FilterField,{open:t,setOpen:n,label:a,icon:s,selectedValues:o,values:new Set(l),fixedSelectedValues:i,onSelectedValuesChange:r,multiple:c})}function uRe(e){const{selectedValues:t,onSelectedValuesChange:n}=e,[r,i]=E.useState(On.first(t));function o(s){n(s),i(On.first(s))}const a=On.find(ZF(),s=>{var u;return s.id===((u=On.first(t))==null?void 0:u.id)});return(a==null?void 0:a.label)!==(r==null?void 0:r.label)&&i(a),d.jsx(uC,{selectedValues:new Set(r?[r]:[]),onSelectedValuesChange:o,label:"Locale",icon:"public",fetchFilters:ZF,multiple:!1})}function O7(e){const{onSelectDocument:t,fixedCustomTypes:n,fixedTags:r,...i}=e,o=Oe(),{searchTerm:a,filteredTags:s,setFilteredTags:u,filteredCustomTypes:c,setFilteredCustomTypes:l,filteredLocales:f,setFilteredLocales:p,typesFilter:A,tagsFilter:m}=oRe(n,r),[v,_]=E.useTransition();return d.jsx(h.Dialog,{size:{height:727,width:656},hasClose:!1,...i,children:d.jsx(h.DialogContent,{children:d.jsxs(h.Box,{flexDirection:"column",height:"100%",children:[d.jsxs(h.Box,{padding:{top:16,inline:16,bottom:8},flexDirection:"column",gap:12,children:[d.jsx(h.FormInput,{value:a.value,onValueChange:a.set,placeholder:"Search a page",icon:"search"}),o.searchDocuments&&d.jsx(aRe,{filteredTags:s,setFilteredTags:u,filteredCustomTypes:c,setFilteredCustomTypes:l,filteredLocales:f,setFilteredLocales:p,fixedTags:r,fixedCustomTypes:n}),d.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"Link to a document"})]}),o.searchDocuments?d.jsx(h.ErrorBoundary,{renderError:cRe,children:d.jsx(E.Suspense,{fallback:d.jsx(fRe,{}),children:d.jsx(lRe,{searchTerm:a.debouncedValue,tagsFilter:m,typesFilter:A,localesFilter:f,startTransition:_,isLoadingDocuments:v,onSelectDocument:t})})}):d.jsx(F7,{message:"Slice Machine does not yet support mock data for linked documents in the simulator."})]})})})}function cRe(){return d.jsx(h.Box,{height:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center",children:d.jsx(h.DefaultErrorMessage,{title:"Request failed",description:"An error occurred while fetching documents.",errorImageSrc:h.dialogErrorImage})})}function lRe(e){const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i,isLoadingDocuments:o,onSelectDocument:a}=e,{documents:s}=nRe({searchTerm:t,tagsFilter:n,localesFilter:i,typesFilter:r}),u=Oe();return d.jsxs(h.ScrollArea,{style:{flexGrow:1,paddingTop:h.theme.space[10],paddingBottom:h.theme.space[16],paddingInline:h.theme.space[16],display:"flex",flexDirection:"column",gap:h.theme.space[12]},children:[s.length===0&&d.jsx(F7,{}),s.map(c=>{const l=c.versions[0];if(!l)return null;const f=FR({documentId:c.id,versionId:l.status==="archived"?l.version_id:void 0,releaseId:l.status==="release"?l.release_id:void 0,status:l.status,baseUrl:u.baseUrl}),p=dRe({tags:l.tags,tagsFilter:n});return d.jsx(G$e,{documentType:l.custom_type_label,documentUrl:f,description:l.preview_summary,tags:p,title:c.title,previewImageUrl:l.preview_image,onSelect:()=>a(c.id),statusColor:yq[l.status].color},`${c.id}-${l.status}`)}),d.jsx(h.AnimatedElement,{animation:{name:"fade"},children:o&&d.jsx(h.Text,{color:"grey11",align:"center",sx:{marginBlock:8},children:"Loading more results ..."})})]})}function F7(e){const{message:t="We can't find any versions matching this request"}=e,n="Oops!";return d.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:d.jsxs(h.BlankSlate,{children:[d.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),d.jsx(h.BlankSlateTitle,{size:"big",children:n}),d.jsx(h.BlankSlateDescription,{width:360,children:t})]})})}function fRe(){return d.jsx(h.Box,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:vn.range(1,5).map(e=>d.jsx(h.Skeleton,{height:150},e))})}function dRe(e){const{tags:t,tagsFilter:n}=e,r=[...n].map(o=>o.label).reverse();return vn.sort(t,o=>-r.indexOf(o))}function M7(e){const{hasLink:t,onUnlink:n,selectEnabled:r,selectedType:i,onValueChange:o,openInNewTab:a=!0,condensedButtons:s=!1,setOpenInNewTab:u}=e,c=u&&i==="web",l=a?"checkBox":"checkBoxOutlinedBlank";return d.jsxs(d.Fragment,{children:[c&&d.jsx(h.Tooltip,{content:"Open in new tab",visible:s,children:d.jsx(h.Button,{startIcon:l,color:"grey",size:"small",onClick:()=>u(!a),children:s?"":"Open in new tab"})}),d.jsxs(h.Select,{value:i,color:"grey",size:"small",boldTriggerText:!0,startIcon:pRe(i),disabled:!r,onValueChange:o,placeholder:s?"":yd("placeholder"),onlyStartIcon:s&&!!i,renderTrigger:({button:f})=>d.jsx(h.Tooltip,{content:yd(i),visible:s,children:f}),children:[d.jsx(h.SelectItem,{value:"web",icon:"public",children:yd("web")}),d.jsx(h.SelectItem,{value:"document",icon:"description",children:yd("document")}),d.jsx(h.SelectItem,{value:"media",icon:"image",children:yd("media")})]}),d.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!t,onClick:n})]})}function yd(e){if(!e||e==="placeholder")return"Choose link type";switch(e){case"document":return"Link to Prismic page";case"web":return"Link to web page";case"media":return"Link to media"}}function pRe(e){if(e)switch(e){case"document":return"description";case"web":return"public";case"media":return"image"}}function ARe(e){var b;const{field:t,content:n,onContentChange:r}=e,i=m(),[o,a]=E.useState(A),[s,u]=E.useState(()=>(n==null?void 0:n.value.__TYPE__)==="ExternalLink"?n.value.target:""),[c,l]=E.useState(!1),f=E.useRef(null);Qe.useOnChange(i,T);const p=o?hRe[o]:void 0;function A(){var x,w;return!((x=t.config)!=null&&x.select)||n!=null&&n.value.__TYPE__?n==null?void 0:n.value.__TYPE__:XF[(w=t.config)==null?void 0:w.select]}function m(){return n?n.value.__TYPE__==="DocumentLink"?n.value.id:n.value.__TYPE__==="ExternalLink"?n.value.url:n.value.name:""}function v(x){if(!x)return r(void 0);switch(o){case"ExternalLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:x,target:s}});case"DocumentLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",id:x}});case"FileLink":case"ImageLink":case void 0:return r(void 0)}}function _(x){a(XF[x]),v("")}function S(x){v(x)}function I(){l(!0)}function T(){var x;c&&(l(!1),(x=f.current)==null||x.reset())}function g(x){const w=x?"_blank":null;u(w),r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:i,target:w}})}function y(x){r(L7({media:x}))}return{contentType:o,selectType:p,fieldValue:i,onValueChange:v,onTypeChange:_,placeholder:Pc(t),isTypeSelectEnabled:!((b=t.config)!=null&&b.select),onDocumentSelected:S,onError:I,errorBoundaryRef:f,isTargetNewTab:s==="_blank",updateWebLinkTarget:g,onMediaSelected:y}}const hRe={DocumentLink:"document",ExternalLink:"web",FileLink:"media",ImageLink:"media"},XF={document:"DocumentLink",web:"ExternalLink",media:"FileLink"};function mRe(e){const t=Oe();t.searchDocuments||Pn("searchDocuments");const{coreApiBaseUrl:n,authStrategy:r}=t;return Xe.useRequest(k7,[n,r,e]).title}const gRe=pp({id:Go(),title:Go()});function k7(e,t,n){return xe.request(new URL(`documents/${n}`,e),{credentials:xe.getRequestCredentials(t),okType:gRe})}Xe.cache.registerFetcherConfig(k7,{concurrency:50});function L7(e){var i,o,a,s,u,c;const{media:t}=e,n="kind"in t;return n&&t.kind==="image"?{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:t.filename,url:t.url,kind:t.kind,size:t.size.toString(),height:((i=t.height)==null?void 0:i.toString())??`${es}`,width:((o=t.width)==null?void 0:o.toString())??`${es}`,date:((a=t.last_modified)==null?void 0:a.toString())??""}}:n?{__TYPE__:"LinkContent",value:{__TYPE__:"FileLink",id:t.id,name:t.filename,kind:t.kind,url:t.url,size:t.size.toString(),date:((s=t.last_modified)==null?void 0:s.toString())??""}}:{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:(t==null?void 0:t.alt)??t.url,kind:"image",url:t.url,size:"0",height:((u=t.height)==null?void 0:u.toString())??`${es}`,width:((c=t.width)==null?void 0:c.toString())??`${es}`}}}function j7(e){var Y,Z;const{content:t,field:n,id:r,onContentChange:i,readOnly:o=!1,condensedButtons:a=!1}=e,[s,u]=E.useState(!1),[c,l]=E.useState(!1),[f,p]=E.useState(!1),[A,m]=E.useState(!1),{contentType:v,fieldValue:_,errorBoundaryRef:S,onDocumentSelected:I,onError:T,onMediaSelected:g,...y}=ARe({content:t,field:n,onContentChange:i}),b=s||c,x=o||!v,w=v==="DocumentLink"&&_!=="",F=v==="ImageLink"||v==="FileLink",M=v==="ExternalLink"&&Fr.toURL(_),P={id:r,contentType:v,onBlur:()=>u(!1),onFocus:()=>{u(!0),v==="DocumentLink"&&p(!0),v==="FileLink"&&m(!0),v==="ImageLink"&&m(!0)},readOnly:x,textType:M||F?"link":"normal",value:_,condensedButtons:a,...y},{searchDocuments:K}=Oe();return d.jsxs(d.Fragment,{children:[d.jsxs(h.Popover,{onMouseOverChange:l,open:b,align:"start",sideOffset:-3,openDelay:100,closeDelay:200,focusOnEnter:!1,anchor:d.jsxs(h.Field,{onMouseOverChange:u,children:[d.jsx(h.FieldIcon,{name:"link"}),d.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),d.jsx(h.FieldControl,{children:w&&K?d.jsx(bRe,{errorBoundaryRef:S,onError:T,fallback:d.jsx(cC,{...P,value:"..."}),renderError:()=>vRe(P),children:d.jsx(yRe,{...P,documentId:_,openDocumentListModal:()=>p(!0)})}):d.jsx(cC,{...P})})]}),children:[M&&d.jsx(h.LinkDescriptionCard,{url:M,title:Fr.getUrlTitle(M)??"",subTitle:M.toString()}),(t==null?void 0:t.value.__TYPE__)==="ImageLink"&&d.jsx(h.LinkImageCard,{url:t.value.url,title:t.value.name,subTitle:`${t.value.width} x ${t.value.height} pixels`})]}),d.jsx(DR,{open:A,onOpenChange:m,onMediaSelected:g,assetType:"all"}),d.jsx(O7,{open:f,onOpenChange:p,onSelectDocument:ie=>{p(!1),I(ie)},fixedCustomTypes:new Set((Y=n.config)==null?void 0:Y.customtypes),fixedTags:new Set((Z=n.config)==null?void 0:Z.tags)})]})}function vRe(e){return d.jsx(cC,{...e,textType:"link"})}function cC(e){const{id:t,onValueChange:n,placeholder:r,readOnly:i,value:o,textType:a,onFocus:s,onBlur:u,contentType:c,isTypeSelectEnabled:l,selectType:f,onTypeChange:p,isTargetNewTab:A,condensedButtons:m,updateWebLinkTarget:v}=e,_=c==="DocumentLink"||c==="ImageLink"||c==="FileLink";return d.jsx(Qs,{id:t,onValueChange:n,placeholder:r,readOnly:i||_,value:o,variant:a,onFocus:s,onBlur:u,cursor:_?"pointer":"text",endAdornment:d.jsx(M7,{hasLink:!!o,onUnlink:()=>n(""),selectEnabled:l,selectedType:f,onValueChange:p,openInNewTab:A,condensedButtons:m,setOpenInNewTab:v})})}function yRe(e){const{id:t,documentId:n,openDocumentListModal:r,onValueChange:i,isTypeSelectEnabled:o,selectType:a,condensedButtons:s,onTypeChange:u}=e,c=mRe(n);return d.jsx(Qs,{id:t,readOnly:!0,value:c,variant:"link",onFocus:r,cursor:"pointer",endAdornment:d.jsx(M7,{hasLink:!0,onUnlink:()=>i(""),selectEnabled:o,selectedType:a,condensedButtons:s,onValueChange:u})})}function bRe(e){const{errorBoundaryRef:t,onError:n,children:r,fallback:i,renderError:o}=e;return d.jsx(h.ErrorBoundary,{ref:t,onError:n,renderError:o,children:d.jsx(E.Suspense,{fallback:i,children:r})})}function CRe(e){const{linkTo:t,onLinkToChange:n}=e;return d.jsx(j7,{content:SRe(t),onContentChange:r=>n(_Re(r)),field:{type:"Link",config:{label:"Link",allowTargetBlank:!0}},condensedButtons:!0})}function SRe(e){return e?{__TYPE__:"LinkContent",value:e}:void 0}function _Re(e){return e?e.value:void 0}function U7(e){var T,g;const{allContentViews:t,content:n,contentView:r,fieldLabel:i,imageLabel:o,initialImages:a,isUpdating:s,page:u=0,readOnly:c,thumbnailName:l,onClear:f,onContentChange:p,onCropperDialogClose:A,onPageChange:m,onMediaDialogOpenChange:v}=e,_=((g=(T=n==null?void 0:n.url)==null?void 0:T.split("?")[0])==null?void 0:g.slice(-4))===".svg",S=n!=null&&n.url&&!c?"visible":"hidden",I=!ke.isImageContent(n);return d.jsxs(h.Box,{display:"flex",gap:12,padding:{inline:12},children:[d.jsx(h.Box,{children:d.jsx(h.Carousel,{getItemSource:lEe,items:t,onPageChange:m,page:u,buttonSize:"small",renderPrevTooltip:y=>d.jsx(h.Tooltip,{content:"Previous",children:y}),renderNextTooltip:y=>d.jsx(h.Tooltip,{content:"Next",children:y}),style:I?{width:181,height:142}:{width:123,height:93},children:y=>(y==null?void 0:y.url)&&d.jsx(h.CarouselItem,{"aria-label":"Image Field Item",src:u7(y.url),alt:y.alt??void 0,isUpdating:s,disableAnimation:I},`${l}_${y.url}`)})}),d.jsxs(h.Box,{width:"100%",display:"flex",flexDirection:"column",gap:I?16:12,children:[d.jsx(Y$e,{fieldLabel:i,imageLabel:o,initialImages:a,page:u,displaySeparator:!I,isSVGContentView:_,visibility:S,onClear:f,onCropperDialogClose:A,onMediaDialogOpenChange:v}),d.jsx(H$e,{readOnly:c||!r,altText:(r==null?void 0:r.alt)??"",onValueChange:y=>{r&&p(aEe(l,n,r,y))}}),I&&d.jsx(CRe,{linkTo:n.linkTo,onLinkToChange:y=>{p({...n,linkTo:y})}})]})]})}function IRe(e){const{content:t,onContentChange:n,field:r}=e,[i,o]=E.useState(0),[a,s]=E.useTransition(),u=iEe(r),c=u[i],l=t?oEe(r,t):void 0,f=l==null?void 0:l[i];function p(_){if(!c)return;const S=fEe(c.name,r,t,_);S!==t&&s(()=>n(S))}function A(_){s(()=>o(_))}function m({option:_,croppedImages:S}){if(o(_),!t)return;const I=Object.entries(S).reduce((T,[g,y])=>K$e({field:r,content:T,thumbnail:g,croppedImage:y}),t);I!==t&&s(()=>n(I))}function v(){o==null||o(0),n(void 0)}return{onCropperDialogClose:m,onPageChange:A,onMediaSelected:p,isUpdating:a,page:i,thumbnail:c,allThumbnails:u,allContentViews:l,contentView:f,onClear:v}}function TRe(e){const{content:t,field:n,readOnly:r,onContentChange:i}=e,o=t&&t.origin.url.length>0,{onCropperDialogClose:a,onPageChange:s,onMediaSelected:u,isUpdating:c,page:l,thumbnail:f,allThumbnails:p,allContentViews:A,contentView:m,onClear:v}=IRe({field:n,content:t,onContentChange:i}),[_,S]=E.useState(!1),I=nr(n),T=p.map((b,x)=>{const w=A==null?void 0:A[x];return{thumbnail:b,contentView:w,labels:aC(b,t,w)}}),g=f&&o?aC(f,t,m).filter(io.isDefined):[],y=f&&t&&o&&A;return d.jsx(w7,{isMediaDialogOpen:_,onMediaSelected:u,onMediaDialogOpenChange:S,children:d.jsx(E.Suspense,{fallback:d.jsx("div",{style:{height:95}}),children:y?d.jsx(U7,{allContentViews:A,content:t,contentView:m,fieldLabel:I,imageLabel:g,initialImages:T,isUpdating:c,page:l,readOnly:r,thumbnailName:f.name,onClear:v,onContentChange:i,onCropperDialogClose:a,onMediaDialogOpenChange:S,onPageChange:s}):d.jsx(I7,{fieldLabel:I,isUpdating:c,readOnly:r,onMediaDialogOpenChange:S})})})}function xRe(e){var _,S;const{searchTerm:t,catalogId:n}=e,r=Oe();r.integrationFields||Pn("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,[s,u]=E.useState(1),[c,l]=E.useState([]),[f,p]=E.useState(""),A=Xe.useRequest(wRe,[i,a,o,n,t,t===f?s:1]);t!==f?(p(t),u(1),l(A.items)):A.items.length>0&&((_=vn.last(c))==null?void 0:_.id)!==((S=vn.last(A.items))==null?void 0:S.id)&&l(I=>I.concat(A.items));const m=s<A.totalPages;function v(){m&&u(I=>I+1)}return{items:c,response:A,fetchNextPage:v,hasNextPage:m}}function wRe(e,t,n,r,i,o=1,a=30){const s=new URL(`if/search/${r}`,e);return s.searchParams.set("searchTerm",i),s.searchParams.set("limit",a.toString()),s.searchParams.set("page",o.toString()),xe.request(s,{headers:{repository:n},credentials:xe.getRequestCredentials(t),okType:ERe})}const B7=B.object({id:B.string(),title:B.string(),imageURL:B.string().optional(),description:B.string().optional()}),ERe=B.object({items:B.array(B7),totalPages:B.number(),page:B.number()});function P7(e){const{itemId:t,catalogId:n}=e,r=Oe();r.integrationFields||Pn("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,u=Xe.useRequest($Re,[i,a,o,n,t]).items[0];if(!u)throw new Error("Item not found");return{item:u}}function $Re(e,t,n,r,i){const o=new URL(`if/read/${r}`,e);return o.searchParams.set("ids",[i].toString()),xe.request(o,{headers:{repository:n},credentials:xe.getRequestCredentials(t),okType:RRe})}const RRe=B.object({items:B.array(B7)});function KR(e){const{item:t,onClick:n,catalogId:r}=e;return d.jsxs(h.PreviewCard,{variant:"large",onClick:n,children:[d.jsx(ORe,{src:t.imageURL??"",alt:t.title}),d.jsxs(h.PreviewContent,{children:[d.jsx(h.Badge,{title:`Catalog: ${r}`,icon:"multipleStop",size:"medium"}),d.jsx(h.Text,{variant:"bold",color:"grey12",sx:{marginTop:4},children:t.title}),d.jsx(h.Text,{variant:"small",color:"grey11",children:t.description??t.id})]})]})}const Vh=76;function ORe(e){const{src:t,alt:n}=e;return t?d.jsx(h.PreviewImage,{src:t,alt:n,width:Vh,height:Vh,framed:!0}):d.jsxs(h.Box,{borderRadius:6,backgroundColor:"grey2",height:Vh,width:Vh,flexDirection:"column",alignItems:"center",justifyContent:"center",border:!0,padding:{inline:4,block:8},children:[d.jsx(h.Icon,{name:"hideImage",size:"large",color:"grey11"}),d.jsx(h.Text,{color:"grey11",variant:"small",noSelect:!0,align:"center",children:"No preview image"})]})}function nl(){return d.jsxs(h.PreviewCard,{variant:"large",children:[d.jsx(h.Skeleton,{height:76,width:76}),d.jsxs(h.PreviewContent,{children:[d.jsx(h.Skeleton,{height:24,width:168}),d.jsx(h.Skeleton,{height:24,width:240,sx:{marginTop:4}}),d.jsx(h.Skeleton,{height:16,width:144})]})]})}function FRe(e){const{open:t,onOpenChange:n,catalogId:r,onSelectItem:i}=e,o=Qe.useDebounceState({initialState:""}),a=Oe();return d.jsx(h.Dialog,{open:t,onOpenChange:n,hasClose:!1,size:{width:612,height:724},children:d.jsx(h.DialogContent,{children:d.jsxs(h.Box,{flexDirection:"column",height:"100%",children:[d.jsxs(h.Box,{padding:{top:16,inline:16},flexDirection:"column",gap:8,children:[d.jsx(h.FormSearchInput,{value:o.value,onValueChange:o.set,placeholder:"Search in your catalog"}),d.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"Select an item"})]}),a.integrationFields?d.jsx(h.ErrorBoundary,{renderError:()=>d.jsx(lC,{message:"There was an error while fetching your catalog items."}),children:d.jsx(E.Suspense,{fallback:d.jsxs(h.Box,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:[d.jsx(nl,{}),d.jsx(nl,{}),d.jsx(nl,{}),d.jsx(nl,{}),d.jsx(nl,{})]}),children:d.jsx(MRe,{searchTerm:o.debouncedValue,catalogId:r,onItemClick:i})})}):d.jsx(lC,{message:"Slice Machine does not yet support mock data for integration field in the simulator."})]})})})}function MRe(e){const{catalogId:t,searchTerm:n,onItemClick:r}=e,[i,o]=E.useTransition(),{items:a,hasNextPage:s,fetchNextPage:u}=xRe({catalogId:t,searchTerm:n});return d.jsx(d.Fragment,{children:d.jsxs(h.ScrollArea,{onScrollToBottom:()=>s&&o(u),style:{flexGrow:1,paddingTop:h.theme.space[10],paddingBottom:h.theme.space[16],paddingInline:h.theme.space[16],display:"flex",flexDirection:"column",gap:h.theme.space[12]},threshold:252,children:[a.length===0?d.jsx(lC,{}):a.map(c=>d.jsx(KR,{item:c,catalogId:t,onClick:()=>r(c)},c.id)),d.jsx(h.AnimatedElement,{animation:{name:"fade"},children:i&&d.jsx(h.Text,{color:"grey11",align:"center",sx:{marginBlock:8},children:"Loading more results ..."})})]})})}function lC(e){const{message:t="We can't find any items matching your search"}=e,n="Oops!";return d.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:d.jsxs(h.BlankSlate,{children:[d.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),d.jsx(h.BlankSlateTitle,{size:"big",children:n}),d.jsx(h.BlankSlateDescription,{width:360,children:t})]})})}function kRe(e){const{itemId:t,item:n}=e,r=Oe();return t&&n&&n.id===t?d.jsx(rl,{...e,value:n.title}):t&&r.integrationFields?d.jsx(h.ErrorBoundary,{renderError:()=>d.jsx(rl,{...e,value:t}),children:d.jsx(E.Suspense,{fallback:d.jsx(rl,{...e,value:t}),children:d.jsx(URe,{...e,itemId:t})},t)},t):t&&!r.integrationFields?d.jsx(rl,{...e,value:t}):d.jsx(rl,{...e,value:""})}function LRe(e){const{catalogId:t,itemId:n,item:r}=e,i=Oe();return n&&r&&r.id===n?d.jsx(h.FieldFooter,{children:d.jsx(KR,{catalogId:t,item:r})}):n&&i.integrationFields?d.jsx(h.ErrorBoundary,{renderError:()=>null,children:d.jsx(h.FieldFooter,{children:d.jsx(E.Suspense,{fallback:d.jsx(nl,{}),children:d.jsx(jRe,{catalogId:t,itemId:n})},n)})},n):null}function jRe(e){const{itemId:t,catalogId:n}=e,{item:r}=P7({catalogId:n,itemId:t});return d.jsx(KR,{catalogId:n,item:r})}function rl(e){const{id:t,field:n,readOnly:r,value:i,onFocus:o,onClearItem:a}=e;return d.jsx(Qs,{id:t,placeholder:Pc(n),readOnly:!0,variant:"link",value:i,...!r&&{cursor:"pointer",onFocus:o},endAdornment:d.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!i,onClick:a})})}function URe(e){const{itemId:t,catalogId:n}=e,{item:r}=P7({catalogId:n,itemId:t});return d.jsx(rl,{...e,value:r.title})}function BRe(e){var A;const{id:t,field:n,content:r,readOnly:i,onContentChange:o}=e,[a,s]=E.useState(!1),[u,c]=E.useState(),l=(A=n.config)==null?void 0:A.catalog;if(!l)return null;function f(m){o({value:m.id,__TYPE__:"IntegrationFieldsContent"}),c(m),s(!1)}function p(){o(void 0),c(void 0)}return d.jsxs(d.Fragment,{children:[d.jsxs(h.Field,{footer:d.jsx(LRe,{catalogId:l,item:u,itemId:r==null?void 0:r.value}),children:[d.jsx(h.FieldIcon,{name:"multipleStop"}),d.jsx(h.FieldLabel,{htmlFor:t,children:nr(n)}),d.jsx(h.FieldControl,{children:d.jsx(kRe,{id:t,field:n,readOnly:i,catalogId:l,item:u,itemId:r==null?void 0:r.value,onFocus:()=>s(!0),onClearItem:p})})]}),d.jsx(FRe,{open:a,onOpenChange:s,catalogId:l,onSelectItem:f})]})}function PRe(e){const{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e;return d.jsxs(h.Field,{children:[d.jsx(h.FieldIcon,{name:"notes"}),d.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),d.jsx(h.FieldControl,{children:d.jsx(h.TextArea,{id:r,placeholder:Pc(n),readOnly:o,paddingLeft:4,paddingRight:12,sx:{flexGrow:1},value:(t==null?void 0:t.value)??"",onChange:a=>{i(WRe(a))}})})]})}function WRe(e){return e.length===0?void 0:{__TYPE__:"FieldContent",type:"Text",value:e}}const DRe=({content:e,field:t,id:n,onContentChange:r,readOnly:i})=>{var s,u;const o=Number(e==null?void 0:e.value),a=Number.isFinite(o)?o:void 0;return d.jsxs(h.Field,{children:[d.jsx(h.FieldIcon,{name:"pin"}),d.jsx(h.FieldLabel,{htmlFor:n,children:nr(t)}),d.jsx(h.FieldControl,{children:d.jsx(h.NumberInput,{id:n,value:a,min:(s=t.config)==null?void 0:s.min,max:(u=t.config)==null?void 0:u.max,padding:b7,placeholder:Pc(t),readOnly:i,onValueChange:c=>r(KRe(c))})})]})};function KRe(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Number",value:String(e)}}function dn(e){this.content=e}dn.prototype={constructor:dn,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new dn(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new dn(n)},addToStart:function(e,t){return new dn([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new dn(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new dn(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=dn.from(e),e.size?new dn(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=dn.from(e),e.size?new dn(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=dn.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};dn.from=function(e){if(e instanceof dn)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new dn(t)};function W7(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let a=0;i.text[a]==o.text[a];a++)n++;return n}if(i.content.size||o.content.size){let a=W7(i.content,o.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function D7(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let a=e.child(--i),s=t.child(--o),u=a.nodeSize;if(a==s){n-=u,r-=u;continue}if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){let c=0,l=Math.min(a.text.length,s.text.length);for(;c<l&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){let c=D7(a.content,s.content,n-1,r-1);if(c)return c}n-=u,r-=u}}class J{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let a=0,s=0;s<n;a++){let u=this.content[a],c=s+u.nodeSize;if(c>t&&r(u,i+s,o||null,a)!==!1&&u.content.size){let l=s+1;u.nodesBetween(Math.max(0,t-l),Math.min(u.content.size,n-l),r,i+l)}s=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",a=!0;return this.nodesBetween(t,n,(s,u)=>{s.isText?(o+=s.text.slice(Math.max(t,u)-u,n-u),a=!r):s.isLeaf?(i?o+=typeof i=="function"?i(s):i:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),a=!r):!a&&s.isBlock&&(o+=r,a=!0)},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new J(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,a=0;a<n;o++){let s=this.content[o],u=a+s.nodeSize;u>t&&((a<t||u>n)&&(s.isText?s=s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),i+=s.nodeSize),a=u}return new J(r,i)}cutByIndex(t,n){return t==n?J.empty:t==0&&n==this.content.length?this:new J(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new J(i,o)}addToStart(t){return new J([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new J(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return W7(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return D7(this,t,n,r)}findIndex(t,n=-1){if(t==0)return Qh(0,t);if(t==this.size)return Qh(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),a=i+o.nodeSize;if(a>=t)return a==t||n>0?Qh(r+1,a):Qh(r,i);i=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return J.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new J(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return J.empty;let n,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new J(n||t,r)}static from(t){if(!t)return J.empty;if(t instanceof J)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new J([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}J.empty=new J([],0);const Yb={index:0,offset:0};function Qh(e,t){return Yb.index=e,Yb.offset=t,Yb}function Nm(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!Nm(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Nm(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let mt=class fC{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Nm(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);return r.create(n.attrs)}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return fC.none;if(t instanceof fC)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};mt.none=[];class hp extends Error{}class re{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=N7(this.content,t+this.openStart,n);return r&&new re(r,this.openStart,this.openEnd)}removeBetween(t,n){return new re(K7(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return re.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new re(J.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new re(t,r,i)}}re.empty=new re(J.empty,0,0);function K7(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(i==t||o.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(K7(o.content,t-i-1,n-i-1)))}function N7(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),a=e.maybeChild(i);if(o==t||a.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=N7(a.content,t-o-1,n);return s&&e.replaceChild(i,a.copy(s))}function NRe(e,t,n){if(n.openStart>e.depth)throw new hp("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new hp("Inconsistent open depths");return q7(e,t,n,0)}function q7(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let a=q7(e,t,n,r+1);return o.copy(o.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,s=a.content;return Au(a,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:a,end:s}=qRe(n,e);return Au(o,Q7(e,a,s,t,r))}else return Au(o,qm(e,t,r))}function V7(e,t){if(!t.type.compatibleContent(e.type))throw new hp("Cannot join "+t.type.name+" onto "+e.type.name)}function dC(e,t,n){let r=e.node(n);return V7(r,t.node(n)),r}function pu(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Rd(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(pu(e.nodeAfter,r),o++));for(let s=o;s<a;s++)pu(i.child(s),r);t&&t.depth==n&&t.textOffset&&pu(t.nodeBefore,r)}function Au(e,t){return e.type.checkContent(t),e.copy(t)}function Q7(e,t,n,r,i){let o=e.depth>i&&dC(e,t,i+1),a=r.depth>i&&dC(n,r,i+1),s=[];return Rd(null,e,i,s),o&&a&&t.index(i)==n.index(i)?(V7(o,a),pu(Au(o,Q7(e,t,n,r,i+1)),s)):(o&&pu(Au(o,qm(e,t,i+1)),s),Rd(t,n,i,s),a&&pu(Au(a,qm(n,r,i+1)),s)),Rd(r,null,i,s),new J(s)}function qm(e,t,n){let r=[];if(Rd(null,e,n,r),e.depth>n){let i=dC(e,t,n+1);pu(Au(i,qm(e,t,n+1)),r)}return Rd(t,null,n,r),new J(r)}function qRe(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)i=t.node(o).copy(J.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class mp{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return mt.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let s=r;r=i,i=s}let o=r.marks;for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!i||!o[a].isInSet(i.marks))&&(o=o[a--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Vm(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let a=t;;){let{index:s,offset:u}=a.content.findIndex(o),c=o-u;if(r.push(a,s,i+u),!c||(a=a.child(s),a.isText))break;o=c-1,i+=u+1}return new mp(n,r,o)}static resolveCached(t,n){for(let i=0;i<Gb.length;i++){let o=Gb[i];if(o.pos==n&&o.doc==t)return o}let r=Gb[Jb]=mp.resolve(t,n);return Jb=(Jb+1)%VRe,r}}let Gb=[],Jb=0,VRe=12;class Vm{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const QRe=Object.create(null);let pl=class pC{constructor(t,n,r,i=mt.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||J.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&Nm(this.attrs,n||t.defaultAttrs||QRe)&&mt.sameSet(this.marks,r||mt.none)}copy(t=null){return t==this.content?this:new pC(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new pC(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return re.empty;let i=this.resolve(t),o=this.resolve(n),a=r?0:i.sharedDepth(n),s=i.start(a),c=i.node(a).content.cut(i.pos-s,o.pos-s);return new re(c,i.depth-a,o.depth-a)}replace(t,n,r){return NRe(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return mp.resolveCached(this,t)}resolveNoCache(t){return mp.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),z7(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=J.empty,i=0,o=r.childCount){let a=this.contentMatchAt(t).matchFragment(r,i,o),s=a&&a.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let u=i;u<o;u++)if(!this.type.allowsMarks(r.child(u).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),a=o&&o.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=mt.none;for(let n=0;n<this.marks.length;n++)t=this.marks[n].addToSet(t);if(!mt.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=J.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,i,r)}};pl.prototype.text=void 0;class Qm extends pl{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):z7(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Qm(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Qm(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function z7(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class ju{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new zRe(t,n);if(r.next==null)return ju.empty;let i=H7(r);r.next&&r.err("Unexpected trailing text");let o=eOe(XRe(i));return tOe(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function o(a,s){let u=a.matchFragment(t,r);if(u&&(!n||u.validEnd))return J.from(s.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:l,next:f}=a.next[c];if(!(l.isText||l.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let p=o(f,s.concat(l));if(p)return p}}return null}return o(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){let a=[];for(let s=i;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<o.next.length;a++){let{type:s,next:u}=o.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!i.type||u.validEnd)&&(r.push({match:s.contentMatch,type:s,via:i}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)o+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return o}).join(`
34
+ from ${a===1?"it":"them"}.`]})}),d.jsxs(h.DialogActions,{children:[d.jsx(h.DialogCancelButton,{}),d.jsx(h.DialogActionButton,{onClick:f,color:"tomato",loading:c,children:"Yes, I want to delete"})]})]})}function BEe(){const e=E.useContext(Xe.ErrorBoundaryContext);return d.jsx(h.Box,{flexDirection:"column",children:d.jsxs(h.BlankSlate,{children:[d.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed"}),d.jsx(h.BlankSlateTitle,{size:"big",children:"Oops!"}),d.jsx(h.BlankSlateDescription,{width:360,children:"We couldn't load your media tags."}),d.jsx(h.BlankSlateActions,{children:d.jsx(h.Button,{onClick:e==null?void 0:e.reset,size:"medium",children:"Try again"})})]})})}function PEe(e){const{id:t,config:n}=e;n.mediaLibrary||Pn("mediaLibrary");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return xe.request(new URL(`tags/${t}`,r),{headers:{repository:i},method:"DELETE",credentials:xe.getRequestCredentials(o),okType:B.unknown()})}function WEe(e){const{id:t,name:n,config:r}=e;r.mediaLibrary||Pn("mediaLibrary");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=r;return xe.request(new URL(`tags/${t}`,i),{headers:{repository:o},method:"PATCH",credentials:xe.getRequestCredentials(a),body:{name:n},okType:B.unknown()})}function DEe(){return d.jsx(h.Box,{flexDirection:"column",gap:16,children:vn.range(1,6).map(e=>d.jsxs(h.Box,{justifyContent:"space-between",children:[d.jsx(h.Skeleton,{height:24,width:85}),d.jsx(h.Skeleton,{height:24,width:45})]},e))})}function KEe(){const e=Bc(),{onFilesUpload:t,isUploading:n,tagManagerOpen:r}=It();return e.length===0&&r===!1?d.jsx(i7,{onFilesUpload:t,isUploading:n}):d.jsx(h.Box,{flexDirection:"column",backgroundColor:"grey1",width:"100%",padding:16,gap:16,borderRadius:{topLeft:8,topRight:8},children:r?d.jsx(kEe,{}):d.jsxs(d.Fragment,{children:[d.jsx(Zwe,{}),d.jsx(tEe,{}),d.jsx(xEe,{})]})})}function NEe(){const e=Vs();return d.jsx(r7,{hasSelectedMedia:e.selectedCount!==0,children:d.jsx(KEe,{})})}function f7(e){const{assetType:t,onSelectedChange:n,actionContainerRef:r}=e;return d.jsx(h.ErrorBoundary,{renderError:()=>d.jsx(Xq,{}),children:d.jsx(E.Suspense,{fallback:d.jsx(Pwe,{actionContainerRef:r}),children:d.jsx(_q,{children:d.jsx(Rwe,{assetType:t,actionContainerRef:r,onSelectedChange:n,children:d.jsx(jwe,{children:d.jsx(qEe,{})})})})})})}function qEe(){const{media:e}=It(),t=Yq();return d.jsx(Nwe,{children:d.jsx(e7,{sidePane:t?void 0:d.jsx(NEe,{}),mediaActions:d.jsx(kwe,{}),mediaToolbar:d.jsx(Vwe,{}),mediaList:e.length===0?d.jsx(Fwe,{}):d.jsx(Bwe,{})})})}var d7={};Object.defineProperty(d7,"__esModule",{value:!0});var VEe=d7.confetti=XEe,QEe=["#a864fd","#29cdff","#78ff44","#ff718d","#fdff6a"];function zEe(e,t,n,r,i){return Array.from({length:t}).map(function(o,a){var s=document.createElement("div"),u=n[a%n.length];return s.style["background-color"]=u,s.style.width=r,s.style.height=i,s.style.position="absolute",s.style.willChange="transform, opacity",s.style.visibility="hidden",e.appendChild(s),s})}function HEe(e,t,n,r){var i=e*(Math.PI/180),o=t*(Math.PI/180);return{x:0,y:0,z:0,wobble:r()*10,wobbleSpeed:.1+r()*.1,velocity:n*.5+r()*n,angle2D:-i+(.5*o-r()*o),angle3D:-(Math.PI/4)+r()*(Math.PI/2),tiltAngle:r()*Math.PI,tiltAngleSpeed:.1+r()*.3}}function YEe(e,t,n,r){e.physics.x+=Math.cos(e.physics.angle2D)*e.physics.velocity,e.physics.y+=Math.sin(e.physics.angle2D)*e.physics.velocity,e.physics.z+=Math.sin(e.physics.angle3D)*e.physics.velocity,e.physics.wobble+=e.physics.wobbleSpeed,r?e.physics.velocity*=r:e.physics.velocity-=e.physics.velocity*n,e.physics.y+=3,e.physics.tiltAngle+=e.physics.tiltAngleSpeed;var i=e.physics,o=i.x,a=i.y,s=i.z,u=i.tiltAngle,c=i.wobble,l=o+10*Math.cos(c),f=a+10*Math.sin(c),p="translate3d("+l+"px, "+f+"px, "+s+"px) rotate3d(1, 1, 1, "+u+"rad)";e.element.style.visibility="visible",e.element.style.transform=p,e.element.style.opacity=1-t}function GEe(e,t,n,r,i,o){var a=void 0;return new Promise(function(s){function u(c){a||(a=c);var l=c-a,f=a===c?0:(c-a)/i;t.slice(0,Math.ceil(l/o)).forEach(function(p){YEe(p,f,n,r)}),c-a<i?requestAnimationFrame(u):(t.forEach(function(p){if(p.element.parentNode===e)return e.removeChild(p.element)}),s())}requestAnimationFrame(u)})}var JEe={angle:90,spread:45,startVelocity:45,elementCount:50,width:"10px",height:"10px",perspective:"",colors:QEe,duration:3e3,stagger:0,dragFriction:.1,random:Math.random};function ZEe(e){return!e.stagger&&e.delay&&(e.stagger=e.delay),e}function XEe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Object.assign({},JEe,ZEe(t)),r=n.elementCount,i=n.colors,o=n.width,a=n.height,s=n.perspective,u=n.angle,c=n.spread,l=n.startVelocity,f=n.decay,p=n.dragFriction,A=n.duration,m=n.stagger,v=n.random;e.style.perspective=s;var _=zEe(e,r,i,o,a),S=_.map(function(I){return{element:I,physics:HEe(u,c,l,v)}});return GEe(e,S,p,f,A,m)}function e$e(e){const{href:t,variant:n}=e,r=n==="dark"?"white":"grey11";return d.jsx(h.Box,{justifyContent:"center",padding:{block:6},children:d.jsxs(h.Text,{href:t,variant:"smallBold",color:r,children:["Or watch our full course",d.jsx(h.Icon,{name:"playCircle",color:r,size:"small",sx:{marginLeft:4}})]})})}const t$e=[{id:"createPageType",title:"Create a Page Type",description:"Build the structure for your page.",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Create_page_type_xdn13j.mp4",content:d.jsx(h.Text,{children:"A page type is a base content structure editors will use to create pages in the Page Builder (Prismic's content creation UI). A page type can be reusable (e.g., for multiple blog posts) or single (e.g., for a one-time page like the homepage)."})},{id:"codePage",title:"Code Your Page Type",description:"Prepare code to fetch content.",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Step2_code_your_page_jatiur.mp4",content:d.jsx(h.Text,{children:"Prepare your code to query the content from the Prismic API."})},{id:"createSlice",title:"Create a Slice",description:"Build a reusable website section.",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918322/DEV_TOOLS/ONBOARDING_GUIDE/Step3_add_slice_qzmvxf.mp4",content:d.jsx(h.Text,{children:"Slices are website sections that can be reused on different pages with different content. Each slice has a code component automatically generated by Slice Machine. Start with a template and look at your code to see how it's structured."})},{id:"reviewAndPush",title:"Review and Push Changes",description:"Enable editors to create content.",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/DevTools_Squad_push_changes_ovvmul.mp4",content:d.jsx(h.Text,{children:"Your page types and slices currently exist only in your local project. Push them to your repository to make them available for your content editors."})},{id:"createContent",title:"Create Content",description:"Publish a page to the Prismic API.",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918324/DEV_TOOLS/ONBOARDING_GUIDE/Cre%CC%81er_contenu_e%CC%81tape_4_z9vlzt.mp4",content:d.jsx(h.Text,{children:"In Prismic, content creation takes place in the Prismic Page Builder UI. Open the Page Builder and start creating your first page."})},{id:"renderPage",title:"Render your page",description:"View your page in the browser.",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918321/DEV_TOOLS/ONBOARDING_GUIDE/Step_6_Render_Page_tnauh9.mp4",content:d.jsxs(h.Text,{children:["Now that your content is published, you can run your project in your terminal and visit the page on your local server (e.g.,"," ",d.jsx(h.Text,{component:"code",children:"localhost:3000/example-page"}),"). Your content should now be visible!"]})}],n$e=[{id:"createProject",title:"Create your Prismic website",description:"Create and set up your project",defaultCompleted:!0},{id:"createPageType",title:"Create your first Page Type",description:"Build the structure of your page",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Create_page_type_xdn13j.mp4",content:d.jsx(h.Text,{children:"A page type is a base content structure editors will use to create pages in the Page Builder (Prismic's content creation UI). A page type can be reusable (e.g., for multiple blog posts) or single (e.g., for a one-time page like the homepage)."})},{id:"codePage",title:"Code your Page",description:"Prepare code to fetch content",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Step2_code_your_page_jatiur.mp4",content:d.jsx(h.Text,{children:"Prepare your code to query the content from the Prismic API."})},{id:"createSlice",title:"Create your first Slice",description:"Build a reusable section",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918322/DEV_TOOLS/ONBOARDING_GUIDE/Step3_add_slice_qzmvxf.mp4",content:d.jsx(h.Text,{children:"Slices are website sections that can be reused on different pages with different content. Each slice has a code component automatically generated by Slice Machine. Start with a template and look at your code to see how it's structured."})},{id:"reviewAndPush",title:"Review & push changes",description:"Enable editors to create content",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/DevTools_Squad_push_changes_ovvmul.mp4",content:d.jsx(h.Text,{children:"Your page types and slices currently exist only in your local project. Push them to your repository to make them available for your content editors."})},{id:"createContent",title:"Create content for your page",description:"Publish your page to the API",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918324/DEV_TOOLS/ONBOARDING_GUIDE/Cre%CC%81er_contenu_e%CC%81tape_4_z9vlzt.mp4",content:d.jsx(h.Text,{children:"In Prismic, content creation takes place in the Prismic Page Builder UI. Open the Page Builder and start creating your first page."})},{id:"renderPage",title:"Preview your page",description:"View your page in the browser",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918321/DEV_TOOLS/ONBOARDING_GUIDE/Step_6_Render_Page_tnauh9.mp4",content:d.jsxs(h.Text,{children:["Now that your content is published, you can run your project in your terminal and visit the page on your local server (e.g.,"," ",d.jsx(h.Text,{component:"code",children:"localhost:3000/example-page"}),"). Your content should now be visible!"]})}],r$e={next:"https://prismic.dev/course/next",nuxt:"https://prismic.dev/course/nuxt",sveltekit:"https://prismic.dev/course/sveltekit",other:""};function i$e(e){const{children:t,variant:n,framework:r,onComplete:i,track:o,fetchState:a,toggleStep:s}=e,[u,c]=E.useState();E.useEffect(()=>{(async()=>{try{const T=await a();c(T)}catch(T){console.error("Error fetching onboarding progress state:",T)}})()},[a]);const l=n==="default"?t$e:n$e,f=l.map(({id:I})=>I),p=l.filter(I=>I.defaultCompleted).length,A=((u==null?void 0:u.completedSteps.filter(I=>f.includes(I)).length)??0)+p,m=n!=="default"&&r$e[r]||void 0;async function v(I){try{const T=await s(I.id);c({isResolved:!!(u!=null&&u.isResolved),completedSteps:T}),T.includes(I.id)&&o({event:"onboarding:step-completed",stepId:I.id,stepTitle:I.title}),T.length+p===l.length&&(i==null||i(),o({event:"onboarding:completed"}))}catch(T){console.error("Error toggling step completion",T)}}function _(I){return!!(u!=null&&u.completedSteps.includes(I.id)||I.defaultCompleted)}function S(I){return l.findIndex(({id:T})=>T===I)}return d.jsx(p7.Provider,{value:{steps:l,variant:n,tutorialLink:m,completedStepsCount:A,isResolved:u==null?void 0:u.isResolved,isStepComplete:_,getStepIndex:S,toggleStepComplete:v,track:o},children:t})}const p7=E.createContext(void 0),PR=()=>{const e=E.useContext(p7);if(e==null)throw new Error("useOnboardingContext must be used within an OnboardingProvider");return e};function o$e(e){const{step:t,stepIndex:n,isOpen:r,isStepComplete:i,onActionClick:o,onClose:a}=e,[s,u]=E.useState(c);function c(){return i?"Undo step":"Mark as done"}function l(){r&&u(c())}return d.jsxs(h.Dialog,{open:r,onOpenChange:a,onAnimationEnd:l,onAnimationStart:l,size:"small",children:[d.jsx(h.DialogHeader,{title:"Onboarding"}),d.jsxs(h.DialogContent,{children:[d.jsx(h.ScrollArea,{children:d.jsxs(h.Box,{as:"article",flexDirection:"column",padding:16,gap:16,children:[d.jsxs("section",{children:[d.jsxs(h.Text,{sx:{marginBottom:4},color:"purple9",variant:"bold",children:["Step ",n]}),d.jsx(h.Text,{variant:"h3",children:t.title}),t.content]}),t.videoUrl&&d.jsx(h.Video,{src:t.videoUrl,sizing:"contain",autoPlay:!0,loop:!0})]})}),d.jsxs(h.DialogActions,{children:[d.jsx(h.DialogCancelButton,{size:"medium",children:"Close"}),d.jsx(h.DialogActionButton,{size:"medium",onClick:o,children:s})]})]})]})}function a$e(e){const{variant:t}=e,{steps:n,completedStepsCount:r,getStepIndex:i,isStepComplete:o,toggleStepComplete:a,track:s}=PR(),[u,c]=E.useState(!1),[l,f]=E.useState(n[0]);if(!l)return null;function p(m){m.defaultCompleted||(f(m),c(!0),s({event:"onboarding:step-opened",stepId:m.id,stepTitle:m.title}))}function A(){l&&a(l),c(!1)}return d.jsxs(d.Fragment,{children:[d.jsx(o$e,{isOpen:u,step:l,stepIndex:i(l.id)+1,isStepComplete:o(l),onClose:()=>c(!1),onActionClick:A}),d.jsxs(h.DropdownMenu,{children:[d.jsx(h.DropdownMenuTrigger,{children:d.jsx(h.Button,{size:t==="default"?"medium":"large",color:"grey",sx:{width:"100%"},renderStartIcon:s$e,children:r>0?"Continue":"Start now"})}),d.jsxs(h.DropdownMenuContent,{side:"right",minWidth:256,collisionPadding:8,children:[d.jsx(h.DropdownMenuLabel,{children:d.jsx(h.Text,{variant:"small",color:"grey11",sx:{marginInline:8},children:"Progress"})}),n.map((m,v)=>{const _=o(m);return d.jsx(h.DropdownMenuItem,{onSelect:()=>p(m),description:m.description,completed:_,readOnly:m.defaultCompleted,endAdornment:m.defaultCompleted!==!0&&d.jsx(h.Icon,{name:"chevronRight",size:"small",color:"grey11"}),children:t==="default"?m.title:`${v+1} ${m.title}`},m.id)})]})]})]})}function s$e(){return d.jsx(h.Icon,{name:"arrowForward",size:"small",color:"grey11"})}function u$e(e){const{onClose:t}=e,{steps:n,completedStepsCount:r,tutorialLink:i,variant:o}=PR(),{cardColor:a,cardVariant:s,cardDescription:u,cardTitle:c,descriptionColor:l,descriptionVariant:f,progressColor:p,progressBackgroundColor:A,progressLabelColor:m,titleColor:v}=c$e({variant:o,stepsCount:n.length});return d.jsx(h.Card,{color:a,variant:s,paddingBlock:16,onClose:t,children:d.jsxs(h.CardContent,{children:[d.jsxs("div",{children:[d.jsx(h.Text,{variant:"bold",color:v,children:c}),d.jsx(h.Text,{color:l,variant:f,children:u})]}),d.jsx(h.ProgressBar,{color:p,backgroundColor:A,labelColor:m,value:r,max:n.length,displayLabel:!0,getValueLabel:(_,S)=>`${_}/${S}`}),d.jsx(a$e,{variant:o}),o!=="default"&&i&&d.jsx(e$e,{href:i,variant:o})]})})}function c$e({variant:e,stepsCount:t}){const n=t.toString();switch(e){case"light":return{cardDescription:"Render a live page with content coming from Prismic in 5 mins",cardTitle:`Build your first Prismic Page in ${n} simple steps`,cardVariant:"animated-light",descriptionColor:"grey11",titleColor:"grey12"};case"dark":return{cardDescription:"Render a live page with content coming from Prismic in 5 mins",cardTitle:`Build your first Prismic Page in ${n} simple steps`,cardVariant:"animated-dark",descriptionColor:"purple6",progressColor:"white",progressBackgroundColor:"purple8",progressLabelColor:"purple3",titleColor:"purple1"};default:return{cardColor:"grey2",cardVariant:"outlined",cardTitle:`Build a page in ${n} steps`,cardDescription:"Render a live page with content coming from Prismic",descriptionColor:"grey11",descriptionVariant:"small",titleColor:"grey12"}}}function l$e(e){const{isOnboardingVisible:t,isFadedOut:n,resolveGuide:r}=e,{isResolved:i}=PR(),[o,a]=E.useState(!1),[s,u]=E.useState(!1),[c,l]=E.useState(!0),f=E.useRef(null),p=E.useRef(null);function A(){u(!1),a(!0),l(!0)}function m(){a(!1)}function v(){const{current:_}=f,{current:S}=p;_&&S&&(S.style.overflow="hidden",l(!1),VEe(_,Dm)),setTimeout(()=>{u(!0)},f$e),setTimeout(()=>{a(!1),r()},Dm.duration)}return Qe.useOnChange(n,()=>{n&&v()}),Qe.useOnChange(i,()=>{a(!i)}),d.jsxs(d.Fragment,{children:[!o&&t&&d.jsx(h.ActionListItem,{textVariant:"normal",backgroundColor:"transparent",startIcon:"notStarted",onClick:A,children:"Get started"}),o&&t&&d.jsx(h.AnimatedElement,{enterDuration:0,exitDuration:A7,children:!s&&d.jsxs("div",{ref:p,style:{position:"relative"},children:[d.jsx(u$e,{onClose:c?m:void 0}),d.jsx("div",{ref:f,style:{position:"absolute",bottom:0,left:0}})]})})]})}const Dm={colors:["#8E44EC","#E8C7FF","#59B5F8","#C3EEFE"],elementCount:300,width:"8px",height:"8px",stagger:.2,startVelocity:35,spread:90,duration:3e3},A7=400,f$e=Dm.duration?Dm.duration-A7:0;function d$e(e){const{isOnboardingVisible:t=!0,variant:n="default",framework:r="other",track:i,fetchState:o,toggleStep:a,resolveGuide:s}=e,[u,c]=E.useState(!1);return d.jsx(i$e,{variant:n,framework:r,onComplete:()=>c(!0),track:i,fetchState:o,toggleStep:a,children:d.jsx(l$e,{isOnboardingVisible:t,isFadedOut:u,resolveGuide:s})})}const h7=E.createContext({editedUID:{current:!1},onEditUID:()=>{}});function m7(e){return Object.values(e.json).some(t=>{var n;return((n=t.uid)==null?void 0:n.type)==="UID"})}function p$e(e){const{content:t,customType:n}=e;return m7(n)&&!t.uid}function g7(e){const{documentId:t,documentsWithUid:n,uid:r}=e;return n.filter(i=>t!==i.id&&h$e({document:i,uid:r})&&A$e({...e,document:i}))}function A$e(e){const{customTypeId:t,languageId:n,document:r}=e,i=t===r.custom_type_id,o=n===r.language.id;return i&&o}function h$e(e){const{document:t,uid:n}=e,r=t.versions.filter(i=>i.uid===n);return r.length===0?!0:r.some(i=>i.status!=="archived")}function v7(e,t){if(t)return`${e}___${t}`}const y7=E.createContext({update:()=>{}});function Q0(e){const{sliceKey:t}=e||{},n=E.useContext(y7),r=v7("sliceFieldSet",t),i=t===(n==null?void 0:n.id);return{selectionId:r,selected:i,selection:n}}function nr(e){var t;return((t=e.config)==null?void 0:t.label)??(e.type==="Boolean"||e.type==="Separator"?void 0:e.fieldset)??e.type}const WR="...";function m$e(e,t,n=WR){var r,i;return(t?(r=e.config)==null?void 0:r.placeholder_true:(i=e.config)==null?void 0:i.placeholder_false)||n}function Pc(e,t=WR){var n;return((n=e.config)==null?void 0:n.placeholder)||t}function g$e(e){var s;const{content:t,field:n,id:r,readOnly:i,onContentChange:o}=e,a=(t==null?void 0:t.value)??((s=n.config)==null?void 0:s.default_value)??!1;return d.jsxs(h.Field,{children:[d.jsx(h.FieldIcon,{name:"biToggle"}),d.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),d.jsxs(h.FieldControl,{children:[d.jsx(h.Box,{padding:4,alignItems:"center",children:d.jsx(h.Text,{children:m$e(n,a)})}),d.jsx(h.Switch,{id:r,sx:{alignSelf:"center",marginLeft:"auto",marginRight:12},checked:a,onCheckedChange:u=>{i||o(v$e(u))}})]})]})}function v$e(e){return{__TYPE__:"BooleanContent",value:e}}function y$e(e){const{id:t,field:n,content:r,onContentChange:i}=e;return d.jsxs(h.Field,{children:[d.jsx(h.FieldIcon,{name:"colorLens"}),d.jsx(h.FieldLabel,{id:t,children:nr(n)}),d.jsx(h.FieldControl,{children:d.jsx(h.Box,{padding:{left:4},alignItems:"center",children:d.jsx(h.ColorInput,{onValueChange:o=>i(b$e(o)),value:r==null?void 0:r.value,"aria-labelledby":t,placeholder:Pc(n)})})})]})}function b$e(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Color",value:e}}function C$e(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=i!=null&&i.value?GC.dateFromISOString(i.value):void 0;return d.jsxs(h.Field,{children:[d.jsx(h.FieldIcon,{name:"dateRange"}),d.jsx(h.FieldLabel,{id:t,children:nr(r)}),d.jsx(h.FieldControl,{children:d.jsx(h.Box,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:d.jsx(h.DateInput,{mode:"date","aria-labelledby":t,disabled:n,value:a,onValueChange:s=>o(S$e(s))})})})]})}function S$e(e){if(e)return{__TYPE__:"FieldContent",type:"Date",value:_$e(e)}}function _$e(e){const t=`${e.getFullYear()}`.padStart(4,"0"),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0");return`${t}-${n}-${r}`}const Qs=E.forwardRef(function(t,n){return d.jsx(h.TextInput,{padding:b7,...t,ref:n,sx:{...t.sx,alignSelf:"stretch"}})}),b7={input:{inline:4},adornment:{inline:12}},I$e=({provider:e})=>T$e[e.toLowerCase()]??d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6524_22412)",children:d.jsx("path",{d:"M7.99992 1.33333C4.31992 1.33333 1.33325 4.32 1.33325 8C1.33325 11.68 4.31992 14.6667 7.99992 14.6667C11.6799 14.6667 14.6666 11.68 14.6666 8C14.6666 4.32 11.6799 1.33333 7.99992 1.33333ZM2.66659 8C2.66659 7.59333 2.71992 7.19333 2.80659 6.81333L5.99325 10V10.6667C5.99325 11.4 6.59325 12 7.32658 12V13.2867C4.70658 12.9533 2.66659 10.7133 2.66659 8ZM11.9266 11.6C11.7533 11.06 11.2599 10.6667 10.6599 10.6667H9.99325V8.66667C9.99325 8.3 9.69325 8 9.32658 8H5.32658V6.66667H6.65992C7.02658 6.66667 7.32658 6.36667 7.32658 6V4.66667H8.65992C9.39325 4.66667 9.99325 4.06667 9.99325 3.33333V3.06C11.9466 3.84667 13.3333 5.76667 13.3333 8C13.3333 9.38667 12.7933 10.6533 11.9266 11.6Z",fill:"#6F6E77"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6524_22412",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),T$e={codepen:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6523_22409)",children:d.jsx("path",{d:"M15.9879 5.44292C15.9843 5.42352 15.981 5.40413 15.9759 5.38517C15.9726 5.37375 15.9688 5.36298 15.9651 5.35177C15.9597 5.33497 15.9541 5.31816 15.9474 5.30179C15.9427 5.29037 15.9373 5.27938 15.9321 5.26839C15.9248 5.25288 15.9173 5.23758 15.9086 5.22271C15.9026 5.21172 15.8957 5.20138 15.889 5.19082C15.8798 5.1766 15.8703 5.1626 15.8599 5.14902C15.8524 5.13889 15.8446 5.1292 15.8365 5.1195C15.8257 5.10657 15.8141 5.09429 15.8024 5.08223C15.7934 5.07318 15.7843 5.06413 15.7748 5.05529C15.7623 5.04387 15.7494 5.0331 15.7358 5.02276C15.7255 5.01479 15.7154 5.0066 15.7046 4.99927C15.7007 4.99647 15.6973 4.99324 15.6932 4.99065L8.38116 0.115543C8.15039 -0.0385144 7.84939 -0.0385144 7.61863 0.115543L0.306176 4.99044C0.302082 4.99302 0.29885 4.99626 0.294756 4.99906C0.283983 5.0066 0.273856 5.01457 0.263514 5.02254C0.250155 5.0331 0.237011 5.04387 0.224515 5.05486C0.215034 5.06348 0.205985 5.07253 0.19715 5.0818C0.185084 5.09386 0.17388 5.10614 0.162892 5.11907C0.154704 5.12877 0.146947 5.13846 0.139406 5.14924C0.129064 5.16281 0.119583 5.1766 0.110318 5.19104C0.103639 5.20159 0.0969593 5.21194 0.0907108 5.22293C0.0820922 5.23779 0.0745509 5.25309 0.0674405 5.26817C0.0622694 5.27916 0.0566673 5.29037 0.0521425 5.30157C0.0454631 5.31795 0.0396456 5.33475 0.0342589 5.35156C0.030596 5.36276 0.0267177 5.37375 0.0237011 5.38388C0.0187455 5.40284 0.0150825 5.42201 0.0116351 5.44162C0.00969592 5.45153 0.00732581 5.46123 0.00603302 5.47136C0.00215465 5.50109 0 5.53082 0 5.56121V10.4372C0 10.4673 0.00215465 10.4975 0.00646395 10.527C0.00797221 10.5378 0.0107733 10.5464 0.0129279 10.5568C0.0163753 10.5762 0.0193919 10.5955 0.0258558 10.6149C0.0288723 10.6257 0.0323198 10.6365 0.0366291 10.6483C0.0420157 10.6656 0.0474023 10.6828 0.0538662 10.6985C0.058391 10.7093 0.0646395 10.7201 0.0689488 10.7309C0.0760591 10.7459 0.0840314 10.761 0.09265 10.7768C0.098683 10.7875 0.105578 10.7983 0.112042 10.8082C0.121307 10.8233 0.131434 10.8362 0.142207 10.8491C0.149748 10.8599 0.157289 10.8685 0.165908 10.8789C0.176897 10.8918 0.187455 10.9047 0.200382 10.9162C0.209217 10.9248 0.21762 10.9355 0.228393 10.942C0.24089 10.9528 0.254249 10.9636 0.267177 10.9748C0.277519 10.9834 0.288723 10.9898 0.297342 10.9982C0.301436 11.0004 0.303806 11.0047 0.308115 11.0067L7.61863 15.8841C7.73412 15.9617 7.86641 16.0005 8 15.9998C8.13359 15.9992 8.26588 15.9611 8.38137 15.8841L15.6938 11.0092C15.6979 11.0067 15.7014 11.0036 15.7052 11.0008C15.716 10.9933 15.7261 10.9853 15.7365 10.9773C15.7498 10.9668 15.763 10.9558 15.7755 10.9446C15.785 10.9362 15.794 10.9269 15.8031 10.9179C15.8149 10.9058 15.8263 10.8935 15.8371 10.8806C15.8453 10.8709 15.8531 10.8612 15.8606 10.8509C15.8709 10.8373 15.8804 10.8233 15.8897 10.8091C15.8964 10.7987 15.903 10.7882 15.9093 10.7776C15.9179 10.7625 15.9254 10.7472 15.9328 10.7317C15.9379 10.7207 15.9433 10.7097 15.9481 10.6985C15.9548 10.6819 15.9604 10.6651 15.9657 10.6483C15.9694 10.6371 15.9733 10.6261 15.9765 10.6149C15.9815 10.596 15.9849 10.5766 15.9886 10.5572C15.9903 10.5473 15.9929 10.5376 15.994 10.5275C15.9978 10.4977 16 10.468 16 10.4376V5.5625C16 5.53212 15.9976 5.50238 15.994 5.47265C15.9922 5.46209 15.989 5.45347 15.9869 5.44292H15.9879ZM7.99978 9.62638L5.56826 8.00005L7.99978 6.37351L10.4315 8.00005L7.99978 9.62638ZM7.31245 5.17919L4.33171 7.17288L1.92561 5.56336L7.31245 1.97221V5.17919ZM3.09515 7.99984L1.37531 9.15021V6.84947L3.09515 7.99984ZM4.33171 8.82765L7.31245 10.8211V14.0281L1.92561 10.4365L4.33171 8.82722V8.82765ZM8.68733 10.8207L11.6681 8.82722L14.0744 10.4365L8.68733 14.0277V10.8207ZM12.9046 8.00027L14.6247 6.84969V9.15064L12.9046 7.99984V8.00027ZM11.6681 7.17288L8.68733 5.1794V1.97221L14.0744 5.56336L11.6681 7.17288Z",fill:"black"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22409",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),codesandbox:d.jsxs("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6523_22406)",children:d.jsx("path",{d:"M6.24312 14.1129V8.35021L1.28724 5.49888V8.78388L3.55732 10.0999V12.5702L6.24312 14.1129ZM7.53036 14.1468L10.2658 12.571V10.0422L12.5506 8.71812V5.47426L7.53036 8.3727V14.1468ZM11.8904 4.36906L9.25164 2.83995L6.93472 4.18436L4.60022 2.8386L1.93795 4.38817L6.90626 7.24665L11.8904 4.36906ZM0 12.0115V4.02675L6.91821 0L13.8378 4.00984V11.9988L6.91805 15.985L0 12.0115Z",fill:"black"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22406",children:d.jsx("rect",{width:"13.8378",height:"16",fill:"white"})})})]}),dailymotion:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsxs("g",{clipPath:"url(#clip0_6523_22345)",children:[d.jsx("path",{d:"M16 0H0V16H16V0Z",fill:"white"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.73038 10.3003C8.40789 10.6268 8.00377 10.7901 7.51804 10.7901C7.04025 10.7901 6.64411 10.6308 6.32956 10.3122C6.01503 9.99367 5.85776 9.58351 5.85776 9.08176C5.85776 8.60389 6.01901 8.20766 6.3415 7.89306C6.66401 7.57847 7.06016 7.42118 7.52998 7.42118C7.84849 7.42118 8.13715 7.49484 8.39594 7.64219C8.65474 7.78953 8.8558 7.99063 8.99913 8.2455C9.14246 8.50034 9.21412 8.77908 9.21412 9.08176C9.21412 9.56757 9.05287 9.97376 8.73038 10.3003ZM9.10662 3.58632V6.35792C8.82791 6.07918 8.53131 5.87808 8.21678 5.75463C7.90223 5.63118 7.54988 5.56946 7.1597 5.56946C6.53062 5.56946 5.96527 5.72476 5.4636 6.03538C4.96193 6.34597 4.57176 6.77007 4.29305 7.30768C4.01435 7.84528 3.875 8.44062 3.875 9.09369C3.875 9.76269 4.01236 10.366 4.28708 10.9036C4.5618 11.4412 4.95197 11.8653 5.45763 12.1759C5.96328 12.4865 6.54258 12.6418 7.19553 12.6418C8.14312 12.6418 8.80403 12.3312 9.17831 11.71H9.20218V12.5595H11.0894V3.15625L9.10662 3.58632Z",fill:"#232323"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22345",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),flickr:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("rect",{width:"16",height:"16",fill:"white"}),d.jsxs("g",{clipPath:"url(#clip0_6523_22379)",children:[d.jsx("path",{d:"M8.43286 7.78387C8.43286 9.321 9.67925 10.5674 11.2166 10.5674C12.7538 10.5674 13.9999 9.321 13.9999 7.78387C13.9999 6.24675 12.7538 5.00061 11.2166 5.00061C9.67925 5.00061 8.43286 6.24675 8.43286 7.78387Z",fill:"#FF0084"}),d.jsx("path",{d:"M2 7.78408C2 9.32121 3.24614 10.5676 4.78352 10.5676C6.32089 10.5676 7.56703 9.32121 7.56703 7.78408C7.56703 6.24695 6.32089 5.00081 4.78352 5.00081C3.24614 5.00081 2 6.24695 2 7.78408Z",fill:"#0063DC"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22379",children:d.jsx("rect",{width:"12",height:"5.568",fill:"white",transform:"translate(2 5)"})})})]}),giphy:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("rect",{width:"16",height:"16",fill:"#121212"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3.38889V12.2778H5.11111V3.38889H4Z",fill:"#00FF99"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6663 5.61111V12.2778H11.7774V5.61111H10.6663Z",fill:"#9933FF"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.75 3H4V4.11111H8.83333V3H7.75Z",fill:"#FFF35C"}),d.jsx("path",{d:"M9.00041 4.11111H7.33374H8.83374V3.77778L9.00041 4.11111Z",fill:"#999999"}),d.jsx("path",{d:"M8.83374 4.11111H7.33374L8.44485 3L8.83374 3.77778V4.11111Z",fill:"#999237"}),d.jsx("path",{d:"M10.6663 7.44444V5.77778L11.7774 6.33333L10.6663 7.44444Z",fill:"#5C1F99"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6667 11.8889H4V13H11.7778V11.8889H10.6667Z",fill:"#00CCFF"}),d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6668 5.22222V4.11111H9.55569V3H8.44458V3.90739V5.0185V6.33333H9.55569H10.6668H11.7779V5.22222H10.6668Z",fill:"#FF6666"})]}),instagram:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[d.jsxs("g",{clipPath:"url(#clip0_6523_22356)",children:[d.jsx("mask",{id:"mask0_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:d.jsx("path",{d:"M4.70325 0.0949238C3.85627 0.1349 3.27778 0.270564 2.77227 0.468642C2.24897 0.672648 1.80537 0.946046 1.36408 1.38914C0.922279 1.83249 0.650958 2.27688 0.448504 2.8007C0.252489 3.3075 0.119662 3.88627 0.0822604 4.73377C0.045126 5.58283 0.0366102 5.85363 0.0407495 8.01522C0.0448729 10.1765 0.0544124 10.4479 0.0949012 11.2972C0.135388 12.1439 0.270546 12.7222 0.468623 13.2279C0.672886 13.7512 0.946004 14.1946 1.38935 14.6361C1.83245 15.0777 2.27708 15.3487 2.80115 15.5515C3.30744 15.7472 3.88644 15.8806 4.73369 15.9177C5.58273 15.9551 5.85379 15.9634 8.01483 15.9592C10.1769 15.9551 10.448 15.9456 11.297 15.9053C12.144 15.8648 12.722 15.7292 13.228 15.5316C13.7513 15.3268 14.1949 15.0542 14.6362 14.6109C15.0775 14.1678 15.3488 13.7231 15.5512 13.199C15.7473 12.6927 15.8806 12.1137 15.9175 11.267C15.9546 10.4174 15.9634 10.1461 15.9593 7.98478C15.9551 5.8232 15.9453 5.55239 15.9051 4.7036C15.8649 3.85609 15.7292 3.27811 15.5314 2.77208C15.3269 2.24877 15.054 1.80567 14.6109 1.36387C14.1678 0.922574 13.7232 0.650729 13.1991 0.448785C12.6926 0.252768 12.1138 0.119166 11.2666 0.0825425C10.4175 0.0448876 10.1465 0.0366393 7.98465 0.0407642C5.82336 0.0448892 5.5523 0.0541772 4.70325 0.0949238ZM4.79611 14.485C4.02004 14.4512 3.59863 14.3222 3.31776 14.2142C2.94585 14.0703 2.68046 13.8977 2.40114 13.6205C2.12234 13.3422 1.94928 13.0776 1.80408 12.7064C1.69497 12.4255 1.5637 12.0046 1.52734 11.2286C1.48788 10.3896 1.47886 10.1378 1.47498 8.01237C1.47086 5.88742 1.47859 5.63569 1.51522 4.79593C1.54848 4.02038 1.67822 3.59843 1.78602 3.31782C1.92993 2.94539 2.10196 2.68051 2.37973 2.4012C2.65801 2.12187 2.92263 1.94933 3.29402 1.80412C3.57463 1.69451 3.99555 1.56426 4.77134 1.52738C5.61084 1.48766 5.8623 1.47915 7.98723 1.47502C10.1127 1.47089 10.3644 1.47838 11.2042 1.51526C11.9797 1.54904 12.4016 1.67749 12.682 1.78607C13.0541 1.92998 13.3195 2.1015 13.5986 2.37979C13.8777 2.65808 14.0507 2.92218 14.1959 3.29435C14.3055 3.57418 14.4358 3.99562 14.4724 4.77117C14.5124 5.61068 14.5214 5.8624 14.5253 7.98736C14.5294 10.1128 14.5217 10.3646 14.4848 11.2038C14.451 11.9799 14.3223 12.4016 14.214 12.6827C14.0701 13.0543 13.898 13.3197 13.62 13.5991C13.342 13.8773 13.0774 14.0509 12.7057 14.1961C12.4256 14.3055 12.0042 14.436 11.2289 14.4729C10.3894 14.5123 10.1379 14.5214 8.01225 14.5252C5.88732 14.5294 5.63586 14.5214 4.79611 14.485ZM11.2854 3.74493C11.2864 4.27211 11.7151 4.69896 12.2422 4.69792C12.7697 4.69689 13.1965 4.2685 13.1957 3.74132C13.1947 3.21414 12.7661 2.78704 12.2386 2.78807C11.7112 2.7891 11.2844 3.21775 11.2854 3.74493ZM3.91277 8.00773C3.91714 10.2653 5.75063 12.0913 8.0076 12.0869C10.2648 12.0825 12.0919 10.2495 12.0875 7.99201C12.0831 5.73526 10.2494 3.90819 7.99188 3.91257C5.73489 3.91696 3.90837 5.75073 3.91277 8.00773ZM5.34648 8.0049C5.3439 6.53969 6.52978 5.34942 7.99471 5.34683C9.45991 5.344 10.6504 6.52937 10.6533 7.99484C10.6561 9.46031 9.47022 10.6503 8.00477 10.6532C6.53984 10.656 5.34932 9.47037 5.34648 8.0049Z",fill:"white"})}),d.jsxs("g",{mask:"url(#mask0_6523_22356)",children:[d.jsx("mask",{id:"mask1_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:d.jsx("path",{d:"M16.5905 -0.583628H-0.603516V16.6106H16.5905V-0.583628Z",fill:"white"})}),d.jsxs("g",{mask:"url(#mask1_6523_22356)",children:[d.jsx("mask",{id:"mask2_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:d.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),d.jsxs("g",{mask:"url(#mask2_6523_22356)",children:[d.jsx("mask",{id:"mask3_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:d.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),d.jsx("g",{mask:"url(#mask3_6523_22356)",children:d.jsx("rect",{x:"-0.688721",y:"-0.665792",width:"17.3622",height:"17.3622",fill:"url(#pattern0)"})})]})]})]})]}),d.jsxs("defs",{children:[d.jsx("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:d.jsx("use",{xlinkHref:"#image0_6523_22356",transform:"scale(0.000439947)"})}),d.jsx("clipPath",{id:"clip0_6523_22356",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})}),d.jsx("image",{id:"image0_6523_22356",width:"2273",height:"2275",xlinkHref:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEAlgCWAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMAEAMCAwYAAFokAABijgAAd23/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoXHh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoaJjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEICOMI4QMBIgACEQEDEQH/xADDAAEBAQEBAQEBAAAAAAAAAAAAAQUEBgMHAgEBAQADAQEAAAAAAAAAAAAAAAECAwUEBhAAAQIEBAcBAQEBAQAAAAA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LUstAgtgpLFSygtgpLFCoLUsAqC1LALUALYAKgAtSwCgEpYKAAASygUAAAAD13w+/w43CDXkAAAALAAAAAAAAACiAAALLAAAIAoAABFCAALKABIAoAAKIAEAUAAIBQABAAABRFJFEURSwAACWUACwAVAqWACWWgQKlVARYqVUCxYJVsBBalgCwVAqWUCwEWWpYBbAJYqWUCwVAsFJYqWKllAsFQWpYJZallAsFsWUlipVQWwCWWhUCpZQVAqWUFqWAVAoUlgFqUQUACwUAAAllAoAAAAHrvh38HJ4IaMwAABYAAAAAAAAAAoQAABZYAABFlAAAhZUAAAoAAkAoAAKECAFlAAQBZQAIAAAUQAAAABLAFACoAFgAqBQIBLLQEsUKgEsUKgVLALYBLLUsAWCksVKILYBLLQIFgpLFSygWCoFiwSy1LFSqgWCoLUsEstSqgWCkstSxQqC2LBLLQqASy0KgVLKC1LAKgUKSwC0CACgVLAKAASiC0AAAddx5n6A9HK6csy4/8jy7QAAAAAAAAAAAKAAAAAIABKAAAAACgAAAAAoAAQIAUAAAAAKAAAAAAAAAAAAAAAABAAAQAApBQAEAACBQpAAAgAWAAgoBABUABCgEFAQAEALUABABUKAQAIFCoACAC1AAQApBQAIKAQAAtgAAEAKAAAQUAAAKAAAgAL6Mz8/YNnk//9oACAECAAEFAPV9NHpS26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNsgbZA2yBtkBT00Ovp/5vsCOl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JLc930/LnmGfj9H0+v7/APAf6c32/wAQ/wCR+n/5f9383/iNaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca0415xrzjXnGvONeca8415xrzjXnGvONeca8415xrzjXnGvONeca8415xrzjXnGvONeYa8w15hrzDXmGvMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMNeYa8w15hrzDXnGvONeca8415xrzjXnGvONeca041pxrTjWnGtONaca041pxrTjWnGtONacas41ZxqzjVnGrONWcas41ZxqzjVnGrONScak41JxqTjUUGooNRQaig1FBqKDTUGmoNNQaag01BpqDTUGmoNNQaag0lBpKDSUGkoNJQaSg0lBpKDSUGioNFQaKg0VBoqDRVGiqNFUaKo0FRoKjQVGgqNBUaCo0FRoKjQVGgqPXqj16o9eqPXqj16o9eqPXqj16o9eqPXqj1yo9cqPXKj1yo9cqPXLD1yw9csPXLD1yw9csPWrD1qw9asPWrD1qw9asPWrD1qw9asPWrD1qw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrB34/8Ay/z/AH/53yHY/wDU/E/0v+P7/wCz/9k="})]})]}),pinterest:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsxs("g",{clipPath:"url(#clip0_6570_25513)",children:[d.jsx("rect",{width:"15.996",height:"16",rx:"2",fill:"#CC2127"}),d.jsx("path",{d:"M7.999 2C4.68555 2 2 4.68555 2 7.999C2 10.5406 3.58174 12.7102 5.81336 13.5861C5.76137 13.1121 5.71338 12.3843 5.83336 11.8644C5.94134 11.3964 6.53724 8.88285 6.53724 8.88285C6.53724 8.88285 6.35727 8.52291 6.35727 7.993C6.35727 7.15914 6.84119 6.53524 7.44309 6.53524C7.95501 6.53524 8.20297 6.91918 8.20297 7.3811C8.20297 7.89502 7.87502 8.66489 7.70705 9.37877C7.56507 9.97667 8.007 10.4626 8.5949 10.4626C9.66072 10.4626 10.4806 9.33878 10.4806 7.71505C10.4806 6.27929 9.44876 5.27345 7.975 5.27345C6.26729 5.27345 5.26546 6.55324 5.26546 7.87702C5.26546 8.39293 5.46342 8.94484 5.71138 9.24679C5.75937 9.30678 5.76737 9.35877 5.75337 9.41876C5.70738 9.60873 5.6074 10.0167 5.5874 10.0987C5.56141 10.2086 5.50142 10.2326 5.38743 10.1786C4.63756 9.83069 4.16964 8.73488 4.16964 7.85502C4.16964 5.96334 5.54541 4.22563 8.13298 4.22563C10.2146 4.22563 11.8304 5.70938 11.8304 7.69105C11.8304 9.75871 10.5266 11.4224 8.71688 11.4224C8.10898 11.4224 7.53708 11.1065 7.34111 10.7345C7.34111 10.7345 7.04116 11.8804 6.96717 12.1603C6.83119 12.6822 6.46526 13.3341 6.2213 13.732C6.7832 13.906 7.3791 14 7.997 14C11.3104 14 13.996 11.3144 13.996 8.001C13.998 4.68555 11.3124 2 7.999 2Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6570_25513",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),spotify:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("g",{clipPath:"url(#clip0_6523_22402)",children:d.jsx("path",{d:"M12.6609 7.10585C10.121 5.59751 5.93158 5.45882 3.50697 6.1947C3.11759 6.31287 2.70584 6.09298 2.5879 5.70373C2.46988 5.31411 2.68945 4.90265 3.07911 4.78429C5.86241 3.93945 10.4892 4.1026 13.4132 5.83828C13.7634 6.04622 13.8782 6.49851 13.6707 6.84813C13.4629 7.19833 13.0103 7.31376 12.6609 7.10585ZM12.5777 9.33993C12.3995 9.62908 12.0215 9.71979 11.7327 9.54223C9.61522 8.24063 6.38637 7.86357 3.88123 8.624C3.55636 8.72218 3.21323 8.53899 3.11455 8.21475C3.01666 7.88989 3.19992 7.54738 3.5242 7.44859C6.38597 6.58018 9.9436 7.00081 12.3756 8.49536C12.6644 8.67322 12.7553 9.05146 12.5777 9.33993ZM11.6136 11.4855C11.472 11.7177 11.1697 11.7904 10.9383 11.6489C9.08801 10.518 6.75909 10.2627 4.01637 10.8891C3.75207 10.9497 3.48866 10.7841 3.42838 10.5198C3.36785 10.2556 3.53284 9.99217 3.79772 9.93186C6.79916 9.2457 9.37381 9.54101 11.4506 10.8101C11.6822 10.9515 11.7551 11.254 11.6136 11.4855ZM8.00002 0.120623C3.64839 0.120623 0.120605 3.64834 0.120605 7.99989C0.120605 12.352 3.64839 15.8794 8.00002 15.8794C12.3517 15.8794 15.8794 12.352 15.8794 7.99989C15.8794 3.64834 12.3517 0.120623 8.00002 0.120623Z",fill:"#1ED760"})}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22402",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),twitter:d.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d.jsx("path",{d:"M14.3193 4.31285C14.329 4.45301 14.329 4.59317 14.329 4.73462C14.329 9.04475 11.0516 14.0156 5.05865 14.0156V14.0131C3.28832 14.0156 1.55478 13.508 0.0644531 12.5507C0.321873 12.5817 0.580582 12.5972 0.839937 12.5979C2.30703 12.5992 3.7322 12.1063 4.88639 11.1988C3.4922 11.1724 2.26961 10.2623 1.84252 8.93366C2.3309 9.02796 2.83413 9.00858 3.31349 8.87746C1.79349 8.57001 0.699937 7.23299 0.699937 5.68023C0.699937 5.66602 0.699937 5.65246 0.699937 5.63889C1.15284 5.89144 1.65994 6.0316 2.17865 6.0471C0.747034 5.08923 0.305743 3.18251 1.17026 1.69176C2.82445 3.7296 5.2651 4.96844 7.8851 5.09956C7.62252 3.96664 7.98123 2.77947 8.82768 1.98307C10.1399 0.748096 12.2038 0.811395 13.4374 2.12452C14.167 1.98048 14.8664 1.71243 15.5064 1.33264C15.2632 2.0877 14.7541 2.72909 14.0741 3.13665C14.7199 3.06044 15.3509 2.88734 15.9451 2.62316C15.5077 3.2794 14.9567 3.85103 14.3193 4.31285Z",fill:"#1D9BF0"})}),vimeo:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsxs("g",{clipPath:"url(#clip0_6523_22340)",children:[d.jsx("path",{d:"M16 14.4C16 15.28 15.28 16 14.4 16H1.6C0.72 16 0 15.28 0 14.4V1.6C0 0.72 0.72 0 1.6 0H14.4C15.28 0 16 0.72 16 1.6V14.4Z",fill:"#1AB7EA"}),d.jsx("path",{d:"M13.9945 5.3084C13.9391 6.42815 13.1229 7.97447 11.5458 9.93402C9.91331 11.9736 8.52987 13 7.40928 13C6.70372 13 6.12267 12.3735 5.63846 11.1338C5.32027 9.98735 4.98824 8.85427 4.67005 7.70786C4.31036 6.46814 3.92299 5.84161 3.50796 5.84161C3.42495 5.84161 3.10676 6.02824 2.56721 6.38816L2 5.68165C2.59488 5.1751 3.17593 4.68187 3.75698 4.17532C4.54554 3.52214 5.14042 3.17555 5.54162 3.13556C6.46853 3.05557 7.04958 3.66877 7.27093 4.97514C7.50612 6.40149 7.67213 7.28129 7.75514 7.62788C8.01799 8.80095 8.32235 9.40081 8.64054 9.40081C8.88956 9.40081 9.26309 9.01423 9.77497 8.2544C10.273 7.49457 10.5497 6.90804 10.5774 6.50813C10.6465 5.85494 10.3837 5.52169 9.77497 5.52169C9.48444 5.52169 9.19392 5.58834 8.88956 5.70831C9.48444 3.84206 10.605 2.94893 12.2652 3.00225C13.4826 3.02891 14.0637 3.80207 13.9945 5.3084Z",fill:"white"})]}),d.jsx("defs",{children:d.jsx("clipPath",{id:"clip0_6523_22340",children:d.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),youtube:d.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("path",{d:"M15.6656 3.75817C15.4816 3.06609 14.9395 2.5211 14.2511 2.33614C13.0034 2 8 2 8 2C8 2 2.99666 2 1.7489 2.33614C1.06051 2.5211 0.518324 3.06609 0.334339 3.75817C0 5.01251 0 7.62963 0 7.62963C0 7.62963 0 10.2467 0.334339 11.5012C0.518324 12.1932 1.06051 12.7381 1.7489 12.9232C2.99666 13.2593 8 13.2593 8 13.2593C8 13.2593 13.0034 13.2593 14.2511 12.9232C14.9395 12.7381 15.4816 12.1932 15.6656 11.5012C16 10.2467 16 7.62963 16 7.62963C16 7.62963 16 5.01251 15.6656 3.75817Z",fill:"#ED1D24"}),d.jsx("path",{d:"M6.36353 10.0058L10.5453 7.62974L6.36353 5.25349V10.0058Z",fill:"white"})]})};function C7(e){const{debouncedUrl:t,content:n,onContentChange:r,selected:i}=e,o=E.useRef(null),[a,s]=E.useState(!1);Qe.useOnChange(t,()=>{var c;a&&(s(!1),(c=o.current)==null||c.reset())});function u(){s(!0),r(void 0)}return Fr.toURL(t)?t===(n==null?void 0:n.embed_url)?d.jsx(sC,{content:n,selected:i}):d.jsx(h.ErrorBoundary,{ref:o,renderError:x$e,onError:u,children:d.jsx(E.Suspense,{fallback:n&&d.jsx(sC,{content:n,selected:i}),children:d.jsx(w$e,{url:t,selected:i,onContentChange:r})})}):null}function x$e(){return d.jsxs(h.Box,{backgroundColor:"grey2",borderRadius:6,padding:16,gap:4,children:[d.jsx(h.Icon,{name:"alert",size:"small",color:"grey11"}),d.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"There is no embed data available."})]})}function sC(e){const{content:t,selected:n}=e,{thumbnail:r,provider:i,author:o,url:a,subtitle:s}=O$e(t);return d.jsxs(h.PreviewCard,{selected:n,children:[d.jsx(h.PreviewImage,{src:r.url,aspectRatio:r.aspectRatio}),d.jsxs(h.PreviewContent,{children:[d.jsxs(h.Box,{display:"flex",alignItems:"center",gap:4,children:[d.jsx(I$e,{provider:i}),d.jsx(h.Text,{variant:"smallBold",color:"grey12",noWrap:!0,children:i}),o&&d.jsx(h.Text,{variant:"small",color:"grey11",noWrap:!0,children:o})]}),d.jsx(h.Text,{variant:"smallBold",href:a,children:s})]})]})}function w$e(e){const{url:t,onContentChange:n,selected:r}=e,i=E$e({url:t,onContentChange:n});return d.jsx(sC,{content:i,selected:r})}function E$e(e){const{url:t,onContentChange:n}=e,{embedApiEndpoint:r}=Oe(),i=Xe.useRequest($$e,[t,r]),o=Qe.useStableCallback(n);return E.useEffect(()=>{const a=h.handleEditorFlushSyncError(()=>o(i));return()=>{clearTimeout(a)}},[i,o]),i}function $$e(e,t){const n=new URL(t);return n.searchParams.set("url",e),xe.request(n,{okType:R$e(e)})}function R$e(e){return B.object({type:B.string(),version:B.string().or(B.number()).nullish(),title:B.string().nullish(),author_name:B.string().nullish(),author_url:B.string().nullish(),provider_name:B.string().nullish(),provider_url:B.string().nullish(),cache_age:B.string().or(B.number()).nullish(),thumbnail_url:B.string().nullish(),thumbnail_width:B.number().nullish(),thumbnail_height:B.number().nullish(),html:B.string().nullish()}).passthrough().transform(t=>{const n={embed_url:e};return{...n,__TYPE__:"EmbedContent",type:t.type,version:t.version,title:t.title,author_name:t.author_name,author_url:t.author_url,provider_name:t.provider_name,provider_url:t.provider_url,cache_age:t.cache_age,thumbnail_url:t.thumbnail_url,thumbnail_width:t.thumbnail_width,thumbnail_height:t.thumbnail_height,html:t.html,all:{...n,...t}}})}function O$e(e){let t="";switch(e.type){case"video":t=e.title??"";break;case"photo":t=`View this post${e.provider_name?` on ${e.provider_name}`:""}`;break;default:t=`Open${e.provider_name?` on ${e.provider_name}`:""}`}return{url:e.embed_url,thumbnail:{url:e.thumbnail_url??"",aspectRatio:e.type==="video"?"16:9":"1:1"},provider:e.provider_name??"",author:e.author_name??"",subtitle:t}}function F$e(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=Qe.useDebounceState({initialState:(i==null?void 0:i.embed_url)??"",startTransition:E.startTransition});function s(u){a.set(u),Fr.toURL(u)||o(void 0)}return d.jsxs(h.Field,{footer:Fr.toURL(a.value)&&d.jsx(h.FieldFooter,{children:d.jsx(C7,{debouncedUrl:a.debouncedValue,content:i,onContentChange:o})}),children:[d.jsx(h.FieldIcon,{name:"cloud"}),d.jsx(h.FieldLabel,{htmlFor:t,children:nr(r)}),d.jsx(h.FieldControl,{children:d.jsx(Qs,{id:t,readOnly:n,placeholder:Pc(r),value:a.value,onValueChange:s,variant:Fr.toURL(a.value)?"link":"normal",endAdornment:d.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:()=>s("")})})})]})}function S7(e){return!(e.lat>85||e.lat<-85||e.lng>180||e.lng<-180)}function Hb(e){const t=/^.*@(-?\d+.\d+),(-?\d+.\d+).*$/,n=e.match(t);if(!n)return;const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return;const o={lat:r,lng:i};if(S7(o))return o}function YF(e){return e?`${e.lat}, ${e.lng}`:""}function GF(e){const t=/\(?([\d|.|-]*)[\s+]*,[\s]*([\d|.|-]*)\)?/,n=e.match(t);if(!n)return Hb(e);const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return Hb(e);const o={lat:r,lng:i};return S7(o)?o:Hb(e)}function M$e(e){const{field:t,id:n,readOnly:r,...i}=e,{onValueChange:o,displayedValue:a,onBlur:s,clearValue:u,isValidCoordinates:c}=k$e(i);return d.jsxs(h.Field,{children:[d.jsx(h.FieldIcon,{name:"place"}),d.jsx(h.FieldLabel,{htmlFor:n,children:nr(t)}),d.jsx(h.FieldControl,{children:d.jsx(Qs,{id:n,onValueChange:o,placeholder:WR,readOnly:r,value:a,onBlur:s,variant:c?"link":"normal",endAdornment:d.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:u})})})]})}function k$e(e){const{content:t,onContentChange:n}=e,r=YF(t==null?void 0:t.position),[i,o]=E.useState(r);function a(){const c=GF(i);if(!c)return o(""),n(void 0);const{lat:l,lng:f}=c;o(YF({lat:l,lng:f})),n({__TYPE__:"GeoPointContent",position:{lat:l,lng:f}})}function s(){o(""),n(void 0)}const u=!!GF(i);return{displayedValue:i,isValidCoordinates:u,onValueChange:o,onBlur:a,clearValue:s}}function _7(e){const{fieldLabel:t,imageLabel:n=[]}=e;return d.jsxs(h.CardHeaderTitle,{children:[d.jsx(h.Text,{variant:"bold",noWrap:!0,children:wp.overflow(t,30)}),n.length!==0&&d.jsx(h.Text,{color:"grey11",noSelect:!0,children:` • ${n.join(" • ")}`})]})}function I7(e){const{fieldLabel:t,isUpdating:n,readOnly:r,onMediaDialogOpenChange:i}=e;return d.jsxs(d.Fragment,{children:[d.jsx(h.CardHeader,{sx:{flexWrap:"wrap"},children:d.jsx(_7,{fieldLabel:t})}),d.jsx(h.CardContent,{children:d.jsx(h.Card,{color:"grey2",variant:"dashed",paddingBlock:12,radius:4,sx:{width:"100%"},children:d.jsx(h.CardContent,{children:d.jsxs(h.BlankSlate,{variant:"horizontal",children:[d.jsx(h.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple9",backgroundColor:"purple4",size:"small"}),d.jsx(h.BlankSlateTitle,{children:n?"Preparing your image...":"You haven't selected an image"}),!r&&d.jsx(h.BlankSlateActions,{children:d.jsx(h.Button,{disabled:n,onClick:()=>i(!0),size:"medium",children:"Select image"})})]})})})})]})}const L$e=pp({id:Go(),width:Wm(),height:Wm(),urls:pp({full:Go(),small:Go().transform(cEe)}),alt_description:Go().optional(),description:Go().nullable()}),j$e=pp({results:Rq(L$e)}).transform(e=>e.results);function T7(e,t){const n=new URL("search/photos",e);return n.searchParams.set("page","1"),n.searchParams.set("per_page","28"),n.searchParams.set("query",t),xe.request(n,{okType:j$e})}Xe.cache.registerFetcherConfig(T7,{cacheCapacity:5,revalidationStrategy:{type:"never"}});function U$e(e,t){const n=E.useRef(),r=Oe(),i=Xe.useRequest(T7,[e,t]);return Qe.useDebounce(t,1e3,()=>{var o;n.current&&t!==n.current&&((o=r.onAnalyticsEvent)==null||o.call(r,"Unsplash Image Searched")),n.current=t}),i}function B$e(e){const{onSelectedChange:t}=e,[n,r]=E.useTransition(),i=Qe.useDebounceState({initialState:"",ms:300,startTransition:r});return d.jsxs(h.Box,{flexDirection:"column",gap:16,width:"100%",position:"relative",children:[d.jsx(h.FormSearchInput,{value:i.value,placeholder:"Search on Unsplash.com",onValueChange:i.set}),d.jsx(h.ErrorBoundary,{renderError:()=>d.jsx(Xq,{}),children:d.jsx(E.Suspense,{fallback:d.jsx(W$e,{}),children:d.jsx(P$e,{term:i.debouncedValue,loading:n,onSelectedChange:t})})})]})}function P$e(e){const{term:t,onSelectedChange:n,loading:r}=e,{media:i,toggleSelected:o,selectedImageId:a}=D$e({term:t,onSelectedChange:n});return d.jsxs(d.Fragment,{children:[i.length>0&&d.jsx(x7,{children:i==null?void 0:i.map(s=>{const c=new URL(s.urls.full).searchParams.get("fm")??"jpg";return d.jsx(h.MediaCard,{url:s.urls.small,filename:s.description??"Unsplash Image",selected:a===s.id,onCardClick:()=>o(s),onCheckedChange:()=>o(s),extension:c,kind:"image",width:s.width,height:s.height,loading:r},s.id)})}),i.length===0&&d.jsx(Jq,{})]})}function x7(e){const{children:t}=e;return d.jsx(h.ScrollArea,{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 250px), 1fr))",gap:16,padding:2,paddingBottom:16,position:"relative",width:"100%"},children:t})}function W$e(){return d.jsx(x7,{children:vn.range(1,24).map(e=>d.jsx(o7,{},e))})}function D$e(e){var c;const{term:t,onSelectedChange:n}=e,{unsplashApiBaseUrl:r}=Oe(),i=U$e(r,t||"citrus fruit"),o=(c=i==null?void 0:i[0])==null?void 0:c.id,[a,s]=E.useState();E.useEffect(()=>{n==null||n([]),s(void 0)},[o,n]);function u(l){if(l.id===a)return s(void 0),n==null?void 0:n([]);s(l.id),n==null||n([{...l,url:l.urls.full,alt:l.alt_description}])}return{media:i,toggleSelected:u,selectedImageId:a}}function DR(e){const{open:t,onOpenChange:n,onMediaSelected:r,assetType:i}=e,o=Oe(),a=o.mediaLibrary,[s,u]=E.useState(()=>a?"media":"unsplash"),[c,l]=E.useState(new Set),[f,p]=E.useState([]),A=c.size+f.length,m=Xe.useFetcherData(hi);E.useEffect(()=>{!t||!a||zq({config:o,assetType:i})},[t,o,i,a]);function v(y){if(y!=="media"&&y!=="unsplash")throw new Error(`Invalid option ${y}.`);u(y)}function _(y){y||l(new Set),n(y)}const S=hwe({assetType:i,mediaDialogOpen:t});function I(){var y;if(s==="unsplash"){const b=f[0];if(!b)return;r(b),(y=o.onAnalyticsEvent)==null||y.call(o,"Unsplash Image Added")}else if(s==="media"){const w=m.flatMap(F=>F.items).filter(F=>c.has(F.id))[0];if(!w)return;r(w),S(w.id)}_(!1)}function T(){if(A===0)return"Select a media item to add to the page";if(A>1)return"Only one media item can be added to the page"}const{containerRef:g}=h.useAlert();return d.jsxs(h.Dialog,{open:t,onOpenChange:_,size:{width:"min(calc(100% - 48px), 2000px)",height:"calc(100% - 30px)"},position:"center",onPointerDownOutside:y=>{g&&Qe.refContainsTarget(g,y.target)&&y.preventDefault()},children:[d.jsx(h.DialogHeader,{icon:"image",title:"Media library"}),d.jsxs(h.DialogOptions,{value:s,onValueChange:v,padding:"small",width:"auto",children:[a&&d.jsx(h.DialogOptionsItem,{value:"media",icon:"photo"}),d.jsx(h.DialogOptionsItem,{value:"unsplash",icon:"unsplash"})]}),d.jsx(h.DialogContent,{children:d.jsxs(h.Box,{flexDirection:"column",flexGrow:1,overflow:"hidden",children:[d.jsx(Cq,{}),d.jsxs(h.Box,{overflow:"hidden",backgroundColor:"grey3",padding:{top:16,inline:16},flexGrow:1,children:[s==="media"&&d.jsx(f7,{assetType:i,onSelectedChange:l}),s==="unsplash"&&d.jsx(B$e,{onSelectedChange:p})]})]})}),d.jsxs(h.DialogActions,{children:[d.jsx(h.DialogCancelButton,{}),d.jsx(h.DialogActionButton,{onClick:I,disabled:A!==1,tooltipLabel:T(),children:"Add to page"})]})]})}const w7=E.forwardRef(function(t,n){const{isMediaDialogOpen:r,selected:i,children:o,onMediaSelected:a,onMediaDialogOpenChange:s}=t;return d.jsxs(h.Card,{ref:n,color:i?"indigo2":"grey2",variant:i?"selected":"dashed",paddingBlock:12,radius:4,children:[o,d.jsx(DR,{open:r,onOpenChange:s,onMediaSelected:a,assetType:"image"})]})});function E7(e){const{contentView:t,croppedImage:n}=e,{width:r,height:i,x:o,y:a,zoom:s}=n,u=N$e({origin:t.origin,croppedImage:n});return{...t,width:r,height:i,url:u,edit:{...t.edit,zoom:s,crop:{x:o,y:a}}}}function K$e(e){var c,l,f;const{field:t,content:n,thumbnail:r,croppedImage:i}=e;if(r===Ad)return $7({content:n,croppedImage:i});const o=ke.isImageContent(n),a=(l=(c=t==null?void 0:t.config)==null?void 0:c.thumbnails)==null?void 0:l.find(p=>p.name===r),s=o?(f=n.thumbnails)==null?void 0:f[r]:void 0;if(!a||!s)return n;const u=E7({contentView:s,croppedImage:i});return u.url===s.url?n:{...n,thumbnails:o?{...n.thumbnails,[r]:u}:void 0}}function $7(e){const{content:t,croppedImage:n}=e,r=E7({contentView:t,croppedImage:n});return r.url===t.url?t:{...t,...r}}function N$e(e){const{origin:t,croppedImage:n}=e,{x:r,y:i,width:o,height:a,cropHeight:s,cropWidth:u}=n,c=new URL(t.url),l=t.height!==a||t.width!==o;if(r!==0||i!==0||s!==t.height||u!==t.width){const p=[r,i,u,s].map(Math.round).join(",");c.searchParams.set("rect",p),c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())}return l&&(c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())),c.toString()}function q$e(e){const{x:t,y:n}=e.edit.crop,r=e.edit.zoom,{width:i,height:o}=e,{width:a,height:s}=e.origin,u=i/o,c=Math.min(a,s*u/r),l=c/u;return{x:t,y:n,width:i,height:o,zoom:r,cropWidth:c,cropHeight:l}}function V$e(e){const{selectedImage:t,imageCrop:n,setImageCrop:r}=e,{width:i,height:o,zoom:a,cropHeight:s,cropWidth:u}=n,c=t.contentView,l={x:n.x,y:n.y,width:u,height:s},[f,p]=E.useState(),A=(c==null?void 0:c.origin.url)??"",m=!(t!=null&&t.thumbnail.height&&(t!=null&&t.thumbnail.width));function v(g,y){const b=parseInt(y);isNaN(b)||b<=0||!m||r({...n,[g]:b})}function _(g){r({...n,cropWidth:g.width,cropHeight:g.height,x:g.x,y:g.y})}function S(g){r({...n,zoom:g})}function I(){p(qh),r({...n,...qh})}function T(){c&&(p(qh),r({...n,...qh,zoom:1,cropWidth:c.width,cropHeight:c.height}))}return d.jsxs(h.Box,{padding:{inline:24,block:16},flexDirection:"column",gap:16,height:"100%",overflowY:"auto",alignItems:"center",children:[d.jsxs(h.Box,{gap:8,height:32,alignItems:"flex-start",width:"100%",children:[d.jsx(h.Tooltip,{content:"Center",children:d.jsx(h.Button,{color:"grey",size:"medium",startIcon:"centerFocusWeak",onClick:I})}),d.jsx(h.Tooltip,{content:"Cover",children:d.jsx(h.Button,{color:"grey",size:"medium",startIcon:"zoomOutMap",onClick:T})}),d.jsx(h.Separator,{orientation:"vertical"}),d.jsx(h.FormInput,{prefix:"W",prefixTooltip:"Width",placeholder:"width",type:"number",size:"medium",value:String(i),onValueChange:g=>v("width",g),sx:{width:100},disabled:!m}),d.jsx(h.FormInput,{prefix:"H",prefixTooltip:"Height",placeholder:"height",type:"number",size:"medium",value:String(o),onValueChange:g=>v("height",g),sx:{width:100},disabled:!m})]}),d.jsx(h.Cropper,{image:A,aspect:i/o,crop:f??{x:0,y:0},onCropChange:p,zoom:a,onZoomChange:S,onCropAreaChange:(g,y)=>_(y),initialCroppedAreaPixels:l}),d.jsx(h.Box,{width:"100%",maxWidth:320,children:d.jsx(h.Slider,{min:1,max:3,step:.01,value:[a],onValueChange:([g])=>S(g??1)})})]})}const qh={x:0,y:0};function Q$e(e){const{trigger:t,initialImages:n,renderTooltip:r}=e,{open:i,onOpenChange:o,ready:a,option:s,selectedImage:u,croppedImage:c,setCroppedImage:l,setReady:f,setOption:p}=z$e(e);return d.jsxs(h.Dialog,{trigger:t,onAnimationEnd:()=>f(!0),open:i,onOpenChange:o,renderTooltip:r,children:[d.jsx(h.DialogHeader,{icon:"photo",title:"Image editor"}),d.jsx(h.DialogOptions,{value:String(s),onValueChange:A=>p(Number(A)),children:n.map((A,m)=>d.jsx(h.DialogOptionsItem,{value:String(m),icon:"photo",title:A.labels[0]??"Main",subtitle:A.labels[1]??""},A.thumbnail.name))}),u&&d.jsx(h.DialogContent,{children:a&&c&&d.jsx(V$e,{selectedImage:u,imageCrop:c,setImageCrop:l},u.thumbnail.name)})]})}function z$e(e){const{initialImages:t,initialOption:n,onClose:r}=e,[i,o]=E.useState(_),[a,s]=E.useState(!1),[u,c]=E.useState(!1),[l,f]=E.useState(n);function p(S){S?(f(n),o(_())):(c(!1),r({option:l,croppedImages:i})),s(S)}const A=t[l],m=i[(A==null?void 0:A.thumbnail.name)??""];function v(S){if(!A)return;const I=A.thumbnail.name;o({...i,[I]:S})}function _(){return t.reduce((S,I)=>(I.contentView&&(S[I.thumbnail.name]=q$e(I.contentView)),S),{})}return{open:a,ready:u,option:l,selectedImage:A,croppedImage:m,setCroppedImage:v,setReady:c,setOption:f,onClose:r,onOpenChange:p}}function H$e(e){const{readOnly:t,altText:n,selected:r,onValueChange:i}=e,o=E.useId();return d.jsxs(h.Field,{selected:r,children:[d.jsx(h.FieldLabel,{htmlFor:o,children:"Alt text"}),d.jsx(h.FieldControl,{children:d.jsx(h.Box,{flexGrow:1,height:40,children:d.jsx(Qs,{id:o,placeholder:"Short description for the visually impaired",readOnly:t,value:n,padding:{input:{inline:12}},onValueChange:i})})})]})}function Y$e(e){const{fieldLabel:t,imageLabel:n,initialImages:r,page:i,displaySeparator:o=!0,isSVGContentView:a,visibility:s,onClear:u,onCropperDialogClose:c,onMediaDialogOpenChange:l}=e;return d.jsxs(h.Box,{display:"flex",flexDirection:"column",gap:12,children:[d.jsxs(h.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:4,children:[d.jsx(_7,{fieldLabel:t,imageLabel:n}),d.jsxs(h.CardHeaderActions,{sx:{visibility:s},children:[d.jsx(Q$e,{trigger:d.jsx(h.Button,{startIcon:"crop",disabled:a,hiddenLabel:"Crop & Resize"}),renderTooltip:f=>d.jsx(h.Tooltip,{content:"Crop & Resize",children:f}),initialImages:r,initialOption:i,onClose:c}),d.jsx(h.Tooltip,{content:"Replace",children:d.jsx(h.Button,{startIcon:"imageSearch",hiddenLabel:"Replace",onClick:()=>l(!0)})}),d.jsx(h.Tooltip,{content:"Clear",children:d.jsx(h.Button,{onClick:u,startIcon:"delete",hiddenLabel:"Clear"})})]})]}),o&&d.jsx(h.Separator,{style:"dashed",decorative:!0})]})}function G$e(e){const{documentType:t,documentUrl:n,title:r,statusColor:i,description:o,tags:a,tagsFilter:s,previewImageUrl:u,onSelect:c}=e;function l(f){return f.nativeEvent instanceof MouseEvent&&(f.metaKey||f.ctrlKey)?window.open(n,"_blank"):c()}return d.jsxs(h.Card,{paddingBlock:16,onSelect:l,children:[d.jsx(h.CardContent,{children:d.jsxs(h.Box,{justifyContent:"space-between",children:[d.jsxs(h.Box,{flexDirection:"column",gap:4,alignItems:"flex-start",flexGrow:1,children:[d.jsx(J$e,{documentType:t}),d.jsx(Z$e,{title:r,statusColor:i}),d.jsx(X$e,{description:o})]}),d.jsx(eRe,{previewImageUrl:u})]})}),a.length>0&&d.jsx(tRe,{tags:a,tagsFilter:s})]})}function J$e(e){const{documentType:t}=e;return d.jsx(h.Badge,{maxWidth:150,size:"medium",title:`Type: ${t}`,icon:"description"})}function Z$e(e){const{title:t,statusColor:n}=e;return d.jsxs(h.Box,{gap:8,alignItems:"center",children:[d.jsx(h.Dot,{color:n}),d.jsx(h.Text,{variant:"bold",children:t})]})}function X$e(e){const{description:t}=e,n=t==null?void 0:t.substring(0,150);return n?d.jsx(h.Text,{variant:"small",color:"grey11",children:`${n}${n!==t?"...":""}`}):d.jsx(h.Text,{variant:"smallItalic",color:"grey11",children:"No description available"})}function eRe(e){const{previewImageUrl:t}=e;return d.jsx(h.Box,{width:142,height:90,backgroundColor:"grey2",border:!0,borderRadius:6,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,flexShrink:0,padding:8,children:t?d.jsx(h.Image,{src:t,sizing:"cover"}):d.jsxs(d.Fragment,{children:[d.jsx(h.Icon,{name:"hideImage",size:"large",color:"grey11"}),d.jsx(h.Text,{color:"grey11",variant:"small",children:"No preview available"})]})})}function tRe(e){const{tags:t}=e;return d.jsxs(h.CardFooter,{children:[d.jsxs(h.Box,{gap:4,alignItems:"center",children:[d.jsx(h.Icon,{name:"label",size:"small",color:"grey11"}),d.jsx(h.Text,{variant:"small",color:"grey11",children:"Tags:"})]}),d.jsx(h.TextOverflow,{children:t.map(n=>d.jsx(h.Badge,{size:"medium",title:n,sx:{marginRight:8}},n))})]})}function nRe(e){var y,b;const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i}=e,o=Oe();o.searchDocuments||Pn("searchDocuments");const{coreApiBaseUrl:a,documentSearchBaseUrl:s,authStrategy:u,status:c,documentListOpenSearchEnabled:l,repository:f}=o,{storageVersion:p}=Xe.useRequest(jR,[a,u]),A=p.major>=7&&l;function m(){return A?Mq({repository:f,searchTerm:t,customTypesIds:[...On.map(r,x=>x.id)],tags:[...On.map(n,x=>x.id)],localeId:[...On.map(i,x=>x.id)][0]}):q0({tags:[...On.map(n,x=>x.id)],customTypes:[...On.map(r,x=>x.id)],language:[...On.map(i,x=>x.id)],term:[t]})}const[v,_]=E.useState([]),[S,I]=E.useState(""),T=m(),g=Xe.useRequest(R7,[a,s,u,T,c,A]);return T!==S?(I(T),_(g.results)):g.results.length>0&&((y=vn.last(v))==null?void 0:y.id)!==((b=vn.last(g.results))==null?void 0:b.id)&&_(x=>x.concat(g.results)),{documents:v,response:g}}Xe.cache.registerFetcherConfig(R7,{cacheCapacity:500,revalidationStrategy:{type:"never"}});async function R7(e,t,n,r,i,o){const a=bq[i];if(!o){const l=await N0(e,n,r,200);return JF(l.results,a)}const s=await Fq(t,n,r),u=await jq(e,n,s.results);return JF(u,a)}function JF(e,t){return{results:e.flatMap(r=>{const i=r.versions.filter(o=>t.includes(o.status));return i.length===0?[]:{...r,versions:i}})}}function ZF(){const e=Oe();e.searchDocuments||Pn("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=Xe.useRequest(jR,[t,n]);return new Set(r.languages.map(i=>({id:i.id,label:i.name})))}function rRe(){const e=Oe();e.searchDocuments||Pn("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=Xe.useRequest(Pq,[t,n]);return new Set(r.results.map(i=>({id:i,label:i})))}function iRe(){const e=Oe();e.searchDocuments||Pn("searchDocuments");const{customTypesApiBaseUrl:t,repository:n,authStrategy:r}=e,i=Xe.useRequest(Oq,[t,n,r]);return new Set(i)}function oRe(e,t){const n=Oe(),r=Qe.useDebounceState({initialState:""}),[i,o]=E.useState(new Set),[a,s]=E.useState(new Set);function u(){return!n.searchDocuments||!n.localeId?new Set:new Set([{id:n.localeId,label:n.localeId}])}const[c,l]=E.useState(u),f=On.union(a,Km(e)),p=On.union(i,Km(t));return{searchTerm:r,filteredTags:i,setFilteredTags:o,filteredCustomTypes:a,setFilteredCustomTypes:s,filteredLocales:c,setFilteredLocales:l,typesFilter:f,tagsFilter:p}}function Km(e){return e?On.map(e,t=>({id:t,label:t})):new Set}function aRe(e){const{filteredLocales:t,setFilteredLocales:n,filteredTags:r,setFilteredTags:i,filteredCustomTypes:o,setFilteredCustomTypes:a,fixedTags:s,fixedCustomTypes:u}=e;return d.jsxs(d.Fragment,{children:[d.jsx(uRe,{selectedValues:t,onSelectedValuesChange:n}),d.jsx(uC,{selectedValues:r,fixedSelectedValues:Km(s),onSelectedValuesChange:i,label:"Tags",icon:"label",fetchFilters:rRe}),d.jsx(uC,{selectedValues:o,fixedSelectedValues:Km(u),onSelectedValuesChange:a,label:"Type",icon:"description",fetchFilters:iRe})]})}function uC(e){const[t,n]=E.useState(!1),r=E.useRef(null);return d.jsx(h.ErrorBoundary,{ref:r,renderError:()=>{var i;return d.jsx(h.FilterField,{mode:"error",onErrorRetry:(i=r.current)==null?void 0:i.reset,open:t,setOpen:n,values:new Set,...e})},children:d.jsx(E.Suspense,{fallback:d.jsx(h.FilterField,{mode:"loading",open:t,setOpen:n,values:new Set,...e}),children:d.jsx(sRe,{open:t,setOpen:n,...e})})})}function sRe(e){const{open:t,setOpen:n,onSelectedValuesChange:r,fixedSelectedValues:i,selectedValues:o,label:a,icon:s,fetchFilters:u,multiple:c}=e,l=u();return d.jsx(h.FilterField,{open:t,setOpen:n,label:a,icon:s,selectedValues:o,values:new Set(l),fixedSelectedValues:i,onSelectedValuesChange:r,multiple:c})}function uRe(e){const{selectedValues:t,onSelectedValuesChange:n}=e,[r,i]=E.useState(On.first(t));function o(s){n(s),i(On.first(s))}const a=On.find(ZF(),s=>{var u;return s.id===((u=On.first(t))==null?void 0:u.id)});return(a==null?void 0:a.label)!==(r==null?void 0:r.label)&&i(a),d.jsx(uC,{selectedValues:new Set(r?[r]:[]),onSelectedValuesChange:o,label:"Locale",icon:"public",fetchFilters:ZF,multiple:!1})}function O7(e){const{onSelectDocument:t,fixedCustomTypes:n,fixedTags:r,...i}=e,o=Oe(),{searchTerm:a,filteredTags:s,setFilteredTags:u,filteredCustomTypes:c,setFilteredCustomTypes:l,filteredLocales:f,setFilteredLocales:p,typesFilter:A,tagsFilter:m}=oRe(n,r),[v,_]=E.useTransition();return d.jsx(h.Dialog,{size:{height:727,width:656},hasClose:!1,...i,children:d.jsx(h.DialogContent,{children:d.jsxs(h.Box,{flexDirection:"column",height:"100%",children:[d.jsxs(h.Box,{padding:{top:16,inline:16,bottom:8},flexDirection:"column",gap:12,children:[d.jsx(h.FormInput,{value:a.value,onValueChange:a.set,placeholder:"Search a page",icon:"search"}),o.searchDocuments&&d.jsx(aRe,{filteredTags:s,setFilteredTags:u,filteredCustomTypes:c,setFilteredCustomTypes:l,filteredLocales:f,setFilteredLocales:p,fixedTags:r,fixedCustomTypes:n}),d.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"Link to a document"})]}),o.searchDocuments?d.jsx(h.ErrorBoundary,{renderError:cRe,children:d.jsx(E.Suspense,{fallback:d.jsx(fRe,{}),children:d.jsx(lRe,{searchTerm:a.debouncedValue,tagsFilter:m,typesFilter:A,localesFilter:f,startTransition:_,isLoadingDocuments:v,onSelectDocument:t})})}):d.jsx(F7,{message:"Slice Machine does not yet support mock data for linked documents in the simulator."})]})})})}function cRe(){return d.jsx(h.Box,{height:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center",children:d.jsx(h.DefaultErrorMessage,{title:"Request failed",description:"An error occurred while fetching documents.",errorImageSrc:h.dialogErrorImage})})}function lRe(e){const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i,isLoadingDocuments:o,onSelectDocument:a}=e,{documents:s}=nRe({searchTerm:t,tagsFilter:n,localesFilter:i,typesFilter:r}),u=Oe();return d.jsxs(h.ScrollArea,{style:{flexGrow:1,paddingTop:h.theme.space[10],paddingBottom:h.theme.space[16],paddingInline:h.theme.space[16],display:"flex",flexDirection:"column",gap:h.theme.space[12]},children:[s.length===0&&d.jsx(F7,{}),s.map(c=>{const l=c.versions[0];if(!l)return null;const f=FR({documentId:c.id,versionId:l.status==="archived"?l.version_id:void 0,releaseId:l.status==="release"?l.release_id:void 0,status:l.status,baseUrl:u.baseUrl}),p=dRe({tags:l.tags,tagsFilter:n});return d.jsx(G$e,{documentType:l.custom_type_label,documentUrl:f,description:l.preview_summary,tags:p,title:c.title,previewImageUrl:l.preview_image,onSelect:()=>a(c.id),statusColor:yq[l.status].color},`${c.id}-${l.status}`)}),d.jsx(h.AnimatedElement,{animation:{name:"fade"},children:o&&d.jsx(h.Text,{color:"grey11",align:"center",sx:{marginBlock:8},children:"Loading more results ..."})})]})}function F7(e){const{message:t="We can't find any versions matching this request"}=e,n="Oops!";return d.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:d.jsxs(h.BlankSlate,{children:[d.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),d.jsx(h.BlankSlateTitle,{size:"big",children:n}),d.jsx(h.BlankSlateDescription,{width:360,children:t})]})})}function fRe(){return d.jsx(h.Box,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:vn.range(1,5).map(e=>d.jsx(h.Skeleton,{height:150},e))})}function dRe(e){const{tags:t,tagsFilter:n}=e,r=[...n].map(o=>o.label).reverse();return vn.sort(t,o=>-r.indexOf(o))}function M7(e){const{hasLink:t,onUnlink:n,selectEnabled:r,selectedType:i,onValueChange:o,openInNewTab:a=!0,condensedButtons:s=!1,setOpenInNewTab:u}=e,c=u&&i==="web",l=a?"checkBox":"checkBoxOutlinedBlank";return d.jsxs(d.Fragment,{children:[c&&d.jsx(h.Tooltip,{content:"Open in new tab",visible:s,children:d.jsx(h.Button,{startIcon:l,color:"grey",size:"small",onClick:()=>u(!a),children:s?"":"Open in new tab"})}),d.jsxs(h.Select,{value:i,color:"grey",size:"small",boldTriggerText:!0,startIcon:pRe(i),disabled:!r,onValueChange:o,placeholder:s?"":yd("placeholder"),onlyStartIcon:s&&!!i,renderTrigger:({button:f})=>d.jsx(h.Tooltip,{content:yd(i),visible:s,children:f}),children:[d.jsx(h.SelectItem,{value:"web",icon:"public",children:yd("web")}),d.jsx(h.SelectItem,{value:"document",icon:"description",children:yd("document")}),d.jsx(h.SelectItem,{value:"media",icon:"image",children:yd("media")})]}),d.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!t,onClick:n})]})}function yd(e){if(!e||e==="placeholder")return"Choose link type";switch(e){case"document":return"Link to Prismic page";case"web":return"Link to web page";case"media":return"Link to media"}}function pRe(e){if(e)switch(e){case"document":return"description";case"web":return"public";case"media":return"image"}}function ARe(e){var b;const{field:t,content:n,onContentChange:r}=e,i=m(),[o,a]=E.useState(A),[s,u]=E.useState(()=>(n==null?void 0:n.value.__TYPE__)==="ExternalLink"?n.value.target:""),[c,l]=E.useState(!1),f=E.useRef(null);Qe.useOnChange(i,T);const p=o?hRe[o]:void 0;function A(){var x,w;return!((x=t.config)!=null&&x.select)||n!=null&&n.value.__TYPE__?n==null?void 0:n.value.__TYPE__:XF[(w=t.config)==null?void 0:w.select]}function m(){return n?n.value.__TYPE__==="DocumentLink"?n.value.id:n.value.__TYPE__==="ExternalLink"?n.value.url:n.value.name:""}function v(x){if(!x)return r(void 0);switch(o){case"ExternalLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:x,target:s}});case"DocumentLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",id:x}});case"FileLink":case"ImageLink":case void 0:return r(void 0)}}function _(x){a(XF[x]),v("")}function S(x){v(x)}function I(){l(!0)}function T(){var x;c&&(l(!1),(x=f.current)==null||x.reset())}function g(x){const w=x?"_blank":null;u(w),r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:i,target:w}})}function y(x){r(L7({media:x}))}return{contentType:o,selectType:p,fieldValue:i,onValueChange:v,onTypeChange:_,placeholder:Pc(t),isTypeSelectEnabled:!((b=t.config)!=null&&b.select),onDocumentSelected:S,onError:I,errorBoundaryRef:f,isTargetNewTab:s==="_blank",updateWebLinkTarget:g,onMediaSelected:y}}const hRe={DocumentLink:"document",ExternalLink:"web",FileLink:"media",ImageLink:"media"},XF={document:"DocumentLink",web:"ExternalLink",media:"FileLink"};function mRe(e){const t=Oe();t.searchDocuments||Pn("searchDocuments");const{coreApiBaseUrl:n,authStrategy:r}=t;return Xe.useRequest(k7,[n,r,e]).title}const gRe=pp({id:Go(),title:Go()});function k7(e,t,n){return xe.request(new URL(`documents/${n}`,e),{credentials:xe.getRequestCredentials(t),okType:gRe})}Xe.cache.registerFetcherConfig(k7,{concurrency:50});function L7(e){var i,o,a,s,u,c;const{media:t}=e,n="kind"in t;return n&&t.kind==="image"?{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:t.filename,url:t.url,kind:t.kind,size:t.size.toString(),height:((i=t.height)==null?void 0:i.toString())??`${es}`,width:((o=t.width)==null?void 0:o.toString())??`${es}`,date:((a=t.last_modified)==null?void 0:a.toString())??""}}:n?{__TYPE__:"LinkContent",value:{__TYPE__:"FileLink",id:t.id,name:t.filename,kind:t.kind,url:t.url,size:t.size.toString(),date:((s=t.last_modified)==null?void 0:s.toString())??""}}:{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:(t==null?void 0:t.alt)??t.url,kind:"image",url:t.url,size:"0",height:((u=t.height)==null?void 0:u.toString())??`${es}`,width:((c=t.width)==null?void 0:c.toString())??`${es}`}}}function j7(e){var Y,Z;const{content:t,field:n,id:r,onContentChange:i,readOnly:o=!1,condensedButtons:a=!1}=e,[s,u]=E.useState(!1),[c,l]=E.useState(!1),[f,p]=E.useState(!1),[A,m]=E.useState(!1),{contentType:v,fieldValue:_,errorBoundaryRef:S,onDocumentSelected:I,onError:T,onMediaSelected:g,...y}=ARe({content:t,field:n,onContentChange:i}),b=s||c,x=o||!v,w=v==="DocumentLink"&&_!=="",F=v==="ImageLink"||v==="FileLink",M=v==="ExternalLink"&&Fr.toURL(_),P={id:r,contentType:v,onBlur:()=>u(!1),onFocus:()=>{u(!0),v==="DocumentLink"&&p(!0),v==="FileLink"&&m(!0),v==="ImageLink"&&m(!0)},readOnly:x,textType:M||F?"link":"normal",value:_,condensedButtons:a,...y},{searchDocuments:K}=Oe();return d.jsxs(d.Fragment,{children:[d.jsxs(h.Popover,{onMouseOverChange:l,open:b,align:"start",sideOffset:-3,openDelay:100,closeDelay:200,focusOnEnter:!1,anchor:d.jsxs(h.Field,{onMouseOverChange:u,children:[d.jsx(h.FieldIcon,{name:"link"}),d.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),d.jsx(h.FieldControl,{children:w&&K?d.jsx(bRe,{errorBoundaryRef:S,onError:T,fallback:d.jsx(cC,{...P,value:"..."}),renderError:()=>vRe(P),children:d.jsx(yRe,{...P,documentId:_,openDocumentListModal:()=>p(!0)})}):d.jsx(cC,{...P})})]}),children:[M&&d.jsx(h.LinkDescriptionCard,{url:M,title:Fr.getUrlTitle(M)??"",subTitle:M.toString()}),(t==null?void 0:t.value.__TYPE__)==="ImageLink"&&d.jsx(h.LinkImageCard,{url:t.value.url,title:t.value.name,subTitle:`${t.value.width} x ${t.value.height} pixels`})]}),d.jsx(DR,{open:A,onOpenChange:m,onMediaSelected:g,assetType:"all"}),d.jsx(O7,{open:f,onOpenChange:p,onSelectDocument:ie=>{p(!1),I(ie)},fixedCustomTypes:new Set((Y=n.config)==null?void 0:Y.customtypes),fixedTags:new Set((Z=n.config)==null?void 0:Z.tags)})]})}function vRe(e){return d.jsx(cC,{...e,textType:"link"})}function cC(e){const{id:t,onValueChange:n,placeholder:r,readOnly:i,value:o,textType:a,onFocus:s,onBlur:u,contentType:c,isTypeSelectEnabled:l,selectType:f,onTypeChange:p,isTargetNewTab:A,condensedButtons:m,updateWebLinkTarget:v}=e,_=c==="DocumentLink"||c==="ImageLink"||c==="FileLink";return d.jsx(Qs,{id:t,onValueChange:n,placeholder:r,readOnly:i||_,value:o,variant:a,onFocus:s,onBlur:u,cursor:_?"pointer":"text",endAdornment:d.jsx(M7,{hasLink:!!o,onUnlink:()=>n(""),selectEnabled:l,selectedType:f,onValueChange:p,openInNewTab:A,condensedButtons:m,setOpenInNewTab:v})})}function yRe(e){const{id:t,documentId:n,openDocumentListModal:r,onValueChange:i,isTypeSelectEnabled:o,selectType:a,condensedButtons:s,onTypeChange:u}=e,c=mRe(n);return d.jsx(Qs,{id:t,readOnly:!0,value:c,variant:"link",onFocus:r,cursor:"pointer",endAdornment:d.jsx(M7,{hasLink:!0,onUnlink:()=>i(""),selectEnabled:o,selectedType:a,condensedButtons:s,onValueChange:u})})}function bRe(e){const{errorBoundaryRef:t,onError:n,children:r,fallback:i,renderError:o}=e;return d.jsx(h.ErrorBoundary,{ref:t,onError:n,renderError:o,children:d.jsx(E.Suspense,{fallback:i,children:r})})}function CRe(e){const{linkTo:t,onLinkToChange:n}=e;return d.jsx(j7,{content:SRe(t),onContentChange:r=>n(_Re(r)),field:{type:"Link",config:{label:"Link",allowTargetBlank:!0}},condensedButtons:!0})}function SRe(e){return e?{__TYPE__:"LinkContent",value:e}:void 0}function _Re(e){return e?e.value:void 0}function U7(e){var T,g;const{allContentViews:t,content:n,contentView:r,fieldLabel:i,imageLabel:o,initialImages:a,isUpdating:s,page:u=0,readOnly:c,thumbnailName:l,onClear:f,onContentChange:p,onCropperDialogClose:A,onPageChange:m,onMediaDialogOpenChange:v}=e,_=((g=(T=n==null?void 0:n.url)==null?void 0:T.split("?")[0])==null?void 0:g.slice(-4))===".svg",S=n!=null&&n.url&&!c?"visible":"hidden",I=!ke.isImageContent(n);return d.jsxs(h.Box,{display:"flex",gap:12,padding:{inline:12},children:[d.jsx(h.Box,{children:d.jsx(h.Carousel,{getItemSource:lEe,items:t,onPageChange:m,page:u,buttonSize:"small",renderPrevTooltip:y=>d.jsx(h.Tooltip,{content:"Previous",children:y}),renderNextTooltip:y=>d.jsx(h.Tooltip,{content:"Next",children:y}),style:I?{width:181,height:142}:{width:123,height:93},children:y=>(y==null?void 0:y.url)&&d.jsx(h.CarouselItem,{"aria-label":"Image Field Item",src:u7(y.url),alt:y.alt??void 0,isUpdating:s,disableAnimation:I},`${l}_${y.url}`)})}),d.jsxs(h.Box,{width:"100%",display:"flex",flexDirection:"column",gap:I?16:12,children:[d.jsx(Y$e,{fieldLabel:i,imageLabel:o,initialImages:a,page:u,displaySeparator:!I,isSVGContentView:_,visibility:S,onClear:f,onCropperDialogClose:A,onMediaDialogOpenChange:v}),d.jsx(H$e,{readOnly:c||!r,altText:(r==null?void 0:r.alt)??"",onValueChange:y=>{r&&p(aEe(l,n,r,y))}}),I&&d.jsx(CRe,{linkTo:n.linkTo,onLinkToChange:y=>{p({...n,linkTo:y})}})]})]})}function IRe(e){const{content:t,onContentChange:n,field:r}=e,[i,o]=E.useState(0),[a,s]=E.useTransition(),u=iEe(r),c=u[i],l=t?oEe(r,t):void 0,f=l==null?void 0:l[i];function p(_){if(!c)return;const S=fEe(c.name,r,t,_);S!==t&&s(()=>n(S))}function A(_){s(()=>o(_))}function m({option:_,croppedImages:S}){if(o(_),!t)return;const I=Object.entries(S).reduce((T,[g,y])=>K$e({field:r,content:T,thumbnail:g,croppedImage:y}),t);I!==t&&s(()=>n(I))}function v(){o==null||o(0),n(void 0)}return{onCropperDialogClose:m,onPageChange:A,onMediaSelected:p,isUpdating:a,page:i,thumbnail:c,allThumbnails:u,allContentViews:l,contentView:f,onClear:v}}function TRe(e){const{content:t,field:n,readOnly:r,onContentChange:i}=e,o=t&&t.origin.url.length>0,{onCropperDialogClose:a,onPageChange:s,onMediaSelected:u,isUpdating:c,page:l,thumbnail:f,allThumbnails:p,allContentViews:A,contentView:m,onClear:v}=IRe({field:n,content:t,onContentChange:i}),[_,S]=E.useState(!1),I=nr(n),T=p.map((b,x)=>{const w=A==null?void 0:A[x];return{thumbnail:b,contentView:w,labels:aC(b,t,w)}}),g=f&&o?aC(f,t,m).filter(io.isDefined):[],y=f&&t&&o&&A;return d.jsx(w7,{isMediaDialogOpen:_,onMediaSelected:u,onMediaDialogOpenChange:S,children:d.jsx(E.Suspense,{fallback:d.jsx("div",{style:{height:95}}),children:y?d.jsx(U7,{allContentViews:A,content:t,contentView:m,fieldLabel:I,imageLabel:g,initialImages:T,isUpdating:c,page:l,readOnly:r,thumbnailName:f.name,onClear:v,onContentChange:i,onCropperDialogClose:a,onMediaDialogOpenChange:S,onPageChange:s}):d.jsx(I7,{fieldLabel:I,isUpdating:c,readOnly:r,onMediaDialogOpenChange:S})})})}function xRe(e){var _,S;const{searchTerm:t,catalogId:n}=e,r=Oe();r.integrationFields||Pn("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,[s,u]=E.useState(1),[c,l]=E.useState([]),[f,p]=E.useState(""),A=Xe.useRequest(wRe,[i,a,o,n,t,t===f?s:1]);t!==f?(p(t),u(1),l(A.items)):A.items.length>0&&((_=vn.last(c))==null?void 0:_.id)!==((S=vn.last(A.items))==null?void 0:S.id)&&l(I=>I.concat(A.items));const m=s<A.totalPages;function v(){m&&u(I=>I+1)}return{items:c,response:A,fetchNextPage:v,hasNextPage:m}}function wRe(e,t,n,r,i,o=1,a=30){const s=new URL(`if/search/${r}`,e);return s.searchParams.set("searchTerm",i),s.searchParams.set("limit",a.toString()),s.searchParams.set("page",o.toString()),xe.request(s,{headers:{repository:n},credentials:xe.getRequestCredentials(t),okType:ERe})}const B7=B.object({id:B.string(),title:B.string(),imageURL:B.string().optional(),description:B.string().optional()}),ERe=B.object({items:B.array(B7),totalPages:B.number(),page:B.number()});function P7(e){const{itemId:t,catalogId:n}=e,r=Oe();r.integrationFields||Pn("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,u=Xe.useRequest($Re,[i,a,o,n,t]).items[0];if(!u)throw new Error("Item not found");return{item:u}}function $Re(e,t,n,r,i){const o=new URL(`if/read/${r}`,e);return o.searchParams.set("ids",[i].toString()),xe.request(o,{headers:{repository:n},credentials:xe.getRequestCredentials(t),okType:RRe})}const RRe=B.object({items:B.array(B7)});function KR(e){const{item:t,onClick:n,catalogId:r}=e;return d.jsxs(h.PreviewCard,{variant:"large",onClick:n,children:[d.jsx(ORe,{src:t.imageURL??"",alt:t.title}),d.jsxs(h.PreviewContent,{children:[d.jsx(h.Badge,{title:`Catalog: ${r}`,icon:"multipleStop",size:"medium"}),d.jsx(h.Text,{variant:"bold",color:"grey12",sx:{marginTop:4},children:t.title}),d.jsx(h.Text,{variant:"small",color:"grey11",children:t.description??t.id})]})]})}const Vh=76;function ORe(e){const{src:t,alt:n}=e;return t?d.jsx(h.PreviewImage,{src:t,alt:n,width:Vh,height:Vh,framed:!0}):d.jsxs(h.Box,{borderRadius:6,backgroundColor:"grey2",height:Vh,width:Vh,flexDirection:"column",alignItems:"center",justifyContent:"center",border:!0,padding:{inline:4,block:8},children:[d.jsx(h.Icon,{name:"hideImage",size:"large",color:"grey11"}),d.jsx(h.Text,{color:"grey11",variant:"small",noSelect:!0,align:"center",children:"No preview image"})]})}function nl(){return d.jsxs(h.PreviewCard,{variant:"large",children:[d.jsx(h.Skeleton,{height:76,width:76}),d.jsxs(h.PreviewContent,{children:[d.jsx(h.Skeleton,{height:24,width:168}),d.jsx(h.Skeleton,{height:24,width:240,sx:{marginTop:4}}),d.jsx(h.Skeleton,{height:16,width:144})]})]})}function FRe(e){const{open:t,onOpenChange:n,catalogId:r,onSelectItem:i}=e,o=Qe.useDebounceState({initialState:""}),a=Oe();return d.jsx(h.Dialog,{open:t,onOpenChange:n,hasClose:!1,size:{width:612,height:724},children:d.jsx(h.DialogContent,{children:d.jsxs(h.Box,{flexDirection:"column",height:"100%",children:[d.jsxs(h.Box,{padding:{top:16,inline:16},flexDirection:"column",gap:8,children:[d.jsx(h.FormSearchInput,{value:o.value,onValueChange:o.set,placeholder:"Search in your catalog"}),d.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"Select an item"})]}),a.integrationFields?d.jsx(h.ErrorBoundary,{renderError:()=>d.jsx(lC,{message:"There was an error while fetching your catalog items."}),children:d.jsx(E.Suspense,{fallback:d.jsxs(h.Box,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:[d.jsx(nl,{}),d.jsx(nl,{}),d.jsx(nl,{}),d.jsx(nl,{}),d.jsx(nl,{})]}),children:d.jsx(MRe,{searchTerm:o.debouncedValue,catalogId:r,onItemClick:i})})}):d.jsx(lC,{message:"Slice Machine does not yet support mock data for integration field in the simulator."})]})})})}function MRe(e){const{catalogId:t,searchTerm:n,onItemClick:r}=e,[i,o]=E.useTransition(),{items:a,hasNextPage:s,fetchNextPage:u}=xRe({catalogId:t,searchTerm:n});return d.jsx(d.Fragment,{children:d.jsxs(h.ScrollArea,{onScrollToBottom:()=>s&&o(u),style:{flexGrow:1,paddingTop:h.theme.space[10],paddingBottom:h.theme.space[16],paddingInline:h.theme.space[16],display:"flex",flexDirection:"column",gap:h.theme.space[12]},threshold:252,children:[a.length===0?d.jsx(lC,{}):a.map(c=>d.jsx(KR,{item:c,catalogId:t,onClick:()=>r(c)},c.id)),d.jsx(h.AnimatedElement,{animation:{name:"fade"},children:i&&d.jsx(h.Text,{color:"grey11",align:"center",sx:{marginBlock:8},children:"Loading more results ..."})})]})})}function lC(e){const{message:t="We can't find any items matching your search"}=e,n="Oops!";return d.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:d.jsxs(h.BlankSlate,{children:[d.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),d.jsx(h.BlankSlateTitle,{size:"big",children:n}),d.jsx(h.BlankSlateDescription,{width:360,children:t})]})})}function kRe(e){const{itemId:t,item:n}=e,r=Oe();return t&&n&&n.id===t?d.jsx(rl,{...e,value:n.title}):t&&r.integrationFields?d.jsx(h.ErrorBoundary,{renderError:()=>d.jsx(rl,{...e,value:t}),children:d.jsx(E.Suspense,{fallback:d.jsx(rl,{...e,value:t}),children:d.jsx(URe,{...e,itemId:t})},t)},t):t&&!r.integrationFields?d.jsx(rl,{...e,value:t}):d.jsx(rl,{...e,value:""})}function LRe(e){const{catalogId:t,itemId:n,item:r}=e,i=Oe();return n&&r&&r.id===n?d.jsx(h.FieldFooter,{children:d.jsx(KR,{catalogId:t,item:r})}):n&&i.integrationFields?d.jsx(h.ErrorBoundary,{renderError:()=>null,children:d.jsx(h.FieldFooter,{children:d.jsx(E.Suspense,{fallback:d.jsx(nl,{}),children:d.jsx(jRe,{catalogId:t,itemId:n})},n)})},n):null}function jRe(e){const{itemId:t,catalogId:n}=e,{item:r}=P7({catalogId:n,itemId:t});return d.jsx(KR,{catalogId:n,item:r})}function rl(e){const{id:t,field:n,readOnly:r,value:i,onFocus:o,onClearItem:a}=e;return d.jsx(Qs,{id:t,placeholder:Pc(n),readOnly:!0,variant:"link",value:i,...!r&&{cursor:"pointer",onFocus:o},endAdornment:d.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!i,onClick:a})})}function URe(e){const{itemId:t,catalogId:n}=e,{item:r}=P7({catalogId:n,itemId:t});return d.jsx(rl,{...e,value:r.title})}function BRe(e){var A;const{id:t,field:n,content:r,readOnly:i,onContentChange:o}=e,[a,s]=E.useState(!1),[u,c]=E.useState(),l=(A=n.config)==null?void 0:A.catalog;if(!l)return null;function f(m){o({value:m.id,__TYPE__:"IntegrationFieldsContent"}),c(m),s(!1)}function p(){o(void 0),c(void 0)}return d.jsxs(d.Fragment,{children:[d.jsxs(h.Field,{footer:d.jsx(LRe,{catalogId:l,item:u,itemId:r==null?void 0:r.value}),children:[d.jsx(h.FieldIcon,{name:"multipleStop"}),d.jsx(h.FieldLabel,{htmlFor:t,children:nr(n)}),d.jsx(h.FieldControl,{children:d.jsx(kRe,{id:t,field:n,readOnly:i,catalogId:l,item:u,itemId:r==null?void 0:r.value,onFocus:()=>s(!0),onClearItem:p})})]}),d.jsx(FRe,{open:a,onOpenChange:s,catalogId:l,onSelectItem:f})]})}function PRe(e){const{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e;return d.jsxs(h.Field,{children:[d.jsx(h.FieldIcon,{name:"notes"}),d.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),d.jsx(h.FieldControl,{children:d.jsx(h.TextArea,{id:r,placeholder:Pc(n),readOnly:o,paddingLeft:4,paddingRight:12,sx:{flexGrow:1},value:(t==null?void 0:t.value)??"",onChange:a=>{i(WRe(a))}})})]})}function WRe(e){return e.length===0?void 0:{__TYPE__:"FieldContent",type:"Text",value:e}}const DRe=({content:e,field:t,id:n,onContentChange:r,readOnly:i})=>{var s,u;const o=Number(e==null?void 0:e.value),a=Number.isFinite(o)?o:void 0;return d.jsxs(h.Field,{children:[d.jsx(h.FieldIcon,{name:"pin"}),d.jsx(h.FieldLabel,{htmlFor:n,children:nr(t)}),d.jsx(h.FieldControl,{children:d.jsx(h.NumberInput,{id:n,value:a,min:(s=t.config)==null?void 0:s.min,max:(u=t.config)==null?void 0:u.max,padding:b7,placeholder:Pc(t),readOnly:i,onValueChange:c=>r(KRe(c))})})]})};function KRe(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Number",value:String(e)}}function dn(e){this.content=e}dn.prototype={constructor:dn,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new dn(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new dn(n)},addToStart:function(e,t){return new dn([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new dn(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new dn(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=dn.from(e),e.size?new dn(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=dn.from(e),e.size?new dn(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=dn.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};dn.from=function(e){if(e instanceof dn)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new dn(t)};function W7(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let a=0;i.text[a]==o.text[a];a++)n++;return n}if(i.content.size||o.content.size){let a=W7(i.content,o.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function D7(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let a=e.child(--i),s=t.child(--o),u=a.nodeSize;if(a==s){n-=u,r-=u;continue}if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){let c=0,l=Math.min(a.text.length,s.text.length);for(;c<l&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){let c=D7(a.content,s.content,n-1,r-1);if(c)return c}n-=u,r-=u}}class J{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let a=0,s=0;s<n;a++){let u=this.content[a],c=s+u.nodeSize;if(c>t&&r(u,i+s,o||null,a)!==!1&&u.content.size){let l=s+1;u.nodesBetween(Math.max(0,t-l),Math.min(u.content.size,n-l),r,i+l)}s=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",a=!0;return this.nodesBetween(t,n,(s,u)=>{s.isText?(o+=s.text.slice(Math.max(t,u)-u,n-u),a=!r):s.isLeaf?(i?o+=typeof i=="function"?i(s):i:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),a=!r):!a&&s.isBlock&&(o+=r,a=!0)},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new J(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,a=0;a<n;o++){let s=this.content[o],u=a+s.nodeSize;u>t&&((a<t||u>n)&&(s.isText?s=s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),i+=s.nodeSize),a=u}return new J(r,i)}cutByIndex(t,n){return t==n?J.empty:t==0&&n==this.content.length?this:new J(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new J(i,o)}addToStart(t){return new J([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new J(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return W7(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return D7(this,t,n,r)}findIndex(t,n=-1){if(t==0)return Qh(0,t);if(t==this.size)return Qh(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),a=i+o.nodeSize;if(a>=t)return a==t||n>0?Qh(r+1,a):Qh(r,i);i=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return J.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new J(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return J.empty;let n,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new J(n||t,r)}static from(t){if(!t)return J.empty;if(t instanceof J)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new J([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}J.empty=new J([],0);const Yb={index:0,offset:0};function Qh(e,t){return Yb.index=e,Yb.offset=t,Yb}function Nm(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!Nm(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Nm(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let mt=class fC{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Nm(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);return r.create(n.attrs)}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return fC.none;if(t instanceof fC)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};mt.none=[];class hp extends Error{}class re{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=N7(this.content,t+this.openStart,n);return r&&new re(r,this.openStart,this.openEnd)}removeBetween(t,n){return new re(K7(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return re.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new re(J.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new re(t,r,i)}}re.empty=new re(J.empty,0,0);function K7(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(i==t||o.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(K7(o.content,t-i-1,n-i-1)))}function N7(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),a=e.maybeChild(i);if(o==t||a.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=N7(a.content,t-o-1,n);return s&&e.replaceChild(i,a.copy(s))}function NRe(e,t,n){if(n.openStart>e.depth)throw new hp("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new hp("Inconsistent open depths");return q7(e,t,n,0)}function q7(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let a=q7(e,t,n,r+1);return o.copy(o.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,s=a.content;return Au(a,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:a,end:s}=qRe(n,e);return Au(o,Q7(e,a,s,t,r))}else return Au(o,qm(e,t,r))}function V7(e,t){if(!t.type.compatibleContent(e.type))throw new hp("Cannot join "+t.type.name+" onto "+e.type.name)}function dC(e,t,n){let r=e.node(n);return V7(r,t.node(n)),r}function pu(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Rd(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(pu(e.nodeAfter,r),o++));for(let s=o;s<a;s++)pu(i.child(s),r);t&&t.depth==n&&t.textOffset&&pu(t.nodeBefore,r)}function Au(e,t){return e.type.checkContent(t),e.copy(t)}function Q7(e,t,n,r,i){let o=e.depth>i&&dC(e,t,i+1),a=r.depth>i&&dC(n,r,i+1),s=[];return Rd(null,e,i,s),o&&a&&t.index(i)==n.index(i)?(V7(o,a),pu(Au(o,Q7(e,t,n,r,i+1)),s)):(o&&pu(Au(o,qm(e,t,i+1)),s),Rd(t,n,i,s),a&&pu(Au(a,qm(n,r,i+1)),s)),Rd(r,null,i,s),new J(s)}function qm(e,t,n){let r=[];if(Rd(null,e,n,r),e.depth>n){let i=dC(e,t,n+1);pu(Au(i,qm(e,t,n+1)),r)}return Rd(t,null,n,r),new J(r)}function qRe(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)i=t.node(o).copy(J.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class mp{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return mt.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let s=r;r=i,i=s}let o=r.marks;for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!i||!o[a].isInSet(i.marks))&&(o=o[a--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Vm(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let a=t;;){let{index:s,offset:u}=a.content.findIndex(o),c=o-u;if(r.push(a,s,i+u),!c||(a=a.child(s),a.isText))break;o=c-1,i+=u+1}return new mp(n,r,o)}static resolveCached(t,n){for(let i=0;i<Gb.length;i++){let o=Gb[i];if(o.pos==n&&o.doc==t)return o}let r=Gb[Jb]=mp.resolve(t,n);return Jb=(Jb+1)%VRe,r}}let Gb=[],Jb=0,VRe=12;class Vm{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const QRe=Object.create(null);let pl=class pC{constructor(t,n,r,i=mt.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||J.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&Nm(this.attrs,n||t.defaultAttrs||QRe)&&mt.sameSet(this.marks,r||mt.none)}copy(t=null){return t==this.content?this:new pC(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new pC(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return re.empty;let i=this.resolve(t),o=this.resolve(n),a=r?0:i.sharedDepth(n),s=i.start(a),c=i.node(a).content.cut(i.pos-s,o.pos-s);return new re(c,i.depth-a,o.depth-a)}replace(t,n,r){return NRe(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return mp.resolveCached(this,t)}resolveNoCache(t){return mp.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),z7(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=J.empty,i=0,o=r.childCount){let a=this.contentMatchAt(t).matchFragment(r,i,o),s=a&&a.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let u=i;u<o;u++)if(!this.type.allowsMarks(r.child(u).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),a=o&&o.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=mt.none;for(let n=0;n<this.marks.length;n++)t=this.marks[n].addToSet(t);if(!mt.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=J.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,i,r)}};pl.prototype.text=void 0;class Qm extends pl{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):z7(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Qm(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Qm(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function z7(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class ju{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new zRe(t,n);if(r.next==null)return ju.empty;let i=H7(r);r.next&&r.err("Unexpected trailing text");let o=eOe(XRe(i));return tOe(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function o(a,s){let u=a.matchFragment(t,r);if(u&&(!n||u.validEnd))return J.from(s.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:l,next:f}=a.next[c];if(!(l.isText||l.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let p=o(f,s.concat(l));if(p)return p}}return null}return o(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){let a=[];for(let s=i;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<o.next.length;a++){let{type:s,next:u}=o.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!i.type||u.validEnd)&&(r.push({match:s.contentMatch,type:s,via:i}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)o+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return o}).join(`
35
35
  `)}}ju.empty=new ju(!0);class zRe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function H7(e){let t=[];do t.push(HRe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function HRe(e){let t=[];do t.push(YRe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function YRe(e){let t=ZRe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=GRe(e,t);else break;return t}function eM(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function GRe(e,t){let n=eM(e),r=n;return e.eat(",")&&(e.next!="}"?r=eM(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function JRe(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let a=n[o];a.groups.indexOf(t)>-1&&i.push(a)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function ZRe(e){if(e.eat("(")){let t=H7(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=JRe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function XRe(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(a,s,u){let c={term:u,to:s};return t[a].push(c),c}function i(a,s){a.forEach(u=>u.to=s)}function o(a,s){if(a.type=="choice")return a.exprs.reduce((u,c)=>u.concat(o(c,s)),[]);if(a.type=="seq")for(let u=0;;u++){let c=o(a.exprs[u],s);if(u==a.exprs.length-1)return c;i(c,s=n())}else if(a.type=="star"){let u=n();return r(s,u),i(o(a.expr,u),u),[r(u)]}else if(a.type=="plus"){let u=n();return i(o(a.expr,s),u),i(o(a.expr,u),u),[r(u)]}else{if(a.type=="opt")return[r(s)].concat(o(a.expr,s));if(a.type=="range"){let u=s;for(let c=0;c<a.min;c++){let l=n();i(o(a.expr,u),l),u=l}if(a.max==-1)i(o(a.expr,u),u);else for(let c=a.min;c<a.max;c++){let l=n();r(u,l),i(o(a.expr,u),l),u=l}return[r(u)]}else{if(a.type=="name")return[r(s,void 0,a.value)];throw new Error("Unknown expr type")}}}}function Y7(e,t){return t-e}function tM(e,t){let n=[];return r(t),n.sort(Y7);function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let a=0;a<o.length;a++){let{term:s,to:u}=o[a];!s&&n.indexOf(u)==-1&&r(u)}}}function eOe(e){let t=Object.create(null);return n(tM(e,0));function n(r){let i=[];r.forEach(a=>{e[a].forEach(({term:s,to:u})=>{if(!s)return;let c;for(let l=0;l<i.length;l++)i[l][0]==s&&(c=i[l][1]);tM(e,u).forEach(l=>{c||i.push([s,c=[]]),c.indexOf(l)==-1&&c.push(l)})})});let o=t[r.join(",")]=new ju(r.indexOf(e.length-1)>-1);for(let a=0;a<i.length;a++){let s=i[a][1].sort(Y7);o.next.push({type:i[a][0],next:t[s.join(",")]||n(s)})}return o}}function tOe(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,a=[];for(let s=0;s<i.next.length;s++){let{type:u,next:c}=i.next[s];a.push(u.name),o&&!(u.isText||u.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function G7(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function J7(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function Z7(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new nOe(e[n]);return t}let nM=class X7{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Z7(r.attrs),this.defaultAttrs=G7(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ju.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:J7(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new pl(this,this.computeAttrs(t),J.from(n),mt.setFrom(r))}createChecked(t=null,n,r){return n=J.from(n),this.checkContent(n),new pl(this,this.computeAttrs(t),n,mt.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=J.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(J.empty,!0);return o?new pl(this,t,n.append(o),mt.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:mt.none:t}static compile(t,n){let r=Object.create(null);t.forEach((o,a)=>r[o]=new X7(o,n,a));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class nOe{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class NR{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=Z7(i.attrs),this.excluded=null;let o=G7(this.attrs);this.instance=o?new mt(this,o):null}create(t=null){return!t&&this.instance?this.instance:new mt(this,J7(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((o,a)=>r[o]=new NR(o,i++,n,a)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}excludes(t){return this.excluded.indexOf(t)>-1}}class e8{constructor(t){this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=dn.from(t.nodes),n.marks=dn.from(t.marks||{}),this.nodes=nM.compile(this.spec.nodes,this),this.marks=NR.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],a=o.spec.content||"",s=o.spec.marks;o.contentMatch=r[a]||(r[a]=ju.parse(a,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet=s=="_"?null:s?rM(this,s.split(" ")):s==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],a=o.spec.excludes;o.excluded=a==null?[o]:a==""?[]:rM(this,a.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof nM){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,i)}text(t,n){let r=this.nodes.text;return new Qm(r,r.defaultAttrs,t,mt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return pl.fromJSON(this,t)}markFromJSON(t){return mt.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function rM(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],a=o;if(o)n.push(o);else for(let s in e.marks){let u=e.marks[s];(i=="_"||u.spec.group&&u.spec.group.split(" ").indexOf(i)>-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class hu{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let i=t.nodes[r.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new oM(this,n,!1);return r.addAll(t,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new oM(this,n,!0);return r.addAll(t,n.from,n.to),re.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(oOe(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}matchStyle(t,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let a=this.styles[o],s=a.style;if(!(s.indexOf(t)!=0||a.context&&!r.matchesContext(a.context)||s.length>t.length&&(s.charCodeAt(t.length)!=61||s.slice(t.length+1)!=n))){if(a.getAttrs){let u=a.getAttrs(n);if(u===!1)continue;a.attrs=u||void 0}return a}}}static schemaRules(t){let n=[];function r(i){let o=i.priority==null?50:i.priority,a=0;for(;a<n.length;a++){let s=n[a];if((s.priority==null?50:s.priority)<o)break}n.splice(a,0,i)}for(let i in t.marks){let o=t.marks[i].spec.parseDOM;o&&o.forEach(a=>{r(a=aM(a)),a.mark||a.ignore||a.clearMark||(a.mark=i)})}for(let i in t.nodes){let o=t.nodes[i].spec.parseDOM;o&&o.forEach(a=>{r(a=aM(a)),a.node||a.ignore||a.mark||(a.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new hu(t,hu.schemaRules(t)))}}const t8={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},rOe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},n8={ol:!0,ul:!0},zm=1,Hm=2,Od=4;function iM(e,t,n){return t!=null?(t?zm:0)|(t==="full"?Hm:0):e&&e.whitespace=="pre"?zm|Hm:n&~Od}class zh{constructor(t,n,r,i,o,a,s){this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=i,this.solid=o,this.options=s,this.content=[],this.activeMarks=mt.none,this.stashMarks=[],this.match=a||(s&Od?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(J.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&zm)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=J.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(J.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(t){for(let n=this.stashMarks.length-1;n>=0;n--)if(t.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(t){for(let n=0,r=this.pendingMarks;n<r.length;n++){let i=r[n];(this.type?this.type.allowsMarkType(i.type):sOe(i.type,t))&&!i.isInSet(this.activeMarks)&&(this.activeMarks=i.addToSet(this.activeMarks),this.pendingMarks=i.removeFromSet(this.pendingMarks))}}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!t8.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class oM{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0;let i=n.topNode,o,a=iM(null,n.preserveWhitespace,0)|(r?Od:0);i?o=new zh(i.type,i.attrs,mt.none,mt.none,!0,n.topMatch||i.type.contentMatch,a):r?o=new zh(null,null,mt.none,mt.none,!0,null,a):o=new zh(t.schema.topNodeType,null,mt.none,mt.none,!0,null,a),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t){if(t.nodeType==3)this.addTextNode(t);else if(t.nodeType==1){let n=t.getAttribute("style");if(!n)this.addElement(t);else{let r=this.readStyles(aOe(n));if(!r)return;let[i,o]=r,a=this.top;for(let s=0;s<o.length;s++)this.removePendingMark(o[s],a);for(let s=0;s<i.length;s++)this.addPendingMark(i[s]);this.addElement(t);for(let s=0;s<i.length;s++)this.removePendingMark(i[s],a);for(let s=0;s<o.length;s++)this.addPendingMark(o[s])}}}addTextNode(t){let n=t.nodeValue,r=this.top;if(r.options&Hm||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(r.options&zm)r.options&Hm?n=n.replace(/\r\n?/g,`
36
36
  `):n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let i=r.content[r.content.length-1],o=t.previousSibling;(!i||o&&o.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n)),this.findInText(t)}else this.findInside(t)}addElement(t,n){let r=t.nodeName.toLowerCase(),i;n8.hasOwnProperty(r)&&this.parser.normalizeLists&&iOe(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(i=this.parser.matchTag(t,this,n));if(o?o.ignore:rOe.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let a,s=this.top,u=this.needsBlock;if(t8.hasOwnProperty(r))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),a=!0,s.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t);return}this.addAll(t),a&&this.sync(s),this.needsBlock=u}else this.addElementByRule(t,o,o.consuming===!1?i:void 0)}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
37
37
  `))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let n=mt.none,r=mt.none;e:for(let i=0;i<t.length;i+=2)for(let o=void 0;;){let a=this.parser.matchStyle(t[i],t[i+1],this,o);if(!a)continue e;if(a.ignore)return null;if(a.clearMark?this.top.pendingMarks.forEach(s=>{a.clearMark(s)&&(r=s.addToSet(r))}):n=this.parser.schema.marks[a.mark].create(a.attrs).addToSet(n),a.consuming===!1)o=a;else break}return[n,r]}addElementByRule(t,n,r){let i,o,a;n.node?(o=this.parser.schema.nodes[n.node],o.isLeaf?this.insertNode(o.create(n.attrs))||this.leafFallback(t):i=this.enter(o,n.attrs||null,n.preserveWhitespace)):(a=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(a));let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(u=>this.insertNode(u));else{let u=t;typeof n.contentElement=="string"?u=t.querySelector(n.contentElement):typeof n.contentElement=="function"?u=n.contentElement(t):n.contentElement&&(u=n.contentElement),this.findAround(t,u,!0),this.addAll(u)}i&&this.sync(s)&&this.open--,a&&this.removePendingMark(a,s)}addAll(t,n,r){let i=n||0;for(let o=n?t.childNodes[n]:t.firstChild,a=r==null?null:t.childNodes[r];o!=a;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o);this.findAtPoint(t,i)}findPlace(t){let n,r;for(let i=this.open;i>=0;i--){let o=this.nodes[i],a=o.findWrapping(t);if(a&&(!n||n.length>a.length)&&(n=a,r=o,!a.length)||o.solid)break}if(!n)return!1;this.sync(r);for(let i=0;i<n.length;i++)this.enterInner(n[i],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let n=this.textblockFromContext();n&&this.enterInner(n)}if(this.findPlace(t)){this.closeExtra();let n=this.top;n.applyPending(t.type),n.match&&(n.match=n.match.matchType(t.type));let r=n.activeMarks;for(let i=0;i<t.marks.length;i++)(!n.type||n.type.allowsMarkType(t.marks[i].type))&&(r=t.marks[i].addToSet(r));return n.content.push(t.mark(r)),!0}return!1}enter(t,n,r){let i=this.findPlace(t.create(n));return i&&this.enterInner(t,n,!0,r),i}enterInner(t,n=null,r=!1,i){this.closeExtra();let o=this.top;o.applyPending(t),o.match=o.match&&o.match.matchType(t);let a=iM(t,i,o.options);o.options&Od&&o.content.length==0&&(a|=Od),this.nodes.push(new zh(t,n,o.activeMarks,o.pendingMarks,r,null,a)),this.open++}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),a=(s,u)=>{for(;s>=0;s--){let c=n[s];if(c==""){if(s==n.length-1||s==0)continue;for(;u>=o;u--)if(a(s-1,u))return!0;return!1}else{let l=u>0||u==0&&i?this.nodes[u].type:r&&u>=o?r.node(u-o).type:null;if(!l||l.name!=c&&l.groups.indexOf(c)==-1)return!1;u--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(t){let n=uOe(t,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,n){for(let r=this.open;r>=0;r--){let i=this.nodes[r];if(i.pendingMarks.lastIndexOf(t)>-1)i.pendingMarks=t.removeFromSet(i.pendingMarks);else{i.activeMarks=t.removeFromSet(i.activeMarks);let a=i.popFromStashMark(t);a&&i.type&&i.type.allowsMarkType(a.type)&&(i.activeMarks=a.addToSet(i.activeMarks))}if(i==n)break}}}function iOe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&n8.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function oOe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function aOe(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}function aM(e){let t={};for(let n in e)t[n]=e[n];return t}function sOe(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],a=s=>{o.push(s);for(let u=0;u<s.edgeCount;u++){let{type:c,next:l}=s.edge(u);if(c==t||o.indexOf(l)<0&&a(l))return!0}};if(a(i.contentMatch))return!0}}function uOe(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}class au{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=Zb(n).createDocumentFragment());let i=r,o=[];return t.forEach(a=>{if(o.length||a.marks.length){let s=0,u=0;for(;s<o.length&&u<a.marks.length;){let c=a.marks[u];if(!this.marks[c.type.name]){u++;continue}if(!c.eq(o[s][0])||c.type.spec.spanning===!1)break;s++,u++}for(;s<o.length;)i=o.pop()[1];for(;u<a.marks.length;){let c=a.marks[u++],l=this.serializeMark(c,a.isInline,n);l&&(o.push([c,i]),i.appendChild(l.dom),i=l.contentDOM||l.dom)}}i.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=au.renderSpec(Zb(n),this.nodes[t.type.name](t));if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let o=this.serializeMark(t.marks[i],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&au.renderSpec(Zb(r),i(t,n))}static renderSpec(t,n,r=null){if(typeof n=="string")return{dom:t.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let i=n[0],o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));let a,s=r?t.createElementNS(r,i):t.createElement(i),u=n[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let l in u)if(u[l]!=null){let f=l.indexOf(" ");f>0?s.setAttributeNS(l.slice(0,f),l.slice(f+1),u[l]):s.setAttribute(l,u[l])}}for(let l=c;l<n.length;l++){let f=n[l];if(f===0){if(l<n.length-1||l>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}else{let{dom:p,contentDOM:A}=au.renderSpec(t,f,r);if(s.appendChild(p),A){if(a)throw new RangeError("Multiple content holes");a=A}}}return{dom:s,contentDOM:a}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new au(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=sM(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return sM(t.marks)}}function sM(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Zb(e){return e.document||window.document}const r8=65535,i8=Math.pow(2,16);function cOe(e,t){return e+t*i8}function uM(e){return e&r8}function lOe(e){return(e-(e&r8))/i8}const o8=1,a8=2,im=4,s8=8;let AC=class{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&s8)>0}get deletedBefore(){return(this.delInfo&(o8|im))>0}get deletedAfter(){return(this.delInfo&(a8|im))>0}get deletedAcross(){return(this.delInfo&im)>0}},Ll=class il{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&il.empty)return il.empty}recover(t){let n=0,r=uM(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+lOe(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,o=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let u=this.ranges[s]-(this.inverted?i:0);if(u>t)break;let c=this.ranges[s+o],l=this.ranges[s+a],f=u+c;if(t<=f){let p=c?t==u?-1:t==f?1:n:n,A=u+i+(p<0?0:l);if(r)return A;let m=t==(n<0?u:f)?null:cOe(s/3,t-u),v=t==u?a8:t==f?o8:im;return(n<0?t!=u:t!=f)&&(v|=s8),new AC(A,v,m)}i+=l-c}return r?t+i:new AC(t+i,0,null)}touches(t,n){let r=0,i=uM(n),o=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let u=this.ranges[s]-(this.inverted?r:0);if(u>t)break;let c=this.ranges[s+o],l=u+c;if(t<=l&&s==i*3)return!0;r+=this.ranges[s+a]-c}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let a=this.ranges[i],s=a-(this.inverted?o:0),u=a+(this.inverted?0:o),c=this.ranges[i+n],l=this.ranges[i+r];t(s,s+c,u,u+l),o+=l-c}}invert(){return new il(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?il.empty:new il(t<0?[0,-t,0]:[0,0,t])}};Ll.empty=new Ll([]);class Fd{constructor(t=[],n,r=0,i=t.length){this.maps=t,this.mirror=n,this.from=r,this.to=i}slice(t=0,n=this.maps.length){return new Fd(this.maps,this.mirror,t,n)}copy(){return new Fd(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,n){this.to=this.maps.push(t),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(t){for(let n=0,r=this.maps.length;n<t.maps.length;n++){let i=t.getMirror(n);this.appendMap(t.maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this.maps.length+t.maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t.maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new Fd;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this.maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let o=this.from;o<this.to;o++){let a=this.maps[o],s=a.mapResult(t,n);if(s.recover!=null){let u=this.getMirror(o);if(u!=null&&u>o&&u<this.to){o=u,t=this.maps[u].recover(s.recover);continue}}i|=s.delInfo,t=s.pos}return r?t:new AC(t,i,null)}}const Xb=Object.create(null);let Sr=class{getMap(){return Ll.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Xb[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in Xb)throw new RangeError("Duplicate use of step JSON ID "+t);return Xb[t]=n,n.prototype.jsonID=t,n}},sr=class _d{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new _d(t,null)}static fail(t){return new _d(null,t)}static fromReplace(t,n,r,i){try{return _d.ok(t.replace(n,r,i))}catch(o){if(o instanceof hp)return _d.fail(o.message);throw o}}};function qR(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(qR(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return J.fromArray(r)}let u8=class Id extends Sr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new re(qR(n.content,(a,s)=>!a.isAtom||!s.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),i),n.openStart,n.openEnd);return sr.fromReplace(t,this.from,this.to,o)}invert(){return new c8(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Id(n.pos,r.pos,this.mark)}merge(t){return t instanceof Id&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Id(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Id(n.from,n.to,t.markFromJSON(n.mark))}};Sr.jsonID("addMark",u8);let c8=class Td extends Sr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new re(qR(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return sr.fromReplace(t,this.from,this.to,r)}invert(){return new u8(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Td(n.pos,r.pos,this.mark)}merge(t){return t instanceof Td&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Td(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Td(n.from,n.to,t.markFromJSON(n.mark))}};Sr.jsonID("removeMark",c8);let l8=class xd extends Sr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return sr.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return sr.fromReplace(t,this.pos,this.pos+1,new re(J.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new xd(this.pos,n.marks[i]);return new xd(this.pos,this.mark)}}return new f8(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new xd(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new xd(n.pos,t.markFromJSON(n.mark))}};Sr.jsonID("addNodeMark",l8);let f8=class hC extends Sr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return sr.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return sr.fromReplace(t,this.pos,this.pos+1,new re(J.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new l8(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new hC(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new hC(n.pos,t.markFromJSON(n.mark))}};Sr.jsonID("removeNodeMark",f8);let Ih=class tu extends Sr{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&mC(t,this.from,this.to)?sr.fail("Structure replace would overwrite content"):sr.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Ll([this.from,this.to-this.from,this.slice.size])}invert(t){return new tu(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new tu(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof tu)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?re.empty:new re(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new tu(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?re.empty:new re(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new tu(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new tu(n.from,n.to,re.fromJSON(t,n.slice),!!n.structure)}};Sr.jsonID("replace",Ih);let aa=class om extends Sr{constructor(t,n,r,i,o,a,s=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=a,this.structure=s}apply(t){if(this.structure&&(mC(t,this.from,this.gapFrom)||mC(t,this.gapTo,this.to)))return sr.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return sr.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?sr.fromReplace(t,this.from,this.to,r):sr.fail("Content does not fit in gap")}getMap(){return new Ll([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new om(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new om(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new om(n.from,n.to,n.gapFrom,n.gapTo,re.fromJSON(t,n.slice),n.insert,!!n.structure)}};Sr.jsonID("replaceAround",aa);function mC(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let a=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function fOe(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Th(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let i=e.$from.node(r),o=e.$from.index(r),a=e.$to.indexAfter(r);if(r<e.depth&&i.canReplace(o,a,n))return r;if(r==0||i.type.spec.isolating||!fOe(i,o,a))break}return null}function d8(e,t,n=null,r=e){let i=dOe(e,t),o=i&&pOe(r,t);return o?i.map(cM).concat({type:t,attrs:n}).concat(o.map(cM)):null}function cM(e){return{type:e,attrs:null}}function dOe(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let a=o.length?o[0]:t;return n.canReplaceWith(r,i,a)?o:null}function pOe(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),a=t.contentMatch.findWrapping(o.type);if(!a)return null;let u=(a.length?a[a.length-1]:t).contentMatch;for(let c=r;u&&c<i;c++)u=u.matchType(n.child(c).type);return!u||!u.validEnd?null:a}function p8(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,a=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,l=n-2;c>o;c--,l--){let f=i.node(c),p=i.index(c);if(f.type.spec.isolating)return!1;let A=f.content.cutByIndex(p,f.childCount),m=r&&r[l+1];m&&(A=A.replaceChild(0,m.type.create(m.attrs)));let v=r&&r[l]||f;if(!f.canReplace(p+1,f.childCount)||!v.type.validContent(A))return!1}let s=i.indexAfter(o),u=r&&r[0];return i.node(o).canReplaceWith(s,s,u?u.type:i.node(o+1).type)}function xh(e,t){let n=e.resolve(t),r=n.index();return A8(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function A8(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function h8(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,a,s=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),s++,a=r.node(i).maybeChild(s)):(o=r.node(i).maybeChild(s-1),a=r.node(i+1)),o&&!o.isTextblock&&A8(o,a)&&r.node(i).canReplace(s,s+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function AOe(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let a=r.depth;a>=0;a--){let s=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,u=r.index(a)+(s>0?1:0),c=r.node(a),l=!1;if(o==1)l=c.canReplace(u,u,i);else{let f=c.contentMatchAt(u).findWrapping(i.firstChild.type);l=f&&c.canReplaceWith(u,u,f[0])}if(l)return s==0?r.pos:s<0?r.before(a+1):r.after(a+1)}return null}function VR(e,t,n=t,r=re.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return hOe(i,o,r)?new Ih(t,n,r):new mOe(i,o,r).fit()}function hOe(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class mOe{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=J.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=J.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,a=r.depth,s=i.depth;for(;a&&s&&o.childCount==1;)o=o.firstChild.content,a--,s--;let u=new re(o,a,s);return t>-1?new aa(r.pos,t,this.$to.pos,this.$to.end(),u,n):u.size||r.pos!=this.$to.pos?new Ih(r.pos,i.pos,u):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=e1(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let a=i.firstChild;for(let s=this.depth;s>=0;s--){let{type:u,match:c}=this.frontier[s],l,f=null;if(n==1&&(a?c.matchType(a.type)||(f=c.fillBefore(J.from(a),!1)):o&&u.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:s,parent:o,inject:f};if(n==2&&a&&(l=c.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:s,parent:o,wrap:l};if(o&&c.matchType(o.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=e1(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new re(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=e1(t,n);if(i.childCount<=1&&n>0){let o=t.size-n<=n+i.size;this.unplaced=new re(wd(t,n-1,1),n-1,o?n-1:r)}else this.unplaced=new re(wd(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let v=0;v<o.length;v++)this.openFrontierNode(o[v]);let a=this.unplaced,s=r?r.content:a.content,u=a.openStart-t,c=0,l=[],{match:f,type:p}=this.frontier[n];if(i){for(let v=0;v<i.childCount;v++)l.push(i.child(v));f=f.matchFragment(i)}let A=s.size+t-(a.content.size-a.openEnd);for(;c<s.childCount;){let v=s.child(c),_=f.matchType(v.type);if(!_)break;c++,(c>1||u==0||v.content.size)&&(f=_,l.push(m8(v.mark(p.allowedMarks(v.marks)),c==1?u:0,c==s.childCount?A:-1)))}let m=c==s.childCount;m||(A=-1),this.placed=Ed(this.placed,n,J.from(l)),this.frontier[n].match=f,m&&A<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let v=0,_=s;v<A;v++){let S=_.lastChild;this.frontier.push({type:S.type,match:S.contentMatchAt(S.childCount)}),_=S.content}this.unplaced=m?t==0?re.empty:new re(wd(a.content,t-1,1),t-1,A<0?a.openEnd:t-1):new re(wd(a.content,t,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!t1(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),a=t1(t,n,i,r,o);if(a){for(let s=n-1;s>=0;s--){let{match:u,type:c}=this.frontier[s],l=t1(t,s,c,u,!0);if(!l||l.childCount)continue e}return{depth:n,fit:a,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Ed(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,o)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Ed(this.placed,this.depth,J.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(J.empty,!0);n.childCount&&(this.placed=Ed(this.placed,this.frontier.length,n))}}function wd(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(wd(e.firstChild.content,t-1,n)))}function Ed(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Ed(e.lastChild.content,t-1,n)))}function e1(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function m8(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,m8(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(J.empty,!0)))),e.copy(r)}function t1(e,t,n,r,i){let o=e.node(t),a=i?e.indexAfter(t):e.index(t);if(a==o.childCount&&!n.compatibleContent(o.type))return null;let s=r.fillBefore(o.content,!0,a);return s&&!gOe(n,o.content,a)?s:null}function gOe(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}let vOe=class am extends Sr{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return sr.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return sr.fromReplace(t,this.pos,this.pos+1,new re(J.from(i),0,n.isLeaf?0:1))}getMap(){return Ll.empty}invert(t){return new am(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new am(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new am(n.pos,n.attr,n.value)}};Sr.jsonID("attr",vOe);let gp=class extends Error{};gp=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};gp.prototype=Object.create(Error.prototype);gp.prototype.constructor=gp;gp.prototype.name="TransformError";const n1=Object.create(null);class Ve{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new yOe(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=re.empty){let r=n.content.lastChild,i=null;for(let s=0;s<n.openEnd;s++)i=r,r=r.lastChild;let o=t.steps.length,a=this.ranges;for(let s=0;s<a.length;s++){let{$from:u,$to:c}=a[s],l=t.mapping.slice(o);t.replaceRange(l.map(u.pos),l.map(c.pos),s?re.empty:n),s==0&&dM(t,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:a,$to:s}=i[o],u=t.mapping.slice(r),c=u.map(a.pos),l=u.map(s.pos);o?t.deleteRange(c,l):(t.replaceRangeWith(c,l,n),dM(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new Pe(t):ol(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let o=t.depth-1;o>=0;o--){let a=n<0?ol(t.node(0),t.node(o),t.before(o+1),t.index(o),n,r):ol(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,r);if(a)return a}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new $i(t.node(0))}static atStart(t){return ol(t,t,0,0,1)||new $i(t)}static atEnd(t){return ol(t,t,t.content.size,t.childCount,-1)||new $i(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=n1[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in n1)throw new RangeError("Duplicate use of selection JSON ID "+t);return n1[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Pe.between(this.$anchor,this.$head).getBookmark()}}Ve.prototype.visible=!0;class yOe{constructor(t,n){this.$from=t,this.$to=n}}let lM=!1;function fM(e){!lM&&!e.parent.inlineContent&&(lM=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Pe extends Ve{constructor(t,n=t){fM(t),fM(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return Ve.near(r);let i=t.resolve(n.map(this.anchor));return new Pe(i.parent.inlineContent?i:r,r)}replace(t,n=re.empty){if(super.replace(t,n),n==re.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Pe&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new z0(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Pe(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let o=Ve.findFrom(n,r,!0)||Ve.findFrom(n,-r,!0);if(o)n=o.$head;else return Ve.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(Ve.findFrom(t,-r,!0)||Ve.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new Pe(t,n)}}Ve.jsonID("text",Pe);class z0{constructor(t,n){this.anchor=t,this.head=n}map(t){return new z0(t.map(this.anchor),t.map(this.head))}resolve(t){return Pe.between(t.resolve(this.anchor),t.resolve(this.head))}}class ge extends Ve{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=t.resolve(i);return r?Ve.near(o):new ge(o)}content(){return new re(J.from(this.node),0,0)}eq(t){return t instanceof ge&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new QR(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ge(t.resolve(n.anchor))}static create(t,n){return new ge(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}ge.prototype.visible=!1;Ve.jsonID("node",ge);class QR{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new z0(r,r):new QR(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&ge.isSelectable(r)?new ge(n):Ve.near(n)}}class $i extends Ve{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=re.empty){if(n==re.empty){t.delete(0,t.doc.content.size);let r=Ve.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new $i(t)}map(t){return new $i(t)}eq(t){return t instanceof $i}getBookmark(){return bOe}}Ve.jsonID("all",$i);const bOe={map(){return this},resolve(e){return new $i(e)}};function ol(e,t,n,r,i,o=!1){if(t.inlineContent)return Pe.create(e,n);for(let a=r-(i>0?0:1);i>0?a<t.childCount:a>=0;a+=i){let s=t.child(a);if(s.isAtom){if(!o&&ge.isSelectable(s))return ge.create(e,n-(i<0?s.nodeSize:0))}else{let u=ol(e,s,n+i,i<0?s.childCount:0,i,o);if(u)return u}n+=s.nodeSize*i}return null}function dM(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof Ih||i instanceof aa))return;let o=e.mapping.maps[r],a;o.forEach((s,u,c,l)=>{a==null&&(a=l)}),e.setSelection(Ve.near(e.doc.resolve(a),n))}function pM(e,t){return!t||!e?e:e.bind(t)}class Hh{constructor(t,n,r){this.name=t,this.init=pM(n.init,r),this.apply=pM(n.apply,r)}}new Hh("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Hh("selection",{init(e,t){return e.selection||Ve.atStart(t.doc)},apply(e){return e.selection}}),new Hh("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Hh("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}});function g8(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=g8(i,t,{})),n[r]=i}return n}class zr{constructor(t){this.spec=t,this.props={},t.props&&g8(t.props,this,this.props),this.key=t.key?t.key.key:v8("plugin")}getState(t){return t[this.key]}}const r1=Object.create(null);function v8(e){return e in r1?e+"$"+ ++r1[e]:(r1[e]=0,e+"$")}class Xi{constructor(t="key"){this.key=v8(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Wc=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},y8=function(e,t,n,r){return n&&(AM(e,t,n,r,-1)||AM(e,t,n,r,1))},COe=/^(img|br|input|textarea|hr)$/i;function AM(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Ym(e))){let o=e.parentNode;if(!o||o.nodeType!=1||zR(e)||COe.test(e.nodeName)||e.contentEditable=="false")return!1;t=Wc(e)+(i<0?0:1),e=o}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable=="false")return!1;t=i<0?Ym(e):0}else return!1}}function Ym(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function SOe(e,t,n){for(let r=t==0,i=t==Ym(e);r||i;){if(e==n)return!0;let o=Wc(e);if(e=e.parentNode,!e)return!1;r=r&&o==0,i=i&&o==Ym(e)}}function zR(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const b8=function(e){return e.focusNode&&y8(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function C8(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const ho=typeof navigator<"u"?navigator:null,hM=typeof document<"u"?document:null,zs=ho&&ho.userAgent||"",gC=/Edge\/(\d+)/.exec(zs),S8=/MSIE \d/.exec(zs),vC=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(zs),wh=!!(S8||vC||gC),_8=S8?document.documentMode:vC?+vC[1]:gC?+gC[1]:0,H0=!wh&&/gecko\/(\d+)/i.test(zs);H0&&+(/Firefox\/(\d+)/.exec(zs)||[0,0])[1];const yC=!wh&&/Chrome\/(\d+)/.exec(zs),Hs=!!yC,I8=yC?+yC[1]:0,Dc=!wh&&!!ho&&/Apple Computer/.test(ho.vendor),HR=Dc&&(/Mobile\/\w+/.test(zs)||!!ho&&ho.maxTouchPoints>2),Zr=HR||(ho?/Mac/.test(ho.platform):!1),_Oe=ho?/Win/.test(ho.platform):!1,Eh=/Android \d/.test(zs),YR=!!hM&&"webkitFontSmoothing"in hM.documentElement.style,IOe=YR?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function TOe(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&i.size==0,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let s=r.resolve(a),u,c;if(b8(n)){for(u=s;i&&!i.node;)i=i.parent;let l=i.node;if(i&&l.isAtom&&ge.isSelectable(l)&&i.parent&&!(l.isInline&&SOe(n.focusNode,n.focusOffset,i.dom))){let f=i.posBefore;c=new ge(a==f?s:r.resolve(f))}}else{let l=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null;u=r.resolve(l)}if(!c){let l=t=="pointer"||e.state.selection.head<s.pos&&!o?1:-1;c=x8(e,u,s,l)}return c}function T8(e){return e.editable?e.hasFocus():$Oe(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function GR(e,t=!1){let n=e.state.selection;if(EOe(e,n),!!T8(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Hs){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&y8(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)wOe(e);else{let{anchor:r,head:i}=n,o,a;mM&&!(n instanceof Pe)&&(n.$from.parent.inlineContent||(o=gM(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=gM(e,n.to))),e.docView.setSelection(r,i,e.root,t),mM&&(o&&vM(o),a&&vM(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&xOe(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const mM=Dc||Hs&&I8<63;function gM(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(Dc&&i&&i.contentEditable=="false")return i1(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return i1(i);if(o)return i1(o)}}function i1(e){return e.contentEditable="true",Dc&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function vM(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function xOe(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!T8(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function wOe(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let r=e.cursorWrapper.dom,i=r.nodeName=="IMG";i?n.setStart(r.parentNode,Wc(r)+1):n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&wh&&_8<=11&&(r.disabled=!0,r.disabled=!1)}function EOe(e,t){if(t instanceof ge){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(yM(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else yM(e)}function yM(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function x8(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||Pe.between(t,n,r)}function $Oe(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function bC(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&Ve.findFrom(o,t)}function Ya(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function bM(e,t,n){let r=e.state.selection;if(r instanceof Pe)if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let a=e.state.doc.resolve(i.pos+o.nodeSize*(t<0?-1:1));return Ya(e,new Pe(r.$anchor,a))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=bC(e.state,t);return i&&i instanceof ge?Ya(e,i):!1}else if(!(Zr&&n.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,a;if(!o||o.isText)return!1;let s=t<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(a=e.docView.descAt(s))&&!a.contentDOM?ge.isSelectable(o)?Ya(e,new ge(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):YR?Ya(e,new Pe(e.state.doc.resolve(t<0?s:s+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof ge&&r.node.isInline)return Ya(e,new Pe(t>0?r.$to:r.$from));{let i=bC(e.state,t);return i?Ya(e,i):!1}}}function Gm(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Md(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Zc(e,t){return t<0?ROe(e):OOe(e)}function ROe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,a=!1;for(H0&&n.nodeType==1&&r<Gm(n)&&Md(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let s=n.childNodes[r-1];if(Md(s,-1))i=n,o=--r;else if(s.nodeType==3)n=s,r=n.nodeValue.length;else break}}else{if(w8(n))break;{let s=n.previousSibling;for(;s&&Md(s,-1);)i=n.parentNode,o=Wc(s),s=s.previousSibling;if(s)n=s,r=Gm(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}a?CC(e,n,r):i&&CC(e,i,o)}function OOe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=Gm(n),o,a;for(;;)if(r<i){if(n.nodeType!=1)break;let s=n.childNodes[r];if(Md(s,1))o=n,a=++r;else break}else{if(w8(n))break;{let s=n.nextSibling;for(;s&&Md(s,1);)o=s.parentNode,a=Wc(s)+1,s=s.nextSibling;if(s)n=s,r=0,i=Gm(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}o&&CC(e,o,a)}function w8(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function FOe(e,t){for(;e&&t==e.childNodes.length&&!zR(e);)t=Wc(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function MOe(e,t){for(;e&&!t&&!zR(e);)t=Wc(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function CC(e,t,n){if(t.nodeType!=3){let o,a;(a=FOe(t,n))?(t=a,n=0):(o=MOe(t,n))&&(t=o,n=o.nodeValue.length)}let r=e.domSelection();if(!r)return;if(b8(r)){let o=document.createRange();o.setEnd(t,n),o.setStart(t,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&GR(e)},50)}function CM(e,t){let n=e.state.doc.resolve(t);if(!(Hs||_Oe)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let o=e.coordsAtPos(t-1),a=(o.top+o.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(t<n.end()){let o=e.coordsAtPos(t+1),a=(o.top+o.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function SM(e,t,n){let r=e.state.selection;if(r instanceof Pe&&!r.empty||n.indexOf("s")>-1||Zr&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let a=bC(e.state,t);if(a&&a instanceof ge)return Ya(e,a)}if(!i.parent.inlineContent){let a=t<0?i:o,s=r instanceof $i?Ve.near(a,t):Ve.findFrom(a,t);return s?Ya(e,s):!1}return!1}function _M(e,t){if(!(e.state.selection instanceof Pe))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let a=e.state.tr;return t<0?a.delete(n.pos-o.nodeSize,n.pos):a.delete(n.pos,n.pos+o.nodeSize),e.dispatch(a),!0}return!1}function IM(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function kOe(e){if(!Dc||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;IM(e,r,"true"),setTimeout(()=>IM(e,r,"false"),20)}return!1}function LOe(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function jOe(e,t){let n=t.keyCode,r=LOe(t);if(n==8||Zr&&n==72&&r=="c")return _M(e,-1)||Zc(e,-1);if(n==46&&!t.shiftKey||Zr&&n==68&&r=="c")return _M(e,1)||Zc(e,1);if(n==13||n==27)return!0;if(n==37||Zr&&n==66&&r=="c"){let i=n==37?CM(e,e.state.selection.from)=="ltr"?-1:1:-1;return bM(e,i,r)||Zc(e,i)}else if(n==39||Zr&&n==70&&r=="c"){let i=n==39?CM(e,e.state.selection.from)=="ltr"?1:-1:1;return bM(e,i,r)||Zc(e,i)}else{if(n==38||Zr&&n==80&&r=="c")return SM(e,-1,r)||Zc(e,-1);if(n==40||Zr&&n==78&&r=="c")return kOe(e)||SM(e,1,r)||Zc(e,1);if(r==(Zr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function E8(e,t){e.someProp("transformCopied",A=>{t=A(t,e)});let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let A=r.firstChild;n.push(A.type.name,A.attrs!=A.type.defaultAttrs?A.attrs:null),r=A.content}let a=e.someProp("clipboardSerializer")||au.fromSchema(e.state.schema),s=k8(),u=s.createElement("div");u.appendChild(a.serializeFragment(r,{document:s}));let c=u.firstChild,l,f=0;for(;c&&c.nodeType==1&&(l=M8[c.nodeName.toLowerCase()]);){for(let A=l.length-1;A>=0;A--){let m=s.createElement(l[A]);for(;u.firstChild;)m.appendChild(u.firstChild);u.appendChild(m),f++}c=u.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(n)}`);let p=e.someProp("clipboardTextSerializer",A=>A(t,e))||t.content.textBetween(0,t.content.size,`