slice-machine-ui 1.16.1-dev-next-release.1 → 1.16.1-dev-next-release.3

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.
Files changed (52) hide show
  1. package/components/Navigation/ChangesListItem.tsx +40 -46
  2. package/components/Navigation/VideoItem.tsx +0 -1
  3. package/components/Navigation/index.test.tsx +1 -1
  4. package/components/Navigation/index.tsx +24 -33
  5. package/lib/builders/SliceBuilder/links.ts +2 -2
  6. package/out/404.html +1 -1
  7. package/out/_next/static/chunks/{377-467ca51a57342a23.js → 377-96290662f5b987a1.js} +1 -1
  8. package/out/_next/static/chunks/{590-fa9970ac3f1d9c1e.js → 590-ab38d53732035bf0.js} +1 -1
  9. package/out/_next/static/chunks/933-0fa0258a770c787d.js +1 -0
  10. package/out/_next/static/chunks/pages/{_app-661015bd74d41ec7.js → _app-87d3995db23544c1.js} +2 -2
  11. package/out/_next/static/chunks/pages/{changes-c62c4ac5de9a1a09.js → changes-e58a6f4217ec2d9e.js} +1 -1
  12. package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-375f234af61fdf94.js → [customTypeId]-57edaacb81e17a44.js} +1 -1
  13. package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-7bf582e0368b1713.js → [pageTypeId]-c62f5c1608ce3af3.js} +1 -1
  14. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/screenshot-76d40513025fd76d.js +1 -0
  15. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-37ba73cd3c821e04.js +1 -0
  16. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-5b6c6912b66de61f.js +1 -0
  17. package/out/_next/static/chunks/pages/{slices-15b69ac3611efbfe.js → slices-b686960d7d228e36.js} +1 -1
  18. package/out/_next/static/css/{9ddd0cb7fff63603.css → 7aca5b80aec5d9fd.css} +1 -1
  19. package/out/_next/static/ffkR0-mMg1TzZjSy6bDqL/_buildManifest.js +1 -0
  20. package/out/changelog.html +1 -1
  21. package/out/changes.html +1 -1
  22. package/out/custom-types/[customTypeId].html +1 -1
  23. package/out/custom-types.html +1 -1
  24. package/out/index.html +1 -1
  25. package/out/page-types/[pageTypeId].html +1 -1
  26. package/out/slices/[lib]/[sliceName]/[variation]/screenshot.html +1 -0
  27. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -0
  28. package/out/slices/[lib]/[sliceName]/[variation].html +1 -0
  29. package/out/slices.html +1 -1
  30. package/package.json +4 -4
  31. package/src/components/List/List.css.ts +2 -2
  32. package/src/components/List/List.stories.tsx +5 -1
  33. package/src/components/SideNav/SideNav.stories.tsx +1 -2
  34. package/src/components/SideNav/SideNav.tsx +29 -30
  35. package/src/components/Window/Window.css.ts +5 -5
  36. package/src/features/slices/sliceCards/NonSharedSliceViewCard.tsx +7 -2
  37. package/src/features/slices/slicesConfig.ts +4 -6
  38. package/test/__setup__.ts +5 -0
  39. package/test/pages/simulator.test.tsx +2 -2
  40. package/out/[lib]/[sliceName]/[variation]/screenshot.html +0 -1
  41. package/out/[lib]/[sliceName]/[variation]/simulator.html +0 -1
  42. package/out/[lib]/[sliceName]/[variation].html +0 -1
  43. package/out/_next/static/E4K6KdIR2Dj6QhKo68tHE/_buildManifest.js +0 -1
  44. package/out/_next/static/chunks/933-446b840f98e98471.js +0 -1
  45. package/out/_next/static/chunks/97-ee2fa6c3e6bf7b71.js +0 -1
  46. package/out/_next/static/chunks/pages/[lib]/[sliceName]/[variation]/screenshot-2750adc7cdad5005.js +0 -1
  47. package/out/_next/static/chunks/pages/[lib]/[sliceName]/[variation]/simulator-47ba090193469e3f.js +0 -1
  48. package/out/_next/static/chunks/pages/[lib]/[sliceName]/[variation]-89838e684fcaaf5d.js +0 -1
  49. /package/out/_next/static/{E4K6KdIR2Dj6QhKo68tHE → ffkR0-mMg1TzZjSy6bDqL}/_ssgManifest.js +0 -0
  50. /package/pages/{[lib] → slices/[lib]}/[sliceName]/[variation]/index.tsx +0 -0
  51. /package/pages/{[lib] → slices/[lib]}/[sliceName]/[variation]/screenshot.tsx +0 -0
  52. /package/pages/{[lib] → slices/[lib]}/[sliceName]/[variation]/simulator.tsx +0 -0
@@ -1 +0,0 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-661015bd74d41ec7.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/72585f70-28b4d7d5384b3703.js" defer=""></script><script src="/_next/static/chunks/18539003-1bb05c8aa7db2bc2.js" defer=""></script><script src="/_next/static/chunks/746-2ca4784811bde7c1.js" defer=""></script><script src="/_next/static/chunks/909-e4eec905c21ad8ad.js" defer=""></script><script src="/_next/static/chunks/113-34b6cf41a62f08ce.js" defer=""></script><script src="/_next/static/chunks/pages/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D/simulator-47ba090193469e3f.js" defer=""></script><script src="/_next/static/E4K6KdIR2Dj6QhKo68tHE/_buildManifest.js" defer=""></script><script src="/_next/static/E4K6KdIR2Dj6QhKo68tHE/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style data-emotion="css-global 413pep">html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;color:var(--theme-ui-colors-text);background-color:var(--theme-ui-colors-background);}html.theme-ui-light,.theme-ui-light html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;}html.theme-ui-dark,.theme-ui-dark html{--theme-ui-colors-text:#fff;--theme-ui-colors-textClear:#6E707B;--theme-ui-colors-hoverBackground:#202020;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-background:#202022;--theme-ui-colors-backgroundClear:#28282C;--theme-ui-colors-primary:#4E54D7;--theme-ui-colors-secondary:#28282C;--theme-ui-colors-icons:#5D5D71;--theme-ui-colors-gray:#1D1D1F;--theme-ui-colors-borders:#3A3A46;--theme-ui-colors-deep:#28282C;--theme-ui-colors-headSection:#28282C;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-sidebar:#28282C;--theme-ui-colors-code-border:#5D5D6F;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;--theme-ui-colors-link:#A9A9C6;--theme-ui-colors-choggleBox:#fff;}</style><style data-emotion="css-global h19pgh">*{box-sizing:border-box;}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;line-height:1.5;font-weight:400;}body{margin:0;}</style><style data-emotion="css yvak7d">.css-yvak7d{box-sizing:border-box;margin:0;min-width:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:calc(100vh - 57px);width:100vw;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}</style><div class="css-yvak7d"><style data-emotion="css uqm8ih">.css-uqm8ih{box-sizing:border-box;margin:0;min-width:0;color:var(--theme-ui-colors-primary);overflow:visible;}</style><svg stroke-width="4" viewBox="0 0 32 32" width="48" height="48" fill="none" stroke="currentColor" role="img" id="spinner" class="css-uqm8ih"><title>Loading</title><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" opacity="0.125"></circle><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" stroke-dasharray="20 110"><animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 16 16" to="360 16 16" dur="750ms" repeatCount="indefinite"></animateTransform></circle></svg></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/[lib]/[sliceName]/[variation]/simulator","query":{},"buildId":"E4K6KdIR2Dj6QhKo68tHE","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"appGip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +0,0 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.css" data-n-g=""/><link rel="preload" href="/_next/static/css/d4b59834999106a5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d4b59834999106a5.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-661015bd74d41ec7.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/909-e4eec905c21ad8ad.js" defer=""></script><script src="/_next/static/chunks/573-8678a91b09707f5d.js" defer=""></script><script src="/_next/static/chunks/377-467ca51a57342a23.js" defer=""></script><script src="/_next/static/chunks/pages/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D-89838e684fcaaf5d.js" defer=""></script><script src="/_next/static/E4K6KdIR2Dj6QhKo68tHE/_buildManifest.js" defer=""></script><script src="/_next/static/E4K6KdIR2Dj6QhKo68tHE/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style data-emotion="css-global 413pep">html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;color:var(--theme-ui-colors-text);background-color:var(--theme-ui-colors-background);}html.theme-ui-light,.theme-ui-light html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;}html.theme-ui-dark,.theme-ui-dark html{--theme-ui-colors-text:#fff;--theme-ui-colors-textClear:#6E707B;--theme-ui-colors-hoverBackground:#202020;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-background:#202022;--theme-ui-colors-backgroundClear:#28282C;--theme-ui-colors-primary:#4E54D7;--theme-ui-colors-secondary:#28282C;--theme-ui-colors-icons:#5D5D71;--theme-ui-colors-gray:#1D1D1F;--theme-ui-colors-borders:#3A3A46;--theme-ui-colors-deep:#28282C;--theme-ui-colors-headSection:#28282C;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-sidebar:#28282C;--theme-ui-colors-code-border:#5D5D6F;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;--theme-ui-colors-link:#A9A9C6;--theme-ui-colors-choggleBox:#fff;}</style><style data-emotion="css-global h19pgh">*{box-sizing:border-box;}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;line-height:1.5;font-weight:400;}body{margin:0;}</style><style data-emotion="css yvak7d">.css-yvak7d{box-sizing:border-box;margin:0;min-width:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:calc(100vh - 57px);width:100vw;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}</style><div class="css-yvak7d"><style data-emotion="css uqm8ih">.css-uqm8ih{box-sizing:border-box;margin:0;min-width:0;color:var(--theme-ui-colors-primary);overflow:visible;}</style><svg stroke-width="4" viewBox="0 0 32 32" width="48" height="48" fill="none" stroke="currentColor" role="img" id="spinner" class="css-uqm8ih"><title>Loading</title><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" opacity="0.125"></circle><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" stroke-dasharray="20 110"><animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 16 16" to="360 16 16" dur="750ms" repeatCount="indefinite"></animateTransform></circle></svg></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/[lib]/[sliceName]/[variation]","query":{},"buildId":"E4K6KdIR2Dj6QhKo68tHE","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"appGip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +0,0 @@
1
- self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,n,u,d,f,h,l){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,b,n,"static/chunks/pages/index-9955410413a4598b.js"],"/_error":["static/chunks/pages/_error-69b4f498bafdd188.js"],"/changelog":["static/chunks/870-0c7a8a9622de78b7.js","static/chunks/pages/changelog-11c9e241f5a8a4cb.js"],"/changes":[c,"static/chunks/8eec4907-b712959d9f984b68.js",a,"static/chunks/918-38d08f1e885b222d.js",e,t,"static/css/f585032018f6024b.css","static/chunks/pages/changes-c62c4ac5de9a1a09.js"],"/custom-types":[s,b,n,"static/chunks/pages/custom-types-78e57821222c9603.js"],"/custom-types/[customTypeId]":[a,u,s,e,i,d,f,"static/chunks/pages/custom-types/[customTypeId]-375f234af61fdf94.js"],"/page-types/[pageTypeId]":[a,u,s,e,i,d,f,"static/chunks/pages/page-types/[pageTypeId]-7bf582e0368b1713.js"],"/slices":[c,a,e,t,"static/css/22d69420bda374a7.css","static/chunks/pages/slices-15b69ac3611efbfe.js"],"/[lib]/[sliceName]/[variation]":[c,h,t,i,"static/css/d4b59834999106a5.css","static/chunks/pages/[lib]/[sliceName]/[variation]-89838e684fcaaf5d.js"],"/[lib]/[sliceName]/[variation]/screenshot":[l,"static/chunks/pages/[lib]/[sliceName]/[variation]/screenshot-2750adc7cdad5005.js"],"/[lib]/[sliceName]/[variation]/simulator":[c,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-1bb05c8aa7db2bc2.js",l,h,"static/chunks/113-34b6cf41a62f08ce.js","static/chunks/pages/[lib]/[sliceName]/[variation]/simulator-47ba090193469e3f.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/page-types/[pageTypeId]","/slices","/[lib]/[sliceName]/[variation]","/[lib]/[sliceName]/[variation]/screenshot","/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/799-5c13484e9f945e5d.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/97-ee2fa6c3e6bf7b71.js","static/chunks/590-fa9970ac3f1d9c1e.js","static/chunks/573-8678a91b09707f5d.js","static/chunks/377-467ca51a57342a23.js","static/chunks/840-d84a2655185995ce.js","static/css/26b51745402a92af.css","static/chunks/125-84464edfe25651eb.js","static/chunks/933-446b840f98e98471.js","static/css/9ddd0cb7fff63603.css","static/chunks/909-e4eec905c21ad8ad.js","static/chunks/746-2ca4784811bde7c1.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[933],{45466:function(e,n,t){"use strict";t.d(n,{c:function(){return g}});var i=t(22710),r=t(62230),s=t(85244),a=t(99267),l=t(52322),o=t(75289),c=t(2784),d=t(36131),u=t(68780),m=t(88932),h=t(38876),f=t(40147),v=t(82770);function p(){return(p=(0,i.Z)(function(e){var n,t,i,r,s,l,o;return(0,a.__generator)(this,function(a){switch(a.label){case 0:var c;return a.trys.push([0,3,,4]),n=e.sliceName,t=e.libraryName,i=e.onSuccess,c=n,r={id:(0,h.T3)(c),type:"SharedSlice",name:c,description:c,variations:[{id:x,name:(0,h.MP)(x),docURL:"...",version:"initial",description:(0,h.MP)(x),imageUrl:""},]},[4,f.j.slices.createSlice({libraryID:t,model:r})];case 1:if((s=a.sent().errors).length>0)throw s;return v.Xe.track({event:"slice:created",id:(0,h.MP)(n),name:n,library:t}),[4,i(r)];case 2:return a.sent(),[3,4];case 3:return l=a.sent(),o="Internal Error: Slice not created",console.error(o,l),m.Am.error(o),[3,4];case 4:return[2]}})})).apply(this,arguments)}var x="default",y=t(90374),b=t(66443),j=t(70041),g=function(e){var n,t=e.onClose,m=e.onSuccess,h=e.localLibraries,f=e.remoteSlices,x=(0,y.Z)().createSliceSuccess,g=(0,c.useState)(!1),C=g[0],S=g[1],_=(n=(0,i.Z)(function(e){var n,t;return(0,a.__generator)(this,function(r){switch(r.label){case 0:var s;return n=e.sliceName,t=e.from,S(!0),[4,function(e){return p.apply(this,arguments)}({sliceName:n,libraryName:t,onSuccess:(s=(0,i.Z)(function(e){var n;return(0,a.__generator)(this,function(n){switch(n.label){case 0:return[4,(0,v.y0)()];case 1:return x(n.sent().libraries),[4,m(e,t)];case 2:return n.sent(),[2]}})}),function(e){return s.apply(this,arguments)})})];case 1:return r.sent(),[2]}})}),function(e){return n.apply(this,arguments)});return(0,l.jsx)(u.Z,{dataCy:"create-slice-modal",isOpen:!0,widthInPx:"530px",isLoading:C,formId:"create-new-slice",close:t,buttonLabel:"Create",onSubmit:function(e){_(e)},initialValues:{sliceName:"",from:h[0].name},validate:function(e){return(0,b.h)(e,h,f)},content:{title:"Create a new slice"},children:function(e){var n=e.touched,t=e.values,i=e.setFieldValue,a=e.errors;return(0,l.jsxs)(o.xu,{children:[(0,l.jsx)(j.W,{name:"sliceName",label:"Slice Name",placeholder:"Pascalised Slice API ID (e.g. TextBlock)",error:n.sliceName?a.sliceName:void 0,dataCy:"slice-name-input"}),(0,l.jsx)(o.__,{htmlFor:"from",sx:{mb:2},children:"Target Library"}),(0,l.jsx)(d.ZP,{name:"from",options:h.map(function(e){return{value:e.name,label:e.name}}),onChange:function(e){return e?void i("from",e.value):null},defaultValue:{value:t.from,label:t.from},styles:{option:function(e){return(0,s.Z)((0,r.Z)({},e),{color:"#161618"})}},theme:function(e){return(0,s.Z)((0,r.Z)({},e),{colors:(0,s.Z)((0,r.Z)({},e.colors),{primary:"#E9E8EA"})})},menuPortalTarget:document.body})]})}})}},66443:function(e,n,t){"use strict";t.d(n,{h:function(){return c}});var i=t(81541),r=t(75329),s=t(96009),a=t.n(s),l=t(74600),o=t.n(l);function c(e,n,t){var s=e.sliceName;if(!s)return{sliceName:"Cannot be empty"};if(!r.xo.exec(s))return{sliceName:"No special characters allowed"};if(o()(a()(s)).replace(/\s/gm,"")!==s.trim())return{sliceName:"Value has to be PascalCased"};if(s.match(/^\d/))return{sliceName:"Value cannot start with a number"};if(r.lS.includes(s))return{sliceName:"".concat(s," is reserved for Slice Machine use")};var l=n.flatMap(function(e){return e.components.map(function(e){return e.model.name})}),c=t.map(function(e){return e.name});if((0,i.Z)(l).concat((0,i.Z)(c)).includes(s))return{sliceName:"Slice name is already taken."}}},17933:function(e,n,t){"use strict";t.d(n,{H:function(){return ns}});var i=t(52322),r=t(71651),s=t(97729),a=t.n(s),l=t(5632),o=t(2784),c=t(56580),d=t(25251),u=t(62230),m=t(85244),h=t(98240),f=t(50002),v=t(3988);t(17164);var p="_1k08lzu5 _1ecs97d9bi _1ecs97d9bk _1ecs97d9bt _1ecs97d32 _1ecs97daf _1ecs97d9db",x=function(e){return(0,i.jsx)("div",(0,m.Z)((0,u.Z)({},e),{className:"_1ecs97d9bi _1ecs97d9bk _1ecs97d9bt _1ecs97d18 _1ecs97d8l _1ecs97d268 _1ecs97d2dl _1ecs97d9d7 _1ecs97d9ej _1ecs97d9ex _1ecs97d9c9"}))},y=function(e){return(0,i.jsx)("div",(0,m.Z)((0,u.Z)({},e),{className:"_1k08lzu3 _1ecs97d9bi _1ecs97d9bk _1ecs97d9bu _1ecs97d9bq _1ecs97d9td",children:(0,i.jsxs)("div",{className:"_1ecs97d9bi _1ecs97d9bk _1ecs97d9bu _1ecs97d9ld",children:[(0,i.jsx)("span",{className:p}),(0,i.jsx)("span",{className:p}),(0,i.jsx)("span",{className:p})]})}))},b=function(e){return(0,i.jsx)(v.fC,(0,m.Z)((0,u.Z)({},e),{activationMode:"manual",className:"_1k08lzu6 _1ecs97d9bi _1ecs97d9bk _1ecs97d9bt _1ecs97d9bv"}))},j=function(e){var n=e.children,t=e.onAddNewTab,s=(0,h.Z)(e,["children","onAddNewTab"]);return(0,i.jsxs)(v.aV,(0,m.Z)((0,u.Z)({},s),{className:"_1k08lzu7 _1ecs97d9bi _1ecs97d9bk _1ecs97d9bu _1ecs97d9c8",children:[n,(0,i.jsx)("div",{className:"_1k08lzuc _1k08lzu8 _1ecs97d9bi _1ecs97d9bk _1ecs97d9bu _1ecs97d9bq _1ecs97d9sr _1ecs97d18 _1ecs97d8l _1ecs97d9ta _1ecs97d9ce _1ecs97d9o5",children:(0,i.jsx)(r.hU,{icon:"add",onClick:t})})]}))},g=function(e){var n=e.children,t=e.menu,s=(0,h.Z)(e,["children","menu"]);return(0,i.jsx)(v.xz,(0,m.Z)((0,u.Z)({},s),{asChild:!0,onMouseDown:function(e){var n=e.target,t=(0,f.J)(n);t!==e.currentTarget&&t!==e.currentTarget.parentElement&&e.preventDefault(),n===e.currentTarget&&n.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},children:(0,i.jsxs)("div",{className:"_1k08lzu9 _1k08lzu8 _1ecs97d9bi _1ecs97d9bk _1ecs97d9bu _1ecs97d9bq _1ecs97d9sr _1ecs97d9bj _1ecs97d6ee _1ecs97d6lr _1ecs97d9gd _1ecs97d9ld _1ecs97d9td _1ecs97d9cd",children:[(0,i.jsx)(r.xv,{className:"_1ecs97d9cd _1ecs97d9bv",color:"inherit",component:"span",noWrap:!0,variant:"emphasized",children:n}),Boolean(t)?(0,i.jsx)("div",{className:"_1k08lzub _1ecs97d9cd _1ecs97d9cz",children:(0,i.jsxs)(r.h_,{children:[(0,i.jsx)(r.$F,{children:(0,i.jsx)(r.hU,{icon:"moreVert"})}),(0,i.jsx)(r.AW,{align:"start",children:t})]})}):void 0]})}))},C=function(e){return(0,i.jsx)(v.VY,(0,m.Z)((0,u.Z)({},e),{className:"_1ecs97dm _1ecs97d7z _1ecs97d9bv _1ecs97d9f8"}))},S=t(90374),_=t(68780),Z=t(63397),I=t(75289),w=function(e){var n=e.name,t=e.label,r=e.placeholder,s=e.error,a=(0,h.Z)(e,["name","label","placeholder","error"]);return(0,i.jsxs)(I.xu,{mb:3,children:[(0,i.jsx)(I.__,{htmlFor:n,mb:2,children:t}),(0,i.jsx)(Z.gN,(0,u.Z)({name:n,type:"text",placeholder:r,as:I.II,autoComplete:"off"},a)),s?(0,i.jsx)(I.xv,{sx:{color:"error",mt:1},children:s}):null]})},k=function(e){var n=e.isOpen,t=e.onSubmit,r=e.close,s=e.tabIds;return(0,i.jsx)(_.Z,{isOpen:n,widthInPx:"530px",formId:"create-tab",close:r,onSubmit:function(e){t(e),r()},initialValues:{id:""},validate:function(e){var n=e.id;return n?s.includes(n.toLowerCase())?{id:"Tab exists already"}:void 0:{id:"Tab ID is required"}},content:{title:"Add Tab"},children:function(e){var n=e.errors;return(0,i.jsx)(w,{name:"id",label:"New Tab ID",placeholder:"A label for selecting the tab (i.e. not used in the API)",error:n.id})}})},T=function(e){var n=e.isOpen,t=e.onSubmit,r=e.close;return(0,i.jsx)(_.Z,{omitFooter:!0,isOpen:n,widthInPx:"530px",formId:"create-tab",close:r,cardProps:{bodySx:{p:0}},onSubmit:function(e){t(e),r()},initialValues:{},content:{title:"Remove Tab"},children:function(){return(0,i.jsxs)(I.xu,{sx:{px:4,py:4},children:[(0,i.jsx)(I.X6,{as:"h4",children:"Remove this tab?"}),(0,i.jsx)(I.xv,{as:"p",color:"textClear",sx:{mt:2},children:"This action cannot be undone."}),(0,i.jsx)(I.zx,{type:"button",variant:"buttons.actionDelete",sx:{mt:3},onClick:function(){t({}),r()},children:"Yes, remove tab"})]})}})},D=function(e){var n=e.isOpen,t=e.onSubmit,r=e.close,s=e.tabIds;return(0,i.jsx)(_.Z,{omitFooter:!0,isOpen:n,widthInPx:"530px",formId:"create-tab",close:r,cardProps:{bodySx:{p:0}},onSubmit:function(e){t(e),r()},initialValues:{id:""},validate:function(e){var n=e.id;return n?s.includes(n.toLowerCase())?{id:"Tab exists already"}:void 0:{id:"Tab ID is required"}},content:{title:"Rename Tab"},children:function(e){var n=e.errors,s=e.values,a=e.setFieldValue,l=e.isValid;return(0,i.jsxs)(I.xu,{sx:{px:4,py:4},children:[(0,i.jsx)(w,{name:"id",label:"Rename Tab ID",placeholder:"A label for selecting the tab (i.e. not used in the API)",error:n.id,onBlur:function(e){s.id!==e.target.value&&a("id",e.target.value.trim())},onChange:function(e){a("id",e.target.value)}}),(0,i.jsx)(I.zx,{type:"button",sx:{mt:3,width:"100%"},disabled:!l,onClick:function(){s.id&&s.id.length&&t({id:s.id.trim()}),r()},children:"Save"})]})}})},N=t(13394),V=[N.UID,N.Group,N.StructuredText,N.Image,N.Link,N.LinkToMedia,N.ContentRelationship,N.Select,N.Boolean,N.Date,N.Timestamp,N.Embed,N.Number,N.GeoPoint,N.Color,N.Text,],L=t(47560),M=t(82770),E=t(38876),F=t(43904),z=t(4092),O=t(96377),P=t(22710),H=t(81541),R=t(99267),A=t(65077),U=t(88932),K=t(75708),X=t(45466),B=t(28173),q=t(2754),J=function(e){return(0,i.jsxs)("svg",(0,m.Z)((0,u.Z)({width:"127",height:"98",viewBox:"0 0 127 98",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:[(0,i.jsx)("path",{d:"M73.5 44.5H85",stroke:"#17151F",strokeLinecap:"round"}),(0,i.jsx)("path",{d:"M35 68.5H40.5H92C93.1046 68.5 94 67.6046 94 66.5V39C94 37.8954 93.1046 37 92 37H35C33.8954 37 33 37.8954 33 39V66.5C33 67.6046 33.8954 68.5 35 68.5Z",fill:"#F4F2F4",stroke:"#17151F"}),(0,i.jsx)("path",{d:"M38 60.5H41.0381H89C89.5523 60.5 90 60.0523 90 59.5V52C90 51.4477 89.5523 51 89 51H38C37.4477 51 37 51.4477 37 52V59.5C37 60.0523 37.4477 60.5 38 60.5Z",fill:"#6E56CF",stroke:"#17151F"}),(0,i.jsx)("circle",{cx:"89.5",cy:"44.5",r:"0.5",fill:"#17151F"}),(0,i.jsx)("path",{d:"M40.5 97.5V56H86V97.5H40.5Z",fill:"#F9F8F9",stroke:"#17151F"}),(0,i.jsx)("rect",{x:"47",y:"75",width:"33",height:"16",fill:"#E4E2E4"}),(0,i.jsx)("path",{d:"M48 57H52V70C52 71.1046 51.1046 72 50 72V72C48.8954 72 48 71.1046 48 70V57Z",fill:"#E4E2E4"}),(0,i.jsx)("path",{d:"M55 57H59V70C59 71.1046 58.1046 72 57 72V72C55.8954 72 55 71.1046 55 70V57Z",fill:"#E4E2E4"}),(0,i.jsx)("path",{d:"M62 57H66V70C66 71.1046 65.1046 72 64 72V72C62.8954 72 62 71.1046 62 70V57Z",fill:"#E4E2E4"}),(0,i.jsx)("line",{x1:"0.353553",y1:"35.9856",x2:"15.5467",y2:"51.1787",stroke:"#C8C7CB"}),(0,i.jsx)("line",{x1:"42.1959",y1:"0.87059",x2:"47.7569",y2:"21.6248",stroke:"#C8C7CB"}),(0,i.jsx)("line",{x1:"99.5522",y1:"8.4091",x2:"87.2281",y2:"26.0097",stroke:"#C8C7CB"}),(0,i.jsx)("line",{x1:"126.408",y1:"41.0849",x2:"108.807",y2:"53.4089",stroke:"#C8C7CB"}),(0,i.jsx)("path",{d:"M39.8713 47C38.7657 47 38.0627 46.4554 38.0033 45.6337L38 45.5875H38.8251L38.8284 45.6205C38.868 46.0198 39.2937 46.2838 39.8977 46.2838C40.4719 46.2838 40.8746 46 40.8746 45.5908V45.5875C40.8746 45.2442 40.6271 45.0363 40.0132 44.9043L39.5017 44.7987C38.5281 44.5941 38.1056 44.1386 38.1056 43.429V43.4257C38.1056 42.5743 38.8383 42 39.868 42C40.9241 42 41.5809 42.5776 41.6403 43.3432L41.6436 43.3861H40.8284L40.8218 43.3465C40.7624 42.9769 40.4092 42.7129 39.8647 42.7162C39.3366 42.7162 38.9604 42.9637 38.9604 43.3696V43.3729C38.9604 43.7096 39.2013 43.9208 39.7954 44.0462L40.3069 44.1551C41.3102 44.3663 41.7294 44.769 41.7294 45.4884V45.4917C41.7294 46.4191 41.0132 47 39.8713 47Z",fill:"black"}),(0,i.jsx)("path",{d:"M42.6865 46.8812V42.1188H43.6634L45.0957 45.7822H45.1518L46.5809 42.1188H47.5578V46.8812H46.7921V43.495H46.7327L45.4125 46.8812H44.8317L43.5116 43.495H43.4554V46.8812H42.6865Z",fill:"black"})]}))},Y=function(e){var n=e.openCreateSliceModal,t=e.openUpdateSliceZoneModal,s=e.openSlicesTemplatesModal,a=e.projectHasAvailableSlices,l=e.isSlicesTemplatesSupported;return(0,i.jsx)(r.xu,{justifyContent:"center",height:"100%",children:(0,i.jsx)(q.R$,{backgroundImage:"/blank-slate-slice-zone.png",children:(0,i.jsxs)(q.T9,{children:[(0,i.jsx)(r.xu,{justifyContent:"center",padding:{bottom:16},children:(0,i.jsx)(J,{})}),(0,i.jsx)(q._T,{children:"Add slices"}),(0,i.jsx)(q.nf,{children:"Slices are website sections that you can reuse on different pages with different content. Each slice has its own component in your code."}),(0,i.jsx)(q.Qj,{children:(0,i.jsxs)(r.S0,{children:[(0,i.jsx)(r.F8,{startIcon:"add",onClick:n,description:"Start from scratch.",children:"Create new"}),l?(0,i.jsx)(r.F8,{startIcon:"contentCopy",onClick:s,description:"Select from premade examples.",endAdornment:(0,i.jsx)(r.Ct,{color:"purple",title:"New"}),children:"Use template"}):void 0,a?(0,i.jsx)(r.F8,{startIcon:"folder",onClick:t,description:"Select from your own slices.",children:"Select existing"}):void 0]})})]})})})},W=t(75992),$=t(17064),G=t(17329),Q=t(40147);function ee(){return en.apply(this,arguments)}function en(){return(en=(0,P.Z)(function(){var e,n,t;return(0,R.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,Q.j.sliceTemplateLibrary.readLibrary({})];case 1:if(n=(e=i.sent()).templates,(t=e.errors).length>0)throw t;return[2,n.map(function(e){return{model:e.model,screenshots:Object.fromEntries(Object.entries(e.screenshots).map(function(e){var n=(0,$.Z)(e,2),t=n[0],i=n[1];return[t,URL.createObjectURL(i),]}))}})];case 2:return i.sent(),[2,[]];case 3:return[2]}})})).apply(this,arguments)}function et(e){return ei.apply(this,arguments)}function ei(){return(ei=(0,P.Z)(function(e){var n,t,i,r;return(0,R.__generator)(this,function(s){switch(s.label){case 0:return n=e.customType,t=e.tabId,i=e.slices,r=(0,u.Z)({},n),i.forEach(function(e){r=(0,m.Z)((0,u.Z)({},r),{tabs:r.tabs.map(function(n){return n.key===t&&n.sliceZone?(0,m.Z)((0,u.Z)({},n),{sliceZone:{key:n.sliceZone.key,value:[{key:e.id,value:e},].concat((0,H.Z)(n.sliceZone.value))}}):n})})}),[4,Q.j.customTypes.updateCustomType({model:K.Dc.fromSM(r)})];case 1:return s.sent(),M.Xe.track({event:"custom-type:slice-zone-updated",customTypeId:n.id}),[2,r]}})})).apply(this,arguments)}var er=t(13858),es=t(56577),ea=t(54132),el=t(25812),eo=function(e){var n=e.isDeleteSliceZoneModalOpen,t=e.deleteSliceZone,r=e.closeDeleteSliceZoneModal;return(0,i.jsx)(el.Z,{isOpen:n,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:r,children:(0,i.jsx)(ea.Z,{bodySx:{p:0,bg:"white",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none",overflow:"hidden"},borderFooter:!0,Header:function(){return(0,i.jsxs)(I.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.borders))}},children:[(0,i.jsx)(I.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:"Do you really want to delete Slice Zone?"}),(0,i.jsx)(I.x8,{type:"button",onClick:r})]})},Footer:function(){return(0,i.jsxs)(I.kC,{sx:{justifyContent:"flex-end",height:64,alignItems:"center",paddingRight:16,borderTop:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.darkBorders))},backgroundColor:"gray"},children:[(0,i.jsx)(es.z,{label:"Cancel",variant:"secondary",onClick:r,sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),(0,i.jsx)(es.z,{label:"Delete",variant:"danger",onClick:t,sx:{minHeight:39,minWidth:78}})]})},children:(0,i.jsx)(I.nv,{children:"You're about to delete Slice Zone."})})})},ec=t(59469),ed=t(30180),eu=t(24804),em=t(5479),eh=function(e){var n=e.isComingSoon,t=e.onSelectedChange,s=e.selected,a=e.slice,l=ed.dN.variation(a);if(!l)return null;var o=(0,em.d7)(a,l);return(0,i.jsxs)(eu.Zb,{checked:s,"data-cy":"shared-slice-selection-card-".concat(a.model.id),"data-testid":"shared-slice-selection-card",disabled:n,interactive:!0,onClick:function(){t(!s)},size:"small",variant:"outlined",children:[void 0!==o?(0,i.jsx)(eu.ZB,{src:o}):(0,i.jsx)(eu.ZB,{component:"div",children:(0,i.jsx)(r.xu,{alignItems:"center",justifyContent:"center",children:(0,i.jsx)(r.xv,{color:"grey11",component:"span",children:"No screenshot available"})})}),(0,i.jsx)(eu.eW,{action:(0,i.jsx)("div",{onClick:function(e){return e.stopPropagation()},children:(0,i.jsx)(r.XZ,{checked:s,disabled:n,onCheckedChange:t})}),subtitle:(0,i.jsxs)(i.Fragment,{children:[a.model.variations.length," variation",a.model.variations.length>1?"s":"",n?(0,i.jsxs)(r.xv,{color:"purple11",component:"span",variant:"small",children:[" ","• (coming soon)"]}):void 0]}),title:a.model.name})]})},ef=function(e){var n=e.availableSlices,t=e.values,r=e.placeholderSlices;return(0,i.jsx)(Z.F2,{name:"sliceKeys",render:function(e){return(0,i.jsx)(ec.Z,{gridTemplateMinPx:"200px",elems:n,defineElementKey:function(e){return"".concat(e.from,"-").concat(e.model.name)},renderElem:function(n){var s,a=null!==(s=null==r?void 0:r.some(function(e){return e.model.id===n.model.id}))&&void 0!==s&&s,l=t.sliceKeys.includes(n.model.id);return(0,i.jsx)(eh,{isComingSoon:a,onSelectedChange:function(i){i?e.push(n.model.id):e.remove(t.sliceKeys.indexOf(n.model.id))},selected:l,slice:n})}})}})},ev=function(e){var n=e.isOpen,t=e.formId,r=e.close,s=e.onSubmit,a=e.availableSlices;return(0,i.jsx)(_.Z,{buttonLabel:"Add",isOpen:n,formId:t,close:r,onSubmit:function(e){s(e.sliceKeys.map(function(e){var n;return null===(n=a.find(function(n){return n.model.id===e}))||void 0===n?void 0:n.model}).filter(function(e){return void 0!==e}))},initialValues:{sliceKeys:[]},content:{title:"Select existing slices"},dataCy:"update-slices-modal",validate:function(e){if(0===e.sliceKeys.length)return{sliceKeys:"Select at least one slice to add"}},actionMessage:function(e){var n=e.errors;return void 0!==n.sliceKeys?(0,i.jsx)(I.xv,{sx:{color:"error"},children:n.sliceKeys}):void 0},children:function(e){var n=e.values;return(0,i.jsx)(ef,{values:n,availableSlices:a})}})},ep=t(67557),ex=t(53559);function ey(){return(ey=(0,P.Z)(function(e){var n,t,i,r,s,a,l,o;return(0,R.__generator)(this,function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),n=e.templateIDs,t=e.localLibrariesNames,i=e.onSuccess,[4,Q.j.sliceTemplateLibrary.createSlices({templateIDs:n})];case 1:if(s=(r=c.sent()).data,(a=r.errors).length>0||void 0===s)throw a;return s.sliceIDs.forEach(function(e,i){M.Xe.track({event:"slice:created",id:e,name:e,library:t[0],sliceTemplate:n[i]})}),[4,i(s.sliceIDs)];case 2:return c.sent(),[3,4];case 3:return l=c.sent(),o="Internal Error: Slice(s) not created",console.error(o,l),U.Am.error(o),[3,4];case 4:return[2]}})})).apply(this,arguments)}var eb=[{extension:"",fileName:"",from:"",href:"",pathToSlice:"",model:{id:"video_highlights",name:"VideoHighlights",type:"SharedSlice",variations:[{description:"",docURL:"",id:"default",name:"Default",version:"sktwi1xtmkfgx8626"},]},screenshots:{default:{url:"/videoHighlights.png"}}},],ej=function(e){var n=e.isOpen,t=e.formId,r=e.close,s=e.onSuccess,a=e.availableSlicesTemplates,l=e.localLibraries,o=(0,S.Z)().createSliceSuccess;return(0,i.jsx)(_.Z,{buttonLabel:"Add",isOpen:n,formId:t,close:r,onSubmit:function(e){var n;!function(e){return ey.apply(this,arguments)}({templateIDs:e.sliceKeys,localLibrariesNames:l.map(function(e){return e.name}),onSuccess:(n=(0,P.Z)(function(e){var n,t;return(0,R.__generator)(this,function(n){switch(n.label){case 0:return[4,(0,M.y0)()];case 1:var t;return o(n.sent().libraries),[4,Promise.all(e.map((t=(0,P.Z)(function(e){var n;return(0,R.__generator)(this,function(n){switch(n.label){case 0:return[4,Q.j.slices.readSlice({libraryID:l[0].name,sliceID:e})];case 1:return[2,n.sent().model]}})}),function(e){return t.apply(this,arguments)})).filter(function(e){return void 0!==e}))];case 2:return[4,s(n.sent())];case 3:return n.sent(),[2]}})}),function(e){return n.apply(this,arguments)})})},initialValues:{sliceKeys:[]},content:{title:"Use template slices"},validate:function(e){if(0===e.sliceKeys.length)return{sliceKeys:"Select at least one template to add"}},actionMessage:function(e){var n=e.errors;return void 0!==n.sliceKeys?(0,i.jsx)(I.xv,{sx:{color:"error"},children:n.sliceKeys}):void 0},children:function(e){var n=e.values;return(0,i.jsx)(ef,{values:n,placeholderSlices:eb,availableSlices:(0,H.Z)(a.map(function(e){return{extension:"",fileName:"",from:"",href:"",pathToSlice:"",model:ex.id.toSM(e.model),screenshots:Object.entries(e.screenshots).reduce(function(e,n){return(0,m.Z)((0,u.Z)({},e),(0,ep.Z)({},n[0],{url:n[1]}))},{})}})).concat((0,H.Z)(eb))})}})},eg=t(57282),eC=t(78656),eS=t(66443),e_="_1ecs97d9bm _1ecs97d9bq _1ecs97d9lb",eZ="_1ecs97d9ji _1ecs97d9bk _1ecs97d9ld _1ecs97d9td _1ecs97d9s4",eI=function(e){var n,t=e.isOpen,s=e.close,a=e.onSubmit,l=e.isLoading,o=e.slice,d=e.libraries,u=(0,c.v9)(function(e){return{remoteSlices:(0,W.sT)(e)}}).remoteSlices;return(0,i.jsxs)(r.Vq,{open:t,onOpenChange:function(e){return!e&&s()},size:{width:448,height:"auto"},children:[(0,i.jsx)(r.fK,{title:"Upgrade slice"}),(0,i.jsx)(r.cZ,{children:(0,i.jsx)(Z.J9,{validateOnChange:!0,validateOnMount:!0,initialValues:{_init:!1,from:null===(n=d[0])||void 0===n?void 0:n.name,sliceName:(0,E.MP)(o.key)},validate:function(e){return(0,eS.h)(e,d,u)},onSubmit:function(e){a({libraryID:e.from,sliceID:e.sliceName})},children:function(e){return(0,i.jsx)("form",{id:"convert-legacy-slice-as-new-slice-dialog",children:(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",children:[(0,i.jsxs)(r.xr,{className:eZ,children:[(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"This will create a new slice with the same fields. The new slice will replace the legacy slice in all of your types, and the existing slice content will be re-mapped to the new slice."}),(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"This will not migrate your component. You will need to do that manually."}),(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",gap:4,children:[(0,i.jsxs)("label",{className:e_,children:[(0,i.jsx)(r.xv,{variant:"bold",children:"Display name*"}),"string"==typeof e.errors.sliceName?(0,i.jsx)(r.xv,{variant:"small",color:"tomato10",children:e.errors.sliceName}):null]}),(0,i.jsx)(r.yt,{placeholder:"Pascalised Slice API ID (e.g. ".concat((0,E.MP)(o.key),")"),error:"string"==typeof e.errors.sliceName,value:e.values.sliceName,onValueChange:function(n){e.setFieldValue("sliceName",n.slice(0,30))},"data-cy":"slice-name-input"}),(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"A display name for the slice"})]}),(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",gap:4,children:[(0,i.jsxs)("label",{className:e_,children:[(0,i.jsx)(r.xv,{variant:"bold",children:"Slice library*"}),"string"==typeof e.errors.from?(0,i.jsx)(r.xv,{variant:"small",color:"tomato10",children:e.errors.from}):null]}),(0,i.jsx)(r.Ph,{size:"medium",variant:"secondary",startIcon:"folder",flexContent:!0,value:e.values.from,onValueChange:function(n){return n?void e.setFieldValue("from",n):null},children:d.map(function(e){return(0,i.jsx)(r.Ql,{value:e.name,children:e.name},e.name)})}),(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"The library where we'll store your slice"})]})]}),(0,i.jsx)(r.kX,{ok:{text:"Upgrade",onClick:function(){e.submitForm()},loading:l,disabled:!e.isValid},cancel:{text:"Cancel"}})]})})}})})]})},ew=t(55658),ek=function(e){var n,t,s=e.isOpen,a=e.close,l=e.onSubmit,c=e.isLoading,d=e.slice,h=e.sliceName,f=e.libraries,v=e.localSharedSlices,p=(0,o.useState)(!0),x=p[0],y=p[1];return(0,i.jsxs)(r.Vq,{open:s,onOpenChange:function(e){return!e&&a()},size:{width:448,height:"auto"},children:[(0,i.jsx)(r.fK,{title:"Convert to slice variation"}),(0,i.jsx)(r.cZ,{children:(0,i.jsx)(Z.J9,{validateOnChange:!0,initialValues:{libraryID:null===(n=v[0])||void 0===n?void 0:n.from,sliceID:null===(t=v[0])||void 0===t?void 0:t.model.id,variationID:ew.e.generateId(d.key),variationName:h},validate:function(e){return eT(e,f)},onSubmit:function(e){l(e)},children:function(e){return(0,i.jsx)("form",{id:"convert-legacy-slice-as-new-variation-dialog",children:(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",children:[(0,i.jsxs)(r.xr,{className:eZ,children:[(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"If you have multiple slices that are similar, you can combine them as variations of the same slice."}),(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",gap:4,children:[(0,i.jsxs)("label",{className:e_,children:[(0,i.jsx)(r.xv,{variant:"bold",children:"Target slice*"}),"string"==typeof e.errors.libraryID?(0,i.jsx)(r.xv,{variant:"small",color:"tomato10",children:e.errors.libraryID}):null,"string"==typeof e.errors.sliceID?(0,i.jsx)(r.xv,{variant:"small",color:"tomato10",children:e.errors.sliceID}):null]}),(0,i.jsx)(r.Ph,{size:"medium",variant:"secondary",startIcon:"viewDay",flexContent:!0,value:"".concat(e.values.libraryID,"::").concat(e.values.sliceID),onValueChange:function(n){if(n){var t=(0,$.Z)(n.split("::"),2),i=t[0],r=t[1];e.setFieldValue("libraryID",i),e.setFieldValue("sliceID",r)}},children:v.map(function(e){return(0,i.jsxs)(r.Ql,{value:"".concat(e.from,"::").concat(e.model.id),children:[e.from," ",">"," ",e.model.name," (",e.model.id,")"]},"".concat(e.from,"::").concat(e.model.id))})}),(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"Choose the slice to which you would like to add this variation."})]}),(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",gap:4,children:[(0,i.jsxs)("label",{className:e_,children:[(0,i.jsx)(r.xv,{variant:"bold",children:"Variation name*"}),"string"==typeof e.errors.variationName?(0,i.jsx)(r.xv,{variant:"small",color:"tomato10",children:e.errors.variationName}):null]}),(0,i.jsx)(r.yt,{placeholder:h,error:"string"==typeof e.errors.variationName,value:e.values.variationName,onValueChange:function(n){var t=(0,m.Z)((0,u.Z)({},e.values),{variationName:n.slice(0,30)});x&&(t.variationID=ew.e.generateId(t.variationName)),e.setValues(t,!0)},"data-cy":"variation-name-input"})]}),(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",gap:4,children:[(0,i.jsxs)("label",{className:e_,children:[(0,i.jsx)(r.xv,{variant:"bold",children:"ID*"}),"string"==typeof e.errors.variationID?(0,i.jsx)(r.xv,{variant:"small",color:"tomato10",children:e.errors.variationID}):null]}),(0,i.jsx)(r.yt,{placeholder:ew.e.generateId(d.key),error:"string"==typeof e.errors.variationID,value:e.values.variationID,onValueChange:function(n){y(!1),e.setFieldValue("variationID",ew.e.generateId(n.slice(0,30)))},"data-cy":"variation-id-input"})]})]}),(0,i.jsx)(r.kX,{ok:{text:"Convert",onClick:function(){e.submitForm()},loading:c,disabled:!e.isValid},cancel:{text:"Cancel"}})]})})}})})]})},eT=function(e,n){var t,i={};e.libraryID||(i.libraryID="Cannot be empty.");var r=n.find(function(n){return n.path===e.libraryID});i.libraryID||r||(i.libraryID="Does not exist."),e.sliceID||(i.sliceID="Cannot be empty.");var s=null==r?void 0:r.components.find(function(n){return n.model.id===e.sliceID});return(i.sliceID||s||(i.sliceID="Does not exist."),e.variationName||(i.variationName="Cannot be empty."),e.variationID)?(null!==(t=null==s?void 0:s.model.variations.map(function(e){return e.id}))&&void 0!==t?t:[]).includes(e.variationID)&&(i.variationID="Slice variation ID is already taken."):i.variationID="Cannot be empty.",i},eD=function(e){var n,t,s=e.isOpen,a=e.close,l=e.onSubmit,o=e.isLoading,c=e.identicalSlices;return(0,i.jsxs)(r.Vq,{open:s,onOpenChange:function(e){return!e&&a()},size:{width:448,height:"auto"},children:[(0,i.jsx)(r.fK,{title:"Merge with an existing slice"}),(0,i.jsx)(r.cZ,{children:(0,i.jsx)(Z.J9,{validateOnChange:!0,initialValues:{path:null!==(t=null===(n=c[0])||void 0===n?void 0:n.path)&&void 0!==t?t:""},validate:function(e){if(!e.path)return{path:"Cannot be empty."}},onSubmit:function(e){var n,t=(0,$.Z)(e.path.split("::"),3),i=t[0];l({libraryID:i,sliceID:t[1],variationID:t[2]})},children:function(e){return(0,i.jsx)("form",{id:"convert-legacy-slice-merge-with-identical-dialog",children:(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",children:[(0,i.jsxs)(r.xr,{className:eZ,children:[(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"If you have multiple identical slices, you can merge them. All of your content will be remapped to the target slice."}),(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",gap:4,children:[(0,i.jsxs)("label",{className:e_,children:[(0,i.jsx)(r.xv,{variant:"bold",children:"Target slice*"}),"string"==typeof e.errors.path?(0,i.jsx)(r.xv,{variant:"small",color:"tomato10",children:e.errors.path}):null]}),(0,i.jsx)(r.Ph,{size:"medium",variant:"secondary",startIcon:"viewDay",flexContent:!0,value:e.values.path,onValueChange:function(n){n&&e.setFieldValue("path",n)},children:c.map(function(e){return(0,i.jsx)(r.Ql,{value:e.path,children:e.path.split("::").join(" > ")},e.path)})}),(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"Choose a slice that you would like to merge this into."})]})]}),(0,i.jsx)(r.kX,{ok:{text:"Merge",onClick:function(){e.submitForm()},loading:o,disabled:!e.isValid},cancel:{text:"Cancel"}})]})})}})})]})},eN=function(e){var n,t,s=e.slice,a=e.path,l=(0,S.Z)(),d=l.refreshState,h=l.openToaster,f=l.initCustomTypeStore,v=l.saveCustomTypeSuccess,p=(0,o.useState)(!1),x=p[0],y=p[1],b=(0,o.useState)(),j=b[0],g=b[1],C=(0,c.v9)(function(e){return{libraries:(0,W.Sd)(e)}}).libraries,_="Slice"===s.value.type&&null!==(n=s.value.fieldset)&&void 0!==n?n:s.key,Z=C.filter(function(e){return e.isLocal}),I=Z.map(function(e){return e.components}).flat(),w=eV(s,_,I),k=(t=(0,P.Z)(function(e){var n,t,i,r,l,o,c,p,x;return(0,R.__generator)(this,function(p){switch(p.label){case 0:if(!j)return[2];return y(!0),M.Xe.track({event:"legacy-slice:converted",id:e.sliceID,variation:null!==(n=e.variationID)&&void 0!==n?n:"default",library:e.libraryID,conversionType:j}),[4,Q.j.slices.convertLegacySliceToSharedSlice({model:s.value,src:(0,m.Z)((0,u.Z)({},a),{sliceID:s.key}),dest:{libraryID:e.libraryID,sliceID:e.sliceID,variationName:null!==(t=e.variationName)&&void 0!==t?t:"Default",variationID:null!==(i=e.variationID)&&void 0!==i?i:"default"}})];case 1:if((r=p.sent().errors).length)throw console.error("Could not convert slice `".concat(_,"`"),r),h("Could not convert slice `".concat(_,"`"),eg.Jf.ERROR),r;return[4,Q.j.customTypes.readCustomType({id:a.customTypeID})];case 2:if(o=(l=p.sent()).model,(c=l.errors).length||!o)return console.error("Could not refresh custom type view `".concat(a.customTypeID,"`"),c),h("Could not refresh custom type view `".concat(a.customTypeID,"`"),eg.Jf.ERROR),[2];return[4,(0,M.y0)()];case 3:switch(d(p.sent()),y(!1),g(void 0),j){case"as_new_slice":h("".concat(_," has been upgraded to a new slice ").concat(e.libraryID," > ").concat(e.sliceID),eg.Jf.SUCCESS);break;case"as_new_variation":h("".concat(_," has been converted as a variation of ").concat(e.libraryID," > ").concat(e.sliceID),eg.Jf.SUCCESS);break;default:h("".concat(_," has been merged with ").concat(e.libraryID," > ").concat(e.sliceID),eg.Jf.SUCCESS)}return f(x=K.Dc.toSM(o),x),v(o),[2]}})}),function(e){return t.apply(this,arguments)}),T={path:a,slice:s,sliceName:_,libraries:Z,localSharedSlices:I,identicalSlices:w,close:function(){return g(void 0)},onSubmit:k,isLoading:x};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.h_,{children:[(0,i.jsx)(r.$F,{children:(0,i.jsx)(r.zx,{"data-cy":"convert-legacy-slice",startIcon:"refresh",endIcon:"arrowDropDown",size:"medium",variant:"secondary",children:"Migrate legacy slice"})}),(0,i.jsxs)(r.AW,{align:"start",children:[(0,i.jsx)(r.Xi,{startIcon:(0,i.jsx)(r.I5,{name:"folder",size:"large"}),description:"Use it with new types",onSelect:function(){return g("as_new_slice")},children:"Upgrade slice"}),(0,i.jsx)(r.Xi,{startIcon:(0,i.jsx)(r.I5,{name:"viewDay",size:"large"}),description:"Add it to another slice",onSelect:function(){return g("as_new_variation")},disabled:!I.length,children:"Convert to slice variation"}),(0,i.jsx)(r.Xi,{startIcon:(0,i.jsx)(r.I5,{name:"driveFileMove",size:"large"}),description:"Combine identical slices",onSelect:function(){return g("merge_with_identical")},disabled:!w.length,children:"Merge with another slice"})]})]}),(0,i.jsx)(eI,(0,m.Z)((0,u.Z)({},T),{isOpen:"as_new_slice"===j})),(0,i.jsx)(ek,(0,m.Z)((0,u.Z)({},T),{isOpen:"as_new_variation"===j})),(0,i.jsx)(eD,(0,m.Z)((0,u.Z)({},T),{isOpen:"merge_with_identical"===j}))]})},eV=function(e,n,t){return(0,o.useMemo)(function(){var i=[],r=(0,em.ux)(e.value,n),s=!0,a=!1,l=void 0;try{for(var o,c=t[Symbol.iterator]();!(s=(o=c.next()).done);s=!0){var d=o.value,u=!0,m=!1,h=void 0;try{for(var f,v=d.model.variations[Symbol.iterator]();!(u=(f=v.next()).done);u=!0){var p=f.value,x=(0,em.ux)(p,d.model.name);r.primary===x.primary&&r.items===x.items&&i.push({libraryID:d.from,sliceID:d.model.id,variationID:p.id,path:"".concat(d.from,"::").concat(d.model.id,"::").concat(p.id)})}}catch(y){m=!0,h=y}finally{try{u||null==v.return||v.return()}finally{if(m)throw h}}}}catch(b){a=!0,l=b}finally{try{s||null==c.return||c.return()}finally{if(a)throw l}}return i},[e,n,t])},eL=function(e){var n=e.slice,t=e.path;return(0,i.jsxs)(eu.Zb,{children:[(0,i.jsx)(eu.ZB,{component:"div",children:(0,i.jsx)(r.xu,{alignItems:"center",justifyContent:"center",children:(0,i.jsx)(r.xv,{color:"grey11",component:"span",children:"No screenshot available"})})}),(0,i.jsxs)(eu.T$,{children:[(0,i.jsx)(r.u,{content:"This Slice was created with the Legacy Builder. It needs to be converted first to be used within Slice Machine.",side:"bottom",children:(0,i.jsx)(r.Ct,{color:"purple",title:"Legacy Slice"})}),(0,i.jsx)(eN,{slice:n,path:t})]}),(0,i.jsx)(eu.eW,{subtitle:"1 variation",title:(0,em.Dj)(n.value)})]})},eM=t(82131),eE=function(e){var n=e.slices,t=e.format,r=e.path,s=e.onRemoveSharedSlice,a=n.some(function(e){return"SharedSlice"!==e.type}),l=eC.$[t],c=(0,S.Z)().openToaster;return(0,o.useEffect)(function(){a&&c("This ".concat(l.name({start:!1,plural:!1})," contains legacy slices that can be upgraded."),eg.Jf.INFO)},[a]),(0,i.jsx)(ec.Z,{elems:n,defineElementKey:function(e){return"SharedSlice"!==e.type?e.payload.key:e.payload.model.name},renderElem:function(e){if("SharedSlice"!==e.type){var n=e.payload;return(0,i.jsx)(eL,{slice:n,path:r})}var t=e.payload;return(0,i.jsx)(eM.B,{action:{type:"remove",onRemove:function(){s(t.model.id)}},isDeletedSlice:!1,onUpdateScreenshot:void 0,slice:t})},sx:{padding:"16px"}})},eF=function(e,n){var t,i=(n||[]).reduce(function(e,n){return(0,H.Z)(e).concat((0,H.Z)(n.components))},[]),r=e.value.reduce(function(e,n){var t=n.key,r=n.value;if("SharedSlice"===r.type){var s=i.find(function(e){return e.model.id===t});return s?(0,m.Z)((0,u.Z)({},e),{slicesInSliceZone:(0,H.Z)(e.slicesInSliceZone).concat([{type:"SharedSlice",payload:s},])}):(0,m.Z)((0,u.Z)({},e),{notFound:(0,H.Z)(e.notFound).concat([{key:t}])})}return(0,m.Z)((0,u.Z)({},e),{slicesInSliceZone:(0,H.Z)(e.slicesInSliceZone).concat([{type:"Slice",payload:{key:t,value:r}},])})},{slicesInSliceZone:[],notFound:[]});return{availableSlices:i,slicesInSliceZone:r.slicesInSliceZone,notFound:r.notFound}},ez=function(e){var n,t=e.customType,s=e.onCreateSliceZone,a=e.onDeleteSliceZone,d=e.onRemoveSharedSlice,u=e.sliceZone,m=e.tabId,h=(0,l.useRouter)(),f=h.query,v=h.replace,p=h.pathname,x=(0,G.QT)(ee,[]),y=(0,o.useState)(!1),b=y[0],j=y[1],g=(0,o.useState)(!1),C=g[0],_=g[1],Z=(0,o.useState)(!1),I=Z[0],w=Z[1],k=(0,c.v9)(function(e){return{remoteSlices:(0,W.sT)(e),libraries:(0,W.Sd)(e),slices:(0,W.xC)(e)}}),T=k.remoteSlices,D=k.libraries,N=(0,S.Z)(),V=N.initCustomTypeStore,L=N.saveCustomTypeSuccess,E=D.filter(function(e){return e.isLocal}),F=(0,o.useMemo)(function(){return u?eF(u,D):{availableSlices:[],slicesInSliceZone:[],notFound:[]}},[u,D]),z=F.availableSlices,O=F.slicesInSliceZone,H=F.notFound,q=(0,o.useState)(!1),J=q[0],$=q[1];(0,o.useEffect)(function(){(null==H?void 0:H.length)&&H.forEach(function(e){d(e.key)})},[H]);var Q,en,ei,es=O.filter(function(e){return"SharedSlice"===e.type}).map(function(e){return e.payload}),ea=z.filter(function(e){return!es.some(function(n){return n.model.id===e.model.id})}),el=function(){_(!0)},ec=function(){w(!0)},ed=function(){j(!0),M.Xe.track({event:"custom-type:open-add-from-templates",customTypeId:t.id,customTypeFormat:t.format})},eu=function(){"true"===f.newPageType&&v({pathname:p,query:{pageTypeId:f.pageTypeId}},void 0,{shallow:!0})},em=function(){_(!1),eu()},eh=function(){w(!1),eu()},ef=function(){j(!1),eu()},ep=function(e){V(e,e),L(K.Dc.fromSM(e))};return(0,i.jsxs)(r.xu,{flexDirection:"column",height:"100%",children:[void 0===f.newPageType?(0,i.jsx)(B.a,{children:(0,i.jsx)(B.B,{actions:u?(0,i.jsxs)(r.h_,{children:[(0,i.jsx)(r.$F,{children:(0,i.jsx)(r.zx,{variant:"secondary",startIcon:"add",children:"Add slices"})}),(0,i.jsxs)(r.AW,{align:"end",children:[(0,i.jsx)(r.Xi,{startIcon:(0,i.jsx)(r.I5,{name:"add",size:"large"}),onSelect:ec,description:"Start from scratch.",children:"Create new"}),x.length>0?(0,i.jsx)(r.Xi,{onSelect:ed,startIcon:(0,i.jsx)(r.I5,{name:"contentCopy",size:"large"}),description:"Select from premade examples.",shortcut:(0,i.jsx)(r.Ct,{color:"purple",title:"New"}),children:"Use template"}):void 0,ea.length>0?(0,i.jsx)(r.Xi,{onSelect:el,startIcon:(0,i.jsx)(r.I5,{name:"folder",size:"large"}),description:"Select from your own slices.",children:"Select existing"}):void 0]})]}):void 0,toggle:"page"!==t.format||"Main"!==m?(0,i.jsx)(r.rs,{checked:!!u,onCheckedChange:function(e){e?s():$(!0)}}):void 0,children:"Slice Zone"})}):void 0,u?O.length>0?(0,i.jsx)(A.xR,{children:(0,i.jsx)(eE,{slices:O,format:t.format,path:{customTypeID:t.id,tabID:m,sliceZoneID:null!==(n=null==u?void 0:u.key)&&void 0!==n?n:""},onRemoveSharedSlice:d})}):(0,i.jsx)(Y,{openUpdateSliceZoneModal:el,openCreateSliceModal:ec,openSlicesTemplatesModal:ed,projectHasAvailableSlices:ea.length>0,isSlicesTemplatesSupported:x.length>0}):void 0,(0,i.jsx)(ev,{isOpen:C,formId:"tab-slicezone-form-".concat(m),availableSlices:ea,onSubmit:(Q=(0,P.Z)(function(e){var n;return(0,R.__generator)(this,function(n){switch(n.label){case 0:return[4,et({customType:t,tabId:m,slices:e})];case 1:return ep(n.sent()),em(),U.Am.success("Slice(s) added to slice zone"),[2]}})}),function(e){return Q.apply(this,arguments)}),close:em}),(0,i.jsx)(ej,{isOpen:b,formId:"tab-slicezone-form-".concat(m),availableSlicesTemplates:x,localLibraries:E,onSuccess:(en=(0,P.Z)(function(e){var n;return(0,R.__generator)(this,function(n){switch(n.label){case 0:return[4,et({customType:t,tabId:m,slices:e})];case 1:return ep(n.sent()),ef(),U.Am.success((0,i.jsx)(er.GX,{message:"Slice template(s) added to slice zone and created at: ",path:"".concat(E[0].name,"/")})),[2]}})}),function(e){return en.apply(this,arguments)}),close:ef}),(0,i.jsx)(eo,{isDeleteSliceZoneModalOpen:J,closeDeleteSliceZoneModal:function(){$(!1)},deleteSliceZone:function(){a(),$(!1)}}),(null==E?void 0:E.length)!==0&&I&&(0,i.jsx)(X.c,{onSuccess:(ei=(0,P.Z)(function(e){var n;return(0,R.__generator)(this,function(n){switch(n.label){case 0:return[4,et({customType:t,tabId:m,slices:[e]})];case 1:return ep(n.sent()),eh(),U.Am.success((0,i.jsx)(er.GX,{message:"New slice added to slice zone and created at: ",path:"".concat(E[0].name,"/")})),[2]}})}),function(e){return ei.apply(this,arguments)}),localLibraries:E,remoteSlices:T,onClose:eh})]})},eO=function(e){var n=e.customType,t=e.tabId,s=e.fields,a=e.sliceZone,d=(0,S.Z)(),u=d.deleteCustomTypeField,m=d.addCustomTypeField,h=d.reorderCustomTypeField,f=d.replaceCustomTypeField,v=d.createSliceZone,p=d.deleteSliceZone,x=d.deleteCustomTypeSharedSlice,y=(0,l.useRouter)().query,b=(0,c.v9)(function(e){return{poolOfFields:(0,F.h2)(e)}}).poolOfFields;if(!b)return null;var j=function(e){u(t,e)},g=function(e){var i=e.id,r=e.label,s=e.widgetTypeName;if(!(0,L.Ss)(N,s)){var a=N[s];M.Xe.track({event:"custom-type:field-added",id:i,name:n.id,type:a.TYPE_NAME,zone:"static"}),m(t,i,a.create(r))}},C=function(e){!(0,L.uS)(e)&&h(t,e.source.index,e.destination.index)},_=function(e){var n=e.apiId,i=e.newKey,r=e.value;!(0,L.Ss)(N,r.type)&&f(t,n,i,r)},Z=function(){v(t)},I=function(){p(t)},w=function(e){x(t,e)};return(0,i.jsx)(r.xu,{backgroundColor:"grey2",flexDirection:"column",gap:8,height:"100%",children:(0,i.jsx)(r.SV,{children:(0,i.jsxs)(o.Suspense,{fallback:(0,i.jsx)(r.xu,{padding:32,children:(0,i.jsx)(r._3,{})}),children:[void 0===y.newPageType?(0,i.jsx)(O.Z,{zoneType:"customType",tabId:t,title:"Static Zone",dataTip:"",fields:s,poolOfFieldsToCheck:b,showHints:!0,EditModal:z.Z,widgetsArray:V,onDeleteItem:j,onSave:_,onSaveNewField:g,onDragEnd:C,renderHintBase:function(e){var n=e.item;return"data".concat((0,E.Ti)(n.key))},renderFieldAccessor:function(e){return"data".concat((0,E.Ti)(e))},dataCy:"ct-static-zone",isRepeatableCustomType:n.repeatable}):void 0,(0,i.jsx)(ez,{customType:n,tabId:t,sliceZone:a,onRemoveSharedSlice:w,onCreateSliceZone:Z,onDeleteSliceZone:I})]})})})},eP=function(e){var n,t,s,a=e.customType,c=(0,o.useState)(null===(n=a.tabs[0])||void 0===n?void 0:n.key),d=c[0],u=c[1],m=(0,o.useState)(),h=m[0],f=m[1],v=(0,S.Z)(),p=v.createCustomTypeTab,_=v.updateCustomTypeTab,Z=v.deleteCustomTypeTab,I=(0,l.useRouter)().query,w=(null===(t=a.tabs.find(function(e){return e.key===d}))||void 0===t?void 0:null===(s=t.sliceZone)||void 0===s?void 0:s.value.length)===0;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(x,{style:{height:w?"100%":void 0},children:["page"===a.format?(0,i.jsx)(y,{}):void 0,"true"===I.newPageType?(0,i.jsx)(eO,{customType:a,fields:a.tabs[0].value,sliceZone:a.tabs[0].sliceZone,tabId:a.tabs[0].key}):(0,i.jsxs)(b,{onValueChange:u,value:d,children:[(0,i.jsx)(j,{onAddNewTab:function(){f({type:"CREATE_CUSTOM_TYPE"})},children:a.tabs.map(function(e){return(0,i.jsx)(g,{menu:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Xi,{onSelect:function(){f({type:"UPDATE_CUSTOM_TYPE",tabKey:e.key})},startIcon:(0,i.jsx)(r.I5,{name:"edit"}),children:"Rename"}),(0,i.jsx)(r.Xi,{color:"tomato",disabled:a.tabs.length<=1,onSelect:function(){f({type:"DELETE_CUSTOM_TYPE",tabKey:e.key})},startIcon:(0,i.jsx)(r.I5,{name:"delete"}),children:"Remove"})]}),value:e.key,children:e.key},e.key)})}),a.tabs.map(function(e){return(0,i.jsx)(C,{value:e.key,children:(0,i.jsx)(eO,{customType:a,fields:e.value,sliceZone:e.sliceZone,tabId:e.key})},e.key)})]})]}),(null==h?void 0:h.type)==="CREATE_CUSTOM_TYPE"?(0,i.jsx)(k,{close:function(){f(void 0)},isOpen:!0,onSubmit:function(e){var n=e.id;p(n),u(n)},tabIds:a.tabs.map(function(e){return e.key.toLowerCase()})}):void 0,(null==h?void 0:h.type)==="UPDATE_CUSTOM_TYPE"?(0,i.jsx)(D,{close:function(){f(void 0)},isOpen:!0,onSubmit:function(e){var n=e.id;_(h.tabKey,n),d===h.tabKey&&u(n)},tabIds:a.tabs.filter(function(e){return e.key!==h.tabKey}).map(function(e){return e.key.toLowerCase()})}):void 0,(null==h?void 0:h.type)==="DELETE_CUSTOM_TYPE"?(0,i.jsx)(T,{close:function(){f(void 0)},isOpen:!0,onSubmit:function(){if(Z(h.tabKey),d===h.tabKey){var e,n=null===(e=a.tabs.find(function(e){return e.key!==h.tabKey}))||void 0===e?void 0:e.key;void 0!==n&&u(n)}}}):void 0]})},eH=t(7819),eR=t(67445),eA=t(49471),eU=t(3098),eK=t(32665),eX=t(19345);t(6304);var eB=function(e){var n=e.tabs,t=(0,h.Z)(e,["tabs"]);return(0,i.jsxs)(v.fC,(0,m.Z)((0,u.Z)({},t),{className:"_1ecs97d9bi _1ecs97d9bk _1ecs97d9bt _1ecs97dm _1ecs97d7z _1ecs97d9jo",defaultValue:n[0].label,orientation:"vertical",children:[(0,i.jsx)(v.aV,{className:"_1ecs97d9bi _1ecs97d9bk _1ecs97d9bu _1ecs97d486 _1ecs97d4fj _1ecs97d9ep _1ecs97d9f1 _1ecs97d9td","aria-label":"content tabs",children:n.map(function(e,n){var t=e.label;return(0,i.jsx)(v.xz,{className:"_76k20u4 _1ecs97d9bi _1ecs97d9bk _1ecs97d9bt _1ecs97d6ee _1ecs97d6lr _1ecs97d9gd _1ecs97d9s1",value:t,children:(0,i.jsx)(r.xv,{className:"_76k20u5",component:"span",color:"inherit",children:t})},"".concat(t,"-trig").concat(n+1))})}),n.map(function(e,n){var t=e.label,s=e.content;return(0,i.jsx)(v.VY,{className:"_76k20u6 _1ecs97d9bi _1ecs97d9bk _1ecs97d9bt _1ecs97d9jo _1ecs97d9f8",value:t,children:(0,i.jsx)(r.xr,{className:"_1ecs97d9rp",children:s})},"".concat(t,"-content").concat(n+1))})]}))},eq=t(88241),eJ=t(70863),eY=t(8857),eW=t(49109),e$=t(72757),eG=t(25145),eQ=function(){return(0,i.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.1707 19.1237C17.9629 19.3056 17.9419 19.6214 18.1237 19.8293C18.3056 20.0371 18.6214 20.0581 18.8293 19.8763L22.8293 16.3763C22.9378 16.2814 23 16.1442 23 16C23 15.8558 22.9378 15.7187 22.8293 15.6237L18.8293 12.1237C18.6214 11.9419 18.3056 11.9629 18.1237 12.1708C17.9419 12.3786 17.9629 12.6945 18.1707 12.8763L21.7407 16L18.1707 19.1237ZM13.8293 12.8763C14.0371 12.6945 14.0581 12.3786 13.8763 12.1708C13.6944 11.9629 13.3786 11.9419 13.1707 12.1237L9.17075 15.6237C9.06224 15.7187 9 15.8558 9 16C9 16.1442 9.06224 16.2814 9.17075 16.3763L13.1707 19.8763C13.3786 20.0581 13.6944 20.0371 13.8763 19.8293C14.0581 19.6214 14.0371 19.3056 13.8293 19.1237L10.2593 16L13.8293 12.8763Z",fill:"#6F6E77"})})},e0=function(){return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:(0,i.jsx)("path",{d:"M21.2388 10H10.7623C10.3415 10 10 10.3415 10 10.7623V21.2377C10 21.6585 10.3415 22 10.7623 22H21.2377C21.6585 22 22 21.6585 22 21.2388V10.7623C22 10.3415 21.6585 10 21.2388 10ZM16.5714 19.1953C16.5714 20.3371 15.9018 20.8571 14.9241 20.8571C14.0402 20.8571 13.4029 20.2645 13.1429 19.7143L14.0413 19.1708C14.2143 19.4777 14.4777 19.7143 14.8571 19.7143C15.2199 19.7143 15.4286 19.5725 15.4286 19.0212V15.4286H16.5714V19.1953ZM19.0502 20.8571C18.0379 20.8571 17.4632 20.3471 17.1429 19.7143L18 19.1429C18.2333 19.5246 18.4877 19.8895 19.0257 19.8895C19.4777 19.8895 19.7143 19.6641 19.7143 19.3516C19.7143 18.9788 19.4688 18.846 18.9721 18.6283L18.6998 18.5112C17.9129 18.1763 17.3895 17.7567 17.3895 16.8683C17.3895 16.0513 18.0134 15.4286 18.9866 15.4286C19.6797 15.4286 20.1775 15.6696 20.5368 16.3013L19.6886 16.8471C19.5011 16.5112 19.3002 16.3795 18.9866 16.3795C18.6674 16.3795 18.4654 16.5826 18.4654 16.8471C18.4654 17.1741 18.6674 17.3058 19.135 17.5089L19.4074 17.6261C20.3348 18.0223 20.8571 18.4275 20.8571 19.3382C20.8571 20.3192 20.0859 20.8571 19.0502 20.8571Z",fill:"#6F6E77"})})},e1=function(){return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.1719 10H20.8281C21.4753 10 22 10.5247 22 11.1719V20.8281C22 21.4753 21.4753 22 20.8281 22H11.1719C10.5247 22 10 21.4753 10 20.8281V11.1719C10 10.5247 10.5247 10 11.1719 10ZM17.4283 20.7223V19.549C17.641 19.7275 17.8721 19.8613 18.1215 19.9505C18.371 20.0397 18.6228 20.0843 18.8771 20.0843C19.0263 20.0843 19.1565 20.0709 19.2678 20.044C19.3791 20.0171 19.472 19.9798 19.5466 19.9322C19.6211 19.8845 19.6768 19.8283 19.7135 19.7635C19.7501 19.6987 19.7685 19.6285 19.7685 19.5527C19.7685 19.45 19.7391 19.3583 19.6805 19.2777C19.6217 19.197 19.5417 19.1225 19.4402 19.054C19.3387 18.9856 19.2183 18.9196 19.0789 18.856C18.9395 18.7925 18.7891 18.7277 18.6277 18.6617C18.2169 18.4906 17.9106 18.2816 17.7089 18.0347C17.5071 17.7878 17.4062 17.4896 17.4062 17.1401C17.4062 16.8663 17.4613 16.631 17.5713 16.4343C17.6814 16.2375 17.8311 16.0756 18.0206 15.9484C18.2102 15.8213 18.4296 15.7278 18.6791 15.668C18.9285 15.6081 19.1926 15.5781 19.4714 15.5781C19.7452 15.5781 19.988 15.5946 20.1995 15.6276C20.411 15.6606 20.606 15.7113 20.7845 15.7798V16.8761C20.6965 16.815 20.6005 16.7612 20.4966 16.7148C20.3927 16.6683 20.2857 16.6298 20.1756 16.5992C20.0656 16.5687 19.9562 16.5461 19.8473 16.5314C19.7385 16.5168 19.6352 16.5094 19.5374 16.5094C19.4029 16.5094 19.2806 16.5223 19.1706 16.5479C19.0605 16.5736 18.9676 16.6097 18.8918 16.6561C18.816 16.7025 18.7573 16.7581 18.7157 16.8229C18.6742 16.8877 18.6534 16.9604 18.6534 17.0411C18.6534 17.1291 18.6766 17.2079 18.7231 17.2776C18.7695 17.3472 18.8356 17.4132 18.9212 17.4756C19.0068 17.5379 19.1107 17.599 19.2329 17.6589C19.3552 17.7188 19.4934 17.7805 19.6474 17.8441C19.8577 17.932 20.0466 18.0255 20.2142 18.1245C20.3817 18.2235 20.5253 18.3354 20.6451 18.46C20.765 18.5847 20.8567 18.7271 20.9203 18.8872C20.9838 19.0473 21.0156 19.2337 21.0156 19.4463C21.0156 19.7397 20.96 19.9859 20.8487 20.1851C20.7375 20.3844 20.5865 20.5457 20.3957 20.6691C20.205 20.7926 19.9831 20.8812 19.73 20.935C19.4769 20.9887 19.2097 21.0156 18.9285 21.0156C18.6399 21.0156 18.3655 20.9912 18.105 20.9423C17.8446 20.8934 17.619 20.8201 17.4283 20.7223ZM16.9609 16.6582H15.4558V20.9453H14.2634V16.6582H12.7656V15.6953H16.9609V16.6582Z",fill:"#6F6E77"})})},e7=function(){return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.031 11L15.7584 17.8336L16.0831 18.4288L16.4077 17.8336L20.1352 11H22L16.0831 21.4347L10 11H12.031ZM19.2924 11.0006L16.0831 16.8843L12.8737 11.0005L14.2612 11.0001L14.727 11L15.2777 11.9497L16.1319 13.4226L16.9886 11.9512L17.542 11.0006H17.9881H19.2924Z",fill:"#6F6E77"})})},e9=function(){return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,children:(0,i.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,i.jsx)("path",{d:"M0 0h32v32H0z"}),(0,i.jsx)("path",{fill:"#6F6E77",fillRule:"nonzero",d:"M15.45 10.534c1.592-1.013 3.794-.542 4.908 1.054.533.747.742 1.679.585 2.584a3.2 3.2 0 0 1-.48 1.197c.35.664.466 1.427.333 2.167a3.205 3.205 0 0 1-1.449 2.148l-2.795 1.782c-1.593 1.013-3.792.542-4.908-1.054a3.413 3.413 0 0 1-.585-2.584c.075-.425.24-.834.48-1.197a3.374 3.374 0 0 1-.334-2.167 3.205 3.205 0 0 1 1.449-2.148Zm3.756 1.785a2.224 2.224 0 0 0-2.383-.883 2.053 2.053 0 0 0-.57.249l-2.794 1.782c-.46.29-.778.759-.873 1.292a2.06 2.06 0 0 0 .352 1.555 2.224 2.224 0 0 0 2.384.883c.203-.054.393-.138.569-.249l1.064-.68a.567.567 0 0 1 .171-.076.67.67 0 0 1 .718.266.613.613 0 0 1 .106.468.582.582 0 0 1-.263.39L14.89 19.1a.567.567 0 0 1-.17.076.67.67 0 0 1-.718-.266.612.612 0 0 1-.114-.414l.011-.103-.103-.033a3.608 3.608 0 0 1-1.094-.547l-.144-.106-.051.16c-.03.084-.052.17-.068.26a2.06 2.06 0 0 0 .352 1.555 2.224 2.224 0 0 0 2.384.883c.2-.054.393-.138.569-.249l2.795-1.782c.46-.29.777-.759.872-1.292a2.06 2.06 0 0 0-.352-1.555 2.224 2.224 0 0 0-2.384-.883 2.053 2.053 0 0 0-.568.249l-1.065.68a.567.567 0 0 1-.17.076.67.67 0 0 1-.718-.266.613.613 0 0 1-.106-.468.582.582 0 0 1 .263-.39l2.795-1.783a.567.567 0 0 1 .17-.076.67.67 0 0 1 .719.266c.086.119.127.268.113.414l-.01.103.102.033c.393.119.764.303 1.095.547l.143.106.052-.16c.03-.084.051-.17.068-.26a2.06 2.06 0 0 0-.353-1.555Z"})]})})};t(69001),eY.Z.registerLanguage("tsx",eW.Z),eY.Z.registerLanguage("markup",e$.Z),eY.Z.alias("markup","vue"),eY.Z.alias("markup","svelte");var e2=function(e){var n,t=(null!==(n=e.fileName.match(/\.([^\.]*)$/))&&void 0!==n?n:[])[1];return function(){switch(t){case"ts":case"tsx":return(0,i.jsx)(e1,{});case"js":case"jsx":return(0,i.jsx)(e0,{});case"vue":return(0,i.jsx)(e7,{});case"svelte":return(0,i.jsx)(e9,{});default:return(0,i.jsx)(eQ,{})}}()},e4=function(e){var n=e.code,t=e.onCopy,s=(0,o.useState)(!1),a=s[0],l=s[1];(0,o.useEffect)(function(){if(a){var e=setTimeout(function(){l(!1)},1200);return function(){clearTimeout(e)}}},[a]);var c=function(){navigator.clipboard.writeText(n).then(function(){l(!0),void 0!==t&&t()})};return(0,i.jsx)(r.hU,{size:"small",onClick:c,icon:a?"check":"contentCopy"})},e8=function(e){var n=e.fileInfo,t=e.className,s=e.copy,a=e.code,l=e.onCopy,o=/language-(\w+)/.exec(null!=t?t:"");return(0,i.jsxs)("div",{className:"_1ecs97d9bi _1ecs97d9bn _1ecs97d9ex _1ecs97d9d7 _1ecs97d9ej _1ecs97d268 _1ecs97d2dl",children:[(0,i.jsxs)("div",{className:"_1ecs97d9bi _1ecs97d9bk _1ecs97d9bq _1ecs97d9c0 _1ecs97d9e0 _1ecs97d9ea _1ecs97d9ep _1ecs97d9f1 _1ecs97d18 _1ecs97d8l _1ecs97d48s _1ecs97d4g5 _1ecs97d9rz _1ecs97d9u2",children:[void 0!==n?(0,i.jsxs)("div",{className:"_1ecs97d9bi _1ecs97d9bk _1ecs97d9c0 _1ecs97d9bq",children:[(0,i.jsx)(e2,{fileName:n.fileName}),(0,i.jsx)(r.xv,{className:"_8uty130",color:"grey11",children:n.fileName})]}):(0,i.jsx)("span",{}),!0===s?(0,i.jsx)(e4,{onCopy:l,code:String(a)}):null]}),null!==o&&o[1]?(0,i.jsx)(eY.Z,{showLineNumbers:!0,customStyle:{margin:0,border:"none",fontSize:"12px",lineHeight:"18px",borderRadius:"none",backgroundColor:"#FFF",borderBottomLeftRadius:"4px",borderBottomRightRadius:"4px"},children:String(a).replace(/\n$/,""),style:eG.MS,language:o[1],PreTag:"div"}):a]})},e6="_1ecs97d9sy",e5=t(36065),e3=function(e){var n=(0,e5.p)();if(!0===e.inline)return(0,i.jsx)("code",(0,m.Z)((0,u.Z)({},e),{className:"_1ecs97d9gi _1ecs97d18 _1ecs97d8l _1ecs97d9d7 _1ecs97d9ry _1ecs97d9t8"}));var t=function(){var n,t;if((null===(n=e.node)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.meta)!==void 0){var i,r,s,a=null===(i=e.node)||void 0===i?void 0:null===(r=i.data)||void 0===r?void 0:r.meta;return{fileName:a.substring(1,a.length-1),language:null===(s=e.className)||void 0===s?void 0:s.split("-")[1]}}return null}(),r=function(){void 0!==n&&M.Xe.track({event:"page-type:copy-snippet",framework:n})};return(0,i.jsx)(e8,(0,u.Z)((0,m.Z)((0,u.Z)({copy:!0},e),{onCopy:r,code:e.children}),null!==t?{fileInfo:t}:{}))},ne=function(e){var n=e.markdown;return(0,i.jsx)(eJ.D,{children:n,linkTarget:"_blank",remarkPlugins:[eq.Z],components:{code:function(e){return(0,i.jsx)(e3,(0,u.Z)({},e))},h1:function(e){return(0,i.jsx)(r.xv,{children:e.children,component:"h1",variant:"h1"})},h2:function(e){return(0,i.jsx)(r.xv,{children:e.children,component:"h2",variant:"h2"})},h3:function(e){return(0,i.jsx)(r.xv,{children:e.children,component:"h3",variant:"h3"})},h4:function(e){return(0,i.jsx)(r.xv,{children:e.children,component:"h4",variant:"h4"})},h5:function(e){return(0,i.jsx)(r.xv,{children:e.children,component:"h4",variant:"h4"})},p:function(e){return(0,i.jsx)(r.xv,{className:e6,children:e.children,component:"p",variant:"normal"})},pre:function(e){return(0,i.jsx)(r.xv,{className:e6,children:e.children,component:"pre",variant:"normal"})}}})};function nn(e){return nt.apply(this,arguments)}function nt(){return(nt=(0,P.Z)(function(e){var n,t,i,r;return(0,R.__generator)(this,function(s){switch(s.label){case 0:return n=JSON.parse(e),[4,Q.j.documentation.read({kind:n.kind,data:n.data})];case 1:if(i=(t=s.sent()).errors,r=t.documentation,i.length>0)throw i;return[2,r]}})})).apply(this,arguments)}t(75317);var ni=function(e){var n,t=e.model,s=(0,e5.p)(),a=(0,G.QT)(nn,[JSON.stringify({kind:"PageSnippet",data:{model:t}})]);if(0===a.length)return null;var l=function(){void 0!==s&&M.Xe.track({event:"page-type:open-snippet",framework:s})};return(0,i.jsxs)(r.Vq,{size:"small",trigger:(0,i.jsx)(r.zx,{variant:"secondary",onClick:l,startIcon:"code",children:"Page snippet"}),children:[(0,i.jsx)(r.fK,{icon:"code",title:"Page snippet"}),(0,i.jsx)("section",{className:"_3uvawd0 _1ecs97d9bk _1ecs97d9bt _1ecs97d9jo _1ecs97d9lf",children:a.length>1?(0,i.jsx)(eB,{style:{flex:1},tabs:a.map(function(e,n){var t=e.label,r=e.content;return{label:null!=t?t:"Tab ".concat(n+1),content:(0,i.jsx)(ne,{markdown:r})}})}):(0,i.jsx)(r.xr,{style:{flex:1,padding:16},children:(0,i.jsx)(ne,{markdown:a[0].content})})})]})},nr=function(e){var n=e.model;return(0,i.jsx)("div",{children:(0,i.jsx)(r.SV,{children:(0,i.jsx)(o.Suspense,{fallback:(0,i.jsx)(r.zx,{variant:"secondary",startIcon:"code",children:"Page snippet"}),children:(0,i.jsx)(ni,{model:n})})})})},ns=function(){var e=(0,l.useRouter)(),n=(0,c.v9)(function(n){return{selectedCustomType:(0,eA.Jk)(n,(0,eR.Ag)(e.query))}}).selectedCustomType,t=(0,S.Z)().cleanupCustomTypeStore;return((0,o.useEffect)(function(){n&&(0,eH.TG)(n)||e.replace("/")},[n,e]),(0,o.useEffect)(function(){return function(){t()}},[]),n&&(0,eH.TG)(n))?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a(),{children:(0,i.jsxs)("title",{children:[n.local.label," - Slice Machine"]})}),(0,i.jsx)(na,{customType:n.local,remoteCustomType:(0,eH.wU)(n)?n.remote:void 0})]}):(0,i.jsx)(d.LN,{})},na=function(e){var n,t=e.customType,s=e.remoteCustomType,a=(0,S.Z)(),l=a.initCustomTypeStore,u=a.saveCustomType;(0,o.useEffect)(function(){l(t,s)},[]);var m=(0,c.v9)(function(e){return{currentCustomType:(0,F.A3)(e),hasPendingModifications:(0,F.CT)(e),isSavingCustomType:(0,eK.hg)(e,eU.z.SAVE_CUSTOM_TYPE)}}),h=m.currentCustomType,f=m.hasPendingModifications,v=m.isSavingCustomType;if(null===h)return(0,i.jsx)(d.LN,{});var p=eR.cd[h.format],x=eC.$[h.format];return(0,i.jsxs)(d.LN,{children:[(0,i.jsxs)(d.wd,{children:[(0,i.jsx)(d.Xq,{url:p.tablePagePathname}),(0,i.jsx)(d.Cx,{folder:x.name({start:!0,plural:!0}),page:null!==(n=h.label)&&void 0!==n?n:h.id}),(0,i.jsxs)(d.K2,{children:["page"===h.format?(0,i.jsx)(nr,{model:K.Dc.fromSM(h)}):void 0,(0,i.jsx)(eX._,{isChangesLocal:!0,format:h.format,customType:K.Dc.fromSM(h)}),(0,i.jsx)(r.zx,{onClick:u,loading:v,"data-testid":"builder-save-button",disabled:!f||v,children:"Save"})]})]}),(0,i.jsx)(d.RN,{children:(0,i.jsx)(r.xu,{flexDirection:"column",height:"100%",children:(0,i.jsx)(eP,{customType:h})})})]})}},69001:function(){},6304:function(){},17164:function(){},75317:function(){}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[97],{3819:function(e,t){"use strict";function o(e,t,o,n){return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.getDomainLocale=o,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81756:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(60793).Z;o(87806).default,Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(18726).Z,a=o(62877).Z,u=r(o(2784)),l=o(53606),f=o(78358),c=o(20214),i=o(52928),s=o(80987),d=o(3819),p=o(65206),v={};function y(e,t,o,n){if(e&&l.isLocalURL(t)){Promise.resolve(e.prefetch(t,o,n)).catch(function(e){});var r=n&&void 0!==n.locale?n.locale:e&&e.locale;v[t+"%"+o+(r?"%"+r:"")]=!0}}var b=u.default.forwardRef(function(e,t){var o,r,b=e.href,h=e.as,C=e.children,_=e.prefetch,g=e.passHref,M=e.replace,m=e.shallow,x=e.scroll,L=e.locale,j=e.onClick,R=e.onMouseEnter,O=e.onTouchStart,E=e.legacyBehavior,k=void 0===E?!0!==Boolean(!0):E,P=a(e,["href","as","children","prefetch","passHref","replace","shallow","scroll","locale","onClick","onMouseEnter","onTouchStart","legacyBehavior"]);o=C,k&&("string"==typeof o||"number"==typeof o)&&(o=u.default.createElement("a",null,o));var w=!1!==_,T=u.default.useContext(c.RouterContext),I=u.default.useContext(i.AppRouterContext);I&&(T=I);var S=u.default.useMemo(function(){var e=n(l.resolveHref(T,b,!0),2),t=e[0],o=e[1];return{href:t,as:h?l.resolveHref(T,h):o||t}},[T,b,h]),U=S.href,B=S.as,N=u.default.useRef(U),Z=u.default.useRef(B);k&&(r=u.default.Children.only(o));var A=k?r&&"object"==typeof r&&r.ref:t,D=n(s.useIntersection({rootMargin:"200px"}),3),H=D[0],K=D[1],G=D[2],q=u.default.useCallback(function(e){(Z.current!==B||N.current!==U)&&(G(),Z.current=B,N.current=U),H(e),A&&("function"==typeof A?A(e):"object"==typeof A&&(A.current=e))},[B,A,U,G,H]);u.default.useEffect(function(){var e=K&&w&&l.isLocalURL(U),t=void 0!==L?L:T&&T.locale,o=v[U+"%"+B+(t?"%"+t:"")];e&&!o&&y(T,U,B,{locale:t})},[B,U,K,L,w,T]);var z={ref:q,onClick:function(e){k||"function"!=typeof j||j(e),k&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),e.defaultPrevented||function(e,t,o,n,r,a,f,c,i,s){if("A"!==e.currentTarget.nodeName.toUpperCase()||(!(p=(d=e).currentTarget.target)||"_self"===p)&&!d.metaKey&&!d.ctrlKey&&!d.shiftKey&&!d.altKey&&(!d.nativeEvent||2!==d.nativeEvent.which)&&l.isLocalURL(o)){e.preventDefault();var d,p,v=function(){"beforePopState"in t?t[r?"replace":"push"](o,n,{shallow:a,locale:c,scroll:f}):t[r?"replace":"push"](o,{forceOptimisticNavigation:!s})};i?u.default.startTransition(v):v()}}(e,T,U,B,M,m,x,L,Boolean(I),w)},onMouseEnter:function(e){k||"function"!=typeof R||R(e),k&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),!(!w&&I)&&l.isLocalURL(U)&&y(T,U,B,{priority:!0})},onTouchStart:function(e){k||"function"!=typeof O||O(e),k&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),!(!w&&I)&&l.isLocalURL(U)&&y(T,U,B,{priority:!0})}};if(!k||g||"a"===r.type&&!("href"in r.props)){var F=void 0!==L?L:T&&T.locale,J=T&&T.isLocaleDomain&&d.getDomainLocale(B,F,T.locales,T.domainLocales);z.href=J||p.addBasePath(f.addLocale(B,F,T&&T.defaultLocale))}return k?u.default.cloneElement(r,z):u.default.createElement("a",Object.assign({},P,z),o)});t.default=b,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},80987:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(60793).Z;Object.defineProperty(t,"__esModule",{value:!0}),t.useIntersection=function(e){var t=e.rootRef,o=e.rootMargin,c=e.disabled||!u,i=n(r.useState(!1),2),s=i[0],d=i[1],p=n(r.useState(null),2),v=p[0],y=p[1];return r.useEffect(function(){if(u){if(!c&&!s&&v&&v.tagName){var e,n,r,i,p,y,b;return n=function(e){return e&&d(e)},p=(i=function(e){var t,o={root:e.root||null,margin:e.rootMargin||""},n=f.find(function(e){return e.root===o.root&&e.margin===o.margin});if(n&&(t=l.get(n)))return t;var r=new Map;return t={id:o,observer:new IntersectionObserver(function(e){e.forEach(function(e){var t=r.get(e.target),o=e.isIntersecting||e.intersectionRatio>0;t&&o&&t(o)})},e),elements:r},f.push(o),l.set(o,t),t}(r={root:null==t?void 0:t.current,rootMargin:o})).id,y=i.observer,(b=i.elements).set(v,n),y.observe(v),function(){if(b.delete(v),y.unobserve(v),0===b.size){y.disconnect(),l.delete(p);var e=f.findIndex(function(e){return e.root===p.root&&e.margin===p.margin});e>-1&&f.splice(e,1)}}}}else if(!s){var h=a.requestIdleCallback(function(){return d(!0)});return function(){return a.cancelIdleCallback(h)}}},[v,c,o,t,s]),[y,s,r.useCallback(function(){d(!1)},[])]};var r=o(2784),a=o(3771),u="function"==typeof IntersectionObserver,l=new Map,f=[];("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},52928:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateContext=t.GlobalLayoutRouterContext=t.LayoutRouterContext=t.AppRouterContext=void 0;var n=(0,o(18726).Z)(o(2784)),r=n.default.createContext(null);t.AppRouterContext=r;var a=n.default.createContext(null);t.LayoutRouterContext=a;var u=n.default.createContext(null);t.GlobalLayoutRouterContext=u;var l=n.default.createContext(null);t.TemplateContext=l},39097:function(e,t,o){e.exports=o(81756)}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[197],{98528:function(n,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[lib]/[sliceName]/[variation]/screenshot",function(){return r(37489)}])},4597:function(n,e,r){"use strict";r.d(e,{Z:function(){return v}});var t,i=r(22710),o=r(62230),c=r(17064),u=r(99267),a=r(52322),s=r(2784),l=r(75289),d=r(16),f=r(90374),v=function(n){var e,r,t,v,h,m,p=n.apiContent,b=n.screenDimensions,g=n.simulatorUrl,_=n.dryRun,w=n.isScreenshot,S=void 0!==w&&w,x=(0,c.Z)((r=(e=(0,s.useState)())[0],t=e[1],v=(0,s.useRef)(),h=(0,s.useRef)(),[r,(0,s.useCallback)((m=(0,i.Z)(function(n){var e,r,o,c;return(0,u.__generator)(this,function(a){switch(a.label){case 0:if(null===(e=v.current)||void 0===e||e.disconnect(),null===(r=h.current)||void 0===r||r.disconnect(),t(void 0),!(null!=n))return[3,4];v.current=new d.SH(n),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,v.current.connect()];case 2:var s;return a.sent(),t(v.current),s=(0,i.Z)(function(){var n;return(0,u.__generator)(this,function(e){switch(e.label){case 0:return t(void 0),[4,null===(n=v.current)||void 0===n?void 0:n.connect({},!0)];case 1:return e.sent(),t(v.current),[2]}})}),o=function(){return s.apply(this,arguments)},h.current=new MutationObserver(function(n){n.forEach(function(n){"src"===n.attributeName&&o().catch(function(n){throw n})})}),h.current.observe(n,{attributeFilter:["src"]}),[3,4];case 3:return c=a.sent(),console.error(c),[3,4];case 4:return[2]}})}),function(n){return m.apply(this,arguments)}),[])]),2),y=x[0],k=x[1],Z=(0,f.Z)(),C=Z.connectToSimulatorSuccess,N=Z.connectToSimulatorFailure;(0,s.useEffect)(function(){var n;if(!g){N();return}if(void 0!==y){if(!y.connected){N(),console.warn("Trying to use a disconnected simulator client.");return}(n=(0,i.Z)(function(){return(0,u.__generator)(this,function(n){switch(n.label){case 0:return[4,y.setSliceZone([p])];case 1:return n.sent(),[2]}})}),function(){return n.apply(this,arguments)})().then(function(){C()}).catch(function(){N()})}},[y,p,g]);var R,E,j,z,T,q,W,D,H,I=(0,s.useState)(),M=I[0],O=I[1],P=(R=function(n){var e;O({height:n.blockSize,width:n.inlineSize})},j=(0,s.useRef)(),(0,s.useCallback)(function(n){var e;null===(e=j.current)||void 0===e||e.disconnect(),null!==n&&(j.current=new ResizeObserver(function(e){var r,t=(0,c.Z)(e,1)[0].contentRect;R({blockSize:t.height,inlineSize:t.width},n)}),j.current.observe(n))},[]));return(0,a.jsxs)(l.kC,{ref:P,sx:(0,o.Z)({alignItems:"center",backgroundColor:"headSection",backgroundImage:"url(/pattern.png)",backgroundRepeat:"repeat",backgroundSize:"10px",border:S?void 0:function(n){var e;return"1px solid ".concat(String(null===(e=n.colors)||void 0===e?void 0:e.darkBorder))},borderRadius:S?void 0:8,display:"flex",height:"100%",justifyContent:"center",overflow:"hidden"},void 0!==_&&_?{display:"none"}:{}),children:[g?(0,a.jsx)("iframe",{id:"__iframe-renderer",ref:k,src:g,style:(0,o.Z)({border:"none",maxHeight:"".concat(b.height,"px"),maxWidth:"".concat(b.width,"px"),minHeight:"".concat(b.height,"px"),minWidth:"".concat(b.width,"px"),overflowY:"auto"},M?{transform:"scale(".concat((z=b,T=M,q=z.height,W=z.width,D=T.height,H=T.width,W>H||q>D?W-H>q-D?H/W:D/q:1),")")}:{display:"none"})}):null,(null==y?void 0:y.connected)?(0,a.jsx)("div",{id:"__iframe-ready"}):null]})}},37489:function(n,e,r){"use strict";r.r(e),r.d(e,{default:function(){return w}});var t=r(52322),i=r(4597),o=r(62230),c=r(85244),u=r(2784),a=r(87608),s=r(25242),l=r(53559),d=function(n){var e=n.variationID,r=n.slice;return(0,u.useMemo)(function(){var n,t=(null===(n=r.mocks)||void 0===n?void 0:n.find(function(n){return n.variation===e}))||(0,a.W)(e),i=(0,c.Z)((0,o.Z)({},(0,s.renderSliceMock)(l.id.fromSM(r.model),t)),{id:r.model.id});return{editorContent:t,apiContent:i}},[r.mocks,r.model,e])},f=r(57880),v=r(39092),h=r(5632),m=r(56580),p=r(75289),b=function(n){var e=n.children;return(0,t.jsx)(t.Fragment,{children:e})},g=function(n){var e=n.slice,r=n.variation,o=(0,m.v9)(function(n){return{simulatorUrl:(0,v.x0)(n)}}).simulatorUrl,c=(0,h.useRouter)(),u=Number(c.query.screenWidth),a=Number(c.query.screenHeight),s=d({slice:e,variationID:r.id}).apiContent;return void 0===o?null:(0,t.jsx)(p.xu,{as:"main",sx:{height:"100vh",width:"100vw",border:"none"},children:(0,t.jsx)(i.Z,{simulatorUrl:o,apiContent:s,screenDimensions:{width:u,height:a},isScreenshot:!0})})},_=(0,f.y)(g);_.CustomLayout=b;var w=_},28684:function(n,e,r){"use strict";var t=r(92521),i=r(90374),o=r(5632),c=r(2784),u=r(56580),a=function(){var n=(0,o.useRouter)(),e=(0,i.Z)().initSliceStore,r=(0,u.v9)(function(e){return{slice:(0,t.tL)(e,n.query.lib,n.query.sliceName)}}).slice;if((0,c.useEffect)(function(){r?e(r):n.replace("/")},[e,r,n]),!r)return{};var a=r.model.variations.find(function(e){return e.id===n.query.variation});return a?{slice:r,variation:a}:(n.replace("/"),{})};e.Z=a},57880:function(n,e,r){"use strict";r.d(e,{y:function(){return u}});var t=r(62230),i=r(52322);r(2784);var o=r(28684),c=r(95583),u=function(n){return function(e){var r=e.pageProps,u=(0,o.Z)(),a=u.slice,s=u.variation;return a&&s?(0,i.jsx)(n,(0,t.Z)({slice:a,variation:s},r)):((0,c.gx)("/"),null)}}},87608:function(n,e,r){"use strict";r.d(e,{W:function(){return t}});var t=function(n){return{__TYPE__:"SharedSliceContent",variation:n,primary:{},items:[]}}}},function(n){n.O(0,[746,774,888,179],function(){return n(n.s=98528)}),_N_E=n.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[563],{18343:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[lib]/[sliceName]/[variation]/simulator",function(){return t(6487)}])},56577:function(e,n,t){"use strict";t.d(n,{z:function(){return d}});var r=t(62230),i=t(85244),o=t(98240),s=t(52322),c=t(2784),a=t(75289),l=function(e,n){return e?"".concat(e,"-").concat(n):""},u=function(e){switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},d=(0,c.forwardRef)(function(e,n){var t=e.label,c=e.Icon,d=e.type,x=e.form,f=e.isLoading,h=void 0!==f&&f,p=e.disabled,v=e.onClick,m=e.sx,g=e.iconSize,b=void 0===g?16:g,C=e.iconFill,j=e.variant,S=void 0===j?"primary":j,k=(0,o.Z)(e,["label","Icon","type","form","isLoading","disabled","onClick","sx","iconSize","iconFill","variant"]);return(0,s.jsx)(a.zx,(0,i.Z)((0,r.Z)({ref:n,sx:(0,r.Z)((0,i.Z)((0,r.Z)({},void 0===m?{}:m),{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"}),h?{cursor:"wait !important"}:{}),type:d,form:x,disabled:void 0!==p&&p||h,onClick:h?void 0:v,variant:S},k),{children:h?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.$j,{size:b,color:u(S),"data-cy":l(k["data-cy"],"spinner")}),c&&t]}):(0,s.jsxs)(s.Fragment,{children:[c&&(0,s.jsx)(c,{size:b,fill:C,"data-cy":l(k["data-cy"],"icon")}),t]})}))})},61931:function(e,n,t){"use strict";t.d(n,{q:function(){return l}});var r=t(62230),i=t(52322),o=t(2784),s=t(75289),c=t(65186),a=(0,o.memo)(function(e){var n=e.src;return(0,i.jsx)(s.Ee,{src:n,alt:"Preview image",sx:{maxHeight:"100%"}})}),l=function(e){var n=e.hideMissingWarning,t=e.src,o=e.sx;return(0,i.jsx)(s.kC,{sx:(0,r.Z)({position:"relative",alignItems:"center",justifyContent:"center",overflow:"hidden",backgroundImage:"url(/pattern.png)",backgroundColor:"headSection",backgroundRepeat:"repeat",backgroundSize:"20px",borderRadius:"4px"},o),children:void 0!==n&&n?null:(0,i.jsx)(i.Fragment,{children:void 0!==t?(0,i.jsx)(a,{src:t}):(0,i.jsxs)(s.xv,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,i.jsx)(c.eJU,{}),"You have no screenshot yet."]})})})}},4597:function(e,n,t){"use strict";t.d(n,{Z:function(){return f}});var r,i=t(22710),o=t(62230),s=t(17064),c=t(99267),a=t(52322),l=t(2784),u=t(75289),d=t(16),x=t(90374),f=function(e){var n,t,r,f,h,p,v,m=e.apiContent,g=e.screenDimensions,b=e.simulatorUrl,C=e.dryRun,j=e.isScreenshot,S=void 0!==j&&j,k=(0,s.Z)((t=(n=(0,l.useState)())[0],r=n[1],f=(0,l.useRef)(),h=(0,l.useRef)(),v=(0,l.useCallback)((p=(0,i.Z)(function(e){var n,t,o,s;return(0,c.__generator)(this,function(a){switch(a.label){case 0:if(null===(n=f.current)||void 0===n||n.disconnect(),null===(t=h.current)||void 0===t||t.disconnect(),r(void 0),!(null!=e))return[3,4];f.current=new d.SH(e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,f.current.connect()];case 2:var l;return a.sent(),r(f.current),l=(0,i.Z)(function(){var e;return(0,c.__generator)(this,function(n){switch(n.label){case 0:return r(void 0),[4,null===(e=f.current)||void 0===e?void 0:e.connect({},!0)];case 1:return n.sent(),r(f.current),[2]}})}),o=function(){return l.apply(this,arguments)},h.current=new MutationObserver(function(e){e.forEach(function(e){"src"===e.attributeName&&o().catch(function(e){throw e})})}),h.current.observe(e,{attributeFilter:["src"]}),[3,4];case 3:return s=a.sent(),console.error(s),[3,4];case 4:return[2]}})}),function(e){return p.apply(this,arguments)}),[]),[t,v]),2),y=k[0],E=k[1],w=(0,x.Z)(),_=w.connectToSimulatorSuccess,I=w.connectToSimulatorFailure;(0,l.useEffect)(function(){var e;if(!b){I();return}if(void 0!==y){if(!y.connected){I(),console.warn("Trying to use a disconnected simulator client.");return}(e=(0,i.Z)(function(){return(0,c.__generator)(this,function(e){switch(e.label){case 0:return[4,y.setSliceZone([m])];case 1:return e.sent(),[2]}})}),function(){return e.apply(this,arguments)})().then(function(){_()}).catch(function(){I()})}},[y,m,b]);var D,Z,F,R,z,N,O,T,A,L=(0,l.useState)(),M=L[0],U=L[1],P=(D=function(e){var n;U({height:e.blockSize,width:e.inlineSize})},F=(0,l.useRef)(),(0,l.useCallback)(function(e){var n;null===(n=F.current)||void 0===n||n.disconnect(),null!==e&&(F.current=new ResizeObserver(function(n){var t,r=(0,s.Z)(n,1)[0].contentRect;D({blockSize:r.height,inlineSize:r.width},e)}),F.current.observe(e))},[]));return(0,a.jsxs)(u.kC,{ref:P,sx:(0,o.Z)({alignItems:"center",backgroundColor:"headSection",backgroundImage:"url(/pattern.png)",backgroundRepeat:"repeat",backgroundSize:"10px",border:S?void 0:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.darkBorder))},borderRadius:S?void 0:8,display:"flex",height:"100%",justifyContent:"center",overflow:"hidden"},void 0!==C&&C?{display:"none"}:{}),children:[b?(0,a.jsx)("iframe",{id:"__iframe-renderer",ref:E,src:b,style:(0,o.Z)({border:"none",maxHeight:"".concat(g.height,"px"),maxWidth:"".concat(g.width,"px"),minHeight:"".concat(g.height,"px"),minWidth:"".concat(g.width,"px"),overflowY:"auto"},M?{transform:"scale(".concat((R=g,z=M,N=R.height,O=R.width,T=z.height,A=z.width,O>A||N>T?O-A>N-T?A/O:T/N:1),")")}:{display:"none"})}):null,(null==y?void 0:y.connected)?(0,a.jsx)("div",{id:"__iframe-ready"}):null]})}},38986:function(e,n,t){"use strict";t.d(n,{Z:function(){return d}});var r=t(62230),i=t(52322),o=t(2784),s=t(19909),c=t(75289),a=function(e){var n=e.defaultValue,t=e.variations,r=e.MenuItemAction,o=e.onChange;return(0,i.jsxs)(c.xu,{sx:{py:0,flexDirection:"column",backgroundColor:"headSection",overflow:"auto",display:"flex",borderRadius:"4px",border:function(e){var n;return"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.borders)},boxShadow:"0 10px 10px rgba(0, 0, 0, 0.05)",maxHeight:340,minWidth:250,maxWidth:350,color:"text"},children:[(0,i.jsxs)(c.xv,{sx:{p:3,fontSize:12,color:"textClear"},children:[t.length," VARIATION",t.length>1?"S":""]}),(0,i.jsxs)(c.kC,{sx:{p:0,flexDirection:"column"},children:[t.map(function(e){return(0,i.jsx)(l,{value:e,isActive:e.id===n.id,onClick:o},e.id)}),r||null]})]})},l=function(e){var n=e.value,t=e.isActive,r=e.onClick;return(0,i.jsx)(c.xu,{sx:{px:3,py:2,color:t?"primary":"",cursor:"pointer",borderLeft:function(e){var n=e.colors;return"2px solid ".concat(t?null==n?void 0:n.primary:null==n?void 0:n.background)},borderRadius:0,bg:"background",":hover":{bg:"hoverBackground",borderLeft:function(e){var n=e.colors;return"2px solid ".concat(null==n?void 0:n.primary)}}},onClick:function(){return r(n)},children:n.name})},u=t(75100),d=function(e){var n=e.buttonSx,t=e.defaultValue,l=e.variations,d=e.onNewVariation,x=e.onChange,f=e.sx,h=e.disabled,p=(0,o.useState)(!1),v=p[0],m=p[1],g=(0,o.useState)(t||l[0]),b=g[0],C=g[1];(0,o.useEffect)(function(){t&&C(t)},[t]);var j=function(e){m(!1),C(e),setTimeout(function(){return x(e)},210)},S=(0,i.jsx)(c.xu,{sx:{p:2},children:(0,i.jsx)(c.zx,{variant:"transparent",sx:{color:"text"},onClick:function(){m(!1),d&&d()},children:"+ Add new variation"})});return(0,i.jsx)(c.xu,{sx:f,children:(0,i.jsx)(s.Popover,{align:"start",isOpen:v,onClickOutside:function(){return m(!1)},positions:["bottom"],padding:10,content:function(){return(0,i.jsx)(a,{defaultValue:b,variations:l,onChange:j,MenuItemAction:d?S:void 0})},containerClassName:"variationSelectorContainer",children:(0,i.jsxs)(c.zx,{sx:(0,r.Z)({},n),variant:"dropDownButton",onClick:function(){return m(!v)},disabled:h,children:[b.name," ",v?(0,i.jsx)(u.bOz,{size:"16px","aria-label":"Collapse variations"}):(0,i.jsx)(u.mEq,{size:"16px","aria-label":"Expand variations"})]})})})}},25474:function(e,n,t){"use strict";function r(e){var n=e.lib,t=e.sliceName,r=e.variationId,i=e.options,o=void 0===i?{}:i,s=e.isSimulator,c="/[lib]/[sliceName]/[variation]".concat(s?"/simulator":""),a="/".concat(n,"/").concat(t,"/").concat(r).concat(s?"/simulator":"");return{href:c,as:a,options:o,all:[c,a,o]}}t.d(n,{P:function(){return r}})},6487:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return eg}});var r,i,o,s,c=t(52322),a=t(97729),l=t.n(a),u=t(62230),d=t(85244),x=t(2784),f=t(71463),h=t(71651),p=t(87608),v=t(75289),m=t(65077),g=t(5632),b=t.n(g),C=t(38986),j=t(56577),S=function(e){return(0,c.jsxs)("svg",(0,d.Z)((0,u.Z)({viewBox:"0 0 72 72",xmlns:"http://www.w3.org/2000/svg"},e),{children:[(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M51.3304 19.693C50.9182 18.9787 50.2527 18.6526 50.2527 18.6526L64.7906 10.2077C65.5266 9.78011 66.4679 10.0339 66.8929 10.7745C67.3179 11.5151 67.0657 12.4622 66.3294 12.8898L52.639 20.8424C52.639 20.8424 51.7428 20.4072 51.3304 19.693Z",fill:"current"}),(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M47.6775 54.7814C58.0794 48.7394 61.6433 35.3572 55.6378 24.8917C54.7801 23.397 53.7736 22.0427 52.6481 20.8367L32.9428 32.2832C32.2068 32.7108 31.2655 32.457 30.8405 31.7165C30.4155 30.9757 30.6677 30.0287 31.4039 29.6011L50.2693 18.6425C43.486 13.2668 33.8645 12.2736 25.9299 16.8827C15.5282 22.9249 11.9642 36.3071 17.9697 46.7727C18.8274 48.2671 19.8339 49.6216 20.9595 50.8276L41.1791 39.0822C41.9151 38.6546 42.8564 38.9086 43.2814 39.6492C43.7064 40.3897 43.4542 41.3368 42.7182 41.7644L23.3384 53.0217C30.1217 58.3975 39.7432 59.3906 47.6775 54.7814Z",fill:"current"}),(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.20645 61.7656C4.78145 61.0248 5.03367 60.078 5.76978 59.6502L20.9371 50.8398C20.9371 50.8398 21.8578 51.2406 22.3053 51.7062C22.7528 52.1717 23.361 53.0078 23.361 53.0078L7.30887 62.3323C6.57274 62.7599 5.63144 62.5061 5.20645 61.7656Z",fill:"current"})]}))},k=t(56580),y=t(52039),E=t(25474),w=function(e,n,t){if(!n){b().push("/".concat(e.href,"/").concat(e.model.name));return}var r=E.P({lib:e.href,sliceName:e.model.name,variationId:null==n?void 0:n.id,isSimulator:t});b().push(r.href,r.as,r.options)},_=function(e){var n=e.slice,t=e.variation,r=e.isDisplayEditor,i=e.toggleIsDisplayEditor,o=e.onSaveMock,s=e.actionsDisabled,a=(0,k.v9)(function(e){return{savingMock:(0,y.S3)(e)}}).savingMock;return(0,c.jsxs)(v.kC,{sx:{p:"16px",display:"flex",bg:"grey07",gridTemplateRows:"1fr",borderBottom:"1px solid #DCDBDD",justifyContent:"space-between"},children:[(0,c.jsxs)(v.kC,{sx:{alignItems:"center"},children:[(0,c.jsx)(S,{height:"20px",width:"20px",fill:"#1A1523"}),(0,c.jsx)(v.xv,{sx:{ml:2,mr:"12px",fontSize:"14px",color:"#1A1523",fontWeight:"600",letterSpacing:"-0.15px"},children:n.model.name}),(0,c.jsx)(C.Z,{defaultValue:t,variations:n.model.variations,onChange:function(e){return w(n,e,!0)},disabled:n.model.variations.length<=1||s})]}),(0,c.jsxs)(v.kC,{sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,c.jsx)(v.kC,{sx:{alignItems:"center",justifyContent:"space-around"},children:(0,c.jsxs)(v.kC,{sx:{alignItems:"center",mr:4},children:[(0,c.jsx)(v.__,{htmlFor:"show-mock-editor",sx:{color:"#6F6E77",lineHeight:"16px",fontSize:"12px",fontWeight:"600",letterSpacing:"0px"},children:"Editor"}),(0,c.jsx)(v.rs,{id:"show-mock-editor",checked:r,onChange:i,disabled:s})]})}),(0,c.jsx)(j.z,{"data-cy":"save-mock",onClick:o,label:"Save mock content",disabled:a||s,variant:"primary",sx:{borderRadius:"6px",color:"#F1EEFE",fontWeight:"bold",border:"1px solid #5842C3",backgroundColor:"#6E56CF",boxShadow:"0px 1px 0px rgba(0, 0, 0, 0.04)","&:hover":{"&:not([disabled])":{backgroundColor:"#5842C3"}}}})]})]})},I=t(82770),D=t(39092),Z=t(19909),F=function(e){var n=e.defaultValue,t=e.options,r=e.onChange;return(0,c.jsx)(v.xu,{sx:{py:0,flexDirection:"column",backgroundColor:"headSection",overflow:"auto",display:"flex",borderRadius:"6px",border:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.darkBorder))},boxShadow:"0 10px 10px rgba(0, 0, 0, 0.05)",maxHeight:340,minWidth:180,maxWidth:350,color:"text"},children:(0,c.jsx)(v.kC,{sx:{p:0,flexDirection:"column"},children:t.map(function(e){return(0,c.jsx)(R,{value:e,isActive:e===n,onClick:r})})})})},R=function(e){var n=e.value,t=e.isActive,r=e.onClick;return(0,c.jsx)(v.xu,{sx:{p:2,cursor:"pointer",fontSize:"14px",borderRadius:0,bg:t?"hoverBackground":"background",":hover":{bg:"hoverBackground"}},onClick:function(){return r(n)},children:n})},z=t(75100),N=function(e){var n=e.buttonSx,t=e.currentValue,r=e.options,i=e.onChange,o=e.disabled,s=(0,x.useState)(!1),a=s[0],l=s[1],u=function(e){l(!1),setTimeout(function(){return i(e)},210)};return(0,c.jsx)(v.xu,{children:(0,c.jsx)(Z.Popover,{align:"start",isOpen:a,onClickOutside:function(){return l(!1)},positions:["bottom"],padding:2,content:function(){return(0,c.jsx)(F,{defaultValue:t,options:r,onChange:u})},children:(0,c.jsxs)(v.zx,{sx:n,variant:"dropDownButton",onClick:function(){return l(!a)},disabled:o,children:[t," ",a?(0,c.jsx)(z.bOz,{size:"24px"}):(0,c.jsx)(z.mEq,{size:"24px"})]})})})},O=t(67557);(s=r||(r={})).DESKTOP="Desktop",s.TABLET="Tablet",s.MOBILE="Mobile",s.CUSTOM="Custom";var T=(i={},(0,O.Z)(i,r.DESKTOP,{width:1280,height:800}),(0,O.Z)(i,r.TABLET,{width:1080,height:810}),(0,O.Z)(i,r.MOBILE,{width:390,height:844}),i),A=function(e){var n=e.label,t=e.startValue,r=e.onChange,i=e.sx,o=e.disabled,s=["e","-","+",",","."];return(0,c.jsxs)(v.kC,{sx:(0,u.Z)({alignItems:"center"},i),children:[(0,c.jsx)(v.__,{sx:{backgroundColor:"grey07",border:"transparent",borderRight:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.darkBorder))},borderRadius:"6px 0px 0px 6px",width:26,height:30,color:"greyIcon",fontWeight:"bold",fontSize:"14px",alignItems:"center",justifyContent:"center",position:"absolute",ml:"1px"},htmlFor:"".concat(n,"-screensize-input"),children:n}),(0,c.jsx)(v.II,{type:"number",name:"".concat(n,"-screensize-input"),disabled:o,sx:{width:80,height:32,p:0,border:"1px solid #E4E2E4",borderRadius:"6px","&::-webkit-outer-spin-button,&::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},color:"greyIcon",textAlign:"center",paddingLeft:26,"&:disabled":{cursor:"not-allowed","&:hover":{border:"1px solid #E4E2E4"},"&:active":{border:"1px solid #E4E2E4",boxShadow:"none"}}},onChange:r,value:t,min:"0",onKeyDown:function(e){s.includes(e.key)&&e.preventDefault()}})]})},L=function(e){e.slice,e.variation;var n=e.handleScreenSizeChange,t=e.screenDimensions,i=e.actionsDisabled,o=(0,x.useState)(r.DESKTOP),s=o[0],a=o[1],l=function(e){a(e),e!==r.CUSTOM&&n(T[e])},f=function(e){var t=Object.values(T).findIndex(function(n){return JSON.stringify(n)===JSON.stringify(e)}),i=t<0?r.CUSTOM:Object.keys(T)[t];a(i),n(e)};return(0,c.jsx)(v.kC,{sx:{alignItems:"center",pb:"16px",justifyContent:"space-between",variant:"small"},children:(0,c.jsxs)(v.kC,{sx:{alignItems:"center",flex:1},children:[(0,c.jsx)(N,{options:Object.values(r),onChange:l,buttonSx:{alignSelf:"start"},currentValue:s,disabled:i}),(0,c.jsx)(A,{label:"W",startValue:t.width.toString(),onChange:function(e){f((0,d.Z)((0,u.Z)({},t),{width:Number(e.target.value)}))},disabled:i,sx:{mx:2}}),(0,c.jsx)(z.eSQ,{size:16,color:"#6F6E77"}),(0,c.jsx)(A,{label:"H",startValue:t.height.toString(),onChange:function(e){f((0,d.Z)((0,u.Z)({},t),{height:Number(e.target.value)}))},disabled:i,sx:{ml:2}})]})})},M=t(25812),U=t(77174),P=t(24340),W=t(90374),B=t(54132),H=t(61931),V=function(e){var n=e.sliceName,t=e.screenshotUrl,r=(0,k.v9)(function(e){return{isScreenshotModalOpen:(0,U.gP)(e,P.q.SCREENSHOT_PREVIEW)}}).isScreenshotModalOpen,i=(0,W.Z)().closeModals;return(0,c.jsx)(M.Z,{isOpen:r,shouldCloseOnOverlayClick:!0,contentLabel:"Screenshot Preview",portalClassName:"ScreenshotPreviewModal",onRequestClose:i,children:(0,c.jsx)(B.Z,{radius:"0px",bodySx:{p:0,bg:"#FFF",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none"},Header:function(){return(0,c.jsxs)(v.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.borders))}},children:[(0,c.jsxs)(v.X6,{sx:{fontSize:"14px"},children:["Screenshot Preview for ",n]}),(0,c.jsx)(v.x8,{type:"button",onClick:function(){return i()}})]})},Footer:function(){return(0,c.jsx)(v.kC,{style:{justifyContent:"flex-end",height:64,alignItems:"center",paddingRight:16,borderTop:"1px solid #DCDBDD"},children:(0,c.jsx)(v.zx,{variant:"secondary",sx:{fontWeight:600},onClick:function(){return i()},children:"Close"})})},children:(0,c.jsx)(H.q,{src:t,sx:{height:"320px"}})})})},q=t(25242),X=t(81541),G=function(e,n,t){var r=(0,x.useState)(e()),i=r[0],o=r[1],s=(0,x.useRef)(Date.now());return(0,x.useEffect)(function(){var t=setTimeout(function(){Date.now()-s.current>=n&&(o(e()),s.current=Date.now())},n-(Date.now()-s.current));return function(){clearTimeout(t)}},[n].concat((0,X.Z)(t))),i},K=t(4597),Y=function(e){var n=e.children,t=e.sx;return(0,c.jsx)(v.kC,{sx:(0,u.Z)({bg:"grey07",height:"90%",width:"100%",justifyContent:"center",alignItems:"center",zIndex:"1"},t),children:(0,c.jsx)(v.kC,{sx:{marginTop:"-128px",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:n})})},J=t(85819),Q=function(e){var n=e.onRetrigger;return(0,c.jsxs)(Y,{children:[(0,c.jsx)(v.Ee,{src:"/iframe-not-running.png",sx:{width:"320px"}}),(0,c.jsx)(v.xv,{sx:{color:"textClear",mb:2,fontSize:"14px",lineHeight:"24px",fontWeight:"600"},children:"Slice Machine can't render your Slice"}),(0,c.jsxs)(v.xv,{sx:{color:"failedConnectText",maxWidth:"400px",textAlign:"center",fontSize:"12px",lineHeight:"22px"},children:["Ensure your website's development server is running by typing",(0,c.jsx)("br",{}),(0,c.jsx)(v.xv,{as:"code",variant:"styles.inlineCode",sx:{padding:"4px",borderRadius:"6px"},children:"npm run dev"}),"\xa0 in your terminal at the root of your website directory.",(0,c.jsx)("br",{})," If that doesn't work, see the\xa0",(0,c.jsx)(v.rU,{target:"_blank",href:"https://prismic.io/docs/slice-machine",sx:{color:"link"},children:"troubleshooting instructions."})]}),(0,c.jsx)(j.z,{onClick:n,label:"Refresh",Icon:J.Fer,iconSize:20,iconFill:"#6F6E77",variant:"secondaryMedium",sx:{mt:"16px"}})]})},$=t(98240),ee=t(92928),en=t(33402),et=t(59326),er=t(86741),ei=t(65186),eo=function(e){var n=e.children;return(0,c.jsx)(v.xu,{as:"code",sx:{bg:"rgba(0, 0, 0, 0.05)",borderRadius:3,padding:"2px 4px"},children:n})},es=function(e){var n,t=e.children,r=(0,$.Z)(e,["children"]),i=(0,et.B7)().theme,o=(0,x.useState)(!1),s=o[0],a=o[1],l=(0,x.useRef)(null),f=function(){l.current&&navigator.clipboard.writeText(l.current.innerText).then(function(){a(!0),setTimeout(function(){a(!1)},1200)}).catch(function(){})};return(0,c.jsxs)(v.xu,(0,d.Z)((0,u.Z)({},r),{sx:{backgroundColor:"codeBlockBackground",borderRadius:8},children:[(0,c.jsxs)(v.kC,{sx:{px:"26px",py:"22px",color:"#FFF",flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottom:"1px solid rgba(111, 110, 119, 0.2)"},children:[(0,c.jsx)(v.kC,{sx:{alignItems:"center"}}),(0,c.jsxs)(v.zx,{onClick:f,variant:"transparent",sx:{display:"flex",justifyContent:"center",alignItems:"center",p:0,fontSize:"12px",color:"#FFF"},children:["Copy\xa0",s?(0,c.jsx)(ei.HhX,{size:16,color:String(null==i?void 0:null===(n=i.colors)||void 0===n?void 0:n.success)}):(0,c.jsx)(ei.Fqs,{size:16,style:{marginLeft:"8px"}})]})]}),(0,c.jsx)(v.xu,{ref:l,as:"pre",sx:{color:"#c9d1d9",padding:"16px 20px",overflow:"auto"},children:t})]}))},ec={code:function(e){var n=e.children;return(0,c.jsx)(eo,{children:n})},pre:function(e){var n=e.children,t=(0,$.Z)(e,["children"]);return(0,c.jsx)(es,(0,d.Z)((0,u.Z)({},t),{children:n}))}},ea=function(e){var n=e.html,t=e.components,r=void 0===t?{}:t,i={replace:function(e){if((0,en.Z)(e,er.W_)&&e.attribs){var n=(0,er.du)(e.children,i),t=(0,u.Z)({},r,ec)[e.name];if(t)return(0,c.jsx)(t,(0,d.Z)((0,u.Z)({name:e.name},e.attribs),{children:n}))}}};return(0,c.jsx)(c.Fragment,{children:(0,er.ZP)(n,i)})},el=function(e){var n=e.children.split("`").map(function(e,n){return n%2==1?(0,c.jsx)(eo,{children:e}):e});return(0,c.jsx)(c.Fragment,{children:n})},eu=function(e){var n=e.number,t=e.title,r=e.excerpt,i=(0,$.Z)(e,["number","title","excerpt"]);return(0,c.jsx)(ee.OK,(0,d.Z)((0,u.Z)({className:"react-tabs__vertical__tab",selectedClassName:"react-tabs__vertical__tab--selected"},i),{children:(0,c.jsxs)(v.kC,{sx:{alignItems:"flex-start"},children:[(0,c.jsx)(ex,{number:n}),(0,c.jsxs)(v.xu,{sx:{ml:3,alignSelf:"center"},children:[(0,c.jsx)(v.X6,{as:"h4",sx:{color:"whiteButtonText",fontSize:"14px",fontWeight:"600"},children:(0,c.jsx)(el,{children:t})}),r&&(0,c.jsx)(v.xv,{as:"p",sx:{mt:2,color:"textClear",fontSize:"13px",lineHeight:"24px"},children:(0,c.jsx)(el,{children:r})})]})]})}))};eu.tabsRole="Tab";var ed,ex=function(e){var n=e.number;return(0,c.jsx)(v.kC,{sx:{height:"32px",width:"32px",alignItems:"center",justifyContent:"center",border:"1px solid #E4E2E4",borderRadius:"6px",bg:"grey07",color:"textClear",flexShrink:"0",fontSize:"13px"},children:n})},ef=function(e){var n=e.isOpen,t=(0,k.v9)(function(e){return{isSimulatorAvailableForFramework:(0,D.Ql)(e),setupSteps:(0,y.qe)(e)}}),r=t.isSimulatorAvailableForFramework,i=t.setupSteps||[];return(0,x.useEffect)(function(){n&&I.Xe.track({event:"slice-simulator:setup"})},[n]),(0,c.jsx)(M.Z,{isOpen:n,children:(0,c.jsx)(B.Z,{bodySx:{p:0,bg:"grey07",height:4===i.length?"640px":"480px"},Header:function(e){var n=e.radius;return(0,c.jsx)(v.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",pl:4,bg:"grey07",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n,borderBottom:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.borders))}},children:(0,c.jsx)(v.X6,{sx:{fontSize:"14px",fontWeight:"600"},as:"h5",children:"Set up the simulator"})})},children:(0,c.jsxs)(ee.mQ,{defaultFocus:!0,className:"react-tabs__vertical",children:[(0,c.jsx)(ee.td,{className:"react-tabs__vertical__tab-list",children:i.map(function(e,n){return(0,c.jsx)(eu,{number:n+1,title:e.title,excerpt:e.description},e.title)})}),r?(0,c.jsx)(c.Fragment,{children:i.map(function(e){return(0,c.jsx)(ee.x4,{selectedClassName:"react-tabs__vertical__tab-panel--selected",className:"react-tabs__vertical__tab-panel",children:(0,c.jsx)(ea,{html:e.body})},e.title)})}):(0,c.jsx)(ee.x4,{selectedClassName:"react-tabs__vertical__tab-panel--selected",className:"react-tabs__vertical__tab-panel",children:"Framework not supported."})]})})})},eh=t(53559);(ed=o||(o={})).LOADING_SETUP="LOADING_SETUP",ed.LOADING_IFRAME="LOADING_IFRAME",ed.FAILED_SETUP="FAILED_SETUP",ed.FAILED_CONNECT="FAILED_CONNECT",ed.SUCCESS="SUCCESS";var ep=function(e){var n,t,i=e.slice,s=e.variation,a=(0,W.Z)(),l=a.checkSimulatorSetup,g=a.connectToSimulatorIframe,b=a.saveSliceMock,C=(0,k.v9)(function(e){return{simulatorUrl:(0,D.x0)(e),iframeStatus:(0,y.NL)(e),manifestStatus:(0,y.tD)(e).manifest,isWaitingForIFrameCheck:(0,y.oM)(e),endpoints:(0,D.gZ)(e)}}),j=C.simulatorUrl,S=C.iframeStatus,E=C.manifestStatus,w=C.isWaitingForIFrameCheck,Z=C.endpoints,F=(0,x.useMemo)(function(){return{embedsUrl:Z.PrismicOembed,env:"prod",unsplashUrl:Z.PrismicUnsplash}},[Z.PrismicOembed,Z.PrismicUnsplash]),R=(0,x.useRef)(null),z=(0,x.useCallback)(function(){return l()},[]);(0,x.useEffect)(function(){l(),I.Xe.track({event:"slice-simulator:open"})},[]);var N=(0,x.useRef)(!1);(0,x.useEffect)(function(){N.current=!0},[]);var O=function(e){N.current&&(N.current=!1,I.Xe.track({event:"editor:widget-used",sliceId:e}))},A="ko"===E?o.FAILED_SETUP:"ok"===E?w||!S?o.LOADING_IFRAME:"ok"!==S?o.FAILED_CONNECT:o.SUCCESS:(0,o.LOADING_SETUP);(0,x.useEffect)(function(){if(A===o.FAILED_SETUP&&!R.current){var e=setInterval(function(){z()},3e3);R.current=e}},[A]),(0,x.useEffect)(function(){"ok"===E&&(R.current&&clearInterval(R.current),g())},[E]),(0,x.useEffect)(function(){A===o.FAILED_CONNECT&&I.Xe.track({event:"slice-simulator:is-not-running"})},[A]),(0,x.useEffect)(function(){A===o.SUCCESS&&es(!0)},[A]);var M=function(){g()},U=(0,x.useState)(T[r.DESKTOP]),P=U[0],B=U[1],H=(0,x.useMemo)(function(){return eh.id.fromSM(i.model)},[i.model]),X=(0,x.useState)(null),J=X[0],$=X[1],ee=(0,x.useMemo)(function(){var e;return(null==J?void 0:J.variation)===s.id?J:(null===(e=i.mocks)||void 0===e?void 0:e.find(function(e){return e.variation===s.id}))||(0,p.W)(s.id)},[J,s.id]),en=(0,x.useMemo)(function(){return(0,q.renderSliceMock)(H,ee).id},[]),et=(0,x.useCallback)(function(){return function(){return(0,d.Z)((0,u.Z)({},(0,q.renderSliceMock)(H,ee)),{id:en})}},[H,ee]),er=G(et,800,[H,ee,]),ei=(0,x.useState)(!1),eo=ei[0],es=ei[1];return(0,c.jsxs)(v.kC,{sx:{flexDirection:"column",height:"100vh"},children:[(0,c.jsx)(ef,{isOpen:A===o.FAILED_SETUP}),(0,c.jsx)(_,{slice:i,variation:s,isDisplayEditor:eo,actionsDisabled:A!==o.SUCCESS,toggleIsDisplayEditor:function(){return es(!eo)},onSaveMock:function(){return J&&b({libraryID:i.from,sliceID:i.model.id,mocks:(i.mocks||[]).filter(function(e){return e.variation!==J.variation}).concat(J)})}}),(0,c.jsx)(v.xu,{sx:{flex:1,bg:"grey07",p:3,display:"flex",flexDirection:"column",height:"calc(100% - 73px - 16px)"},children:(0,c.jsxs)(v.kC,{sx:{flex:1,flexDirection:"row",position:"relative",width:"100%",height:"100%"},children:[(0,c.jsxs)(m.xR,{sx:{display:"flex",height:"100%",flexDirection:"column",flex:1,minWidth:0},children:[(0,c.jsx)(L,{slice:i,variation:s,handleScreenSizeChange:B,screenDimensions:P,actionsDisabled:A!==o.SUCCESS}),A===o.FAILED_CONNECT?(0,c.jsx)(Q,{onRetrigger:M}):null,A===o.SUCCESS?(0,c.jsx)(K.Z,{apiContent:er,screenDimensions:P,simulatorUrl:j}):(0,c.jsx)(c.Fragment,{children:A===o.LOADING_IFRAME?(0,c.jsxs)(Y,{children:[(0,c.jsx)(v.$j,{variant:"styles.spinner"}),(0,c.jsx)(K.Z,{apiContent:er,screenDimensions:P,simulatorUrl:j,dryRun:!0})]}):null})]}),A===o.SUCCESS?(0,c.jsx)(v.xu,{className:"editor",sx:(0,u.Z)({marginLeft:"16px",maxWidth:"440px",minWidth:"440px",overflowY:"auto"},eo?{display:"flex",flexDirection:"column"}:{display:"none"}),children:(0,c.jsx)(h.SV,{renderError:function(){return(0,c.jsx)(h.Iq,{title:"Editor error",description:"An error occurred while rendering the editor."})},children:(0,c.jsx)(x.Suspense,{children:(0,c.jsx)(f.kS,{config:F,content:ee,onContentChange:function(e){$(e),O(i.model.id)},sharedSlice:H},s.id)})})}):null]})}),!!(null===(n=i.screenshots[s.id])||void 0===n?void 0:n.url)&&(0,c.jsx)(V,{sliceName:i.model.name,screenshotUrl:null===(t=i.screenshots[s.id])||void 0===t?void 0:t.url})]})},ev=t(28684),em=(0,t(57880).y)(ep);function eg(){var e=(0,ev.Z)().slice;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l(),{children:(0,c.jsxs)("title",{children:[e?"Simulator: ".concat(e.model.name):"Simulator"," - Slice Machine"]})}),(0,c.jsx)(em,{})]})}},28684:function(e,n,t){"use strict";var r=t(92521),i=t(90374),o=t(5632),s=t(2784),c=t(56580),a=function(){var e=(0,o.useRouter)(),n=(0,i.Z)().initSliceStore,t=(0,c.v9)(function(n){return{slice:(0,r.tL)(n,e.query.lib,e.query.sliceName)}}).slice;if((0,s.useEffect)(function(){t?n(t):e.replace("/")},[n,t,e]),!t)return{};var a=t.model.variations.find(function(n){return n.id===e.query.variation});return a?{slice:t,variation:a}:(e.replace("/"),{})};n.Z=a},57880:function(e,n,t){"use strict";t.d(n,{y:function(){return c}});var r=t(62230),i=t(52322);t(2784);var o=t(28684),s=t(95583),c=function(e){return function(n){var t=n.pageProps,c=(0,o.Z)(),a=c.slice,l=c.variation;return a&&l?(0,i.jsx)(e,(0,r.Z)({slice:a,variation:l},t)):((0,s.gx)("/"),null)}}},87608:function(e,n,t){"use strict";t.d(n,{W:function(){return r}});var r=function(e){return{__TYPE__:"SharedSliceContent",variation:e,primary:{},items:[]}}}},function(e){e.O(0,[789,872,851,746,909,113,774,888,179],function(){return e(e.s=18343)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[759],{45662:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[lib]/[sliceName]/[variation]",function(){return t(18363)}])},38986:function(e,n,t){"use strict";t.d(n,{Z:function(){return d}});var i=t(62230),o=t(52322),r=t(2784),a=t(19909),l=t(75289),s=function(e){var n=e.defaultValue,t=e.variations,i=e.MenuItemAction,r=e.onChange;return(0,o.jsxs)(l.xu,{sx:{py:0,flexDirection:"column",backgroundColor:"headSection",overflow:"auto",display:"flex",borderRadius:"4px",border:function(e){var n;return"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.borders)},boxShadow:"0 10px 10px rgba(0, 0, 0, 0.05)",maxHeight:340,minWidth:250,maxWidth:350,color:"text"},children:[(0,o.jsxs)(l.xv,{sx:{p:3,fontSize:12,color:"textClear"},children:[t.length," VARIATION",t.length>1?"S":""]}),(0,o.jsxs)(l.kC,{sx:{p:0,flexDirection:"column"},children:[t.map(function(e){return(0,o.jsx)(u,{value:e,isActive:e.id===n.id,onClick:r},e.id)}),i||null]})]})},u=function(e){var n=e.value,t=e.isActive,i=e.onClick;return(0,o.jsx)(l.xu,{sx:{px:3,py:2,color:t?"primary":"",cursor:"pointer",borderLeft:function(e){var n=e.colors;return"2px solid ".concat(t?null==n?void 0:n.primary:null==n?void 0:n.background)},borderRadius:0,bg:"background",":hover":{bg:"hoverBackground",borderLeft:function(e){var n=e.colors;return"2px solid ".concat(null==n?void 0:n.primary)}}},onClick:function(){return i(n)},children:n.name})},c=t(75100),d=function(e){var n=e.buttonSx,t=e.defaultValue,u=e.variations,d=e.onNewVariation,f=e.onChange,p=e.sx,v=e.disabled,h=(0,r.useState)(!1),m=h[0],x=h[1],y=(0,r.useState)(t||u[0]),b=y[0],g=y[1];(0,r.useEffect)(function(){t&&g(t)},[t]);var j=function(e){x(!1),g(e),setTimeout(function(){return f(e)},210)},S=(0,o.jsx)(l.xu,{sx:{p:2},children:(0,o.jsx)(l.zx,{variant:"transparent",sx:{color:"text"},onClick:function(){x(!1),d&&d()},children:"+ Add new variation"})});return(0,o.jsx)(l.xu,{sx:p,children:(0,o.jsx)(a.Popover,{align:"start",isOpen:m,onClickOutside:function(){return x(!1)},positions:["bottom"],padding:10,content:function(){return(0,o.jsx)(s,{defaultValue:b,variations:u,onChange:j,MenuItemAction:d?S:void 0})},containerClassName:"variationSelectorContainer",children:(0,o.jsxs)(l.zx,{sx:(0,i.Z)({},n),variant:"dropDownButton",onClick:function(){return x(!m)},disabled:v,children:[b.name," ",m?(0,o.jsx)(c.bOz,{size:"16px","aria-label":"Collapse variations"}):(0,o.jsx)(c.mEq,{size:"16px","aria-label":"Expand variations"})]})})})}},25474:function(e,n,t){"use strict";function i(e){var n=e.lib,t=e.sliceName,i=e.variationId,o=e.options,r=void 0===o?{}:o,a=e.isSimulator,l="/[lib]/[sliceName]/[variation]".concat(a?"/simulator":""),s="/".concat(n,"/").concat(t,"/").concat(i).concat(a?"/simulator":"");return{href:l,as:s,options:r,all:[l,s,r]}}t.d(n,{P:function(){return i}})},18363:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return eS}});var i=t(52322),o=t(97729),r=t.n(o),a=t(62230),l=t(71651),s=t(2784),u=t(57282),c=t(65077),d=t(75289),f=t(47560),p=t(38876),v=t(96377),h=t(4092),m=t(2353),x=t(44384),y=t(90374),b=t(53559),g=function(e){var n=e.variation,t=(0,y.Z)(),o=t.addSliceWidget,r=t.replaceSliceWidget,a=t.reorderSliceWidget,l=t.removeSliceWidget,s=t.updateSliceWidgetMock,u=t.deleteSliceWidgetMock,c=function(e){return function(t){u(n.id,e,t),l(n.id,e,t)}},g=function(e){return function(t){var i=t.apiId,o=t.newKey,a=t.value,l=t.mockValue;l?s(n.id,e,i,o,l):u(n.id,e,o),r(n.id,e,i,o,a)}},j=function(e){return function(t){var i=t.id,r=t.label,a=t.widgetTypeName,l=m[a];l||console.log('Could not find widget with type name "'.concat(a,'". Please contact us!')),o(n.id,e,i,l.create(r))}},S=function(e){return function(t){var i,o;(0,f.uS)(t)||a(n.id,e,t.source.index,null!==(o=null===(i=t.destination)||void 0===i?void 0:i.index)&&void 0!==o?o:void 0)}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v.Z,{zoneType:"slice",tabId:void 0,title:"Non-Repeatable Zone",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:h.Z,widgetsArray:x.Z,onDeleteItem:c(b.Rt.Primary),onSave:g(b.Rt.Primary),onSaveNewField:j(b.Rt.Primary),onDragEnd:S(b.Rt.Primary),poolOfFieldsToCheck:n.primary||[],renderHintBase:function(e){var n=e.item;return"slice.primary".concat((0,p.Ti)(n.key))},renderFieldAccessor:function(e){return"slice.primary".concat((0,p.Ti)(e))},dataCy:"slice-non-repeatable-zone",isRepeatableCustomType:void 0}),(0,i.jsx)(d.xu,{mt:4}),(0,i.jsx)(v.Z,{zoneType:"slice",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:x.Z,fields:n.items,EditModal:h.Z,onDeleteItem:c(b.Rt.Items),onSave:g(b.Rt.Items),onSaveNewField:j(b.Rt.Items),onDragEnd:S(b.Rt.Items),poolOfFieldsToCheck:n.items||[],renderHintBase:function(e){var n=e.item;return"item".concat((0,p.Ti)(n.key))},renderFieldAccessor:function(e){return"slice.items[i]".concat((0,p.Ti)(e))},dataCy:"slice-repeatable-zone",isRepeatableCustomType:void 0})]})},j=t(54132),S=t(39295),k=t(61931),C=t(84449),w=t(47731),T=t(56577),Z=t(951),R=t(33710),E=function(){return(0,i.jsx)(S.X,{children:(0,i.jsx)(R.Z,{clickable:!0,place:"bottom",effect:"solid",delayHide:500,id:"update-screenshot-button-tooltip",children:"Save your work in order to update the screenshot"})})},I=function(e){var n,t=e.component,o=e.variation,r=e.isTouched,a=t.screenshots,l=(0,w.H)().openScreenshotsModal;return(0,i.jsxs)(d.xu,{children:[(0,i.jsx)(j.Z,{bg:"headSection",bodySx:{p:0},Footer:function(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.kC,{"data-tip":!0,"data-tip-disable":!1,"data-for":"update-screenshot-button-tooltip",sx:{width:"fit-content"},children:(0,i.jsx)(T.z,{onClick:l,variant:"secondarySmall",sx:{fontWeight:"bold"},Icon:Z.rJU,iconFill:"#1A1523",label:"Update screenshot",disabled:r})}),r&&(0,i.jsx)(E,{})]})},footerSx:{padding:2},sx:{overflow:"hidden"},children:(0,i.jsx)(k.q,{src:null===(n=a[o.id])||void 0===n?void 0:n.url,sx:{height:"198px",borderBottom:function(e){var n;return"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.borders)},borderRadius:"4px 4px 0 0"}})}),(0,i.jsx)(C.Z,{slices:[t],defaultVariationSelector:{sliceID:t.model.id,variationID:o.id}})]})},L=t(81541),A=t(22710),F=t(85244),N=t(99267),O=t(55658),z=t(63397),V=t(25812),P=function(e){var n=e.children,t=e.FooterContent,o=e.HeaderContent,r=e.close,l=e.sx,s=e.headerSx,u=void 0===s?{}:s;return(0,i.jsx)(j.Z,{borderFooter:!0,footerSx:{p:0},bodySx:{pt:2,pb:4,px:4},sx:(0,a.Z)({border:"none"},void 0===l?{}:l),Header:function(e){var n=e.radius;return(0,i.jsxs)(d.kC,{sx:(0,a.Z)({p:3,pl:4,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n,borderBottom:function(e){var n;return"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.borders)}},u),children:[o,r?(0,i.jsx)(d.x8,{onClick:r,type:"button"}):null]})},Footer:t?(0,i.jsxs)(d.kC,{sx:{alignItems:"space-between",bg:"headSection",p:3},children:[(0,i.jsx)(d.xu,{sx:{ml:"auto"}}),t]}):null,children:n})},_=t(36131),M=function(e){var n=e.msg;return(0,i.jsx)(d.xv,{as:"span",sx:{fontSize:12,color:"error",mt:"5px",ml:2},children:n||"Error!"})},D=function(e){var n=e.isOpen,t=e.onClose,o=e.onSubmit,r=e.initialVariation,l=e.variations,u=function(e){var n=e.id,t=e.name,i=e.origin,o=n&&n.length?null:{id:"Required!"},r=l.find(function(e){return e.id===n})?{id:"This id already exists!"}:null,s=t&&t.length?null:{name:"Required!"},u=i.value.length&&l.find(function(e){return e.id===i.value})?null:{id:"Yuu must select an existing variation!"},c=n&&n.length&&!/^[A-Za-z0-9]+([A-Za-z0-9]+)*$/.exec(n)&&{id:"No special characters allowed"};return(0,a.Z)({},o,r,s,u,c)},c=function(e){j(O.e.generateId(e))},f=function(e){Z(e),k&&c(e)},p=function(e){C(!1),c(e)},v=function(){h(),t()},h=function(){j(""),Z(""),y({}),C(!0),I({value:r.id,label:r.name})},m=(0,s.useState)({}),x=m[0],y=m[1],b=(0,s.useState)(""),g=b[0],j=b[1],S=(0,s.useState)(!0),k=S[0],C=S[1],w=(0,s.useState)(""),T=w[0],Z=w[1],R=(0,s.useState)({value:r.id,label:r.name}),E=R[0],I=R[1];function L(){return D.apply(this,arguments)}function D(){return(D=(0,A.Z)(function(){var e,n;return(0,N.__generator)(this,function(t){return Object.keys(e=u({id:g,name:T,origin:E})).length?y(e):(n=l.find(function(e){return e.id===E.value}))&&(o(g,T,n),v()),[2]})})).apply(this,arguments)}return(0,s.useEffect)(function(){h()},[r,n]),(0,i.jsx)(V.Z,{isOpen:n,shouldCloseOnOverlayClick:!0,onRequestClose:function(){return v()},contentLabel:"Widget Form Modal",style:{content:{maxWidth:"700px"}},children:(0,i.jsx)(z.J9,{initialValues:{id:g,name:T,origin:E},onSubmit:L,children:(0,i.jsx)(z.l0,{id:"variation-add",onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),L())},children:(0,i.jsx)(d.xu,{children:(0,i.jsxs)(P,{sx:{textAlign:"left"},HeaderContent:(0,i.jsx)(d.xv,{as:"h2",children:"Add new Variation"}),FooterContent:(0,i.jsxs)(d.kC,{sx:{justifyContent:"flex-end"},children:[(0,i.jsx)(d.zx,{onClick:v,mr:2,variant:"secondary",children:"Cancel"}),(0,i.jsx)(d.zx,{type:"submit",children:"Submit"})]}),close:v,children:[(0,i.jsxs)(d.xu,{sx:{pb:4,mt:4},children:[(0,i.jsxs)(d.__,{htmlFor:"name",sx:{mb:1},children:["Variation name*",x.name?(0,i.jsx)(M,{msg:x.name}):""]}),(0,i.jsx)(z.gN,{autoComplete:"off",id:"name",name:"name",placeholder:"e.g. Grid - With Icon",as:d.II,maxLength:30,value:T,onChange:function(e){return f(e.currentTarget.value)}}),(0,i.jsx)(d.xv,{children:"It will appear here in Slice Machine, and in the page editor in Prismic"})]}),(0,i.jsxs)(d.xu,{sx:{pb:4},children:[(0,i.jsxs)(d.__,{htmlFor:"id",sx:{mb:1},children:["Variation ID*",x.id?(0,i.jsx)(M,{msg:x.id}):""]}),(0,i.jsx)(z.gN,{autoComplete:"off",id:"id",name:"id",placeholder:"e.g. GridWithIcon",as:d.II,maxLength:30,value:g,onChange:function(e){return p(e.currentTarget.value)}}),(0,i.jsx)(d.xv,{children:"It's generated automatically based on the variation name and will appear in the API responses."})]}),(0,i.jsxs)(d.xu,{sx:{pb:4},children:[(0,i.jsx)(d.__,{htmlFor:"origin",sx:{mb:1},children:"Duplicate from"}),(0,i.jsx)(_.ZP,{name:"origin",options:l.map(function(e){return{value:e.id,label:e.name}}),onChange:function(e){e&&I(e)},defaultValue:E,maxMenuHeight:150,theme:function(e){return(0,F.Z)((0,a.Z)({},e),{colors:(0,F.Z)((0,a.Z)({},e.colors),{text:"text",primary:"background"})})}})]})]})})})})})},W=t(5632),H=t(25474),K=t(38986),q=function(e){var n,t=e.component,o=e.variation,r=(0,W.useRouter)(),a=(0,s.useState)(!1),l=a[0],u=a[1],c=(0,y.Z)().copyVariationSlice;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(d.kC,{children:[(0,i.jsx)(K.Z,{defaultValue:o,variations:t.model.variations,onNewVariation:function(){return u(!0)},onChange:function(e){(n=r).push.apply(n,(0,L.Z)(H.P({lib:t.href,sliceName:t.model.name,variationId:e.id}).all))}}),(0,i.jsx)(d.xu,{ml:2,children:(0,i.jsxs)(d.xv,{variant:"xs",children:["Variation id : ",o.id]})})]}),(0,i.jsx)(D,{isOpen:l,onClose:function(){return u(!1)},onSubmit:function(e,n,i){c(e,n,i),r.push.apply(r,(0,L.Z)(H.P({lib:t.href,sliceName:t.model.name,variationId:e}).all))},initialVariation:o,variations:t.model.variations})]})},B=t(56580),J=t(25251),X=t(75329),G=t(42189),Q=t(17036),U=t(82770),Y=t(18125),$=function(){return(0,i.jsx)(S.X,{children:(0,i.jsxs)(R.Z,{clickable:!0,place:"bottom",effect:"solid",delayHide:500,id:"simulator-button-tooltip",children:[(0,i.jsx)(d.xv,{as:"b",children:"Framework not supported"}),(0,i.jsx)(d.xv,{as:"p",children:"Slice Simulator does not support your framework yet."})]})})},ee=function(e){var n=e.children,t=e.open,o=e.onClose;return(0,i.jsxs)(Y.zs,{open:t,trigger:n,onClose:o,children:[(0,i.jsx)(Y.Ev,{children:"Simulate your slices"}),(0,i.jsx)(Y.LB,{component:"video",cloudName:"dmtf1daqp",loop:!1,autoPlay:!1,publicId:X.Sn,poster:"/simulator-video-thumbnail.png",controls:!0,onPlay:function(){U.Xe.track({event:"open-video-tutorials",video:X.Sn})}}),(0,i.jsx)(Y.OJ,{children:"Minimize context-switching by previewing your Slice components in the simulator."}),(0,i.jsx)(Y.Rp,{children:"Got It"})]})},en=function(){return(0,i.jsx)(S.X,{children:(0,i.jsx)(R.Z,{clickable:!0,place:"bottom",effect:"solid",delayHide:500,id:"simulator-button-tooltip",children:"Save your work in order to simulate"})})},et=function(e){var n=e.isSimulatorAvailableForFramework,t=e.isTouched,o=(0,W.useRouter)(),r=(0,s.useRef)(null),a=(0,y.Z)().setSeenSimulatorToolTip,u=(0,B.v9)(function(e){return{hasSeenSimulatorTooltip:(0,Q.bv)(e),hasSeenTutorialsToolTip:(0,Q.ER)(e)}}),c=u.hasSeenSimulatorTooltip,d=u.hasSeenTutorialsToolTip;(0,s.useEffect)(function(){var e=r.current;e&&n&&!c&&d&&setTimeout(function(){return R.Z.show(e)},5e3)},[n,c,d,]);var f=function(){if(a(),r.current){var e=r.current;R.Z.hide(e)}},p=n&&!c&&d;return(0,i.jsxs)("span",{"data-tip":!0,"data-tip-disable":!1,"data-for":"simulator-button-tooltip",ref:r,children:[(0,i.jsx)(ee,{open:p,onClose:f,children:(0,i.jsx)(l.zx,{"data-tip":!0,"data-testid":"simulator-open-button",onClick:function(){f(),window.open("".concat(o.asPath,"/simulator"),X.pq)},disabled:!n||t,renderStartIcon:function(){return(0,i.jsx)(G.z,{color:l.TV.color.greyLight11,height:l.TV.size[24],style:{transform:"scale(calc(4 / 3))"},width:l.TV.size[24]})},variant:"secondary",children:"Simulate"})}),!1===n?(0,i.jsx)($,{}):n&&!1===p&&t?(0,i.jsx)(en,{}):null]})},ei=t(17329),eo=t(40147);function er(e){return ea.apply(this,arguments)}function ea(){return(ea=(0,A.Z)(function(e){var n,t,i;return(0,N.__generator)(this,function(o){switch(o.label){case 0:return[4,eo.j.customTypes.readCustomType({id:e})];case 1:if(t=(n=o.sent()).errors,i=n.model,t.length>0)throw t;return[2,i]}})})).apply(this,arguments)}var el=t(67445),es=t(64722),eu=t(20812),ec=function(e){return(0,i.jsxs)("svg",(0,F.Z)((0,a.Z)({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"})]}))},ed=function(){var e,n,t=(e=(0,es.l)().source,n=(0,el.Ag)(e.query),void 0!==n&&(0,el.ne)(e.asPath,n)?n:void 0);return void 0!==t?(0,i.jsx)(l.SV,{children:(0,i.jsx)(s.Suspense,{children:(0,i.jsx)(l.xu,{bottom:32,justifyContent:"center",position:"fixed",right:0,width:"100vw",children:(0,i.jsx)(ef,{sourceCustomTypeId:t})})})}):null},ef=function(e){var n,t=(n=e.sourceCustomTypeId,(0,ei.QT)(er,[n])),o=(0,s.useState)(!0),r=o[0],a=o[1],u=(0,W.useRouter)();if(void 0===t||!r)return null;var c=t.format,d=t.id,f=el.cd[c].getBuilderPagePathname(d);return(0,i.jsxs)(l.hE,{density:"compact",variant:"tertiary",children:[(0,i.jsxs)(l.zx,{onClick:function(){u.push(f)},renderStartIcon:function(){return(0,i.jsx)(ec,{})},children:["Return to ",t.label]}),(0,i.jsx)(l.zx,{onClick:function(){a(!1)},renderStartIcon:function(){return(0,i.jsx)(eu.T,{})}})]})},ep=t(39092),ev=t(92521),eh=t(75992),em=t(71685),ex={imageLoading:!1,loading:!1,done:!1,error:null,status:null},ey=function(e){var n=e.slice,t=e.variation,o=(0,y.Z)(),r=o.openToaster,a=o.updateSlice,l=(0,B.v9)(function(e){return{isTouched:(0,ev.sY)(e,n.from,n.model.id),remoteSlice:(0,eh.O_)(e,n.model.id)}}),c=l.isTouched,d=l.remoteSlice,f=(0,s.useState)(ex),p=f[0],v=f[1];return((0,s.useEffect)(function(){c&&v(ex)},[c]),(0,s.useEffect)(function(){if(p.done){var e,n;n=p,n.done&&r(n.message,n.error?u.Jf.ERROR:n.warning?u.Jf.WARNING:u.Jf.SUCCESS)}},[p]),t)?(0,i.jsx)(eb,{updateSlice:a.bind(null,n,v),slice:n,variation:t,remoteSlice:d,isTouched:c,data:p}):(0,i.jsx)(J.LN,{})},eb=function(e){var n=e.updateSlice,t=e.slice,o=e.variation,r=e.remoteSlice,s=e.isTouched,u=e.data,f=(0,B.v9)(function(e){return{isSimulatorAvailableForFramework:(0,ep.Ql)(e)}}).isSimulatorAvailableForFramework,p=(0,a.Z)({local:t.model,localScreenshots:t.screenshots},r?{remote:r}:{}),v=(0,em.J)({slices:[p]}).modelsStatuses;return(0,i.jsxs)(J.LN,{children:[(0,i.jsxs)(J.wd,{children:[(0,i.jsx)(J.Xq,{url:"/slices"}),(0,i.jsx)(J.Cx,{folder:"Slices",page:t.model.name}),(0,i.jsxs)(J.K2,{children:[(0,i.jsx)(et,{isSimulatorAvailableForFramework:f,isTouched:!!s}),(0,i.jsx)(l.zx,{loading:u.loading,disabled:!s||u.loading,onClick:n,"data-cy":"builder-save-button",children:"Save"})]})]}),(0,i.jsxs)(J.RN,{children:[(0,i.jsxs)(c.xR,{children:[(0,i.jsx)(q,{component:t,status:v.slices[t.model.id],variation:o,imageLoading:u.imageLoading}),(0,i.jsxs)(d.rj,{columns:"1fr 320px",gap:"16px",sx:{pt:4},children:[(0,i.jsx)(d.xu,{children:(0,i.jsx)(g,{variation:o})}),(0,i.jsx)(I,{component:t,variation:o,isTouched:s})]})]}),(0,i.jsx)(ed,{})]})]})},eg=t(28684),ej=(0,t(57880).y)(ey);function eS(){var e=(0,eg.Z)().slice;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r(),{children:e?(0,i.jsxs)("title",{children:[e.model.name," - Slice Machine"]}):null}),(0,i.jsx)(ej,{})]})}},28684:function(e,n,t){"use strict";var i=t(92521),o=t(90374),r=t(5632),a=t(2784),l=t(56580),s=function(){var e=(0,r.useRouter)(),n=(0,o.Z)().initSliceStore,t=(0,l.v9)(function(n){return{slice:(0,i.tL)(n,e.query.lib,e.query.sliceName)}}).slice;if((0,a.useEffect)(function(){t?n(t):e.replace("/")},[n,t,e]),!t)return{};var s=t.model.variations.find(function(n){return n.id===e.query.variation});return s?{slice:t,variation:s}:(e.replace("/"),{})};n.Z=s},57880:function(e,n,t){"use strict";t.d(n,{y:function(){return l}});var i=t(62230),o=t(52322);t(2784);var r=t(28684),a=t(95583),l=function(e){return function(n){var t=n.pageProps,l=(0,r.Z)(),s=l.slice,u=l.variation;return s&&u?(0,o.jsx)(e,(0,i.Z)({slice:s,variation:u},t)):((0,a.gx)("/"),null)}}},76473:function(e,n,t){"use strict";t.d(n,{y1:function(){return g}});var i=t(2784);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e}).apply(this,arguments)}t(52322);var r=["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,n){return void 0===n&&(n=","),e.split(n)}function u(e,n,t){void 0===n&&(n="+");var i,a=e.toLocaleLowerCase().split(n).map(function(e){return l(e)});return o({},{alt:a.includes("alt"),ctrl:a.includes("ctrl")||a.includes("control"),shift:a.includes("shift"),meta:a.includes("meta"),mod:a.includes("mod")},{keys:a.filter(function(e){return!r.includes(e)}),description:t})}"undefined"!=typeof document&&(document.addEventListener("keydown",function(e){void 0!==e.key&&f([l(e.key),l(e.code)])}),document.addEventListener("keyup",function(e){void 0!==e.key&&p([l(e.key),l(e.code)])})),"undefined"!=typeof window&&window.addEventListener("blur",function(){c.clear()});var c=new Set;function d(e){return Array.isArray(e)}function f(e){var n=Array.isArray(e)?e:[e];c.has("meta")&&c.forEach(function(e){var n;return!r.includes(e)&&c.delete(e.toLowerCase())}),n.forEach(function(e){return c.add(e.toLowerCase())})}function p(e){var n=Array.isArray(e)?e:[e];"meta"===e?c.clear():n.forEach(function(e){return c.delete(e.toLowerCase())})}function v(e,n){var t=e.target;void 0===n&&(n=!1);var i=t&&t.tagName;return d(n)?Boolean(i&&n&&n.some(function(e){return e.toLowerCase()===i.toLowerCase()})):Boolean(i&&n&&!0===n)}var h=function(e,n,t){void 0===t&&(t=!1);var i,o,r=n.alt,a=n.meta,s=n.mod,u=n.shift,f=n.ctrl,p=n.keys,v=e.key,h=e.code,m=e.ctrlKey,x=e.metaKey,y=e.shiftKey,b=e.altKey,g=l(h),j=v.toLowerCase();if(!t){if(!b===r&&"alt"!==j||!y===u&&"shift"!==j)return!1;if(s){if(!x&&!m)return!1}else if(!x===a&&"meta"!==j&&"os"!==j||!m===f&&"ctrl"!==j&&"control"!==j)return!1}return!!(p&&1===p.length&&(p.includes(j)||p.includes(g)))||(p?(void 0===o&&(o=","),(d(i=p)?i:i.split(o)).every(function(e){return c.has(e.trim().toLowerCase())})):!p)},m=(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()},b="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;function g(e,n,t,o){var r,a,c=(0,i.useRef)(null),g=(0,i.useRef)(!1),j=t instanceof Array?o instanceof Array?void 0:o:t,S=d(e)?e.join(null==j?void 0:j.splitKey):e,k=t instanceof Array?t:o instanceof Array?o:void 0,C=(0,i.useCallback)(n,null!=k?k:[]),w=(0,i.useRef)(C);k?w.current=C:w.current=n;var T=(!function e(n,t){return n&&t&&"object"==typeof n&&"object"==typeof t?Object.keys(n).length===Object.keys(t).length&&Object.keys(n).reduce(function(i,o){return i&&e(n[o],t[o])},!0):n===t}((a=(0,i.useRef)(void 0)).current,j)&&(a.current=j),a.current),Z=(0,i.useContext)(x).enabledScopes,R=(0,i.useContext)(m);return b(function(){if((null==T?void 0:T.enabled)!==!1&&(e=Z,n=null==T?void 0:T.scopes,0===e.length&&n?(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):!!(!n||e.some(function(e){return n.includes(e)})||e.includes("*")))){var e,n,t=function(e,n){var t,i;if(void 0===n&&(n=!1),!(v(e,["input","textarea","select"])&&!v(e,null==T?void 0:T.enableOnFormTags)||null!=T&&null!=T.ignoreEventWhen&&T.ignoreEventWhen(e))){if(null!==c.current&&document.activeElement!==c.current&&!c.current.contains(document.activeElement)){y(e);return}(null==(t=e.target)||!t.isContentEditable||null!=T&&T.enableOnContentEditable)&&s(S,null==T?void 0:T.splitKey).forEach(function(t){var i,o,r,a,l,s,c,d=u(t,null==T?void 0:T.combinationKey);if(h(e,d,null==T?void 0:T.ignoreModifiers)||null!=(c=d.keys)&&c.includes("*")){if(n&&g.current)return;if(i=e,o=d,("function"==typeof(r=null==T?void 0:T.preventDefault)&&r(i,o)||!0===r)&&i.preventDefault(),a=e,l=d,"function"==typeof(s=null==T?void 0:T.enabled)?!s(a,l):!0!==s&&void 0!==s){y(e);return}w.current(e,d),n||(g.current=!0)}})}},i=function(e){void 0!==e.key&&(f(l(e.code)),((null==T?void 0:T.keydown)===void 0&&(null==T?void 0:T.keyup)!==!0||null!=T&&T.keydown)&&t(e))},o=function(e){void 0!==e.key&&(p(l(e.code)),g.current=!1,null!=T&&T.keyup&&t(e,!0))},r=c.current||(null==j?void 0:j.document)||document;return r.addEventListener("keyup",o),r.addEventListener("keydown",i),R&&s(S,null==T?void 0:T.splitKey).forEach(function(e){return R.addHotkey(u(e,null==T?void 0:T.combinationKey,null==T?void 0:T.description))}),function(){r.removeEventListener("keyup",o),r.removeEventListener("keydown",i),R&&s(S,null==T?void 0:T.splitKey).forEach(function(e){return R.removeHotkey(u(e,null==T?void 0:T.combinationKey,null==T?void 0:T.description))})}}},[S,T,Z]),c}}},function(e){e.O(0,[789,909,573,377,774,888,179],function(){return e(e.s=45662)}),_N_E=e.O()}]);