slice-machine-ui 2.18.1-alpha.jp-unauthorized-error-improvement.8 → 2.18.1-alpha.jp-remove-shared-onboarding-experiment.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/7uIqfRATU8iBj2XIUVUvD/_buildManifest.js +1 -0
- package/out/_next/static/chunks/157-fa8b348c960c8283.js +3 -0
- package/out/_next/static/chunks/{248-a9c33f7fbe2da2f1.js → 248-bcd84e3d28d25f54.js} +1 -1
- package/out/_next/static/chunks/256-07f768a2b19b0a0e.js +4 -0
- package/out/_next/static/chunks/34-ca8515dda61c7c8a.js +1 -0
- package/out/_next/static/chunks/344-fdb3008f4bb3b0c1.js +1 -0
- package/out/_next/static/chunks/484-3e011e79c41f0342.js +1 -0
- package/out/_next/static/chunks/{489-a046ae0fa4f74435.js → 489-d85cd66ad0405bee.js} +1 -1
- package/out/_next/static/chunks/500-d3989390f5e8da53.js +1 -0
- package/out/_next/static/chunks/52d4c156-89c6ec6efca0a0bb.js +1 -0
- package/out/_next/static/chunks/630-7e1844076846ca4d.js +1 -0
- package/out/_next/static/chunks/{647-4379a741c8d85d9e.js → 647-aa094286bc248d52.js} +1 -1
- package/out/_next/static/chunks/{907-445266211c48b1a5.js → 907-180eb33eefccc237.js} +1 -1
- package/out/_next/static/chunks/a6495ab1.00190ac98e794d8f.js +28 -0
- package/out/_next/static/chunks/pages/{_app-6ee99840ce68524b.js → _app-d31f7ba82a417786.js} +212 -212
- package/out/_next/static/chunks/pages/{changelog-3901f2fc937d9648.js → changelog-fbed93d315cb5429.js} +1 -1
- package/out/_next/static/chunks/pages/changes-2d9f27b360c0f73d.js +1 -0
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-816acb31b652239b.js → [customTypeId]-af9376721beb489e.js} +1 -1
- package/out/_next/static/chunks/pages/{labs-dd04033db23a58f3.js → labs-34147f008c958a89.js} +1 -1
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-669d5479e81b638b.js → [pageTypeId]-a24665e91b882169.js} +1 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/{simulator-f237aaa755dc9a99.js → simulator-761a04bb54f8d60b.js} +1 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-dac1c4223724ff24.js +1 -0
- package/out/_next/static/chunks/pages/slices-08fad24cf5a81c9c.js +1 -0
- package/out/_next/static/chunks/webpack-24ddb02bea621501.js +1 -0
- package/out/_next/static/css/{303dad78be1eb854.css → bc89f2cd4e4781f5.css} +1 -1
- package/out/_next/static/css/e8e03c0d4003d1eb.css +1 -0
- 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 +6 -6
- package/src/{features/errorBoundaries/DefaultErrorBoundary.tsx → ErrorBoundary.tsx} +2 -2
- package/src/features/auth/LogoutButton.tsx +36 -42
- package/src/features/builder/fields/contentRelationship/ContentRelationshipFieldPicker.tsx +3 -3
- package/src/features/changes/StatusBadge.tsx +9 -1
- package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.tsx +3 -3
- package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +3 -3
- package/src/features/environments/actions/setEnvironment.ts +18 -0
- package/src/features/environments/useActiveEnvironment.ts +9 -17
- package/src/features/environments/useEnvironments.ts +8 -11
- package/src/features/labs/labsList/LabsPage.tsx +3 -3
- package/src/features/navigation/Navigation.tsx +8 -7
- package/src/features/navigation/RepositoryInfo.tsx +24 -18
- package/src/features/onboarding/OnboardingGuide.tsx +2 -5
- package/src/features/onboarding/useOnboarding.ts +1 -14
- package/src/features/slices/sliceBuilder/FloatingBackButton.tsx +3 -3
- package/src/features/sync/AutoSyncProvider.tsx +2 -2
- package/src/features/sync/getUnSyncChanges.ts +3 -1
- package/src/legacy/components/AppLayout/index.tsx +85 -10
- package/src/legacy/components/ChangesEmptyState/AuthErrorPage.tsx +44 -0
- package/src/legacy/components/ChangesEmptyState/index.ts +1 -1
- package/src/legacy/components/ChangesItems/ChangesItems.tsx +3 -3
- package/src/legacy/components/LoginModal/index.tsx +6 -14
- package/src/legacy/components/Navigation/ChangesItem.tsx +48 -96
- package/src/legacy/components/Navigation/Environment.tsx +7 -2
- package/src/legacy/components/Navigation/SideNavEnvironmentSelector/SideNavEnvironmentSelector.tsx +8 -3
- package/src/legacy/components/Simulator/index.tsx +3 -3
- package/src/legacy/lib/builders/CustomTypeBuilder/TabZone/index.tsx +3 -3
- package/src/modules/userContext/index.ts +5 -5
- package/src/modules/userContext/types.ts +3 -2
- package/src/pages/_app.tsx +95 -93
- package/src/pages/changes.tsx +5 -4
- package/test/__testutils__/index.tsx +10 -13
- package/out/_next/static/0C8VxwongjXZwHPchBnOi/_buildManifest.js +0 -1
- package/out/_next/static/chunks/04ad993f.d7f986af0f739cc9.js +0 -28
- package/out/_next/static/chunks/34-50c64778da33cff6.js +0 -1
- package/out/_next/static/chunks/349-7118116b93278f73.js +0 -4
- package/out/_next/static/chunks/429-1137c819c2bf6b66.js +0 -3
- package/out/_next/static/chunks/50-586dc7ab5e584e76.js +0 -1
- package/out/_next/static/chunks/630-eae75e90b30f201a.js +0 -1
- package/out/_next/static/chunks/pages/changes-c58a60af39167147.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-e6bc7cc6186d6a0f.js +0 -1
- package/out/_next/static/chunks/pages/slices-bf63f937b184b470.js +0 -1
- package/out/_next/static/chunks/webpack-e0c07a2fe4908d81.js +0 -1
- package/out/_next/static/css/cdee5b195444f185.css +0 -1
- package/src/features/environments/actions/useSetEnvironment.ts +0 -22
- package/src/features/errorBoundaries/AppStateErrorBoundary.tsx +0 -108
- package/src/features/errorBoundaries/index.ts +0 -2
- package/src/features/onboarding/useSharedOnboardingExperiment.ts +0 -6
- package/src/legacy/components/ChangesEmptyState/UnauthenticatedView.tsx +0 -31
- package/src/queryClient.tsx +0 -24
- /package/out/_next/static/{0C8VxwongjXZwHPchBnOi → 7uIqfRATU8iBj2XIUVUvD}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[50],{81207:function(e){e.exports=function(e,t,n,o){var i=-1,r=null==e?0:e.length;for(o&&r&&(n=e[++i]);++i<r;)n=t(n,e[i],i,e);return n}},45981:function(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},6435:function(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},83126:function(e,t,n){var o=n(23895),i=n(33880),r=n(8435),a=n(66188);e.exports=function(e){return function(t){var n=i(t=a(t))?r(t):void 0,u=n?n[0]:t.charAt(0),s=n?o(n,1).join(""):t.slice(1);return u[e]()+s}}},34311:function(e,t,n){var o=n(81207),i=n(97329),r=n(11618),a=RegExp("['’]","g");e.exports=function(e){return function(t){return o(r(i(t).replace(a,"")),e,"")}}},61655:function(e,t,n){var o=n(6435)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=o},83559:function(e){var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},75304:function(e){var t="\ud800-\udfff",n="\\u2700-\\u27bf",o="a-z\\xdf-\\xf6\\xf8-\\xff",i="A-Z\\xc0-\\xd6\\xd8-\\xde",r="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="['’]",u="["+r+"]",s="["+o+"]",l="[^"+t+r+"\\d+"+n+o+i+"]",c="(?:\ud83c[\udde6-\uddff]){2}",d="[\ud800-\udbff][\udc00-\udfff]",p="["+i+"]",f="(?:"+s+"|"+l+")",h="(?:"+a+"(?:d|ll|m|re|s|t|ve))?",m="(?:"+a+"(?:D|LL|M|RE|S|T|VE))?",v="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",g="[\\ufe0e\\ufe0f]?",b="(?:\\u200d(?:"+["[^"+t+"]",c,d].join("|")+")"+g+v+")*",y="(?:"+["["+n+"]",c,d].join("|")+")"+(g+v+b),O=RegExp([p+"?"+s+"+"+h+"(?="+[u,p,"$"].join("|")+")","(?:"+p+"|"+l+")+"+m+"(?="+[u,p+f,"$"].join("|")+")",p+"?"+f+"+"+h,p+"+"+m,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",y].join("|"),"g");e.exports=function(e){return e.match(O)||[]}},96009:function(e,t,n){var o=n(82108),i=n(34311)(function(e,t,n){return t=t.toLowerCase(),e+(n?o(t):t)});e.exports=i},82108:function(e,t,n){var o=n(66188),i=n(23779);e.exports=function(e){return i(o(e).toLowerCase())}},97329:function(e,t,n){var o=n(61655),i=n(66188),r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(r,o).replace(a,"")}},23779:function(e,t,n){var o=n(83126)("toUpperCase");e.exports=o},11618:function(e,t,n){var o=n(45981),i=n(83559),r=n(66188),a=n(75304);e.exports=function(e,t,n){return(e=r(e),void 0===(t=n?void 0:t))?i(e)?a(e):o(e):e.match(t)||[]}},36131:function(e,t,n){"use strict";n.d(t,{ZP:function(){return ta}});var o,i,r,a=n(33028),u=n(59147);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,a,u=[],s=!0,l=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=r.call(n)).done)&&(u.push(o.value),u.length!==t);s=!0);}catch(e){l=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(e,t)||(0,u.Z)(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var l=n(59740),c=n(2784),d=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"],p=n(7896),f=n(9249),h=n(87371),m=n(45754),v=n(4309),g=n(51171),b=n(28165),y=n(86522),O=n(56666),x=n(28316);function C(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Z(e){return C(e).getComputedStyle(e)}function w(e){return e instanceof C(e).Node}function I(e){return w(e)?(e.nodeName||"").toLowerCase():""}function S(e){return e instanceof C(e).HTMLElement}function V(e){return e instanceof C(e).Element}function E(e){return"undefined"!=typeof ShadowRoot&&(e instanceof C(e).ShadowRoot||e instanceof ShadowRoot)}function M(e){let{overflow:t,overflowX:n,overflowY:o,display:i}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);let R=Math.round;function L(e){return V(e)?e:e.contextElement}let k={x:1,y:1};function D(e){let t=L(e);if(!S(t))return k;let n=t.getBoundingClientRect(),{width:o,height:i,fallback:r}=function(e){let t=Z(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=S(e),r=i?e.offsetWidth:n,a=i?e.offsetHeight:o,u=R(n)!==r||R(o)!==a;return u&&(n=r,o=a),{width:n,height:o,fallback:u}}(t),a=(r?R(n.width):n.width)/o,u=(r?R(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),u&&Number.isFinite(u)||(u=1),{x:a,y:u}}let P={x:0,y:0};function F(e,t,n,o){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let r=e.getBoundingClientRect(),a=L(e),u=k;t&&(o?V(o)&&(u=D(o)):u=D(e));let s=function(e,t,n){var o,i;if(void 0===t&&(t=!0),!(!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")))return P;let r=e?C(e):window;return!n||t&&n!==r?P:{x:(null==(o=r.visualViewport)?void 0:o.offsetLeft)||0,y:(null==(i=r.visualViewport)?void 0:i.offsetTop)||0}}(a,n,o),l=(r.left+s.x)/u.x,c=(r.top+s.y)/u.y,d=r.width/u.x,p=r.height/u.y;if(a){let e=C(a),t=o&&V(o)?C(o):o,n=e.frameElement;for(;n&&o&&t!==e;){let e=D(n),t=n.getBoundingClientRect(),o=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(o.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(o.paddingTop))*e.y,l*=e.x,c*=e.y,d*=e.x,p*=e.y,l+=t.x,c+=t.y,n=C(n).frameElement}}return{...i={width:d,height:p,x:l,y:c},top:i.y,left:i.x,right:i.x+i.width,bottom:i.y+i.height}}function T(e,t){var n;void 0===t&&(t=[]);let o=function e(t){let n=function(e){if("html"===I(e))return e;let t=e.assignedSlot||e.parentNode||E(e)&&e.host||((w(e)?e.ownerDocument:e.document)||window.document).documentElement;return E(t)?t.host:t}(t);return["html","body","#document"].includes(I(n))?n.ownerDocument.body:S(n)&&M(n)?n:e(n)}(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),r=C(o);return i?t.concat(r,r.visualViewport||[],M(o)?o:[]):t.concat(o,T(o))}var A=c.useLayoutEffect,H=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],U=function(){};function z(e,t){for(var n=arguments.length,o=Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];var r=[].concat(o);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&r.push("".concat(a?"-"===a[0]?e+a:e+"__"+a:e));return r.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var N=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===(0,y.Z)(e)&&null!==e?[e]:[]},B=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var t=(0,l.Z)(e,H);return(0,a.Z)({},t)},j=function(e,t,n){var o=e.cx,i=e.getStyles,r=e.getClassNames,a=e.className;return{css:i(t,e),className:o(null!=n?n:{},r(t,e),a)}};function W(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Y(e){return W(e)?window.pageYOffset:e.scrollTop}function G(e,t){if(W(e)){window.scrollTo(0,t);return}e.scrollTop=t}function _(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:U,i=Y(e),r=t-i,a=0;!function t(){var u;a+=10,G(e,r*((u=(u=a)/n-1)*u*u+1)+i),a<n?window.requestAnimationFrame(t):o(e)}()}function X(e,t){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),i=t.offsetHeight/3;o.bottom+i>n.bottom?G(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):o.top-i<n.top&&G(e,Math.max(t.offsetTop-i,0))}function q(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var K=!1,J="undefined"!=typeof window?window:{};J.addEventListener&&J.removeEventListener&&(J.addEventListener("p",U,{get passive(){return K=!0}}),J.removeEventListener("p",U,!1));var $=K;function Q(e){return null!=e}var ee=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return Object.entries(e).filter(function(e){var t=s(e,1)[0];return!n.includes(t)}).reduce(function(e,t){var n=s(t,2),o=n[0],i=n[1];return e[o]=i,e},{})},et=function(e){return"auto"===e?"bottom":e},en=(0,c.createContext)(null),eo=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,i=e.menuPlacement,r=e.menuPosition,u=e.menuShouldScrollIntoView,l=e.theme,d=((0,c.useContext)(en)||{}).setPortalPlacement,p=(0,c.useRef)(null),f=s((0,c.useState)(o),2),h=f[0],m=f[1],v=s((0,c.useState)(null),2),g=v[0],b=v[1],y=l.spacing.controlHeight;return A(function(){var e=p.current;if(e){var t="fixed"===r,a=function(e){var t=e.maxHeight,n=e.menuEl,o=e.minHeight,i=e.placement,r=e.shouldScroll,a=e.isFixedPosition,u=e.controlHeight,s=function(e){var t=getComputedStyle(e),n="absolute"===t.position,o=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&o.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var c=s.getBoundingClientRect().height,d=n.getBoundingClientRect(),p=d.bottom,f=d.height,h=d.top,m=n.offsetParent.getBoundingClientRect().top,v=a?window.innerHeight:W(s)?window.innerHeight:s.clientHeight,g=Y(s),b=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),O=m-y,x=v-h,C=O+g,Z=c-g-h,w=p-v+g+b,I=g+h-y;switch(i){case"auto":case"bottom":if(x>=f)return{placement:"bottom",maxHeight:t};if(Z>=f&&!a)return r&&_(s,w,160),{placement:"bottom",maxHeight:t};if(!a&&Z>=o||a&&x>=o)return r&&_(s,w,160),{placement:"bottom",maxHeight:a?x-b:Z-b};if("auto"===i||a){var S=t,V=a?O:C;return V>=o&&(S=Math.min(V-b-u,t)),{placement:"top",maxHeight:S}}if("bottom"===i)return r&&G(s,w),{placement:"bottom",maxHeight:t};break;case"top":if(O>=f)return{placement:"top",maxHeight:t};if(C>=f&&!a)return r&&_(s,I,160),{placement:"top",maxHeight:t};if(!a&&C>=o||a&&O>=o){var E=t;return(!a&&C>=o||a&&O>=o)&&(E=a?O-y:C-y),r&&_(s,I,160),{placement:"top",maxHeight:E}}return{placement:"bottom",maxHeight:t};default:throw Error('Invalid placement provided "'.concat(i,'".'))}return l}({maxHeight:o,menuEl:e,minHeight:n,placement:i,shouldScroll:u&&!t,isFixedPosition:t,controlHeight:y});m(a.maxHeight),b(a.placement),null==d||d(a.placement)}},[o,i,r,u,n,d,y]),t({ref:p,placerProps:(0,a.Z)((0,a.Z)({},e),{},{placement:g||et(i),maxHeight:h})})},ei=function(e,t){var n=e.theme,o=n.spacing.baseUnit,i=n.colors;return(0,a.Z)({textAlign:"center"},t?{}:{color:i.neutral40,padding:"".concat(2*o,"px ").concat(3*o,"px")})},er=function(e){var t=e.children,n=e.innerProps;return(0,b.tZ)("div",(0,p.Z)({},j(e,"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),n),t)};er.defaultProps={children:"No options"};var ea=function(e){var t=e.children,n=e.innerProps;return(0,b.tZ)("div",(0,p.Z)({},j(e,"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),n),t)};ea.defaultProps={children:"Loading..."};var eu=["size"],es={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},el=function(e){var t=e.size,n=(0,l.Z)(e,eu);return(0,b.tZ)("svg",(0,p.Z)({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:es},n))},ec=function(e){return(0,b.tZ)(el,(0,p.Z)({size:20},e),(0,b.tZ)("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},ed=function(e){return(0,b.tZ)(el,(0,p.Z)({size:20},e),(0,b.tZ)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},ep=function(e,t){var n=e.isFocused,o=e.theme,i=o.spacing.baseUnit,r=o.colors;return(0,a.Z)({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?r.neutral60:r.neutral20,padding:2*i,":hover":{color:n?r.neutral80:r.neutral40}})},ef=(0,b.F4)(r||(o=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],i||(i=o.slice(0)),r=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(i)}})))),eh=function(e){var t=e.delay,n=e.offset;return(0,b.tZ)("span",{css:(0,b.iv)({animation:"".concat(ef," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},em=function(e){var t=e.innerProps,n=e.isRtl;return(0,b.tZ)("div",(0,p.Z)({},j(e,"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),(0,b.tZ)(eh,{delay:0,offset:n}),(0,b.tZ)(eh,{delay:160,offset:!0}),(0,b.tZ)(eh,{delay:320,offset:!n}))};em.defaultProps={size:4};var ev=["data"],eg=["innerRef","isDisabled","isHidden","inputClassName"],eb={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},ey={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":(0,a.Z)({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},eb)},eO=function(e){var t=e.children,n=e.innerProps;return(0,b.tZ)("div",n,t)},ex={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return(0,b.tZ)("div",(0,p.Z)({},j(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||(0,b.tZ)(ec,null))},Control:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,i=e.innerRef,r=e.innerProps,a=e.menuIsOpen;return(0,b.tZ)("div",(0,p.Z)({ref:i},j(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":a}),r),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return(0,b.tZ)("div",(0,p.Z)({},j(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||(0,b.tZ)(ed,null))},DownChevron:ed,CrossIcon:ec,Group:function(e){var t=e.children,n=e.cx,o=e.getStyles,i=e.getClassNames,r=e.Heading,a=e.headingProps,u=e.innerProps,s=e.label,l=e.theme,c=e.selectProps;return(0,b.tZ)("div",(0,p.Z)({},j(e,"group",{group:!0}),u),(0,b.tZ)(r,(0,p.Z)({},a,{selectProps:c,theme:l,getStyles:o,getClassNames:i,cx:n}),s),(0,b.tZ)("div",null,t))},GroupHeading:function(e){var t=B(e);t.data;var n=(0,l.Z)(t,ev);return(0,b.tZ)("div",(0,p.Z)({},j(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return(0,b.tZ)("div",(0,p.Z)({},j(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return(0,b.tZ)("span",(0,p.Z)({},t,j(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,o=B(e),i=o.innerRef,r=o.isDisabled,u=o.isHidden,s=o.inputClassName,c=(0,l.Z)(o,eg);return(0,b.tZ)("div",(0,p.Z)({},j(e,"input",{"input-container":!0}),{"data-value":n||""}),(0,b.tZ)("input",(0,p.Z)({className:t({input:!0},s),ref:i,style:(0,a.Z)({label:"input",color:"inherit",background:0,opacity:u?0:1,width:"100%"},eb),disabled:r},c)))},LoadingIndicator:em,Menu:function(e){var t=e.children,n=e.innerRef,o=e.innerProps;return(0,b.tZ)("div",(0,p.Z)({},j(e,"menu",{menu:!0}),{ref:n},o),t)},MenuList:function(e){var t=e.children,n=e.innerProps,o=e.innerRef,i=e.isMulti;return(0,b.tZ)("div",(0,p.Z)({},j(e,"menuList",{"menu-list":!0,"menu-list--is-multi":i}),{ref:o},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,o=e.controlElement,i=e.innerProps,r=e.menuPlacement,u=e.menuPosition,l=(0,c.useRef)(null),d=(0,c.useRef)(null),f=s((0,c.useState)(et(r)),2),h=f[0],m=f[1],v=(0,c.useMemo)(function(){return{setPortalPlacement:m}},[]),g=s((0,c.useState)(null),2),y=g[0],O=g[1],C=(0,c.useCallback)(function(){if(o){var e,t={bottom:(e=o.getBoundingClientRect()).bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width},n="fixed"===u?0:window.pageYOffset,i=t[h]+n;(i!==(null==y?void 0:y.offset)||t.left!==(null==y?void 0:y.rect.left)||t.width!==(null==y?void 0:y.rect.width))&&O({offset:i,rect:t})}},[o,u,h,null==y?void 0:y.offset,null==y?void 0:y.rect.left,null==y?void 0:y.rect.width]);A(function(){C()},[C]);var Z=(0,c.useCallback)(function(){"function"==typeof d.current&&(d.current(),d.current=null),o&&l.current&&(d.current=function(e,t,n,o){void 0===o&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=!0,animationFrame:u=!1}=o,s=i||r?[...V(e)?T(e):e.contextElement?T(e.contextElement):[],...T(t)]:[];s.forEach(e=>{let t=!V(e)&&e.toString().includes("V");i&&(!u||t)&&e.addEventListener("scroll",n,{passive:!0}),r&&e.addEventListener("resize",n)});let l,c=null;a&&(c=new ResizeObserver(()=>{n()}),V(e)&&!u&&c.observe(e),V(e)||!e.contextElement||u||c.observe(e.contextElement),c.observe(t));let d=u?F(e):null;return u&&function t(){let o=F(e);d&&(o.x!==d.x||o.y!==d.y||o.width!==d.width||o.height!==d.height)&&n(),d=o,l=requestAnimationFrame(t)}(),n(),()=>{var e;s.forEach(e=>{i&&e.removeEventListener("scroll",n),r&&e.removeEventListener("resize",n)}),null==(e=c)||e.disconnect(),c=null,u&&cancelAnimationFrame(l)}}(o,l.current,C,{elementResize:"ResizeObserver"in window}))},[o,C]);A(function(){Z()},[Z]);var w=(0,c.useCallback)(function(e){l.current=e,Z()},[Z]);if(!t&&"fixed"!==u||!y)return null;var I=(0,b.tZ)("div",(0,p.Z)({ref:w},j((0,a.Z)((0,a.Z)({},e),{},{offset:y.offset,position:u,rect:y.rect}),"menuPortal",{"menu-portal":!0}),i),n);return(0,b.tZ)(en.Provider,{value:v},t?(0,x.createPortal)(I,t):I)},LoadingMessage:ea,NoOptionsMessage:er,MultiValue:function(e){var t=e.children,n=e.components,o=e.data,i=e.innerProps,r=e.isDisabled,u=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,d=n.Remove;return(0,b.tZ)(l,{data:o,innerProps:(0,a.Z)((0,a.Z)({},j(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":r})),i),selectProps:s},(0,b.tZ)(c,{data:o,innerProps:(0,a.Z)({},j(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),(0,b.tZ)(d,{data:o,innerProps:(0,a.Z)((0,a.Z)({},j(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},u),selectProps:s}))},MultiValueContainer:eO,MultiValueLabel:eO,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return(0,b.tZ)("div",(0,p.Z)({role:"button"},n),t||(0,b.tZ)(ec,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,i=e.isSelected,r=e.innerRef,a=e.innerProps;return(0,b.tZ)("div",(0,p.Z)({},j(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":i}),{ref:r,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return(0,b.tZ)("div",(0,p.Z)({},j(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,o=e.isDisabled,i=e.isRtl;return(0,b.tZ)("div",(0,p.Z)({},j(e,"container",{"--is-disabled":o,"--is-rtl":i}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,o=e.innerProps;return(0,b.tZ)("div",(0,p.Z)({},j(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,o=e.isMulti,i=e.hasValue;return(0,b.tZ)("div",(0,p.Z)({},j(e,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i}),n),t)}},eC=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function eZ(e,t){if(e.length!==t.length)return!1;for(var n,o,i=0;i<e.length;i++)if(!((n=e[i])===(o=t[i])||eC(n)&&eC(o)))return!1;return!0}for(var ew={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},eI=function(e){return(0,b.tZ)("span",(0,p.Z)({css:ew},e))},eS={guidance:function(e){var t=e.isSearchable,n=e.isMulti,o=e.isDisabled,i=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(o?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,o=void 0===n?"":n,i=e.labels,r=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(i.length>1?"s":""," ").concat(i.join(","),", selected.");case"select-option":return r?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=e.options,i=e.label,r=void 0===i?"":i,a=e.selectValue,u=e.isDisabled,s=e.isSelected,l=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(r," focused, ").concat(l(a,n),".");if("menu"===t){var c="".concat(s?"selected":"focused").concat(u?" disabled":"");return"option ".concat(r," ").concat(c,", ").concat(l(o,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},eV=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,i=e.focusableOptions,r=e.isFocused,u=e.selectValue,s=e.selectProps,l=e.id,d=s.ariaLiveMessages,p=s.getOptionLabel,f=s.inputValue,h=s.isMulti,m=s.isOptionDisabled,v=s.isSearchable,g=s.menuIsOpen,y=s.options,O=s.screenReaderStatus,x=s.tabSelectsValue,C=s["aria-label"],Z=s["aria-live"],w=(0,c.useMemo)(function(){return(0,a.Z)((0,a.Z)({},eS),d||{})},[d]),I=(0,c.useMemo)(function(){var e="";if(t&&w.onChange){var n=t.option,o=t.options,i=t.removedValue,r=t.removedValues,s=t.value,l=i||n||(Array.isArray(s)?null:s),c=l?p(l):"",d=o||r||void 0,f=d?d.map(p):[],h=(0,a.Z)({isDisabled:l&&m(l,u),label:c,labels:f},t);e=w.onChange(h)}return e},[t,w,m,u,p]),S=(0,c.useMemo)(function(){var e="",t=n||o,r=!!(n&&u&&u.includes(n));if(t&&w.onFocus){var a={focused:t,label:p(t),isDisabled:m(t,u),isSelected:r,options:i,context:t===n?"menu":"value",selectValue:u};e=w.onFocus(a)}return e},[n,o,p,m,w,i,u]),V=(0,c.useMemo)(function(){var e="";if(g&&y.length&&w.onFilter){var t=O({count:i.length});e=w.onFilter({inputValue:f,resultsMessage:t})}return e},[i,f,g,w,y,O]),E=(0,c.useMemo)(function(){var e="";if(w.guidance){var t=o?"value":g?"menu":"input";e=w.guidance({"aria-label":C,context:t,isDisabled:n&&m(n,u),isMulti:h,isSearchable:v,tabSelectsValue:x})}return e},[C,n,o,h,m,v,g,w,u,x]),M="".concat(S," ").concat(V," ").concat(E),R=(0,b.tZ)(c.Fragment,null,(0,b.tZ)("span",{id:"aria-selection"},I),(0,b.tZ)("span",{id:"aria-context"},M)),L=(null==t?void 0:t.action)==="initial-input-focus";return(0,b.tZ)(c.Fragment,null,(0,b.tZ)(eI,{id:l},L&&R),(0,b.tZ)(eI,{"aria-live":Z,"aria-atomic":"false","aria-relevant":"additions text"},r&&!L&&R))},eE=[{base:"A",letters:"AⒶA\xc0\xc1\xc2ẦẤẪẨ\xc3ĀĂẰẮẴẲȦǠ\xc4ǞẢ\xc5ǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"\xc6ǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČ\xc7ḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺE\xc8\xc9\xcaỀẾỄỂẼĒḔḖĔĖ\xcbẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾI\xcc\xcd\xceĨĪĬİ\xcfḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃ\xd1ṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄO\xd2\xd3\xd4ỒỐỖỔ\xd5ṌȬṎŌṐṒŎȮȰ\xd6ȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬ\xd8ǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊU\xd9\xda\xdbŨṸŪṺŬ\xdcǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲ\xddŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚ\xe0\xe1\xe2ầấẫẩ\xe3āăằắẵẳȧǡ\xe4ǟả\xe5ǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"\xe6ǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċč\xe7ḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔe\xe8\xe9\xeaềếễểẽēḕḗĕė\xebẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘi\xec\xed\xeeĩīĭ\xefḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹń\xf1ṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞo\xf2\xf3\xf4ồốỗổ\xf5ṍȭṏōṑṓŏȯȱ\xf6ȫỏőǒȍȏơờớỡởợọộǫǭ\xf8ǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢs\xdfśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤu\xf9\xfa\xfbũṹūṻŭ\xfcǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳ\xfdŷỹȳẏ\xffỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],eM=RegExp("["+eE.map(function(e){return e.letters}).join("")+"]","g"),eR={},eL=0;eL<eE.length;eL++)for(var ek=eE[eL],eD=0;eD<ek.letters.length;eD++)eR[ek.letters[eD]]=ek.base;var eP=function(e){return e.replace(eM,function(e){return eR[e]})},eF=function(e,t){void 0===t&&(t=eZ);var n=null;function o(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var r=e.apply(this,o);return n={lastResult:r,lastArgs:o,lastThis:this},r}return o.clear=function(){n=null},o}(eP),eT=function(e){return e.replace(/^\s+|\s+$/g,"")},eA=function(e){return"".concat(e.label," ").concat(e.value)},eH=["innerRef"];function eU(e){var t=e.innerRef,n=ee((0,l.Z)(e,eH),"onExited","in","enter","exit","appear");return(0,b.tZ)("input",(0,p.Z)({ref:t},n,{css:(0,b.iv)({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var ez=function(e){e.preventDefault(),e.stopPropagation()},eN=["boxSizing","height","overflow","paddingRight","position"],eB={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function ej(e){e.preventDefault()}function eW(e){e.stopPropagation()}function eY(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function eG(){return"ontouchstart"in window||navigator.maxTouchPoints}var e_=!!("undefined"!=typeof window&&window.document&&window.document.createElement),eX=0,eq={capture:!1,passive:!1},eK=function(){return document.activeElement&&document.activeElement.blur()},eJ={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function e$(e){var t,n,o,i,r,a,u,s,l,d,p,f,h,m,v,g,y,O,x,C,Z,w,I,S,V=e.children,E=e.lockEnabled,M=e.captureEnabled,R=(n=(t={isEnabled:void 0===M||M,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}).isEnabled,o=t.onBottomArrive,i=t.onBottomLeave,r=t.onTopArrive,a=t.onTopLeave,u=(0,c.useRef)(!1),s=(0,c.useRef)(!1),l=(0,c.useRef)(0),d=(0,c.useRef)(null),p=(0,c.useCallback)(function(e,t){if(null!==d.current){var n=d.current,l=n.scrollTop,c=n.scrollHeight,p=n.clientHeight,f=d.current,h=t>0,m=c-p-l,v=!1;m>t&&u.current&&(i&&i(e),u.current=!1),h&&s.current&&(a&&a(e),s.current=!1),h&&t>m?(o&&!u.current&&o(e),f.scrollTop=c,v=!0,u.current=!0):!h&&-t>l&&(r&&!s.current&&r(e),f.scrollTop=0,v=!0,s.current=!0),v&&ez(e)}},[o,i,r,a]),f=(0,c.useCallback)(function(e){p(e,e.deltaY)},[p]),h=(0,c.useCallback)(function(e){l.current=e.changedTouches[0].clientY},[]),m=(0,c.useCallback)(function(e){var t=l.current-e.changedTouches[0].clientY;p(e,t)},[p]),v=(0,c.useCallback)(function(e){if(e){var t=!!$&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",h,t),e.addEventListener("touchmove",m,t)}},[m,h,f]),g=(0,c.useCallback)(function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",h,!1),e.removeEventListener("touchmove",m,!1))},[m,h,f]),(0,c.useEffect)(function(){if(n){var e=d.current;return v(e),function(){g(e)}}},[n,v,g]),function(e){d.current=e}),L=(O=(y={isEnabled:E}).isEnabled,C=void 0===(x=y.accountForScrollbars)||x,Z=(0,c.useRef)({}),w=(0,c.useRef)(null),I=(0,c.useCallback)(function(e){if(e_){var t=document.body,n=t&&t.style;if(C&&eN.forEach(function(e){var t=n&&n[e];Z.current[e]=t}),C&&eX<1){var o=parseInt(Z.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,r=window.innerWidth-i+o||0;Object.keys(eB).forEach(function(e){var t=eB[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(r,"px"))}t&&eG()&&(t.addEventListener("touchmove",ej,eq),e&&(e.addEventListener("touchstart",eY,eq),e.addEventListener("touchmove",eW,eq))),eX+=1}},[C]),S=(0,c.useCallback)(function(e){if(e_){var t=document.body,n=t&&t.style;eX=Math.max(eX-1,0),C&&eX<1&&eN.forEach(function(e){var t=Z.current[e];n&&(n[e]=t)}),t&&eG()&&(t.removeEventListener("touchmove",ej,eq),e&&(e.removeEventListener("touchstart",eY,eq),e.removeEventListener("touchmove",eW,eq)))}},[C]),(0,c.useEffect)(function(){if(O){var e=w.current;return I(e),function(){S(e)}}},[O,I,S]),function(e){w.current=e});return(0,b.tZ)(c.Fragment,null,E&&(0,b.tZ)("div",{onClick:eK,css:eJ}),V(function(e){R(e),L(e)}))}var eQ={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},e0=function(e){var t=e.name,n=e.onFocus;return(0,b.tZ)("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:eQ,value:"",onChange:function(){}})},e1={clearIndicator:ep,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,o=e.isFocused,i=e.theme,r=i.colors,u=i.borderRadius,s=i.spacing;return(0,a.Z)({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?r.neutral5:r.neutral0,borderColor:n?r.neutral10:o?r.primary:r.neutral20,borderRadius:u,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(r.primary):void 0,"&:hover":{borderColor:o?r.primary:r.neutral30}})},dropdownIndicator:ep,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,o=n.colors,i=n.spacing;return(0,a.Z)({label:"group",cursor:"default",display:"block"},t?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*i.baseUnit,paddingRight:3*i.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,o=e.theme,i=o.spacing.baseUnit,r=o.colors;return(0,a.Z)({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?r.neutral10:r.neutral20,marginBottom:2*i,marginTop:2*i})},input:function(e,t){var n=e.isDisabled,o=e.value,i=e.theme,r=i.spacing,u=i.colors;return(0,a.Z)((0,a.Z)({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},ey),t?{}:{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,color:u.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,o=e.size,i=e.theme,r=i.colors,u=i.spacing.baseUnit;return(0,a.Z)({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?r.neutral60:r.neutral20,padding:2*u})},loadingMessage:ei,menu:function(e,t){var n,o=e.placement,i=e.theme,r=i.borderRadius,u=i.spacing,s=i.colors;return(0,a.Z)((n={label:"menu"},(0,O.Z)(n,o?({bottom:"top",top:"bottom"})[o]:"bottom","100%"),(0,O.Z)(n,"position","absolute"),(0,O.Z)(n,"width","100%"),(0,O.Z)(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:r,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:u.menuGutter,marginTop:u.menuGutter})},menuList:function(e,t){var n=e.maxHeight,o=e.theme.spacing.baseUnit;return(0,a.Z)({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:o,paddingTop:o})},menuPortal:function(e){var t=e.rect,n=e.offset,o=e.position;return{left:t.left,position:o,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,o=n.spacing,i=n.borderRadius,r=n.colors;return(0,a.Z)({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:r.neutral10,borderRadius:i/2,margin:o.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,o=n.borderRadius,i=n.colors,r=e.cropWithEllipsis;return(0,a.Z)({overflow:"hidden",textOverflow:r||void 0===r?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:o/2,color:i.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,o=n.spacing,i=n.borderRadius,r=n.colors,u=e.isFocused;return(0,a.Z)({alignItems:"center",display:"flex"},t?{}:{borderRadius:i/2,backgroundColor:u?r.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:r.dangerLight,color:r.danger}})},noOptionsMessage:ei,option:function(e,t){var n=e.isDisabled,o=e.isFocused,i=e.isSelected,r=e.theme,u=r.spacing,s=r.colors;return(0,a.Z)({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:i?s.primary:o?s.primary25:"transparent",color:n?s.neutral20:i?s.neutral0:"inherit",padding:"".concat(2*u.baseUnit,"px ").concat(3*u.baseUnit,"px"),":active":{backgroundColor:n?void 0:i?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,o=n.spacing,i=n.colors;return(0,a.Z)({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:i.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,o=e.theme,i=o.spacing,r=o.colors;return(0,a.Z)({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?r.neutral40:r.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,o=e.isMulti,i=e.hasValue,r=e.selectProps.controlShouldRenderValue;return(0,a.Z)({alignItems:"center",display:o&&i&&r?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},e2={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},e6={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:q(),captureMenuScroll:!q(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=(0,a.Z)({ignoreCase:!0,ignoreAccents:!0,stringify:eA,trim:!0,matchFrom:"any"},void 0),o=n.ignoreCase,i=n.ignoreAccents,r=n.stringify,u=n.trim,s=n.matchFrom,l=u?eT(t):t,c=u?eT(r(e)):r(e);return o&&(l=l.toLowerCase(),c=c.toLowerCase()),i&&(l=eF(l),c=eP(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function e4(e,t,n,o){var i=te(e,t,n),r=tt(e,t,n),a=e8(e,t),u=e7(e,t);return{type:"option",data:t,isDisabled:i,isSelected:r,label:a,value:u,index:o}}function e3(e,t){return e.options.map(function(n,o){if("options"in n){var i=n.options.map(function(n,o){return e4(e,n,t,o)}).filter(function(t){return e9(e,t)});return i.length>0?{type:"group",data:n,options:i,index:o}:void 0}var r=e4(e,n,t,o);return e9(e,r)?r:void 0}).filter(Q)}function e5(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,(0,g.Z)(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function e9(e,t){var n=e.inputValue,o=t.data,i=t.isSelected,r=t.label,a=t.value;return(!to(e)||!i)&&tn(e,{label:r,value:a,data:o},void 0===n?"":n)}var e8=function(e,t){return e.getOptionLabel(t)},e7=function(e,t){return e.getOptionValue(t)};function te(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function tt(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var o=e7(e,t);return n.some(function(t){return e7(e,t)===o})}function tn(e,t,n){return!e.filterOption||e.filterOption(t,n)}var to=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},ti=1,tr=function(e){(0,m.Z)(n,e);var t=(0,v.Z)(n);function n(e){var o;if((0,f.Z)(this,n),(o=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.instancePrefix="",o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(e){o.controlRef=e},o.focusedOptionRef=null,o.getFocusedOptionRef=function(e){o.focusedOptionRef=e},o.menuListRef=null,o.getMenuListRef=function(e){o.menuListRef=e},o.inputRef=null,o.getInputRef=function(e){o.inputRef=e},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(e,t){var n=o.props,i=n.onChange,r=n.name;t.name=r,o.ariaOnChange(e,t),i(e,t)},o.setValue=function(e,t,n){var i=o.props,r=i.closeMenuOnSelect,a=i.isMulti,u=i.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:u}),r&&(o.setState({inputIsHiddenAfterUpdate:!a}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(e,{action:t,option:n})},o.selectOption=function(e){var t=o.props,n=t.blurInputOnSelect,i=t.isMulti,r=t.name,a=o.state.selectValue,u=i&&o.isOptionSelected(e,a),s=o.isOptionDisabled(e,a);if(u){var l=o.getOptionValue(e);o.setValue(a.filter(function(e){return o.getOptionValue(e)!==l}),"deselect-option",e)}else if(s){o.ariaOnChange(e,{action:"select-option",option:e,name:r});return}else i?o.setValue([].concat((0,g.Z)(a),[e]),"select-option",e):o.setValue(e,"select-option");n&&o.blurInput()},o.removeValue=function(e){var t,n=o.props.isMulti,i=o.state.selectValue,r=o.getOptionValue(e),a=i.filter(function(e){return o.getOptionValue(e)!==r}),u=(t=a[0]||null,n?a:t);o.onChange(u,{action:"remove-value",removedValue:e}),o.focusInput()},o.clearValue=function(){var e,t,n=o.state.selectValue;o.onChange((e=o.props.isMulti,t=[],e?t:null),{action:"clear",removedValues:n})},o.popValue=function(){var e,t=o.props.isMulti,n=o.state.selectValue,i=n[n.length-1],r=n.slice(0,n.length-1),a=(e=r[0]||null,t?r:e);o.onChange(a,{action:"pop-value",removedValue:i})},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return z.apply(void 0,[o.props.classNamePrefix].concat(t))},o.getOptionLabel=function(e){return e8(o.props,e)},o.getOptionValue=function(e){return e7(o.props,e)},o.getStyles=function(e,t){var n=o.props.unstyled,i=e1[e](t,n);i.boxSizing="border-box";var r=o.props.styles[e];return r?r(i,t):i},o.getClassNames=function(e,t){var n,i;return null===(n=(i=o.props.classNames)[e])||void 0===n?void 0:n.call(i,t)},o.getElementId=function(e){return"".concat(o.instancePrefix,"-").concat(e)},o.getComponents=function(){var e;return e=o.props,(0,a.Z)((0,a.Z)({},ex),e.components)},o.buildCategorizedOptions=function(){return e3(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return e5(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(e,t){o.setState({ariaSelection:(0,a.Z)({value:e},t)})},o.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(e){o.blockOptionHover=!1},o.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&o.onMenuClose():t&&o.openMenu("first"):(t&&(o.openAfterFocus=!0),o.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},o.onDropdownIndicatorMouseDown=function(e){if((!e||"mousedown"!==e.type||0===e.button)&&!o.props.isDisabled){var t=o.props,n=t.isMulti,i=t.menuIsOpen;o.focusInput(),i?(o.setState({inputIsHiddenAfterUpdate:!n}),o.onMenuClose()):o.openMenu("first"),e.preventDefault()}},o.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(o.clearValue(),e.preventDefault(),o.openAfterFocus=!1,"touchend"===e.type?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(e){"boolean"==typeof o.props.closeMenuOnScroll?e.target instanceof HTMLElement&&W(e.target)&&o.props.onMenuClose():"function"==typeof o.props.closeMenuOnScroll&&o.props.closeMenuOnScroll(e)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(o.initialTouchX=n.clientX,o.initialTouchY=n.clientY,o.userIsDragging=!1)},o.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var i=Math.abs(n.clientX-o.initialTouchX),r=Math.abs(n.clientY-o.initialTouchY);o.userIsDragging=i>5||r>5}},o.onTouchEnd=function(e){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(e.target)&&o.menuListRef&&!o.menuListRef.contains(e.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(e){o.userIsDragging||o.onControlMouseDown(e)},o.onClearIndicatorTouchEnd=function(e){o.userIsDragging||o.onClearIndicatorMouseDown(e)},o.onDropdownIndicatorTouchEnd=function(e){o.userIsDragging||o.onDropdownIndicatorMouseDown(e)},o.handleInputChange=function(e){var t=o.props.inputValue,n=e.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(n,{action:"input-change",prevInputValue:t}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(e){o.props.onFocus&&o.props.onFocus(e),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(e){var t=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(e),o.onInputChange("",{action:"input-blur",prevInputValue:t}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(e){o.blockOptionHover||o.state.focusedOption===e||o.setState({focusedOption:e})},o.shouldHideSelectedOptions=function(){return to(o.props)},o.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),o.focus()},o.onKeyDown=function(e){var t=o.props,n=t.isMulti,i=t.backspaceRemovesValue,r=t.escapeClearsValue,a=t.inputValue,u=t.isClearable,s=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=o.state,h=f.focusedOption,m=f.focusedValue,v=f.selectValue;if(!s){if("function"==typeof c&&(c(e),e.defaultPrevented))return;switch(o.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;o.focusValue("previous");break;case"ArrowRight":if(!n||a)return;o.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)o.removeValue(m);else{if(!i)return;n?o.popValue():u&&o.clearValue()}break;case"Tab":if(o.isComposing||e.shiftKey||!l||!d||!h||p&&o.isOptionSelected(h,v))return;o.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(l){if(!h||o.isComposing)return;o.selectOption(h);break}return;case"Escape":l?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:a}),o.onMenuClose()):u&&r&&o.clearValue();break;case" ":if(a)return;if(!l){o.openMenu("first");break}if(!h)return;o.selectOption(h);break;case"ArrowUp":l?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":l?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!l)return;o.focusOption("pageup");break;case"PageDown":if(!l)return;o.focusOption("pagedown");break;case"Home":if(!l)return;o.focusOption("first");break;case"End":if(!l)return;o.focusOption("last");break;default:return}e.preventDefault()}},o.instancePrefix="react-select-"+(o.props.instanceId||++ti),o.state.selectValue=N(e.value),e.menuIsOpen&&o.state.selectValue.length){var i=o.buildFocusableOptions(),r=i.indexOf(o.state.selectValue[0]);o.state.focusedOption=i[r]}return o}return(0,h.Z)(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&X(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,o=t.menuIsOpen,i=this.state.isFocused;(i&&!n&&e.isDisabled||i&&o&&!e.menuIsOpen)&&this.focusInput(),i&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):i||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(X(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,o=n.selectValue,i=n.isFocused,r=this.buildFocusableOptions(),a="first"===e?0:r.length-1;if(!this.props.isMulti){var u=r.indexOf(o[0]);u>-1&&(a=u)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:r[a]},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,o=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=n.indexOf(o);o||(i=-1);var r=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===i?0:-1===i?r:i-1;break;case"next":i>-1&&i<r&&(a=i+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var i=0,r=o.indexOf(n);n||(r=-1),"up"===e?i=r>0?r-1:o.length-1:"down"===e?i=(r+1)%o.length:"pageup"===e?(i=r-t)<0&&(i=0):"pagedown"===e?(i=r+t)>o.length-1&&(i=o.length-1):"last"===e&&(i=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[i],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(e2):(0,a.Z)((0,a.Z)({},e2),this.props.theme):e2}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,o=this.getClassNames,i=this.getValue,r=this.selectOption,a=this.setValue,u=this.props,s=u.isMulti,l=u.isRtl,c=u.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:o,getValue:i,hasValue:this.hasValue(),isMulti:s,isRtl:l,options:c,selectOption:r,selectProps:u,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return te(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return tt(this.props,e,t)}},{key:"filterOption",value:function(e,t){return tn(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"!=typeof this.props.formatOptionLabel)return this.getOptionLabel(e);var n=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:o})}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,i=e.inputValue,r=e.tabIndex,u=e.form,s=e.menuIsOpen,l=e.required,d=this.getComponents().Input,f=this.state,h=f.inputIsHidden,m=f.ariaSelection,v=this.commonProps,g=o||this.getElementId("input"),b=(0,a.Z)((0,a.Z)((0,a.Z)({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox"},s&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?(null==m?void 0:m.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?c.createElement(d,(0,p.Z)({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:g,innerRef:this.getInputRef,isDisabled:t,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:r,form:u,type:"text",value:i},b)):c.createElement(eU,(0,p.Z)({id:g,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:U,onFocus:this.onInputFocus,disabled:t,tabIndex:r,inputMode:"none",form:u,value:""},b))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,i=t.MultiValueLabel,r=t.MultiValueRemove,a=t.SingleValue,u=t.Placeholder,s=this.commonProps,l=this.props,d=l.controlShouldRenderValue,f=l.isDisabled,h=l.isMulti,m=l.inputValue,v=l.placeholder,g=this.state,b=g.selectValue,y=g.focusedValue,O=g.isFocused;if(!this.hasValue()||!d)return m?null:c.createElement(u,(0,p.Z)({},s,{key:"placeholder",isDisabled:f,isFocused:O,innerProps:{id:this.getElementId("placeholder")}}),v);if(h)return b.map(function(t,a){var u=t===y,l="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return c.createElement(n,(0,p.Z)({},s,{components:{Container:o,Label:i,Remove:r},isFocused:u,isDisabled:f,key:l,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))});if(m)return null;var x=b[0];return c.createElement(a,(0,p.Z)({},s,{data:x,isDisabled:f}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,i=n.isLoading,r=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||i)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return c.createElement(e,(0,p.Z)({},t,{innerProps:a,isFocused:r}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,i=n.isLoading,r=this.state.isFocused;return e&&i?c.createElement(e,(0,p.Z)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:r})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,i=this.props.isDisabled,r=this.state.isFocused;return c.createElement(n,(0,p.Z)({},o,{isDisabled:i,isFocused:r}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return c.createElement(e,(0,p.Z)({},t,{innerProps:i,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e,t=this,n=this.getComponents(),o=n.Group,i=n.GroupHeading,r=n.Menu,a=n.MenuList,u=n.MenuPortal,s=n.LoadingMessage,l=n.NoOptionsMessage,d=n.Option,f=this.commonProps,h=this.state.focusedOption,m=this.props,v=m.captureMenuScroll,g=m.inputValue,b=m.isLoading,y=m.loadingMessage,O=m.minMenuHeight,x=m.maxMenuHeight,C=m.menuIsOpen,Z=m.menuPlacement,w=m.menuPosition,I=m.menuPortalTarget,S=m.menuShouldBlockScroll,V=m.menuShouldScrollIntoView,E=m.noOptionsMessage,M=m.onMenuScrollToTop,R=m.onMenuScrollToBottom;if(!C)return null;var L=function(e,n){var o=e.type,i=e.data,r=e.isDisabled,a=e.isSelected,u=e.label,s=e.value,l=h===i,m=r?void 0:function(){return t.onOptionHover(i)},v=r?void 0:function(){return t.selectOption(i)},g="".concat(t.getElementId("option"),"-").concat(n);return c.createElement(d,(0,p.Z)({},f,{innerProps:{id:g,onClick:v,onMouseMove:m,onMouseOver:m,tabIndex:-1},data:i,isDisabled:r,isSelected:a,key:g,label:u,type:o,value:s,isFocused:l,innerRef:l?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(e.data,"menu"))};if(this.hasOptions())e=this.getCategorizedOptions().map(function(e){if("group"===e.type){var n=e.data,r=e.options,a=e.index,u="".concat(t.getElementId("group"),"-").concat(a),s="".concat(u,"-heading");return c.createElement(o,(0,p.Z)({},f,{key:u,data:n,options:r,Heading:i,headingProps:{id:s,data:e.data},label:t.formatGroupLabel(e.data)}),e.options.map(function(e){return L(e,"".concat(a,"-").concat(e.index))}))}if("option"===e.type)return L(e,"".concat(e.index))});else if(b){var k=y({inputValue:g});if(null===k)return null;e=c.createElement(s,f,k)}else{var D=E({inputValue:g});if(null===D)return null;e=c.createElement(l,f,D)}var P={minMenuHeight:O,maxMenuHeight:x,menuPlacement:Z,menuPosition:w,menuShouldScrollIntoView:V},F=c.createElement(eo,(0,p.Z)({},f,P),function(n){var o=n.ref,i=n.placerProps,u=i.placement,s=i.maxHeight;return c.createElement(r,(0,p.Z)({},f,P,{innerRef:o,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove,id:t.getElementId("listbox")},isLoading:b,placement:u}),c.createElement(e$,{captureEnabled:v,onTopArrive:M,onBottomArrive:R,lockEnabled:S},function(n){return c.createElement(a,(0,p.Z)({},f,{innerRef:function(e){t.getMenuListRef(e),n(e)},isLoading:b,maxHeight:s,focusedOption:h}),e)}))});return I||"fixed"===w?c.createElement(u,(0,p.Z)({},f,{appendTo:I,controlElement:this.controlRef,menuPlacement:Z,menuPosition:w}),F):F}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,i=t.isMulti,r=t.name,a=t.required,u=this.state.selectValue;if(a&&!this.hasValue()&&!o)return c.createElement(e0,{name:r,onFocus:this.onValueInputFocus});if(r&&!o){if(i){if(n){var s=u.map(function(t){return e.getOptionValue(t)}).join(n);return c.createElement("input",{name:r,type:"hidden",value:s})}var l=u.length>0?u.map(function(t,n){return c.createElement("input",{key:"i-".concat(n),name:r,type:"hidden",value:e.getOptionValue(t)})}):c.createElement("input",{name:r,type:"hidden",value:""});return c.createElement("div",null,l)}var d=u[0]?this.getOptionValue(u[0]):"";return c.createElement("input",{name:r,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,i=t.focusedValue,r=t.isFocused,a=t.selectValue,u=this.getFocusableOptions();return c.createElement(eV,(0,p.Z)({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:i,isFocused:r,selectValue:a,focusableOptions:u}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,i=e.ValueContainer,r=this.props,a=r.className,u=r.id,s=r.isDisabled,l=r.menuIsOpen,d=this.state.isFocused,f=this.commonProps=this.getCommonProps();return c.createElement(o,(0,p.Z)({},f,{className:a,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:d}),this.renderLiveRegion(),c.createElement(t,(0,p.Z)({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:d,menuIsOpen:l}),c.createElement(i,(0,p.Z)({},f,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),c.createElement(n,(0,p.Z)({},f,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,o=t.prevProps,i=t.clearFocusValueOnUpdate,r=t.inputIsHiddenAfterUpdate,u=t.ariaSelection,s=t.isFocused,l=t.prevWasFocused,c=e.options,d=e.value,p=e.menuIsOpen,f=e.inputValue,h=e.isMulti,m=N(d),v={};if(o&&(d!==o.value||c!==o.options||p!==o.menuIsOpen||f!==o.inputValue)){var g,b=p?e5(e3(e,m)):[],y=i?function(e,t){var n=e.focusedValue,o=e.selectValue.indexOf(n);if(o>-1){if(t.indexOf(n)>-1)return n;if(o<t.length)return t[o]}return null}(t,m):null;v={selectValue:m,focusedOption:(g=t.focusedOption)&&b.indexOf(g)>-1?g:b[0],focusedValue:y,clearFocusValueOnUpdate:!1}}var O=null!=r&&e!==o?{inputIsHidden:r,inputIsHiddenAfterUpdate:void 0}:{},x=u,C=s&&l;return s&&!C&&(x={value:(n=m[0]||null,h?m:n),options:m,action:"initial-input-focus"},C=!l),(null==u?void 0:u.action)==="initial-input-focus"&&(x=null),(0,a.Z)((0,a.Z)((0,a.Z)({},v),O),{},{prevProps:e,ariaSelection:x,prevWasFocused:C})}}]),n}(c.Component);tr.defaultProps=e6,n(2107);var ta=(0,c.forwardRef)(function(e,t){var n,o,i,r,u,f,h,m,v,g,b,y,O,x,C,Z,w,I,S,V,E,M,R,L,k,D,P,F=(n=e.defaultInputValue,o=e.defaultMenuIsOpen,i=e.defaultValue,r=e.inputValue,u=e.menuIsOpen,f=e.onChange,h=e.onInputChange,m=e.onMenuClose,v=e.onMenuOpen,g=e.value,b=(0,l.Z)(e,d),O=(y=s((0,c.useState)(void 0!==r?r:void 0===n?"":n),2))[0],x=y[1],Z=(C=s((0,c.useState)(void 0!==u?u:void 0!==o&&o),2))[0],w=C[1],S=(I=s((0,c.useState)(void 0!==g?g:void 0===i?null:i),2))[0],V=I[1],E=(0,c.useCallback)(function(e,t){"function"==typeof f&&f(e,t),V(e)},[f]),M=(0,c.useCallback)(function(e,t){var n;"function"==typeof h&&(n=h(e,t)),x(void 0!==n?n:e)},[h]),R=(0,c.useCallback)(function(){"function"==typeof v&&v(),w(!0)},[v]),L=(0,c.useCallback)(function(){"function"==typeof m&&m(),w(!1)},[m]),k=void 0!==r?r:O,D=void 0!==u?u:Z,P=void 0!==g?g:S,(0,a.Z)((0,a.Z)({},b),{},{inputValue:k,menuIsOpen:D,onChange:E,onInputChange:M,onMenuClose:L,onMenuOpen:R,value:P}));return c.createElement(tr,(0,p.Z)({ref:t},F))})},926:function(e,t,n){"use strict";function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}n.d(t,{Z:function(){return o}})},9249:function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return o}})},87371:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var o=n(32802);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,o.Z)(i.key),i)}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},4309:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var o=n(95058),i=n(70352),r=n(86522),a=n(80753);function u(e){var t=(0,i.Z)();return function(){var n,i=(0,o.Z)(e);return n=t?Reflect.construct(i,arguments,(0,o.Z)(this).constructor):i.apply(this,arguments),function(e,t){if(t&&("object"===(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return(0,a.Z)(e)}(this,n)}}},45754:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var o=n(88960);function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,o.Z)(e,t)}},59740:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var o=n(31461);function i(e,t){if(null==e)return{};var n,i,r=(0,o.Z)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}},51171:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var o=n(926),i=n(59147);function r(e){return function(e){if(Array.isArray(e))return(0,o.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,i.Z)(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},59147:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var o=n(926);function i(e,t){if(e){if("string"==typeof e)return(0,o.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return(0,o.Z)(e,t)}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[630],{35289:function(e,t,n){"use strict";n.d(t,{aV:function(){return s},Bu:function(){return d}});var i=n(52322),r=n(14226),l=n(6277),o=n(13834),a=n.n(o);let s=e=>{let{border:t=!0,...n}=e;return(0,i.jsx)("div",{...n,className:(0,l.Z)(a().root,t&&a()["root-border"])})},d=e=>{let{actions:t,children:n,toggle:l,...o}=e;return(0,i.jsxs)("div",{...o,className:a().header,children:[(0,i.jsx)(r.bL,{color:"grey11",component:"span",noWrap:!0,variant:"bold",children:n}),l,t?(0,i.jsx)("div",{className:a().headerActions,children:t}):null]})}},6882:function(e,t,n){"use strict";n.d(t,{$S:function(){return x},$U:function(){return c},BB:function(){return m},Fj:function(){return b},J9:function(){return v},L0:function(){return u},Qr:function(){return i},U:function(){return y},UG:function(){return g},Wc:function(){return p},XU:function(){return k},_M:function(){return f},_n:function(){return h},gA:function(){return o},pG:function(){return r},pV:function(){return d},pt:function(){return l},tg:function(){return s},uG:function(){return a}});let i={name:"Boolean",description:"A true or false toggle.",icon:"toggleOff",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295526/DEV_TOOLS/SM_FIELDS/Type_Boolean_cbwg8k.png",type:"Boolean"},r={name:"Color",description:"A color in hex format.",icon:"colorLens",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295521/DEV_TOOLS/SM_FIELDS/Type_Color_nyoeit.png",type:"Color"},l={name:"Date",description:"A date without time.",icon:"dateRange",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295525/DEV_TOOLS/SM_FIELDS/Type_Date_dsuaeq.png",type:"Date"},o={name:"Embed",description:"A video, song, or oEmbed link.",icon:"code",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295523/DEV_TOOLS/SM_FIELDS/Type_Embed_wwssvd.png",type:"Embed"},a={name:"Geopoint",description:"A geographical coordinate.",icon:"place",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295522/DEV_TOOLS/SM_FIELDS/Type_GeoPoint_lpq0sm.png",type:"GeoPoint"},s={name:"Image",description:"A responsive image.",icon:"image",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295520/DEV_TOOLS/SM_FIELDS/Type_Image_zyatxy.png",type:"Image"},d={name:"Link",description:"A link to a website, asset, or document.",icon:"link",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295528/DEV_TOOLS/SM_FIELDS/Type_Link_bgslgy.png",type:"Link"},c={name:"Content Relationship",description:"A reference to a Prismic document.",icon:"settingsEthernet",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295527/DEV_TOOLS/SM_FIELDS/Type_Content_RelationShip_s4z4nh.png",type:"Link",variant:"ContentRelationship"},u={name:"Link to Media",description:"A link to a media asset.",icon:"attachFile",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295519/DEV_TOOLS/SM_FIELDS/Type_LinkToMedia_m2p0ce.png",type:"Link",variant:"LinkToMedia"},p={name:"Number",description:"An integer or float.",icon:"pin",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295522/DEV_TOOLS/SM_FIELDS/Type_Number_o3olop.png",type:"Number"},h={name:"Rich Text",description:"Text with formatting options.",icon:"textFields",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295530/DEV_TOOLS/SM_FIELDS/Type_Rich_Text_fxdyar.png",type:"StructuredText"},f={name:"Select",description:"A dropdown of options.",icon:"arrowDropDownCircle",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295527/DEV_TOOLS/SM_FIELDS/Type_Select_bedjei.png",type:"Select"},m={name:"Table",description:"A structured table.",icon:"table",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1737381854/FIELDS_SM/Table_f47jnq.png",type:"Table"},x={name:"Text",description:"A text string without formatting.",icon:"title",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295529/DEV_TOOLS/SM_FIELDS/Type_Key_Text_xrqf45.png",type:"Text"},g={name:"Timestamp",description:"A date and time.",icon:"schedule",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295524/DEV_TOOLS/SM_FIELDS/Type_Timestamp_fkr5iw.png",type:"Timestamp"},v=[s,x,h,i,p,f,d,u,r,l,m,g,o,a,c],b={name:"UID",description:"Unique Identifier",icon:"tag",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295519/DEV_TOOLS/SM_FIELDS/Type_UID_hrwzug.png",type:"UID"},y={name:"Repeatable Group",description:"A set of fields that editors can repeat.",icon:"createNewFolder",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721314577/DEV_TOOLS/SM_FIELDS/Type_Group_uwwco0.png",type:"Group"},j={...y,variant:"NestedGroup"},k=[...v,b,y,j]},34166:function(e,t,n){"use strict";n.d(t,{nZ:function(){return c},rT:function(){return p},tB:function(){return u}});var i=n(52322),r=n(14226),l=n(2784),o=n(30195),a=n(94160),s=n(76611),d=n(5683);function c(e){let{type:t,library:n,sliceId:i,variationId:r,langSmithUrl:l}=e,o=(0,d.i)({type:t,library:n,sliceId:i,variationId:r}),a=JSON.stringify({langSmithUrl:l});localStorage.setItem(o,a)}function u(e){let{type:t,library:n,sliceId:i,variationId:r}=e,l=(0,d.i)({type:t,library:n,sliceId:i,variationId:r});localStorage.removeItem(l)}function p(e){let{type:t,library:n,sliceId:c,variationId:u}=e,{key:p,value:h,done:f}=function(e){let{type:t,library:n,sliceId:i,variationId:r}=e,l=(0,d.i)({type:t,library:n,sliceId:i,variationId:r}),[a,c]=(0,s.V)(l,void 0,{schema:o.z.object({langSmithUrl:o.z.string().url().optional()})});return{key:l,value:a,done:()=>c(void 0)}}({type:t,library:n,sliceId:c,variationId:u}),[m,x]=(0,l.useState)(),g=e=>()=>{h&&(x(p),a.Xe.track({event:"slice-generation-feedback",type:t,sliceId:c,variationId:u,feedback:e,langSmithUrl:h.langSmithUrl}),f())};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.be,{children:(0,i.jsx)(r.bQ,{anchor:(0,i.jsx)(r.D,{width:"100%",justifyContent:"center",position:"absolute",bottom:64}),icon:"check",title:"Thanks for your feedback!",seconds:2,open:!!m,onOpenChange:e=>{e||x(void 0)}},m)}),(0,i.jsx)(r.i,{children:h&&(0,i.jsxs)(r.D,{flexDirection:"row",justifyContent:"end",gap:8,alignItems:"center",children:[(0,i.jsx)(r.bL,{color:"grey11",children:"Did the AI get it right?"}),(0,i.jsxs)(r.D,{flexDirection:"row",gap:4,children:[(0,i.jsx)(r.c3,{side:"bottom",sideOffset:4,variant:"text",content:"Looks good",children:(0,i.jsx)(r.aZ,{variant:"solid",size:"small",icon:"thumbUp",onClick:g("up")})}),(0,i.jsx)(r.c3,{side:"bottom",sideOffset:4,variant:"text",content:"Needs improvement",children:(0,i.jsx)(r.aZ,{variant:"solid",size:"small",icon:"thumbDown",onClick:g("down")})})]})]})})]})}},23094:function(e,t,n){"use strict";n.d(t,{X:function(){return l}});var i=n(52322),r=n(14226);let l=e=>{let t;let{status:n}=e;switch(n){case"pending":t={icon:(0,i.jsx)(r.bg,{color:"grey11"}),text:"Saving..."};break;case"failed":t={icon:(0,i.jsx)(r.aX,{name:"close",color:"tomato11",size:"medium"}),text:"Failed to save"};break;case"done":t={icon:(0,i.jsx)(r.aX,{name:"check",color:"green11",size:"medium"}),text:"Auto-saved"}}return(0,i.jsxs)(r.D,{gap:8,alignItems:"center",children:[t.icon,(0,i.jsx)(r.bL,{color:"grey11",children:t.text})]})}},6609:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});var i=n(52322),r=n(14226),l=n(6882);function o(e){let{open:t,onOpenChange:n,disabled:o=!1,onSelectField:s,fields:d,triggerDataTestId:c="add-field",trigger:u}=e,p=d.filter(e=>l.J9.some(t=>t.name===e.name)||e.name===l.Fj.name),h=d.find(e=>e.name===l.U.name);return(0,i.jsxs)(r.ar,{open:t,onOpenChange:n,children:[(0,i.jsx)(r.av,{disabled:o,children:null!=u?u:(0,i.jsx)(r.E,{startIcon:"add",color:"grey","data-testid":c,children:"Add a field"})}),(0,i.jsxs)(r.as,{align:"end",maxHeight:400,collisionPadding:8,children:[(0,i.jsx)(r.au,{children:"Single fields"}),p.map(e=>(0,i.jsx)(a,{field:e,onSelectField:s},e.name)),h&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.au,{children:"Set of fields"}),(0,i.jsx)(a,{field:h,onSelectField:s})]})]})]})}function a(e){let{field:t,onSelectField:n}=e,{type:l,variant:o,name:a,icon:s,description:d,thumbnail:c}=t;return(0,i.jsx)(r.at,{startIcon:(0,i.jsx)(r.aX,{name:s,size:"large"}),description:d,onSelect:()=>n(null!=o?o:l),renderTooltip:e=>(0,i.jsx)(r.c3,{visible:!0,variant:"custom",content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.a_,{src:c,borderRadius:4,sx:{height:170,width:278},animateOnLoad:!1}),(0,i.jsx)(r.bL,{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,n){"use strict";n.d(t,{zE:function(){return d},Vg:function(){return j},WP:function(){return C}});var i=n(52322),r=n(47124),l=n(14226),o=n(2784),a=n(50477),s=n(87446);function d(e){return(0,i.jsx)(s.h,{renderError:()=>(0,i.jsxs)(l.D,{alignItems:"center",gap:8,children:[(0,i.jsx)(l.aX,{name:"alert",size:"small",color:"tomato10"}),(0,i.jsx)(l.bL,{color:"tomato10",children:"Error loading your types"})]}),children:(0,i.jsx)(l.bB,{fallback:(0,i.jsxs)(l.D,{flexDirection:"column",position:"relative",children:[(0,i.jsx)(l.bx,{height:240}),(0,i.jsxs)(l.D,{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",alignItems:"center",gap:8,children:[(0,i.jsx)(l.aX,{name:"autorenew",size:"small",color:"grey11"}),(0,i.jsx)(l.bL,{color:"grey11",children:"Loading your types..."})]})]}),children:(0,i.jsx)(c,{...e})})})}function c(e){let{value:t,onChange:n}=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 n=e.flatMap(e=>{var n;return null!==(n=t.find(t=>t.id===L(e)))&&void 0!==n?n:[]});return{allCustomTypes:t,pickedCustomTypes:n}}(t),d=t?j({linkCustomtypes:t,allCustomTypes:r}):{};return(0,i.jsxs)(l.D,{overflow:"hidden",flexDirection:"column",border:!0,borderRadius:6,width:"100%",children:[(0,i.jsx)(l.D,{border:{bottom:!0},padding:{inline:16,bottom:16,top:12},flexDirection:"column",gap:8,children:s.length>0?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l.D,{flexDirection:"column",children:[(0,i.jsx)(l.bL,{variant:"h4",color:"grey12",children:"Allowed type"}),(0,i.jsxs)(l.bL,{color:"grey11",children:["Select a single type that editors can link to in the Page Builder.",(0,i.jsx)("br",{}),"For the selected type, choose which fields to include in the API response."]}),s.length>1&&(0,i.jsx)(l.D,{margin:{block:12},children:(0,i.jsx)(l.f,{color:"warn",icon:"alert",subtitle:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.bL,{color:"inherit",variant:"bold",children:"Legacy mode. Keep only one type to enable the improved Content Relationship feature."}),(0,i.jsx)("br",{}),(0,i.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,i.jsx)(l.bL,{color:"inherit",variant:"bold",children:"See documentation"}),(0,i.jsx)(l.aX,{name:"arrowForward",size:"small",color:"inherit"})]})]})})})]}),s.map(e=>{var o;return(0,i.jsxs)(l.D,{gap:4,padding:8,border:!0,borderRadius:6,borderColor:"grey6",backgroundColor:"white",justifyContent:"space-between",children:[s.length>1?(0,i.jsx)(l.bL,{children:e.id}):(0,i.jsx)(l.c5,{children:(0,i.jsx)(h,{customType:e,onChange:i=>{n(function(e){let{linkCustomtypes:t,fieldCheckMap:n,newCustomType:i,customTypeId:r}=e,l=[],o=Object.entries({...n,[r]:i}).flatMap(e=>{let[t,n]=e,i=Object.entries(n).flatMap(e=>{let[t,n]=e;if("group"===n.type){let e=Object.entries(n.value).flatMap(e=>{let[t,n]=e;if("checkbox"===n.type)return n.value?t:[];let i=S(n.value);return i.length>0?{id:t,customtypes:i}:[]});return e.length>0?{id:t,fields:e}:[]}if("contentRelationship"===n.type){let e=S(n.value);return e.length>0?{id:t,customtypes:e}:[]}return n.value?t:[]});return i.length>0?{id:t,fields:i}:[]});if(!t)return o;for(let e of t){let t=o.find(t=>L(t)===L(e));void 0!==t?l.push(t):L(e)===r?l.push(L(e)):l.push(e)}return l}({fieldCheckMap:d,newCustomType:i,linkCustomtypes:t,customTypeId:e.id}))},fieldCheckMap:null!==(o=d[e.id])&&void 0!==o?o:{},allCustomTypes:r})}),(0,i.jsx)(l.aZ,{icon:"close",size:"small",onClick:()=>{var i;return i=e.id,void(t&&n(t.filter(e=>L(e)!==i)))},sx:{height:24,width:24},hiddenLabel:"Remove type"})]},e.id)})]}):(0,i.jsx)(u,{onSelect:function(e){n(t?[...t,e]:[e])},allCustomTypes:r})}),(0,i.jsx)(l.D,{backgroundColor:"white",flexDirection:"column",padding:12,children:(0,i.jsxs)(l.bL,{variant:"normal",color:"grey11",children:["Have ideas for improving this field?"," ",(0,i.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:n}=e;return(0,i.jsxs)(l.D,{flexDirection:"column",gap:8,alignItems:"center",padding:{block:24},children:[(0,i.jsxs)(l.D,{flexDirection:"column",alignItems:"center",gap:4,children:[(0,i.jsx)(l.bL,{variant:"h5",color:"grey12",children:"No type selected"}),(0,i.jsxs)(l.bL,{color:"grey11",component:"p",align:"center",children:["Select the type editors can link to.",(0,i.jsx)("br",{}),"Then, choose which fields to return in the API."]})]}),(0,i.jsx)(l.D,{children:(0,i.jsx)(p,{allCustomTypes:t,onSelect:n})})]})}function p(e){let{allCustomTypes:t,onSelect:n}=e,r=(0,i.jsx)(l.E,{startIcon:"add",color:"grey",disabled:0===t.length,children:"Add type"});return 0===t.length?(0,i.jsx)(l.D,{children:(0,i.jsx)(l.c3,{content:"No type available",side:"bottom",align:"start",disableHoverableContent:!0,children:r})}):(0,i.jsx)(l.D,{children:(0,i.jsxs)(l.ar,{children:[(0,i.jsx)(l.av,{children:r}),(0,i.jsxs)(l.as,{maxHeight:400,minWidth:256,align:"center",children:[(0,i.jsx)(l.au,{children:(0,i.jsx)(l.bL,{color:"grey11",children:"Types"})}),t.map(e=>(0,i.jsx)(l.at,{onSelect:()=>n(e.id),children:(0,i.jsxs)(l.D,{alignItems:"center",justifyContent:"space-between",gap:8,children:[(0,i.jsx)(l.bO,{children:(0,i.jsx)(l.bL,{children:e.id})}),(0,i.jsx)(l.m,{title:(0,i.jsx)(l.bL,{variant:"extraSmall",color:"purple11",children:b(e.format)}),color:"purple",size:"small"})]})},e.id))]})]})})}function h(e){let{customType:t,fieldCheckMap:n,onChange:r,allCustomTypes:o}=e,a=I(t).map(e=>{var t,a,s;let[d,c]=e;if("Group"===c.type){let e=null!==(a=n[d])&&void 0!==a?a:{};return(0,i.jsx)(g,{group:c,groupId:d,onChange:e=>{r({...n,[d]:{type:"group",value:e}})},fieldCheckMap:"group"===e.type?e.value:{},allCustomTypes:o},d)}if(F(c,o)){let e=null!==(s=n[d])&&void 0!==s?s:{};return(0,i.jsx)(f,{field:c,fieldId:d,onChange:e=>{r({...n,[d]:{type:"contentRelationship",value:e}})},fieldCheckMap:"contentRelationship"===e.type?e.value:{},allCustomTypes:o},d)}return(0,i.jsx)(l.c6,{title:d,checked:(null===(t=n[d])||void 0===t?void 0:t.value)===!0,onCheckedChange:e=>{r({...n,[d]:{type:"checkbox",value:e}})}},d)}),s=C(n);return(0,i.jsx)(l.c7,{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,i.jsx)(m,{})},t.id)}function f(e){var t,n;let{field:r,fieldId:o,fieldCheckMap:a,onChange:s,allCustomTypes:d}=e,[c]=y(null===(t=r.config)||void 0===t?void 0:t.customtypes,d),u=e=>{s({...a,[c.id]:e})},p=null!==(n=a[c.id])&&void 0!==n?n:{},h=I(c).map(e=>{var t,n;let[r,o]=e;if("Group"===o.type){let e=null!==(n=p[r])&&void 0!==n?n:{};return(0,i.jsx)(x,{group:o,groupId:r,onChange:e=>{u({...p,[r]:{type:"group",value:e}})},fieldCheckMap:"group"===e.type?e.value:{}},r)}return(0,i.jsx)(l.c6,{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,i.jsx)(l.c7,{title:(0,i.jsxs)(l.bL,{children:[o," ",(0,i.jsxs)(l.bL,{color:"grey11",children:["→ ",c.id]})]}),subtitle:v(C(p).pickedFields),badge:b(c.format),children:h.length>0?h:(0,i.jsx)(m,{})},c.id)}function m(){return(0,i.jsx)(l.bL,{color:"grey11",children:"No available fields to select"})}function x(e){let{group:t,groupId:n,fieldCheckMap:r,onChange:o}=e,a=w(t).map(e=>{var t;let{fieldId:n}=e;return(0,i.jsx)(l.c6,{title:n,checked:(null===(t=r[n])||void 0===t?void 0:t.value)===!0,onCheckedChange:e=>{o({...r,[n]:{type:"checkbox",value:e}})}},n)});return(0,i.jsx)(l.c7,{title:n,subtitle:v(C(r).pickedFields),badge:"Group",children:a.length>0?a:(0,i.jsx)(m,{})},n)}function g(e){let{group:t,groupId:n,fieldCheckMap:r,onChange:o,allCustomTypes:a}=e,s=w(t).map(e=>{var t,n;let{fieldId:s,field:d}=e;if(F(d,a)){let e=null!==(n=r[s])&&void 0!==n?n:{};return(0,i.jsx)(f,{field:d,fieldId:s,fieldCheckMap:"contentRelationship"===e.type?e.value:{},onChange:e=>{o({...r,[s]:{type:"contentRelationship",value:e}})},allCustomTypes:a},s)}return(0,i.jsx)(l.c6,{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,i.jsx)(l.c7,{title:n,subtitle:v(C(r).pickedFields),badge:"Group",children:s.length>0?s:(0,i.jsx)(m,{})},n)}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 n;return null!==(n=t.find(t=>t.id===L(e)))&&void 0!==n?n:[]}):[]}function j(e){let{linkCustomtypes:t,allCustomTypes:n}=e,i=void 0!==n;return t.reduce((e,t)=>{if("string"==typeof t)return e;let r={};if(i){let i=n.find(e=>e.id===t.id);if(!i)return e;r=T(i)}let l=t.fields.reduce((e,t)=>{let l=r[L(t)];if(i&&void 0===l)return e;if("string"==typeof t)return i&&void 0!==l&&"Group"===l.type||(e[t]={type:"checkbox",value:!0}),e;if("fields"in t&&void 0!==t.fields){if(i&&void 0!==l&&"Group"!==l.type)return e;let o=function(e){let{group:t,ctFlatFieldMap:n,allCustomTypes:i}=e,r=void 0!==i,l=t.fields.reduce((e,l)=>{let o=E(n,t.id,L(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&&!_(o))return e;let t=k({field:l,allCustomTypes:i});t&&(e[l.id]=t)}return e},{});if(0!==Object.keys(l).length)return{type:"group",value:l}}({group:t,allCustomTypes:n,ctFlatFieldMap:r});return o&&(e[t.id]=o),e}if("customtypes"in t&&void 0!==t.customtypes){if(i&&void 0!==l&&!_(l))return e;let r=k({field:t,allCustomTypes:n});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:n}=e,i=void 0!==n,r=t.customtypes.reduce((e,t)=>{if("string"==typeof t)return e;let r={};if(i){let i=n.find(e=>e.id===t.id);if(!i)return e;r=T(i)}let l=t.fields.reduce((e,t)=>{if("string"==typeof t){let n=r[t];return i&&(void 0===n||"Group"===n.type)||(e[t]={type:"checkbox",value:!0}),e}if("fields"in t&&void 0!==t.fields){let n=t.fields.reduce((e,n)=>{let l=E(r,t.id,n);return i&&(void 0===l||"Group"===l.type)||(e[n]={type:"checkbox",value:!0}),e},{});Object.keys(n).length>0&&(e[t.id]={type:"group",value:n})}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 S(e){return Object.entries(e).flatMap(e=>{let[t,n]=e,i=Object.entries(n).flatMap(e=>{let[t,n]=e;if("group"===n.type){let e=Object.entries(n.value).flatMap(e=>{let[t,n]=e;return"checkbox"===n.type&&n.value?t:[]});return e.length>0?{id:t,fields:e}:[]}return n.value?t:[]});return i.length>0?{id:t,fields:i}:[]})}function C(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?Object.values(e).reduce((e,n)=>{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}(n))return e;if("type"in n&&"checkbox"===n.type)return n.value?{pickedFields:e.pickedFields+1,nestedPickedFields:e.nestedPickedFields+(t?1:0)}:e;if("type"in n&&"contentRelationship"===n.type){let{pickedFields:t,nestedPickedFields:i}=C(n,!0);return{pickedFields:e.pickedFields+t,nestedPickedFields:e.nestedPickedFields+i}}let{pickedFields:i,nestedPickedFields:r}=C(n,t);return{pickedFields:e.pickedFields+i,nestedPickedFields:e.nestedPickedFields+r}},{pickedFields:0,nestedPickedFields:0}):{pickedFields:0,nestedPickedFields:0}}function _(e){var t;return"Link"===e.type&&(null===(t=e.config)||void 0===t?void 0:t.select)==="document"}function F(e,t){var n;return _(e)&&1===y(null===(n=e.config)||void 0===n?void 0:n.customtypes,t).length}function I(e){return Object.values(e.json).flatMap(e=>Object.entries(e).flatMap(e=>{let[t,n]=e;return"Slices"!==n.type&&"Choice"!==n.type&&"UID"!==n.type&&"uid"!==t?[[t,n]]:[]}))}function T(e){return Object.fromEntries(I(e))}function E(e,t,n){var i,r;let l=e[t];if(void 0!==l&&"Group"===l.type)return null===(r=l.config)||void 0===r?void 0:null===(i=r.fields)||void 0===i?void 0:i[n]}function w(e){var t;return(null===(t=e.config)||void 0===t?void 0:t.fields)?Object.entries(e.config.fields).map(e=>{let[t,n]=e;return{fieldId:t,field:n}}):[]}function L(e){return"string"==typeof e?e:e.id}},76611:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var i=n(2784);function r(e,t,n){let{schema:r}=null!=n?n:{},l=()=>{try{let n=localStorage.getItem(e);if(null==n)return t;if(!r)return JSON.parse(n);return r.parse(JSON.parse(n))}catch(e){return t}},[o,a]=(0,i.useState)(l),[s,d]=(0,i.useState)(e);return s!==e&&(d(e),a(l())),[o,(0,i.useCallback)(n=>{a(i=>{let r;if(void 0===(r="function"==typeof n?n(i):n)){try{localStorage.removeItem(e)}catch(e){return i}return t}try{localStorage.setItem(e,JSON.stringify(r))}catch(e){return i}return r})},[e,t])]}},38193:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var i=n(52322),r=n(61183);n(2784);var l=n(59326),o=n(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:n,lang:s,sx:d,codeStyle:c,codeClass:u,Header:p}=e,{theme:h}=(0,l.B7)(),f=s?r.Z.highlight(n,{language:"vue"===s?"html":s}).value:r.Z.highlightAuto(n,a).value;return(0,i.jsxs)(o.kC,{as:"pre",sx:d,children:[p?(0,i.jsx)(p,{}):null,(0,i.jsx)("code",{className:"hljs".concat(u?" ".concat(u):""),style:{overflowX:"auto",padding:"3px 5px",borderRadius:"6px",border:"1px solid",borderColor:String(null===(t=h.colors)||void 0===t?void 0:t.textClear),...c},dangerouslySetInnerHTML:{__html:f}})]})}},80575:function(e,t,n){"use strict";n.d(t,{J:function(){return o},k:function(){return l}});var i=n(52322);n(2784);var r=n(75289);let l=e=>{let{children:t,sx:n,...l}=e;return(0,i.jsx)(r.xu,{sx:{display:["block","block","flex"],flexWrap:"wrap",justifyContent:"space-between",...n},...l,children:t})},o=e=>{let{children:t,cols:n=2}=e;return(0,i.jsx)(r.xu,{sx:{flex:"0 ".concat(100/n-1,"%"),mb:1},children:t})}},90167:function(e,t,n){"use strict";n.d(t,{kp:function(){return d},sP:function(){return c},w8:function(){return u},Hq:function(){return h}});var i,r,l=n(52322),o=n(63397),a=n(2784),s=n(75289),d=e=>{let{field:t,meta:n,fieldName:i,label:r,focusOnNewEntry:d=!0,inputPlaceholder:c,buttonLabel:u}=e,[p,h]=(0,a.useState)(n.value.length),f=(0,a.useRef)(Array(n.value.length));return(0,a.useEffect)(()=>{f.current=f.current.slice(0,n.value.length)},[n.value.length]),(0,a.useEffect)(()=>{let e=f.current.length;d&&e>p&&f.current[e-1].focus(),h(e)},[f.current.length,d,p]),(0,l.jsxs)(a.Fragment,{children:[(0,l.jsxs)(s.__,{variant:"label.primary",htmlFor:i,children:[r,n.touched&&n.error?(0,l.jsx)(s.xv,{as:"span",variant:"text.labelError",children:n.error}):null]}),(0,l.jsx)(o.F2,{name:i,id:i,...t,render:e=>(0,l.jsxs)("div",{children:[t.value&&t.value.length>0?t.value.map((t,n)=>(0,l.jsxs)(s.kC,{my:2,children:[(0,l.jsx)(s.II,{placeholder:c,name:"".concat(i,".").concat(n),value:t,ref:e=>f.current[n]=e,onChange:t=>{let{target:{value:i}}=t;return e.replace(n,i)}}),(0,l.jsx)(s.zx,{ml:2,type:"button",variant:"secondary",onClick:()=>e.remove(n),children:"-"})]},"".concat(i,"-").concat(+n+1))):null,(0,l.jsx)(s.zx,{type:"button",onClick:()=>e.insert(t.value.length,""),children:u})]})})]})},c=e=>{let{initialValues:t,meta:n,label:i,fieldName:r,onChange:a,...d}=e;return(0,l.jsxs)(s.__,{variant:"label.border",...d,children:[(0,l.jsx)(o.gN,{as:s.XZ,type:"checkbox",name:r,onChange:()=>a(!n.value),checked:n.value}),i]})},u=e=>{let{field:t,label:n,defaultValue:i,onChange:r,controlledValue:o,setControlledValue:s,buildControlledValue:d}=e,[u,p]=(0,a.useState)(i||t.defaultValue||!1);return(0,a.useEffect)(()=>{d?s(d(o,u)):s(d)},[u,o,d]),(0,l.jsx)(c,{meta:{value:u},fieldName:t.name,onChange:e=>p(e)&&r&&r(e),label:"function"==typeof n?n(o,u):n})};(i=r||(r={}))[i.ERROR=0]="ERROR",i[i.DISABLED=1]="DISABLED",i[i.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}},h=e=>{let{sx:t={},field:n,meta:i,formField:r,fieldName:a,fields:d,initialValues:c,isDisabled:u,autoFocus:h}=e,f=i.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,i.touched&&i.error?(0,l.jsx)(s.xv,{as:"span",variant:"text.labelError",children:i.error}):null]}),(0,l.jsx)(o.gN,{id:a,name:a,type:"text",placeholder:r.placeholder||r.label||a,...r.fieldLevelValidation&&c?{validate:e=>r.fieldLevelValidation&&r.fieldLevelValidation({value:e,fields:d,initialId:c.id})}:null,...n,as:s.II,sx:p(f),disabled:u||r.disabled,autoFocus:null!=h?h:r.autoFocus})]})}},70705:function(e,t,n){"use strict";var i=n(52322),r=n(2784),l=n(75289);let o=(0,r.forwardRef)((e,t)=>{let{children:n,Component:r=l.kC,sx:o={},...a}=e;return(0,i.jsx)(r,{as:"li",sx:{p:3,mx:3,alignItems:"center",variant:"styles.listItem",...o},ref:t,...a,children:n})});t.Z=o},86355:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var i=n(52322),r=n(14226),l=n(5446),o=n(2784),a=n(40023),s=n(951),d=n(8799),c=n(18978),u=n(59326),p=n(75289),h=n(70705),f=n(66770),m=n(33710),x=n(28316),g=n(65077);let v=e=>{let{children:t}=e;return(0,x.createPortal)((0,i.jsx)(g.xR,{children:t}),document.body)},b=e=>{let{text:t,as:n,sx:r={},...l}=e,a=(0,o.useRef)(null),[s,d]=(0,o.useState)(null),c=()=>{d(a.current&&a.current.offsetWidth<a.current.scrollWidth)};return(0,o.useEffect)(()=>(c(),window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c)}),[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.xv,{"data-for":t,"data-tip":!0,sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...r},as:n,ref:a,...l,children:t}),s&&(0,i.jsx)(v,{children:(0,i.jsx)(m.Z,{id:t,type:"dark",multiline:!0,border:!0,borderColor:"black",place:"bottom",effect:"solid",children:t})})]})};var y=e=>{var t,n;let{text:l,sliceFieldName:o,theme:a,WidgetIcon:s,widgetIconTooltip:d}=e;return(0,i.jsxs)(p.kC,{sx:{alignItems:"center",position:"relative"},children:[(0,i.jsx)(r.c3,{content:d,sideOffset:2,disableHoverableContent:!0,children:(0,i.jsx)(r.D,{margin:{right:8},children:(0,i.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===(n=a.colors)||void 0===n?void 0:n.primary,flexShrink:0}})})}),(0,i.jsx)(b,{text:l,as:"p",sx:{py:0,px:1,fontWeight:"label",fontSize:"15px"},"data-testid":"field-name"}),(0,i.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:n,deleteItem:m,enterEditMode:x,modelFieldName:g,renderFieldAccessor:v,HintElement:b,CustomEditElement:j,CustomEditElements:k,widget:S,draggableId:C,testId:_,isRepeatableCustomType:F,children:I}=e,{theme:T}=(0,u.B7)(),{key:E,value:{config:w,type:L}}=t,D=!!(("Link"===L||"Group"===L)&&(null==w?void 0:w.repeat));return(0,i.jsx)(o.Fragment,{children:(0,i.jsx)(a._l,{draggableId:C,index:n,children:e=>{var a,u,C,M,O;return(0,i.jsx)(o.Fragment,{children:(0,i.jsxs)(h.Z,{"data-testid":_,ref:e.innerRef,...e.draggableProps,Component:p.xu,sx:{p:0,mx:0,my:3},children:[(0,i.jsxs)(p.kC,{sx:{width:"100%"},children:[(0,i.jsx)(f.Z,{label:"Reorder slice field (drag and drop)",Icon:c.Fm7,color:null===(a=T.colors)||void 0===a?void 0:a.icons,mr:1,mt:3,...e.dragHandleProps}),(0,i.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,i.jsxs)(p.kC,{sx:{p:3,alignItems:"center",justifyContent:"space-between",width:"100%"},children:[(0,i.jsx)(y,{theme:T,text:(null==w?void 0:w.label)||E,sliceFieldName:v&&v(E),WidgetIcon:S.Meta.icon,widgetIconTooltip:S.label}),(0,i.jsxs)(p.kC,{sx:{flex:"0 0 auto"},children:[D&&(0,i.jsx)(r.m,{title:"Repeatable",color:"purple",size:"medium",sx:{alignSelf:"center",marginInline:16}}),k||null,j||(0,i.jsx)(f.Z,{size:22,Icon:s.$iz,label:"Edit field",sx:{cursor:"pointer",color:null===(u=T.colors)||void 0===u?void 0:u.icons,flexShrink:0},onClick:()=>x([E,t.value],g,n)}),!(!0===F&&"UID"==L)&&(0,i.jsxs)(l.v2,{children:[(0,i.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,i.jsx)(d.FQA,{size:20,color:null===(C=T.colors)||void 0===C?void 0:C.icons,style:{pointerEvents:"none"}})}),(0,i.jsx)(l.qy,{style:{background:null===(M=T.colors)||void 0===M?void 0:M.gray,border:"1px solid",borderRadius:"3px",borderColor:null===(O=T.colors)||void 0===O?void 0:O.borders,outline:"0"},children:(0,i.jsx)(l.sN,{style:{padding:"6px",cursor:"pointer"},onSelect:()=>m(E),children:"Delete field"})})]})]})]}),b||null]})]}),I]})})}})})}},66770:function(e,t,n){"use strict";var i=n(52322),r=n(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:n=()=>null,label:o,Icon:a,error:s=null,size:d=16,fitButton:c=!1,active:u=!1,useActive:p=!1,activeSx:h=l,...f}=e;return(0,i.jsx)(r.hU,{onClick:n,"aria-label":o,type:"button",sx:{...c?{width:d,height:d}:null,...p&&h(u,s),...t},...f,children:(0,i.jsx)(a,{size:d})})}},89280:function(e,t,n){"use strict";var i=n(52322),r=n(63397),l=n(2784),o=n(75289),a=n(90167),s=n(79256);t.Z=e=>{let{fieldName:t,formField:n,fields:d,initialValues:c,autoFocus:u}=e,[p,h,f]=(0,r.U$)(t),m=n.component;return(0,i.jsx)(o.xu,{sx:{mt:2,alignItems:"center",...n.type===s.h.CHECKBOX?{display:"flex",height:"130%"}:null},children:m?(0,i.jsx)(m,{meta:h,field:p,helpers:f,fieldName:t,formField:n,initialValues:c}):(0,i.jsxs)(l.Fragment,{children:[n.type===s.h.INPUT?(0,i.jsx)(a.Hq,{meta:h,field:p,fields:d,formField:n,fieldName:t,initialValues:c,autoFocus:u}):null,n.type===s.h.CHECKBOX&&(0,i.jsx)(a.sP,{meta:h,label:n.label,fieldName:t,initialValues:c,onChange:e=>f.setValue(e)})]})})}},3285:function(e,t,n){"use strict";n.d(t,{Z:function(){return A}});var i=n(52322),r=n(37149),l=n.n(r),o=n(56580),a=n(59326),s=n(75289),d=n(65413),c=n(30527),u=n(2784),p=n(92928);let h=e=>{let{children:t,...n}=e;return(0,i.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"},...n,children:t})};h.tabsRole="TabList";let f=e=>{let{children:t,...n}=e,{theme:r}=(0,a.B7)();return(0,i.jsx)(p.OK,{...n,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",...n.selected?{borderBottom:"3px solid ".concat(r.colors.primary),color:r.colors.text,fontWeight:"500",opacity:"1",backgroundColor:"transparent"}:{borderBottom:"3px solid transparent"}},children:t})};f.tabsRole="Tab";var m=(0,u.memo)(e=>{let{children:t,Footer:n,Header:r,tabs:l,bodySx:o,footerSx:a,defaultIndex:d=0}=e,[m,x]=(0,u.useState)(d);return(0,i.jsx)(c.Z,{borderFooter:!0,footerSx:{p:0,...a},bodySx:{p:0,...o},sx:{border:"none"},Header:r,Footer:n,children:(0,i.jsxs)(p.mQ,{defaultIndex:d,onSelect:e=>x(e),children:[(0,i.jsx)(h,{children:(l||[]).map(e=>(0,i.jsx)(f,{children:e},e))}),u.Children.map(t,(e,t)=>(0,i.jsx)(s.xu,{sx:{p:e=>"calc(".concat(e.space[3],"px + 8px)"),display:t===m?"block":"none"},children:(0,i.jsx)(p.x4,{children:e})}))]})})}),x=n(80575),g=e=>{var t,n;let{text:r,sliceFieldName:l,theme:o,WidgetIcon:a}=e;return(0,i.jsxs)(s.kC,{sx:{alignItems:"center"},children:[(0,i.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===(n=o.colors)||void 0===n?void 0:n.primary}}),(0,i.jsx)(s.xv,{as:"p","data-testid":"item-header-text",sx:{py:0,px:1,fontWeight:"label",fontSize:"15px"},children:r}),(0,i.jsx)(s.xv,{as:"p",sx:{display:["none","none","initial"],fontSize:"14px",ml:1,color:"textClear"},children:l})]})},v=n(55862),b=n(68169),y=n(5632),j=n(65186),k=n(7974);let S=()=>{let e=(0,y.useRouter)();return(0,i.jsxs)(s.xu,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:"60px"},children:[(0,i.jsx)(j.wr$,{size:48,color:"#C9D0D8"}),(0,i.jsx)(s.xu,{sx:{height:"12px"}}),(0,i.jsx)(s.xv,{color:"text",sx:{fontWeight:600,fontSize:"24px",lineHeight:"32px",textAlign:"center"},children:"Your mock data has moved"}),(0,i.jsx)(s.xu,{sx:{height:"8px"}}),(0,i.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,i.jsx)(s.xu,{sx:{height:"24px"}}),(0,i.jsx)(s.zx,{onClick:t=>{t.preventDefault(),window.open("".concat(e.asPath,"/simulator"),k.pq)},children:"Go to the Slice Simulator"})]})};var C=n(16442),_=n(45440),F=n(16086),I=n(78254),T=n(23134),E=n(89280),w=n(63397),L=n(358);function D(){let[{value:e}]=(0,w.U$)("config.label"),[{value:t},n,i]=(0,w.U$)("id"),r=(0,u.useRef)(null!=n.initialValue&&n.initialValue.length>0);(0,u.useEffect)(()=>{r.current||null==e||i.setValue((0,L.lV)(e),!1)},[e]),(0,u.useEffect)(()=>{let n=null==t||0===t.length;if(r.current){if(!n)return;r.current=!1}else n||null!=e&&t===(0,L.lV)(e)||(r.current=!0)},[t])}var M=(0,u.memo)(e=>{let{formId:t,initialValues:n,validationSchema:r,onSave:l,FormFields:o,children:a}=e;return(0,i.jsx)(s.xu,{children:(0,i.jsx)(w.J9,{initialValues:n,validationSchema:r,onSubmit:(e,t)=>{let{id:n,...i}=e;l({newKey:n,value:Object.entries(i).reduce((e,t)=>{let[n,i]=t;if(typeof i!==Boolean&&!i){var r;let t=null===(r=o[n])||void 0===r?void 0:r.defaultValue;if(void 0!==t)return{...e,[n]:t}}return{...e,[n]:i}},{})})},children:e=>(0,i.jsxs)(w.l0,{id:t,children:[(0,i.jsx)(D,{}),a({...e,initialValues:n})]})})})});function O(e){let{children:t}=e,n=(0,c.W)();return(0,i.jsx)(s.kC,{sx:{position:"sticky",zIndex:1,top:0,p:3,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n},children:t})}l().setAppElement("#__next");var A=e=>{let{close:t,data:n,fields:r,onSave:l,zoneType:c}=e,{theme:u}=(0,a.B7)(),p=(0,o.v9)(I.Ch).filter(C.TG);if(!n.isOpen)return null;let{field:[h,f]}=n,y=(0,T.t)(_.C,f.config,f.type);if(!y)return(0,i.jsxs)("div",{children:[f.type," not found"]});let{Meta:{icon:j},FormFields:k,Form:w,schema:L,label:D}=y,A={...(0,b.f7)((0,F.B9)(k,"id")),...y.prepareInitialValues?y.prepareInitialValues(p,f.config):f.config},{res:N,err:R}=(()=>{try{return{res:L.validateSync({type:f.type,config:A},{stripUnknown:!0})}}catch(e){return{err:e}}})();R&&(console.error("[EditModal] Failed to validate field of type ".concat(f.type,".\n Please update model.json accordingly.")),console.error(R));let P={id:h,config:N?N.config:A},[q,V]=k.id.validate.matches,z=d.object().shape({id:d.string().matches(q,V).min(3).max(35).required(),config:L.fields.config}),B="".concat("edit-modal-form","-").concat(Math.random().toString());return(0,i.jsx)(v.Z,{isOpen:!0,shouldCloseOnOverlayClick:!0,onRequestClose:t,contentLabel:"Widget Form Modal",children:(0,i.jsx)(M,{apiId:h,formId:B,initialValues:P,validationSchema:z,FormFields:k,onSave:e=>{let{newKey:n,value:i}=e;l({apiId:h,newKey:n,value:{...f,...i},updateMeta:{fieldIdChanged:{previousPath:[h],newPath:[n]}}}),t()},children:e=>{let{isValid:n,isSubmitting:l,initialValues:o}=e,a=w?(0,i.jsx)(w,{...e,fields:r},"field-model-tab-content"):(0,i.jsx)(x.k,{children:Object.entries(k).map(e=>{let[t,n]=e;return(0,i.jsx)(x.J,{children:(0,i.jsx)(E.Z,{fieldName:(0,b.lm)(t),formField:n,fields:r,initialValues:o,autoFocus:""===h&&void 0})},t)})},"field-model-tab-content"),d=["Field Model"],p=[a];if("slice"===c){let e=(0,i.jsx)(s.xu,{children:(0,i.jsx)(S,{})},"mock-data-tab-content");d.push("Mock Data"),p.push(e)}return(0,i.jsx)(m,{borderFooter:!0,footerSx:{position:"sticky",bottom:0,p:0},tabs:d,Header:(0,i.jsxs)(O,{children:[(0,i.jsx)(g,{theme:u,text:D,WidgetIcon:j}),(0,i.jsx)(s.x8,{onClick:t,type:"button"})]}),Footer:(0,i.jsxs)(s.kC,{sx:{position:"sticky",bottom:0,alignItems:"space-between",bg:"headSection",p:3},children:[(0,i.jsx)(s.xu,{sx:{ml:"auto"}}),(0,i.jsx)(s.zx,{mr:2,type:"button",onClick:t,variant:"secondary",children:"Cancel"}),(0,i.jsx)(s.zx,{form:B,type:"submit",disabled:!n&&l,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"},children:"Done"})]}),children:p})}})})}},16182:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var i=n(52322),r=n(2784),l=n(49857),o=n(14226);function a(e){return e.show?(0,i.jsx)(o.D,{padding:{block:8,inline:16},border:{top:!0},borderColor:"grey6",children:(0,i.jsxs)(o.bL,{variant:"normal",color:"grey11",children:["No code snippet for this field."," ",(0,i.jsx)(o.bL,{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=n(80148),d=n(77245),c=n(8799),u=n(65186),p=n(59326),h=n(75289),f=n(38193);let m={position:"relative",top:"3px"};var x=e=>{var t,n,l;let{code:o,lang:a}=e,{theme:s}=(0,p.B7)(),[x,g]=(0,r.useState)(!1);return o?(0,i.jsxs)(h.kC,{sx:{p:2,px:3,alignItems:"center",borderTop:"1px solid",borderColor:"borders",justifyContent:"space-between"},children:[(0,i.jsxs)(h.kC,{sx:{alignItems:"center",display:["none","none","flex"],maxWidth:"80%"},children:[(0,i.jsx)(c.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===(n=s.colors)||void 0===n?void 0:n.borders,borderRadius:"3px",padding:"4px",marginRight:"2px"}}),(0,i.jsx)(f.Z,{sx:{margin:"0px 8px",border:"none",borderRadius:"3px",fontSize:"13px"},lang:a,children:o})]}),(0,i.jsx)(h.xu,{children:(0,i.jsxs)(h.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,i.jsx)(u.HhX,{size:16,color:null==s?void 0:null===(l=s.colors)||void 0===l?void 0:l.success,style:m}):(0,i.jsx)(d.LhG,{size:16,style:m}),(0,i.jsx)(h.xv,{as:"span",sx:{display:["none","inline","none","inline"]},children:"\xa0Copy"})]})})]}):null};let g=e=>{let{show:t,renderHintBase:n,item:r,hintItemName:o}=e,a=n({item:r}),d=[a];if("Link"===r.value.type){var c,u,p,h,f;null!==(h=null===(c=r.value.config)||void 0===c?void 0:c.allowText)&&void 0!==h&&h&&d.push("allowText"),null!==(f=null===(u=r.value.config)||void 0===u?void 0:u.repeat)&&void 0!==f&&f&&d.push("repeat"),(null===(p=r.value.config)||void 0===p?void 0:p.variants)&&d.push("variants")}let{data:m,error:g}=(0,l.ZP)(d.join("$"),async()=>await s.managerClient.snippets.readSnippets({fieldPath:a.split("."),model:r.value,itemName:o}));if(g&&console.error(g),!m||g)return null;let v=m.snippets||[];return v[0]?(0,i.jsx)("div",{style:{display:t?"initial":"none"},children:(0,i.jsx)(x,{code:v[0].code,lang:v[0].language})}):null};var v=e=>{var t;let{item:n}=e;return"Link"===n.value.type&&(null===(t=n.value.config)||void 0===t?void 0:t.select)==="document"?(0,i.jsx)(a,{show:e.show}):(0,i.jsx)(g,{...e})}},40141:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var i=n(52322),r=n(14226),l=n(13980),o=n(2784),a=n(65077),s=n(94160),d=n(35289),c=n(6882),u=n(6609);function p(e){let{open:t,onOpenChange:n,onConfirm:l}=e;return(0,i.jsxs)(r.ae,{open:t,onOpenChange:n,size:"small",children:[(0,i.jsx)(r.al,{title:"Static zone"}),(0,i.jsx)(r.aj,{children:(0,i.jsx)(r.bn,{children:(0,i.jsxs)(r.D,{as:"article",flexDirection:"column",padding:16,gap:4,children:[(0,i.jsx)(r.bL,{sx:{marginBottom:4},color:"purple9",variant:"smallBold",children:"About"}),(0,i.jsx)(r.bL,{variant:"h3",children:"What is the static zone?"}),(0,i.jsx)(r.bL,{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,i.jsx)(r.c8,{src:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1723540305/DEV_TOOLS/STATES/Explication_vide%CC%81o_zone_statique_phibeq.mp4",sizing:"contain",autoPlay:!0,loop:!0})]})})}),(0,i.jsx)(r.ah,{children:(0,i.jsx)(r.af,{size:"medium",sx:{flexGrow:1},onClick:()=>{l(),n(!1)},children:"Got it"})})]})}var h=n(76611),f=n(5683);let m=(0,o.forwardRef)((e,t)=>{var n;return(0,i.jsx)(r.E,{...e,ref:t,startIcon:"add",color:"grey","aria-label":"Add a field","data-testid":null!==(n=e["data-testid"])&&void 0!==n?n:"add-field"})});function x(e){let{zoneTypeFormat:t,...n}=e;return"page"===t?(0,i.jsx)(v,{...n}):(0,i.jsx)(b,{...n})}let g=(0,i.jsx)("div",{style:{position:"absolute",bottom:0,right:0}});function v(e){let{disabled:t,fields:n,triggerDataTestId:l,onSelectField:a}=e,[s,d]=(0,o.useState)(!1),[c,x]=(0,o.useState)(!1),[v,b]=(0,h.V)(f.v,!1);return(0,i.jsxs)(r.D,{position:"relative",children:[(0,i.jsx)(m,{onClick:()=>{v?d(!0):x(!0)},"data-testid":l}),(0,i.jsx)(p,{open:c,onOpenChange:e=>{x(e),e||d(!0)},onConfirm:()=>b(!0)}),(0,i.jsx)(u.S,{open:s,onOpenChange:d,disabled:t,onSelectField:a,fields:n,trigger:g})]})}function b(e){let{disabled:t,fields:n,triggerDataTestId:r,onSelectField:l}=e;return(0,i.jsx)(u.S,{disabled:t,onSelectField:l,fields:n,trigger:(0,i.jsx)(m,{"data-testid":r})})}var y=n(45440),j=n(49919),k=n(40023),S=n(75289),C=n(70705),_=n(86355),F=n(23134),I=n(16182),T=e=>{let{fields:t,title:n,tabId:r,enterEditMode:l,enterSelectMode:o,onDragEnd:a,renderFieldAccessor:s,onDeleteItem:d,onSave:c,showHints:u,renderHintBase:p,isRepeatable:h,testId:f,isRepeatableCustomType:m}=e;return(0,i.jsx)(k.Z5,{onDragEnd:a,children:(0,i.jsx)(k.bK,{droppableId:n,children:(e,n)=>(0,i.jsxs)(S.xu,{as:"ul",ref:e.innerRef,...e.droppableProps,"data-testid":f,sx:{paddingInline:"16px !important"},children:[t.map((e,t)=>{let{value:{config:a,type:f}}=e,x=(0,F.t)(y.C,a,f);if(!x)return(0,i.jsx)(C.Z,{children:(0,i.jsxs)(S.xv,{children:['Field type "',f,'" not supported']})});let g={item:e,index:t,tabId:r,widget:x,showHints:u,key:e.key,enterSelectMode:o,renderFieldAccessor:s,enterEditMode:l,parentSnapshot:n,deleteItem:d,saveItem:c,draggableId:"list-item-".concat(e.key),isRepeatableCustomType:m,testId:"list-item-".concat(e.key)},v=(0,i.jsx)(I.Z,{item:e,show:u,isRepeatable:h,renderHintBase:p,hintItemName:x.hintItemName,Widgets:y.C,typeName:x.CUSTOM_NAME||x.TYPE_NAME});if(x.CustomListItem){let{CustomListItem:e}=x;return(0,i.jsx)(e,{...g,HintElement:v})}return(0,i.jsx)(_.Z,{...g,HintElement:v})}),e.placeholder]})})})},E=n(644),w=n.n(E);let L=e=>{let{zoneType:t,heading:n="Your ".concat(t," has no fields yet"),action:l}=e;return(0,i.jsxs)("div",{className:w().root,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(r.bL,{variant:"bold",children:n}),(0,i.jsx)(r.bL,{color:"grey11",children:"A field is an input for content (e.g. text, images, links)."})]}),l]})},D=e=>{let t,{zoneType:n,zoneTypeFormat:l,tabId:p,title:h,fields:f,poolOfFieldsToCheck:m,widgetsArray:g,isRepeatable:v,onDeleteItem:b,onDragEnd:k,EditModal:S,onSave:C,dataTip:_,renderHintBase:F,renderFieldAccessor:I,testId:E,isRepeatableCustomType:w,emptyStateHeading:D}=e,M=(()=>{let e=!!Object.entries(m).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})]})(),[O,A]=(0,o.useState)(!1),[N,R]=(0,o.useState)({isOpen:!1}),P={onSelectField:e=>{R({isOpen:!0,field:["",y.C[e].create("")]})},fields:M.filter(Boolean).map(e=>{let{TYPE_NAME:t,CUSTOM_NAME:n}=e;return c.XU.find(e=>e.type===t&&(void 0===n||e.variant===n))}),triggerDataTestId:v?"add-field-in-items":void 0};return"slice"===n&&f.length>0?t=(0,i.jsx)(u.S,{...P}):"customType"===n&&(t=(0,i.jsx)(x,{...P,zoneTypeFormat:l})),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.Bu,{actions:(0,i.jsxs)(i.Fragment,{children:[f.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.bL,{color:"grey11",component:"span",noWrap:!0,children:"Show code snippets?"}),(0,i.jsx)(r.bC,{checked:O,onCheckedChange:A,size:"small",style:{flexShrink:0},"data-testid":"code-snippets-switch"})]}),t]}),children:h}),0===f.length&&"slice"===n?(0,i.jsx)(L,{zoneType:"customType"===n?"page"===l?"page type":"custom type":n,heading:D,action:(0,i.jsx)(u.S,{...P})}):f.length>0?(0,i.jsx)(a.xR,{children:(0,i.jsx)(T,{tabId:p,isRepeatable:v,fields:f,showHints:O,dataTip:_,title:h,renderFieldAccessor:I,renderHintBase:F,enterEditMode:e=>{R({isOpen:!0,field:e});let[t,n]=e;s.Xe.track({event:"field:settings-opened",id:t,name:n.config.label,type:n.type,isInAGroup:!1,contentType:(0,j.T)(window.location.pathname)})},onDragEnd:k,onDeleteItem:b,onSave:C,testId:E,isRepeatableCustomType:w})}):void 0,(0,i.jsx)(S,{data:N,close:()=>{R({isOpen:!1})},onSave:C,fields:m,zoneType:n})]})};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 M=D},23134:function(e,t,n){"use strict";n.d(t,{t:function(){return r}});var i=n(59050);let r=(e,t,n)=>{if("Link"===n)switch(null==t?void 0:t.select){case"document":return e.ContentRelationship;case"media":return e.LinkToMedia;default:return e.Link}if(n===i.GroupFieldType){var r;return null!==(r=e.Group)&&void 0!==r?r:e.NestedGroup}return e[n]}},9889:function(e,t,n){"use strict";n.d(t,{Jp:function(){return o},OR:function(){return l}});var i=n(7974),r=n(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:[i.xo,"No special characters allowed (except _)"]},e=>{let{value:t,fields:n,initialId:i}=e;return t?n.find(e=>{let{key:n}=e;return n===t})&&t!==i?'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,n){"use strict";n.d(t,{II:function(){return d},Jg:function(){return l}});var i=n(68169),r=n(79256);let l=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return{type:r.h.CHECKBOX,validate:{required:(0,i.MJ)(t,s)},required:t,label:e,defaultValue:n,yupType:"boolean"}},o=[3,"String is too short. Min: 3"],a=[35,"String is too long. Max: 35"],s=["Field is required"],d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{min:o,max:a,required:s},n=arguments.length>2?arguments[2]:void 0,l=arguments.length>3?arguments[3]:void 0,d=arguments.length>4?arguments[4]:void 0,c=arguments.length>5&&void 0!==arguments[5]&&arguments[5],{min:u,max:p,required:h,matches:f}=t||{};return{type:r.h.INPUT,label:e,validate:{required:(0,i.MJ)(h,s),min:(0,i.MJ)(u,o),max:(0,i.MJ)(p,a),matches:f},defaultValue:l,fieldLevelValidation:n,yupType:"string",placeholder:d,autoFocus:c}}},68169:function(e,t,n){"use strict";n.d(t,{MJ:function(){return a},f7:function(){return s},gc:function(){return d},lm:function(){return o}});var i=n(65413),r=n(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[n,i]=t,r=l(i);return void 0!==r?{...e,[n]:r}:e},{}),d=e=>i.object().shape(Object.entries(e).filter(e=>e).reduce((e,t)=>{let[n,r]=t,{validate:l,yupType:o}=r;if(!l)return e;if("function"==typeof l)return{...e,[n]:l(n,r)};let a=i[o]();return Object.entries(l).filter(e=>e&&e[1]).forEach(e=>{let[t,i]=e;if(i&&a[t]){a=a[t](...Array.isArray(i)?i:[i]);return}console.warn('Invalid Yup validator for field "'.concat(n,'"'))}),{...e,[n]:a}},{})).required().default(void 0).noUnknown(!0)},79256:function(e,t,n){"use strict";var i,r;n.d(t,{h:function(){return i}}),(r=i||(i={})).CHECKBOX="checkbox",r.INPUT="input",r.SELECT="select"},45440:function(e,t,n){"use strict";n.d(t,{C:function(){return tc}});var i=n(52322),r=n(96317),l=n(65186),o=n(65413),a=n(6882),s=n(75289),d=n(80575),c=n(89280),u=n(68169),p=n(9889),h=n(49046);let f={...p.OR,repeat:(0,h.Jg)("Repeatable",!1,!0)};var m=e=>{let{initialValues:t,fields:n,values:r,setFieldValue:l}=e,{config:{repeat:o}}=r;return(0,i.jsxs)(d.k,{children:[Object.entries(f).filter(e=>{let[t]=e;return"repeat"!==t}).map(e=>{let[r,l]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(r),formField:l,fields:n,initialValues:t})},r)}),(0,i.jsx)(d.J,{children:(0,i.jsx)(s.xu,{sx:{mt:2,alignItems:"center",display:"flex",height:"130%"},children:(0,i.jsxs)(s.__,{variant:"label.border",sx:{mb:0},children:[(0,i.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:n,customName:i,hintItemName:r}=e;return{Meta:x,Form:m,FormFields:f,schema:g(t),create:e=>({type:"Group",config:{label:e,repeat:!0,fields:[]}}),CustomListItem:n,TYPE_NAME:"Group",CUSTOM_NAME:i,hintItemName:r,label:a.U.name}}var b=n(59050),y=n(2784),j=n(40023),k=n(28316),S=n(94160),C=n(6609),_=n(86355),F=n(3285),I=n(16182),T=n(23134),E=n(49219),w=n(16086),L=n(358),D=n(49919),M=n(5495),O=n(39302);let A=e=>{let{tabId:t,widget:n,Widgets:r,widgetsArray:l,hintBase:o,parentSnapshot:d,showHints:c,isRepeatable:u,item:p,draggableId:h,saveItem:f,HintElement:m,...x}=e,[g,v]=(0,y.useState)({isOpen:!1}),A=e=>{var t;let{apiId:n,value:i}=e;null===(t=i.config)||void 0===t||t.label;let r=function(e){var t,n,i;let r=structuredClone(e.group);return null!==(n=r.config)&&void 0!==n||(r.config={}),null!==(i=(t=r.config).fields)&&void 0!==i||(t.fields={}),r.config.fields[e.fieldId]=e.field,r}({group:E.Fl.fromSM(p.value),fieldId:n,field:i});f({apiId:p.key,newKey:p.key,value:E.Fl.toSM(r),inGroupFieldAction:"add"}),(0,M.V)({id:n,field:i,isInAGroup:!0})},N=e=>{let{apiId:t,newKey:n,value:i}=e,r=i.type===b.GroupFieldType?E.Fl.fromSM(i):i,l=function(e){var t,n;let i=structuredClone(e.group);if(!(null===(t=i.config)||void 0===t?void 0:t.fields)||!(null===(n=e.group.config)||void 0===n?void 0:n.fields))return i;for(let t in i.config.fields={},e.group.config.fields)t===e.previousFieldId?i.config.fields[e.newFieldId]=e.field:i.config.fields[t]=e.group.config.fields[t];return i}({group:E.Fl.fromSM(p.value),previousFieldId:t,newFieldId:n,field:r});f({apiId:p.key,newKey:p.key,value:E.Fl.toSM(l),inGroupFieldAction:"update",updateMeta:{fieldIdChanged:{previousPath:[p.key,t],newPath:[p.key,n]}}}),(0,O.Z)({previousId:t,id:n,field:r,isInAGroup:!0})},R=e=>{let t=function(e){var t,n;let i=structuredClone(e.group);return null===(n=i.config)||void 0===n||null===(t=n.fields)||void 0===t||delete t[e.fieldId],i}({group:E.Fl.fromSM(p.value),fieldId:e});f({apiId:p.key,newKey:p.key,value:E.Fl.toSM(t)})},P=e=>{v({isOpen:!0,field:e});let[t,n]=e;S.Xe.track({event:"field:settings-opened",id:t,name:n.config.label,type:n.type,isInAGroup:!0,contentType:(0,D.T)(window.location.pathname)})};return(0,i.jsxs)(y.Fragment,{children:[(0,i.jsx)(_.Z,{item:p,widget:n,draggableId:h,...x,HintElement:m,CustomEditElements:[(0,i.jsx)(C.S,{onSelectField:e=>{v({isOpen:!0,field:["",r[e].create("")]})},fields:l.filter(Boolean).map(e=>{let{TYPE_NAME:t,CUSTOM_NAME:n}=e,i=a.XU.find(e=>e.type===t&&(void 0===n||e.variant===n));if(!i)throw Error("Field not found for widget: ".concat(t," - ").concat(n));return i})},"add-field-dropdown")],children:(0,i.jsx)(s.xu,{sx:{ml:4},children:(0,i.jsx)(j.Z5,{onDragEnd:e=>{if((0,w.uS)(e))return;let{source:t,destination:n}=e;if(!n)return;let{index:i}=t,{index:r}=n,l=function(e){var t;let n=structuredClone(e.group);if(!(null===(t=n.config)||void 0===t?void 0:t.fields))return n;let i=Object.entries(n.config.fields),[r]=i.splice(e.sourceIndex,1);return i.splice(e.destinationIndex,0,r),n.config.fields=Object.fromEntries(i),n}({group:E.Fl.fromSM(p.value),sourceIndex:i,destinationIndex:r});(0,k.flushSync)(()=>{f({apiId:p.key,newKey:p.key,value:E.Fl.toSM(l)})})},children:(0,i.jsx)(j.bK,{droppableId:"".concat(t,"-").concat(p.key,"-zone"),children:e=>(0,i.jsxs)("ul",{ref:e.innerRef,...e.droppableProps,children:[p.value.config.fields.map((e,t)=>{let{value:{config:n,type:l}}=e,a=(0,T.t)(r,n,l);if(!a)return null;let s={item:e,index:t,widget:a,key:e.key,enterEditMode:P,deleteItem:R,saveItem:N,showHints:c,renderFieldAccessor:t=>"item".concat((0,L.Ti)(e.key)),draggableId:"group-".concat(p.key,"-").concat(e.key,"-").concat(t),testId:"list-item-group-".concat(p.key,"-").concat(e.key)},d=(0,i.jsx)(I.Z,{item:e,show:c,isRepeatable:u,renderHintBase:e=>{let{item:t}=e;return"".concat(o).concat((0,L.Ti)(t.key))},hintItemName:a.hintItemName,Widgets:r,typeName:a.CUSTOM_NAME||a.TYPE_NAME});if(a.CustomListItem){let{CustomListItem:e}=a;return(0,i.jsx)(e,{...s,HintElement:d})}return(0,i.jsx)(_.Z,{...s,HintElement:d})}),e.placeholder]})})})})}),(0,i.jsx)(F.Z,{data:g,close:()=>{v({isOpen:!1})},onSave:e=>""===e.apiId?A({...e,apiId:e.newKey}):N(e),fields:p.value.config.fields})]})},N={icon:l.hs8},R={label:p.Jp.label,id:p.Jp.id,placeholder_false:(0,h.II)("False Placeholder",{required:!1},null,"false","Value the content creator sees (Output as 'false' in the API)."),placeholder_true:(0,h.II)("True Placeholder",{required:!1},null,"true","Value the content creator sees (Output as 'true' in the API)"),default_value:(0,h.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:N,schema:o.object().shape({type:o.string().matches(/^Boolean$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(R,"id"))}),FormFields:R,label:a.Qr.name},q={icon:l.U8L},{TYPE_NAME:V,FormFields:z,schema:B}=(0,w.zg)("Color"),G={create:e=>({type:"Color",config:{label:e,placeholder:""}}),FormFields:z,TYPE_NAME:V,schema:B,Meta:q,label:a.pG.name};var J=n(14226),U=n(63397);function Z(e){let{checked:t,height:n=130,setFieldValue:r}=e,[l,o]=(0,y.useState)(null);return(0,i.jsx)(d.J,{children:(0,i.jsx)(s.kC,{sx:{mt:2,alignItems:"center",height:"".concat(n,"%")},children:(0,i.jsx)(s.__,{variant:"label.border",children:(0,i.jsxs)(J.D,{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",ref:o,children:[(0,i.jsxs)(s.kC,{children:[(0,i.jsx)(s.XZ,{checked:t,onChange:e=>{r("config.allowText",e.target.checked)}}),"Allow display text"]}),(0,i.jsx)(J.c3,{container:l,align:"end",content:"Allow editors to customize the link display text",children:(0,i.jsx)(J.aX,{name:"alert",size:"medium",color:"grey11"})})]})})})})}function H(e){let{checked:t,setFieldValue:n}=e;return(0,i.jsxs)(J.D,{flexDirection:"column",children:[(0,i.jsx)(s.__,{htmlFor:"repeat",variant:"label.primary",children:"Repeatable"}),(0,i.jsxs)(s.__,{variant:"label.border",sx:{display:"flex"},children:[(0,i.jsx)(s.XZ,{name:"repeat",checked:t,onChange:e=>{n("config.repeat",e.target.checked)}}),"Make this link repeatable (allows editors to create lists of links)"]}),(0,i.jsxs)(J.D,{alignItems:"center",gap:4,children:[(0,i.jsx)(J.aX,{name:"alert",size:"medium",color:"grey11"}),(0,i.jsxs)(J.bL,{variant:"normal",color:"grey11",children:["Repeatable link fields are returned as an array of links by the API."," ",(0,i.jsx)("a",{href:"https://prismic.io/docs/field",style:{textDecoration:"none"},target:"_blank",rel:"noopener noreferrer",children:(0,i.jsx)(J.bL,{variant:"normal",color:"indigo11",children:"See documentation."})})]})]})]})}function W(e){var t,n;let{variants:r,onVariantsChange:l,error:o}=e,a=!!r,s=a?"Enabled":"Disabled",d="Options (".concat(null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0,")"),c=(null!==(n=null==r?void 0:r.length)&&void 0!==n?n:0)>2,u=(0,y.useRef)();return(0,i.jsxs)(J.D,{overflow:"hidden",flexDirection:"column",border:!0,borderRadius:6,children:[(0,i.jsxs)(J.D,{border:{bottom:!0},padding:12,flexDirection:"column",gap:8,children:[(0,i.jsx)(J.bL,{variant:"h4",color:"grey12",children:"Variants"}),(0,i.jsx)(J.bL,{color:"grey12",children:'Add variants like "Primary" and "Secondary" to allow editors to choose the link\'s style by selecting one of them.'}),(0,i.jsxs)(J.D,{gap:8,children:[(0,i.jsx)(J.bC,{checked:a,onCheckedChange:e=>{l(e?["Primary","Secondary"]:void 0)}}),(0,i.jsx)(J.bL,{color:"grey11",children:s})]})]}),a&&(0,i.jsxs)(J.D,{border:{bottom:!0},padding:12,flexDirection:"column",gap:8,children:[(0,i.jsxs)(J.bL,{variant:"h5",color:"grey11",children:[d,!!o&&(0,i.jsx)(J.bL,{variant:"inherit",color:"tomato9",children:" ".concat(o)})]}),null==r?void 0:r.map((e,t)=>(0,i.jsxs)(J.D,{gap:4,alignItems:"center",children:[(0,i.jsx)(J.D,{flexGrow:1,backgroundColor:"white",padding:{inline:12,block:8},flexDirection:"column",border:!0,borderRadius:4,children:(0,i.jsx)(J.bN,{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((n,i)=>i===t?e:n))})}),c&&(0,i.jsx)(J.aZ,{type:"button",icon:"delete",onClick:()=>l(null==r?void 0:r.filter((e,n)=>n!==t))})]},t)),(0,i.jsx)(J.D,{children:(0,i.jsx)(J.E,{invisible:!0,startIcon:"add",onClick:()=>{u.current=null==r?void 0:r.length,l([...null!=r?r:[],""])},children:"Add option"})})]}),(0,i.jsx)(J.D,{backgroundColor:"white",flexDirection:"column",padding:12,children:(0,i.jsxs)(J.bL,{variant:"normal",color:"grey11",children:['Need additional properties similar to "Variants"?'," ",(0,i.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 $={...p.Jp};function X(e){var t;let{variants:n,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,i.jsx)(W,{variants:n,onVariantsChange:e=>r(l,e),error:s})}let K={icon:l.$l_},Y=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:K,FormFields:$,schema:o.object().shape({type:o.string().matches(/^Link$/,{excludeEmptyString:!0}).required(),config:Y.optional()}),Form:e=>{let{initialValues:t,values:n,fields:r,setFieldValue:l}=e,{config:{allowText:o,repeat:a,variants:p}}=n;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(d.k,{children:[Object.entries($).map(e=>{let[n,l]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(n),formField:l,fields:r,initialValues:t})},n)}),(0,i.jsx)(d.J,{children:(0,i.jsxs)(s.kC,{sx:{gap:2,marginTop:3},style:{paddingTop:"1px"},children:[(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)("allowTargetBlank"),formField:(0,h.Jg)("Allow target blank",!1,!0),fields:r,initialValues:t})}),(0,i.jsx)(Z,{checked:o,setFieldValue:l})]})},"allowTargetBlank")]}),(0,i.jsx)(J.D,{height:8}),(0,i.jsxs)(J.D,{flexDirection:"column",gap:16,children:[(0,i.jsx)(H,{checked:a,setFieldValue:l}),(0,i.jsx)(X,{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=n(41347);let et={label:p.Jp.label,id:p.Jp.id,customtypes:{validate:()=>o.array()}},en={icon:l.I2R},ei=Y.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:en,schema:o.object().shape({type:o.string().matches(/^Link$/,{excludeEmptyString:!0}).required(),config:ei}),TYPE_NAME:"Link",FormFields:et,CUSTOM_NAME:"ContentRelationship",Form:e=>{let{initialValues:t,values:n,setFieldValue:r,fields:l}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.k,{children:Object.entries(et).filter(e=>"customtypes"!==e[0]).map(e=>{let[n,r]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(n),formField:r,fields:l,initialValues:t})},n)})}),(0,i.jsx)(s.xu,{mt:20,children:(0,i.jsx)(ee.zE,{value:n.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,w.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:ed}=(0,w.zg)("Embed"),ec={create:e=>({type:"Embed",config:{label:e,placeholder:""}}),FormFields:es,TYPE_NAME:"Embed",schema:ed,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=n(8799),eh=n(90167),ef=n(66770);let em=e=>{let{onClick:t,error:n,onDelete:r,active:o,text:a,sx:d}=e;return(0,i.jsx)(ef.Z,{useActive:!0,fitButton:!0,error:n,onClick:t,active:o,sx:{position:"relative",width:"64px",height:"64px",...d},Icon:()=>(0,i.jsxs)(y.Fragment,{children:[(0,i.jsxs)(s.kC,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[(0,i.jsx)(ep.jnY,{size:22}),(0,i.jsx)(s.xv,{mt:1,children:a})]}),r?(0,i.jsx)(s.Ct,{onClick:r,variant:"circle-right",children:(0,i.jsx)(l.B4e,{})}):null]})})},ex=e=>{let{onClick:t}=e;return(0,i.jsx)(ef.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,i.jsx)(s.kC,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,i.jsx)(ep.iTs,{size:34,color:"#5263BA","aria-label":"Add a thumbnail"})})})},eg=e=>{let{prefix:t,required:n=!1,display:r}=e,[l,o]=(0,U.U$)(t),a=n?"*":"";return r?(0,i.jsxs)(y.Fragment,{children:[(0,i.jsx)(ev,{name:"".concat(t,".name"),label:"Name".concat(a),placeholder:"main",sx:{mb:3},isConstraint:"config.constraint"===t,meta:o}),(0,i.jsx)(eb,{name:"".concat(t,".width"),label:"Width (px)".concat(a),placeholder:" ",sx:{mb:3}}),(0,i.jsx)(eb,{name:"".concat(t,".height"),label:"Height (px)".concat(a),placeholder:" "})]}):null},ev=e=>{let{name:t,label:n,placeholder:r,meta:l,isConstraint:o,...a}=e,[s]=(0,U.U$)(t);return(0,i.jsx)(eh.Hq,{...a,fieldName:t,meta:l,formField:{label:n,placeholder:r},field:o?{value:"main",readOnly:!0}:{value:s.value},variant:o?"disabled":"primary"})},eb=e=>{let{name:t,label:n,placeholder:r,...l}=e,[o,a]=(0,U.U$)(t);return(0,i.jsx)(eh.Hq,{...l,fieldName:t,formField:{label:n,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,n="number"==typeof e.height&&e.height;return e.name&&(t||n)}}))}},ek={name:"",width:"",height:""},eS=function(){let{width:e,height:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!n||e||t?e||t?"".concat(e||"auto","x").concat(t||"auto"):"...":"auto"},eC=o.object().shape({type:o.string().matches(/^Image$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(ej,"id"))}),e_={Meta:{icon:l.Fwj},Form:e=>{let{initialValues:t,values:n,errors:r,fields:l,touched:o}=e,[a,p]=(0,y.useState)(0),{config:{thumbnails:h=[],constraint:f}}=n;return(0,y.useEffect)(()=>{p(h.length)},[h.length]),(0,i.jsxs)(d.k,{children:[Object.entries(ej).map(e=>{let[n,r]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(n),formField:r,fields:l,initialValues:t})},n)}),(0,i.jsxs)(d.J,{children:[(0,i.jsx)(s.__,{htmlFor:"thumbnails",variant:"label.primary",sx:{mt:1,display:"flex",alignItems:"center"},children:"Responsive views*"}),(0,i.jsx)(s.Zb,{p:3,children:(0,i.jsx)(U.F2,{name:"config.thumbnails",render:t=>{let{push:n,remove:l}=t;return(0,i.jsxs)(y.Fragment,{children:[(0,i.jsxs)(s.kC,{mb:3,children:[(0,i.jsx)(em,{active:0===a,text:eS(f,!0),sx:{mr:2},onClick:()=>p(0)}),h.map((e,t)=>(0,i.jsx)(em,{sx:{mr:3},active:a===+t+1,text:eS(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,i.jsx)(ex,{onClick:()=>{n(ek)}})]}),(0,i.jsx)(eg,{...e,display:0===a,prefix:"config.constraint"}),h.map((t,n)=>(0,y.createElement)(eg,{...e,required:!0,key:"thumbnail-".concat(+n+1),display:a===+n+1,prefix:"config.thumbnails[".concat(n,"]")}))]})}})})]})]})},schema:eC,create:e=>({type:"Image",config:{label:e,constraint:{},thumbnails:[]}}),FormFields:ej,TYPE_NAME:"Image",label:a.tg.name},eF={...p.Jp},eI={icon:l._b$},eT=Y.shape({select:o.string().required().matches(/^media$/,{excludeEmptyString:!0})}),eE={Meta:eI,FormFields:eF,schema:o.object().shape({type:o.string().matches(/^Link$/,{excludeEmptyString:!0}).required(),config:eT.optional()}),Form:e=>{let{initialValues:t,values:n,fields:r,setFieldValue:l}=e,{config:{allowText:o,variants:a}}=n;return(0,i.jsxs)(J.D,{flexDirection:"column",gap:16,children:[(0,i.jsxs)(d.k,{children:[Object.entries(eF).map(e=>{let[n,l]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(n),formField:l,fields:r,initialValues:t})},n)}),(0,i.jsx)(Z,{checked:o,setFieldValue:l})]}),(0,i.jsx)(X,{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:ew,schema:eL}=(0,w.zg)("Number"),eD={create:e=>({type:"Number",config:{label:e,placeholder:""}}),FormFields:ew,TYPE_NAME:"Number",schema:eL,Meta:{icon:l.KZU},label:a.Wc.name};var eM=n(79256);let eO=e=>"use first value as default ".concat(e?'("'.concat(e,'")'):""),eA=(e,t)=>t?e:void 0,eN={...p.Jp,default_value:{type:eM.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:n}=(0,U.u6)(),r=null===(t=n.config)||void 0===t?void 0:t.options[0];return(0,i.jsx)(eh.w8,{...e,defaultValue:e.field.value,controlledValue:r,setControlledValue:e.helpers.setValue,buildControlledValue:eA,label:eO})}},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,i.jsx)(eh.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,w.B9)(eN,"id"))}),eq={FormFields:eN,create:e=>({type:"Select",config:{label:e,placeholder:"",options:["1","2"]}}),schema:eP,Meta:eR,TYPE_NAME:"Select",label:a._M.name};var eV=n(47927),ez=n(29259),eB=n.n(ez),eG=n(85505),eJ=n.n(eG),eU=n(34543);let eZ=e=>t=>{let{size:n}=t;return(0,i.jsx)("span",{style:{fontSize:n},children:e})},eH=[{value:"paragraph",label:"P",icon:eZ("p")},{value:"preformatted",label:"PRE",icon:eZ("pre")},{value:"heading1",label:"H1",icon:eZ("h1")},{value:"heading2",label:"H2",icon:eZ("h2")},{value:"heading3",label:"H3",icon:eZ("h3")},{value:"heading4",label:"H4",icon:eZ("h4")},{value:"heading5",label:"H5",icon:eZ("h5")},{value:"heading6",label:"H6",icon:eZ("h6")},{value:"strong",label:"Strong",icon:eZ((0,i.jsx)("b",{children:"b"}))},{value:"em",label:"em",icon:eZ((0,i.jsx)("em",{style:{fontFamily:"serif"},children:"I"}))},{value:"hyperlink",label:"hyperlink",icon:eZ((0,i.jsx)(eU.eR7,{}))},{value:"image",label:"image",icon:eZ((0,i.jsx)(eU.LFN,{}))},{value:"embed",label:"embed",icon:eZ((0,i.jsx)(eU.xqv,{}))},{value:"list-item",label:"list",icon:eZ((0,i.jsx)(eU.SnF,{}))},{value:"o-list-item",label:"o",icon:eZ((0,i.jsx)(ep.KyO,{}))},{value:"rtl",label:"rtl",icon:eZ("rtl")}],eW=eH.map(e=>e.value),e$=e=>!eW.find(t=>!e.includes(t)),eX=e=>{let t=e.split(",");return eH.reduce((e,n)=>{let{value:i}=n;return t.includes(i)?[...e,i]:e},[])};function eK(e,t){return(0,eV.has)("parent",e)&&eB()(e.parent)&&(0,eV.has)(t,e.parent)&&eJ()(e.parent[t])?e.parent[t]:null}function eY(e){return()=>o.string().test({name:e,message:"Options cannot be empty",test:function(t,n){let i="single"===e?"multi":"single",r=eK(n,e),l=eK(n,i);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,h.Jg)("Allow target blank for links"),single:{validate:eY("single")},multi:{validate:eY("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,w.B9)({...eQ,labels:{yupType:"array",validate:{}}},"id"))}),e5={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:n,values:r,errors:l,fields:o,setFieldValue:a}=e,{config:{single:p,multi:h}}=r,f=p?eX(p):h?eX(h):eW,[m,x]=(0,y.useState)(!p),[g,v]=(0,y.useState)(f);return(0,y.useEffect)(()=>{let e=m?1:0;a(e0[e],g.join(",")),setTimeout(()=>{a(e0[1-e],void 0)},100)},[m,g]),(0,i.jsxs)(d.k,{children:[Object.entries(eQ).map(e=>{let[t,r]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(t),formField:r,fields:o,initialValues:n})},t)}),(0,i.jsxs)(d.J,{children:[(0,i.jsxs)(s.__,{htmlFor:"accept",variant:"label.primary",sx:{mt:1,display:"flex",alignItems:"center"},children:["Accept*",(0,i.jsx)(s.zx,{type:"button",variant:"buttons.textButton",onClick:()=>{if(e$(g))return v([]);v(eW)},children:e$(g)?"Unselect All":"Select all"})]}),eH.map(e=>(0,i.jsx)(ef.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[m?"multi":"single"])?(0,i.jsx)(s.xu,{sx:{position:"absolute"},children:(0,i.jsx)(s.xv,{as:"span",variant:"text.labelError",pl:0,children:l.config[m?"multi":"single"]})}):null]}),(0,i.jsx)(d.J,{children:(0,i.jsx)(s.kC,{sx:{mt:2,alignItems:"center",height:"100%"},children:(0,i.jsxs)(s.__,{variant:"label.border",children:[(0,i.jsx)(s.XZ,{checked:m,onChange:()=>x(!m)}),"Allow multiple paragraphs"]})})})]})},label:a._n.name};var e6=n(18978);let e4={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:e6.WHV},label:a.BB.name},e3=p.Jp,e9=o.object().shape({type:o.string().matches(/^Text$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(e3,"id"))}),e8={create:e=>({type:"Text",config:{label:e,placeholder:""}}),Meta:{icon:l.SQS},schema:e9,TYPE_NAME:"Text",FormFields:e3,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,w.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},tn=o.object().shape({type:o.string().matches(/^UID$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(tt,"id"))}),ti={Boolean:P,Color:G,ContentRelationship:er,Date:ea,Embed:ec,GeoPoint:eu,Image:e_,Link:Q,LinkToMedia:eE,Number:eD,Select:eq,StructuredText:e5,Table:e4,Text:e8,Timestamp:te,UID:{create:e=>({type:"UID",config:{label:e,placeholder:""}}),Meta:{icon:l.XN7},schema:tn,TYPE_NAME:"UID",FormFields:tt,label:a.Fj.name}},tr=[ti.Image,ti.Text,ti.StructuredText,ti.Link,ti.Select,ti.Boolean,ti.Number,ti.Color,ti.Date,ti.Table,ti.Embed,ti.Timestamp,ti.GeoPoint,ti.ContentRelationship,ti.LinkToMedia],tl="subItem",to=v({schemaTypeRegex:/^NestedGroup$/,customListItem:e=>(0,i.jsx)(A,{Widgets:ti,widgetsArray:tr,hintBase:tl,...e}),customName:"NestedGroup",hintItemName:tl}),ta={...ti,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],td="item",tc={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"}}(),n=ts.filter(e=>!!t.eligible||"NestedGroup"!==e.CUSTOM_NAME);return(0,i.jsx)(A,{Widgets:ta,widgetsArray:n,hintBase:td,...e})},hintItemName:td}),NestedGroup:to,...ti}},16086:function(e,t,n){"use strict";n.d(t,{B9:function(){return o},Ss:function(){return s},uS:function(){return a},zg:function(){return d}});var i=n(65413),r=n(68169),l=n(9889);let o=(e,t)=>{let{[t]:n,...i}=e;return i},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),d=e=>({TYPE_NAME:e,FormFields:l.Jp,schema:i.object().shape({type:i.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"))})})},5683:function(e,t,n){"use strict";n.d(t,{i:function(){return l},v:function(){return r}});let i=e=>"slice-machine_".concat(e),r=i("staticFieldsInfoDialogDismissed");function l(e){let{type:t,library:n,sliceId:r,variationId:l}=e;return i(["ai-feedback",t,n,r,l].join("#"))}},49919:function(e,t,n){"use strict";function i(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))}n.d(t,{T:function(){return i}})},93155:function(e,t,n){"use strict";n.d(t,{F:function(){return r}});var i=n(41347);function r(e){var t,n,r,l,o,a;return{allowText:null===(t=e.config)||void 0===t?void 0:t.allowText,repeat:null===(n=e.config)||void 0===n?void 0:n.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:n,nestedPickedFields:r}=(0,i.WP)((0,i.Vg)({linkCustomtypes:null===(t=e.config)||void 0===t?void 0:t.customtypes}));return{linkPickedFields:n,linkNestedPickedFields:r}})()}}},5495:function(e,t,n){"use strict";n.d(t,{V:function(){return o}});var i=n(94160),r=n(49919),l=n(93155);function o(e){var t,n;let{id:o,field:a,isInAGroup:s=!1}=e;i.Xe.track({event:"field:added",id:o,name:null!==(n=null===(t=a.config)||void 0===t?void 0:t.label)&&void 0!==n?n:"",type:a.type,isInAGroup:s,contentType:(0,r.T)(window.location.pathname),..."Link"===a.type&&(0,l.F)(a)})}},39302:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(94160),r=n(49919),l=n(93155);function o(e){var t,n;let{id:o,previousId:a=o,field:s,isInAGroup:d=!1}=e;i.Xe.track({event:"field:updated",previousId:a,id:o,idUpdated:a!==o,name:null!==(n=null===(t=s.config)||void 0===t?void 0:t.label)&&void 0!==n?n:"",type:s.type,isInAGroup:d,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"}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[849],{21985:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/changes",function(){return n(22425)}])},72641:function(e,t,n){"use strict";n.d(t,{R$:function(){return o},Qj:function(){return x},T9:function(){return d},nf:function(){return u},u2:function(){return c},_T:function(){return h}});var i=n(52322),s=n(14226),l=n(6277),r=n(83478),a=n.n(r);let o=e=>{let{backgroundImage:t,style:n,...s}=e,r=void 0!==t;return(0,i.jsx)("article",{...s,className:(0,l.W)(a().root,{[a().withBackground]:r}),style:{backgroundImage:r?"url(".concat(t,")"):void 0,...n}})},c=e=>(0,i.jsx)("div",{...e,className:a().image}),d=e=>(0,i.jsx)("div",{...e,className:a().content}),h=e=>(0,i.jsx)(s.bL,{...e,variant:"h3"}),u=e=>(0,i.jsx)(s.bL,{...e,color:"grey11"}),x=e=>(0,i.jsx)("div",{...e,className:a().actions,color:"grey"})},33986:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});var i=n(52322),s=n(2784),l=n(75289);let r=(e,t)=>e?"".concat(e,"-").concat(t):"",a=e=>{switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},o=(0,s.forwardRef)((e,t)=>{let{label:n,Icon:s,type:o,form:c,isLoading:d=!1,disabled:h=!1,onClick:u,sx:x={},iconSize:m=16,iconFill:g,variant:p="primary",...j}=e;return(0,i.jsx)(l.zx,{ref:t,sx:{...x,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",...d?{cursor:"wait !important"}:{}},type:o,form:c,disabled:h||d,onClick:d?void 0:u,variant:p,...j,children:d?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.$j,{size:m,color:a(p),"data-testid":r(j["data-testid"],"spinner")}),s&&n]}):(0,i.jsxs)(i.Fragment,{children:[s&&(0,i.jsx)(s,{size:m,fill:g,"data-testid":r(j["data-testid"],"icon")}),n]})})})},21151:function(e,t,n){"use strict";var i=n(52322),s=n(75289);t.Z=function(e){let{elems:t,renderElem:n,defineElementKey:l,gridTemplateMinPx:r="320px",gridGap:a="16px",sx:o}=e;return(0,i.jsx)(s.xu,{as:"section",sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(".concat(r,", 1fr))"),gridGap:a,pt:2,...o},children:t.map((e,t)=>e?(0,i.jsx)("span",{children:n(e,t)},"".concat(l(e),"-").concat(t+1)):null)})}},22425:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ea}});var i=n(52322),s=n(14226),l=n(97729),r=n.n(l),a=n(5632),o=n(2784),c=n(88932),d=n(65077),h=n(94160),u=n(43388),x=n(72641);function m(e){let{isPostPush:t,documentsListEndpoint:n}=e,l=t?p:g;return(0,i.jsxs)(x.R$,{style:{alignSelf:"center",marginTop:s.t.space[72]},children:[(0,i.jsx)(x.u2,{children:(0,i.jsx)(s.a_,{src:l.img,sizing:"cover"})}),(0,i.jsxs)(x.T9,{children:[(0,i.jsx)(x._T,{children:l.title}),(0,i.jsx)(x.nf,{children:l.description}),t&&(0,i.jsx)(x.Qj,{children:(0,i.jsx)(s.E,{onClick:()=>{h.Xe.track({event:"post-push:empty-state-cta-clicked"}),window.open(n,"_blank")},size:"large",children:"Create content in the Page Builder"})})]})]})}let g={img:"/blank-slate-changes-uptodate.png",title:"Everything is up-to-date",description:"No changes are staged. Saved updates will appear here, ready to be pushed to the Page Builder."},p={img:"/blank-slate-push-success.png",title:"Success! Your changes have been pushed to the Page Builder.",description:"Add content to your website to bring it to life!"},j=(0,o.forwardRef)((e,t)=>(0,i.jsx)(s.E,{...e,ref:t,startIcon:"upload",children:"Push"}));var f=n(98250),v=n(98033),b=n(68968),y=n(13434),k=n(19468),C=n(978),w=n(30613),S=n(58446),_=n(91914),D=n(75289);let T=()=>(0,i.jsx)(D.kC,{sx:{justifyContent:"center",alignItems:"center",flex:1},children:(0,i.jsxs)(D.kC,{sx:{flexDirection:"column",alignItems:"center",transform:"translateY(-50%)"},children:[(0,i.jsx)(_.wQ1,{size:48}),(0,i.jsx)(D.xv,{sx:{fontWeight:600,fontSize:"24px",lineHeight:"32px",mb:"8px",mt:"2px",textAlign:"center"},children:"No internet connection"}),(0,i.jsx)(D.xv,{sx:{fontSize:"13px",lineHeight:"24px",textAlign:"center"},children:"Connect to the internet to sync your changes."})]})});var L=n(54597);let B=()=>{let{openLoginModal:e}=(0,L.Z)();return(0,i.jsxs)(s.D,{flexDirection:"column",height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[(0,i.jsx)(s.bL,{variant:"h3",align:"center",children:"It seems like you are logged out"}),(0,i.jsx)(s.bL,{align:"center",children:"Log in to connect to your repository."}),(0,i.jsxs)(s.bL,{align:"center",children:["If that doesn't work, it's possible that Slice Machine is having trouble accessing Prismic's servers."," ",(0,i.jsx)(s.bL,{href:"https://community.prismic.io/",children:"Contact our support team"}),"."]}),(0,i.jsx)(s.E,{onClick:()=>e(),children:"Log in to Prismic"})]})};var E=n(951),I=n(63908),O=n(87446),N=n(51507),F=n(21442);let R=e=>{let{children:t}=e;return(0,i.jsx)(D.kC,{sx:{alignItems:"center",justifyContent:"space-between",mt:"8px",bg:"grey02",borderRadius:4,padding:"12px 16px",width:"100%"},children:t})};var z=n(39097),A=n.n(z),P=n(99195),W=n(59294),H=n(16442);let X=e=>{let{ct:t,status:n,authStatus:s,isOnline:l}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(D.xu,{as:"td",style:{width:"40%"},children:(0,i.jsx)(D.xv,{sx:{fontWeight:500},children:t.label})}),(0,i.jsx)(D.xu,{as:"td",style:{width:"40%"},children:t.id}),(0,i.jsx)(D.xu,{as:"td",style:{width:"20%"},children:(0,i.jsx)(P.O,{authStatus:s,isOnline:l,modelStatus:n,modelType:"CustomType"})})]})},Z=e=>{let{customTypes:t,modelsStatuses:n,authStatus:s,isOnline:l}=e;return(0,i.jsxs)(D.xu,{as:"table","data-legacy-component":!0,children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{className:"transparent small",children:[(0,i.jsx)(D.xu,{as:"th",sx:{width:"40%",fontWeight:600},children:"Name"}),(0,i.jsx)(D.xu,{as:"th",sx:{width:"40%",fontWeight:600},children:"API ID"}),(0,i.jsx)(D.xu,{as:"th",sx:{width:"20%",fontWeight:600},children:"Status"})]})}),(0,i.jsx)("tbody",{children:t.map(e=>(0,H.TG)(e)?(0,i.jsx)(A(),{passHref:!0,href:W.cd[e.local.format].getBuilderPagePathname(e.local.id),legacyBehavior:!0,children:(0,i.jsx)("tr",{tabIndex:0,"data-testid":"custom-type-".concat(e.local.id),children:(0,i.jsx)(X,{ct:e.local,status:n.customTypes[e.local.id],authStatus:s,isOnline:l},e.local.id)})},e.local.id):(0,i.jsx)("tr",{tabIndex:0,className:"disabled","data-testid":"custom-type-".concat(e.remote.id),children:(0,i.jsx)(X,{ct:e.remote,status:n.customTypes[e.remote.id],authStatus:s,isOnline:l},e.remote.id)},e.remote.id))})]})};var G=n(21151),M=n(68105),U=n(56448),Y=n(96317);function Q(){let e=(0,Y.L)("slicemachine-dev-collaboration"),[t,n]=(0,o.useState)(!1),l=null==e?void 0:e.payload;return((0,o.useEffect)(()=>{(null==e?void 0:e.value)==="on"&&void 0!==l&&h.Xe.track({event:"dev-collab:workflow-stub-displayed"})},[e,l]),(null==e?void 0:e.value)!=="on"||void 0===l)?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.D,{alignItems:"flex-start",border:{bottom:!0,left:!0,right:!0,top:!0},borderRadius:6,borderStyle:"dashed",flexDirection:"column",flexShrink:0,gap:8,padding:16,width:320,children:[(0,i.jsxs)(s.D,{flexDirection:"column",gap:2,children:[(0,i.jsx)(s.bL,{variant:"smallBold",children:l.cardTitle}),(0,i.jsx)(s.bL,{color:"grey11",variant:"small",children:l.cardDescription})]}),(0,i.jsx)(s.E,{color:"grey",onClick:()=>{h.Xe.track({event:"dev-collab:set-up-workflow-opened"}),n(!0)},children:l.cardButtonLabel})]}),(0,i.jsxs)(s.ae,{onOpenChange:e=>{e||n(!1)},open:t,size:{height:"auto",width:448},children:[(0,i.jsx)(s.al,{title:l.dialogTitle}),(0,i.jsx)(s.aj,{children:(0,i.jsxs)(s.D,{flexDirection:"column",children:[(0,i.jsx)(s.D,{flexDirection:"column",padding:16,children:(0,i.jsx)(s.bL,{children:l.dialogDescription})}),(0,i.jsxs)(s.ah,{children:[(0,i.jsx)(s.ai,{size:"medium"}),(0,i.jsx)(s.af,{size:"medium",onClick:()=>{h.Xe.track({event:"dev-collab:join-beta-clicked"}),window.open(l.dialogButtonLink,"_blank"),n(!1)},children:l.dialogButtonLabel})]})]})})]})]})}let J=e=>{let{unSyncedCustomTypes:t,unSyncedSlices:n,modelsStatuses:l,authStatus:r,isOnline:a}=e,{modalPayload:c,onOpenModal:d}=(0,F.H)(),{sliceFilterFn:h,defaultVariationSelector:u}=c,x=n.filter(e=>l.slices[e.model.id]!==U.GJ.Deleted);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(s.D,{gap:16,alignItems:"flex-start",children:[(0,i.jsxs)(s.D,{flexDirection:"column",flexGrow:1,children:[t.length>0&&(0,i.jsxs)(s.D,{flexDirection:"column",children:[(0,i.jsx)(R,{children:(0,i.jsxs)(s.D,{children:[(0,i.jsx)(s.bL,{variant:"h5",children:"Types"}),(0,i.jsx)(s.bL,{variant:"h5",sx:{marginLeft:8},children:t.length})]})}),(0,i.jsx)(Z,{customTypes:t,modelsStatuses:l,authStatus:r,isOnline:a})]}),n.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.D,{padding:{bottom:8},children:(0,i.jsxs)(R,{children:[(0,i.jsxs)(s.D,{children:[(0,i.jsx)(s.bL,{variant:"h5",children:"Slices"}),(0,i.jsx)(s.bL,{variant:"h5",sx:{marginLeft:8},children:n.length})]}),(0,i.jsxs)(s.D,{children:[n.some(e=>(0,I.cx)(e)>0&&l.slices[e.model.id]!==U.GJ.Deleted)&&(0,i.jsxs)(s.bL,{color:"amber11",sx:{marginRight:8,alignSelf:"center"},children:[(0,i.jsx)(E.sQg,{size:16,style:{marginRight:"4px",position:"relative",top:"3px"}}),"Missing Screenshots"]}),(0,i.jsx)(s.E,{color:"dark",startIcon:"photoCamera",onClick:()=>d({sliceFilterFn:e=>e}),children:"Update all screenshots"})]})]})}),(0,i.jsx)(G.Z,{gridGap:"32px 16px",elems:n,gridTemplateMinPx:"305px",defineElementKey:e=>e.model.name,renderElem:e=>{let t=l.slices[e.model.id];return(0,i.jsx)(N.b,{action:{type:"status",authStatus:r,isOnline:a,modelStatus:t},isDeleted:t===U.GJ.Deleted,mode:"navigation",onUpdateScreenshot:()=>{d({sliceFilterFn:t=>t.filter(t=>t.model.id===e.model.id)})},slice:e,variant:"solid"})}}),(0,i.jsx)(M.Z,{slices:h(x),defaultVariationSelector:u})]})]}),(0,i.jsx)(O.h,{children:(0,i.jsx)(o.Suspense,{children:(0,i.jsx)(Q,{})})})]})})};var $=n(56580),q=n(33986),K=n(79797),V=n(30527);let ee=e=>{let{isOpen:t,title:n,footer:s,explanations:l,onClose:r}=e;return(0,i.jsx)(K.Z,{placement:"right",open:t,level:null,onClose:r,width:496,children:(0,i.jsx)(V.Z,{radius:"0px",bodySx:{bg:"white",padding:24,flex:1,display:"flex",flexDirection:"column",overflow:"scroll"},footerSx:{p:0},sx:{flexDirection:"column",display:"flex",height:"100%",border:"none"},borderFooter:!0,Header:(0,i.jsxs)(D.kC,{sx:{p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))}},children:[(0,i.jsx)(D.kC,{sx:{alignItems:"center"},children:(0,i.jsx)(D.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:n})}),(0,i.jsx)(D.x8,{type:"button",onClick:()=>r()})]}),Footer:()=>(0,i.jsx)(D.kC,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"center",paddingRight:16,borderTop:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.darkBorders))},backgroundColor:"white",padding:20},children:s}),children:l})})};var et=n(78254);n(98564);let en=e=>{let{ctName:t,numberOfDocuments:n,link:s,isOverLimit:l=!1}=e;return(0,i.jsxs)(D.Zb,{sx:{mb:12},variant:"drawerCard","data-testid":"AssociatedDocumentsCard-".concat(t),children:[(0,i.jsxs)(D.kC,{sx:{flexDirection:"column"},children:[(0,i.jsx)(D.xv,{children:t}),(0,i.jsxs)(D.xv,{sx:{color:"textClear",fontSize:"12px",lineHeight:"16px"},children:[n," documents"]})]}),(0,i.jsx)(D.rU,{href:s,target:"_blank",variant:"cardSmall",sx:{color:l?"danger":"purple08"},children:"View documents"})]})},ei=e=>{let{pushChanges:t,modalData:n,onClose:s}=e,{remoteOnlyCustomTypes:l}=(0,$.v9)(e=>({remoteOnlyCustomTypes:(0,et.Ch)(e).filter(H.yp)}));if((null==n?void 0:n.type)!=="HARD")return null;let r=n.details.customTypes.map(e=>{var t;let n=l.find(t=>(0,H.n5)(t)===e.id);return void 0===n?null:(0,i.jsx)(en,{isOverLimit:!0,ctName:null!==(t=n.remote.label)&&void 0!==t?t:n.remote.id,link:e.url,numberOfDocuments:e.numberOfDocuments},e.id)});return(0,i.jsx)(ee,{isOpen:"HARD"===n.type,title:"Manual action required",onClose:s,footer:(0,i.jsx)(q.z,{label:"Try again",variant:"primary",onClick:()=>{t(!1)},sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}}),explanations:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(D.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:["Your type",n.details.customTypes.length>1&&"s"," cannot be deleted."]}),(0,i.jsxs)(D.xv,{sx:{mb:24},children:[n.details.customTypes.length>1?"These types have":"This type has"," ","too many associated Documents. Archive and delete these Documents manually and then try deleting the types again."]}),r]})})},es=e=>{let{onToggle:t,isConfirmed:n,sx:s}=e;return(0,i.jsxs)(D.kC,{sx:{borderRadius:6,flexDirection:"column",backgroundColor:"grey03",padding:12,width:"100%",...s},children:[(0,i.jsx)(D.xv,{sx:{fontWeight:"bold",mb:2},children:"Are you sure to proceed?"}),(0,i.jsxs)(D.__,{sx:{mt:"4px",py:1},variant:"large",children:[(0,i.jsx)(D.XZ,{defaultChecked:n,onChange:t,variant:"forms.checkbox.dark"}),"Delete these Documents"]})]})},el=e=>{let{pushChanges:t,modalData:n,onClose:s}=e,[l,r]=(0,o.useState)(!1),{remoteOnlyCustomTypes:a}=(0,$.v9)(e=>({remoteOnlyCustomTypes:(0,et.Ch)(e).filter(H.yp)}));if((null==n?void 0:n.type)!=="SOFT")return null;let c=n.details.customTypes.map(e=>{var t;let n=a.find(t=>(0,H.n5)(t)===e.id);return void 0===n?null:(0,i.jsx)(en,{isOverLimit:!0,ctName:null!==(t=n.remote.label)&&void 0!==t?t:n.remote.id,link:e.url,numberOfDocuments:e.numberOfDocuments},e.id)});return(0,i.jsx)(ee,{isOpen:"SOFT"===n.type,title:"Confirm deletion",onClose:s,footer:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(es,{onToggle:()=>{r(!l)},isConfirmed:l,sx:{mb:10}}),(0,i.jsx)(q.z,{label:"Push changes",variant:"primary",onClick:()=>{t(l)},disabled:!l,sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}})]}),explanations:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(D.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:"This action will also delete Documents."}),(0,i.jsxs)(D.xv,{sx:{mb:24},children:[n.details.customTypes.length>1?"These types have":"This type has"," ","associated Documents, which will also be deleted. This might create broken links in your repository."]}),c]})})};var er=n(93671),ea=()=>{let{unSyncedSlices:e,unSyncedCustomTypes:t,changedCustomTypes:n,changedSlices:l,modelsStatuses:x}=(0,y.X)(),g=(0,C.L)(),p=(0,k.n)(),{pushChangesSuccess:_,refreshState:D}=(0,L.Z)(),[E,I]=(0,o.useState)(!1),[O,N]=(0,o.useState)(void 0),{autoSyncStatus:F}=(0,b.g)(),R=(0,a.useRouter)(),[z,A]=(0,o.useState)(!1),[P,W]=(0,o.useState)(!1),{repositoryUrl:H}=(0,w.U)(),{completeStep:X}=(0,f.k)(),Z=e.length+t.length;(0,o.useEffect)(()=>{("synced"===F||"failed"===F||"syncing"===F)&&R.push("/")},[F,R]);let G=async e=>{try{I(!0),N(void 0);let t=await (0,v.t)({confirmDeleteDocuments:e,changedCustomTypes:n,changedSlices:l});if(void 0!==t)N(t);else{let e=await (0,h.y0)();D(e),_(),A(!0),W(!0),X("reviewAndPush")}}catch(e){console.error("Something went wrong when manually pushing your changes",e),c.Am.error("Something went wrong when pushing your changes. Check your terminal logs.")}I(!1)},M=(0,o.useMemo)(()=>g?p===er.t.UNAUTHENTICATED?(0,i.jsx)(B,{}):0===Z?(0,i.jsx)(m,{isPostPush:z,documentsListEndpoint:H}):(0,i.jsx)(J,{unSyncedSlices:e,unSyncedCustomTypes:t,modelsStatuses:x,authStatus:p,isOnline:g}):(0,i.jsx)(T,{}),[g,p,Z,e,t,x,z,H]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r(),{children:(0,i.jsx)("title",{children:"Changes - Slice Machine"})}),(0,i.jsxs)(S.LN,{children:[(0,i.jsxs)(S.wd,{children:[(0,i.jsx)(S.Cx,{children:(0,i.jsx)(u.g,{children:"Changes"})}),(0,i.jsxs)(S.K2,{children:[(0,i.jsx)(j,{disabled:0===Z||!g||p!==er.t.AUTHENTICATED||E,loading:E,onClick:()=>{G(!1)}}),(0,i.jsx)(s.bQ,{anchor:(0,i.jsx)(s.D,{position:"fixed",top:32,right:32,width:322}),open:P,variant:"card",seconds:20,title:"Success! \uD83C\uDF89",subtitle:"Your changes have been pushed.",action:{title:"Create content in the Page Builder",onClick:()=>{h.Xe.track({event:"post-push:toast-cta-clicked"}),window.open(H,"_blank")}},cancel:{onClick:()=>W(!1)},onOpenChange:W})]})]}),(0,i.jsx)(S.RN,{children:(0,i.jsxs)(d.xR,{sx:{display:"flex",flexDirection:"column"},children:[M,(0,i.jsx)(el,{pushChanges:e=>void G(e),modalData:O,onClose:()=>N(void 0)}),(0,i.jsx)(ei,{pushChanges:e=>void G(e),modalData:O,onClose:()=>N(void 0)})]})})]})]})}},83478:function(e){e.exports={column:"BlankSlate_column__genEe",root:"BlankSlate_root__CmSqW BlankSlate_column__genEe",fadeIn:"BlankSlate_fadeIn__mAfi5",withBackground:"BlankSlate_withBackground__mLYij",image:"BlankSlate_image__Jn90S BlankSlate_column__genEe",content:"BlankSlate_content__0Yt2d BlankSlate_column__genEe",desc:"BlankSlate_desc___Dl7e",actions:"BlankSlate_actions__OYRj4"}}},function(e){e.O(0,[898,789,123,918,34,658,888,774,179],function(){return e(e.s=21985)}),_N_E=e.O()}]);
|
package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-e6bc7cc6186d6a0f.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[136],{31314:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/slices/[lib]/[sliceName]/[variation]",function(){return n(57514)}])},50477:function(e,t,n){"use strict";n.d(t,{NG:function(){return s},xU:function(){return a}});var i=n(18566),r=n(2784),o=n(80148);function a(e){let t=(0,r.useCallback)(t=>(0,i.VA)(l,[e],t),[e]);return{customTypes:(0,i.QT)(l,[e]),updateCustomTypes:t}}async function l(e){let{errors:t,models:n}=await o.managerClient.customTypes.readAllCustomTypes(e?{format:e}:void 0);if(t.length>0)throw t;return n.map(e=>{let{model:t}=e;return t})}function s(e){(0,i.gw)(l,[]),(0,i.gw)(l,[e])}},44309:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var i=n(5632),r=n(56580),o=n(7723);let a=(e,t,n)=>{var i;let r=null===(i=(0,o.Sd)(e))||void 0===i?void 0:i.find(e=>e.name.replace(/\//g,"--")===t);return null==r?void 0:r.components.find(e=>e.model.name===n)};var l=()=>{let e=(0,i.useRouter)(),{slice:t}=(0,r.v9)(t=>({slice:a(t,e.query.lib,e.query.sliceName)}));if(!t)return{};let n=t.model.variations.find(t=>t.id===e.query.variation);return n?{slice:t,variation:n}:{}}},57514:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eO}});var i=n(52322),r=n(97729),o=n.n(r),a=n(5632),l=n(74217),s=n(2784),d=n(94160),c=n(68968),u=n(23710),m=n(54597);let h=(0,s.createContext)(void 0);function p(e){let{children:t,initialSlice:n}=e,r=(0,a.useRouter)(),[o,p]=(0,s.useState)(n),{actionQueueStatus:f,setNextAction:v}=(0,u.c)({errorMessage:"Failed to save slice. Check your browser's console for more information."}),{saveSliceSuccess:x}=(0,m.Z)(),y=(0,l.R9)(x),{syncChanges:g}=(0,c.g)(),j=(0,s.useMemo)(()=>{let e=r.query.variation,t=o.model.variations.find(t=>t.id===e);if(t)return t;throw Error("Variation not found")},[o,r]),b=(0,s.useCallback)((e,t)=>{p(e),v(async()=>{let{errors:n}=await (0,d.Ve)(e);if(n.length>0)throw n;let{errors:i,mocks:r}=await (0,d.pL)({libraryID:e.from,sliceID:e.model.id});if(i.length>0)throw i;y({...e,mocks:r}),g(),null==t||t()})},[v,y,g]),w=(0,s.useMemo)(()=>({actionQueueStatus:f,slice:o,setSlice:b,variation:j}),[f,o,b,j]);return(0,i.jsx)(h.Provider,{value:w,children:"function"==typeof t?t(w):t})}function f(){let e=(0,s.useContext)(h);if(!e)throw Error("SliceBuilderProvider not found");return e}var v=n(44309),x=n(14226),y=n(43388),g=n(23094),j=n(18566),b=n(80148);async function w(e){let{errors:t,model:n}=await b.managerClient.customTypes.readCustomType({id:e});if(t.length>0)throw t;return n}var C=n(59294),I=n(87446),k=n(14101),S=n(81229);let D=e=>(0,i.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,i.jsx)("path",{d:"M9.5 12L6 9.5L9.5 7V9.5V12Z",fill:"currentColor"}),(0,i.jsx)("path",{d:"M6 9.5H11C14.3 9.5 17 12.2 17 15.5V17.5M6 9.5L9.5 12V9.5V7L6 9.5Z",stroke:"currentColor",strokeLinecap:"round"})]}),T=()=>{let{source:e}=(0,k.l)(),t=function(e){let t=(0,C.Ag)(e.query);return void 0!==t&&(0,C.ne)(e.asPath,t)?t:void 0}(e);return void 0!==t?(0,i.jsx)(I.h,{children:(0,i.jsx)(s.Suspense,{children:(0,i.jsx)(x.D,{bottom:32,justifyContent:"center",position:"fixed",right:0,width:"100vw",children:(0,i.jsx)(E,{sourceCustomTypeId:t})})})}):null},E=e=>{let{sourceCustomTypeId:t}=e,n=(0,j.QT)(w,[t]),[r,o]=(0,s.useState)(!0),l=(0,a.useRouter)();if(void 0===n||!r)return null;{let{format:e,id:t}=n,r=C.cd[e].getBuilderPagePathname(t);return(0,i.jsxs)(x.F,{density:"compact",color:"dark",children:[(0,i.jsxs)(x.E,{onClick:()=>{l.push(r)},renderStartIcon:()=>(0,i.jsx)(D,{}),children:["Return to ",n.label]}),(0,i.jsx)(x.E,{onClick:()=>{o(!1)},renderStartIcon:()=>(0,i.jsx)(S.T,{})})]})}},A=()=>(0,i.jsx)(x.E,{asChild:!0,invisible:!0,color:"grey",endIcon:"openInNew",sx:{alignSelf:"center"},onClick:()=>{d.Xe.track({event:"mcp:promo-link-clicked",source:"slice_editor",target:"docs"})},children:(0,i.jsx)("a",{href:"https://prismic.io/docs/ai#code-with-prismics-mcp-server",target:"_blank",children:"Boost your workflow in Cursor with Prismic MCP"})});var R=n(58446),L=n(56580),_=n(33710),F=n(77057),O=n(39180),N=n(7974),V=n(79384);let M=e=>{let{children:t,open:n,onClose:r}=e;return(0,i.jsxs)(F.zs,{open:n,trigger:t,onClose:r,children:[(0,i.jsx)(F.Ev,{children:"Simulate your slices"}),(0,i.jsx)(F.LB,{component:"video",cloudName:"dmtf1daqp",loop:!1,autoPlay:!1,publicId:N.Sn,poster:"/simulator-video-thumbnail.png",controls:!0,onPlay:()=>{d.Xe.track({event:"open-video-tutorials",video:N.Sn})}}),(0,i.jsx)(F.OJ,{children:"Minimize context-switching by previewing your Slice components in the simulator."}),(0,i.jsx)(F.Rp,{children:"Got it"})]})};var P=e=>{let{disabled:t}=e,n=(0,a.useRouter)(),r=(0,s.useRef)(null),{setSeenSimulatorToolTip:o}=(0,m.Z)(),{hasSeenSimulatorTooltip:l}=(0,L.v9)(e=>({hasSeenSimulatorTooltip:(0,V.bv)(e)}));(0,s.useEffect)(()=>{let e=r.current;e&&!l&&setTimeout(()=>_.Z.show(e),5e3)},[l]);let d=()=>{if(o(),r.current){let{current:e}=r;_.Z.hide(e)}};return(0,i.jsx)("span",{"data-tip":!0,"data-tip-disable":!1,"data-for":"simulator-button-tooltip",ref:r,children:(0,i.jsx)(M,{open:!l,onClose:d,children:(0,i.jsx)(x.E,{"data-tip":!0,"data-testid":"simulator-open-button",onClick:()=>{d(),window.open("".concat(n.asPath,"/simulator"),N.pq)},disabled:t,renderStartIcon:()=>(0,i.jsx)(O.z,{color:x.t.color.grey1,height:"24px",style:{transform:"scale(calc(4 / 3))"},width:"24px"}),children:"Simulate"})})})},z=n(88866),Z=n(28316),K=n(88932),B=n(35289),H=n(63908),q=n(34166),W=n(3285),X=n(40141),G=n(49219),U=n(26109),Q=n(45440),Y=n(16086),J=n(358),$=n(5495),ee=n(39302);let et=[Q.C.Image,Q.C.Text,Q.C.StructuredText,Q.C.Link,Q.C.Select,Q.C.Boolean,Q.C.Number,Q.C.Color,Q.C.Date,Q.C.Table,Q.C.Embed,Q.C.Timestamp,Q.C.GeoPoint,Q.C.ContentRelationship,Q.C.LinkToMedia];var en=()=>{let{slice:e,setSlice:t,variation:n}=f(),[r,o]=(0,s.useState)(!1),a=[Q.C.Group,...et],l=!!(n.items&&Object.keys(n.items).length>0),d=i=>r=>{if(i===U.Rt.Items&&n.items&&Object.keys(n.items).length<=1){o(!0);return}t((0,H.AK)({slice:e,variationId:n.id,widgetArea:i,fieldId:r}))},c=(i,r)=>{let{apiId:o,newKey:a,value:l,inGroupFieldAction:s}=r;t((0,H.L4)({slice:e,variationId:n.id,widgetArea:i,previousFieldId:o,newFieldId:a,newField:l}),()=>{"add"===s&&K.Am.success("Field added")}),s||(0,ee.Z)({previousId:o,id:a,field:l})},u=(i,r)=>{let{apiId:o,value:l}=r,{type:s}=l,d=a.find(e=>e.CUSTOM_NAME===s||e.TYPE_NAME===s);if(!d)throw Error("Unsupported Field Type: ".concat(s));try{d.schema.validateSync(l,{stripUnknown:!1})}catch(e){throw Error('Model is invalid for widget "'.concat(l.type,'".'))}t((0,H.xS)({slice:e,variationId:n.id,widgetArea:i,newFieldId:o,newField:l.type===z.GroupFieldType?G.Fl.fromSM(l):l}),()=>{K.Am.success("".concat("Group"===s?"Group":"Field"," added"))}),(0,$.V)({id:o,field:l})},m=e=>t=>""===t.apiId?u(e,{...t,apiId:t.newKey}):c(e,t),h=i=>r=>{if((0,Y.uS)(r))return;let{source:o,destination:a}=r;if(!a)return;let l=(0,H.gR)({slice:e,variationId:n.id,widgetArea:i,sourceIndex:o.index,destinationIndex:a.index});(0,Z.flushSync)(()=>t(l))};return(0,i.jsxs)(x.D,{flexDirection:"column",gap:18,children:[(0,i.jsxs)(B.aV,{children:[(0,i.jsx)(X.Z,{zoneType:"slice",zoneTypeFormat:void 0,tabId:void 0,title:"Fields",dataTip:" The non-repeatable zone\n is for fields<br/> that should appear once, like a<br/>\n section title.\n",fields:n.primary,EditModal:W.Z,widgetsArray:a,onDeleteItem:d(U.Rt.Primary),onSave:m(U.Rt.Primary),onDragEnd:h(U.Rt.Primary),poolOfFieldsToCheck:n.primary||[],renderHintBase:e=>{let{item:t}=e;return"slice.primary".concat((0,J.Ti)(t.key))},renderFieldAccessor:e=>"slice.primary".concat((0,J.Ti)(e)),testId:"static-zone-content",isRepeatableCustomType:void 0,emptyStateHeading:void 0}),l?(0,i.jsx)(X.Z,{zoneType:"slice",zoneTypeFormat:void 0,tabId:void 0,isRepeatable:!0,title:"Repeatable Zone",dataTip:"The repeatable zone is for a group<br/>\n of fields that you want to be able to repeat an<br/>\n indeterminate number of times, like FAQs",widgetsArray:et,fields:n.items,EditModal:W.Z,onDeleteItem:d(U.Rt.Items),onSave:m(U.Rt.Items),onDragEnd:h(U.Rt.Items),poolOfFieldsToCheck:n.items||[],renderHintBase:e=>{let{item:t}=e;return"item".concat((0,J.Ti)(t.key))},renderFieldAccessor:e=>"slice.items[i]".concat((0,J.Ti)(e)),testId:"slice-repeatable-zone",isRepeatableCustomType:void 0,emptyStateHeading:"No fields"}):null,(0,i.jsxs)(x.ae,{size:"small",open:r,onOpenChange:e=>o(e),children:[(0,i.jsx)(x.al,{icon:"delete",title:"Delete field"}),(0,i.jsxs)(x.aj,{children:[(0,i.jsx)(x.D,{padding:24,gap:12,flexDirection:"column",children:e.model.variations.length>1?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("strong",{children:["This action will permanently remove the repeatable zone from the ",e.model.name," slice ",n.name," variation."]}),(0,i.jsx)("div",{children:"Other variations will be left untouched. To reimplement repeatable fields later, use a group field instead of the repeatable zone."})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("strong",{children:["This action will permanently remove the repeatable zone from the ",e.model.name,"."]}),(0,i.jsx)("div",{children:"To reimplement repeatable fields later, use a group field instead of the repeatable zone."})]})}),(0,i.jsxs)(x.ah,{children:[(0,i.jsx)(x.ai,{}),(0,i.jsx)(x.af,{color:"tomato",onClick:()=>{t((0,H.Oh)({slice:e,variationId:n.id})),o(!1)},children:"Delete"})]})]})]})]}),(0,i.jsx)(q.rT,{type:"model",library:e.from,sliceId:e.model.id,variationId:n.id})]})},ei=n(6277),er=n(34887),eo=n.n(er);let ea=e=>{let{variant:t="dashed",color:n="currentColor",className:r}=e;return(0,i.jsx)("hr",{className:(0,ei.W)(eo()["variant-".concat(t)],r),style:{color:x.t.color[n]}})};var el=n(51507),es=n(27763),ed=n(21442);async function ec(e){try{let{errors:t}=await (0,d.Ve)(e.component);if(t.length>0)throw t;let{errors:n}=await (0,d.Xi)({libraryID:e.component.from,sliceID:e.component.model.id,variationID:e.variation.id});if(n.length>0)throw n;(0,q.tB)({type:"model",library:e.component.from,sliceId:e.component.model.id,variationId:e.variation.id});let{slice:i,errors:r}=await (0,d.X$)(e.component.from,e.component.model.id);if(r.length>0)throw r;if(!i)throw Error("Could not read variation `".concat(e.variation.name,"`"));let{mocks:o}=await (0,d.pL)({libraryID:e.component.from,sliceID:e.component.model.id}),a=es.Y.getBuilderPagePathname({libraryName:e.component.href,sliceName:i.name,variationId:i.variations[0].id});await e.router.replace(a);let l={...e.component,model:i,mocks:o};return e.saveSliceSuccess(l),l}catch(n){let t="Could not delete variation `".concat(e.variation.name,"`");throw console.error(t,n),K.Am.error(t),n}}let eu=e=>{let{isOpen:t,onClose:n,slice:r,variation:o}=e,l=(0,a.useRouter)(),[d,c]=(0,s.useState)(!1),{saveSliceSuccess:u}=(0,m.Z)(),{setSlice:h}=f();return(0,i.jsxs)(x.ae,{open:t,onOpenChange:e=>!e&&n(),size:{width:448,height:"auto"},children:[(0,i.jsx)(x.al,{icon:"delete",title:"Delete variation"}),(0,i.jsx)(x.aj,{children:(0,i.jsxs)(x.D,{flexDirection:"column",children:[(0,i.jsxs)(x.bL,{color:"grey11",sx:{marginBlock:16,marginInline:16},children:["This action will remove the variation from the slice model and delete associated files. When you push your changes, the variation will disappear from your repository. This update will"," ",(0,i.jsx)(em,{children:"not"})," affect your documents until you ",(0,i.jsx)(em,{children:"edit"})," ","them manually."]}),(0,i.jsxs)(x.ah,{children:[(0,i.jsx)(x.ai,{size:"medium"}),(0,i.jsx)(x.af,{size:"medium",color:"tomato",onClick:()=>{o&&(async()=>{c(!0);try{let e=await ec({component:r,router:l,saveSliceSuccess:u,variation:o});h(e)}catch(e){}c(!1),n()})()},loading:d,children:"Delete"})]})]})})]})},em=e=>(0,i.jsx)(x.bL,{...e,color:"inherit",component:"span",variant:"bold"});var eh=n(30195);async function ep(e){try{let{errors:t}=await (0,d.Ve)(e.component);if(t.length>0)throw t;let{errors:n}=await (0,d.eH)(e.component,{...e.variation,name:e.variationName});if(n.length>0)throw n;let{slice:i,errors:r}=await (0,d.X$)(e.component.from,e.component.model.id);if(r.length>0)throw r;if(!i)throw Error("Could not read variation `".concat(e.variation.name,"`"));let{mocks:o}=await (0,d.pL)({libraryID:e.component.from,sliceID:e.component.model.id}),a={...e.component,model:i,mocks:o};return e.saveSliceSuccess(a),a}catch(n){let t="Could not rename variation `".concat(e.variation.name,"`");throw console.error(t,n),K.Am.error(t),n}}let ef=e=>{let{isOpen:t,onClose:n,slice:r,variation:o}=e,[a,d]=(0,s.useState)(!1),[c,u]=(0,s.useState)(""),[h,p]=(0,s.useState)(),{setSlice:v}=f(),{saveSliceSuccess:y}=(0,m.Z)();return(0,l.pQ)(t,()=>{if(t&&(null==o?void 0:o.name)!==c){var e;u(null!==(e=null==o?void 0:o.name)&&void 0!==e?e:""),p(void 0)}}),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(x.ae,{open:t,onOpenChange:e=>!e&&n(),size:{width:448,height:"auto"},children:[(0,i.jsx)(x.al,{icon:"edit",title:"Rename variation"}),(0,i.jsx)(x.aj,{children:(0,i.jsxs)(x.aJ,{onSubmit:function(){if(!h&&o){d(!0);try{ep({component:r,saveSliceSuccess:y,variation:o,variationName:c.trim()}).then(e=>{v(e)})}catch(e){}d(!1),n()}},children:[(0,i.jsxs)(x.D,{flexDirection:"column",gap:8,padding:16,children:[(0,i.jsx)(x.bL,{variant:"normal",color:"grey11",children:"This action will rename the variation in the slice model. When you push your changes, the variation will be renamed in your repository."}),(0,i.jsx)(x.D,{flexDirection:"column",gap:4,children:(0,i.jsx)(x.aM,{type:"text",label:"Variation name *",placeholder:"Variation name",error:h,value:c,onValueChange:function(e){u(e),p(function(e){let t=ev.safeParse(e,{errorMap:ex});if(t.error)return t.error.errors[0].message}(e))}})})]}),(0,i.jsxs)(x.ah,{children:[(0,i.jsx)(x.ai,{size:"medium"}),(0,i.jsx)(x.af,{type:"submit",size:"medium",loading:a,disabled:!!h,children:"Rename"})]})]})})]})})},ev=eh.z.string().min(1),ex=e=>e.code===eh.z.ZodIssueCode.too_small?{message:"This field is required"}:{message:"Invalid value"};var ey=n(68105),eg=n(63397),ej=n(96009),eb=n.n(ej),ew=n(36131),eC=n(75289),eI=n(30527);function ek(e){let{children:t}=e,n=(0,eI.W)();return(0,i.jsx)(eC.kC,{sx:{p:3,pl:4,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n,borderBottom:e=>{var t;return"1px solid ".concat(null===(t=e.colors)||void 0===t?void 0:t.borders)}},children:t})}var eS=e=>{let{children:t,FooterContent:n,HeaderContent:r,close:o,sx:a={}}=e;return(0,i.jsx)(eI.Z,{borderFooter:!0,footerSx:{p:0},bodySx:{pt:2,pb:4,px:4},sx:{border:"none",...a},Header:(0,i.jsxs)(ek,{children:[r,o?(0,i.jsx)(eC.x8,{onClick:o,type:"button"}):null]}),Footer:n?(0,i.jsxs)(eC.kC,{sx:{alignItems:"space-between",bg:"headSection",p:3},children:[(0,i.jsx)(eC.xu,{sx:{ml:"auto"}}),n]}):null,children:t})},eD=n(55862);let eT=e=>{let{msg:t}=e;return(0,i.jsx)(eC.xv,{as:"span",sx:{fontSize:12,color:"error",mt:"5px",ml:2},children:t||"Error!"})};var eE=e=>{let{isOpen:t,onClose:n,onSubmit:r,initialVariation:o,variations:a}=e,[l,d]=(0,s.useState)({}),[c,u]=(0,s.useState)(""),[m,h]=(0,s.useState)(!0),[p,f]=(0,s.useState)(""),[v,y]=(0,s.useState)({value:o.id,label:o.name}),[g,j]=(0,s.useState)(!1);function b(){w(),n()}function w(){u(""),f(""),d({}),h(!0),y({value:o.id,label:o.name})}async function C(){let e=function(e){let{id:t,name:n,origin:i}=e,r=t&&t.length?null:{id:"Required!"},o=a.find(e=>e.id===t)?{id:"This id already exists!"}:null,l=n&&n.length?null:{name:"Required!"},s=i.value.length&&a.find(e=>e.id===i.value)?null:{id:"You must select an existing variation!"},d=t&&t.length&&!/^[A-Za-z0-9]+([A-Za-z0-9]+)*$/.exec(t)&&{id:"No special characters allowed"};return{...r,...o,...l,...s,...d}}({id:c,name:p,origin:v});if(Object.keys(e).length)d(e);else{let e=a.find(e=>e.id===v.value);e&&(j(!0),await r(c,p,e),j(!1),b())}}return(0,s.useEffect)(()=>{w()},[o,t]),(0,i.jsx)(eD.Z,{isOpen:t,shouldCloseOnOverlayClick:!0,onRequestClose:()=>b(),contentLabel:"Widget Form Modal",style:{content:{maxWidth:"700px"}},children:(0,i.jsx)(eg.J9,{initialValues:{id:c,name:p,origin:v},onSubmit:C,children:(0,i.jsx)(eg.l0,{id:"variation-add",onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),C())},children:(0,i.jsx)(x.D,{children:(0,i.jsxs)(eS,{sx:{textAlign:"left"},HeaderContent:(0,i.jsx)(eC.xv,{as:"h2",children:"Add new Variation"}),FooterContent:(0,i.jsxs)(x.D,{gap:16,alignItems:"center",children:[(0,i.jsx)(x.E,{onClick:b,color:"grey",children:"Cancel"}),(0,i.jsx)(x.E,{type:"submit",loading:g,children:"Submit"})]}),close:b,children:[(0,i.jsxs)(x.D,{flexDirection:"column",padding:{block:16},children:[(0,i.jsxs)(eC.__,{htmlFor:"name",sx:{mb:1},children:["Variation name*",l.name?(0,i.jsx)(eT,{msg:l.name}):""]}),(0,i.jsx)(eg.gN,{autoComplete:"off",id:"name",name:"name",placeholder:"e.g. Grid - With Icon",as:eC.II,maxLength:30,value:p,onChange:e=>{var t;f(t=e.currentTarget.value),m&&u(eb()(t))}}),(0,i.jsx)(eC.xv,{children:"It will appear here in Slice Machine, and in the page editor in Prismic"})]}),(0,i.jsxs)(x.D,{flexDirection:"column",padding:{bottom:16},children:[(0,i.jsxs)(eC.__,{htmlFor:"id",sx:{mb:1},children:["Variation ID*",l.id?(0,i.jsx)(eT,{msg:l.id}):""]}),(0,i.jsx)(eg.gN,{autoComplete:"off",id:"id",name:"id",placeholder:"e.g. gridWithIcon",as:eC.II,maxLength:30,value:c,onChange:e=>{var t;return t=e.currentTarget.value,void(h(!1),u(eb()(t)))}}),(0,i.jsx)(eC.xv,{children:"It's generated automatically based on the variation name and will appear in the API responses."})]}),(0,i.jsxs)(x.D,{flexDirection:"column",padding:{bottom:8},children:[(0,i.jsx)(eC.__,{htmlFor:"origin",sx:{mb:1},children:"Duplicate from"}),(0,i.jsx)(ew.ZP,{name:"origin",options:a.map(e=>({value:e.id,label:e.name})),onChange:e=>{e&&y(e)},defaultValue:v,maxMenuHeight:150,theme:e=>({...e,colors:{...e.colors,text:"text",primary:"background"}})})]})]})})})})})},eA=n(20136),eR=n.n(eA);let eL=e=>{let{horizontalScroll:t=!1}=e,{slice:n,variation:r,setSlice:o}=f(),[l,c]=(0,s.useState)(),u=(0,ed.H)(),{sliceFilterFn:h,defaultVariationSelector:p,onUploadSuccess:v}=u.modalPayload,y=(0,a.useRouter)(),{saveSliceSuccess:g}=(0,m.Z)(),j=n.model.variations.length;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.D,{flexDirection:"column",gap:16,children:t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ea,{variant:"edgeFaded",color:"grey6"}),(0,i.jsxs)(x.D,{justifyContent:"space-between",children:[(0,i.jsxs)(x.bL,{color:"grey11",children:[j," variation",1!==j&&"s"]}),(0,i.jsx)(x.E,{onClick:()=>{c({type:"ADD_VARIATION"})},startIcon:"add",color:"grey",children:"Add a variation"})]}),(0,i.jsx)("div",{className:eR().hideScrollbar,style:{height:"240px",position:"relative",marginRight:"-32px",overflowX:"scroll",scrollSnapType:"x mandatory"},children:(0,i.jsx)("div",{style:{position:"absolute",paddingRight:"32px"},children:(0,i.jsx)(x.D,{flexDirection:"row",gap:16,children:(0,i.jsx)(e_,{screenshotChangesModal:u,setDialog:c,width:320})})})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e_,{screenshotChangesModal:u,setDialog:c}),(0,i.jsx)("div",{style:{bottom:x.t.space[0],marginBottom:"-".concat(x.t.space[16]),position:"sticky"},children:(0,i.jsxs)(x.D,{backgroundColor:"grey2",flexDirection:"column",padding:{bottom:40,inline:24},children:[(0,i.jsx)(x.aS,{sx:{left:0,position:"absolute",right:0}}),(0,i.jsx)(x.E,{color:"grey",onClick:()=>{c({type:"ADD_VARIATION"})},startIcon:"add",sx:{position:"relative"},children:"Add a variation"})]})})]})}),(0,i.jsx)(ey.Z,{slices:h([n]),defaultVariationSelector:p,onUploadSuccess:v}),(0,i.jsx)(ef,{isOpen:(null==l?void 0:l.type)==="RENAME_VARIATION",onClose:()=>{c(void 0)},slice:n,variation:null==l?void 0:l.variation}),(0,i.jsx)(eu,{isOpen:(null==l?void 0:l.type)==="DELETE_VARIATION",onClose:()=>{c(void 0)},slice:n,variation:null==l?void 0:l.variation}),(0,i.jsx)(eE,{initialVariation:r,isOpen:(null==l?void 0:l.type)==="ADD_VARIATION",onClose:()=>{c(void 0)},onSubmit:async(e,t,i)=>{try{let{slice:r,variation:a}=(0,H.Kp)({slice:n,id:e,name:t,copiedVariation:i});await (0,d.Ve)(r),g(r),o(r);let l=es.Y.getBuilderPagePathname({libraryName:r.href,sliceName:r.model.name,variationId:a.id});y.replace(l)}catch(n){let e="Could not add variation `".concat(t,"`");console.error(e,n),K.Am.error(e)}},variations:n.model.variations})]})},e_=e=>{let{screenshotChangesModal:t,setDialog:n,width:r}=e,{slice:o,variation:a,setSlice:l}=f(),s={scrollSnapAlign:"start"};return(0,i.jsx)(i.Fragment,{children:o.model.variations.map(e=>(0,i.jsx)("div",{style:void 0!==r?{...s,width:r}:s,children:(0,i.jsx)(el.b,{action:{type:"menu",onRename:()=>{n({type:"RENAME_VARIATION",variation:e})},onRemove:()=>{n({type:"DELETE_VARIATION",variation:e})},removeDisabled:o.model.variations.length<=1},mode:"navigation",onUpdateScreenshot:()=>{t.onOpenModal({sliceFilterFn:e=>e,defaultVariationSelector:{sliceID:o.model.id,variationID:e.id},onUploadSuccess:e=>{l(e)}})},replace:!0,selected:e.id===a.id,slice:o,variant:"outlined",variationId:e.id},e.id)},e.id))})};var eF=()=>{let{slice:e,actionQueueStatus:t}=f(),n=(0,x.cj)({max:"large"});return(0,i.jsxs)(R.LN,{children:[(0,i.jsxs)(R.wd,{children:[(0,i.jsx)(R.Xq,{url:"/slices"}),(0,i.jsxs)(R.Cx,{children:[(0,i.jsx)(y.g,{children:"Slices"}),(0,i.jsx)(y.g,{active:!0,children:e.model.name})]}),(0,i.jsxs)(R.K2,{children:[(0,i.jsx)(A,{}),(0,i.jsx)(g.X,{status:t}),(0,i.jsx)(P,{disabled:"done"!==t})]})]}),(0,i.jsxs)(R.RN,{children:[(0,i.jsxs)(x.D,{display:"grid",alignItems:"flex-start",gap:16,...n?{gridTemplateRows:"304px 1fr"}:{gridTemplateColumns:"320px 1fr"},children:[(0,i.jsx)(eL,{horizontalScroll:n}),(0,i.jsx)(en,{})]}),(0,i.jsx)(T,{})]})]})};function eO(){let e=(0,a.useRouter)(),{slice:t,variation:n}=(0,v.Z)();return void 0===t||void 0===n?(e.replace("/"),null):(0,i.jsx)(p,{initialSlice:t,children:e=>{let{slice:t}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o(),{children:(0,i.jsxs)("title",{children:[t.model.name," - Slice Machine"]})}),(0,i.jsx)(eF,{})]})}})}},34887:function(e){e.exports={base:"Divider_base__4eT6E","variant-dashed":"Divider_variant-dashed__4Lvrj Divider_base__4eT6E","variant-edgeFaded":"Divider_variant-edgeFaded__049V2 Divider_base__4eT6E"}},20136:function(e){e.exports={hideScrollbar:"VariationsList_hideScrollbar__cHCIS"}},76473:function(e,t,n){"use strict";n.d(t,{y1:function(){return j}});var i=n(2784);function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}n(52322);var o=["shift","alt","meta","mod","ctrl"],a={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function l(e){return(a[e]||e).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function s(e,t){return void 0===t&&(t=","),e.split(t)}function d(e,t,n){void 0===t&&(t="+");var i=e.toLocaleLowerCase().split(t).map(function(e){return l(e)}),a={alt:i.includes("alt"),ctrl:i.includes("ctrl")||i.includes("control"),shift:i.includes("shift"),meta:i.includes("meta"),mod:i.includes("mod")},s=i.filter(function(e){return!o.includes(e)});return r({},a,{keys:s,description:n})}"undefined"!=typeof document&&(document.addEventListener("keydown",function(e){void 0!==e.key&&m([l(e.key),l(e.code)])}),document.addEventListener("keyup",function(e){void 0!==e.key&&h([l(e.key),l(e.code)])})),"undefined"!=typeof window&&window.addEventListener("blur",function(){c.clear()});var c=new Set;function u(e){return Array.isArray(e)}function m(e){var t=Array.isArray(e)?e:[e];c.has("meta")&&c.forEach(function(e){return!o.includes(e)&&c.delete(e.toLowerCase())}),t.forEach(function(e){return c.add(e.toLowerCase())})}function h(e){var t=Array.isArray(e)?e:[e];"meta"===e?c.clear():t.forEach(function(e){return c.delete(e.toLowerCase())})}function p(e,t){var n=e.target;void 0===t&&(t=!1);var i=n&&n.tagName;return u(t)?!!(i&&t&&t.some(function(e){return e.toLowerCase()===i.toLowerCase()})):!!(i&&t&&!0===t)}var f=function(e,t,n){void 0===n&&(n=!1);var i,r=t.alt,o=t.meta,a=t.mod,s=t.shift,d=t.ctrl,m=t.keys,h=e.key,p=e.code,f=e.ctrlKey,v=e.metaKey,x=e.shiftKey,y=e.altKey,g=l(p),j=h.toLowerCase();if(!n){if(!y===r&&"alt"!==j||!x===s&&"shift"!==j)return!1;if(a){if(!v&&!f)return!1}else if(!v===o&&"meta"!==j&&"os"!==j||!f===d&&"ctrl"!==j&&"control"!==j)return!1}return!!(m&&1===m.length&&(m.includes(j)||m.includes(g)))||(m?(void 0===i&&(i=","),(u(m)?m:m.split(i)).every(function(e){return c.has(e.trim().toLowerCase())})):!m)},v=(0,i.createContext)(void 0),x=(0,i.createContext)({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),y=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},g="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;function j(e,t,n,r){var o,a=(0,i.useRef)(null),c=(0,i.useRef)(!1),j=n instanceof Array?r instanceof Array?void 0:r:n,b=u(e)?e.join(null==j?void 0:j.splitKey):e,w=n instanceof Array?n:r instanceof Array?r:void 0,C=(0,i.useCallback)(t,null!=w?w:[]),I=(0,i.useRef)(C);w?I.current=C:I.current=t;var k=(!function e(t,n){return t&&n&&"object"==typeof t&&"object"==typeof n?Object.keys(t).length===Object.keys(n).length&&Object.keys(t).reduce(function(i,r){return i&&e(t[r],n[r])},!0):t===n}((o=(0,i.useRef)(void 0)).current,j)&&(o.current=j),o.current),S=(0,i.useContext)(x).enabledScopes,D=(0,i.useContext)(v);return g(function(){if((null==k?void 0:k.enabled)!==!1&&(e=null==k?void 0:k.scopes,0===S.length&&e?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):!!(!e||S.some(function(t){return e.includes(t)})||S.includes("*")))){var e,t=function(e,t){var n;if(void 0===t&&(t=!1),!(p(e,["input","textarea","select"])&&!p(e,null==k?void 0:k.enableOnFormTags)||null!=k&&null!=k.ignoreEventWhen&&k.ignoreEventWhen(e))){if(null!==a.current&&document.activeElement!==a.current&&!a.current.contains(document.activeElement)){y(e);return}(null==(n=e.target)||!n.isContentEditable||null!=k&&k.enableOnContentEditable)&&s(b,null==k?void 0:k.splitKey).forEach(function(n){var i,r,o,a=d(n,null==k?void 0:k.combinationKey);if(f(e,a,null==k?void 0:k.ignoreModifiers)||null!=(o=a.keys)&&o.includes("*")){if(t&&c.current)return;if(("function"==typeof(i=null==k?void 0:k.preventDefault)&&i(e,a)||!0===i)&&e.preventDefault(),"function"==typeof(r=null==k?void 0:k.enabled)?!r(e,a):!0!==r&&void 0!==r){y(e);return}I.current(e,a),t||(c.current=!0)}})}},n=function(e){void 0!==e.key&&(m(l(e.code)),((null==k?void 0:k.keydown)===void 0&&(null==k?void 0:k.keyup)!==!0||null!=k&&k.keydown)&&t(e))},i=function(e){void 0!==e.key&&(h(l(e.code)),c.current=!1,null!=k&&k.keyup&&t(e,!0))},r=a.current||(null==j?void 0:j.document)||document;return r.addEventListener("keyup",i),r.addEventListener("keydown",n),D&&s(b,null==k?void 0:k.splitKey).forEach(function(e){return D.addHotkey(d(e,null==k?void 0:k.combinationKey,null==k?void 0:k.description))}),function(){r.removeEventListener("keyup",i),r.removeEventListener("keydown",n),D&&s(b,null==k?void 0:k.splitKey).forEach(function(e){return D.removeHotkey(d(e,null==k?void 0:k.combinationKey,null==k?void 0:k.description))})}}},[b,k,S]),a}}},function(e){e.O(0,[898,789,917,525,461,139,397,183,50,349,34,630,658,888,774,179],function(){return e(e.s=31314)}),_N_E=e.O()}]);
|