slice-machine-ui 2.21.4 → 2.21.5-alpha.jp-fix-cloudinary-images.2
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/out/404.html +1 -1
- package/out/_next/static/chunks/630-636183c9510c46bf.js +1 -0
- package/out/_next/static/chunks/pages/{_app-8581a6b89588c59f.js → _app-a9e050a020d5f635.js} +1 -1
- package/out/_next/static/{kJwd4Qmiu6cGucomZnT4W → n73_P8aShargaLm277RyK}/_buildManifest.js +1 -1
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
- package/out/slices.html +1 -1
- package/package.json +5 -4
- package/src/domain/fields.ts +17 -17
- package/src/features/builder/StaticFieldsInfoDialog.tsx +1 -1
- package/out/_next/static/chunks/630-7481a0c51302f44a.js +0 -1
- /package/out/_next/static/{kJwd4Qmiu6cGucomZnT4W → n73_P8aShargaLm277RyK}/_ssgManifest.js +0 -0
package/out/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/3283e55967b5b95a.css" as="style"/><link rel="stylesheet" href="/_next/static/css/3283e55967b5b95a.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-b3122714ef005b7d.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/3283e55967b5b95a.css" as="style"/><link rel="stylesheet" href="/_next/static/css/3283e55967b5b95a.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-b3122714ef005b7d.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-a9e050a020d5f635.js" defer=""></script><script src="/_next/static/chunks/pages/_error-fedd2c6ebd3d27b9.js" defer=""></script><script src="/_next/static/n73_P8aShargaLm277RyK/_buildManifest.js" defer=""></script><script src="/_next/static/n73_P8aShargaLm277RyK/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"n73_P8aShargaLm277RyK","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[630],{35289:function(e,t,i){"use strict";i.d(t,{aV:function(){return s},Bu:function(){return c}});var n=i(52322),r=i(15934),l=i(6277),o=i(13834),a=i.n(o);let s=e=>{let{border:t=!0,...i}=e;return(0,n.jsx)("div",{...i,className:(0,l.Z)(a().root,t&&a()["root-border"])})},c=e=>{let{actions:t,children:i,toggle:l,...o}=e;return(0,n.jsxs)("div",{...o,className:a().header,children:[(0,n.jsx)(r.bK,{color:"grey11",component:"span",noWrap:!0,variant:"bold",children:i}),l,t?(0,n.jsx)("div",{className:a().headerActions,children:t}):null]})}},6882:function(e,t,i){"use strict";i.d(t,{$S:function(){return x},$U:function(){return d},BB:function(){return f},Fj:function(){return b},J9:function(){return v},L0:function(){return u},Qr:function(){return n},U:function(){return y},UG:function(){return g},Wc:function(){return p},XU:function(){return k},_M:function(){return h},_n:function(){return m},gA:function(){return o},pG:function(){return r},pV:function(){return c},pt:function(){return l},tg:function(){return s},uG:function(){return a}});let n={name:"Boolean",description:"A true or false toggle.",icon:"toggleOff",thumbnail:"https://images.prismic.io/prismic-main/ieEzahpP-EpI9-KW_type_boolean.png?auto=format,compress",type:"Boolean"},r={name:"Color",description:"A color in hex format.",icon:"colorLens",thumbnail:"https://images.prismic.io/prismic-main/bz_zGdsAYckXsqc4_type_color.png?auto=format,compress",type:"Color"},l={name:"Date",description:"A date without time.",icon:"dateRange",thumbnail:"https://images.prismic.io/prismic-main/z0-OKLWE_aF9hXAK_type_date.png?auto=format,compress",type:"Date"},o={name:"Embed",description:"A video, song, or oEmbed link.",icon:"code",thumbnail:"https://images.prismic.io/prismic-main/2IrjkdJYKXS3vfdC_type_embed.png?auto=format,compress",type:"Embed"},a={name:"Geopoint",description:"A geographical coordinate.",icon:"place",thumbnail:"https://images.prismic.io/prismic-main/5i_heylTaavX1C1E_type_geopoint.png?auto=format,compress",type:"GeoPoint"},s={name:"Image",description:"A responsive image.",icon:"image",thumbnail:"https://images.prismic.io/prismic-main/0nz8-QhHNWmUxhzG_type_image.png?auto=format,compress",type:"Image"},c={name:"Link",description:"A link to a website, asset, or document.",icon:"link",thumbnail:"https://images.prismic.io/prismic-main/Ap-Io5rk-kxYqM3S_type_link.png?auto=format,compress",type:"Link"},d={name:"Content Relationship",description:"A reference to a Prismic document.",icon:"settingsEthernet",thumbnail:"https://images.prismic.io/prismic-main/wzgTn1zMiIkxom1C_type_content_relationship.png?auto=format,compress",type:"Link",variant:"ContentRelationship"},u={name:"Link to Media",description:"A link to a media asset.",icon:"attachFile",thumbnail:"https://images.prismic.io/prismic-main/3FaMwmBsUXaSdGQp_type_linktomedia.png?auto=format,compress",type:"Link",variant:"LinkToMedia"},p={name:"Number",description:"An integer or float.",icon:"pin",thumbnail:"https://images.prismic.io/prismic-main/MPndX7kgT0HQ-qBF_type_number.png?auto=format,compress",type:"Number"},m={name:"Rich Text",description:"Text with formatting options.",icon:"textFields",thumbnail:"https://images.prismic.io/prismic-main/dkaMQ991EZtq5kSg_type_rich_text.png?auto=format,compress",type:"StructuredText"},h={name:"Select",description:"A dropdown of options.",icon:"arrowDropDownCircle",thumbnail:"https://images.prismic.io/prismic-main/xvbbDSy2zZRNA2bW_type_select.png?auto=format,compress",type:"Select"},f={name:"Table",description:"A structured table.",icon:"table",thumbnail:"https://images.prismic.io/prismic-main/yqHK_NMMTt1QKyN6_type_table.png?auto=format,compress",type:"Table"},x={name:"Text",description:"A text string without formatting.",icon:"title",thumbnail:"https://images.prismic.io/prismic-main/-wuqoq2RlNma6-3c_type_key_text.png?auto=format,compress",type:"Text"},g={name:"Timestamp",description:"A date and time.",icon:"schedule",thumbnail:"https://images.prismic.io/prismic-main/TOJIK8TgmgJ9vfOo_type_timestamp.png?auto=format,compress",type:"Timestamp"},v=[s,x,m,n,p,h,c,u,r,l,f,g,o,a,d],b={name:"UID",description:"Unique Identifier",icon:"tag",thumbnail:"https://images.prismic.io/prismic-main/_4WoY4AVS2jZRMqP_type_uid.png?auto=format,compress",type:"UID"},y={name:"Repeatable Group",description:"A set of fields that editors can repeat.",icon:"createNewFolder",thumbnail:"https://images.prismic.io/prismic-main/OpwIlEjhD77fLvWc_type_group.png?auto=format,compress",type:"Group"},j={...y,variant:"NestedGroup"},k=[...v,b,y,j]},34166:function(e,t,i){"use strict";i.d(t,{nZ:function(){return d},rT:function(){return p},tB:function(){return u}});var n=i(52322),r=i(15934),l=i(2784),o=i(30195),a=i(94160),s=i(76611),c=i(5683);function d(e){let{type:t,library:i,sliceId:n,variationId:r,langSmithUrl:l}=e,o=(0,c.iv)({type:t,library:i,sliceId:n,variationId:r}),a=JSON.stringify({langSmithUrl:l});localStorage.setItem(o,a)}function u(e){let{type:t,library:i,sliceId:n,variationId:r}=e,l=(0,c.iv)({type:t,library:i,sliceId:n,variationId:r});localStorage.removeItem(l)}function p(e){let{type:t,library:i,sliceId:d,variationId:u}=e,{key:p,value:m,done:h}=function(e){let{type:t,library:i,sliceId:n,variationId:r}=e,l=(0,c.iv)({type:t,library:i,sliceId:n,variationId:r}),[a,d]=(0,s.V)(l,void 0,{schema:o.z.object({langSmithUrl:o.z.string().url().optional()})});return{key:l,value:a,done:()=>d(void 0)}}({type:t,library:i,sliceId:d,variationId:u}),[f,x]=(0,l.useState)(),g=e=>()=>{m&&(x(p),a.Xe.track({event:"slice-generation-feedback",type:t,sliceId:d,variationId:u,feedback:e,langSmithUrl:m.langSmithUrl}),h())};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.bd,{children:(0,n.jsx)(r.bP,{anchor:(0,n.jsx)(r.D,{width:"100%",justifyContent:"center",position:"absolute",bottom:64}),icon:"check",title:"Thanks for your feedback!",seconds:2,open:!!f,onOpenChange:e=>{e||x(void 0)}},f)}),(0,n.jsx)(r.i,{children:m&&(0,n.jsxs)(r.D,{flexDirection:"row",justifyContent:"end",gap:8,alignItems:"center",children:[(0,n.jsx)(r.bK,{color:"grey11",children:"Did the AI get it right?"}),(0,n.jsxs)(r.D,{flexDirection:"row",gap:4,children:[(0,n.jsx)(r.c2,{side:"bottom",sideOffset:4,variant:"text",content:"Looks good",children:(0,n.jsx)(r.aY,{variant:"solid",size:"small",icon:"thumbUp",onClick:g("up")})}),(0,n.jsx)(r.c2,{side:"bottom",sideOffset:4,variant:"text",content:"Needs improvement",children:(0,n.jsx)(r.aY,{variant:"solid",size:"small",icon:"thumbDown",onClick:g("down")})})]})]})})]})}},23094:function(e,t,i){"use strict";i.d(t,{X:function(){return l}});var n=i(52322),r=i(15934);let l=e=>{let t;let{status:i}=e;switch(i){case"pending":t={icon:(0,n.jsx)(r.bf,{color:"grey11"}),text:"Saving..."};break;case"failed":t={icon:(0,n.jsx)(r.aW,{name:"close",color:"tomato11",size:"medium"}),text:"Failed to save"};break;case"done":t={icon:(0,n.jsx)(r.aW,{name:"check",color:"green11",size:"medium"}),text:"Auto-saved"}}return(0,n.jsxs)(r.D,{gap:8,alignItems:"center",children:[t.icon,(0,n.jsx)(r.bK,{color:"grey11",children:t.text})]})}},6609:function(e,t,i){"use strict";i.d(t,{S:function(){return o}});var n=i(52322),r=i(15934),l=i(6882);function o(e){let{open:t,onOpenChange:i,disabled:o=!1,onSelectField:s,fields:c,triggerDataTestId:d="add-field",trigger:u}=e,p=c.filter(e=>l.J9.some(t=>t.name===e.name)||e.name===l.Fj.name),m=c.find(e=>e.name===l.U.name);return(0,n.jsxs)(r.aq,{open:t,onOpenChange:i,children:[(0,n.jsx)(r.au,{disabled:o,children:null!=u?u:(0,n.jsx)(r.E,{startIcon:"add",color:"grey","data-testid":d,children:"Add a field"})}),(0,n.jsxs)(r.ar,{align:"end",maxHeight:400,collisionPadding:8,children:[(0,n.jsx)(r.at,{children:"Single fields"}),p.map(e=>(0,n.jsx)(a,{field:e,onSelectField:s},e.name)),m&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.at,{children:"Set of fields"}),(0,n.jsx)(a,{field:m,onSelectField:s})]})]})]})}function a(e){let{field:t,onSelectField:i}=e,{type:l,variant:o,name:a,icon:s,description:c,thumbnail:d}=t;return(0,n.jsx)(r.as,{startIcon:(0,n.jsx)(r.aW,{name:s,size:"large"}),description:c,onSelect:()=>i(null!=o?o:l),renderTooltip:e=>(0,n.jsx)(r.c2,{visible:!0,variant:"custom",content:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.aZ,{src:d,borderRadius:4,sx:{height:170,width:278},animateOnLoad:!1}),(0,n.jsx)(r.bK,{color:"white",children:"How it will look for content editors."})]}),align:"start",side:"left",sideOffset:4,animation:"none",children:e}),children:a},"".concat(l).concat(o?"-".concat(o):""))}},41347:function(e,t,i){"use strict";i.d(t,{zE:function(){return c},Vg:function(){return j},WP:function(){return F}});var n=i(52322),r=i(47124),l=i(15934),o=i(2784),a=i(50477),s=i(87446);function c(e){return(0,n.jsx)(s.h,{renderError:()=>(0,n.jsxs)(l.D,{alignItems:"center",gap:8,children:[(0,n.jsx)(l.aW,{name:"alert",size:"small",color:"tomato10"}),(0,n.jsx)(l.bK,{color:"tomato10",children:"Error loading your types"})]}),children:(0,n.jsx)(l.bA,{fallback:(0,n.jsxs)(l.D,{flexDirection:"column",position:"relative",children:[(0,n.jsx)(l.bw,{height:240}),(0,n.jsxs)(l.D,{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",alignItems:"center",gap:8,children:[(0,n.jsx)(l.aW,{name:"autorenew",size:"small",color:"grey11"}),(0,n.jsx)(l.bK,{color:"grey11",children:"Loading your types..."})]})]}),children:(0,n.jsx)(d,{...e})})})}function d(e){let{value:t,onChange:i}=e,{allCustomTypes:r,pickedCustomTypes:s}=function(e){let{customTypes:t}=(0,a.xU)();if((0,o.useEffect)(()=>{(0,a.NG)()},[]),!e)return{allCustomTypes:t,pickedCustomTypes:[]};let i=e.flatMap(e=>{var i;return null!==(i=t.find(t=>t.id===M(e)))&&void 0!==i?i:[]});return{allCustomTypes:t,pickedCustomTypes:i}}(t),c=t?j({linkCustomtypes:t,allCustomTypes:r}):{};return(0,n.jsxs)(l.D,{overflow:"hidden",flexDirection:"column",border:!0,borderRadius:6,width:"100%",children:[(0,n.jsx)(l.D,{border:{bottom:!0},padding:{inline:16,bottom:16,top:12},flexDirection:"column",gap:8,children:s.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.D,{flexDirection:"column",children:[(0,n.jsx)(l.bK,{variant:"h4",color:"grey12",children:"Allowed type"}),(0,n.jsxs)(l.bK,{color:"grey11",children:["Select a single type that editors can link to in the Page Builder.",(0,n.jsx)("br",{}),"For the selected type, choose which fields to include in the API response."]}),s.length>1&&(0,n.jsx)(l.D,{margin:{block:12},children:(0,n.jsx)(l.f,{color:"warn",icon:"alert",subtitle:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.bK,{color:"inherit",variant:"bold",children:"Legacy mode. Keep only one type to enable the improved Content Relationship feature."}),(0,n.jsx)("br",{}),(0,n.jsxs)("a",{href:"https://prismic.io/docs/fields/content-relationship",target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"none",fontWeight:"bold",display:"flex",alignItems:"center",gap:4},children:[(0,n.jsx)(l.bK,{color:"inherit",variant:"bold",children:"See documentation"}),(0,n.jsx)(l.aW,{name:"arrowForward",size:"small",color:"inherit"})]})]})})})]}),s.map(e=>{var o;return(0,n.jsxs)(l.D,{gap:4,padding:8,border:!0,borderRadius:6,borderColor:"grey6",backgroundColor:"white",justifyContent:"space-between",children:[s.length>1?(0,n.jsx)(l.bK,{children:e.id}):(0,n.jsx)(l.c4,{children:(0,n.jsx)(m,{customType:e,onChange:n=>{i(function(e){let{linkCustomtypes:t,fieldCheckMap:i,newCustomType:n,customTypeId:r}=e,l=[],o=Object.entries({...i,[r]:n}).flatMap(e=>{let[t,i]=e,n=Object.entries(i).flatMap(e=>{let[t,i]=e;if("group"===i.type){let e=Object.entries(i.value).flatMap(e=>{let[t,i]=e;if("checkbox"===i.type)return i.value?t:[];let n=C(i.value);return n.length>0?{id:t,customtypes:n}:[]});return e.length>0?{id:t,fields:e}:[]}if("contentRelationship"===i.type){let e=C(i.value);return e.length>0?{id:t,customtypes:e}:[]}return i.value?t:[]});return n.length>0?{id:t,fields:n}:[]});if(!t)return o;for(let e of t){let t=o.find(t=>M(t)===M(e));void 0!==t?l.push(t):M(e)===r?l.push(M(e)):l.push(e)}return l}({fieldCheckMap:c,newCustomType:n,linkCustomtypes:t,customTypeId:e.id}))},fieldCheckMap:null!==(o=c[e.id])&&void 0!==o?o:{},allCustomTypes:r})}),(0,n.jsx)(l.aY,{icon:"close",size:"small",onClick:()=>{var n;return n=e.id,void(t&&i(t.filter(e=>M(e)!==n)))},sx:{height:24,width:24},hiddenLabel:"Remove type"})]},e.id)})]}):(0,n.jsx)(u,{onSelect:function(e){i(t?[...t,e]:[e])},allCustomTypes:r})}),(0,n.jsx)(l.D,{backgroundColor:"white",flexDirection:"column",padding:12,children:(0,n.jsxs)(l.bK,{variant:"normal",color:"grey11",children:["Have ideas for improving this field?"," ",(0,n.jsx)("a",{href:"https://community.prismic.io/t/content-relationship-share-your-requests-and-feedback/19843",target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline"},children:"Please provide your feedback here"}),"."]})})]})}function u(e){let{allCustomTypes:t,onSelect:i}=e;return(0,n.jsxs)(l.D,{flexDirection:"column",gap:8,alignItems:"center",padding:{block:24},children:[(0,n.jsxs)(l.D,{flexDirection:"column",alignItems:"center",gap:4,children:[(0,n.jsx)(l.bK,{variant:"h5",color:"grey12",children:"No type selected"}),(0,n.jsxs)(l.bK,{color:"grey11",component:"p",align:"center",children:["Select the type editors can link to.",(0,n.jsx)("br",{}),"Then, choose which fields to return in the API."]})]}),(0,n.jsx)(l.D,{children:(0,n.jsx)(p,{allCustomTypes:t,onSelect:i})})]})}function p(e){let{allCustomTypes:t,onSelect:i}=e,r=(0,n.jsx)(l.E,{startIcon:"add",color:"grey",disabled:0===t.length,children:"Add type"});return 0===t.length?(0,n.jsx)(l.D,{children:(0,n.jsx)(l.c2,{content:"No type available",side:"bottom",align:"start",disableHoverableContent:!0,children:r})}):(0,n.jsx)(l.D,{children:(0,n.jsxs)(l.aq,{children:[(0,n.jsx)(l.au,{children:r}),(0,n.jsxs)(l.ar,{maxHeight:400,minWidth:256,align:"center",children:[(0,n.jsx)(l.at,{children:(0,n.jsx)(l.bK,{color:"grey11",children:"Types"})}),t.map(e=>(0,n.jsx)(l.as,{onSelect:()=>i(e.id),children:(0,n.jsxs)(l.D,{alignItems:"center",justifyContent:"space-between",gap:8,children:[(0,n.jsx)(l.bN,{children:(0,n.jsx)(l.bK,{children:e.id})}),(0,n.jsx)(l.m,{title:(0,n.jsx)(l.bK,{variant:"extraSmall",color:"purple11",children:b(e.format)}),color:"purple",size:"small"})]})},e.id))]})]})})}function m(e){let{customType:t,fieldCheckMap:i,onChange:r,allCustomTypes:o}=e,a=w(t).map(e=>{var t,a,s;let[c,d]=e;if("Group"===d.type){let e=null!==(a=i[c])&&void 0!==a?a:{};return(0,n.jsx)(g,{group:d,groupId:c,onChange:e=>{r({...i,[c]:{type:"group",value:e}})},fieldCheckMap:"group"===e.type?e.value:{},allCustomTypes:o},c)}if(_(d,o)){let e=null!==(s=i[c])&&void 0!==s?s:{};return(0,n.jsx)(h,{field:d,fieldId:c,onChange:e=>{r({...i,[c]:{type:"contentRelationship",value:e}})},fieldCheckMap:"contentRelationship"===e.type?e.value:{},allCustomTypes:o},c)}return(0,n.jsx)(l.c5,{title:c,checked:(null===(t=i[c])||void 0===t?void 0:t.value)===!0,onCheckedChange:e=>{r({...i,[c]:{type:"checkbox",value:e}})}},c)}),s=F(i);return(0,n.jsx)(l.c6,{title:t.id,subtitle:s.pickedFields>0?v(s.pickedFields,"returned in the API"):"(No fields returned in the API)",badge:b(t.format),defaultOpen:!0,children:a.length>0?a:(0,n.jsx)(f,{})},t.id)}function h(e){var t,i;let{field:r,fieldId:o,fieldCheckMap:a,onChange:s,allCustomTypes:c}=e,[d]=y(null===(t=r.config)||void 0===t?void 0:t.customtypes,c),u=e=>{s({...a,[d.id]:e})},p=null!==(i=a[d.id])&&void 0!==i?i:{},m=w(d).map(e=>{var t,i;let[r,o]=e;if("Group"===o.type){let e=null!==(i=p[r])&&void 0!==i?i:{};return(0,n.jsx)(x,{group:o,groupId:r,onChange:e=>{u({...p,[r]:{type:"group",value:e}})},fieldCheckMap:"group"===e.type?e.value:{}},r)}return(0,n.jsx)(l.c5,{title:r,checked:(null===(t=p[r])||void 0===t?void 0:t.value)===!0,onCheckedChange:e=>{u({...p,[r]:{type:"checkbox",value:e}})}},r)});return(0,n.jsx)(l.c6,{title:(0,n.jsxs)(l.bK,{children:[o," ",(0,n.jsxs)(l.bK,{color:"grey11",children:["→ ",d.id]})]}),subtitle:v(F(p).pickedFields),badge:b(d.format),children:m.length>0?m:(0,n.jsx)(f,{})},d.id)}function f(){return(0,n.jsx)(l.bK,{color:"grey11",children:"No available fields to select"})}function x(e){let{group:t,groupId:i,fieldCheckMap:r,onChange:o}=e,a=E(t).map(e=>{var t;let{fieldId:i}=e;return(0,n.jsx)(l.c5,{title:i,checked:(null===(t=r[i])||void 0===t?void 0:t.value)===!0,onCheckedChange:e=>{o({...r,[i]:{type:"checkbox",value:e}})}},i)});return(0,n.jsx)(l.c6,{title:i,subtitle:v(F(r).pickedFields),badge:"Group",children:a.length>0?a:(0,n.jsx)(f,{})},i)}function g(e){let{group:t,groupId:i,fieldCheckMap:r,onChange:o,allCustomTypes:a}=e,s=E(t).map(e=>{var t,i;let{fieldId:s,field:c}=e;if(_(c,a)){let e=null!==(i=r[s])&&void 0!==i?i:{};return(0,n.jsx)(h,{field:c,fieldId:s,fieldCheckMap:"contentRelationship"===e.type?e.value:{},onChange:e=>{o({...r,[s]:{type:"contentRelationship",value:e}})},allCustomTypes:a},s)}return(0,n.jsx)(l.c5,{title:s,checked:(null===(t=r[s])||void 0===t?void 0:t.value)===!0,onCheckedChange:e=>{o({...r,[s]:{type:"checkbox",value:e}})}},s)});return(0,n.jsx)(l.c6,{title:i,subtitle:v(F(r).pickedFields),badge:"Group",children:s.length>0?s:(0,n.jsx)(f,{})},i)}function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"selected";if(0!==e)return"(".concat(e," ").concat((0,r._6)(e,"field","fields")," ").concat(t,")")}function b(e){return"page"===e?"Page type":"Custom type"}function y(e,t){return e?e.flatMap(e=>{var i;return null!==(i=t.find(t=>t.id===M(e)))&&void 0!==i?i:[]}):[]}function j(e){let{linkCustomtypes:t,allCustomTypes:i}=e,n=void 0!==i;return t.reduce((e,t)=>{if("string"==typeof t)return e;let r={};if(n){let n=i.find(e=>e.id===t.id);if(!n)return e;r=S(n)}let l=t.fields.reduce((e,t)=>{let l=r[M(t)];if(n&&void 0===l)return e;if("string"==typeof t)return n&&void 0!==l&&"Group"===l.type||(e[t]={type:"checkbox",value:!0}),e;if("fields"in t&&void 0!==t.fields){if(n&&void 0!==l&&"Group"!==l.type)return e;let o=function(e){let{group:t,ctFlatFieldMap:i,allCustomTypes:n}=e,r=void 0!==n,l=t.fields.reduce((e,l)=>{let o=T(i,t.id,M(l));if(r&&!o)return e;if("string"==typeof l)return r&&void 0!==o&&"Group"===o.type||(e[l]={type:"checkbox",value:!0}),e;if("customtypes"in l&&void 0!==l.customtypes){if(r&&void 0!==o&&!I(o))return e;let t=k({field:l,allCustomTypes:n});t&&(e[l.id]=t)}return e},{});if(0!==Object.keys(l).length)return{type:"group",value:l}}({group:t,allCustomTypes:i,ctFlatFieldMap:r});return o&&(e[t.id]=o),e}if("customtypes"in t&&void 0!==t.customtypes){if(n&&void 0!==l&&!I(l))return e;let r=k({field:t,allCustomTypes:i});r&&(e[t.id]=r)}return e},{});return Object.keys(l).length>0&&(e[t.id]=l),e},{})}function k(e){let{field:t,allCustomTypes:i}=e,n=void 0!==i,r=t.customtypes.reduce((e,t)=>{if("string"==typeof t)return e;let r={};if(n){let n=i.find(e=>e.id===t.id);if(!n)return e;r=S(n)}let l=t.fields.reduce((e,t)=>{if("string"==typeof t){let i=r[t];return n&&(void 0===i||"Group"===i.type)||(e[t]={type:"checkbox",value:!0}),e}if("fields"in t&&void 0!==t.fields){let i=t.fields.reduce((e,i)=>{let l=T(r,t.id,i);return n&&(void 0===l||"Group"===l.type)||(e[i]={type:"checkbox",value:!0}),e},{});Object.keys(i).length>0&&(e[t.id]={type:"group",value:i})}return e},{});return Object.keys(l).length>0&&(e[t.id]=l),e},{});if(0!==Object.keys(r).length)return{type:"contentRelationship",value:r}}function C(e){return Object.entries(e).flatMap(e=>{let[t,i]=e,n=Object.entries(i).flatMap(e=>{let[t,i]=e;if("group"===i.type){let e=Object.entries(i.value).flatMap(e=>{let[t,i]=e;return"checkbox"===i.type&&i.value?t:[]});return e.length>0?{id:t,fields:e}:[]}return i.value?t:[]});return n.length>0?{id:t,fields:n}:[]})}function F(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?Object.values(e).reduce((e,i)=>{if(!function(e){if("object"!=typeof e||null===e||Array.isArray(e)||e instanceof Date||e instanceof RegExp||e instanceof Error)return!1;for(let t in e)if("string"!=typeof t||!Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(i))return e;if("type"in i&&"checkbox"===i.type)return i.value?{pickedFields:e.pickedFields+1,nestedPickedFields:e.nestedPickedFields+(t?1:0)}:e;if("type"in i&&"contentRelationship"===i.type){let{pickedFields:t,nestedPickedFields:n}=F(i,!0);return{pickedFields:e.pickedFields+t,nestedPickedFields:e.nestedPickedFields+n}}let{pickedFields:n,nestedPickedFields:r}=F(i,t);return{pickedFields:e.pickedFields+n,nestedPickedFields:e.nestedPickedFields+r}},{pickedFields:0,nestedPickedFields:0}):{pickedFields:0,nestedPickedFields:0}}function I(e){var t;return"Link"===e.type&&(null===(t=e.config)||void 0===t?void 0:t.select)==="document"}function _(e,t){var i;return I(e)&&1===y(null===(i=e.config)||void 0===i?void 0:i.customtypes,t).length}function w(e){return Object.values(e.json).flatMap(e=>Object.entries(e).flatMap(e=>{let[t,i]=e;return"Slices"!==i.type&&"Choice"!==i.type&&"UID"!==i.type&&"uid"!==t?[[t,i]]:[]}))}function S(e){return Object.fromEntries(w(e))}function T(e,t,i){var n,r;let l=e[t];if(void 0!==l&&"Group"===l.type)return null===(r=l.config)||void 0===r?void 0:null===(n=r.fields)||void 0===n?void 0:n[i]}function E(e){var t;return(null===(t=e.config)||void 0===t?void 0:t.fields)?Object.entries(e.config.fields).map(e=>{let[t,i]=e;return{fieldId:t,field:i}}):[]}function M(e){return"string"==typeof e?e:e.id}},38193:function(e,t,i){"use strict";i.d(t,{Z:function(){return s}});var n=i(52322),r=i(61183);i(2784);var l=i(59326),o=i(75289);r.Z.registerLanguage("svelte",e=>({subLanguage:"xml",contains:[e.COMMENT("<!--","-->",{relevance:10}),{begin:/^(\s*)(<script(\s*context="module")?>)/gm,end:/^(\s*)(<\/script>)/gm,subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,contains:[{begin:/^(\s*)(\$:)/gm,end:/(\s*)/gm,className:"keyword"}]},{begin:/^(\s*)(<style.*>)/gm,end:/^(\s*)(<\/style>)/gm,subLanguage:"css",excludeBegin:!0,excludeEnd:!0},{begin:/\{/gm,end:/\}/gm,subLanguage:"javascript",contains:[{begin:/[\{]/,end:/[\}]/,skip:!0},{begin:/([#:\/@])(if|else|each|await|then|catch|debug|html)/gm,className:"keyword",relevance:10}]}]}));let a=["javascript","bash","xml","html","json"];var s=e=>{var t;let{children:i,lang:s,sx:c,codeStyle:d,codeClass:u,Header:p}=e,{theme:m}=(0,l.B7)(),h=s?r.Z.highlight(i,{language:"vue"===s?"html":s}).value:r.Z.highlightAuto(i,a).value;return(0,n.jsxs)(o.kC,{as:"pre",sx:c,children:[p?(0,n.jsx)(p,{}):null,(0,n.jsx)("code",{className:"hljs".concat(u?" ".concat(u):""),style:{overflowX:"auto",padding:"3px 5px",borderRadius:"6px",border:"1px solid",borderColor:String(null===(t=m.colors)||void 0===t?void 0:t.textClear),...d},dangerouslySetInnerHTML:{__html:h}})]})}},80575:function(e,t,i){"use strict";i.d(t,{J:function(){return o},k:function(){return l}});var n=i(52322);i(2784);var r=i(75289);let l=e=>{let{children:t,sx:i,...l}=e;return(0,n.jsx)(r.xu,{sx:{display:["block","block","flex"],flexWrap:"wrap",justifyContent:"space-between",...i},...l,children:t})},o=e=>{let{children:t,cols:i=2}=e;return(0,n.jsx)(r.xu,{sx:{flex:"0 ".concat(100/i-1,"%"),mb:1},children:t})}},90167:function(e,t,i){"use strict";i.d(t,{kp:function(){return c},sP:function(){return d},w8:function(){return u},Hq:function(){return m}});var n,r,l=i(52322),o=i(63397),a=i(2784),s=i(75289),c=e=>{let{field:t,meta:i,fieldName:n,label:r,focusOnNewEntry:c=!0,inputPlaceholder:d,buttonLabel:u}=e,[p,m]=(0,a.useState)(i.value.length),h=(0,a.useRef)(Array(i.value.length));return(0,a.useEffect)(()=>{h.current=h.current.slice(0,i.value.length)},[i.value.length]),(0,a.useEffect)(()=>{let e=h.current.length;c&&e>p&&h.current[e-1].focus(),m(e)},[h.current.length,c,p]),(0,l.jsxs)(a.Fragment,{children:[(0,l.jsxs)(s.__,{variant:"label.primary",htmlFor:n,children:[r,i.touched&&i.error?(0,l.jsx)(s.xv,{as:"span",variant:"text.labelError",children:i.error}):null]}),(0,l.jsx)(o.F2,{name:n,id:n,...t,render:e=>(0,l.jsxs)("div",{children:[t.value&&t.value.length>0?t.value.map((t,i)=>(0,l.jsxs)(s.kC,{my:2,children:[(0,l.jsx)(s.II,{placeholder:d,name:"".concat(n,".").concat(i),value:t,ref:e=>h.current[i]=e,onChange:t=>{let{target:{value:n}}=t;return e.replace(i,n)}}),(0,l.jsx)(s.zx,{ml:2,type:"button",variant:"secondary",onClick:()=>e.remove(i),children:"-"})]},"".concat(n,"-").concat(+i+1))):null,(0,l.jsx)(s.zx,{type:"button",onClick:()=>e.insert(t.value.length,""),children:u})]})})]})},d=e=>{let{initialValues:t,meta:i,label:n,fieldName:r,onChange:a,...c}=e;return(0,l.jsxs)(s.__,{variant:"label.border",...c,children:[(0,l.jsx)(o.gN,{as:s.XZ,type:"checkbox",name:r,onChange:()=>a(!i.value),checked:i.value}),n]})},u=e=>{let{field:t,label:i,defaultValue:n,onChange:r,controlledValue:o,setControlledValue:s,buildControlledValue:c}=e,[u,p]=(0,a.useState)(n||t.defaultValue||!1);return(0,a.useEffect)(()=>{c?s(c(o,u)):s(c)},[u,o,c]),(0,l.jsx)(d,{meta:{value:u},fieldName:t.name,onChange:e=>p(e)&&r&&r(e),label:"function"==typeof i?i(o,u):i})};(n=r||(r={}))[n.ERROR=0]="ERROR",n[n.DISABLED=1]="DISABLED",n[n.WARNING=2]="WARNING";let p=e=>{let t={"&::placeholder":{color:"#C9D0D8"}};switch(e){case 1:return{...t,border:"1px solid #E6E6EA",backgroundColor:"#F3F5F7"};case 0:return{...t,border:"1px solid #E26049","&:focus":{outline:"none",borderColor:"#E26049",boxShadow:"0 0 0 3px rgba(226, 96, 73, 0.2), inset 0 1px 2px rgba(226, 96, 73, 0.2)"}};case 2:return{...t,border:"1px solid orange","&:focus":{outline:"none",borderColor:"orange",boxShadow:"0 0 0 3px rgba(255, 165, 0, 0.2), inset 0 1px 2px rgba(255, 165, 0, 0.2)"}};default:return t}},m=e=>{let{sx:t={},field:i,meta:n,formField:r,fieldName:a,fields:c,initialValues:d,isDisabled:u,autoFocus:m}=e,h=n.error?0:u||r.disabled?1:void 0;return(0,l.jsxs)(s.xu,{sx:t,children:[(0,l.jsxs)(s.__,{variant:"label.primary",htmlFor:a,children:[r.label||a,n.touched&&n.error?(0,l.jsx)(s.xv,{as:"span",variant:"text.labelError",children:n.error}):null]}),(0,l.jsx)(o.gN,{id:a,name:a,type:"text",placeholder:r.placeholder||r.label||a,...r.fieldLevelValidation&&d?{validate:e=>r.fieldLevelValidation&&r.fieldLevelValidation({value:e,fields:c,initialId:d.id})}:null,...i,as:s.II,sx:p(h),disabled:u||r.disabled,autoFocus:null!=m?m:r.autoFocus})]})}},70705:function(e,t,i){"use strict";var n=i(52322),r=i(2784),l=i(75289);let o=(0,r.forwardRef)((e,t)=>{let{children:i,Component:r=l.kC,sx:o={},...a}=e;return(0,n.jsx)(r,{as:"li",sx:{p:3,mx:3,alignItems:"center",variant:"styles.listItem",...o},ref:t,...a,children:i})});t.Z=o},86355:function(e,t,i){"use strict";i.d(t,{Z:function(){return j}});var n=i(52322),r=i(15934),l=i(5446),o=i(2784),a=i(40023),s=i(951),c=i(8799),d=i(18978),u=i(59326),p=i(75289),m=i(70705),h=i(66770),f=i(33710),x=i(28316),g=i(65077);let v=e=>{let{children:t}=e;return(0,x.createPortal)((0,n.jsx)(g.xR,{children:t}),document.body)},b=e=>{let{text:t,as:i,sx:r={},...l}=e,a=(0,o.useRef)(null),[s,c]=(0,o.useState)(null),d=()=>{c(a.current&&a.current.offsetWidth<a.current.scrollWidth)};return(0,o.useEffect)(()=>(d(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d)}),[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.xv,{"data-for":t,"data-tip":!0,sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...r},as:i,ref:a,...l,children:t}),s&&(0,n.jsx)(v,{children:(0,n.jsx)(f.Z,{id:t,type:"dark",multiline:!0,border:!0,borderColor:"black",place:"bottom",effect:"solid",children:t})})]})};var y=e=>{var t,i;let{text:l,sliceFieldName:o,theme:a,WidgetIcon:s,widgetIconTooltip:c}=e;return(0,n.jsxs)(p.kC,{sx:{alignItems:"center",position:"relative"},children:[(0,n.jsx)(r.c2,{content:c,sideOffset:2,disableHoverableContent:!0,children:(0,n.jsx)(r.D,{margin:{right:8},children:(0,n.jsx)(s,{size:28,style:{color:null===(t=a.colors)||void 0===t?void 0:t.primary,borderRadius:"4px",padding:"4px",border:"2px solid",borderColor:null===(i=a.colors)||void 0===i?void 0:i.primary,flexShrink:0}})})}),(0,n.jsx)(b,{text:l,as:"p",sx:{py:0,px:1,fontWeight:"label",fontSize:"15px"},"data-testid":"field-name"}),(0,n.jsx)(p.xv,{as:"p",sx:{display:["none","none","initial"],fontSize:"14px",ml:1,color:"textClear",overflow:"hidden",textOverflow:"ellipsis"},"data-testid":"field-id",children:o})]})},j=function(e){let{item:t,index:i,deleteItem:f,enterEditMode:x,modelFieldName:g,renderFieldAccessor:v,HintElement:b,CustomEditElement:j,CustomEditElements:k,widget:C,draggableId:F,testId:I,isRepeatableCustomType:_,children:w}=e,{theme:S}=(0,u.B7)(),{key:T,value:{config:E,type:M}}=t,D=!!(("Link"===M||"Group"===M)&&(null==E?void 0:E.repeat));return(0,n.jsx)(o.Fragment,{children:(0,n.jsx)(a._l,{draggableId:F,index:i,children:e=>{var a,u,F,A,N;return(0,n.jsx)(o.Fragment,{children:(0,n.jsxs)(m.Z,{"data-testid":I,ref:e.innerRef,...e.draggableProps,Component:p.xu,sx:{p:0,mx:0,my:3},children:[(0,n.jsxs)(p.kC,{sx:{width:"100%"},children:[(0,n.jsx)(h.Z,{label:"Reorder slice field (drag and drop)",Icon:d.Fm7,color:null===(a=S.colors)||void 0===a?void 0:a.icons,mr:1,mt:3,...e.dragHandleProps}),(0,n.jsxs)(p.xu,{sx:{bg:"headSection",width:"100%",borderRadius:"3px",border:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))}},children:[(0,n.jsxs)(p.kC,{sx:{p:3,alignItems:"center",justifyContent:"space-between",width:"100%"},children:[(0,n.jsx)(y,{theme:S,text:(null==E?void 0:E.label)||T,sliceFieldName:v&&v(T),WidgetIcon:C.Meta.icon,widgetIconTooltip:C.label}),(0,n.jsxs)(p.kC,{sx:{flex:"0 0 auto"},children:[D&&(0,n.jsx)(r.m,{title:"Repeatable",color:"purple",size:"medium",sx:{alignSelf:"center",marginInline:16}}),k||null,j||(0,n.jsx)(h.Z,{size:22,Icon:s.$iz,label:"Edit field",sx:{cursor:"pointer",color:null===(u=S.colors)||void 0===u?void 0:u.icons,flexShrink:0},onClick:()=>x([T,t.value],g,i)}),!(!0===_&&"UID"==M)&&(0,n.jsxs)(l.v2,{children:[(0,n.jsx)(l.j2,{className:"sliceMenuButton","data-testid":"field-menu-button",style:{padding:"0",cursor:"pointer",width:"32px",height:"32px",border:"none",background:"transparent",outline:"0"},children:(0,n.jsx)(c.FQA,{size:20,color:null===(F=S.colors)||void 0===F?void 0:F.icons,style:{pointerEvents:"none"}})}),(0,n.jsx)(l.qy,{style:{background:null===(A=S.colors)||void 0===A?void 0:A.gray,border:"1px solid",borderRadius:"3px",borderColor:null===(N=S.colors)||void 0===N?void 0:N.borders,outline:"0"},children:(0,n.jsx)(l.sN,{style:{padding:"6px",cursor:"pointer"},onSelect:()=>f(T),children:"Delete field"})})]})]})]}),b||null]})]}),w]})})}})})}},66770:function(e,t,i){"use strict";var n=i(52322),r=i(75289);let l=(e,t)=>t?{border:e=>{let{colors:t}=e;return"1px solid ".concat(t.error)}}:e?{border:e=>{let{colors:t}=e;return"1px solid ".concat(t.primary)}}:{border:e=>{let{colors:t}=e;return"1px solid ".concat(t.borders)}};t.Z=e=>{let{sx:t=null,onClick:i=()=>null,label:o,Icon:a,error:s=null,size:c=16,fitButton:d=!1,active:u=!1,useActive:p=!1,activeSx:m=l,...h}=e;return(0,n.jsx)(r.hU,{onClick:i,"aria-label":o,type:"button",sx:{...d?{width:c,height:c}:null,...p&&m(u,s),...t},...h,children:(0,n.jsx)(a,{size:c})})}},89280:function(e,t,i){"use strict";var n=i(52322),r=i(63397),l=i(2784),o=i(75289),a=i(90167),s=i(79256);t.Z=e=>{let{fieldName:t,formField:i,fields:c,initialValues:d,autoFocus:u}=e,[p,m,h]=(0,r.U$)(t),f=i.component;return(0,n.jsx)(o.xu,{sx:{mt:2,alignItems:"center",...i.type===s.h.CHECKBOX?{display:"flex",height:"130%"}:null},children:f?(0,n.jsx)(f,{meta:m,field:p,helpers:h,fieldName:t,formField:i,initialValues:d}):(0,n.jsxs)(l.Fragment,{children:[i.type===s.h.INPUT?(0,n.jsx)(a.Hq,{meta:m,field:p,fields:c,formField:i,fieldName:t,initialValues:d,autoFocus:u}):null,i.type===s.h.CHECKBOX&&(0,n.jsx)(a.sP,{meta:m,label:i.label,fieldName:t,initialValues:d,onChange:e=>h.setValue(e)})]})})}},3285:function(e,t,i){"use strict";i.d(t,{Z:function(){return O}});var n=i(52322),r=i(37149),l=i.n(r),o=i(56580),a=i(59326),s=i(75289),c=i(65413),d=i(30527),u=i(2784),p=i(92928);let m=e=>{let{children:t,...i}=e;return(0,n.jsx)(s.xu,{as:"ul",sx:{p:0,m:0,px:e=>"calc(".concat(e.space[3],"px + 8px)"),borderBottom:"1px solid #DFE1E5",position:"relative"},...i,children:t})};m.tabsRole="TabList";let h=e=>{let{children:t,...i}=e,{theme:r}=(0,a.B7)();return(0,n.jsx)(p.OK,{...i,style:{margin:"0 32px 0 0",top:"0",padding:"8px 0px",border:"none",bottom:"-1px",opacity:"0.8",transition:"all 150ms cubic-bezier(0.215,0.60,0.355,1)",borderRadius:"0",...i.selected?{borderBottom:"3px solid ".concat(r.colors.primary),color:r.colors.text,fontWeight:"500",opacity:"1",backgroundColor:"transparent"}:{borderBottom:"3px solid transparent"}},children:t})};h.tabsRole="Tab";var f=(0,u.memo)(e=>{let{children:t,Footer:i,Header:r,tabs:l,bodySx:o,footerSx:a,defaultIndex:c=0}=e,[f,x]=(0,u.useState)(c);return(0,n.jsx)(d.Z,{borderFooter:!0,footerSx:{p:0,...a},bodySx:{p:0,...o},sx:{border:"none"},Header:r,Footer:i,children:(0,n.jsxs)(p.mQ,{defaultIndex:c,onSelect:e=>x(e),children:[(0,n.jsx)(m,{children:(l||[]).map(e=>(0,n.jsx)(h,{children:e},e))}),u.Children.map(t,(e,t)=>(0,n.jsx)(s.xu,{sx:{p:e=>"calc(".concat(e.space[3],"px + 8px)"),display:t===f?"block":"none"},children:(0,n.jsx)(p.x4,{children:e})}))]})})}),x=i(80575),g=e=>{var t,i;let{text:r,sliceFieldName:l,theme:o,WidgetIcon:a}=e;return(0,n.jsxs)(s.kC,{sx:{alignItems:"center"},children:[(0,n.jsx)(a,{size:28,style:{color:null===(t=o.colors)||void 0===t?void 0:t.primary,marginRight:"8px",borderRadius:"4px",padding:"4px",border:"2px solid",borderColor:null===(i=o.colors)||void 0===i?void 0:i.primary}}),(0,n.jsx)(s.xv,{as:"p","data-testid":"item-header-text",sx:{py:0,px:1,fontWeight:"label",fontSize:"15px"},children:r}),(0,n.jsx)(s.xv,{as:"p",sx:{display:["none","none","initial"],fontSize:"14px",ml:1,color:"textClear"},children:l})]})},v=i(55862),b=i(68169),y=i(5632),j=i(65186),k=i(7974);let C=()=>{let e=(0,y.useRouter)();return(0,n.jsxs)(s.xu,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:"60px"},children:[(0,n.jsx)(j.wr$,{size:48,color:"#C9D0D8"}),(0,n.jsx)(s.xu,{sx:{height:"12px"}}),(0,n.jsx)(s.xv,{color:"text",sx:{fontWeight:600,fontSize:"24px",lineHeight:"32px",textAlign:"center"},children:"Your mock data has moved"}),(0,n.jsx)(s.xu,{sx:{height:"8px"}}),(0,n.jsx)(s.xv,{color:"text",sx:{fontWeight:400,fontSize:"14px",lineHeight:"24px",textAlign:"center"},children:"You can now edit directly your mock data in the new Slice Simulator."}),(0,n.jsx)(s.xu,{sx:{height:"24px"}}),(0,n.jsx)(s.zx,{onClick:t=>{t.preventDefault(),window.open("".concat(e.asPath,"/simulator"),k.pq)},children:"Go to the Slice Simulator"})]})};var F=i(16442),I=i(45440),_=i(16086),w=i(78254),S=i(23134),T=i(89280),E=i(63397),M=i(358);function D(){let[{value:e}]=(0,E.U$)("config.label"),[{value:t},i,n]=(0,E.U$)("id"),r=(0,u.useRef)(null!=i.initialValue&&i.initialValue.length>0);(0,u.useEffect)(()=>{r.current||null==e||n.setValue((0,M.lV)(e),!1)},[e]),(0,u.useEffect)(()=>{let i=null==t||0===t.length;if(r.current){if(!i)return;r.current=!1}else i||null!=e&&t===(0,M.lV)(e)||(r.current=!0)},[t])}var A=(0,u.memo)(e=>{let{formId:t,initialValues:i,validationSchema:r,onSave:l,FormFields:o,children:a}=e;return(0,n.jsx)(s.xu,{children:(0,n.jsx)(E.J9,{initialValues:i,validationSchema:r,onSubmit:(e,t)=>{let{id:i,...n}=e;l({newKey:i,value:Object.entries(n).reduce((e,t)=>{let[i,n]=t;if(typeof n!==Boolean&&!n){var r;let t=null===(r=o[i])||void 0===r?void 0:r.defaultValue;if(void 0!==t)return{...e,[i]:t}}return{...e,[i]:n}},{})})},children:e=>(0,n.jsxs)(E.l0,{id:t,children:[(0,n.jsx)(D,{}),a({...e,initialValues:i})]})})})});function N(e){let{children:t}=e,i=(0,d.W)();return(0,n.jsx)(s.kC,{sx:{position:"sticky",zIndex:1,top:0,p:3,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:i,borderTopRightRadius:i},children:t})}l().setAppElement("#__next");var O=e=>{let{close:t,data:i,fields:r,onSave:l,zoneType:d}=e,{theme:u}=(0,a.B7)(),p=(0,o.v9)(w.Ch).filter(F.TG);if(!i.isOpen)return null;let{field:[m,h]}=i,y=(0,S.t)(I.C,h.config,h.type);if(!y)return(0,n.jsxs)("div",{children:[h.type," not found"]});let{Meta:{icon:j},FormFields:k,Form:E,schema:M,label:D}=y,O={...(0,b.f7)((0,_.B9)(k,"id")),...y.prepareInitialValues?y.prepareInitialValues(p,h.config):h.config},{res:L,err:R}=(()=>{try{return{res:M.validateSync({type:h.type,config:O},{stripUnknown:!0})}}catch(e){return{err:e}}})();R&&(console.error("[EditModal] Failed to validate field of type ".concat(h.type,".\n Please update model.json accordingly.")),console.error(R));let P={id:m,config:L?L.config:O},[z,B]=k.id.validate.matches,q=c.object().shape({id:c.string().matches(z,B).min(3).max(35).required(),config:M.fields.config}),G="".concat("edit-modal-form","-").concat(Math.random().toString());return(0,n.jsx)(v.Z,{isOpen:!0,shouldCloseOnOverlayClick:!0,onRequestClose:t,contentLabel:"Widget Form Modal",children:(0,n.jsx)(A,{apiId:m,formId:G,initialValues:P,validationSchema:q,FormFields:k,onSave:e=>{let{newKey:i,value:n}=e;l({apiId:m,newKey:i,value:{...h,...n},updateMeta:{fieldIdChanged:{previousPath:[m],newPath:[i]}}}),t()},children:e=>{let{isValid:i,isSubmitting:l,initialValues:o}=e,a=E?(0,n.jsx)(E,{...e,fields:r},"field-model-tab-content"):(0,n.jsx)(x.k,{children:Object.entries(k).map(e=>{let[t,i]=e;return(0,n.jsx)(x.J,{children:(0,n.jsx)(T.Z,{fieldName:(0,b.lm)(t),formField:i,fields:r,initialValues:o,autoFocus:""===m&&void 0})},t)})},"field-model-tab-content"),c=["Field Model"],p=[a];if("slice"===d){let e=(0,n.jsx)(s.xu,{children:(0,n.jsx)(C,{})},"mock-data-tab-content");c.push("Mock Data"),p.push(e)}return(0,n.jsx)(f,{borderFooter:!0,footerSx:{position:"sticky",bottom:0,p:0},tabs:c,Header:(0,n.jsxs)(N,{children:[(0,n.jsx)(g,{theme:u,text:D,WidgetIcon:j}),(0,n.jsx)(s.x8,{onClick:t,type:"button"})]}),Footer:(0,n.jsxs)(s.kC,{sx:{position:"sticky",bottom:0,alignItems:"space-between",bg:"headSection",p:3},children:[(0,n.jsx)(s.xu,{sx:{ml:"auto"}}),(0,n.jsx)(s.zx,{mr:2,type:"button",onClick:t,variant:"secondary",children:"Cancel"}),(0,n.jsx)(s.zx,{form:G,type:"submit",disabled:!i&&l,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"},children:"Done"})]}),children:p})}})})}},16182:function(e,t,i){"use strict";i.d(t,{Z:function(){return v}});var n=i(52322),r=i(2784),l=i(49857),o=i(15934);function a(e){return e.show?(0,n.jsx)(o.D,{padding:{block:8,inline:16},border:{top:!0},borderColor:"grey6",children:(0,n.jsxs)(o.bK,{variant:"normal",color:"grey11",children:["No code snippet for this field."," ",(0,n.jsx)(o.bK,{component:"a",href:"https://prismic.io/docs/fields/content-relationship",rel:"noopener noreferrer",target:"_blank",color:"grey11",underline:!0,children:"Check the docs"})," ","for an example."]})}):null}var s=i(80148),c=i(77245),d=i(8799),u=i(65186),p=i(59326),m=i(75289),h=i(38193);let f={position:"relative",top:"3px"};var x=e=>{var t,i,l;let{code:o,lang:a}=e,{theme:s}=(0,p.B7)(),[x,g]=(0,r.useState)(!1);return o?(0,n.jsxs)(m.kC,{sx:{p:2,px:3,alignItems:"center",borderTop:"1px solid",borderColor:"borders",justifyContent:"space-between"},children:[(0,n.jsxs)(m.kC,{sx:{alignItems:"center",display:["none","none","flex"],maxWidth:"80%"},children:[(0,n.jsx)(d.vcz,{size:26,color:null==s?void 0:null===(t=s.colors)||void 0===t?void 0:t.icons,style:{border:"1px solid",borderColor:null==s?void 0:null===(i=s.colors)||void 0===i?void 0:i.borders,borderRadius:"3px",padding:"4px",marginRight:"2px"}}),(0,n.jsx)(h.Z,{sx:{margin:"0px 8px",border:"none",borderRadius:"3px",fontSize:"13px"},lang:a,children:o})]}),(0,n.jsx)(m.xu,{children:(0,n.jsxs)(m.zx,{"aria-label":x?"Code snippet copied":"Copy code snippet",onClick:()=>{o&&navigator.clipboard.writeText(o).then(()=>{g(!0),setTimeout(()=>{g(!1)},1200)})},variant:"textButton",children:[x?(0,n.jsx)(u.HhX,{size:16,color:null==s?void 0:null===(l=s.colors)||void 0===l?void 0:l.success,style:f}):(0,n.jsx)(c.LhG,{size:16,style:f}),(0,n.jsx)(m.xv,{as:"span",sx:{display:["none","inline","none","inline"]},children:"\xa0Copy"})]})})]}):null};let g=e=>{let{show:t,renderHintBase:i,item:r,hintItemName:o}=e,a=i({item:r}),c=[a];if("Link"===r.value.type){var d,u,p,m,h;null!==(m=null===(d=r.value.config)||void 0===d?void 0:d.allowText)&&void 0!==m&&m&&c.push("allowText"),null!==(h=null===(u=r.value.config)||void 0===u?void 0:u.repeat)&&void 0!==h&&h&&c.push("repeat"),(null===(p=r.value.config)||void 0===p?void 0:p.variants)&&c.push("variants")}let{data:f,error:g}=(0,l.ZP)(c.join("$"),async()=>await s.managerClient.snippets.readSnippets({fieldPath:a.split("."),model:r.value,itemName:o}));if(g&&console.error(g),!f||g)return null;let v=f.snippets||[];return v[0]?(0,n.jsx)("div",{style:{display:t?"initial":"none"},children:(0,n.jsx)(x,{code:v[0].code,lang:v[0].language})}):null};var v=e=>{var t;let{item:i}=e;return"Link"===i.value.type&&(null===(t=i.value.config)||void 0===t?void 0:t.select)==="document"?(0,n.jsx)(a,{show:e.show}):(0,n.jsx)(g,{...e})}},40141:function(e,t,i){"use strict";i.d(t,{Z:function(){return A}});var n=i(52322),r=i(15934),l=i(13980),o=i(2784),a=i(65077),s=i(94160),c=i(35289),d=i(6882),u=i(6609);function p(e){let{open:t,onOpenChange:i,onConfirm:l}=e;return(0,n.jsxs)(r.ad,{open:t,onOpenChange:i,size:"small",children:[(0,n.jsx)(r.ak,{title:"Static zone"}),(0,n.jsx)(r.ai,{children:(0,n.jsx)(r.bm,{children:(0,n.jsxs)(r.D,{as:"article",flexDirection:"column",padding:16,gap:4,children:[(0,n.jsx)(r.bK,{sx:{marginBottom:4},color:"purple9",variant:"smallBold",children:"About"}),(0,n.jsx)(r.bK,{variant:"h3",children:"What is the static zone?"}),(0,n.jsx)(r.bK,{color:"grey11",children:"The static zone in Prismic page types contain fields that are always present on the page. Use it for essential information like a page's title, page design settings, or metadata. Unlike slices, which can be added or removed, static zone fields remain fixed."}),(0,n.jsx)(r.c7,{src:"https://images.prismic.io/prismic-main/6T7q81Wk_lj5hyWH_slice-machine_explication_vide%CC%81o_zone_statique.mp4",sizing:"contain",autoPlay:!0,loop:!0})]})})}),(0,n.jsx)(r.ag,{children:(0,n.jsx)(r.ae,{size:"medium",sx:{flexGrow:1},onClick:()=>{l(),i(!1)},children:"Got it"})})]})}var m=i(76611),h=i(5683);let f=(0,o.forwardRef)((e,t)=>{var i;return(0,n.jsx)(r.E,{...e,ref:t,startIcon:"add",color:"grey","aria-label":"Add a field","data-testid":null!==(i=e["data-testid"])&&void 0!==i?i:"add-field"})});function x(e){let{zoneTypeFormat:t,...i}=e;return"page"===t?(0,n.jsx)(v,{...i}):(0,n.jsx)(b,{...i})}let g=(0,n.jsx)("div",{style:{position:"absolute",bottom:0,right:0}});function v(e){let{disabled:t,fields:i,triggerDataTestId:l,onSelectField:a}=e,[s,c]=(0,o.useState)(!1),[d,x]=(0,o.useState)(!1),[v,b]=(0,m.V)(h.vm,!1);return(0,n.jsxs)(r.D,{position:"relative",children:[(0,n.jsx)(f,{onClick:()=>{v?c(!0):x(!0)},"data-testid":l}),(0,n.jsx)(p,{open:d,onOpenChange:e=>{x(e),e||c(!0)},onConfirm:()=>b(!0)}),(0,n.jsx)(u.S,{open:s,onOpenChange:c,disabled:t,onSelectField:a,fields:i,trigger:g})]})}function b(e){let{disabled:t,fields:i,triggerDataTestId:r,onSelectField:l}=e;return(0,n.jsx)(u.S,{disabled:t,onSelectField:l,fields:i,trigger:(0,n.jsx)(f,{"data-testid":r})})}var y=i(45440),j=i(49919),k=i(40023),C=i(75289),F=i(70705),I=i(86355),_=i(23134),w=i(16182),S=e=>{let{fields:t,title:i,tabId:r,enterEditMode:l,enterSelectMode:o,onDragEnd:a,renderFieldAccessor:s,onDeleteItem:c,onSave:d,showHints:u,renderHintBase:p,isRepeatable:m,testId:h,isRepeatableCustomType:f}=e;return(0,n.jsx)(k.Z5,{onDragEnd:a,children:(0,n.jsx)(k.bK,{droppableId:i,children:(e,i)=>(0,n.jsxs)(C.xu,{as:"ul",ref:e.innerRef,...e.droppableProps,"data-testid":h,sx:{paddingInline:"16px !important"},children:[t.map((e,t)=>{let{value:{config:a,type:h}}=e,x=(0,_.t)(y.C,a,h);if(!x)return(0,n.jsx)(F.Z,{children:(0,n.jsxs)(C.xv,{children:['Field type "',h,'" not supported']})});let g={item:e,index:t,tabId:r,widget:x,showHints:u,key:e.key,enterSelectMode:o,renderFieldAccessor:s,enterEditMode:l,parentSnapshot:i,deleteItem:c,saveItem:d,draggableId:"list-item-".concat(e.key),isRepeatableCustomType:f,testId:"list-item-".concat(e.key)},v=(0,n.jsx)(w.Z,{item:e,show:u,isRepeatable:m,renderHintBase:p,hintItemName:x.hintItemName,Widgets:y.C,typeName:x.CUSTOM_NAME||x.TYPE_NAME});if(x.CustomListItem){let{CustomListItem:e}=x;return(0,n.jsx)(e,{...g,HintElement:v})}return(0,n.jsx)(I.Z,{...g,HintElement:v})}),e.placeholder]})})})},T=i(644),E=i.n(T);let M=e=>{let{zoneType:t,heading:i="Your ".concat(t," has no fields yet"),action:l}=e;return(0,n.jsxs)("div",{className:E().root,children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(r.bK,{variant:"bold",children:i}),(0,n.jsx)(r.bK,{color:"grey11",children:"A field is an input for content (e.g. text, images, links)."})]}),l]})},D=e=>{let t,{zoneType:i,zoneTypeFormat:l,tabId:p,title:m,fields:h,poolOfFieldsToCheck:f,widgetsArray:g,isRepeatable:v,onDeleteItem:b,onDragEnd:k,EditModal:C,onSave:F,dataTip:I,renderHintBase:_,renderFieldAccessor:w,testId:T,isRepeatableCustomType:E,emptyStateHeading:D}=e,A=(()=>{let e=!!Object.entries(f).find(e=>{let[,{value:t}]=e;return"UID"===t.type}),t=g.filter(e=>{let{TYPE_NAME:t}=e;return"UID"!==t});return e?t:[...t,g.find(e=>{let{TYPE_NAME:t}=e;return"UID"===t})]})(),[N,O]=(0,o.useState)(!1),[L,R]=(0,o.useState)({isOpen:!1}),P={onSelectField:e=>{R({isOpen:!0,field:["",y.C[e].create("")]})},fields:A.filter(Boolean).map(e=>{let{TYPE_NAME:t,CUSTOM_NAME:i}=e;return d.XU.find(e=>e.type===t&&(void 0===i||e.variant===i))}),triggerDataTestId:v?"add-field-in-items":void 0};return"slice"===i&&h.length>0?t=(0,n.jsx)(u.S,{...P}):"customType"===i&&(t=(0,n.jsx)(x,{...P,zoneTypeFormat:l})),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Bu,{actions:(0,n.jsxs)(n.Fragment,{children:[h.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.bK,{color:"grey11",component:"span",noWrap:!0,children:"Show code snippets?"}),(0,n.jsx)(r.bB,{checked:N,onCheckedChange:O,size:"small",style:{flexShrink:0},"data-testid":"code-snippets-switch"})]}),t]}),children:m}),0===h.length&&"slice"===i?(0,n.jsx)(M,{zoneType:"customType"===i?"page"===l?"page type":"custom type":i,heading:D,action:(0,n.jsx)(u.S,{...P})}):h.length>0?(0,n.jsx)(a.xR,{children:(0,n.jsx)(S,{tabId:p,isRepeatable:v,fields:h,showHints:N,dataTip:I,title:m,renderFieldAccessor:w,renderHintBase:_,enterEditMode:e=>{R({isOpen:!0,field:e});let[t,i]=e;s.Xe.track({event:"field:settings-opened",id:t,name:i.config.label,type:i.type,isInAGroup:!1,contentType:(0,j.T)(window.location.pathname)})},onDragEnd:k,onDeleteItem:b,onSave:F,testId:T,isRepeatableCustomType:E})}):void 0,(0,n.jsx)(C,{data:L,close:()=>{R({isOpen:!1})},onSave:F,fields:f,zoneType:i})]})};D.propTypes={isRepeatable:l.bool,title:l.string.isRequired,dataTip:l.string.isRequired,onSave:l.func.isRequired,onDragEnd:l.func.isRequired,onDeleteItem:l.func.isRequired,poolOfFieldsToCheck:(0,l.arrayOf)((0,l.shape)({key:l.string,value:l.object})),renderHintBase:l.func.isRequired,renderFieldAccessor:l.func.isRequired,widgetsArray:l.array.isRequired,fields:(0,l.arrayOf)((0,l.shape)({key:l.string.isRequired,value:(0,l.shape)({config:l.object,fields:l.array,type:l.string.isRequired})}))};var A=D},23134:function(e,t,i){"use strict";i.d(t,{t:function(){return r}});var n=i(59050);let r=(e,t,i)=>{if("Link"===i)switch(null==t?void 0:t.select){case"document":return e.ContentRelationship;case"media":return e.LinkToMedia;default:return e.Link}if(i===n.GroupFieldType){var r;return null!==(r=e.Group)&&void 0!==r?r:e.NestedGroup}return e[i]}},9889:function(e,t,i){"use strict";i.d(t,{Jp:function(){return o},OR:function(){return l}});var n=i(7974),r=i(49046);let l={label:(0,r.II)("Label",{required:"This field is required",max:!0},void 0,void 0,"Label for content creators (defaults to field type)",!0),id:(0,r.II)("API ID*",{min:!0,max:!0,required:"This field is required",matches:[n.xo,"No special characters allowed (except _)"]},e=>{let{value:t,fields:i,initialId:n}=e;return t?i.find(e=>{let{key:i}=e;return i===t})&&t!==n?'Field "'.concat(t,'" already exists.'):void 0:"Field is required"},void 0,"A unique identifier for the field (e.g. buttonLink)")},o={...l,placeholder:(0,r.II)("Placeholder",{required:"This field is required",max:[100,"String is too long. Max: 100"]},void 0,void 0,"Placeholder text for content creators")}},49046:function(e,t,i){"use strict";i.d(t,{II:function(){return c},Jg:function(){return l}});var n=i(68169),r=i(79256);let l=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return{type:r.h.CHECKBOX,validate:{required:(0,n.MJ)(t,s)},required:t,label:e,defaultValue:i,yupType:"boolean"}},o=[3,"String is too short. Min: 3"],a=[35,"String is too long. Max: 35"],s=["Field is required"],c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{min:o,max:a,required:s},i=arguments.length>2?arguments[2]:void 0,l=arguments.length>3?arguments[3]:void 0,c=arguments.length>4?arguments[4]:void 0,d=arguments.length>5&&void 0!==arguments[5]&&arguments[5],{min:u,max:p,required:m,matches:h}=t||{};return{type:r.h.INPUT,label:e,validate:{required:(0,n.MJ)(m,s),min:(0,n.MJ)(u,o),max:(0,n.MJ)(p,a),matches:h},defaultValue:l,fieldLevelValidation:i,yupType:"string",placeholder:c,autoFocus:d}}},68169:function(e,t,i){"use strict";i.d(t,{MJ:function(){return a},f7:function(){return s},gc:function(){return c},lm:function(){return o}});var n=i(65413),r=i(79256);let l=e=>null===e.defaultValue?void 0:void 0!==e.defaultValue?e.defaultValue:e.type===r.h.CHECKBOX||(e.type===r.h.INPUT?"":e.type===r.h.SELECT?[]:void 0),o=e=>"id"===e?"id":"config.".concat(e),a=(e,t)=>Array.isArray(e)?e:"boolean"==typeof e&&e?t:null,s=e=>Object.entries(e).reduce((e,t)=>{let[i,n]=t,r=l(n);return void 0!==r?{...e,[i]:r}:e},{}),c=e=>n.object().shape(Object.entries(e).filter(e=>e).reduce((e,t)=>{let[i,r]=t,{validate:l,yupType:o}=r;if(!l)return e;if("function"==typeof l)return{...e,[i]:l(i,r)};let a=n[o]();return Object.entries(l).filter(e=>e&&e[1]).forEach(e=>{let[t,n]=e;if(n&&a[t]){a=a[t](...Array.isArray(n)?n:[n]);return}console.warn('Invalid Yup validator for field "'.concat(i,'"'))}),{...e,[i]:a}},{})).required().default(void 0).noUnknown(!0)},79256:function(e,t,i){"use strict";var n,r;i.d(t,{h:function(){return n}}),(r=n||(n={})).CHECKBOX="checkbox",r.INPUT="input",r.SELECT="select"},45440:function(e,t,i){"use strict";i.d(t,{C:function(){return td}});var n=i(52322),r=i(96317),l=i(65186),o=i(65413),a=i(6882),s=i(75289),c=i(80575),d=i(89280),u=i(68169),p=i(9889),m=i(49046);let h={...p.OR,repeat:(0,m.Jg)("Repeatable",!1,!0)};var f=e=>{let{initialValues:t,fields:i,values:r,setFieldValue:l}=e,{config:{repeat:o}}=r;return(0,n.jsxs)(c.k,{children:[Object.entries(h).filter(e=>{let[t]=e;return"repeat"!==t}).map(e=>{let[r,l]=e;return(0,n.jsx)(c.J,{children:(0,n.jsx)(d.Z,{fieldName:(0,u.lm)(r),formField:l,fields:i,initialValues:t})},r)}),(0,n.jsx)(c.J,{children:(0,n.jsx)(s.xu,{sx:{mt:2,alignItems:"center",display:"flex",height:"130%"},children:(0,n.jsxs)(s.__,{variant:"label.border",sx:{mb:0},children:[(0,n.jsx)(s.XZ,{checked:o,onChange:()=>l("config.repeat",!o)}),"Repeatable"]})})})]})};let x={icon:l.iy3},g=e=>o.object().shape({type:o.string().matches(e,{excludeEmptyString:!0}).required(),config:o.object().shape({fields:o.array(),label:o.string(),repeat:o.boolean().optional()})});function v(e){let{schemaTypeRegex:t,customListItem:i,customName:n,hintItemName:r}=e;return{Meta:x,Form:f,FormFields:h,schema:g(t),create:e=>({type:"Group",config:{label:e,repeat:!0,fields:[]}}),CustomListItem:i,TYPE_NAME:"Group",CUSTOM_NAME:n,hintItemName:r,label:a.U.name}}var b=i(59050),y=i(2784),j=i(40023),k=i(28316),C=i(94160),F=i(6609),I=i(86355),_=i(3285),w=i(16182),S=i(23134),T=i(49219),E=i(16086),M=i(358),D=i(49919),A=i(5495),N=i(39302);let O=e=>{let{tabId:t,widget:i,Widgets:r,widgetsArray:l,hintBase:o,parentSnapshot:c,showHints:d,isRepeatable:u,item:p,draggableId:m,saveItem:h,HintElement:f,...x}=e,[g,v]=(0,y.useState)({isOpen:!1}),O=e=>{var t;let{apiId:i,value:n}=e;null===(t=n.config)||void 0===t||t.label;let r=function(e){var t,i,n;let r=structuredClone(e.group);return null!==(i=r.config)&&void 0!==i||(r.config={}),null!==(n=(t=r.config).fields)&&void 0!==n||(t.fields={}),r.config.fields[e.fieldId]=e.field,r}({group:T.Fl.fromSM(p.value),fieldId:i,field:n});h({apiId:p.key,newKey:p.key,value:T.Fl.toSM(r),inGroupFieldAction:"add"}),(0,A.V)({id:i,field:n,isInAGroup:!0})},L=e=>{let{apiId:t,newKey:i,value:n}=e,r=n.type===b.GroupFieldType?T.Fl.fromSM(n):n,l=function(e){var t,i;let n=structuredClone(e.group);if(!(null===(t=n.config)||void 0===t?void 0:t.fields)||!(null===(i=e.group.config)||void 0===i?void 0:i.fields))return n;for(let t in n.config.fields={},e.group.config.fields)t===e.previousFieldId?n.config.fields[e.newFieldId]=e.field:n.config.fields[t]=e.group.config.fields[t];return n}({group:T.Fl.fromSM(p.value),previousFieldId:t,newFieldId:i,field:r});h({apiId:p.key,newKey:p.key,value:T.Fl.toSM(l),inGroupFieldAction:"update",updateMeta:{fieldIdChanged:{previousPath:[p.key,t],newPath:[p.key,i]}}}),(0,N.Z)({previousId:t,id:i,field:r,isInAGroup:!0})},R=e=>{let t=function(e){var t,i;let n=structuredClone(e.group);return null===(i=n.config)||void 0===i||null===(t=i.fields)||void 0===t||delete t[e.fieldId],n}({group:T.Fl.fromSM(p.value),fieldId:e});h({apiId:p.key,newKey:p.key,value:T.Fl.toSM(t)})},P=e=>{v({isOpen:!0,field:e});let[t,i]=e;C.Xe.track({event:"field:settings-opened",id:t,name:i.config.label,type:i.type,isInAGroup:!0,contentType:(0,D.T)(window.location.pathname)})};return(0,n.jsxs)(y.Fragment,{children:[(0,n.jsx)(I.Z,{item:p,widget:i,draggableId:m,...x,HintElement:f,CustomEditElements:[(0,n.jsx)(F.S,{onSelectField:e=>{v({isOpen:!0,field:["",r[e].create("")]})},fields:l.filter(Boolean).map(e=>{let{TYPE_NAME:t,CUSTOM_NAME:i}=e,n=a.XU.find(e=>e.type===t&&(void 0===i||e.variant===i));if(!n)throw Error("Field not found for widget: ".concat(t," - ").concat(i));return n})},"add-field-dropdown")],children:(0,n.jsx)(s.xu,{sx:{ml:4},children:(0,n.jsx)(j.Z5,{onDragEnd:e=>{if((0,E.uS)(e))return;let{source:t,destination:i}=e;if(!i)return;let{index:n}=t,{index:r}=i,l=function(e){var t;let i=structuredClone(e.group);if(!(null===(t=i.config)||void 0===t?void 0:t.fields))return i;let n=Object.entries(i.config.fields),[r]=n.splice(e.sourceIndex,1);return n.splice(e.destinationIndex,0,r),i.config.fields=Object.fromEntries(n),i}({group:T.Fl.fromSM(p.value),sourceIndex:n,destinationIndex:r});(0,k.flushSync)(()=>{h({apiId:p.key,newKey:p.key,value:T.Fl.toSM(l)})})},children:(0,n.jsx)(j.bK,{droppableId:"".concat(t,"-").concat(p.key,"-zone"),children:e=>(0,n.jsxs)("ul",{ref:e.innerRef,...e.droppableProps,children:[p.value.config.fields.map((e,t)=>{let{value:{config:i,type:l}}=e,a=(0,S.t)(r,i,l);if(!a)return null;let s={item:e,index:t,widget:a,key:e.key,enterEditMode:P,deleteItem:R,saveItem:L,showHints:d,renderFieldAccessor:t=>"item".concat((0,M.Ti)(e.key)),draggableId:"group-".concat(p.key,"-").concat(e.key,"-").concat(t),testId:"list-item-group-".concat(p.key,"-").concat(e.key)},c=(0,n.jsx)(w.Z,{item:e,show:d,isRepeatable:u,renderHintBase:e=>{let{item:t}=e;return"".concat(o).concat((0,M.Ti)(t.key))},hintItemName:a.hintItemName,Widgets:r,typeName:a.CUSTOM_NAME||a.TYPE_NAME});if(a.CustomListItem){let{CustomListItem:e}=a;return(0,n.jsx)(e,{...s,HintElement:c})}return(0,n.jsx)(I.Z,{...s,HintElement:c})}),e.placeholder]})})})})}),(0,n.jsx)(_.Z,{data:g,close:()=>{v({isOpen:!1})},onSave:e=>""===e.apiId?O({...e,apiId:e.newKey}):L(e),fields:p.value.config.fields})]})},L={icon:l.hs8},R={label:p.Jp.label,id:p.Jp.id,placeholder_false:(0,m.II)("False Placeholder",{required:!1},null,"false","Value the content creator sees (Output as 'false' in the API)."),placeholder_true:(0,m.II)("True Placeholder",{required:!1},null,"true","Value the content creator sees (Output as 'true' in the API)"),default_value:(0,m.Jg)("Default to true")},P={TYPE_NAME:"Boolean",create:e=>({type:"Boolean",config:{label:e,default_value:!1,placeholder_true:"true",placeholder_false:"false"}}),Meta:L,schema:o.object().shape({type:o.string().matches(/^Boolean$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,E.B9)(R,"id"))}),FormFields:R,label:a.Qr.name},z={icon:l.U8L},{TYPE_NAME:B,FormFields:q,schema:G}=(0,E.zg)("Color"),K={create:e=>({type:"Color",config:{label:e,placeholder:""}}),FormFields:q,TYPE_NAME:B,schema:G,Meta:z,label:a.pG.name};var V=i(15934),U=i(63397);function J(e){let{checked:t,height:i=130,setFieldValue:r}=e,[l,o]=(0,y.useState)(null);return(0,n.jsx)(c.J,{children:(0,n.jsx)(s.kC,{sx:{mt:2,alignItems:"center",height:"".concat(i,"%")},children:(0,n.jsx)(s.__,{variant:"label.border",children:(0,n.jsxs)(V.D,{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",ref:o,children:[(0,n.jsxs)(s.kC,{children:[(0,n.jsx)(s.XZ,{checked:t,onChange:e=>{r("config.allowText",e.target.checked)}}),"Allow display text"]}),(0,n.jsx)(V.c2,{container:l,align:"end",content:"Allow editors to customize the link display text",children:(0,n.jsx)(V.aW,{name:"alert",size:"medium",color:"grey11"})})]})})})})}function Z(e){let{checked:t,setFieldValue:i}=e;return(0,n.jsxs)(V.D,{flexDirection:"column",children:[(0,n.jsx)(s.__,{htmlFor:"repeat",variant:"label.primary",children:"Repeatable"}),(0,n.jsxs)(s.__,{variant:"label.border",sx:{display:"flex"},children:[(0,n.jsx)(s.XZ,{name:"repeat",checked:t,onChange:e=>{i("config.repeat",e.target.checked)}}),"Make this link repeatable (allows editors to create lists of links)"]}),(0,n.jsxs)(V.D,{alignItems:"center",gap:4,children:[(0,n.jsx)(V.aW,{name:"alert",size:"medium",color:"grey11"}),(0,n.jsxs)(V.bK,{variant:"normal",color:"grey11",children:["Repeatable link fields are returned as an array of links by the API."," ",(0,n.jsx)("a",{href:"https://prismic.io/docs/field",style:{textDecoration:"none"},target:"_blank",rel:"noopener noreferrer",children:(0,n.jsx)(V.bK,{variant:"normal",color:"indigo11",children:"See documentation."})})]})]})]})}function W(e){var t,i;let{variants:r,onVariantsChange:l,error:o}=e,a=!!r,s=a?"Enabled":"Disabled",c="Options (".concat(null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0,")"),d=(null!==(i=null==r?void 0:r.length)&&void 0!==i?i:0)>2,u=(0,y.useRef)();return(0,n.jsxs)(V.D,{overflow:"hidden",flexDirection:"column",border:!0,borderRadius:6,children:[(0,n.jsxs)(V.D,{border:{bottom:!0},padding:12,flexDirection:"column",gap:8,children:[(0,n.jsx)(V.bK,{variant:"h4",color:"grey12",children:"Variants"}),(0,n.jsx)(V.bK,{color:"grey12",children:'Add variants like "Primary" and "Secondary" to allow editors to choose the link\'s style by selecting one of them.'}),(0,n.jsxs)(V.D,{gap:8,children:[(0,n.jsx)(V.bB,{checked:a,onCheckedChange:e=>{l(e?["Primary","Secondary"]:void 0)}}),(0,n.jsx)(V.bK,{color:"grey11",children:s})]})]}),a&&(0,n.jsxs)(V.D,{border:{bottom:!0},padding:12,flexDirection:"column",gap:8,children:[(0,n.jsxs)(V.bK,{variant:"h5",color:"grey11",children:[c,!!o&&(0,n.jsx)(V.bK,{variant:"inherit",color:"tomato9",children:" ".concat(o)})]}),null==r?void 0:r.map((e,t)=>(0,n.jsxs)(V.D,{gap:4,alignItems:"center",children:[(0,n.jsx)(V.D,{flexGrow:1,backgroundColor:"white",padding:{inline:12,block:8},flexDirection:"column",border:!0,borderRadius:4,children:(0,n.jsx)(V.bM,{ref:e=>{u.current===t&&(u.current=void 0,null==e||e.focus())},placeholder:"Variant option (e.g. Primary)",value:e,onValueChange:e=>l(null==r?void 0:r.map((i,n)=>n===t?e:i))})}),d&&(0,n.jsx)(V.aY,{type:"button",icon:"delete",onClick:()=>l(null==r?void 0:r.filter((e,i)=>i!==t))})]},t)),(0,n.jsx)(V.D,{children:(0,n.jsx)(V.E,{invisible:!0,startIcon:"add",onClick:()=>{u.current=null==r?void 0:r.length,l([...null!=r?r:[],""])},children:"Add option"})})]}),(0,n.jsx)(V.D,{backgroundColor:"white",flexDirection:"column",padding:12,children:(0,n.jsxs)(V.bK,{variant:"normal",color:"grey11",children:['Need additional properties similar to "Variants"?'," ",(0,n.jsx)("a",{href:"https://community.prismic.io/t/link-field-use-cases-share-your-requests-and-feedback/18146",target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline"},children:"Please provide your feedback here."})]})})]})}let H={...p.Jp};function $(e){var t;let{variants:i,setFieldValue:r}=e,l="config.variants",[o,a]=(0,U.U$)(l),s=null===(t=a.error)||void 0===t?void 0:t.find(e=>e);return(0,n.jsx)(W,{variants:i,onVariantsChange:e=>r(l,e),error:s})}let Y={icon:l.$l_},X=o.object().shape({label:o.string().optional(),useAsTitle:o.boolean().optional(),placeholder:o.string().optional(),select:o.string().optional().oneOf(["media","document","web",null]).nullable(),customtypes:o.array().strict().optional(),masks:o.array(o.string()).optional(),tags:o.array(o.string()).optional(),allowTargetBlank:o.boolean().strict().optional(),allowText:o.boolean().strict().optional(),repeat:o.boolean().strict().optional(),variants:o.array(o.string().trim().required("Values can't be empty")).optional()}).required().default(void 0).noUnknown(!0),Q={Meta:Y,FormFields:H,schema:o.object().shape({type:o.string().matches(/^Link$/,{excludeEmptyString:!0}).required(),config:X.optional()}),Form:e=>{let{initialValues:t,values:i,fields:r,setFieldValue:l}=e,{config:{allowText:o,repeat:a,variants:p}}=i;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(c.k,{children:[Object.entries(H).map(e=>{let[i,l]=e;return(0,n.jsx)(c.J,{children:(0,n.jsx)(d.Z,{fieldName:(0,u.lm)(i),formField:l,fields:r,initialValues:t})},i)}),(0,n.jsx)(c.J,{children:(0,n.jsxs)(s.kC,{sx:{gap:2,marginTop:3},style:{paddingTop:"1px"},children:[(0,n.jsx)(c.J,{children:(0,n.jsx)(d.Z,{fieldName:(0,u.lm)("allowTargetBlank"),formField:(0,m.Jg)("Allow target blank",!1,!0),fields:r,initialValues:t})}),(0,n.jsx)(J,{checked:o,setFieldValue:l})]})},"allowTargetBlank")]}),(0,n.jsx)(V.D,{height:8}),(0,n.jsxs)(V.D,{flexDirection:"column",gap:16,children:[(0,n.jsx)(Z,{checked:a,setFieldValue:l}),(0,n.jsx)($,{variants:p,setFieldValue:l})]})]})},create:e=>({type:"Link",config:{label:e,placeholder:"",select:null,allowTargetBlank:!0,allowText:!0,repeat:!1}}),TYPE_NAME:"Link",label:a.pV.name};var ee=i(41347);let et={label:p.Jp.label,id:p.Jp.id,customtypes:{validate:()=>o.array()}},ei={icon:l.I2R},en=X.shape({label:o.string().max(35,"String is too long. Max: 35"),select:o.string().required().matches(/^document$/,{excludeEmptyString:!0}),customtypes:o.array().optional()}),er={create:e=>({type:"Link",config:{label:e,select:"document",repeat:!1,customtypes:[]}}),Meta:ei,schema:o.object().shape({type:o.string().matches(/^Link$/,{excludeEmptyString:!0}).required(),config:en}),TYPE_NAME:"Link",FormFields:et,CUSTOM_NAME:"ContentRelationship",Form:e=>{let{initialValues:t,values:i,setFieldValue:r,fields:l}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.k,{children:Object.entries(et).filter(e=>"customtypes"!==e[0]).map(e=>{let[i,r]=e;return(0,n.jsx)(c.J,{children:(0,n.jsx)(d.Z,{fieldName:(0,u.lm)(i),formField:r,fields:l,initialValues:t})},i)})}),(0,n.jsx)(s.xu,{mt:20,children:(0,n.jsx)(ee.zE,{value:i.config.customtypes,onChange:e=>{r("config.customtypes",e)}})})]})},prepareInitialValues:(e,t)=>(null==t?void 0:t.customtypes)?{...t,customtypes:t.customtypes.filter(t=>e.find(e=>"string"==typeof t?e.local.id===t:e.local.id===t.id))}:t,label:a.$U.name},{FormFields:el,schema:eo}=(0,E.zg)("Date"),ea={create:e=>({type:"Date",config:{label:e,placeholder:""}}),FormFields:el,TYPE_NAME:"Date",schema:eo,Meta:{icon:l.f$3},label:a.pt.name},{FormFields:es,schema:ec}=(0,E.zg)("Embed"),ed={create:e=>({type:"Embed",config:{label:e,placeholder:""}}),FormFields:es,TYPE_NAME:"Embed",schema:ec,Meta:{icon:l.xoN},label:a.gA.name},eu={create:e=>({type:"GeoPoint",config:{label:e}}),FormFields:{label:p.Jp.label,id:p.Jp.id},TYPE_NAME:"GeoPoint",schema:o.object().shape({type:o.string().matches(/^GeoPoint$/,{excludeEmptyString:!0}).required(),config:o.object().shape({label:o.string()}).required().default(void 0).noUnknown(!0)}),Meta:{icon:l.lPv},label:a.uG.name};var ep=i(8799),em=i(90167),eh=i(66770);let ef=e=>{let{onClick:t,error:i,onDelete:r,active:o,text:a,sx:c}=e;return(0,n.jsx)(eh.Z,{useActive:!0,fitButton:!0,error:i,onClick:t,active:o,sx:{position:"relative",width:"64px",height:"64px",...c},Icon:()=>(0,n.jsxs)(y.Fragment,{children:[(0,n.jsxs)(s.kC,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[(0,n.jsx)(ep.jnY,{size:22}),(0,n.jsx)(s.xv,{mt:1,children:a})]}),r?(0,n.jsx)(s.Ct,{onClick:r,variant:"circle-right",children:(0,n.jsx)(l.B4e,{})}):null]})})},ex=e=>{let{onClick:t}=e;return(0,n.jsx)(eh.Z,{fitButton:!0,onClick:t,sx:{width:"64px",height:"64px",border:e=>{let{colors:t}=e;return"1px solid ".concat(String(null==t?void 0:t.borders))}},Icon:()=>(0,n.jsx)(s.kC,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,n.jsx)(ep.iTs,{size:34,color:"#5263BA","aria-label":"Add a thumbnail"})})})},eg=e=>{let{prefix:t,required:i=!1,display:r}=e,[l,o]=(0,U.U$)(t),a=i?"*":"";return r?(0,n.jsxs)(y.Fragment,{children:[(0,n.jsx)(ev,{name:"".concat(t,".name"),label:"Name".concat(a),placeholder:"main",sx:{mb:3},isConstraint:"config.constraint"===t,meta:o}),(0,n.jsx)(eb,{name:"".concat(t,".width"),label:"Width (px)".concat(a),placeholder:" ",sx:{mb:3}}),(0,n.jsx)(eb,{name:"".concat(t,".height"),label:"Height (px)".concat(a),placeholder:" "})]}):null},ev=e=>{let{name:t,label:i,placeholder:r,meta:l,isConstraint:o,...a}=e,[s]=(0,U.U$)(t);return(0,n.jsx)(em.Hq,{...a,fieldName:t,meta:l,formField:{label:i,placeholder:r},field:o?{value:"main",readOnly:!0}:{value:s.value},variant:o?"disabled":"primary"})},eb=e=>{let{name:t,label:i,placeholder:r,...l}=e,[o,a]=(0,U.U$)(t);return(0,n.jsx)(em.Hq,{...l,fieldName:t,formField:{label:i,placeholder:r},meta:a,field:{min:0,type:"number",value:o.value||"",onKeyDown:e=>{("e"===e.key||"-"===e.key||"+"===e.key)&&e.preventDefault()}}})},ey=()=>o.number().nullable().transform((e,t)=>""===t?null:e),ej={label:p.Jp.label,id:p.Jp.id,constraint:{validate:()=>o.object().defined().shape({width:ey(),height:ey()})},thumbnails:{validate:()=>o.array().of(o.object().test({name:"Thumbnails",message:"Must set name and width or height at minimum",test:function(e){if(!e.name)return!1;let t="number"==typeof e.width&&e.width,i="number"==typeof e.height&&e.height;return e.name&&(t||i)}}))}},ek={name:"",width:"",height:""},eC=function(){let{width:e,height:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!i||e||t?e||t?"".concat(e||"auto","x").concat(t||"auto"):"...":"auto"},eF=o.object().shape({type:o.string().matches(/^Image$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,E.B9)(ej,"id"))}),eI={Meta:{icon:l.Fwj},Form:e=>{let{initialValues:t,values:i,errors:r,fields:l,touched:o}=e,[a,p]=(0,y.useState)(0),{config:{thumbnails:m=[],constraint:h}}=i;return(0,y.useEffect)(()=>{p(m.length)},[m.length]),(0,n.jsxs)(c.k,{children:[Object.entries(ej).map(e=>{let[i,r]=e;return(0,n.jsx)(c.J,{children:(0,n.jsx)(d.Z,{fieldName:(0,u.lm)(i),formField:r,fields:l,initialValues:t})},i)}),(0,n.jsxs)(c.J,{children:[(0,n.jsx)(s.__,{htmlFor:"thumbnails",variant:"label.primary",sx:{mt:1,display:"flex",alignItems:"center"},children:"Responsive views*"}),(0,n.jsx)(s.Zb,{p:3,children:(0,n.jsx)(U.F2,{name:"config.thumbnails",render:t=>{let{push:i,remove:l}=t;return(0,n.jsxs)(y.Fragment,{children:[(0,n.jsxs)(s.kC,{mb:3,children:[(0,n.jsx)(ef,{active:0===a,text:eC(h,!0),sx:{mr:2},onClick:()=>p(0)}),m.map((e,t)=>(0,n.jsx)(ef,{sx:{mr:3},active:a===+t+1,text:eC(e),error:!!r.thumbnails&&!!o.thumbnails&&!!o.thumbnails[t]&&!!r.thumbnails&&!!r.thumbnails[t],onDelete:()=>l(t),onClick:()=>p(+t+1)},"thumbnail-button-".concat(+t+1))),(0,n.jsx)(ex,{onClick:()=>{i(ek)}})]}),(0,n.jsx)(eg,{...e,display:0===a,prefix:"config.constraint"}),m.map((t,i)=>(0,y.createElement)(eg,{...e,required:!0,key:"thumbnail-".concat(+i+1),display:a===+i+1,prefix:"config.thumbnails[".concat(i,"]")}))]})}})})]})]})},schema:eF,create:e=>({type:"Image",config:{label:e,constraint:{},thumbnails:[]}}),FormFields:ej,TYPE_NAME:"Image",label:a.tg.name},e_={...p.Jp},ew={icon:l._b$},eS=X.shape({select:o.string().required().matches(/^media$/,{excludeEmptyString:!0})}),eT={Meta:ew,FormFields:e_,schema:o.object().shape({type:o.string().matches(/^Link$/,{excludeEmptyString:!0}).required(),config:eS.optional()}),Form:e=>{let{initialValues:t,values:i,fields:r,setFieldValue:l}=e,{config:{allowText:o,variants:a}}=i;return(0,n.jsxs)(V.D,{flexDirection:"column",gap:16,children:[(0,n.jsxs)(c.k,{children:[Object.entries(e_).map(e=>{let[i,l]=e;return(0,n.jsx)(c.J,{children:(0,n.jsx)(d.Z,{fieldName:(0,u.lm)(i),formField:l,fields:r,initialValues:t})},i)}),(0,n.jsx)(J,{checked:o,setFieldValue:l})]}),(0,n.jsx)($,{variants:a,setFieldValue:l})]})},create:e=>({type:"Link",config:{label:e,placeholder:"",select:"media",allowText:!0}}),TYPE_NAME:"Link",CUSTOM_NAME:"LinkToMedia",label:a.L0.name},{FormFields:eE,schema:eM}=(0,E.zg)("Number"),eD={create:e=>({type:"Number",config:{label:e,placeholder:""}}),FormFields:eE,TYPE_NAME:"Number",schema:eM,Meta:{icon:l.KZU},label:a.Wc.name};var eA=i(79256);let eN=e=>"use first value as default ".concat(e?'("'.concat(e,'")'):""),eO=(e,t)=>t?e:void 0,eL={...p.Jp,default_value:{type:eA.h.CHECKBOX,yupType:"string",defaultValue:null,validate:function(){return o.string().test({name:"default_value",message:'Default value is not part of field "options" in Select',test:function(e){return void 0===e||this.parent&&this.parent.options&&this.parent.options.find(t=>t===e)}})},component:e=>{var t;let{values:i}=(0,U.u6)(),r=null===(t=i.config)||void 0===t?void 0:t.options[0];return(0,n.jsx)(em.w8,{...e,defaultValue:e.field.value,controlledValue:r,setControlledValue:e.helpers.setValue,buildControlledValue:eO,label:eN})}},options:{yupType:"array",defaultValue:["1","2"],validate:{required:["Select requires a minimum of 2 options"],min:[2,"Choose at least 2 options"],test:{name:"non-empty values",message:"Values cannot be empty",test:e=>!e.some(e=>!e||!e.length)}},component:e=>(0,n.jsx)(em.kp,{label:"Options",inputPlaceholder:"Select option output in API (e.g. 'blueTheme')",buttonLabel:"Add option",...e})}},eR={icon:l.nwY},eP=o.object().shape({type:o.string().matches(/^Select$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,E.B9)(eL,"id"))}),ez={FormFields:eL,create:e=>({type:"Select",config:{label:e,placeholder:"",options:["1","2"]}}),schema:eP,Meta:eR,TYPE_NAME:"Select",label:a._M.name};var eB=i(47927),eq=i(29259),eG=i.n(eq),eK=i(85505),eV=i.n(eK),eU=i(34543);let eJ=e=>t=>{let{size:i}=t;return(0,n.jsx)("span",{style:{fontSize:i},children:e})},eZ=[{value:"paragraph",label:"P",icon:eJ("p")},{value:"preformatted",label:"PRE",icon:eJ("pre")},{value:"heading1",label:"H1",icon:eJ("h1")},{value:"heading2",label:"H2",icon:eJ("h2")},{value:"heading3",label:"H3",icon:eJ("h3")},{value:"heading4",label:"H4",icon:eJ("h4")},{value:"heading5",label:"H5",icon:eJ("h5")},{value:"heading6",label:"H6",icon:eJ("h6")},{value:"strong",label:"Strong",icon:eJ((0,n.jsx)("b",{children:"b"}))},{value:"em",label:"em",icon:eJ((0,n.jsx)("em",{style:{fontFamily:"serif"},children:"I"}))},{value:"hyperlink",label:"hyperlink",icon:eJ((0,n.jsx)(eU.eR7,{}))},{value:"image",label:"image",icon:eJ((0,n.jsx)(eU.LFN,{}))},{value:"embed",label:"embed",icon:eJ((0,n.jsx)(eU.xqv,{}))},{value:"list-item",label:"list",icon:eJ((0,n.jsx)(eU.SnF,{}))},{value:"o-list-item",label:"o",icon:eJ((0,n.jsx)(ep.KyO,{}))},{value:"rtl",label:"rtl",icon:eJ("rtl")}],eW=eZ.map(e=>e.value),eH=e=>!eW.find(t=>!e.includes(t)),e$=e=>{let t=e.split(",");return eZ.reduce((e,i)=>{let{value:n}=i;return t.includes(n)?[...e,n]:e},[])};function eY(e,t){return(0,eB.has)("parent",e)&&eG()(e.parent)&&(0,eB.has)(t,e.parent)&&eV()(e.parent[t])?e.parent[t]:null}function eX(e){return()=>o.string().test({name:e,message:"Options cannot be empty",test:function(t,i){let n="single"===e?"multi":"single",r=eY(i,e),l=eY(i,n);return!!l&&"string"==typeof l||!("string"!=typeof r||(!r||!r.length)&&(!l||!l.length)||r.split(",").find(e=>!eW.includes(e)))}})}let eQ={...p.Jp,allowTargetBlank:(0,m.Jg)("Allow target blank for links"),single:{validate:eX("single")},multi:{validate:eX("multi")}},e0=["config.single","config.multi"],e1={icon:l.BAW},e2=o.object().shape({type:o.string().matches(/^StructuredText$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,E.B9)({...eQ,labels:{yupType:"array",validate:{}}},"id"))}),e4={create:e=>({type:"StructuredText",config:{label:e,placeholder:"",allowTargetBlank:!0,multi:eW.join(",")}}),FormFields:eQ,Meta:e1,schema:e2,TYPE_NAME:"StructuredText",Form:e=>{var t;let{initialValues:i,values:r,errors:l,fields:o,setFieldValue:a}=e,{config:{single:p,multi:m}}=r,h=p?e$(p):m?e$(m):eW,[f,x]=(0,y.useState)(!p),[g,v]=(0,y.useState)(h);return(0,y.useEffect)(()=>{let e=f?1:0;a(e0[e],g.join(",")),setTimeout(()=>{a(e0[1-e],void 0)},100)},[f,g]),(0,n.jsxs)(c.k,{children:[Object.entries(eQ).map(e=>{let[t,r]=e;return(0,n.jsx)(c.J,{children:(0,n.jsx)(d.Z,{fieldName:(0,u.lm)(t),formField:r,fields:o,initialValues:i})},t)}),(0,n.jsxs)(c.J,{children:[(0,n.jsxs)(s.__,{htmlFor:"accept",variant:"label.primary",sx:{mt:1,display:"flex",alignItems:"center"},children:["Accept*",(0,n.jsx)(s.zx,{type:"button",variant:"buttons.textButton",onClick:()=>{if(eH(g))return v([]);v(eW)},children:eH(g)?"Unselect All":"Select all"})]}),eZ.map(e=>(0,n.jsx)(eh.Z,{fitButton:!0,useActive:!0,label:e.label,size:14,Icon:e.icon,sx:{p:"16px",mb:2,mr:2,variant:"buttons.selectIcon"},active:g.includes(e.value),onClick:()=>{if(g.find(t=>t===e.value))return v(g.filter(t=>t!==e.value));v([...g,e.value])}},e.value)),(null===(t=l.config)||void 0===t?void 0:t[f?"multi":"single"])?(0,n.jsx)(s.xu,{sx:{position:"absolute"},children:(0,n.jsx)(s.xv,{as:"span",variant:"text.labelError",pl:0,children:l.config[f?"multi":"single"]})}):null]}),(0,n.jsx)(c.J,{children:(0,n.jsx)(s.kC,{sx:{mt:2,alignItems:"center",height:"100%"},children:(0,n.jsxs)(s.__,{variant:"label.border",children:[(0,n.jsx)(s.XZ,{checked:f,onChange:()=>x(!f)}),"Allow multiple paragraphs"]})})})]})},label:a._n.name};var e3=i(18978);let e5={create:e=>({type:"Table",config:{label:e}}),FormFields:{label:p.Jp.label,id:p.Jp.id},TYPE_NAME:"Table",schema:o.object().shape({type:o.string().matches(/^Table$/,{excludeEmptyString:!0}).required(),config:o.object().shape({label:o.string()}).required().default(void 0).noUnknown(!0)}),Meta:{icon:e3.WHV},label:a.BB.name},e6=p.Jp,e9=o.object().shape({type:o.string().matches(/^Text$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,E.B9)(e6,"id"))}),e8={create:e=>({type:"Text",config:{label:e,placeholder:""}}),Meta:{icon:l.SQS},schema:e9,TYPE_NAME:"Text",FormFields:e6,label:a.$S.name},e7=p.Jp,te={create:e=>({type:"Timestamp",config:{label:e,placeholder:""}}),schema:o.object().shape({type:o.string().matches(/^Timestamp$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,E.B9)(e7,"id"))}),FormFields:e7,TYPE_NAME:"Timestamp",Meta:{icon:l.k71},label:a.UG.name},tt={label:p.Jp.label,id:{...p.Jp.id,validate:{required:"This field is required",matches:[/^uid$/,"Api ID must be 'uid' for this field."]},disabled:!0},placeholder:p.Jp.placeholder},ti=o.object().shape({type:o.string().matches(/^UID$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,E.B9)(tt,"id"))}),tn={Boolean:P,Color:K,ContentRelationship:er,Date:ea,Embed:ed,GeoPoint:eu,Image:eI,Link:Q,LinkToMedia:eT,Number:eD,Select:ez,StructuredText:e4,Table:e5,Text:e8,Timestamp:te,UID:{create:e=>({type:"UID",config:{label:e,placeholder:""}}),Meta:{icon:l.XN7},schema:ti,TYPE_NAME:"UID",FormFields:tt,label:a.Fj.name}},tr=[tn.Image,tn.Text,tn.StructuredText,tn.Link,tn.Select,tn.Boolean,tn.Number,tn.Color,tn.Date,tn.Table,tn.Embed,tn.Timestamp,tn.GeoPoint,tn.ContentRelationship,tn.LinkToMedia],tl="subItem",to=v({schemaTypeRegex:/^NestedGroup$/,customListItem:e=>(0,n.jsx)(O,{Widgets:tn,widgetsArray:tr,hintBase:tl,...e}),customName:"NestedGroup",hintItemName:tl}),ta={...tn,NestedGroup:to},ts=[ta.Image,ta.Text,ta.StructuredText,ta.Link,ta.Select,ta.Boolean,ta.Number,ta.Color,ta.Date,ta.Table,ta.Embed,ta.Timestamp,ta.GeoPoint,ta.ContentRelationship,ta.LinkToMedia,ta.NestedGroup],tc="item",td={Group:v({schemaTypeRegex:/^Group$/,customListItem:e=>{let t=function(){let e=(0,r.L)("slicemachine-nested-groups");return{eligible:(null==e?void 0:e.value)==="on"}}(),i=ts.filter(e=>!!t.eligible||"NestedGroup"!==e.CUSTOM_NAME);return(0,n.jsx)(O,{Widgets:ta,widgetsArray:i,hintBase:tc,...e})},hintItemName:tc}),NestedGroup:to,...tn}},16086:function(e,t,i){"use strict";i.d(t,{B9:function(){return o},Ss:function(){return s},uS:function(){return a},zg:function(){return c}});var n=i(65413),r=i(68169),l=i(9889);let o=(e,t)=>{let{[t]:i,...n}=e;return n},a=e=>!e.destination||e.source.index===e.destination.index||e.source.droppableId!==e.destination.droppableId,s=(e,t)=>!e[t]&&(console.log('Could not find widget with type name "'.concat(t,'".')),!0),c=e=>({TYPE_NAME:e,FormFields:l.Jp,schema:n.object().shape({type:n.string().test({name:"type",test:function(t){return t===e}}),config:(0,r.gc)(o(l.Jp,"id"))}),create:()=>({type:e,config:(0,r.f7)(o(l.Jp,"id"))})})},49919:function(e,t,i){"use strict";function n(e){if(e.startsWith("/slices/"))return"slice";if(e.startsWith("/custom-types/"))return"custom type";if(e.startsWith("/page-types/"))return"page type";throw Error("Did not detect a content type from: ".concat(e))}i.d(t,{T:function(){return n}})},93155:function(e,t,i){"use strict";i.d(t,{F:function(){return r}});var n=i(41347);function r(e){var t,i,r,l,o,a;return{allowText:null===(t=e.config)||void 0===t?void 0:t.allowText,repeat:null===(i=e.config)||void 0===i?void 0:i.repeat,variants:null===(r=e.config)||void 0===r?void 0:r.variants,linkSelect:null===(l=e.config)||void 0===l?void 0:l.select,...(null===(o=e.config)||void 0===o?void 0:o.select)==="document"&&(null===(a=e.config)||void 0===a?void 0:a.customtypes)&&(()=>{var t;let{pickedFields:i,nestedPickedFields:r}=(0,n.WP)((0,n.Vg)({linkCustomtypes:null===(t=e.config)||void 0===t?void 0:t.customtypes}));return{linkPickedFields:i,linkNestedPickedFields:r}})()}}},5495:function(e,t,i){"use strict";i.d(t,{V:function(){return o}});var n=i(94160),r=i(49919),l=i(93155);function o(e){var t,i;let{id:o,field:a,isInAGroup:s=!1}=e;n.Xe.track({event:"field:added",id:o,name:null!==(i=null===(t=a.config)||void 0===t?void 0:t.label)&&void 0!==i?i:"",type:a.type,isInAGroup:s,contentType:(0,r.T)(window.location.pathname),..."Link"===a.type&&(0,l.F)(a)})}},39302:function(e,t,i){"use strict";i.d(t,{Z:function(){return o}});var n=i(94160),r=i(49919),l=i(93155);function o(e){var t,i;let{id:o,previousId:a=o,field:s,isInAGroup:c=!1}=e;n.Xe.track({event:"field:updated",previousId:a,id:o,idUpdated:a!==o,name:null!==(i=null===(t=s.config)||void 0===t?void 0:t.label)&&void 0!==i?i:"",type:s.type,isInAGroup:c,contentType:(0,r.T)(window.location.pathname),..."Link"===s.type&&(0,l.F)(s)})}},13834:function(e){e.exports={flex:"List_flex__b6acG",row:"List_row__zKnOI List_flex__b6acG",root:"List_root__m_SiQ List_flex__b6acG","root-border":"List_root-border__UW3vp",child:"List_child__MJ49i List_row__zKnOI List_flex__b6acG",header:"List_header__T0WM5 List_child__MJ49i List_row__zKnOI List_flex__b6acG",headerActions:"List_headerActions__mNgLY List_row__zKnOI List_flex__b6acG",item:"List_item__LMBx4 List_child__MJ49i List_row__zKnOI List_flex__b6acG"}},644:function(e){e.exports={root:"ZoneEmptyState_root__DAfG2"}}}]);
|