PageSourceSearch

http://youthrobber.com/js/main-422afc9b.81d3d3978ab7ec1c03ea.js

js youthrobber.com collected 2026-09-27 04:43:46 UTC 135,649 bytes, 1 lines download raw bytes

1try{let n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new n.Error).stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="38977aa7-ad75-4204-9be6-5c9a1e42cea4",n._sentryDebugIdIdentifier="sentry-dbid-38977aa7-ad75-4204-9be6-5c9a1e42cea4")}catch(n){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"daf6a27e7f2ea27e2ec131f1f0ebdf4d54ea2de9"};(self.webpackChunkpostcards_ui=self.webpackChunkpostcards_ui||[]).push([[4924],{52598:(n,e,t)=>{t.d(e,{A:()=>s});t(96540);var r,o,i,a=t(38267),l=t(74848);function u(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var c=a.Ay.div(r||(r=u(["\n    display: flex;\n    flex-direction: column;\n    // gap: 5px;\n    padding: 10px;\n\n    ","\n\n    ","\n"])),(function(n){var e=n.$padding;return e&&(0,a.AH)(o||(o=u(["\n        padding: ",";\n    "])),e)}),(function(n){var e=n.$margin;return e&&(0,a.AH)(i||(i=u(["\n        margin: ",";\n    "])),e)}));const s=function(n){var e=n.children,t=n.padding,r=n.margin;return(0,l.jsx)(c,{$padding:t,$margin:r,children:e})}},11299:(n,e,t)=>{t.d(e,{A:()=>s});t(96540);var r,o,i,a=t(38267),l=t(74848);function u(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var c=a.Ay.div(r||(r=u(["\n    height: 1px;\n    background-color: ",";\n    margin: 0 -15px;\n\n    ","\n\n    ","\n"])),(function(n){return n.$color||"#2A3539"}),(function(n){var e=n.$margin;return e&&(0,a.AH)(o||(o=u(["\n        margin: ",";\n    "])),e)}),(function(n){return n.$hide&&(0,a.AH)(i||(i=u(["\n        display: none;\n    "])))}));const s=function(n){return(0,l.jsx)(c,{$margin:n.margin,$color:n.color,$hide:n.hide})}},36967:(n,e,t)=>{t.d(e,{A:()=>M});var r,o,i,a,l,u,c,s,d,f,p,v,h=t(96540),m=t(38267),y=t(52598),g=t(11299),b=t(19694),x=t(74848);function w(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return j(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?j(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function k(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var S=(0,m.AH)(r||(r=k(["\n    background: #2198ED;\n    color: #ffffff;\n\n    svg, span {\n        color: #ffffff;\n    }\n"]))),A=m.Ay.div(o||(o=k(["\n    position: relative;\n\n    & > .pc-tooltip {\n        width: 290px;\n    }\n\n    .pc-tooltip-text {\n        white-space: normal;\n    }\n\n    &:hover > .pc-tooltip {\n        opacity: 1;\n        visibility: visible;\n    }\n\n    ","\n\n    & > div:not(.pc-tooltip),\n    & > a {\n        cursor: pointer;\n        display: flex;\n        align-items: center;\n        gap: 10px;\n        border-radius: 6px;\n        transition: all 0.15s;\n        text-decoration: none;\n        padding: 8px 10px;\n        // margin: 0 -5px;\n\n        :hover {\n            ","\n            ","\n        }\n\n        ","\n    }\n    \n    ","\n"])),(function(n){return n.$disabled&&(0,m.AH)(i||(i=k(["\n        cursor: not-allowed;\n\n        & > div:not(.pc-tooltip),\n        & > a {\n            pointer-events: none;\n            opacity: 0.5;\n        }\n    "])))}),S,(function(n){var e=n.$useHover,t=n.$active,r=n.$isLightMode;return e&&!t&&(0,m.AH)(a||(a=k(["\n                background: ",";\n\n                span {\n                    color: ",";\n                }\n\n                svg, span > div {\n                    color: #AAB2BB;\n                }\n            "])),r?"#E8ECF0":"#2D3A41",r?"#2D3A41":"#FFFFFF")}),(function(n){return n.$active&&S}),(function(n){return n.$submenuVisible&&(0,m.AH)(l||(l=k(["\n        & >
1 div:not(.pc-tooltip),\n        & > a {\n            ","\n        }\n    "])),S)})),C=m.Ay.div(u||(u=k([""]))),O=m.Ay.a(c||(c=k([""]))),L=m.Ay.span(s||(s=k(["\n    width: 20px;\n    height: 20px;\n    flex-shrink: 0;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    color: #AAB2BB;\n    \n    svg {\n        color: #AAB2BB;\n        transition: all 0.15s;\n    }\n\n    ","\n"])),(function(n){return n.$isRight&&(0,m.AH)(d||(d=k(["\n        justify-content: flex-end;\n    "])))})),P=m.Ay.span(f||(f=k(["\n    color: ",';\n    font-family: "Fira Sans";\n    font-size: 13px;\n    font-style: normal;\n    font-weight: 400;\n    line-height: normal;\n    flex: 1;\n    flex-shrink: 0;\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n'])),(function(n){return n.$isLightMode?"#2D3A41":"#ffffff"})),E=m.Ay.div(p||(p=k(["\n    position: absolute;\n    top: -9px;\n    left: 100%;\n    z-index: 10;\n    border: none;\n    outline: none;\n    padding-left: 10px;\n    visibility: hidden;\n    opacity: 0;\n    pointer-events: none;\n    transition: opacity 0.15s, visibility 0.15s;\n\n    ","\n    \n    & > div {\n        background: #071C26;\n        border-radius: 0 10px 10px 0;\n        border-bottom: 1px solid #2A3539;\n        outline: none;\n        box-shadow: rgba(169, 179, 187, 0.5) 0px 0px 2px 0px, rgba(0, 46, 83, 0.1) 0px 4px 15px 0px;\n        min-width: 240px;\n    }\n"])),(function(n){return n.$visible&&(0,m.AH)(v||(v=k(["\n        visibility: visible;\n        opacity: 1;\n        pointer-events: auto;\n    "])))}));const M=function(n){var e=n.href,t=n.title,r=n.active,o=n.leftIcon,i=n.disabled,a=n.useHover,l=n.rightIcon,u=n.isLightMode,c=n.onClick,s=n.renderLabel,d=n.submenu,f=n.closeMenu,p=n.dataTestId,v=n.tooltip,m=e?O:C,j=w((0,h.useState)(!1),2),k=j[0],S=j[1],M=(0,h.useRef)(null);return Array.isArray(d)&&d.length>0?(0,x.jsxs)("div",{style:{position:"relative"},onMouseEnter:function(){i||(M.current&&(window.clearTimeout(M.current),M.current=null),M.current=window.setTimeout((function(){S(!0)}),150))},onMouseLeave:function(){M.current&&(window.clearTimeout(M.current),M.current=null),S(!1)},children:[(0,x.jsxs)(A,{$active:r,$disabled:i,$useHover:a,$isLightMode:u,$submenuVisible:k,"data-test-id":p,children:[(0,x.jsxs)(m,{href:e,target:"_blank",children:[o&&(0,x.jsx)(L,{children:o}),s?s():(0,x.jsx)(P,{$isLightMode:u,children:t}),l&&(0,x.jsx)(L,{$isRight:!0,children:l})]}),v&&(0,x.jsx)(b.m,{className:"",position:"right-center",text:v})]}),(0,x.jsx)(E,{className:"submenu",$visible:k,children:(0,x.jsx)(y.A,{children:d.map((function(n,e){var t=n.href?O:C;return(0,x.jsxs)(h.Fragment,{children:[n.withDivider&&(0,x.jsx)(g.A,{margin:"10px -10px"}),(0,x.jsx)(A,{$active:n.active,$disabled:n.disabled,$useHover:n.useHover,$isLightMode:n.isLightMode,onClick:n.disabled?void 0:function(e){e.stopPropagation(),n.onClick(e),f&&f()},"data-test-id":n.dataTestId,children:(0,x.jsxs)(t,{href:n.href,target:"_blank",children:[n.leftIcon&&(0,x.jsx)(L,{children:n.leftIcon}),n.renderLabel?n.renderLabel():(0,x.jsx)(P,{$isLightMode:n.isLightMode,children:n.title}),n.rightIcon&&(0,x.jsx)(L,{$isRight:!0,children:n.rightIcon})]})})]},"".concat(n.title,"-").concat(e))}))})})]}):(0,x.jsxs)(A,{$active:r,$disabled:i,$useHover:a,$isLightMode:u,onClick:i?void 0:c,"data-test-id":p,children:[(0,x.jsxs)(m,{href:e,target:"_blank",children:[o&&(0,x.jsx)(L,{children:o}),s?s():(0,x.jsx)(P,{$isLightMode:u,children:t}),l&&(0,x.jsx)(L,{$isRight:!0,children:l})]}),v&&(0,x.jsx)(b.m,{className:"",position:"right-center",text:v})]})}},96751:(n,e,t)=>{t.d(e,{A:()=>g});var r,o,i,a,l=t(96540),u=t(38267),c=t(74848);function s(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var d=u.Ay.div(r||(r=s(["\n    font-family: 'Fira Sans';\n    font-style: normal;\n    font-weight: 500;\n    font-size: 13px;\n    line-height: 16px;\n    display: flex;\n    align-items: center;\n    margin-left: 14px;\n    margin-top: 9px;\n    gap: 10px;\n\n    svg {\n        flex-shrink: 0;\n    }\n"]))),f=u.Ay.div(o||(o=s(["\n    display: flex;\n    gap: 10px;
1\n    align-items: center;\n    margin-bottom: 16px;\n    margin-right: 17px;\n    cursor: pointer;\n    font-family: 'Fira Sans';\n    font-style: normal;\n    font-weight: 400;\n    font-size: 13px;\n    line-height: 16px;    \n    ",";\n\n    svg {\n        flex-shrink: 0;\n    }\n\n    :hover {\n        color: #2198ED\n    }\n"])),(function(n){return n.active&&"color: #2198ED"})),p=u.Ay.div(i||(i=s(["\n    min-width: 0;\n    flex-grow: 1;\n    display: flex;\n    position: relative;\n\n    span {\n        white-space: nowrap;\n        text-overflow: ellipsis;\n        overflow: hidden;\n    }\n"]))),v=u.Ay.div(a||(a=s(["\n    margin-left: ",";\n    margin-bottom: 15px;\n    margin-top: 14px;\n"])),(function(n){return n.hasFolder?"40px":"14px"})),h=function(){return(0,c.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)("path",{d:"M1 3V13C1 13.6 1.4 14 2 14H14C14.6 14 15 13.6 15 13V5C15 4.4 14.6 4 14 4H8V3C8 2.4 7.5 2 7 2H2C1.4 2 1 2.4 1 3Z",stroke:"#AAB2BB",strokeWidth:"2",strokeMiterlimit:"10"})})},m=function(){return(0,c.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,c.jsx)("path",{d:"M13 15H2C1.4 15 1 14.6 1 14V2C1 1.4 1.4 1 2 1H13C13.6 1 14 1.4 14 2V14C14 14.6 13.6 15 13 15Z",stroke:"#AAB2BB",strokeWidth:"2",strokeMiterlimit:"10",strokeLinejoin:"round"}),(0,c.jsx)("path",{d:"M4 5H11",stroke:"#AAB2BB",strokeWidth:"2",strokeMiterlimit:"10",strokeLinejoin:"round"}),(0,c.jsx)("path",{d:"M4 8H11",stroke:"#AAB2BB",strokeWidth:"2",strokeMiterlimit:"10",strokeLinejoin:"round"}),(0,c.jsx)("path",{d:"M4 11H8",stroke:"#AAB2BB",strokeWidth:"2",strokeMiterlimit:"10",strokeLinejoin:"round"})]})},y=function(){return(0,c.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)("path",{d:"M2 6L5.5 10L11 2",stroke:"#00A3EF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})};const g=function(n){return(0,c.jsx)(c.Fragment,{children:n.folders.map((function(e){return(0,c.jsxs)(l.Fragment,{children:[null!=e&&e.name?(0,c.jsxs)(d,{title:e.name,children:[(0,c.jsx)(h,{})," ",(0,c.jsx)(p,{children:(0,c.jsx)("span",{children:e.name})})]}):null,(0,c.jsx)(v,{hasFolder:!(null==e||!e.name),children:e.projects.map((function(e){var t=e.id===n.activeId;return(0,c.jsxs)(f,{onClick:function(){return n.onSelect(e.id)},active:t,title:e.name,children:[(0,c.jsx)(m,{})," ",(0,c.jsx)(p,{children:(0,c.jsx)("span",{children:e.name})})," ",t?(0,c.jsx)(y,{}):null]},e.id)}))})]},null==e?void 0:e.name)}))})}},31239:(n,e,t)=>{t.d(e,{A:()=>Hn});var r,o,i,a,l,u=t(96540),c=t(50472),s=t(5543),d=t(64251),f=t(54347),p=t(5203),v=t(38267),h=t(28771),m=t(91125),y=t(7901),g=t(7501),b=t(74848);function x(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var w,j,k,S,A,C,O,L,P,E,M,$=v.Ay.div(r||(r=x(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 12px 16px;\n  height: 51px;\n  border-radius: 8px;\n  background: #f6f6f6;\n  width: 100%;\n"]))),T=v.Ay.div(o||(o=x(["\n  font-size: 13px;\n  font-weight: 500;\n  line-height: 19.5px;\n  letter-spacing: 0px;\n  color: #788994;\n  margin-top: -3px;\n"]))),I=v.Ay.div(i||(i=x(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 6px;\n"]))),D=v.Ay.div(a||(a=x(["\n  font-size: 18px;\n  font-weight: 700;\n  line-height: 27px;\n  letter-spacing: -0.3px;\n  color: #071c26;\n  margin-top: -3px;\n"]))),F=v.Ay.div(l||(l=x(["\n  font-size: 13px;\n  font-weight: 500;\n  line-height: 19.5px;\n  letter-spacing: -0.33px;\n  color: #788994;
1\n"]))),B=function(n){return(0,b.jsxs)($,{children:[(0,b.jsx)(T,{children:"Current balance"}),(0,b.jsxs)(I,{children:[(0,b.jsx)(D,{children:(0,g.GZQ)(n.value)}),(0,b.jsx)(F,{children:"credits left"})]})]})};function R(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var z,W,G,H,U,_,N,Z,V,q,J,Y,K,X,Q="#2198ED",nn=v.Ay.div(w||(w=R(["\n  display: flex;\n  align-items: center;\n  padding: 14px 17px 15px 17px;\n  height: 80px;\n  border-radius: 8px;\n  background: #f6f6f6;\n  width: 100%;\n  gap: 12px;\n  cursor: pointer;\n  transition: all 0.2s;\n  outline: 2px solid transparent;\n  outline-offset: -2px;\n\n  &:hover {\n    outline: 2px solid ",";\n  }\n\n  ","\n"])),(function(n){return n.$color}),(function(n){return n.$isSelected&&(0,v.AH)(j||(j=R(["\n    outline: 2px solid ",";\n    background: ",";\n  "])),(function(n){return n.$color}),(function(n){return n.$background}))})),en=v.Ay.div(k||(k=R(["\n  width: 20px;\n  height: 20px;\n  border-radius: 50%;\n  outline: 2px solid #D0D0D8;\n  outline-offset: -2px;\n  position: relative;\n  transition: all 0.2s;\n\n  &:after {\n    content: '';\n    position: absolute;\n    inset: 5px;\n    background: transparent;\n    border-radius: 50%;\n    transition: all 0.2s;\n  }\n\n  ","\n"])),(function(n){return n.$isSelected&&(0,v.AH)(S||(S=R(["\n    outline-color: ",";\n\n    &:after {\n      background: ",";\n    }\n  "])),(function(n){return n.$color}),(function(n){return n.$color}))})),tn=v.Ay.div(A||(A=R(["\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 2px;\n  flex: 1;\n  margin-top: -2px;\n"]))),rn=v.Ay.div(C||(C=R(["\n  font-size: 18.2px;\n  font-weight: 700;\n  line-height: 27.3px;\n  letter-spacing: -0.3px;\n  color: #071c26;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 6px;\n"]))),on=v.Ay.div(O||(O=R(["\n  font-size: 12.1px;\n  font-weight: 600;\n  line-height: 18.2px;\n  letter-spacing: 0px;\n  color: #788994;\n  margin-top: 4px;\n"]))),an=v.Ay.div(L||(L=R(["\n  font-size: 11.1px;\n  font-weight: 500;\n  line-height: 16.7px;\n  letter-spacing: 0px;\n  color: #AAB2BB;\n  transition: all 0.2s;\n\n  ","\n"])),(function(n){return n.$isSelected&&(0,v.AH)(P||(P=R(["\n    color: ",";\n  "])),(function(n){return n.$color}))})),ln=v.Ay.div(E||(E=R(["\n  color: #071c26;\n  font-size: 20.2px;\n  font-weight: 700;\n  line-height: 30.3px;\n  letter-spacing: -0.303px;\n  margin-top: -2px;\n"]))),un=v.Ay.div(M||(M=R(["\n  color: ",";\n  leading-trim: both;\n  text-edge: cap;\n  font-size: 9px;\n  font-style: normal;\n  font-weight: 700;\n  line-height: 18px;\n  letter-spacing: 0.54px;\n  text-transform: uppercase;\n  width: 67px;\n  height: 16px;\n  background: ","17;\n  border-radius: 3px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-top: 3px;\n"])),(function(n){return n.$color}),(function(n){return n.$color})),cn=function(n){var e=n.pack,t=n.isSelected,r=n.onSelect,o=(100*e.price/e.value).toFixed(2);return(0,b.jsxs)(nn,{onClick:r,$isSelected:t,$background:"rgba(33, 152, 237, 0.04)",$color:Q,children:[(0,b.jsx)(en,{$isSelected:t,$color:Q}),(0,b.jsxs)(tn,{children:[(0,b.jsxs)(rn,{children:[(0,g.GZQ)(e.value),(0,b.jsx)(on,{children:"credits"}),e.isBestValue&&(0,b.jsx)(un,{$color:Q,children:"Best Value"})]}),(0,b.jsxs)(an,{$isSelected:t,$color:Q,children:["~$",o," per 100 credits"]})]}),(0,b.jsxs)(ln,{children:["$",e.price]})]})},sn=t(95791),dn=t(61225);function fn(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return pn(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?pn(n,e):void 0}}
1(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pn(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function vn(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var hn=v.Ay.div(z||(z=vn(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  gap: 26px;\n"]))),mn=v.Ay.div(W||(W=vn(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  gap: 15px;\n"]))),yn=v.Ay.div(G||(G=vn(["\n  font-size: 20px;\n  font-weight: 700;\n  line-height: 25px;\n  letter-spacing: -0.4px;\n  color: #071c26;\n  text-align: center;\n"]))),gn=v.Ay.div(H||(H=vn(["\n  font-size: 13px;\n  font-weight: 400;\n  line-height: 19.5px;\n  letter-spacing: 0px;\n  color: #2d3a41;\n  text-align: center;\n  margin-top: -5px;\n"]))),bn=v.Ay.div(U||(U=vn(["\n  font-size: 15px;\n  font-weight: 600;\n  letter-spacing: 0px;\n  color: #ffffff;\n  text-align: center;\n  width: 100%;\n  height: 50px;\n  border-radius: 8px;\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  overflow: hidden;\n  position: relative;\n\n  &:before {\n    content: '';\n    position: absolute;\n    inset: 0;\n    background: ",";\n    transition: all 0.2s;\n    z-index: -1;\n  }\n\n  &:hover:before {\n    filter: brightness(0.95);\n  }\n"])),(function(n){return n.$background})),xn=v.Ay.div(_||(_=vn(["\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n  width: 100%;\n  margin-top: -11px;\n"]))),wn=v.Ay.div(N||(N=vn(["\n  display: flex;\n  flex-direction: column;\n  gap: 13px;\n  width: 100%;\n  margin-top: -2px;\n"]))),jn=v.Ay.div(Z||(Z=vn(["\n  color: #9797a1;\n  text-align: center;\n  font-size: 12px;\n  font-style: normal;\n  font-weight: 400;\n  line-height: 18px;\n"]))),kn=v.Ay.a(V||(V=vn(['\n  display: flex;\n  align-items: center;\n  justify-content: flex-start;\n  gap: 18px;\n  width: 100%;\n  padding: 16px 22px;\n  border-radius: 8px;\n  /* Green marks the "change plan" action, distinct from the blue shared\n     by the credit packs and the Add button. Two accents total: blue to\n     buy credits, green to move up a plan. */\n  border: 2px solid rgba(26, 198, 88, 0.30);\n  background: linear-gradient(90deg, rgba(26, 198, 88, 0.09) 0%, rgba(38, 208, 124, 0.09) 100%);\n  text-align: left;\n  text-decoration: none;\n  cursor: pointer;\n  transition: border-color .15s ease-in-out, background .15s ease-in-out;\n\n  :hover {\n    border-color: rgba(26, 198, 88, 0.6);\n    background: linear-gradient(90deg, rgba(26, 198, 88, 0.16) 0%, rgba(38, 208, 124, 0.16) 100%);\n  }\n']))),Sn=v.Ay.div(q||(q=vn(["\n  color: #138F44;\n  font-size: 17px;\n  font-weight: 600;\n  line-height: 22px;\n"]))),An=v.Ay.div(J||(J=vn(["\n  color: #788994;\n  font-size: 13px;\n  font-weight: 400;\n  line-height: 18px;\n  margin-top: 3px;\n"]))),Cn=v.Ay.div(Y||(Y=vn(["\n  min-width: 0;\n"]))),On=v.Ay.span(K||(K=vn(["\n  display: flex;\n  align-items: center;\n  flex-shrink: 0;\n  /* Drives the SVG strokes via currentColor; same green as the title. */\n  color: #138F44;\n"]))),Ln=v.Ay.div(X||(X=vn(["\n  margin-top: -15px;\n"])));const Pn=function(n){var e=(0,dn.d4)((function(n){return n.user.current})),t=n.data,r=n.needMore,o=n.onClose,i=fn((0,u.useState)(0),2),a=i[0],l=i[1],c=(0,u.useRef)(null),s=(0,sn.A)().errorNotify,f=function(){var n=null==v?void 0:v.wcCheckoutUrl;if(!n)return s("This pack is temporarily unavailable. Please try again later."),void d.wd("Credit pack missing checkout URL",{extra:{pack:v}});(0,h.$s)("Credit Pack Purchased",{pack:v.value}),window.open(n,"_blank","noopener,noreferrer")};(0,u.useEffect)((function(){var n=function(n){n.key===m.W7&&f()},e=document.getElementById("ai-credits-dialog");return e.addEventListener("keydown",n,!1),(0,h.$s)("Credit Pack Pricing Viewed",{}),function(){e.removeEventListener("keydown",n,!1)}}),[]),(0,p.A)(c,o);var v=t.creditPacks[a],x=Math.max(0,t.creditsBalance),w=r||0===x,j=(0,g.Kc5
1)(null==e?void 0:e.license)||(0,g.uKP)(null==e?void 0:e.license),k=w?"You're out of credits":"Get more credits",S=w?"Top up to keep going. Pick the pack that works for you.":"Stock up before you run out. Bigger packs, better value.";return(0,b.jsxs)(hn,{children:[(0,b.jsxs)(mn,{children:[(0,b.jsx)(y.vM,{}),(0,b.jsx)(yn,{children:k}),(0,b.jsx)(gn,{children:S})]}),x>0?(0,b.jsx)(B,{value:x}):(0,b.jsx)(Ln,{}),(0,b.jsx)(xn,{children:t.creditPacks.map((function(n,e){return(0,b.jsx)(cn,{pack:n,isSelected:a===e,onSelect:function(){return l(e)}},n.value)}))}),(0,b.jsxs)(wn,{children:[(0,b.jsxs)(bn,{$background:"#2198ED",onClick:f,children:["Add ",(0,g.GZQ)(v.value)," credits — $",v.price]}),(0,b.jsx)(jn,{children:"Purchased credits never expire"}),j&&(0,b.jsxs)(kn,{href:"/postcards/pricing/",target:"_blank",rel:"noopener noreferrer",onClick:function(){var n;(0,h.$s)("Upgrade Button Clicked",{userId:null==e?void 0:e.uid,licenseType:null==e||null===(n=e.license)||void 0===n?void 0:n.plan,source:"ai-credits-dialog"})},children:[(0,b.jsx)(On,{children:(0,b.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("path",{d:"M28 11L25 14",stroke:"currentColor",strokeWidth:"2",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,b.jsx)("path",{d:"M31 14L28 11",stroke:"currentColor",strokeWidth:"2",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,b.jsx)("path",{d:"M1 15L7 9",stroke:"currentColor",strokeWidth:"2",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,b.jsx)("path",{d:"M1 9L7 15",stroke:"currentColor",strokeWidth:"2",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,b.jsx)("path",{d:"M19 31L25 25",stroke:"currentColor",strokeWidth:"2",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,b.jsx)("path",{d:"M19 25L25 31",stroke:"currentColor",strokeWidth:"2",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,b.jsx)("path",{d:"M13 7L19 1",stroke:"currentColor",strokeWidth:"2",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,b.jsx)("path",{d:"M13 1L19 7",stroke:"currentColor",strokeWidth:"2",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,b.jsx)("path",{d:"M28 7C29.6569 7 31 5.65685 31 4C31 2.34315 29.6569 1 28 1C26.3431 1 25 2.34315 25 4C25 5.65685 26.3431 7 28 7Z",stroke:"currentColor",strokeWidth:"2",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,b.jsx)("path",{d:"M7 31V26C7 22.133 10.135 18.997 14.003 18.997H23.05C25.784 18.997 28.001 16.78 28.001 14.046V11",stroke:"currentColor",strokeWidth:"2",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,b.jsxs)(Cn,{children:[(0,b.jsx)(Sn,{children:"Switch to a higher plan →"}),(0,b.jsx)(An,{children:"Fresh credits every month, plus more features."})]})]})]})]})};var En=t(91511),Mn=t(88137),$n=t(74718);function Tn(n){return Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Tn(n)}function In(){var n,e,t="function"==typeof Symbol?Symbol:{},r=t.iterator||"@@iterator",o=t.toStringTag||"@@toStringTag";function i(t,r,o,i){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return Dn(c,"_invoke",function(t,r,o){var i,l,u,c=0,s=o||[],d=!1,f={p:0,n:0,v:n,a:p,f:p.bind(n,4),d:function(e,t){return i=e,l=0,u=n,f.n=t,a}};function p(t,r){for(l=t,u=r,e=0;!d&&c&&!o&&e<s.length;e++){var o,i=s[e],p=f.p,v=i[2];t>3?(o=v===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=n):i[0]<=p&&((o=t<2&&p<i[1])?(l=0,f.v=r,f.n=i[1]):p<v&&(o=t<3||i[0]>r||r>v)&&(i[4]=t,i[5]=r,f.n=v,l=0))}if(o||t>1)return a;throw d=!0,r}return function(o,s,v){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&p(s,v),l=s,u=v;(e=l<2?n:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),p(l,u)):f.n=u:f.v=u);try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");
1if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=n}else if((e=(d=f.n<0)?u:t.call(r,f))!==a)break}catch(e){i=n,l=1,u=e}finally{c=1}}return{value:e,done:d}}}(t,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(Dn(e={},r,(function(){return this})),e),d=c.prototype=l.prototype=Object.create(s);function f(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,c):(n.__proto__=c,Dn(n,o,"GeneratorFunction")),n.prototype=Object.create(d),n}return u.prototype=c,Dn(d,"constructor",c),Dn(c,"constructor",u),u.displayName="GeneratorFunction",Dn(c,o,"GeneratorFunction"),Dn(d),Dn(d,o,"Generator"),Dn(d,r,(function(){return this})),Dn(d,"toString",(function(){return"[object Generator]"})),(In=function(){return{w:i,m:f}})()}function Dn(n,e,t,r){var o=Object.defineProperty;try{o({},"",{})}catch(n){o=0}Dn=function(n,e,t,r){function i(e,t){Dn(n,e,(function(n){return this._invoke(e,t,n)}))}e?o?o(n,e,{value:t,enumerable:!r,configurable:!r,writable:!r}):n[e]=t:(i("next",0),i("throw",1),i("return",2))},Dn(n,e,t,r)}function Fn(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function Bn(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?Fn(Object(t),!0).forEach((function(e){Rn(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Fn(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function Rn(n,e,t){return(e=function(n){var e=function(n,e){if("object"!=Tn(n)||!n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!=Tn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"==Tn(e)?e:e+""}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function zn(n,e,t,r,o,i,a){try{var l=n[i](a),u=l.value}catch(n){return void t(n)}l.done?e(u):Promise.resolve(u).then(r,o)}function Wn(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return Gn(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Gn(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gn(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}const Hn=function(n){var e=(0,dn.wA)(),t=(0,dn.d4)((function(n){return n.application.creditsCounter})),r=Wn((0,u.useState)(!0),2),o=r[0],i=r[1],a=Wn((0,u.useState)(null),2),l=a[0],v=a[1],h=(0,u.useRef)(null),m=(0,sn.A)().errorNotify,y=function(){var r,o=(r=In().m((function r(){var o,a;return In().w((function(r){for(;;)switch(r.p=r.n){case 0:return r.p=0,r.n=1,(0,$n.f)();case 1:if((o=r.v).status!==Mn.U0){r.n=2;break}v(o.data),i(!1),e(f.hO_(Bn(Bn({},t),{},{credits_pack:o.data.leftCreditsPack,credits_plan:o.data.leftCreditsPlan,credits_balance:o.data.creditsBalance}))),r.n=3;break;case 2:throw new Error("Something went wrong");case 3:r.n=5;break;case 4:r.p=4,a=r.v,d.Cp(a),console.error(a),m("Failed to load credit packs data. Please try again later."),n.onClose();case 5:return r.a(2)}}),r,null,[[0,4]])})),function(){var n=this,e=arguments;return new Promise((function(t,o){var i=r.apply(n,e);function a(n){zn(i,t,o,a,l,"next",n)}function l(n){zn(i,t,o,a,l,"throw",n)}a(void 0)}))});return function(){return o.apply(this,arguments)}}();return(0,u.useEffect)((function(){y()}),[]),(0,p.A)(h,n.onClose),o||!l?(0,b.jsx)(En.aH,{show:!0}
1):(0,b.jsx)(c.A6,{id:"ai-credits-dialog",show:!0,$newBackground:!0,children:(0,b.jsx)(s.A,{ref:h,width:420,hideLogo:!0,showCloseButton:!0,bodyPadding:[25],onClickClose:n.onClose,children:(0,b.jsx)(Pn,{data:l,needMore:n.needMore,onClose:n.onClose})})})}},66708:(n,e,t)=>{t.d(e,{A:()=>L});var r,o,i,a,l,u,c=t(96540),s=t(38267),d=t(50499),f=t(35933),p=t(49808),v=t(61225),h=t(62582),m=t(74848);function y(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return g(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?g(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function b(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var x=40,w=350,j=s.Ay.div(r||(r=b(["\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-end;\n\talign-self: center;\n\toverflow: visible;\n\tz-index: 1;\n\n\twidth: ",";\n\theight: ",";\n\tflex: 0 0 ",";\n\n\tmargin-left: ",";\n\tmargin-right: ",";\n\n\ttransition:\n\t\twidth ","ms cubic-bezier(0.2, 0, 0, 1),\n\t\theight ","ms cubic-bezier(0.2, 0, 0, 1),\n\t\tflex-basis ","ms cubic-bezier(0.2, 0, 0, 1),\n\t\tmargin-left ","ms cubic-bezier(0.2, 0, 0, 1),\n\t\tmargin-right ","ms cubic-bezier(0.2, 0, 0, 1);\n"])),(function(n){return n.$visible?"".concat(x,"px"):"0px"}),(function(n){return n.$visible?"".concat(x,"px"):"0px"}),(function(n){return n.$visible?"".concat(x,"px"):"0px"}),(function(n){return n.$visible?"8px":"0px"}),(function(n){return n.$visible?"-3px":"0px"}),w,w,w,w,w),k=s.Ay.div(o||(o=b(["\n\tposition: relative;\n    border-radius: 50%;\n\n\twidth: ","px;\n\theight: ","px;\n\tflex: 0 0 ","px;\n\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\n\ttransform-origin: 50% 50%;\n\ttransform: ",";\n\topacity: ",";\n\tpointer-events: ",";\n\ttransition:\n\t\ttransform ","ms cubic-bezier(0.2, 0, 0, 1),\n\t\topacity 150ms ease;\n"])),x,x,x,(function(n){return n.$visible?"scale(1)":"scale(0)"}),(function(n){return n.$visible?1:0}),(function(n){return n.$visible?"auto":"none"}),w),S=s.Ay.div(i||(i=b(["\n    width: 36px;\n    height: 36px;\n    display: flex;\n    align-items: center;\n    justify-content: center;
1\n"]))),A=s.Ay.div(a||(a=b(["\n\tposition: absolute;\n\tright: 5px;\n\ttop: 60px;\n"]))),C=s.Ay.div(l||(l=b(["\n\tcolor: #FFF;\n\tleading-trim: both;\n\ttext-edge: cap;\n\tfont-size: 13px;\n\tfont-style: normal;\n\tfont-weight: 400;\n\tline-height: 123%;\n"]))),O=s.Ay.span(u||(u=b(["\n\tdisplay: inline-block;\n\ttext-decoration: underline;\n\tcursor: pointer;\n\tpadding-left: 3px;\n"])));const L=function(){var n=(0,v.wA)(),e=(0,v.d4)((function(n){return n.ai.isGenerating})),t=(0,v.d4)((function(n){return n.ai.hasFirstToken})),r=y((0,c.useState)(!1),2),o=r[0],i=r[1],a=y((0,c.useState)(!1),2),l=a[0],u=a[1],s=y((0,c.useState)(!1),2),g=s[0],b=s[1],x=y((0,c.useState)(!1),2),L=x[0],P=x[1],E=(0,c.useRef)(null),M=(0,c.useRef)(null),$=L?"Your request is taking longer than usual. Want to stop?":"The AI Assistant is working on your request.",T=o||L,I=function(){null!==E.current&&(window.clearTimeout(E.current),E.current=null)},D=function(){null!==M.current&&(window.clearTimeout(M.current),M.current=null)},F=function(){I(),i(!0)},B=function(){I(),E.current=window.setTimeout((function(){i(!1),E.current=null}),150)};(0,c.useEffect)((function(){var n,t;return e?(u(!0),t=requestAnimationFrame((function(){return b(!0)})),P(!1),M.current=window.setTimeout((function(){return P(!0)}),6e4)):(b(!1),I(),i(!1),P(!1),D(),n=setTimeout((function(){return u(!1)}),w)),function(){clearTimeout(n),cancelAnimationFrame(t)}}),[e]),(0,c.useEffect)((function(){t&&(D(),P(!1))}),[t]),(0,c.useEffect)((function(){return function(){I(),D()}}),[]);return l?(0,m.jsxs)(j,{$visible:g,children:[(0,m.jsx)(k,{$visible:g,onMouseEnter:F,onMouseLeave:B,children:(0,m.jsx)(p.A,{borderRadius:"36px",borderWidth:"2px",background:"#071C26",animated:!0,animationDuration:"2s",fitContent:!0,children:(0,m.jsx)(S,{children:(0,m.jsx)(f.Pi,{})})})}),T&&(0,m.jsx)(A,{onMouseEnter:F,onMouseLeave:B,children:(0,m.jsx)(h.A,{color:"#2D3A41",minWidth:"170px",useShadow:!0,arrowPosition:"top-right",contentPosition:"bottom-right",style:{padding:"12px 15px"},children:(0,m.jsxs)(C,{children:[$,(0,m.jsx)(O,{onClick:function(){I(),i(!1),P(!1),D(),n(d.OP({reason:"pressed_stop"}))},children:"Stop"})]})})})]}):null}},49808:(n,e,t)=>{t.d(e,{A:()=>I});var r,o,i,a,l,u,c,s,d,f,p,v,h,m=t(96540),y=t(38267),g=t(7501),b=t(74848);function x(n){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},x(n)}function w(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function j(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?w(Object(t),!0).forEach((function(e){k(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function k(n,e,t){return(e=function(n){var e=function(n,e){if("object"!=x(n)||!n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!=x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"==x(e)?e:e+""}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function S(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return A(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?A(n,e):void 0}}
1(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function C(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var O=350,L=y.Ay.div(r||(r=C(["\n    @keyframes a { to { --a: 1turn } }\n\n    @property --a {\n        syntax: '<angle>';\n        initial-value: 0deg;\n        inherits: false\n    }\n\n    /* Width of the glow-sweep slice (GlowSweep). Registered so it can be\n       animated; wobbles between 30deg and 80deg on an irregular schedule. */\n    @property --sweep {\n        syntax: '<angle>';\n        initial-value: 55deg;\n        inherits: false\n    }\n\n    /* Irregular stop values + a 7.3s period that never lines up with the 6s\n       rotation, so the slice keeps growing/shrinking \"randomly\" as it travels\n       — the two cycles drift against each other instead of repeating. */\n    @keyframes sweepWobble {\n        0% { --sweep: 50deg }\n        13% { --sweep: 75deg }\n        29% { --sweep: 35deg }\n        41% { --sweep: 65deg }\n        58% { --sweep: 30deg }\n        73% { --sweep: 80deg }\n        86% { --sweep: 42deg }\n        100% { --sweep: 50deg }\n    }\n\n    @keyframes waitingPulse {\n        from { opacity: 0.2; }\n        to { opacity: 0.6; }\n    }\n\n    position: relative;\n\n    ","\n\n    & > svg {\n        position: fixed;\n    }\n\n    ","\n"])),(function(n){return n.$fitContent?(0,y.AH)(o||(o=C(["\n            display: inline-flex;\n            flex-direction: column;\n            max-width: 100%;\n        "]))):(0,y.AH)(i||(i=C(["\n            display: block;\n            width: 100%;\n        "])))}),(function(n){return n.$waitingMode&&(0,y.AH)(a||(a=C(["\n        cursor: wait;\n    "])))})),P=y.Ay.div(l||(l=C(["\n    position: absolute;\n    inset: 0;\n    z-index: 2;\n    pointer-events: none;\n    border-radius: var(--border-radius);\n    opacity: ",";\n    transition: opacity ","ms ease;\n\n    @media (prefers-reduced-motion: reduce) {\n        transition: none;\n    }\n"])),(function(n){return n.$visible?1:0}),O),E=y.Ay.div(u||(u=C(["\n    position: absolute;\n    inset: 0;\n    border-radius: inherit;\n    background: #2198ED;\n    animation: waitingPulse 3.6s ease-in-out infinite alternate;\n\n    @media (prefers-reduced-motion: reduce) {\n        animation: none;\n        opacity: 0.35;\n    }\n"]))),M=y.Ay.div(c||(c=C(["\n    pointer-events: none;\n    position: absolute;\n    z-index: 0;\n    inset: 0;\n    border-radius: var(--border-radius);\n    /* Slice width is the animated --sweep (30deg-80deg wobble around 55deg);\n       the start angle backs off by half of it so the slice stays CENTERED at\n       +180deg from the gradient start — pinned under the ring's bright node\n       no matter how wide it currently is. */\n    background: conic-gradient(\n        from calc(var(--a, 0deg) + 180deg - (var(--sweep, 55deg) / 2)),\n        transparent 0deg,\n        rgba(33, 152, 237, 0.9) calc(var(--sweep, 55deg) / 2),\n        transparent var(--sweep, 55deg)\n    );\n    filter: blur(6px);\n\n    opacity: ",";\n    transition: opacity ","ms ease;\n\n    ","\n\n    @media (prefers-reduced-motion: reduce) {\n        animation: none;\n        transition: none;\n    }\n"])),(function(n){return n.$visible?1:0}),O,(function(n){return n.$animated&&(0,y.AH)(s||(s=C(["\n        animation:\n            a var(--animation-duration, 6s) linear infinite,\n            sweepWobble 7.3s ease-in-out infinite;\n    "])))})),$=y.Ay.div(d||(d=C(["\n    /* A single bright node circling a dim blue track at constant speed and\n       constant opacity — the stop list starts and ends on the same color so\n       the repeated turn is seamless. */\n    --l: rgba(33, 152, 237, 0.2), rgba(33, 189, 237, 0.95), rgba(33, 152, 237, 0.2);\n\n    pointer-events: none;\n    position: absolute;\n    z-index: 0;\n    box-sizing: border-box;\n    inset: calc(0px - var(--border-width));\n    border-radius: var(--ring-outer-radius);\n    padding: var(--border-width);\n    background: repeating-conic-gradient(from var(--a, 0deg), var(--l)) border-box;\n    filter: url(#glow-1);\n    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);\n    -webkit-mask-composite: xor;\n    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);\n    mask-composite: exclude;\n\n    /* Appear/disappear with the veil. The rotation drives the conic angle,\n       never opacity, so this transition has nothing to fight. */\n    opacity: ",";\n    transition: opacity ","ms ease;\n\n    /* Constant slow rotation — deliberately steady and quiet. */\n    ",'\n\n    /* Firefox-only ring breathe — used where there is no veil (the chat avatar)\n       so the ring never reads as frozen. Opacity stays on the compositor. */\n    @keyframes ffRingPulse {\n        from { opacity: 0.55; }\n        to   { opacity: 0.9; }\n    }\n\n    /* Firefox has no GPU path for the SVG glow filter or the @property conic\n       spin, so it repaints the whole frame every tick and pegs the CPU (several\n       of these run at once during a generation). Fall back to a static solid\n       ring. Where a veil is present (waitingMode: canvas + modules) it carries\n       the "working" motion; where it is not (the avatar) the ring does a cheap\n       opacity breathe. Placed before the reduced-motion query so that still wins. */\n    ',"\n\n    @media (prefers-reduced-motion: reduce) {\n        animation: none;\n        transition: none;\n    }\n"])),(function(n){return n.$visible?1:0}),O,(function(n){return n.$animated&&(0,y.AH)(f||(f=C(["\n        animation: a var(--animation-duration, 6s) linear infinite;\n    "])))}),(function(n){var e=n.$firefox,t=n.$waiting;return e&&(0,y.AH)(p||(p=C(["\n        filter: none;\n        background: rgba(33, 152, 237, 0.5);\n        animation: ",";\n    "])),t?"none":"ffRingPulse 1.8s ease-in-out infinite alternate")})),T=y.Ay.div(v||(v=C(["\n    position: relative;\n    /* Ring is drawn outside the flow box; inner fill should use the design radius (not r − width). */\n    border-radius: var(--border-radius);\n\n    /* The fill, the clip and the stacking context belong to the FRAME, not to\n       the box. In preserveSubtree mode the box outlives the frame (see below),\n       and an idle canvas must not paint white over the workspace background,\
1n       clip anything that reaches outside a module, or trap its subtree in a\n       stacking context. That last one is why z-index lives here and not on the\n       bare box: #components-on-workspace carries z-index 3 so the canvas — and\n       the module bubbles portaled into it — paints above the free-plan promo\n       footer (z-index 2) and the workspace background overlay (z-index 1). A\n       permanent z-index:1 here clamps that whole subtree to 1 and the promo\n       footer covers the bubble hanging under the last module. While framed the\n       z-index is needed: it puts the content above the ring / glow sweep\n       (z-index 0) and below the waiting veil (z-index 2). */\n    ","\n"])),(function(n){var e=n.$framed,t=n.$background;return e&&(0,y.AH)(h||(h=C(["\n        z-index: 1;\n        overflow: hidden;\n        background-color: ",";\n    "])),t||"#ffffff")}));const I=function(n){var e=(0,m.useMemo)((function(){var e=(n.borderRadius||"").trim();return"0"===e||"0px"===e?e||"0px":"calc(".concat(n.borderRadius," + ").concat(n.borderWidth,")")}),[n.borderRadius,n.borderWidth]),t=(0,m.useMemo)((function(){return(0,g.K60)()}),[]),r=S((0,m.useState)(!n.disabled),2),o=r[0],i=r[1],a=S((0,m.useState)(!1),2),l=a[0],u=a[1];return(0,m.useEffect)((function(){if(!n.disabled){i(!0);var e=0,t=requestAnimationFrame((function(){e=requestAnimationFrame((function(){return u(!0)}))}));return function(){cancelAnimationFrame(t),e&&cancelAnimationFrame(e)}}u(!1);var r=setTimeout((function(){return i(!1)}),O);return function(){return clearTimeout(r)}}),[n.disabled]),o||n.preserveSubtree?(0,b.jsxs)(L,{style:j({"--border-width":n.borderWidth,"--border-radius":n.borderRadius,"--ring-outer-radius":e,"--animation-duration":n.animationDuration},n.style),$waitingMode:n.waitingMode&&o,$fitContent:n.fitContent,children:[o&&n.waitingMode&&(0,b.jsx)(P,{id:"waiting-overlay",$visible:l,"aria-hidden":!0,children:(0,b.jsx)(E,{})}),o&&(0,b.jsx)("svg",{width:"0",height:"0","aria-hidden":"true",children:(0,b.jsxs)("filter",{id:"glow-1",x:"-.25",y:"-.25",width:"1.5",height:"1.5",children:[(0,b.jsx)("feComponentTransfer",{in:"SourceGraphic",result:"grad",children:(0,b.jsx)("feFuncA",{type:"table",tableValues:"0 2 0"})}),(0,b.jsx)("feMorphology",{operator:"dilate",radius:"0"}),(0,b.jsx)("feGaussianBlur",{stdDeviation:"6",result:"glow"}),(0,b.jsx)("feComponentTransfer",{children:(0,b.jsx)("feFuncA",{type:"linear",slope:"0.8"})}),(0,b.jsx)("feBlend",{in:"grad",result:"out"}),(0,b.jsx)("feComponentTransfer",{in:"SourceGraphic",children:(0,b.jsx)("feFuncA",{type:"table",tableValues:"0 0 1"})}),(0,b.jsx)("feBlend",{in2:"out"})]})}),o&&n.glowSweep&&!t&&(0,b.jsx)(M,{$animated:n.animated,$visible:l,"aria-hidden":!0}),o&&(0,b.jsx)($,{$animated:n.animated,$visible:l,$firefox:t,$waiting:n.waitingMode}),(0,b.jsx)(T,{$background:n.background,$framed:o,className:"content",children:n.children})]}):(0,b.jsx)(b.Fragment,{children:n.children})}},937:(n,e,t)=>{t.d(e,{A:()=>Y});var r,o,i,a,l,u,c,s,d,f,p,v=t(96540),h=t(38267),m=t(25797),y=t(50472),g=t(5543),b=t(5203),x=t(8177),w=t(91125),j=t(9754),k=t(61225),S=t(7501),A=t(75462),C=t(74848);function O(n){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},O(n)}function L(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function P(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?L(Object(t),!0).forEach((function(e){E(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function E(n,e,t){return(e=function(n){var e=function(n,e){if("object"!=O(n)||!n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!=O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"==O(e)?e:e+""}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function M(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var $="https://designmodo.com/wp-admin/admin-ajax.php".includes("dev"),T="https://".concat($?"dev.":"","designmodo.com/postcards/app").concat($?"-staging":"","/project"),I={padding:"8px 16px",height:"40px",display:"block",flex:"1",fontSize:"13px",fontWeight:"600"},D=h.Ay.div(r||(r=M(["\n    width: 100%;\n"]))),F=h.Ay.div(o||(o=M(["\n    margin-bottom: 20px;\n"]))),B=h.Ay.div(i||(i=M(["\n    display: flex;\n    gap: 3px;\n    margin-bottom: 10px;\n"]))),R=h.Ay.div(a||(a=M(['\n    font-family: "Fira Sans", sans-serif;\n    font-size: 15px;\n    font-style: normal;\n    font-weight: 700;\n    line-height: 140%;\n    color: #2D3A41;\n']))),z=h.Ay.div(l||(l=M(['\n    font-family: "Fira Sans", sans-serif;\n    font-size: 15px;\n    font-style: normal;\n    font-weight: 400;\n    line-height: 140%;\n    color: #788994;\n']))),W=h.Ay.ul(u||(u=M(["\n    margin: 0;\n    margin-bottom: 10px;\n    padding: 0;\n    list-style: none;\n    \n    &:last-child {\n        margin-bottom: 0;\n    }\n"]))),G=h.Ay.li(c||(c=M(["\n    position: relative;\n    margin-bottom: 5px;\n    padding-left: 22px;\n    font-family: \"Fira Sans\", sans-serif;\n    font-size: 15px;\n    font-style: normal;\n    font-weight: 400;\n    line-height: 1.4;\n    color: #2D3A41;\n\n    &:before {\n        content: '';\n        position: absolute;\n        top: 8px;\n        left: 7px;\n        width: 4px;\n        height: 4px;\n        border-radius: 50%;\n        background: #2D3A41;\n    }\n\n    &:last-child {\n        margin-bottom: 0;\n    }\n\n    a {\n        text-decoration-line: underline;\n        text-decoration-style: solid;\n        text-decoration-skip-ink: auto;\n        text-decoration-thickness: auto;\n        text-underline-offset: auto;\n        text-underline-position: from-font;\n        color: #2D3A41;\n    }\n\n    svg {\n        margin: 0 5px;\n    }\n"]))),H=h.Ay.button(s||(s=M(['\n    display: block;\n    appearance: none;\n    padding: 0;\n    border: none;\n    background: none;\n    text-decoration: underline;\n    font-family: "Fira Sans", sans-serif;\n    font-size: 15px;\n    font-weight: 400;\n    color: #2198ED;\n    cursor: pointer;
1\n']))),U=h.Ay.div(d||(d=M(['\n    margin-bottom: 10px;\n    color: #2D3A41;\n    text-align: left;\n    font-family: "Fira Sans", sans-serif;\n    font-size: 18px;\n    font-style: normal;\n    font-weight: 500;\n    line-height: 25.92px;\n']))),_=h.Ay.div(f||(f=M(['\n    margin-bottom: 10px;\n    color: #2D3A41;\n    text-align: left;\n    font-family: "Fira Sans", sans-serif;\n    font-size: 15px;\n    font-style: normal;\n    font-weight: 400;\n    line-height: 21px;\n']))),N=h.Ay.div(p||(p=M(["\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    gap: 20px;\n"]))),Z=function(){return(0,C.jsx)(U,{children:"Please wait we are checking..."})},V=function(){return(0,C.jsx)(U,{children:"This image is not used anywhere"})},q=function(n){var e=n.title,t=n.count,r=n.total,o=n.items,i=n.itemsPerPage,a=n.itemsType,l=n.isLoading,u=n.onShowMore,c=n.renderItem;return null!=o&&o.length?(0,C.jsxs)(F,{children:[(0,C.jsxs)(B,{children:[(0,C.jsx)(R,{children:e}),i<r&&(0,C.jsxs)(z,{children:["(Showing ",t,"/",r,")"]})]}),(0,C.jsx)(W,{children:o.map(c)}),t<r&&(0,C.jsx)(H,{disabled:l,onClick:function(){return u(E({},"".concat(a,"PerPage"),t+i))},children:"Show more"})]}):null},J=function(n){var e,t,r,o,i,a,l,u,c,s=n.title,d=n.text,f=n.attached,p=n.isLoading,h=n.onShowMore;return(0,C.jsxs)("div",{children:[(0,C.jsx)(U,{children:s}),(0,C.jsx)(_,{children:d}),(0,C.jsx)(q,{title:"Projects",count:(null==f||null===(e=f.projects)||void 0===e?void 0:e.count)||0,total:(null==f||null===(t=f.projects)||void 0===t?void 0:t.total)||0,items:(null==f||null===(r=f.projects)||void 0===r?void 0:r.items)||[],itemsPerPage:5,itemsType:"projects",isLoading:p,onShowMore:h,renderItem:function(n){return(0,C.jsx)(G,{children:(0,C.jsx)("a",{href:"".concat(T,"/").concat(n.id,"/"),target:"_blank",children:(0,S.iTi)(n.name)})},n.id)}}),(0,C.jsx)(q,{title:"Custom Modules",count:(null==f||null===(o=f.components)||void 0===o?void 0:o.count)||0,total:(null==f||null===(i=f.components)||void 0===i?void 0:i.total)||0,items:(null==f||null===(a=f.components)||void 0===a?void 0:a.items)||[],itemsPerPage:5,itemsType:"components",isLoading:p,onShowMore:h,renderItem:function(n){return(0,C.jsx)(G,{children:(0,S.iTi)(n.name)},n.id)}}),(0,C.jsx)(q,{title:"Presets",count:(null==f||null===(l=f.presets)||void 0===l?void 0:l.count)||0,total:(null==f||null===(u=f.presets)||void 0===u?void 0:u.total)||0,items:(null==f||null===(c=f.presets)||void 0===c?void 0:c.items)||[],itemsPerPage:5,itemsType:"presets",isLoading:p,onShowMore:h,renderItem:function(n){return(0,C.jsxs)(G,{children:[(0,C.jsx)("span",{children:(0,S.iTi)(n.name)}),n.position&&(0,C.jsxs)(v.Fragment,{children:[j.S$,(0,C.jsx)("span",{children:(0,S.iTi)(n.position)})]})]},n.id)}})]})};const Y=function(){var n=(0,k.wA)(),e=(0,k.d4)((function(n){return n.imageLibrary.showAttachedImageDialog})),t=e.attached,r=e.extra,o=r.title,i=void 0===o?"You can't delete this image":o,a=r.text,l=void 0===a?"This image is still in use. Please remove it from the entities below before deleting:":a,u=r.imageId,c=void 0===u?null:u,s=r.deletingImageId,d=void 0===s?null:s,f=(0,v.useRef)(null),p=(0,A.w)(),h=p.getUsedIn,j=p.iseUsedInLoading,S=Array.isArray(t)&&0!==t.length?Object.values(t[0]).reduce((function(n,e){return n+e.count}),0):0,O=function(){t.length>1&&setTimeout((function(){var e=t.slice(1);n(m.fX(e,r))}),100),n(m.Iw())};return(0,b.A)(f,(function(){O()})),(0,x.A)((function(){f.current&&O()}),w.W7),(0,v.useEffect)((function(){c&&h(c,{onSuccess:function(e){n(m.fX([e],r))},onError:function(){}})}),[]),(0,C.jsxs)(y.A6,{show:!0,children:[(0,C.jsx)(y.D1,{onClick:O}),(0,C.jsx)("div",{"data-test-id":"attached-image-dialog",ref:f,style:{position:"relative",zIndex:4},children:(0,C.jsxs)(g.A,{width:340,bodyStyle:{padding:"20px 25px 25px 25px",textAlign:"left"},showCloseButton:!0,styleLogo:{justifyContent:"flex-start",margin:"5px 0px 19px 0"},onClickClose:O,children:[j&&!t&&(0,C.jsx)(Z,{}),(!j||j)&&t&&S>0&&(0,C.jsx)(J,{title:i,text:l,attached:t[0],isLoading:j,onShowMore:function(e){var o,i,a;(c||d)&&h(c||d,{pagination:P({projectsPerPage:null===(o=t[0])||void 0===o||null===(o=o.projects)||void 0===o?void 0:o.count,componentsPerPage:null===(i=t[0])||void 0===i||null===(i=i.components)||void 0===i?void 0:i.count,presetsPerPage:null===(a=t[0])||void 0===a||null===(a=a.presets)||void 0===a?void 0:a.count},e),onSuccess:function(e){n(m.fX([e],r))},onError:function(){}})}}),!j&&t&&0===S&&(0,C.jsx)(V,{}),(0,C.jsx)(N,{children:(0,C.jsx)(D,{children:(0,C.jsx)(y.$n,{background:"#E8ECF0",border:"#E8ECF0",hoverColor:"#dde2e8",style:P(P({},I),{},{color:"#2D3A41"}),onClick:O,children:"Close"})})})]})})]})}},53330:(n,e,t)=>{t.d(e,{A:()=>vn});var r=t(96540),o=t(61225),i=t(54347),a=t(50472),l=t(4412),u=t(10712),c=t(7901),s=t(40091),d=t(58467),f=t(95354),p=t(23527),v=t(84447),h=t(84999),m=t(7569),y=t(61124),g=t(18292),b=t(60245),x=t(7821),w=t(25411),j=t(27711),k=t(24897);function S(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}
1finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return A(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?A(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function C(n){return function(n){if(Array.isArray(n))return P(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||L(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=L(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var r=0,o=function(){};return{s:o,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return a=n.done,n},e:function(n){l=!0,i=n},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function L(n,e){if(n){if("string"==typeof n)return P(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?P(n,e):void 0}}function P(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}var E=t(35620),M=t(7501);function $(n){return function(n){if(Array.isArray(n))return T(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,e){if(n){if("string"==typeof n)return T(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?T(n,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}var I=/\.(woff2?|ttf|otf|eot)(\?|#|$)/i,D={woff2:"woff2",woff:"woff",ttf:"truetype",otf:"opentype",eot:"embedded-opentype"};function F(n){var e,t,o,i=(0,r.useRef)(null),a=(0,r.useRef)(new Set),l=null==n||null===(e=n.preset)||void 0===e?void 0:e.content,u=[].concat($((null==l||null===(t=l.textStyles)||void 0===t?void 0:t.items)||[]),$((null==l||null===(o=l.buttonStyles)||void 0===o?void 0:o.items)||[])),c=new Set,s=u.map((function(n){var e=null==n?void 0:n.data;return null!=e&&e.fontFamily?{family:e.fontFamily,variants:[(0,M.jU5)(e.fontWeight,e.fontStyle)],fontFamilyLink:e.fontFamilyLink}:null})).filter(Boolean).filter((function(n){var e="".concat(n.family,"|").concat(n.variants[0],"|").concat(n.fontFamilyLink||"");return!c.has(e)&&(c.add(e),!0)})),d=Array.from(c).join(";");(0,r.useEffect)((function(){if(s.length){(0,M.bL)((0,M.EJP)(s));var n=s.filter((function(n){return n.fontFamilyLink&&I.test(n.fontFamilyLink)})).map((function(n){var e,t=I.exec(n.fontFamilyLink)[1].toLowerCase(),r=D[t],o=(e=n.fontFamilyLink,/^https?:\/\//i.test(e)?e:"".concat((0,E.$_)(),"/assets/font/").concat(e.replace(".","/")));return"@font-face{font-family:'".concat(n.family,"';src:url('").concat(o,"') format('").concat(r,"');font-weight:1 1000;font-style:normal;font-display:swap;}")})).filter((function(n){return!a.current.has(n)}));if(n.length){if(!i.current){var e=document.createElement("style");e.setAttribute("data-brand-scraper-fonts","true"),document.head.appendChild(e),i.current=e}var t=i.current.sheet;
1n.forEach((function(n){a.current.add(n);try{null==t||t.insertRule(n,t.cssRules.length)}catch(n){console.error("Error injecting brand font face:",n)}}))}}}),[d]),(0,r.useEffect)((function(){return function(){var n;null===(n=i.current)||void 0===n||n.remove(),i.current=null,a.current.clear()}}),[])}var B=t(35793);function R(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||W(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function z(n){return function(n){if(Array.isArray(n))return G(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||W(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(n,e){if(n){if("string"==typeof n)return G(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?G(n,e):void 0}}function G(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}var H=t(19390);function U(n){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},U(n)}function _(){var n,e,t="function"==typeof Symbol?Symbol:{},r=t.iterator||"@@iterator",o=t.toStringTag||"@@toStringTag";function i(t,r,o,i){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return N(c,"_invoke",function(t,r,o){var i,l,u,c=0,s=o||[],d=!1,f={p:0,n:0,v:n,a:p,f:p.bind(n,4),d:function(e,t){return i=e,l=0,u=n,f.n=t,a}};function p(t,r){for(l=t,u=r,e=0;!d&&c&&!o&&e<s.length;e++){var o,i=s[e],p=f.p,v=i[2];t>3?(o=v===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=n):i[0]<=p&&((o=t<2&&p<i[1])?(l=0,f.v=r,f.n=i[1]):p<v&&(o=t<3||i[0]>r||r>v)&&(i[4]=t,i[5]=r,f.n=v,l=0))}if(o||t>1)return a;throw d=!0,r}return function(o,s,v){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&p(s,v),l=s,u=v;(e=l<2?n:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),p(l,u)):f.n=u:f.v=u);try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=n}else if((e=(d=f.n<0)?u:t.call(r,f))!==a)break}catch(e){i=n,l=1,u=e}finally{c=1}}return{value:e,done:d}}}(t,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(N(e={},r,(function(){return this})),e),d=c.prototype=l.prototype=Object.create(s);function f(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,c):(n.__proto__=c,N(n,o,"GeneratorFunction")),n.prototype=Object.create(d),n}return u.prototype=c,N(d,"constructor",c),N(c,"constructor",u),u.displayName="GeneratorFunction",N(c,o,"GeneratorFunction"),N(d),N(d,o,"Generator"),N(d,r,(function(){return this})),N(d,"toString",(function(){return"[object Generator]"})),(_=function(){return{w:i,m:f}})()}function N(n,e,t,r){var o=Object.defineProperty;try{o({},"",{})}catch(n){o=0}N=function(n,e,t,r){function i(e,t){N(n,e,(function(n){return this._invoke(e,t,n)}))}e?o?o(n,e,{value:t,enumerable:!r,configurable:!r,writable:!r}):n[e]=t:(i("next",0),i("throw",1),i("return",2))},N(n,e,t,r)}function Z(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function V(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};
vendor: 4,520 bytes, line 1
1e%2?Z(Object(t),!0).forEach((function(e){q(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function q(n,e,t){return(e=function(n){var e=function(n,e){if("object"!=U(n)||!n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!=U(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"==U(e)?e:e+""}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function J(n,e,t,r,o,i,a){try{var l=n[i](a),u=l.value}catch(n){return void t(n)}l.done?e(u):Promise.resolve(u).then(r,o)}function Y(n){return function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(n){J(i,r,o,a,l,"next",n)}function l(n){J(i,r,o,a,l,"throw",n)}a(void 0)}))}}function K(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return X(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?X(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}var Q=t(45663);function nn(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return en(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?en(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function en(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}var tn=t(8714);function rn(){var n,e,t="function"==typeof Symbol?Symbol:{},r=t.iterator||"@@iterator",o=t.toStringTag||"@@toStringTag";function i(t,r,o,i){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return on(c,"_invoke",function(t,r,o){var i,l,u,c=0,s=o||[],d=!1,f={p:0,n:0,v:n,a:p,f:p.bind(n,4),d:function(e,t){return i=e,l=0,u=n,f.n=t,a}};function p(t,r){for(l=t,u=r,e=0;!d&&c&&!o&&e<s.length;e++){var o,i=s[e],p=f.p,v=i[2];t>3?(o=v===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=n):i[0]<=p&&((o=t<2&&p<i[1])?(l=0,f.v=r,f.n=i[1]):p<v&&(o=t<3||i[0]>r||r>v)&&(i[4]=t,i[5]=r,f.n=v,l=0))}if(o||t>1)return a;throw d=!0,r}return function(o,s,v){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&p(s,v),l=s,u=v;(e=l<2?n:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),p(l,u)):f.n=u:f.v=u);try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=n}else if((e=(d=f.n<0)?u:t.call(r,f))!==a)break}catch(e){i=n,l=1,u=e}finally{c=1}}return{value:e,done:d}}}(t,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(on(e={},r,(function(){return this})),e),d=c.prototype=l.prototype=Object.create(s);function f(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,
1c):(n.__proto__=c,on(n,o,"GeneratorFunction")),n.prototype=Object.create(d),n}return u.prototype=c,on(d,"constructor",c),on(c,"constructor",u),u.displayName="GeneratorFunction",on(c,o,"GeneratorFunction"),on(d),on(d,o,"Generator"),on(d,r,(function(){return this})),on(d,"toString",(function(){return"[object Generator]"})),(rn=function(){return{w:i,m:f}})()}function on(n,e,t,r){var o=Object.defineProperty;try{o({},"",{})}catch(n){o=0}on=function(n,e,t,r){function i(e,t){on(n,e,(function(n){return this._invoke(e,t,n)}))}e?o?o(n,e,{value:t,enumerable:!r,configurable:!r,writable:!r}):n[e]=t:(i("next",0),i("throw",1),i("return",2))},on(n,e,t,r)}function an(n,e,t,r,o,i,a){try{var l=n[i](a),u=l.value}catch(n){return void t(n)}l.done?e(u):Promise.resolve(u).then(r,o)}function ln(n){return function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(n){an(i,r,o,a,l,"next",n)}function l(n){an(i,r,o,a,l,"throw",n)}a(void 0)}))}}function un(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return cn(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?cn(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cn(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}var sn=t(50290),dn=t(74848);function fn(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(n){if("string"==typeof n)return pn(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?pn(n,e):void 0}}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var r=0,o=function(){};return{s:o,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return a=n.done,n},e:function(n){l=!0,i=n},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function pn(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}const vn=function(n){var e,t,A,L,P,M,$,T,I,D=n.url,W=n.name,G=n.onClose,U=n.mode,N=void 0===U?"create":U,Z=n.preset,q=(0,o.wA)(),J=(0,o.d4)((function(n){return n.projects.current})),X=(0,o.d4)((function(n){return n.application.customFonts})),en=(0,o.d4)((function(n){return n.application.showCustomFontsWindow})),on=(0,o.d4)((function(n){var e;return!(null===(e=n.application.customFontEditWindow)||void 0===e||!e.open)})),an=en||on,cn=(0,o.d4)((function(n){var e;return(null===(e=n.presets)||void 0===e?void 0:e.list)||[]})),pn=(0,o.d4)((function(n){var e;return null===(e=n.presets)||void 0===e?void 0:e.current})),vn=(0,l.Ki)(),hn=(0,o.Pj)(),mn=(0,r.useRef)(null),yn=function(n){var e=n.mode,t=n.preset,o=n.url,i=n.name,a=n.stream,l=S((0,r.useState)(null),2),u=l[0],c=l[1],s=S((0,r.useState)(new Set),2),d=s[0],f=s[1],p=(0,r.useRef)(null);return(0,r.useEffect)((function(){"create"===e&&a.start(o,i)}),[]),(0,r.useEffect)((function(){if("create"===e&&a.result&&!u){var n,t,r,i,l,s=JSON.parse(JSON.stringify(a.result));(0,v.lQ)(null==s||null===(n=s.preset)||void 0===n?void 0:n.content),(0,v.gj)(null==s||null===(t=s.preset)||void 0===t?void 0:t.content,o),(0,v.ni)(null==s||null===(r=s.preset)||void 0===r?void 0:r.content),(0,v.Wd)(null==s||null===(i=s.preset)||void 0===i?void 0:i.content),c(s),f((0,v.OD)(null===(l=s.preset)||void 0===l?void 0:l.content))}}),[a.result,u,e]),(0,r.useEffect)((function(){var n,r,o;
1if("edit"===e&&t){var i={preset:JSON.parse(JSON.stringify(t))};(0,v.ni)(null===(n=i.preset)||void 0===n?void 0:n.content),(0,v.Wd)(null===(r=i.preset)||void 0===r?void 0:r.content);var a=(0,v.OD)(null===(o=i.preset)||void 0===o?void 0:o.content);c(i),f(a),p.current={result:i,checked:a}}}),[e,null==t?void 0:t.id]),{editedResult:u,setEditedResult:c,checked:d,setChecked:f,editSeedRef:p}}({mode:N,preset:Z,url:D,name:W,stream:vn}),gn=yn.editedResult,bn=yn.setEditedResult,xn=yn.checked,wn=yn.setChecked,jn=yn.editSeedRef,kn=function(n){var e=n.setEditedResult,t=n.setChecked;return{handleToggle:(0,r.useCallback)((function(n){t((function(e){var t=new Set(e);return t.has(n)?t.delete(n):t.add(n),t}))}),[]),handleBatchToggle:(0,r.useCallback)((function(n,e){t((function(t){var r,o=new Set(t),i=O(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;e?o.add(a):o.delete(a)}}catch(n){i.e(n)}finally{i.f()}return o}))}),[]),handleUpdateSection:(0,r.useCallback)((function(n,r){e((function(e){var o;if(!e)return e;var i=JSON.parse(JSON.stringify(e)),a=null===(o=i.preset)||void 0===o||null===(o=o.content)||void 0===o?void 0:o[n];if(null==a||!a.items)return i;var l=new Set(a.items.map((function(n){return n.id})).filter(Boolean));a.items=r(a.items);var u,c=new Set(a.items.map((function(n){return n.id})).filter(Boolean));"colors"===n&&(0,v.qD)(null===(u=i.preset)||void 0===u?void 0:u.content);var s=[],d=[];return l.forEach((function(n){c.has(n)||s.push(n)})),c.forEach((function(n){l.has(n)||d.push(n)})),(s.length||d.length)&&t((function(n){var e,t=new Set(n),r=O(s);try{for(r.s();!(e=r.n()).done;){var o=e.value;t.delete(o)}}catch(n){r.e(n)}finally{r.f()}var i,a=O(d);try{for(a.s();!(i=a.n()).done;){var l=i.value;t.add(l)}}catch(n){a.e(n)}finally{a.f()}return t})),i}))}),[]),handleAddSocial:(0,r.useCallback)((function(n,r){var o="preset-social-".concat(Math.random().toString(36).slice(2,10));e((function(e){if(!e)return e;var t=JSON.parse(JSON.stringify(e));return t.preset.content.socialNetworks||(t.preset.content.socialNetworks={items:[]}),t.preset.content.socialNetworks.items.push({id:o,data:{link:{url:r,blank:!0},name:n,value:(0,v.ax)(n)}}),t})),t((function(n){return new Set([].concat(C(n),[o]))}))}),[])}}({setEditedResult:bn,setChecked:wn}),Sn=kn.handleToggle,An=kn.handleBatchToggle,Cn=kn.handleUpdateSection,On=kn.handleAddSocial;F(gn);var Ln=function(n){var e=n.mode,t=n.editedResult,o=n.checked,a=n.editSeedRef,l=n.streamStatus,u=n.dispatch,c="edit"===e&&null!=a.current&&null!=t&&(t!==a.current.result||o!==a.current.checked),s="create"===e&&!!t&&"done"===l||c;return{confirmLeaveThen:(0,r.useCallback)((function(n){if(s){var t="edit"===e?"You have unsaved changes to this brand preset. <br>Close without saving?":"Leaving now will discard the imported brand. <br>Close without saving?";u(i.$TK(t,n,{okButtonText:"Discard"}))}else n()}),[s,u,e]),needsLeaveConfirmation:s}}({mode:N,editedResult:gn,checked:xn,editSeedRef:jn,streamStatus:vn.status,dispatch:q}),Pn=Ln.confirmLeaveThen,En=function(n){var e=n.mode,t=n.preset,o=n.presetCurrent,a=n.existingPresets,l=n.dispatch,u=n.confirmLeaveThen,c=(0,r.useMemo)((function(){return[].concat(z((a||[]).filter((function(n){return n&&null!=n.id&&n.name})).map((function(n){return{label:n.name,value:n.id}}))),[{label:"Create new preset",value:-1}])}),[a]),s=(0,r.useMemo)((function(){return"edit"===e?null!=(null==t?void 0:t.id)?{label:String(t.name||""),value:t.id}:null:{label:"New preset",value:-2}}),[e,null==t?void 0:t.id,null==t?void 0:t.name]),d=R((0,r.useState)(null),2),f=d[0],p=d[1],v=(0,r.useCallback)((function(n){-2!==n&&null!=n&&("edit"===e&&n===(null==t?void 0:t.id)||u((function(){if(-1===n)return l("edit"===e?i.X5V():i.eSA()),void l(i.vjJ());"edit"!==e?(a||[]).find((function(e){return(null==e?void 0:e.id)===n}))&&(p(n),l(B.si(n))):l(B.si(n))})))}),[e,l,null==t?void 0:t.id,a,u]);return(0,r.useEffect)((function(){null!=f&&(null==o?void 0:o.id)===f&&null!=o&&o.content&&(p(null),l(i.eSA()),l(i.C94(o)))}),[f,o,l]),(0,r.useEffect)((function(){"edit"===e&&null!=o&&o.id&&null!=t&&t.id&&o.id!==t.id&&l(i.C94(o))}),[e,null==t?void 0:t.id,null==o?void 0:o.id,l,o]),{presetSwitcherOptions:c,presetSwitcherValue:s,handleSwitchPreset:v}}
1({mode:N,preset:Z,presetCurrent:pn,existingPresets:cn,dispatch:q,confirmLeaveThen:Pn}),Mn=En.presetSwitcherOptions,$n=En.presetSwitcherValue,Tn=En.handleSwitchPreset,In=function(n){var e=n.mode,t=n.preset,o=n.dispatch,i=K((0,r.useState)(!(null==t||!t.updated)),2),a=i[0],l=i[1],u=K((0,r.useState)(!1),2),c=u[0],s=u[1];(0,r.useEffect)((function(){"edit"===e&&l(!(null==t||!t.updated))}),[e,null==t?void 0:t.id,null==t?void 0:t.updated]);var d=(0,r.useCallback)(Y(_().m((function n(){var e;return _().w((function(n){for(;;)switch(n.p=n.n){case 0:if(!c&&null!=t&&t.id){n.n=1;break}return n.a(2);case 1:return s(!0),n.p=2,n.n=3,(0,H.pU)(t.id);case 3:null!=(e=n.v)&&e.success&&(l(!1),o(B.NB(V(V({},t),{},{updated:!1})))),n.n=5;break;case 4:n.p=4,n.v;case 5:return n.p=5,s(!1),n.f(5);case 6:return n.a(2)}}),n,null,[[2,4,5,6]])}))),[c,t,o]);return{showPublishBanner:a,publishing:c,handlePublishChanges:d}}({mode:N,preset:Z,dispatch:q}),Dn=In.showPublishBanner,Fn=In.publishing,Bn=In.handlePublishChanges,Rn=function(n){var e=n.preset,t=n.onClose,o=n.existingPresets,a=n.dispatch,l=n.store,u=n.bodyRef,c=nn((0,r.useState)(!1),2),s=c[0],d=c[1],f=nn((0,r.useState)(!1),2),p=f[0],v=f[1],h=(0,r.useRef)(null);(0,r.useEffect)((function(){if(s){var n=function(n){var e=n.target;h.current&&h.current.contains(e)||e instanceof Element&&e.closest('[data-floating-portal="true"]')||(d(!1),v(!1))};return document.addEventListener("mousedown",n),function(){return document.removeEventListener("mousedown",n)}}}),[s]);var m=(0,r.useCallback)((function(n){var t;if(null==n||null===(t=n.stopPropagation)||void 0===t||t.call(n),null!=e&&e.id){var r=(0,Q.q5)(o,String((null==e?void 0:e.name)||"").trim());a(B.qJ(r,e.id,null,(function(){var n,e=null===(n=l.getState().presets)||void 0===n?void 0:n.current;null!=(null==e?void 0:e.id)&&a(i.C94(e)),u.current&&(u.current.scrollTop=0)}))),d(!1),v(!1)}}),[e,o,a,l]),y=(0,r.useCallback)((function(n){var t;null==n||null===(t=n.stopPropagation)||void 0===t||t.call(n),null!=e&&e.id&&null!=e&&e.updated&&(a(i.$TK("Reset this preset? <br>All unpublished changes will be lost.",(function(){a(B.qb(e.id,{},(function(){var n,t=null===(n=l.getState().presets)||void 0===n?void 0:n.current;(null==t?void 0:t.id)===e.id&&a(i.C94(t))})))}),{okButtonText:"Reset"})),d(!1))}),[e,a,l]),g=(0,r.useCallback)((function(n){var t;null==n||null===(t=n.stopPropagation)||void 0===t||t.call(n),null!=e&&e.id&&v(!0)}),[e]),b=(0,r.useCallback)((function(){null!=e&&e.id&&(a(B.BC(e.id)),v(!1),d(!1),t())}),[e,a,t]),x=(0,r.useCallback)((function(){v(!1),d(!1)}),[]);return{showExtraMenu:s,setShowExtraMenu:d,confirmDeletePreset:p,setConfirmDeletePreset:v,extraMenuRef:h,handleClickDuplicate:m,handleClickReset:y,handleClickDelete:g,handleConfirmDelete:b,handleCancelDelete:x}}({preset:Z,onClose:G,existingPresets:cn,dispatch:q,store:hn,bodyRef:mn}),zn=Rn.showExtraMenu,Wn=Rn.setShowExtraMenu,Gn=Rn.confirmDeletePreset,Hn=Rn.setConfirmDeletePreset,Un=Rn.extraMenuRef,_n=Rn.handleClickDuplicate,Nn=Rn.handleClickReset,Zn=Rn.handleClickDelete,Vn=Rn.handleConfirmDelete,qn=Rn.handleCancelDelete,Jn=function(n){var e=n.editedResult,t=n.checked,o=n.mode,i=n.preset,a=n.name,l=n.url,u=n.currentProject,c=n.existingPresets,s=n.customFonts,d=n.dispatch,f=n.onClose,p=un((0,r.useState)(!1),2),h=p[0],m=p[1],y=un((0,r.useState)(null),2),g=y[0],b=y[1];return{saving:h,saveError:g,handleSave:(0,r.useCallback)(ln(rn().m((function n(){var r,p,h,y,g,x,w,j,k,S,A,C,O,L,P,M,$,T,I,D,F,R,z,W,G,H,U,_,N,Z;return rn().w((function(n){for(;;)switch(n.p=n.n){case 0:if(e){n.n=1;break}return n.a(2);case 1:if(null!=u&&u.id){n.n=2;break}return b("No active project."),n.a(2);case 2:return m(!0),b(null),n.p=3,w=(0,v.Qi)(e,t),n.n=4,(0,v._G)(null===(r=w.preset)||void 0===r?void 0:r.content,d,l,s);case 4:return n.n=5,(0,v.B_)(null===(p=w.preset)||void 0===p?void 0:p.content);case 5:if((0,v.qD)(null===(h=w.preset)||void 0===h?void 0:h.content),(0,v.pu)(null===(y=w.preset)||void 0===y?void 0:y.content),j=(null===(g=w.preset)||void 0===g||null===(g=g.content)||void 0===g||null===(g=g.brandAssets)||void 0===g?void 0:g.items)||[],"edit"===o&&i)P=(null==i||null===(A=i.content)||void 0===A||null===(A=A.brandAssets)||void 0===A?void 0:A.items)||[],M=null===(C=P.find((function(n){return"preset-brand-name"===(null==n?void 0:n.id)})))||void 0===C||null===(C=C.data)||void 0===C?void 0:C.text,$="string"==typeof M?M.trim():"",T=null===(O=j.find((function(n){return"preset-brand-name"===(null==n?void 0:n.id)})))||void 0===O||null===(O=O.data)||void 0===O?void 0:O.text,I="str
1ing"==typeof T?T.trim():"",D=String((null==i?void 0:i.name)||"").trim(),k=I&&I!==$?I:D||I||"Untitled Preset",S=null!==(L=null==i?void 0:i.id)&&void 0!==L?L:0;else{R=(null===(F=j.find((function(n){return"preset-brand-name"===(null==n?void 0:n.id)})))||void 0===F||null===(F=F.data)||void 0===F?void 0:F.text)||"",z="";try{z=new URL(l).hostname.replace(/^www\./,"")}catch(n){z=""}if(W=a&&a.trim()||R&&R.trim()||z||"Imported Preset",G=new Set(c.map((function(n){return String((null==n?void 0:n.name)||"").trim().toLowerCase()}))),k=W,G.has(k.toLowerCase())){for(H=2;G.has("".concat(W," (").concat(H,")").toLowerCase())&&H<1e3;)H++;k="".concat(W," (").concat(H,")")}S=0}return U={id:S,name:k,content:(null===(x=w.preset)||void 0===x?void 0:x.content)||{},default:!1},n.n=6,tn.A.getToken();case 6:return _=n.v,n.n=7,(0,E.Ay)("/presets",{method:"PUT",data:{preset:U,projectId:u.id},headers:_?{Authorization:"Bearer ".concat(_)}:{}});case 7:if(null!=(N=n.v)&&N.success){n.n=8;break}throw new Error("Server rejected the preset.");case 8:d(B.Uc(u.id,!1,!0)),f(),n.n=10;break;case 9:n.p=9,Z=n.v,b((null==Z?void 0:Z.message)||"Failed to save preset."),m(!1);case 10:return n.a(2)}}),n,null,[[3,9]])}))),[e,t,a,l,u,d,f,o,i,c])}}
1({editedResult:gn,checked:xn,mode:N,preset:Z,name:W,url:D,currentProject:J,existingPresets:cn,customFonts:X,dispatch:q,onClose:G}),Yn=Jn.saving,Kn=Jn.saveError,Xn=Jn.handleSave,Qn=Yn||"create"===N&&"running"===vn.status,ne=(0,r.useMemo)((function(){var n,e=null==gn||null===(n=gn.preset)||void 0===n||null===(n=n.content)||void 0===n||null===(n=n.brandAssets)||void 0===n?void 0:n.items;return Array.isArray(e)?e.filter((function(n){var e;return"image"===(null==n?void 0:n.type)&&(null==n?void 0:n.required)&&!(null!=n&&null!==(e=n.data)&&void 0!==e&&e.url)})).map((function(n){return(null==n?void 0:n.label)||"Logo"})):[]}),[gn]),ee=ne.length>0,te=(0,r.useMemo)((function(){var n;return gn?(0,v.OD)(null===(n=gn.preset)||void 0===n?void 0:n.content):new Set}),[gn]),re=(0,r.useMemo)((function(){var n;if(!gn)return 0;for(var e=0,t=(null===(n=gn.preset)||void 0===n?void 0:n.content)||{},r=0,o=Object.keys(t);r<o.length;r++){var i,a,l=fn((null===(i=t[o[r]])||void 0===i?void 0:i.items)||[]);try{for(l.s();!(a=l.n()).done;){var u=a.value;(null!=u&&u.required||null!=u&&u.id&&xn.has(u.id))&&e++}}catch(n){l.e(n)}finally{l.f()}}return e}),[gn,xn]),oe=null==gn||null===(e=gn.preset)||void 0===e?void 0:e.content,ie=(null==oe||null===(t=oe.brandAssets)||void 0===t?void 0:t.items)||[],ae=(null==oe||null===(A=oe.colors)||void 0===A?void 0:A.items)||[],le=(null==oe||null===(L=oe.textStyles)||void 0===L?void 0:L.items)||[],ue=(null==oe||null===(P=oe.buttonStyles)||void 0===P?void 0:P.items)||[],ce=(null==oe||null===(M=oe.socialNetworks)||void 0===M?void 0:M.items)||[],se=(null==oe||null===($=oe.menu)||void 0===$?void 0:$.items)||[],de=(null==oe||null===(T=oe.variables)||void 0===T?void 0:T.items)||[],fe="Scraping…";return gn&&("edit"===N||"done"===vn.status)?fe="".concat(re," of ").concat(te.size," items selected"):"error"===vn.status&&(fe="Scrape failed"),(0,dn.jsx)(a.A6,{show:!0,$padding:[30],style:an?{zIndex:90}:void 0,onClick:function(n){n.target!==n.currentTarget||Qn||Pn(G)},children:(0,dn.jsxs)(p.Zp,{children:[(0,dn.jsxs)(p.Y9,{children:[(0,dn.jsxs)("div",{children:[(0,dn.jsx)(p.gY,{children:"edit"===N?"Edit Brand Preset":"Import Preset From a Website"}),(0,dn.jsx)(p.d1,{children:(0,dn.jsx)(u.a,{onChange:Tn,options:Mn,value:$n,controlStyles:{borderRadius:"6px",fontSize:13},menuStyles:{borderRadius:"0 0 6px 6px"}})})]}),(0,dn.jsxs)(p.lX,{children:["edit"===N&&Z&&(0,dn.jsxs)(p.I8,{ref:Un,onClick:function(){Wn((function(n){return n&&Hn(!1),!n}))},"aria-label":"More options",role:"button",children:[(0,dn.jsx)(sn.$J,{}),zn&&(0,dn.jsx)(h.t,{anchorRef:Un,placement:"bottom-right",width:166,estimatedHeight:Gn?200:130,children:function(n){return(0,dn.jsx)(d.A,{height:"auto",preventPositionChange:!0,arrow:n,style:Gn?{animation:"none"}:void 0,items:Gn?[{html:'<div style="margin: -5px 0 0; color: #585D63;">Are you sure you want to <strong>delete</strong> this preset?</div>'},{name:"No, Cancel",startIcon:(0,dn.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,dn.jsx)("path",{d:"M13 3L3 13M3 3L13 13",stroke:"currentColor",strokeWidth:"2",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})}),onClick:function(n){var e;null==n||null===(e=n.stopPropagation)||void 0===e||e.call(n),qn()}},{name:"Yes, Delete",startIcon:(0,dn.jsx)(c.uc,{}),style:{hoverColor:"#F35151"},onClick:function(n){var e;null==n||null===(e=n.stopPropagation)||void 0===e||e.call(n),Vn()}}]:[{name:"Duplicate Preset",icon:(0,dn.jsx)(c.j,{}),onClick:_n},{name:"Reset Preset",icon:(0,dn.jsx)(s.G2,{}),disabled:!(null!=Z&&Z.updated),onClick:Nn},{name:"Delete Preset",icon:(0,dn.jsx)(c.uc,{}),style:{hoverColor:"#F35151"},disabled:(null==Z?void 0:Z.id)===f.CO.data.id,onClick:Zn}],version:d.r.unbordered},Gn?"confirm":"primary")}})]}),(0,dn.jsx)(p.Jn,{onClick:function(){return Pn(G)},"aria-label":"Close",disabled:Qn,children:(0,dn.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,dn.jsx)("path",{d:"M14 2L2 14M2 2L14 14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),"edit"===N&&Dn&&(0,dn.jsxs)(p.I,{children:[(0,dn.jsxs)(p.R_,{children:["This preset has been modified. Click ",(0,dn.jsx)("span",{children:"Publish Changes"})," to update all projects where this preset is currently in use."]}),(0,dn.jsx)(p.mb,{$publishing:Fn,onClick:Bn,disabled:Fn,children:Fn?"Publishing…":"Publish Changes"})]}),(0,dn.jsxs)(p.nB,{ref:mn,children:["create"===N&&(!gn||"done"!==vn.status)&&"error"!==vn.status&&(0,dn.jsxs)(p.au,{children:[(0,dn.jsx)(p.iu,{children:"Scanning the website…"}),l.BI.map((function(n){var e=vn.progress.find((function(e){return e.step===n})),t=(null==e?void 0:e.status)||"pending";return(0,dn.jsxs)(p.E,{$status:t,children:[(0,dn.jsx)(sn.kW,{status:t}),(0,dn.jsx)("span",{children:l.wQ[n]})]},n)}))]}),"create"===N&&"error"===vn.status&&(0,dn.jsx)(p.aV,{children:"Couldn’t load that website. Please try a different URL."}),gn&&("edit"===N||"done"===vn.status)&&(0,dn.jsxs)(p.GI,{children:[(0,dn.jsx)(m.X,{items:ie,onUpdate:Cn}),(0,dn.jsx)(y.o,{items:ie,checked:xn,onToggle:Sn,onBatchToggle:An,onUp
1date:Cn}),(0,dn.jsx)(g.U,{items:ae,checked:xn,onToggle:Sn,onBatchToggle:An,onUpdate:Cn}),(0,dn.jsx)(b.R,{items:le,checked:xn,onToggle:Sn,onBatchToggle:An,onUpdate:Cn}),(0,dn.jsx)(x.z,{items:ue,checked:xn,onToggle:Sn,onBatchToggle:An,onUpdate:Cn}),(0,dn.jsx)(w.N,{items:ce,checked:xn,onToggle:Sn,onBatchToggle:An,onAdd:On,onUpdate:Cn}),(0,dn.jsx)(j.H,{items:se,checked:xn,onToggle:Sn,onBatchToggle:An,onUpdate:Cn,defaultUrl:(null===(I=ie.find((function(n){return"preset-brand-website"===(null==n?void 0:n.id)})))||void 0===I||null===(I=I.data)||void 0===I?void 0:I.text)||""}),(0,dn.jsx)(k.f,{items:de,checked:xn,onToggle:Sn,onBatchToggle:An,onUpdate:Cn})]}),Kn&&(0,dn.jsx)(p.aV,{style:{margin:"20px auto 0"},children:Kn})]}),(0,dn.jsxs)(p.wi,{children:[(0,dn.jsxs)(p.bq,{children:[(0,dn.jsx)(p.jn,{onClick:Xn,disabled:Yn||!gn||"create"===N&&"done"!==vn.status||ee,title:ee?"Add ".concat(ne.join(" and ")," to enable save"):void 0,children:Yn?"Saving…":"edit"===N?"Save Changes":"Save Preset"}),(0,dn.jsx)(p.tA,{onClick:function(){if("create"===N&&"error"===vn.status)return G(),void q(i.vjJ(D));Pn(G)},disabled:Yn,children:"create"===N&&"error"===vn.status?"Try Different URL":"Cancel"})]}),ee&&(0,dn.jsx)(p.I,{style:{margin:0,flex:1},children:(0,dn.jsxs)(p.R_,{children:["Upload a logo for ",(0,dn.jsx)("span",{children:ne.join(" and ")})," before saving — empty required slots produce broken presets."]})}),(0,dn.jsx)(p.a5,{children:fe})]})]})})}},69711:(n,e,t)=>{t.d(e,{f:()=>d});var r=t(96540),o=t(7901),i=t(5203),a=t(91125),l=t(23527),u=t(74848);function c(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return s(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?s(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}var d=function(n){var e=n.variant,t=n.label,s=n.hint,d=n.children,f=n.onClick,p=n.frameHeight,v=c((0,r.useState)(!1),2),h=v[0],m=v[1],y=(0,r.useRef)(null),g="function"==typeof f;(0,i.A)(y,(function(){g||m(!1)})),(0,r.useEffect)((function(){if(!g&&h){var n=function(n){n.key===a.Zk&&(n.stopPropagation(),n.preventDefault(),m(!1))};return document.addEventListener("keydown",n,!0),function(){return document.removeEventListener("keydown",n,!0)}}}),[h,g]);var b="card"===e?l.xW:l.Gx,x="card"===e?l.Gq:l.$Z;return(0,u.jsxs)(b,{ref:y,"data-editor-open":!g&&h||void 0,onClick:function(){g?f():m(!0)},children:["card"===e?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(l.bw,{children:(0,u.jsx)(x,{className:"add-logo-frame",style:p?{height:p}:void 0,children:(0,u.jsx)(o.Wy,{})})}),(0,u.jsxs)(l.wL,{children:[(0,u.jsx)(l.Zb,{children:t}),s&&(0,u.jsx)(l.yr,{children:s})]})]}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(x,{className:"add-logo-frame",children:(0,u.jsx)(o.Wy,{})}),(0,u.jsxs)(l.ZZ,{children:[(0,u.jsx)(l.Zb,{children:t}),s&&(0,u.jsx)(l.yr,{children:s})]})]}),!g&&h&&d&&(0,u.jsx)(l.TG,{onClick:function(n){return n.stopPropagation()},children:(0,u.jsx)(l.se,{children:d((function(){return m(!1)}))})})]})}},99827:(n,e,t)=>{t.d(e,{P:()=>p});var r=t(96540),o=t(40961),i=t(61225),a=t(29649),l=t(91125),u=t(23527),c=t(97063),s=t(27600),d=t(5735),f=t(74848),p=function(n){var e=n.item,t=n.onChange,p=n.open,v=n.onOpenChange,h=(0,r.useRef)(null),m=(0,r.useRef)(null),y=(0,i.d4)((function(n){var e;return n.application.showCustomFontsWindow||!(null===(e=n.application.customFontEditWindow)||void 0===e||!e.open)})),g=(0,i.d4)((function(n){var e;return!(null==n||null===(e=n.imageLibrary)||void 0===e||null===(e=e.showImageLibraryDialog)||void 0===e||!e.open)})),b=y||g;(0,c.$)(h,m,p&&!b,(function(){return v(!1)}));
1var x=(0,s.e)(h,p,"[data-popover-host]",m),w=(0,d.R)(p,m);return(0,r.useEffect)((function(){if(p&&!b){var n=function(n){n.key===l.Zk&&(n.stopPropagation(),n.preventDefault(),v(!1))};return document.addEventListener("keydown",n,!0),function(){return document.removeEventListener("keydown",n,!0)}}}),[p,b,v]),(0,f.jsx)(u.LK,{ref:h,$placement:"corner",$open:p,"data-editor-open":p||void 0,onClick:function(n){return n.stopPropagation()},children:p&&x&&(0,o.createPortal)((0,f.jsxs)(u.TG,{ref:m,$bare:!0,style:{left:x.left,top:x.top,maxHeight:x.maxHeight,transform:"translate(".concat(w.offset.x,"px, ").concat(w.offset.y,"px)"),cursor:w.dragging?"grabbing":"default",zIndex:b?95:void 0,visibility:x.measured?"visible":"hidden"},onClick:function(n){return n.stopPropagation()},children:[(0,f.jsx)(u.tk,{onMouseDown:w.onMouseDown,style:{cursor:w.dragging?"grabbing":"grab"}}),(0,f.jsx)(u.dy,{children:(0,f.jsx)(a.A,{item:e,onChange:t,hideClearFormatting:!0,hideMore:!0})})]}),document.body)})}},1063:(n,e,t)=>{t.d(e,{$:()=>d});var r=t(96540),o=t(91125),i=t(26571),a=t(97063),l=t(23527),u=t(74848);function c(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return s(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?s(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}var d=function(n){var e=n.color,t=n.onChange,s=n.children,d=n.fill,f=n.defaultOpen,p=void 0!==f&&f,v=n.open,h=n.onOpenChange,m=c((0,r.useState)(p),2),y=m[0],g=m[1],b=void 0!==v,x=b?v:y,w=function(n){b?null==h||h(n):g(n)},j=(0,r.useRef)(null),k=(0,r.useRef)(null),S=c((0,r.useState)({x:0,y:0}),2),A=S[0],C=S[1],O=c((0,r.useState)(!1),2),L=O[0],P=O[1];(0,r.useEffect)((function(){x||(C({x:0,y:0}),P(!1))}),[x]),(0,a.$)(j,k,x,(function(){return w(!1)})),(0,r.useEffect)((function(){if(x){var n=function(n){n.key===o.Zk&&(n.stopPropagation(),n.preventDefault(),w(!1))};return document.addEventListener("keydown",n,!0),function(){return document.removeEventListener("keydown",n,!0)}}}),[x]);var E=r.cloneElement(s,{onClick:function(n){n.stopPropagation(),w(!x)}});return(0,u.jsxs)(l.dT,{ref:j,$fill:d,onClick:function(n){return n.stopPropagation()},children:[E,x&&(0,u.jsx)(l.vI,{ref:k,$dragging:L,onMouseDown:function(n){if(0===n.button&&!n.target.closest('input, select, button, textarea, [data-undraggable="true"], .dragController')){n.preventDefault();var e=n.clientX,t=n.clientY,r=A.x,o=A.y;P(!0);var i=function(n){C({x:r+(n.clientX-e),y:o+(n.clientY-t)})},a=function(){P(!1),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}},style:{transform:"translate(".concat(A.x,"px, ").concat(A.y,"px)")},children:(0,u.jsx)(i.A,{color:e,active:!0,hideSwatches:!0,onChange:function(n){null!=n&&n.hex&&t(n.hex)},onChangeComplete:function(n){null!=n&&n.hex&&t(n.hex)}})})]})}},16638:(n,e,t)=>{t.d(e,{S:()=>p});var r=t(96540),o=t(40961),i=t(61225),a=t(94392),l=t(91125),u=t(23527),c=t(97063),s=t(27600),d=t(5735),f=t(74848),p=function(n){var e=n.item,t=n.onChange,p=n.placement,v=void 0===p?"side":p,h=n.open,m=n.onOpenChange,y=(0,r.useRef)(null),g=(0,r.useRef)(null),b=(0,i.d4)((function(n){var e;return n.application.showCustomFontsWindow||!(null===(e=n.application.customFontEditWindow)||void 0===e||!e.open)}));(0,r.useEffect)((function(){h&&b&&m(!1)}),[h,b,m]),(0,c.$)(y,g,h,(function(){return m(!1)}));
1var x=(0,s.e)(y,h,"[data-popover-host]",g),w=(0,d.R)(h,g);return(0,r.useEffect)((function(){if(h){var n=function(n){n.key===l.Zk&&(n.stopPropagation(),n.preventDefault(),m(!1))};return document.addEventListener("keydown",n,!0),function(){return document.removeEventListener("keydown",n,!0)}}}),[h,m]),(0,f.jsx)(u.LK,{ref:y,$placement:v,$open:h,"data-editor-open":h||void 0,onClick:function(n){return n.stopPropagation()},children:h&&x&&(0,o.createPortal)((0,f.jsxs)(u.TG,{ref:g,$bare:!0,style:{left:x.left,top:x.top,maxHeight:x.maxHeight,transform:"translate(".concat(w.offset.x,"px, ").concat(w.offset.y,"px)"),cursor:w.dragging?"grabbing":"default",visibility:x.measured?"visible":"hidden"},onClick:function(n){return n.stopPropagation()},children:[(0,f.jsx)(u.tk,{onMouseDown:w.onMouseDown,style:{cursor:w.dragging?"grabbing":"grab"}}),(0,f.jsx)(u.dy,{children:(0,f.jsx)(a.A,{item:e,onChange:t,hideClearFormatting:!0})})]}),document.body)})}},4702:(n,e,t)=>{t.d(e,{O:()=>p});var r=t(96540),o=t(58467),i=t(23527),a=t(50290),l=t(84999),u=t(74848);function c(n){return function(n){if(Array.isArray(n))return f(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||d(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||d(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(n,e){if(n){if("string"==typeof n)return f(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?f(n,e):void 0}}function f(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}var p=function(n){var e=n.variant,t=n.subject,d=n.onEdit,f=n.onDuplicate,p=n.onDelete,v=s((0,r.useState)(!1),2),h=v[0],m=v[1],y=s((0,r.useState)(!1),2),g=y[0],b=y[1],x=(0,r.useRef)(null),w=function(){m(!1),b(!1)};(0,r.useEffect)((function(){if(h){var n=function(n){var e=n.target;x.current&&x.current.contains(e)||e instanceof Element&&e.closest('[data-floating-portal="true"]')||w()};return document.addEventListener("mousedown",n),function(){return document.removeEventListener("mousedown",n)}}}),[h]);var j="card"===e?i.yv:i.Y8,k=[].concat(c(d?[{name:"Edit",icon:(0,u.jsx)(a.qU,{}),onClick:function(n){var e;null==n||null===(e=n.stopPropagation)||void 0===e||e.call(n),w(),d()}}]:[]),c(f?[{name:"Duplicate",icon:(0,u.jsx)(a.j,{}),onClick:function(n){var e;null==n||null===(e=n.stopPropagation)||void 0===e||e.call(n),w(),f()}}]:[]),c(p?[{name:"Delete",icon:(0,u.jsx)(a.uc,{}),style:{hoverColor:"#F35151"},onClick:function(n){var e;null==n||null===(e=n.stopPropagation)||void 0===e||e.call(n),b(!0)}}]:[]));return(0,u.jsxs)(j,{ref:x,className:"more-btn","aria-label":"More actions for this ".concat(t),"data-editor-open":h?"true":void 0,style:h?{opacity:1,color:"#2198ED"}:void 0,onClick:function(n){n.stopPropagation(),h?w():m(!0)},children:[(0,u.jsx)(a.$J,{}),h&&(0,u.jsx)(l.t,{anchorRef:x,placement:"bottom-center",width:166,estimatedHeight:g?170:36*k.length+20,children:function(n){return(0,u.jsx)(o.A,{width:"166px",height:"auto",preventPositionChange:!0,arrow:n,style:g?{animation:"none"}:void 0,items:g?[{html:'<div style="margin: -5px 0 0; color: #585D63;">Do you really want to <strong>delete</strong> this '.concat(t,"?</div>")},{name:"No, Cancel",startIcon:(0,u.jsx)(a.gr,{}),onClick:function(n){var e;null==n||null===(e=n.stopPropagation)||void 0===e||e.call(n),w()}},{name:"Yes, Delete",startIcon:(0,u.jsx)(a.uc,{}),style:{hoverColor:"#F35151"},onClick:function(n){var e;null==n||null===(e=n.stopPropagation)||void 0===e||e.call(n),w(),null==p||p()}}]:k,version:o.r.unbordered},g?"confirm":"primary")}})]})}},28112:(n,e,t)=>{t.d(e,{U:()=>p});var r=t(96540),o=t(40961),i=t(61225),a=t(24350),l=t(91125),u=t(23527),c=t(97063),s=t(27600),d=t(5735),f=t(74848),p=function(n){var e=n.item,t=n.onChange,p=n.open,v=n.onOpenChange,h=(0,r.useRef)(null),m=(0,r.useRef)(null);(0,c.$)(h,m,p,(function(){return v(!1)}));
1var y=(0,s.e)(h,p,"[data-popover-host]",m),g=(0,d.R)(p,m),b=(0,i.d4)((function(n){var e;return!(null==n||null===(e=n.imageLibrary)||void 0===e||null===(e=e.showImageLibraryDialog)||void 0===e||!e.open)}));return(0,r.useEffect)((function(){p&&b&&v(!1)}),[p,b,v]),(0,r.useEffect)((function(){if(p){var n=function(n){n.key===l.Zk&&(n.stopPropagation(),n.preventDefault(),v(!1))};return document.addEventListener("keydown",n,!0),function(){return document.removeEventListener("keydown",n,!0)}}}),[p,v]),(0,f.jsx)(u.LK,{ref:h,$placement:"corner",$open:p,"data-editor-open":p||void 0,onClick:function(n){return n.stopPropagation()},children:p&&y&&(0,o.createPortal)((0,f.jsx)(u.TG,{ref:m,$bare:!0,style:{left:y.left,top:y.top,maxHeight:y.maxHeight,transform:"translate(".concat(g.offset.x,"px, ").concat(g.offset.y,"px)"),cursor:g.dragging?"grabbing":"grab",visibility:y.measured?"visible":"hidden"},onMouseDown:g.onMouseDown,onClick:function(n){return n.stopPropagation()},children:(0,f.jsx)(a.A,{item:e,onChange:t})}),document.body)})}},22536:(n,e,t)=>{t.d(e,{W:()=>c});var r=t(96540),o=t(7501);function i(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return a(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?a(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}var l=t(23527),u=t(74848),c=function(n){var e=n.url,t=n.label,a=e?(0,o.FBD)(e):e,c=function(n){var e=i((0,r.useState)(null),2),t=e[0],o=e[1];return(0,r.useEffect)((function(){if(n){var e=!1,t=new Image;return n.startsWith("data:")||(t.crossOrigin="anonymous"),t.onload=function(){if(!e)try{var n=document.createElement("canvas"),r=n.width=64,i=n.height=64,a=n.getContext("2d");if(!a)return void o(null);a.drawImage(t,0,0,r,i);for(var l=a.getImageData(0,0,r,i).data,u=0,c=0,s=0;s<l.length;s+=4)l[s+3]<32||(u+=.299*l[s]+.587*l[s+1]+.114*l[s+2],c++);e||o(c>0?u/c>200:null)}catch(n){e||o(null)}},t.onerror=function(){e||o(null)},t.src=n,function(){e=!0}}o(null)}),[n]),t}(a),s=null==t?void 0:t.toLowerCase().includes("bright"),d=null===c?s:c;return(0,u.jsx)(l.V7,{$dark:d,children:(0,u.jsx)("img",{src:a,alt:t||""})})}},32583:(n,e,t)=>{t.d(e,{B8:()=>p,BO:()=>i,FD:()=>d,G0:()=>v,Ij:()=>c,RJ:()=>r,Wb:()=>s,_u:()=>o,fI:()=>l,fk:()=>u,jd:()=>a,xk:()=>f});var r="The quick brown fox jumps over the lazy dog",o=["Airbnb","Amazon","Behance","Codepen","Discord","Discourse","Dribbble","Dropbox","Etsy","Facebook","Facebook Messenger","GitHub","GitLab","Google Play","Instagram","Intercom","Kickstarter","Line","Linkedin","Medium","Meetup","PayPal","Pinterest","Product Hunt","Shopify","Skype","Slack","Soundcloud","Spotify","Stack Overflow","Telegram","TikTok","Twitch","TwitterX","Vimeo","Waze","WhatsApp","Yelp","YouTube","Zhihu"],i=["spacings","radius","fontFamily","fontSize","fontStyle","lineHeight","letterSpacing","textTransform"],a="url(\"data:image/svg+xml;utf8,<svg width='9' height='6' viewBox='0 0 9 6' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M1 1.5L4.5 4.5L8 1.5' stroke='%23AAB2BB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>\")",l=["Black","Charcoal","Gray","Silver","White","Red","Orange","Amber","Yellow","Lime","Green","Teal","Cyan","Blue","Indigo","Purple","Magenta","Pink"],u=["Light ","Deep ","Muted "],c=[{id:"preset-brand-dark-logo",label:"Dark Logo"},{id:"preset-brand-bright-logo",label:"Bright Logo"}],s=25,d=new Set(["socialNetworks","menu"]),f=240,p=8,v=10},84447:(n,e,t)=>{t.d(e,{B_:()=>_,OD:()=>V,Qi:()=>Y,Wd:()=>H,Wm:()=>F,_G:()=>$,ax:()=>L,gV:()=>A,gj:()=>U,ir:()=>Z,lQ:()=>W,mj:()=>P,ni:()=>G,pu:()=>J,qD:()=>q,wA:()=>M,x6:()=>C,z$:()=>E});var r=t(37107),o=t(37875),i=t(95354),a=t(7501),l=t(54347),u=t(55380),c=t(37907),s=t(45663),d=t(32583);function f(){var n,e,t="function"==typeof Symbol?Symbol:{},r=t.iterator||"@@iterator",o=t.toStringTag||"@@toStringTag";function i(t,r,o,i){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return p(c,"_invoke",function(t,r,o){var i,l,u,c=0,s=o||[],d=!1,f={p:0,n:0,v:n,a:p,f:p.bind(n,4),d:function(e,t){return i=e,l=0,u=n,f.n=t,a}};function p(t,r){for(l=t,u=r,e=0;!d&&c&&!o&&e<s.length;e++){var o,i=s[e],p=f.p,v=i[2];t>3?(o=v===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=n):i[0]<=p&&((o=t<2&&p<i[1])?(l=0,f.v=r,f.n=i[1]):p<v&&(o=t<3||i[0]>r||r>v)&&(i[4]=t,i[5]=r,f.n=v,l=0))}if(o||t>1)return a;throw d=!0,r}return function(o,s,v){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&p(s,v),l=s,u=v;(e=l<2?n:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),p(l,u)):f.n=u:f.v=u);
1try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=n}else if((e=(d=f.n<0)?u:t.call(r,f))!==a)break}catch(e){i=n,l=1,u=e}finally{c=1}}return{value:e,done:d}}}(t,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(p(e={},r,(function(){return this})),e),d=c.prototype=l.prototype=Object.create(s);function v(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,c):(n.__proto__=c,p(n,o,"GeneratorFunction")),n.prototype=Object.create(d),n}return u.prototype=c,p(d,"constructor",c),p(c,"constructor",u),u.displayName="GeneratorFunction",p(c,o,"GeneratorFunction"),p(d),p(d,o,"Generator"),p(d,r,(function(){return this})),p(d,"toString",(function(){return"[object Generator]"})),(f=function(){return{w:i,m:v}})()}function p(n,e,t,r){var o=Object.defineProperty;try{o({},"",{})}catch(n){o=0}p=function(n,e,t,r){function i(e,t){p(n,e,(function(n){return this._invoke(e,t,n)}))}e?o?o(n,e,{value:t,enumerable:!r,configurable:!r,writable:!r}):n[e]=t:(i("next",0),i("throw",1),i("return",2))},p(n,e,t,r)}function v(n){return function(n){if(Array.isArray(n))return k(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||j(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(n){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},h(n)}function m(n,e,t,r,o,i,a){try{var l=n[i](a),u=l.value}catch(n){return void t(n)}l.done?e(u):Promise.resolve(u).then(r,o)}function y(n){return function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(n){m(i,r,o,a,l,"next",n)}function l(n){m(i,r,o,a,l,"throw",n)}a(void 0)}))}}function g(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function b(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?g(Object(t),!0).forEach((function(e){x(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function x(n,e,t){return(e=function(n){var e=function(n,e){if("object"!=h(n)||!n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"==h(e)?e:e+""}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function w(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=j(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var r=0,o=function(){};return{s:o,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return a=n.done,n},e:function(n){l=!0,i=n},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function j(n,e){if(n){if("string"==typeof n)return k(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?k(n,e):void 0}}function k(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}var S={"font/woff2":"woff2","application/font-woff2":"woff2","font/woff":"woff","application/font-woff":"woff","font/ttf":"ttf","font/sfnt":"ttf","application/x-font-ttf":"ttf","application/x-font-truetype":"ttf","font/otf":"otf","application/x-font-opentype":"otf","application/vnd.ms-opentype":"otf"};function A(n){return n?n.startsWith("data:image/svg")||/\.svg(\?|$)/i.test(n)?"SVG":/\.png(\?|$)/i.test(n)?"PNG":/\.jpe?g(\?|$)/i.test(n)?"JPG":/\.webp(\?|$)/i.test(n)?"WEBP":n.startsWith("data:image/png")?"PNG":"IMG":""}function C(n){var e=(n||"").trim();return e?/^[a-z][a-z0-9+.-]*:\/\//i.test(e)||/^mailto:/i.test(e)?e:"https://".concat(e):""}var O={};function L(n){var e=i.MV[n];if(!e)return"";if(O[e])return O[e];var t=o.Cvc[e];if(!t)return"";var a=(0,r.Kk)(t),l=a&&a.html&&a.html[0];return"string"==typeof l&&l?(O[e]=l,l):""}function P(n){var e=function(n){var e=/^#?([0-9a-f]+)$/i.exec((n||"").trim());if(!e)return null;var t=e[1];if((3===t.length||4===t.length)&&(t=t.split("").map((function(n){return n+n})).join("")),6!==t.length&&8!==t.length)return null;var r=parseInt(t.slice(0,2),16)/255,o=parseInt(t.slice(2,4),16)/255,i=parseInt(t.slice(4,6),16)/255;if([r,o,i].some(Number.isNaN))return null;var a=Math.max(r,o,i),l=Math.min(r,o,i),u=(a+l)/2,c=0,s=0;if(a!==l){var d=a-l;s=u>.5?d/(2-a-l):d/(a+l),c=a===r?(o-i)/d+(o<i?6:0):a===o?(i-r)/d+2:(r-o)/d+4,c*=60}return{h:c,s,l:u}}(n);if(!e)return(n||"").toUpperCase();var t=e.h,r=e.s,o=e.l;if(r<.08)return o<.08?"Black":o<.25?"Charcoal":o<.55?"Gray":o<.85?"Silver":"White";var i,a=(t%360+360)%360;i=a<15?"Red":a<30?"Orange":a<45?"Amber":a<65?"Yellow":a<90?"Lime":a<150?"Green":a<180?"Teal":a<210?"Cyan":a<240?"Blue":a<270?"Indigo":a<300?"Purple":a<330?"Magenta":a<345?"Pink":"Red";var l="";return o<.3?l="Deep ":o>.7?l="Light ":r<.3&&(l="Muted "),"".concat(l).concat(i)}function E(n){if("string"!=typeof n)return!1;var e=n.trim();if(!e)return!1;if(/^#[0-9a-f]{3,8}$/i.test(e))return!0;var t=e.replace(/\s+\d+$/,"");if(d.fI.includes(t))return!0;var r,o=w(d.fk);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(t.startsWith(i)&&d.fI.includes(t.slice(i.length)))return!0}}catch(n){o.e(n)}finally{o.f()}return!1}function M(n,e){var t,r=b({},e),o=w(d.BO);try{for(o.s();!(t=o.n()).done;){var i=t.value;"spacings"===i&&n[i]?r[i]=JSON.parse(JSON.stringify(n[i])):void 0!==n[i]&&(r[i]=n[i])}}catch(n){o.e(n)}finally{o.f()}return r}function $(n,e,t,r){return T.apply(this,arguments)}function T(){return T=y(f().m((function n(e,t,r,o){var i,a,c,s,d,p,h,m,g,b,x,j,k,A,C,O,L,P,E,M,$,T;return f().w((function(n){for(;;)switch(n.p=n.n){case 0:c=(null==e||null===(i=e.textStyles)||void 0===i?void 0:i.items)||[],s=(null==e||null===(a=e.buttonStyles)||void 0===a?void 0:a.items)||[],d=[].concat(v(c),v(s)),p=new Map,h=new Set,m=w(o||[]),n.p=1,m.s();case 2:if((g=m.n()).done){n.n=5;break}
1if(b=g.value,x=String((null==b?void 0:b.family)||"").trim().toLowerCase()){n.n=3;break}return n.a(3,4);case 3:h.add("".concat(x,"|").concat(String((null==b?void 0:b.weight)||"400"),"|").concat(String((null==b?void 0:b.style)||"normal")));case 4:n.n=2;break;case 5:n.n=7;break;case 6:n.p=6,$=n.v,m.e($);case 7:return n.p=7,m.f(),n.f(7);case 8:j=w(d),n.p=9,j.s();case 10:if((k=j.n()).done){n.n=16;break}if(A=k.value,null!=(C=null==A?void 0:A.data)&&C.userFontFamily&&C.fontFamilyLink){n.n=11;break}return n.a(3,15);case 11:if(O=String(C.fontFamily||"").trim()){n.n=12;break}return n.a(3,15);case 12:if(L=String(C.fontWeight||C.fontStyle||"400").replace(/italic|normal/g,"")||"400",P=String(C.fontStyle||"").includes("italic")?"italic":"normal",E="".concat(O.toLowerCase(),"|").concat(L,"|").concat(P),!p.has(E)){n.n=13;break}return n.a(3,15);case 13:if(!h.has(E)){n.n=14;break}return n.a(3,15);case 14:M=C.fontFamilyLink;try{M=new URL(C.fontFamilyLink,r).href}catch(n){}p.set(E,{family:O,weight:L,style:P,url:M});case 15:n.n=10;break;case 16:n.n=18;break;case 17:n.p=17,T=n.v,j.e(T);case 18:return n.p=18,j.f(),n.f(18);case 19:if(0!==p.size){n.n=20;break}return n.a(2);case 20:return n.n=21,Promise.allSettled(Array.from(p.values()).map(function(){var n=y(f().m((function n(e){var r,o,i,a,c,s,d,p,v,h,m;return f().w((function(n){for(;;)switch(n.p=n.n){case 0:return n.p=0,n.n=1,fetch(e.url,{mode:"cors",credentials:"omit"});case 1:if((r=n.v).ok){n.n=2;break}return console.warn("[brand-scraper] font fetch failed (".concat(r.status,") — ").concat(e.family," ").concat(e.weight,": ").concat(e.url)),n.a(2);case 2:return n.n=3,r.blob();case 3:o=n.v,i="";try{i=new URL(e.url).pathname.split("/").pop()||""}catch(n){i=""}return/\.(woff2|woff|ttf|otf)$/i.test(i)?a=i:(c=S[(o.type||"").toLowerCase()]||"woff2",s=e.family.replace(/[^\w-]+/g,"-").replace(/^-+|-+$/g,"")||"font",a="".concat(s,"-").concat(e.weight,".").concat(c)),d=new File([o],a,{type:o.type||"font/woff2"}),p={id:"pre-".concat(Math.random().toString(36).slice(2,10)),family:e.family,weight:e.weight,style:e.style,filename:a,size:d.size,file:d},n.n=4,(0,u.Sv)(p);case 4:v=n.v,(h=(null==v?void 0:v.font)||v)&&h.id&&t(l.uTn(h)),n.n=6;break;case 5:n.p=5,m=n.v,console.warn("[brand-scraper] font import failed — ".concat(e.family," ").concat(e.weight,":"),m);case 6:return n.a(2)}}),n,null,[[0,5]])})));return function(e){return n.apply(this,arguments)}}()));case 21:return n.a(2)}}),n,null,[[9,17,18,19],[1,6,7,8]])}))),T.apply(this,arguments)}function I(n){var e=String((null==n?void 0:n.id)||"").toLowerCase();if(e.includes("dark-logo")||e.includes("-dark")||e.endsWith("dark"))return!0;var t=String((null==n?void 0:n.label)||"").toLowerCase();return/\b(dark|black)\b/.test(t)}function D(n){var e=String(n||"").trim().toLowerCase();if(!e)return null;if("white"===e)return"#ffffff";if("black"===e)return"#000000";if(/^#[0-9a-f]{6}$/.test(e))return e;if(/^#[0-9a-f]{8}$/.test(e))return e.slice(0,7);if(/^#[0-9a-f]{3}$/.test(e))return"#".concat(e[1]).concat(e[1]).concat(e[2]).concat(e[2]).concat(e[3]).concat(e[3]);var t=e.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);if(t){var r=function(n){return Math.max(0,Math.min(255,n)).toString(16).padStart(2,"0")};return"#".concat(r(+t[1])).concat(r(+t[2])).concat(r(+t[3]))}return null}function F(n){var e=D(n);return!!e&&.299*parseInt(e.slice(1,3),16)+.587*parseInt(e.slice(3,5),16)+.114*parseInt(e.slice(5,7),16)>200}function B(n){if(!n.startsWith("data:image/svg+xml"))return null;var e=n.match(/^data:image\/svg\+xml(?:;charset=[^;,]*)?(;base64)?,(.*)$/);if(!e)return null;try{return e[1]?atob(e[2]):decodeURIComponent(e[2])}catch(n){return null}}function R(n){for(var e,t=[],r=/\bfill\s*=\s*["']([^"']+)["']/gi;null!==(e=r.exec(n));)t.push(e[1]);return 0!==t.length&&t.every((function(n){return"none"===n||"currentColor"===n||F(n)}))}function z(n,e){return n.replace(/\bfill\s*=\s*["']rgb\(\s*255\s*,\s*255\s*,\s*255\s*\)["']/gi,'fill="'.concat(e,'"')).replace(/\bfill\s*=\s*["']rgba\(\s*255\s*,\s*255\s*,\s*255[^)]*\)["']/gi,'fill="'.concat(e,'"')).replace(/\bfill\s*=\s*["']#[fF]{3}(?:[fF]{3})?["']/g,'fill="'.concat(e,'"')).replace(/\bfill\s*=\s*["']white["']/gi,'fill="'.concat(e,'"')).replace(/(\bstyle\s*=\s*["'][^"']*?\bfill\s*:\s*)(?:rgb\(\s*255\s*,\s*255\s*,\s*255\s*\)|rgba\(\s*255[^)]*\)|#[fF]{3}(?:[fF]{3})?|white)\b/gi,"$1".concat(e))}function W(n){var e,t=null==n||null===(e=n.brandAssets)||void 0===e?void 0:e.items;if(Array.isArray(t)&&0!==t.length){var r,o=function(n){var e,t,r=w(Array.isArray(null==n||null===(e=n.textStyles)||void 0===e?void 0:e.items)?n.textStyles.items:[]);try{for(r.s();!(t=r.n()).done;){var o,i=t.value,a=null==i||null===(o=i.data)||void 0===o?void 0:o.color;if("string"==typeof a&&a.trim()&&!F(a)){var l=D(a);if(l)return l}}}catch(n){r.e(n)}finally{r.f()}return"#111"}(n),i=w(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;try{var l;if(!I(a))continue;var u=null==a||null===(l=a.data)||void 0===l?void 0:l.url;if("string"!=typeof u||!u)continue;var c=B(u);if(!c)continue;if(!R(c))continue;var s=z(c,o);if(s===c)continue;a.data.url="data:image/svg+xml;base64,".concat(btoa(unescape(encodeURIComponent(s))))}catch(n){console.warn("[brand-scraper] recolor failed for ".concat((null==a?void 0:a.id)||(null==a?void 0:a.label)||"?",":"),n)}}}catch(n){i.e(n)}finally{i.f()}}}function G(n){n&&"object"===h(n)&&(n.variables&&Array.isArray(n.variables.items)||(n.variables={items:[]}))}function H(n){var e;if(n&&"object"===h(n)){var t=null===(e=n.brandAssets)||void 0===e?void 0:e.items;if(Array.isArray(t))if(!t.some((function(n){return"image"===(null==n?void 0:n.type)&&(null==n?void 0:n.required)}))){var r,o=w(d.Ij);try{var i=function(){var n=r.value;if(t.some((function(e){return(null==e?void 0:e.id)===n.id})))return 1;t.push({id:n.id,label:n.label,type:"image",required:!0,data:{url:"",size:{width:"",height:d.Wb}}})};for(o.s();!(r=o.n()).done;)i()}catch(n){o.e(n)}finally{o.f()}}}}function U(n,e){var t,r;if(n&&"object"===h(n)){var o="";try{var i=new URL(e);o="".concat(i.protocol,"//").concat(i.hostname)}catch(n){return}if(o){var a=null===(t=n.brandAssets)||void 0===t?void 0:t.items;
1if(Array.isArray(a))a.find((function(n){return"preset-brand-website"===(null==n?void 0:n.id)}))||a.push({id:"preset-brand-website",label:"Website",type:"text",required:!1,data:{text:o}});var l=null===(r=n.menu)||void 0===r?void 0:r.items;if(Array.isArray(l)){var u=function(n){return String(n||"").replace(/\/+$/,"").toLowerCase()};l.some((function(n){var e;return u(null==n||null===(e=n.data)||void 0===e||null===(e=e.link)||void 0===e?void 0:e.url)===u(o)}))||l.unshift({id:"preset-menu-website-".concat(Math.random().toString(36).slice(2,8)),data:{text:"Website",link:{url:o,blank:!0}}})}}}}function _(n){return N.apply(this,arguments)}function N(){return(N=y(f().m((function n(e){var t,r,o,i,a,l,u,s,d,p,v,h,m,y,g,b,x,j,k,S,A,C,O,L,P,E,M;return f().w((function(n){for(;;)switch(n.p=n.n){case 0:if(r=null==e||null===(t=e.brandAssets)||void 0===t?void 0:t.items,Array.isArray(r)){n.n=1;break}return n.a(2);case 1:o=new Map,i=w(r),n.p=2,i.s();case 3:if((a=i.n()).done){n.n=14;break}if(l=a.value,u=null==l?void 0:l.data,"string"==typeof(s=null==u?void 0:u.url)&&s){n.n=4;break}return n.a(3,13);case 4:if(!(/^project-\d+\//.test(s)||/^user-\d+\//.test(s)||/^https?:\/\/[^/]*designmodo\.com\//.test(s))){n.n=5;break}return n.a(3,13);case 5:if(n.p=5,d=o.get(s)){n.n=11;break}return n.n=6,fetch(s,{mode:"cors",credentials:"omit"});case 6:if((h=n.v).ok){n.n=7;break}return console.warn("[brand-scraper] logo fetch failed (".concat(h.status,"): ").concat(s.slice(0,80))),n.a(3,13);case 7:return n.n=8,h.blob();case 8:if(m=n.v,y="",s.startsWith("data:"))j=m.type||(null!==(g=null===(b=s.match(/^data:([^;]+)/))||void 0===b?void 0:b[1])&&void 0!==g?g:""),k=(null===(x=j.split("/")[1])||void 0===x?void 0:x.split("+")[0])||"png",S=(null==l?void 0:l.id)||"brand-asset-".concat(Math.random().toString(36).slice(2,8)),y="".concat(S,".").concat(k);else{try{A=new URL(s),y=A.pathname.split("/").pop()||""}catch(n){y=""}y||(C=(null==l?void 0:l.id)||"brand-asset-".concat(Math.random().toString(36).slice(2,8)),y="".concat(C,".").concat((m.type.split("/")[1]||"png").split("+")[0]))}return O=new File([m],y,{type:m.type||"application/octet-stream"}),n.n=9,(0,c.mF)(O,null,!0);case 9:if(L=n.v,null!=(P=(null==L||null===(p=L.items)||void 0===p?void 0:p[0])||(null==L||null===(v=L.data)||void 0===v||null===(v=v.items)||void 0===v?void 0:v[0]))&&P.url){n.n=10;break}return console.warn("[brand-scraper] image library returned no url for ".concat(y)),n.a(3,13);case 10:d=P.url,o.set(s,d);case 11:u.url=d,u.isUpload=!0,n.n=13;break;case 12:n.p=12,E=n.v,console.warn("[brand-scraper] logo import failed for slot ".concat((null==l?void 0:l.id)||"(unknown)",":"),E);case 13:n.n=3;break;case 14:n.n=16;break;case 15:n.p=15,M=n.v,i.e(M);case 16:return n.p=16,i.f(),n.f(16);case 17:return n.a(2)}}),n,null,[[5,12],[2,15,16,17]])})))).apply(this,arguments)}function Z(n,e,t){var r=n.findIndex((function(n){return n.id===e}));if(r<0)return n;var o=b(b({},n[r]),{},{id:t,required:!1}),i=v(n);return i.splice(r+1,0,o),i}function V(n){for(var e=new Set,t=0,r=Object.values(n||{});t<r.length;t++){var o=r[t],i=null==o?void 0:o.items;if(Array.isArray(i)){var a,l=w(i);try{for(l.s();!(a=l.n()).done;){var u=a.value;null!=u&&u.hidden||null!=u&&u.id&&e.add(u.id)}}catch(n){l.e(n)}finally{l.f()}}}return e}function q(n){var e,t,r,o={},l=w((null==n||null===(e=n.colors)||void 0===e?void 0:e.items)||[]);try{for(l.s();!(r=l.n()).done;){var u,c=r.value;null!=c&&c.id&&"string"==typeof(null==c||null===(u=c.data)||void 0===u?void 0:u.color)&&(o[c.id]={color:c.data.color,version:(0,s.RZ)(c.data)})}}catch(n){l.e(n)}finally{l.f()}var d,f=function(n){if(Array.isArray(n)){var e,t,r=w(n);try{for(r.s();!(t=r.n()).done;){var a=t.value;"string"==typeof(null==a?void 0:a.id)&&a.id.startsWith(i.zC)&&void 0!==o[a.id]&&(a.version=o[a.id].version,void 0===e&&(e=o[a.id].color))}}catch(n){r.e(n)}finally{r.f()}return e}},p=w((null==n||null===(t=n.buttonStyles)||void 0===t?void 0:t.items)||[]);try{for(p.s();!(d=p.n()).done;){var v,h,m=d.value,y=null==m?void 0:m.data;if(y){var g=f(null===(v=y.background)||void 0===v?void 0:v.presets);void 0!==g&&(y.backgroundColor=g);var b=f(y.presets);void 0!==b&&(y.color=b);var x=f(null===(h=y.border)||void 0===h?void 0:h.presets);void 0!==x&&(y.border=(0,a.e2B)(y.border,x))}}}catch(n){p.e(n)}finally{p.f()}}function J(n){if(n)for(var e=0,t=Object.keys(n);e<t.length;e++){var r=n[t[e]];Array.isArray(null==r?void 0:r.items)&&(r.items=r.items.map((function(n){return b(b({},n),{},{version:(0,s.RZ)(null==n?void 0:n.data)})})),r.version=(0,s.RZ)(r.items,!0))}}function Y(n,e){var t,r=JSON.parse(JSON.stringify(n)),o=null==r||null===(t=r.preset)||void 0===t?void 0:t.content;if(!o)return r;for(var i=function(){var n=l[a],t=o[n];if(null==t||!t.items)return 1;t.items=t.items.filter((function(t){if(!(null!=t&&t.required||null!=t&&t.id&&e.has(t.id)))return!1;var r;if(d.FD.has(n)&&!((null==t||null===(r=t.data)||void 0===r||null===(r=r.link)||void 0===r?void 0:r.url)||"").trim())return!1;return!0}))},a=0,l=Object.keys(o);a<l.length;a++)i();return r}},97063:(n,e,t)=>{t.d(e,{$:()=>o});var r=t(96540);function o(n,e,t,o){(0,r.useEffect)((function(){if(t){var r=function(t){var r=t.target;n.current&&n.current.contains(r)||e.current&&e.current.contains(r)||r instanceof Element&&r.closest('[data-floating-portal="true"]')||document.contains(r)&&o()};return document.addEventListener("mousedown",r),function(){return document.removeEventListener("mousedown",r)}}}),[t,n,e,o])}},16189:(n,e,t)=>{t.d(e,{H:()=>u});var r=t(96540);function o(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}
1finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||a(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(n){return function(n){if(Array.isArray(n))return l(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||a(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(n,e){if(n){if("string"==typeof n)return l(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?l(n,e):void 0}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function u(n,e){var t=(0,r.useRef)(null),a=(0,r.useRef)(null);return{handleDragStart:function(n,e){n.dataTransfer.effectAllowed="move",t.current=e},handleDragEnter:function(n){a.current=n},handleDragEnd:function(){var r=t.current,l=a.current;t.current=null,a.current=null,r&&l&&r!==l&&e(n,(function(n){var e=n.findIndex((function(n){return n.id===r})),t=n.findIndex((function(n){return n.id===l}));if(e<0||t<0)return n;var a=i(n),u=o(a.splice(e,1),1)[0];return a.splice(t,0,u),a}))}}}},27600:(n,e,t)=>{t.d(e,{e:()=>l});var r=t(96540),o=t(32583);function i(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return a(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?a(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function l(n,e,t,a){var l=i((0,r.useState)(null),2),u=l[0],c=l[1];return(0,r.useLayoutEffect)((function(){if(e&&n.current){var r=function(){var e=n.current;if(e){var r,i=(e.closest(t)||e.parentElement||e).getBoundingClientRect(),l=window.innerWidth,u=window.innerHeight,s=l-i.right-o.B8,d=i.left-o.B8;r=s>=o.xk?i.right+o.B8:d>=o.xk?i.left-o.B8-o.xk:i.left,r=Math.min(Math.max(o.G0,r),l-o.xk-o.G0);var f=Math.max(200,u-2*o.G0),p=a&&a.current,v=i.top;if(p){var h=p.scrollHeight+(p.offsetHeight-p.clientHeight),m=Math.min(h,f);v+m>u-o.G0&&(v=u-o.G0-m)}v=Math.max(o.G0,v),c({left:r,top:v,maxHeight:f,measured:!a||!!p})}};r();var i=null,l=window.requestAnimationFrame((function(){r();var n=a&&a.current;n&&"undefined"!=typeof ResizeObserver&&(i=new ResizeObserver((function(){return r()}))).observe(n)}));return window.addEventListener("resize",r),window.addEventListener("scroll",r,!0),function(){window.cancelAnimationFrame(l),i&&i.disconnect(),window.removeEventListener("resize",r),window.removeEventListener("scroll",r,!0)}}c(null)}),[e,n,t,a]),u}},5735:(n,e,t)=>{t.d(e,{R:()=>a});var r=t(96540);function o(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(n)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(r=i.call(t)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(n){c=!0,o=n}
1finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return i(n,e);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?i(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function a(n,e){var t=o((0,r.useState)({x:0,y:0}),2),i=t[0],a=t[1],l=o((0,r.useState)(!1),2),u=l[0],c=l[1];(0,r.useEffect)((function(){n||(a({x:0,y:0}),c(!1))}),[n]);return{offset:i,dragging:u,onMouseDown:function(n){var t;if(0===n.button&&!n.target.closest('input, select, button, textarea, [data-undraggable="true"], .dragController')){n.preventDefault();var r=n.clientX,o=n.clientY,l=i.x,u=i.y,s=null==e||null===(t=e.current)||void 0===t?void 0:t.getBoundingClientRect(),d=60;c(!0);var f=function(n){var e=l+(n.clientX-r),t=u+(n.clientY-o);if(s){var i=e-l,c=t-u,f=s.left+i,p=s.right+i,v=s.top+c,h=s.bottom+c,m=window.innerWidth,y=window.innerHeight;p<d&&(e+=d-p),f>m-d&&(e-=f-(m-d)),h<d&&(t+=d-h),v>y-d&&(t-=v-(y-d))}a({x:e,y:t})},p=function(){c(!1),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",p)};document.addEventListener("mousemove",f),document.addEventListener("mouseup",p)}}}}},50290:(n,e,t)=>{t.d(e,{$J:()=>u,gr:()=>c,j:()=>a,kW:()=>s,qU:()=>l,uc:()=>i});t(96540);var r=t(23527),o=t(74848),i=function(){return(0,o.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,o.jsx)("path",{d:"M14 3L13.0449 12.5509C13.015 12.8497 12.9749 13.1558 12.8148 13.4098C12.1955 14.3922 10.4382 15 8 15C5.23858 15 3.22618 14.2496 3 13L2 3",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,o.jsx)("ellipse",{cx:"8",cy:"3",rx:"6",ry:"2",stroke:"currentColor",strokeWidth:"2"})]})},a=function(){return(0,o.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,o.jsx)("path",{d:"M10 4V2C10 1.44771 9.55229 1 9 1H2C1.44772 1 1 1.44771 1 2V9C1 9.55228 1.44772 10 2 10H4M7 6H14C14.5523 6 15 6.44772 15 7V14C15 14.5523 14.5523 15 14 15H7C6.44772 15 6 14.5523 6 14V7C6 6.44772 6.44772 6 7 6Z",stroke:"currentColor",strokeWidth:"2"})})},l=function(){return(0,o.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,o.jsx)("path",{d:"M1 15.0001L0.00611627 14.8896C-0.027431 15.1916 0.0780857 15.4924 0.292893 15.7072C0.507701 15.922 0.808506 16.0275 1.11043 15.994L1 15.0001ZM1.4 11.4001L0.692893 10.693C0.532329 10.8535 0.431192 11.064 0.406116 11.2896L1.4 11.4001ZM4.6 14.6001L4.71043 15.594C4.93611 15.5689 5.14654 15.4677 5.30711 15.3072L4.6 14.6001ZM9.8 3.00006L9.09289 2.29295L9.09289 2.29295L9.8 3.00006ZM14.3373 4.8628L15.0444 5.56991L14.3373 4.8628ZM11.1373 1.6628L11.8444 2.36991L11.1373 1.6628ZM1 15.0001L1.99388 15.1105L2.39388 11.5105L1.4 11.4001L0.406116 11.2896L0.00611627 14.8896L1 15.0001ZM4.6 14.6001L4.48957 13.6062L0.889569 14.0062L1 15.0001L1.11043 15.994L4.71043 15.594L4.6 14.6001ZM1.4 11.4001L2.10711 12.1072L10.5071 3.70717L9.8 3.00006L9.09289 2.29295L0.692893 10.693L1.4 11.4001ZM14.3373 4.8628L13.6302 4.1557L12.2929 5.49295L13 6.20006L13.7071 6.90717L15.0444 5.56991L14.3373 4.8628ZM13 6.20006L13.7071 5.49295L10.5071 2.29295L9.8 3.00006L9.09289 3.70717L12.2929 6.90717L13 6.20006ZM13 6.20006L12.2929 5.49296L3.89289 13.893L4.6 14.6001L5.30711 15.3072L13.7071 6.90717L13 6.20006ZM9.8 3.00006L10.5071 3.70717L11.8444 2.36991L11.1373 1.6628L10.4302 0.955695L9.09289 2.29295L9.8 3.00006ZM12.7373 1.00006V2.00006C13.4347 2.00006 14 2.56541 14 3.2628H15H16C16 1.46084 14.5392 6.10352e-05 12.7373 6.10352e-05V1.00006ZM15 3.2628H14C14 3.5977 13.867 3.91889 13.6302 4.1557L14.3373 4.8628L15.0444 5.56991C15.6562 4.95803 16 4.12814 16 3.2628H15ZM12.7373 1.00006V6.10352e-05C11.8719 6.10352e-05 11.042 0.343812 10.4302 0.955695L11.1373 1.6628L11.8444 2.36991C12.0812 2.1331 12.4024 2.00006 12.7373 2.00006V1.00006Z",fill:"currentColor"})})},u=function(){return(0,o.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,o.jsx)("circle",{cx:"2",cy:"8",r:"2",fill:"
1currentColor"}),(0,o.jsx)("circle",{cx:"14",cy:"8",r:"2",fill:"currentColor"}),(0,o.jsx)("circle",{cx:"8",cy:"8",r:"2",fill:"currentColor"})]})},c=function(){return(0,o.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,o.jsx)("path",{d:"M13 3L3 13M3 3L13 13",stroke:"currentColor",strokeWidth:"2",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})},s=function(n){var e=n.status;return"running"===e?(0,o.jsx)(r.y$,{}):"done"===e?(0,o.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,o.jsx)("path",{d:"M3 7l3 3 5-6",stroke:"#23B673",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):"error"===e?(0,o.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,o.jsx)("path",{d:"M3 3l8 8M11 3l-8 8",stroke:"#F35151",strokeWidth:"2",strokeLinecap:"round"})}):(0,o.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,o.jsx)("circle",{cx:"7",cy:"7",r:"3",fill:"#E8ECF0"})})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.