From 83d8948cc54102d0429a21d2cd392972628dbd2b Mon Sep 17 00:00:00 2001 From: Michael Fouquet Date: Mon, 1 Apr 2024 14:10:40 -0500 Subject: [PATCH] :package: Prepare v3.21.1 for release --- Stark.sketchplugin/Contents/Resources/ui.js | 10 +++++----- Stark.sketchplugin/Contents/Sketch/main.js | 2 +- Stark.sketchplugin/Contents/Sketch/manifest.json | 2 +- appcast.xml | 12 ++++++++++++ 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Stark.sketchplugin/Contents/Resources/ui.js b/Stark.sketchplugin/Contents/Resources/ui.js index 4d6f327..aee499e 100644 --- a/Stark.sketchplugin/Contents/Resources/ui.js +++ b/Stark.sketchplugin/Contents/Resources/ui.js @@ -1,9 +1,9 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=59)}([function(e,t,n){"use strict";e.exports=n(61)},function(e,t,n){var r=n(78),a=n(0),l=n(13),o=n(55);function i(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}i(e.exports,"Primitive",()=>c),i(e.exports,"Root",()=>u),i(e.exports,"dispatchDiscreteCustomEvent",()=>function(e,t){e&&l.flushSync(()=>e.dispatchEvent(t))});const c=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=a.forwardRef((e,n)=>{const{asChild:l,...i}=e,c=l?o.Slot:t;return a.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),a.createElement(c,function(e){return e&&e.__esModule?e.default:e}(r)({},i,{ref:n}))});return n.displayName="Primitive."+t,{...e,[t]:n}},{}),u=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(76);Object.defineProperty(t,"AlertDialog",{enumerable:!0,get:function(){return r.AlertDialog}}),Object.defineProperty(t,"AlertDialogAction",{enumerable:!0,get:function(){return r.AlertDialogAction}}),Object.defineProperty(t,"AlertDialogCancel",{enumerable:!0,get:function(){return r.AlertDialogCancel}}),Object.defineProperty(t,"AlertDialogContent",{enumerable:!0,get:function(){return r.AlertDialogContent}}),Object.defineProperty(t,"AlertDialogDescription",{enumerable:!0,get:function(){return r.AlertDialogDescription}}),Object.defineProperty(t,"AlertDialogFooter",{enumerable:!0,get:function(){return r.AlertDialogFooter}}),Object.defineProperty(t,"AlertDialogTitle",{enumerable:!0,get:function(){return r.AlertDialogTitle}}),Object.defineProperty(t,"AlertDialogTrigger",{enumerable:!0,get:function(){return r.AlertDialogTrigger}});var a=n(83);Object.defineProperty(t,"Badge",{enumerable:!0,get:function(){return a.default}});var l=n(42);Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return l.default}});var o=n(84);Object.defineProperty(t,"Link",{enumerable:!0,get:function(){return o.default}});var i=n(85);Object.defineProperty(t,"Switch",{enumerable:!0,get:function(){return i.default}});var c=n(86);Object.defineProperty(t,"SystemMessage",{enumerable:!0,get:function(){return c.default}});var u=n(87);Object.defineProperty(t,"Tabs",{enumerable:!0,get:function(){return u.Tabs}}),Object.defineProperty(t,"TabsContent",{enumerable:!0,get:function(){return u.TabsContent}}),Object.defineProperty(t,"TabsList",{enumerable:!0,get:function(){return u.TabsList}}),Object.defineProperty(t,"TabsTrigger",{enumerable:!0,get:function(){return u.TabsTrigger}});var s=n(91);Object.defineProperty(t,"Tag",{enumerable:!0,get:function(){return s.default}});var f=n(92);Object.defineProperty(t,"Toast",{enumerable:!0,get:function(){return f.default}});var d=n(93);Object.defineProperty(t,"Toggle",{enumerable:!0,get:function(){return d.default}});var p=n(94);Object.defineProperty(t,"Checkbox",{enumerable:!0,get:function(){return p.default}});var m=n(95);Object.defineProperty(t,"Input",{enumerable:!0,get:function(){return m.default}});var h=n(96);Object.defineProperty(t,"Radio",{enumerable:!0,get:function(){return h.default}});var v=n(97);Object.defineProperty(t,"RadioGroup",{enumerable:!0,get:function(){return v.default}});var b=n(98);Object.defineProperty(t,"Select",{enumerable:!0,get:function(){return b.default}});var g=n(99);Object.defineProperty(t,"Textarea",{enumerable:!0,get:function(){return g.default}});var y=n(100);Object.defineProperty(t,"IconDropdown",{enumerable:!0,get:function(){return y.default}});var w=n(43);Object.defineProperty(t,"IconDropdownContained",{enumerable:!0,get:function(){return w.default}});var x=n(101);Object.defineProperty(t,"IconExpandCollapse",{enumerable:!0,get:function(){return x.default}});var E=n(102);Object.defineProperty(t,"IconAchromatopsia",{enumerable:!0,get:function(){return E.default}});var C=n(103);Object.defineProperty(t,"IconAltText",{enumerable:!0,get:function(){return C.default}});var O=n(104);Object.defineProperty(t,"IconAriaNotes",{enumerable:!0,get:function(){return O.default}});var _=n(105);Object.defineProperty(t,"IconBlurred",{enumerable:!0,get:function(){return _.default}});var M=n(106);Object.defineProperty(t,"IconBrightLight",{enumerable:!0,get:function(){return M.default}});var k=n(107);Object.defineProperty(t,"IconContrast",{enumerable:!0,get:function(){return k.default}});var j=n(108);Object.defineProperty(t,"IconDeuteranopia",{enumerable:!0,get:function(){return j.default}});var P=n(109);Object.defineProperty(t,"IconFail",{enumerable:!0,get:function(){return P.default}});var S=n(110);Object.defineProperty(t,"IconFocusOrder",{enumerable:!0,get:function(){return S.default}});var Z=n(111);Object.defineProperty(t,"IconGhosting",{enumerable:!0,get:function(){return Z.default}});var T=n(112);Object.defineProperty(t,"IconHeadings",{enumerable:!0,get:function(){return T.default}});var N=n(113);Object.defineProperty(t,"IconIndeterminate",{enumerable:!0,get:function(){return N.default}});var I=n(114);Object.defineProperty(t,"IconLandmarks",{enumerable:!0,get:function(){return I.default}});var L=n(115);Object.defineProperty(t,"IconLossOfContrast",{enumerable:!0,get:function(){return L.default}});var R=n(116);Object.defineProperty(t,"IconPass",{enumerable:!0,get:function(){return R.default}});var B=n(117);Object.defineProperty(t,"IconProtanopia",{enumerable:!0,get:function(){return B.default}});var D=n(118);Object.defineProperty(t,"IconScan",{enumerable:!0,get:function(){return D.default}});var A=n(119);Object.defineProperty(t,"IconScore",{enumerable:!0,get:function(){return A.default}});var F=n(120);Object.defineProperty(t,"IconSidekick",{enumerable:!0,get:function(){return F.default}});var H=n(121);Object.defineProperty(t,"IconTouchTargets",{enumerable:!0,get:function(){return H.default}});var U=n(122);Object.defineProperty(t,"IconTritanopia",{enumerable:!0,get:function(){return U.default}});var z=n(123);Object.defineProperty(t,"IconTunnelVision",{enumerable:!0,get:function(){return z.default}});var V=n(124);Object.defineProperty(t,"IconTypography",{enumerable:!0,get:function(){return V.default}});var G=n(125);Object.defineProperty(t,"IconVisionSimulator",{enumerable:!0,get:function(){return G.default}});var W=n(126);Object.defineProperty(t,"IconWarn",{enumerable:!0,get:function(){return W.default}});var q=n(127);Object.defineProperty(t,"IconYellowing",{enumerable:!0,get:function(){return q.default}});var Y=n(128);Object.defineProperty(t,"IconHelpSmall",{enumerable:!0,get:function(){return Y.default}});var X=n(129);Object.defineProperty(t,"IconLink",{enumerable:!0,get:function(){return X.default}});var $=n(130);Object.defineProperty(t,"IconMove",{enumerable:!0,get:function(){return $.default}});var K=n(131);Object.defineProperty(t,"IconStatusConnected",{enumerable:!0,get:function(){return K.default}});var Q=n(132);Object.defineProperty(t,"IconStatusConnecting",{enumerable:!0,get:function(){return Q.default}});var J=n(133);Object.defineProperty(t,"IconStatusError",{enumerable:!0,get:function(){return J.default}});var ee=n(134);Object.defineProperty(t,"IconStatusOffline",{enumerable:!0,get:function(){return ee.default}});var te=n(135);Object.defineProperty(t,"IconAccount",{enumerable:!0,get:function(){return te.default}});var ne=n(136);Object.defineProperty(t,"IconChevronDown",{enumerable:!0,get:function(){return ne.default}});var re=n(137);Object.defineProperty(t,"IconChevronLeft",{enumerable:!0,get:function(){return re.default}});var ae=n(138);Object.defineProperty(t,"IconChevronRight",{enumerable:!0,get:function(){return ae.default}});var le=n(139);Object.defineProperty(t,"IconChevronUp",{enumerable:!0,get:function(){return le.default}});var oe=n(140);Object.defineProperty(t,"IconColorPicker",{enumerable:!0,get:function(){return oe.default}});var ie=n(30);Object.defineProperty(t,"IconCross",{enumerable:!0,get:function(){return ie.default}});var ce=n(141);Object.defineProperty(t,"IconElementPicker",{enumerable:!0,get:function(){return ce.default}});var ue=n(142);Object.defineProperty(t,"IconHelp",{enumerable:!0,get:function(){return ue.default}});var se=n(143);Object.defineProperty(t,"IconMaximize",{enumerable:!0,get:function(){return se.default}});var fe=n(144);Object.defineProperty(t,"IconMinimize",{enumerable:!0,get:function(){return fe.default}});var de=n(145);Object.defineProperty(t,"IconMinus",{enumerable:!0,get:function(){return de.default}});var pe=n(146);Object.defineProperty(t,"IconPen",{enumerable:!0,get:function(){return pe.default}});var me=n(147);Object.defineProperty(t,"IconPenAlt",{enumerable:!0,get:function(){return me.default}});var he=n(148);Object.defineProperty(t,"IconPlus",{enumerable:!0,get:function(){return he.default}});var ve=n(149);Object.defineProperty(t,"IconSave",{enumerable:!0,get:function(){return ve.default}});var be=n(150);Object.defineProperty(t,"IconSettings",{enumerable:!0,get:function(){return be.default}});var ge=n(151);Object.defineProperty(t,"IconTextAlignCenter",{enumerable:!0,get:function(){return ge.default}});var ye=n(152);Object.defineProperty(t,"IconTextAlignJustified",{enumerable:!0,get:function(){return ye.default}});var we=n(153);Object.defineProperty(t,"IconTextAlignLeft",{enumerable:!0,get:function(){return we.default}});var xe=n(154);Object.defineProperty(t,"IconTextAlignRight",{enumerable:!0,get:function(){return xe.default}});var Ee=n(155);Object.defineProperty(t,"IconTrash",{enumerable:!0,get:function(){return Ee.default}});var Ce=n(156);Object.defineProperty(t,"Confetti",{enumerable:!0,get:function(){return Ce.default}});var Oe=n(157);Object.defineProperty(t,"StarkLargePurple",{enumerable:!0,get:function(){return Oe.default}});var _e=n(158);Object.defineProperty(t,"StarkLargePurpleWavy",{enumerable:!0,get:function(){return _e.default}});var Me=n(159);Object.defineProperty(t,"StarkSmallBlack",{enumerable:!0,get:function(){return Me.default}});var ke=n(24);Object.defineProperty(t,"Body",{enumerable:!0,get:function(){return ke.default}});var je=n(160);Object.defineProperty(t,"Code",{enumerable:!0,get:function(){return je.default}});var Pe=n(161);Object.defineProperty(t,"Display",{enumerable:!0,get:function(){return Pe.default}});var Se=n(28);Object.defineProperty(t,"Headline",{enumerable:!0,get:function(){return Se.default}});var Ze=n(15);Object.defineProperty(t,"Label",{enumerable:!0,get:function(){return Ze.default}})},function(e,t,n){var r=n(0);function a(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function l(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}a(e.exports,"composeRefs",()=>l),a(e.exports,"useComposedRefs",()=>function(...e){return r.useCallback(l(...e),e)})},function(e,t){!function(e,t,n,r){Object.defineProperty(e,"composeEventHandlers",{get:()=>function(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}},set:void 0,enumerable:!0,configurable:!0})}(e.exports)},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),a(n(175),t),a(n(178),t)},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),a(n(65),t),a(n(66),t),a(n(67),t)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0&&a[a.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]function(e,t){const n=r.createContext(t);function a(e){const{children:t,...a}=e,l=r.useMemo(()=>a,Object.values(a));return r.createElement(n.Provider,{value:l},t)}return a.displayName=e+"Provider",[a,function(a){const l=r.useContext(n);if(l)return l;if(void 0!==t)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}]}),a(e.exports,"createContextScope",()=>function(e,t=[]){let n=[];const a=()=>{const t=n.map(e=>r.createContext(e));return function(n){const a=(null==n?void 0:n[e])||t;return r.useMemo(()=>({["__scope"+e]:{...n,[e]:a}}),[n,a])}};return a.scopeName=e,[function(t,a){const l=r.createContext(a),o=n.length;function i(t){const{scope:n,children:a,...i}=t,c=(null==n?void 0:n[e][o])||l,u=r.useMemo(()=>i,Object.values(i));return r.createElement(c.Provider,{value:u},a)}return n=[...n,a],i.displayName=t+"Provider",[i,function(n,i){const c=(null==i?void 0:i[e][o])||l,u=r.useContext(c);if(u)return u;if(void 0!==a)return a;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const a=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)["__scope"+r]}),{});return r.useMemo(()=>({["__scope"+t.scopeName]:a}),[a])}};return n.scopeName=t.scopeName,n}(a,...t)]})},function(e,t,n){var r=n(77),a=n(0),l=n(38),o=n(23),i=n(39),c=n(40),u=n(41),s=n(209),f=n(210),d=n(211),p=n(79),m=n(56),h=n(81),v=n(199),b=n(82),g=n(55);function y(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function w(e){return e&&e.__esModule?e.default:e}y(e.exports,"createDialogScope",()=>E),y(e.exports,"Dialog",()=>_),y(e.exports,"DialogTrigger",()=>M),y(e.exports,"DialogPortal",()=>P),y(e.exports,"DialogOverlay",()=>S),y(e.exports,"DialogContent",()=>T),y(e.exports,"DialogTitle",()=>R),y(e.exports,"DialogDescription",()=>B),y(e.exports,"DialogClose",()=>D),y(e.exports,"Root",()=>U),y(e.exports,"Trigger",()=>z),y(e.exports,"Portal",()=>V),y(e.exports,"Overlay",()=>G),y(e.exports,"Content",()=>W),y(e.exports,"Title",()=>q),y(e.exports,"Description",()=>Y),y(e.exports,"Close",()=>X),y(e.exports,"WarningProvider",()=>F);const[x,E]=i.createContextScope("Dialog"),[C,O]=x("Dialog"),_=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:l,onOpenChange:o,modal:i=!0}=e,s=a.useRef(null),f=a.useRef(null),[d=!1,p]=u.useControllableState({prop:r,defaultProp:l,onChange:o});return a.createElement(C,{scope:t,triggerRef:s,contentRef:f,contentId:c.useId(),titleId:c.useId(),descriptionId:c.useId(),open:d,onOpenChange:p,onOpenToggle:a.useCallback(()=>p(e=>!e),[p]),modal:i},n)},M=a.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,c=O("DialogTrigger",n),u=o.useComposedRefs(t,c.triggerRef);return a.createElement(m.Primitive.button,w(r)({type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":A(c.open)},i,{ref:u,onClick:l.composeEventHandlers(e.onClick,c.onOpenToggle)}))}),[k,j]=x("DialogPortal",{forceMount:void 0}),P=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:l}=e,o=O("DialogPortal",t);return a.createElement(k,{scope:t,forceMount:n},a.Children.map(r,e=>a.createElement(p.Presence,{present:n||o.open},a.createElement(d.Portal,{asChild:!0,container:l},e))))},S=a.forwardRef((e,t)=>{const n=j("DialogOverlay",e.__scopeDialog),{forceMount:l=n.forceMount,...o}=e,i=O("DialogOverlay",e.__scopeDialog);return i.modal?a.createElement(p.Presence,{present:l||i.open},a.createElement(Z,w(r)({},o,{ref:t}))):null}),Z=a.forwardRef((e,t)=>{const{__scopeDialog:n,...l}=e,o=O("DialogOverlay",n);return a.createElement(v.RemoveScroll,{as:g.Slot,allowPinchZoom:!0,shards:[o.contentRef]},a.createElement(m.Primitive.div,w(r)({"data-state":A(o.open)},l,{ref:t,style:{pointerEvents:"auto",...l.style}})))}),T=a.forwardRef((e,t)=>{const n=j("DialogContent",e.__scopeDialog),{forceMount:l=n.forceMount,...o}=e,i=O("DialogContent",e.__scopeDialog);return a.createElement(p.Presence,{present:l||i.open},i.modal?a.createElement(N,w(r)({},o,{ref:t})):a.createElement(I,w(r)({},o,{ref:t})))}),N=a.forwardRef((e,t)=>{const n=O("DialogContent",e.__scopeDialog),i=a.useRef(null),c=o.useComposedRefs(t,n.contentRef,i);return a.useEffect(()=>{const e=i.current;if(e)return b.hideOthers(e)},[]),a.createElement(L,w(r)({},e,{ref:c,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:l.composeEventHandlers(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:l.composeEventHandlers(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:l.composeEventHandlers(e.onFocusOutside,e=>e.preventDefault())}))}),I=a.forwardRef((e,t)=>{const n=O("DialogContent",e.__scopeDialog),l=a.useRef(!1),o=a.useRef(!1);return a.createElement(L,w(r)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var r,a;null===(r=e.onCloseAutoFocus)||void 0===r||r.call(e,t),t.defaultPrevented||(l.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),t.preventDefault()),l.current=!1,o.current=!1},onInteractOutside:t=>{var r,a;null===(r=e.onInteractOutside)||void 0===r||r.call(e,t),t.defaultPrevented||(l.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const i=t.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(i))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}}))}),L=a.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:l,onOpenAutoFocus:i,onCloseAutoFocus:c,...u}=e,d=O("DialogContent",n),p=a.useRef(null),m=o.useComposedRefs(t,p);return h.useFocusGuards(),a.createElement(a.Fragment,null,a.createElement(f.FocusScope,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:i,onUnmountAutoFocus:c},a.createElement(s.DismissableLayer,w(r)({role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":A(d.open)},u,{ref:m,onDismiss:()=>d.onOpenChange(!1)}))),!1)}),R=a.forwardRef((e,t)=>{const{__scopeDialog:n,...l}=e,o=O("DialogTitle",n);return a.createElement(m.Primitive.h2,w(r)({id:o.titleId},l,{ref:t}))}),B=a.forwardRef((e,t)=>{const{__scopeDialog:n,...l}=e,o=O("DialogDescription",n);return a.createElement(m.Primitive.p,w(r)({id:o.descriptionId},l,{ref:t}))}),D=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=O("DialogClose",n);return a.createElement(m.Primitive.button,w(r)({type:"button"},o,{ref:t,onClick:l.composeEventHandlers(e.onClick,()=>i.onOpenChange(!1))}))});function A(e){return e?"open":"closed"}const[F,H]=i.createContext("DialogTitleWarning",{contentName:"DialogContent",titleName:"DialogTitle",docsSlug:"dialog"}),U=_,z=M,V=P,G=S,W=T,q=R,Y=B,X=D},function(e,t,n){var r=n(0),a=n(27);!function(e,t,n,r){Object.defineProperty(e,"useControllableState",{get:n,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[l,o]=function({defaultProp:e,onChange:t}){const n=r.useState(e),[l]=n,o=r.useRef(l),i=a.useCallbackRef(t);return r.useEffect(()=>{o.current!==l&&(i(l),o.current=l)},[l,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,c=i?e:l,u=a.useCallbackRef(n);return[c,r.useCallback(t=>{if(i){const n=t,r="function"==typeof t?n(e):t;r!==e&&u(r)}else o(t)},[i,e,o,u])]})},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(62)},function(e,t,n){var r=n(88),a=n(0),l=n(38),o=n(89),i=n(23),c=n(39),u=n(40),s=n(56),f=n(27),d=n(41),p=n(90);function m(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function h(e){return e&&e.__esModule?e.default:e}m(e.exports,"createRovingFocusGroupScope",()=>x),m(e.exports,"RovingFocusGroup",()=>O),m(e.exports,"RovingFocusGroupItem",()=>M),m(e.exports,"Root",()=>P),m(e.exports,"Item",()=>S);const v={bubbles:!1,cancelable:!0},[b,g,y]=o.createCollection("RovingFocusGroup"),[w,x]=c.createContextScope("RovingFocusGroup",[y]),[E,C]=w("RovingFocusGroup"),O=a.forwardRef((e,t)=>a.createElement(b.Provider,{scope:e.__scopeRovingFocusGroup},a.createElement(b.Slot,{scope:e.__scopeRovingFocusGroup},a.createElement(_,h(r)({},e,{ref:t}))))),_=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:c=!1,dir:u,currentTabStopId:m,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:y,onEntryFocus:w,...x}=e,C=a.useRef(null),O=i.useComposedRefs(t,C),_=p.useDirection(u),[M=null,k]=d.useControllableState({prop:m,defaultProp:b,onChange:y}),[P,S]=a.useState(!1),Z=f.useCallbackRef(w),T=g(n),N=a.useRef(!1),[I,L]=a.useState(0);return a.useEffect(()=>{const e=C.current;if(e)return e.addEventListener("rovingFocusGroup.onEntryFocus",Z),()=>e.removeEventListener("rovingFocusGroup.onEntryFocus",Z)},[Z]),a.createElement(E,{scope:n,orientation:o,dir:_,loop:c,currentTabStopId:M,onItemFocus:a.useCallback(e=>k(e),[k]),onItemShiftTab:a.useCallback(()=>S(!0),[]),onFocusableItemAdd:a.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:a.useCallback(()=>L(e=>e-1),[])},a.createElement(s.Primitive.div,h(r)({tabIndex:P||0===I?-1:0,"data-orientation":o},x,{ref:O,style:{outline:"none",...e.style},onMouseDown:l.composeEventHandlers(e.onMouseDown,()=>{N.current=!0}),onFocus:l.composeEventHandlers(e.onFocus,e=>{const t=!N.current;if(e.target===e.currentTarget&&t&&!P){const t=new CustomEvent("rovingFocusGroup.onEntryFocus",v);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=T().filter(e=>e.focusable);j([e.find(e=>e.active),e.find(e=>e.id===M),...e].filter(Boolean).map(e=>e.ref.current))}}N.current=!1}),onBlur:l.composeEventHandlers(e.onBlur,()=>S(!1))})))}),M=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:c,...f}=e,d=u.useId(),p=c||d,m=C("RovingFocusGroupItem",n),v=m.currentTabStopId===p,y=g(n),{onFocusableItemAdd:w,onFocusableItemRemove:x}=m;return a.useEffect(()=>{if(o)return w(),()=>x()},[o,w,x]),a.createElement(b.ItemSlot,{scope:n,id:p,focusable:o,active:i},a.createElement(s.Primitive.span,h(r)({tabIndex:v?0:-1,"data-orientation":m.orientation},f,{ref:t,onMouseDown:l.composeEventHandlers(e.onMouseDown,e=>{o?m.onItemFocus(p):e.preventDefault()}),onFocus:l.composeEventHandlers(e.onFocus,()=>m.onItemFocus(p)),onKeyDown:l.composeEventHandlers(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void m.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:k[r]}(e,m.orientation,m.dir);if(void 0!==t){e.preventDefault();let n=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=m.loop?function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(n,r+1):n.slice(r+1)}setTimeout(()=>j(n))}})})))}),k={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function j(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const P=O,S=M},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;nfunction(e){const t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)},[])})},function(e,t,n){var r=n(0),a=n(13),l=n(23),o=n(29);!function(e,t,n,r){Object.defineProperty(e,"Presence",{get:()=>i,set:void 0,enumerable:!0,configurable:!0})}(e.exports);const i=e=>{const{present:t,children:n}=e,i=function(e){const[t,n]=r.useState(),l=r.useRef({}),i=r.useRef(e),u=r.useRef("none"),s=e?"mounted":"unmounted",[f,d]=function(e,t){return r.useReducer((e,n)=>{const r=t[e][n];return null!=r?r:e},e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return r.useEffect(()=>{const e=c(l.current);u.current="mounted"===f?e:"none"},[f]),o.useLayoutEffect(()=>{const t=l.current,n=i.current;if(n!==e){const r=u.current,a=c(t);e?d("MOUNT"):"none"===a||"none"===(null==t?void 0:t.display)?d("UNMOUNT"):d(n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),o.useLayoutEffect(()=>{if(t){const e=e=>{const n=c(l.current).includes(e.animationName);e.target===t&&n&&a.flushSync(()=>d("ANIMATION_END"))},n=e=>{e.target===t&&(u.current=c(l.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:r.useCallback(e=>{e&&(l.current=getComputedStyle(e)),n(e)},[])}}(t),u="function"==typeof n?n({present:i.isPresent}):r.Children.only(n),s=l.useComposedRefs(i.ref,u.ref);return"function"==typeof n||i.isPresent?r.cloneElement(u,{ref:s}):null};function c(e){return(null==e?void 0:e.animationName)||"none"}i.displayName="Presence"},function(e,t,n){var r=n(0);!function(e,t,n,r){Object.defineProperty(e,"useLayoutEffect",{get:()=>a,set:void 0,enumerable:!0,configurable:!0})}(e.exports);const a=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?r.useLayoutEffect:()=>{}},function(e,t,n){var r=n(80),a=n(0),l=n(23);function o(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function i(e){return e&&e.__esModule?e.default:e}o(e.exports,"Slot",()=>c),o(e.exports,"Slottable",()=>s),o(e.exports,"Root",()=>d);const c=a.forwardRef((e,t)=>{const{children:n,...l}=e,o=a.Children.toArray(n),c=o.find(f);if(c){const e=c.props.children,n=o.map(t=>t===c?a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null:t);return a.createElement(u,i(r)({},l,{ref:t}),a.isValidElement(e)?a.cloneElement(e,void 0,n):null)}return a.createElement(u,i(r)({},l,{ref:t}),n)});c.displayName="Slot";const u=a.forwardRef((e,t)=>{const{children:n,...r}=e;return a.isValidElement(n)?a.cloneElement(n,{...function(e,t){const n={...t};for(const r in t){const a=e[r],l=t[r];/^on[A-Z]/.test(r)?a&&l?n[r]=(...e)=>{l(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...l}:"className"===r&&(n[r]=[a,l].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:t?l.composeRefs(t,n.ref):n.ref}):a.Children.count(n)>1?a.Children.only(null):null});u.displayName="SlotClone";const s=({children:e})=>a.createElement(a.Fragment,null,e);function f(e){return a.isValidElement(e)&&e.type===s}const d=c},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),a(n(176),t),a(n(177),t)},function(e,t,n){var r=n(0);!function(e,t,n,r){Object.defineProperty(e,"usePrevious",{get:n,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function(e){const t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])})},function(e,t,n){var r=n(0),a=n(29);!function(e,t,n,r){Object.defineProperty(e,"useSize",{get:n,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function(e){const[t,n]=r.useState(void 0);return a.useLayoutEffect(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,l;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,l=t.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t})},function(e,t,n){"use strict";n.r(t),n.d(t,"composeRefs",(function(){return a})),n.d(t,"useComposedRefs",(function(){return l}));var r=n(0);function a(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}function l(...e){return Object(r.useCallback)(a(...e),e)}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;nfunction(e){const t=r.useContext(l);return e||t||"ltr"}),a(e.exports,"Provider",()=>i),a(e.exports,"DirectionProvider",()=>o);const l=r.createContext(void 0),o=e=>{const{dir:t,children:n}=e;return r.createElement(l.Provider,{value:t},n)},i=o},function(e,t,n){var r=n(0),a=n(29);!function(e,t,n,r){Object.defineProperty(e,"useId",{get:n,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function(e){const[t,n]=r.useState(l());return a.useLayoutEffect(()=>{e||n(e=>null!=e?e:String(o++))},[e]),e||(t?"radix-"+t:"")});const l=r["useId".toString()]||(()=>{});let o=0},function(e,t,n){"use strict";n.r(t),n.d(t,"useCallbackRef",(function(){return a}));var r=n(0);function a(e){const t=Object(r.useRef)(e);return Object(r.useEffect)(()=>{t.current=e}),Object(r.useMemo)(()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)},[])}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?{r:Number(n[1]),g:Number(n[2]),b:Number(n[3]),a:Number(n[4])}:{r:0,g:0,b:0,a:0}},t.ConvertRgbaStringToBaseRgba=function(e){var t=r.RGBA_REGEX,n=e.match(t);return n&&(null==n?void 0:n.length)>0?{r:Number(n[1])/255,g:Number(n[2])/255,b:Number(n[3])/255,a:Number(n[4])}:{r:0,g:0,b:0,a:0}},t.ConvertBaseRgbaToRgba=function(e,t){var n=e.a?e.a:1;return{r:255*e.r,g:255*e.g,b:255*e.b,a:t?255*n:n}},t.ConvertRgbaToBaseRgba=function(e,t){var n=e.a?e.a:255;return{r:e.r/255,g:e.g/255,b:e.b/255,a:t?n/255:n}},t.ConvertRgbaToHsla=function(e){var t,n=e.r/255,r=e.g/255,a=e.b/255,l=Math.max(n,r,a),o=Math.min(n,r,a),i=0,c=(l+o)/2;if(l===o)i=t=0;else{var u=l-o;switch(t=c>.5?u/(2-l-o):u/(l+o),l){case n:i=(r-a)/u+(r.5?u/(2-l-o):u/(l+o),l){case n:i=(r-a)/u+(rc),i(e.exports,"Root",()=>u),i(e.exports,"dispatchDiscreteCustomEvent",()=>function(e,t){e&&l.flushSync(()=>e.dispatchEvent(t))});const c=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=a.forwardRef((e,n)=>{const{asChild:l,...i}=e,c=l?o.Slot:t;return a.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),a.createElement(c,function(e){return e&&e.__esModule?e.default:e}(r)({},i,{ref:n}))});return n.displayName="Primitive."+t,{...e,[t]:n}},{}),u=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(76);Object.defineProperty(t,"AlertDialog",{enumerable:!0,get:function(){return r.AlertDialog}}),Object.defineProperty(t,"AlertDialogAction",{enumerable:!0,get:function(){return r.AlertDialogAction}}),Object.defineProperty(t,"AlertDialogCancel",{enumerable:!0,get:function(){return r.AlertDialogCancel}}),Object.defineProperty(t,"AlertDialogContent",{enumerable:!0,get:function(){return r.AlertDialogContent}}),Object.defineProperty(t,"AlertDialogDescription",{enumerable:!0,get:function(){return r.AlertDialogDescription}}),Object.defineProperty(t,"AlertDialogFooter",{enumerable:!0,get:function(){return r.AlertDialogFooter}}),Object.defineProperty(t,"AlertDialogTitle",{enumerable:!0,get:function(){return r.AlertDialogTitle}}),Object.defineProperty(t,"AlertDialogTrigger",{enumerable:!0,get:function(){return r.AlertDialogTrigger}});var a=n(83);Object.defineProperty(t,"Badge",{enumerable:!0,get:function(){return a.default}});var l=n(42);Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return l.default}});var o=n(84);Object.defineProperty(t,"Link",{enumerable:!0,get:function(){return o.default}});var i=n(85);Object.defineProperty(t,"Switch",{enumerable:!0,get:function(){return i.default}});var c=n(86);Object.defineProperty(t,"SystemMessage",{enumerable:!0,get:function(){return c.default}});var u=n(87);Object.defineProperty(t,"Tabs",{enumerable:!0,get:function(){return u.Tabs}}),Object.defineProperty(t,"TabsContent",{enumerable:!0,get:function(){return u.TabsContent}}),Object.defineProperty(t,"TabsList",{enumerable:!0,get:function(){return u.TabsList}}),Object.defineProperty(t,"TabsTrigger",{enumerable:!0,get:function(){return u.TabsTrigger}});var s=n(91);Object.defineProperty(t,"Tag",{enumerable:!0,get:function(){return s.default}});var f=n(92);Object.defineProperty(t,"Toast",{enumerable:!0,get:function(){return f.default}});var d=n(93);Object.defineProperty(t,"Toggle",{enumerable:!0,get:function(){return d.default}});var p=n(94);Object.defineProperty(t,"Checkbox",{enumerable:!0,get:function(){return p.default}});var m=n(95);Object.defineProperty(t,"Input",{enumerable:!0,get:function(){return m.default}});var h=n(96);Object.defineProperty(t,"Radio",{enumerable:!0,get:function(){return h.default}});var v=n(97);Object.defineProperty(t,"RadioGroup",{enumerable:!0,get:function(){return v.default}});var b=n(98);Object.defineProperty(t,"Select",{enumerable:!0,get:function(){return b.default}});var g=n(99);Object.defineProperty(t,"Textarea",{enumerable:!0,get:function(){return g.default}});var y=n(100);Object.defineProperty(t,"IconDropdown",{enumerable:!0,get:function(){return y.default}});var w=n(43);Object.defineProperty(t,"IconDropdownContained",{enumerable:!0,get:function(){return w.default}});var x=n(101);Object.defineProperty(t,"IconExpandCollapse",{enumerable:!0,get:function(){return x.default}});var E=n(102);Object.defineProperty(t,"IconAchromatopsia",{enumerable:!0,get:function(){return E.default}});var C=n(103);Object.defineProperty(t,"IconAltText",{enumerable:!0,get:function(){return C.default}});var O=n(104);Object.defineProperty(t,"IconAriaNotes",{enumerable:!0,get:function(){return O.default}});var _=n(105);Object.defineProperty(t,"IconBlurred",{enumerable:!0,get:function(){return _.default}});var M=n(106);Object.defineProperty(t,"IconBrightLight",{enumerable:!0,get:function(){return M.default}});var k=n(107);Object.defineProperty(t,"IconContrast",{enumerable:!0,get:function(){return k.default}});var j=n(108);Object.defineProperty(t,"IconDeuteranopia",{enumerable:!0,get:function(){return j.default}});var P=n(109);Object.defineProperty(t,"IconFail",{enumerable:!0,get:function(){return P.default}});var S=n(110);Object.defineProperty(t,"IconFocusOrder",{enumerable:!0,get:function(){return S.default}});var Z=n(111);Object.defineProperty(t,"IconGhosting",{enumerable:!0,get:function(){return Z.default}});var T=n(112);Object.defineProperty(t,"IconHeadings",{enumerable:!0,get:function(){return T.default}});var N=n(113);Object.defineProperty(t,"IconIndeterminate",{enumerable:!0,get:function(){return N.default}});var I=n(114);Object.defineProperty(t,"IconLandmarks",{enumerable:!0,get:function(){return I.default}});var L=n(115);Object.defineProperty(t,"IconLossOfContrast",{enumerable:!0,get:function(){return L.default}});var R=n(116);Object.defineProperty(t,"IconPass",{enumerable:!0,get:function(){return R.default}});var B=n(117);Object.defineProperty(t,"IconProtanopia",{enumerable:!0,get:function(){return B.default}});var D=n(118);Object.defineProperty(t,"IconScan",{enumerable:!0,get:function(){return D.default}});var A=n(119);Object.defineProperty(t,"IconScore",{enumerable:!0,get:function(){return A.default}});var F=n(120);Object.defineProperty(t,"IconSidekick",{enumerable:!0,get:function(){return F.default}});var H=n(121);Object.defineProperty(t,"IconTouchTargets",{enumerable:!0,get:function(){return H.default}});var U=n(122);Object.defineProperty(t,"IconTritanopia",{enumerable:!0,get:function(){return U.default}});var z=n(123);Object.defineProperty(t,"IconTunnelVision",{enumerable:!0,get:function(){return z.default}});var V=n(124);Object.defineProperty(t,"IconTypography",{enumerable:!0,get:function(){return V.default}});var W=n(125);Object.defineProperty(t,"IconVisionSimulator",{enumerable:!0,get:function(){return W.default}});var G=n(126);Object.defineProperty(t,"IconWarn",{enumerable:!0,get:function(){return G.default}});var q=n(127);Object.defineProperty(t,"IconYellowing",{enumerable:!0,get:function(){return q.default}});var Y=n(128);Object.defineProperty(t,"IconHelpSmall",{enumerable:!0,get:function(){return Y.default}});var X=n(129);Object.defineProperty(t,"IconLink",{enumerable:!0,get:function(){return X.default}});var $=n(130);Object.defineProperty(t,"IconMove",{enumerable:!0,get:function(){return $.default}});var K=n(131);Object.defineProperty(t,"IconStatusConnected",{enumerable:!0,get:function(){return K.default}});var Q=n(132);Object.defineProperty(t,"IconStatusConnecting",{enumerable:!0,get:function(){return Q.default}});var J=n(133);Object.defineProperty(t,"IconStatusError",{enumerable:!0,get:function(){return J.default}});var ee=n(134);Object.defineProperty(t,"IconStatusOffline",{enumerable:!0,get:function(){return ee.default}});var te=n(135);Object.defineProperty(t,"IconAccount",{enumerable:!0,get:function(){return te.default}});var ne=n(136);Object.defineProperty(t,"IconChevronDown",{enumerable:!0,get:function(){return ne.default}});var re=n(137);Object.defineProperty(t,"IconChevronLeft",{enumerable:!0,get:function(){return re.default}});var ae=n(138);Object.defineProperty(t,"IconChevronRight",{enumerable:!0,get:function(){return ae.default}});var le=n(139);Object.defineProperty(t,"IconChevronUp",{enumerable:!0,get:function(){return le.default}});var oe=n(140);Object.defineProperty(t,"IconColorPicker",{enumerable:!0,get:function(){return oe.default}});var ie=n(30);Object.defineProperty(t,"IconCross",{enumerable:!0,get:function(){return ie.default}});var ce=n(141);Object.defineProperty(t,"IconElementPicker",{enumerable:!0,get:function(){return ce.default}});var ue=n(142);Object.defineProperty(t,"IconHelp",{enumerable:!0,get:function(){return ue.default}});var se=n(143);Object.defineProperty(t,"IconMaximize",{enumerable:!0,get:function(){return se.default}});var fe=n(144);Object.defineProperty(t,"IconMinimize",{enumerable:!0,get:function(){return fe.default}});var de=n(145);Object.defineProperty(t,"IconMinus",{enumerable:!0,get:function(){return de.default}});var pe=n(146);Object.defineProperty(t,"IconPen",{enumerable:!0,get:function(){return pe.default}});var me=n(147);Object.defineProperty(t,"IconPenAlt",{enumerable:!0,get:function(){return me.default}});var he=n(148);Object.defineProperty(t,"IconPlus",{enumerable:!0,get:function(){return he.default}});var ve=n(149);Object.defineProperty(t,"IconSave",{enumerable:!0,get:function(){return ve.default}});var be=n(150);Object.defineProperty(t,"IconSettings",{enumerable:!0,get:function(){return be.default}});var ge=n(151);Object.defineProperty(t,"IconTextAlignCenter",{enumerable:!0,get:function(){return ge.default}});var ye=n(152);Object.defineProperty(t,"IconTextAlignJustified",{enumerable:!0,get:function(){return ye.default}});var we=n(153);Object.defineProperty(t,"IconTextAlignLeft",{enumerable:!0,get:function(){return we.default}});var xe=n(154);Object.defineProperty(t,"IconTextAlignRight",{enumerable:!0,get:function(){return xe.default}});var Ee=n(155);Object.defineProperty(t,"IconTrash",{enumerable:!0,get:function(){return Ee.default}});var Ce=n(156);Object.defineProperty(t,"Confetti",{enumerable:!0,get:function(){return Ce.default}});var Oe=n(157);Object.defineProperty(t,"StarkLargePurple",{enumerable:!0,get:function(){return Oe.default}});var _e=n(158);Object.defineProperty(t,"StarkLargePurpleWavy",{enumerable:!0,get:function(){return _e.default}});var Me=n(159);Object.defineProperty(t,"StarkSmallBlack",{enumerable:!0,get:function(){return Me.default}});var ke=n(24);Object.defineProperty(t,"Body",{enumerable:!0,get:function(){return ke.default}});var je=n(160);Object.defineProperty(t,"Code",{enumerable:!0,get:function(){return je.default}});var Pe=n(161);Object.defineProperty(t,"Display",{enumerable:!0,get:function(){return Pe.default}});var Se=n(28);Object.defineProperty(t,"Headline",{enumerable:!0,get:function(){return Se.default}});var Ze=n(15);Object.defineProperty(t,"Label",{enumerable:!0,get:function(){return Ze.default}})},function(e,t,n){var r=n(0);function a(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function l(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}a(e.exports,"composeRefs",()=>l),a(e.exports,"useComposedRefs",()=>function(...e){return r.useCallback(l(...e),e)})},function(e,t){!function(e,t,n,r){Object.defineProperty(e,"composeEventHandlers",{get:()=>function(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}},set:void 0,enumerable:!0,configurable:!0})}(e.exports)},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),a(n(175),t),a(n(178),t)},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),a(n(65),t),a(n(66),t),a(n(67),t)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]0&&a[a.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]function(e,t){const n=r.createContext(t);function a(e){const{children:t,...a}=e,l=r.useMemo(()=>a,Object.values(a));return r.createElement(n.Provider,{value:l},t)}return a.displayName=e+"Provider",[a,function(a){const l=r.useContext(n);if(l)return l;if(void 0!==t)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}]}),a(e.exports,"createContextScope",()=>function(e,t=[]){let n=[];const a=()=>{const t=n.map(e=>r.createContext(e));return function(n){const a=(null==n?void 0:n[e])||t;return r.useMemo(()=>({["__scope"+e]:{...n,[e]:a}}),[n,a])}};return a.scopeName=e,[function(t,a){const l=r.createContext(a),o=n.length;function i(t){const{scope:n,children:a,...i}=t,c=(null==n?void 0:n[e][o])||l,u=r.useMemo(()=>i,Object.values(i));return r.createElement(c.Provider,{value:u},a)}return n=[...n,a],i.displayName=t+"Provider",[i,function(n,i){const c=(null==i?void 0:i[e][o])||l,u=r.useContext(c);if(u)return u;if(void 0!==a)return a;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const a=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)["__scope"+r]}),{});return r.useMemo(()=>({["__scope"+t.scopeName]:a}),[a])}};return n.scopeName=t.scopeName,n}(a,...t)]})},function(e,t,n){var r=n(77),a=n(0),l=n(38),o=n(23),i=n(39),c=n(40),u=n(41),s=n(209),f=n(210),d=n(211),p=n(79),m=n(56),h=n(81),v=n(199),b=n(82),g=n(55);function y(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function w(e){return e&&e.__esModule?e.default:e}y(e.exports,"createDialogScope",()=>E),y(e.exports,"Dialog",()=>_),y(e.exports,"DialogTrigger",()=>M),y(e.exports,"DialogPortal",()=>P),y(e.exports,"DialogOverlay",()=>S),y(e.exports,"DialogContent",()=>T),y(e.exports,"DialogTitle",()=>R),y(e.exports,"DialogDescription",()=>B),y(e.exports,"DialogClose",()=>D),y(e.exports,"Root",()=>U),y(e.exports,"Trigger",()=>z),y(e.exports,"Portal",()=>V),y(e.exports,"Overlay",()=>W),y(e.exports,"Content",()=>G),y(e.exports,"Title",()=>q),y(e.exports,"Description",()=>Y),y(e.exports,"Close",()=>X),y(e.exports,"WarningProvider",()=>F);const[x,E]=i.createContextScope("Dialog"),[C,O]=x("Dialog"),_=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:l,onOpenChange:o,modal:i=!0}=e,s=a.useRef(null),f=a.useRef(null),[d=!1,p]=u.useControllableState({prop:r,defaultProp:l,onChange:o});return a.createElement(C,{scope:t,triggerRef:s,contentRef:f,contentId:c.useId(),titleId:c.useId(),descriptionId:c.useId(),open:d,onOpenChange:p,onOpenToggle:a.useCallback(()=>p(e=>!e),[p]),modal:i},n)},M=a.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,c=O("DialogTrigger",n),u=o.useComposedRefs(t,c.triggerRef);return a.createElement(m.Primitive.button,w(r)({type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":A(c.open)},i,{ref:u,onClick:l.composeEventHandlers(e.onClick,c.onOpenToggle)}))}),[k,j]=x("DialogPortal",{forceMount:void 0}),P=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:l}=e,o=O("DialogPortal",t);return a.createElement(k,{scope:t,forceMount:n},a.Children.map(r,e=>a.createElement(p.Presence,{present:n||o.open},a.createElement(d.Portal,{asChild:!0,container:l},e))))},S=a.forwardRef((e,t)=>{const n=j("DialogOverlay",e.__scopeDialog),{forceMount:l=n.forceMount,...o}=e,i=O("DialogOverlay",e.__scopeDialog);return i.modal?a.createElement(p.Presence,{present:l||i.open},a.createElement(Z,w(r)({},o,{ref:t}))):null}),Z=a.forwardRef((e,t)=>{const{__scopeDialog:n,...l}=e,o=O("DialogOverlay",n);return a.createElement(v.RemoveScroll,{as:g.Slot,allowPinchZoom:!0,shards:[o.contentRef]},a.createElement(m.Primitive.div,w(r)({"data-state":A(o.open)},l,{ref:t,style:{pointerEvents:"auto",...l.style}})))}),T=a.forwardRef((e,t)=>{const n=j("DialogContent",e.__scopeDialog),{forceMount:l=n.forceMount,...o}=e,i=O("DialogContent",e.__scopeDialog);return a.createElement(p.Presence,{present:l||i.open},i.modal?a.createElement(N,w(r)({},o,{ref:t})):a.createElement(I,w(r)({},o,{ref:t})))}),N=a.forwardRef((e,t)=>{const n=O("DialogContent",e.__scopeDialog),i=a.useRef(null),c=o.useComposedRefs(t,n.contentRef,i);return a.useEffect(()=>{const e=i.current;if(e)return b.hideOthers(e)},[]),a.createElement(L,w(r)({},e,{ref:c,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:l.composeEventHandlers(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:l.composeEventHandlers(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:l.composeEventHandlers(e.onFocusOutside,e=>e.preventDefault())}))}),I=a.forwardRef((e,t)=>{const n=O("DialogContent",e.__scopeDialog),l=a.useRef(!1),o=a.useRef(!1);return a.createElement(L,w(r)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var r,a;null===(r=e.onCloseAutoFocus)||void 0===r||r.call(e,t),t.defaultPrevented||(l.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),t.preventDefault()),l.current=!1,o.current=!1},onInteractOutside:t=>{var r,a;null===(r=e.onInteractOutside)||void 0===r||r.call(e,t),t.defaultPrevented||(l.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const i=t.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(i))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}}))}),L=a.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:l,onOpenAutoFocus:i,onCloseAutoFocus:c,...u}=e,d=O("DialogContent",n),p=a.useRef(null),m=o.useComposedRefs(t,p);return h.useFocusGuards(),a.createElement(a.Fragment,null,a.createElement(f.FocusScope,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:i,onUnmountAutoFocus:c},a.createElement(s.DismissableLayer,w(r)({role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":A(d.open)},u,{ref:m,onDismiss:()=>d.onOpenChange(!1)}))),!1)}),R=a.forwardRef((e,t)=>{const{__scopeDialog:n,...l}=e,o=O("DialogTitle",n);return a.createElement(m.Primitive.h2,w(r)({id:o.titleId},l,{ref:t}))}),B=a.forwardRef((e,t)=>{const{__scopeDialog:n,...l}=e,o=O("DialogDescription",n);return a.createElement(m.Primitive.p,w(r)({id:o.descriptionId},l,{ref:t}))}),D=a.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=O("DialogClose",n);return a.createElement(m.Primitive.button,w(r)({type:"button"},o,{ref:t,onClick:l.composeEventHandlers(e.onClick,()=>i.onOpenChange(!1))}))});function A(e){return e?"open":"closed"}const[F,H]=i.createContext("DialogTitleWarning",{contentName:"DialogContent",titleName:"DialogTitle",docsSlug:"dialog"}),U=_,z=M,V=P,W=S,G=T,q=R,Y=B,X=D},function(e,t,n){var r=n(0),a=n(27);!function(e,t,n,r){Object.defineProperty(e,"useControllableState",{get:n,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[l,o]=function({defaultProp:e,onChange:t}){const n=r.useState(e),[l]=n,o=r.useRef(l),i=a.useCallbackRef(t);return r.useEffect(()=>{o.current!==l&&(i(l),o.current=l)},[l,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,c=i?e:l,u=a.useCallbackRef(n);return[c,r.useCallback(t=>{if(i){const n=t,r="function"==typeof t?n(e):t;r!==e&&u(r)}else o(t)},[i,e,o,u])]})},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(62)},function(e,t,n){var r=n(88),a=n(0),l=n(38),o=n(89),i=n(23),c=n(39),u=n(40),s=n(56),f=n(27),d=n(41),p=n(90);function m(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function h(e){return e&&e.__esModule?e.default:e}m(e.exports,"createRovingFocusGroupScope",()=>x),m(e.exports,"RovingFocusGroup",()=>O),m(e.exports,"RovingFocusGroupItem",()=>M),m(e.exports,"Root",()=>P),m(e.exports,"Item",()=>S);const v={bubbles:!1,cancelable:!0},[b,g,y]=o.createCollection("RovingFocusGroup"),[w,x]=c.createContextScope("RovingFocusGroup",[y]),[E,C]=w("RovingFocusGroup"),O=a.forwardRef((e,t)=>a.createElement(b.Provider,{scope:e.__scopeRovingFocusGroup},a.createElement(b.Slot,{scope:e.__scopeRovingFocusGroup},a.createElement(_,h(r)({},e,{ref:t}))))),_=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:c=!1,dir:u,currentTabStopId:m,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:y,onEntryFocus:w,...x}=e,C=a.useRef(null),O=i.useComposedRefs(t,C),_=p.useDirection(u),[M=null,k]=d.useControllableState({prop:m,defaultProp:b,onChange:y}),[P,S]=a.useState(!1),Z=f.useCallbackRef(w),T=g(n),N=a.useRef(!1),[I,L]=a.useState(0);return a.useEffect(()=>{const e=C.current;if(e)return e.addEventListener("rovingFocusGroup.onEntryFocus",Z),()=>e.removeEventListener("rovingFocusGroup.onEntryFocus",Z)},[Z]),a.createElement(E,{scope:n,orientation:o,dir:_,loop:c,currentTabStopId:M,onItemFocus:a.useCallback(e=>k(e),[k]),onItemShiftTab:a.useCallback(()=>S(!0),[]),onFocusableItemAdd:a.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:a.useCallback(()=>L(e=>e-1),[])},a.createElement(s.Primitive.div,h(r)({tabIndex:P||0===I?-1:0,"data-orientation":o},x,{ref:O,style:{outline:"none",...e.style},onMouseDown:l.composeEventHandlers(e.onMouseDown,()=>{N.current=!0}),onFocus:l.composeEventHandlers(e.onFocus,e=>{const t=!N.current;if(e.target===e.currentTarget&&t&&!P){const t=new CustomEvent("rovingFocusGroup.onEntryFocus",v);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=T().filter(e=>e.focusable);j([e.find(e=>e.active),e.find(e=>e.id===M),...e].filter(Boolean).map(e=>e.ref.current))}}N.current=!1}),onBlur:l.composeEventHandlers(e.onBlur,()=>S(!1))})))}),M=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:c,...f}=e,d=u.useId(),p=c||d,m=C("RovingFocusGroupItem",n),v=m.currentTabStopId===p,y=g(n),{onFocusableItemAdd:w,onFocusableItemRemove:x}=m;return a.useEffect(()=>{if(o)return w(),()=>x()},[o,w,x]),a.createElement(b.ItemSlot,{scope:n,id:p,focusable:o,active:i},a.createElement(s.Primitive.span,h(r)({tabIndex:v?0:-1,"data-orientation":m.orientation},f,{ref:t,onMouseDown:l.composeEventHandlers(e.onMouseDown,e=>{o?m.onItemFocus(p):e.preventDefault()}),onFocus:l.composeEventHandlers(e.onFocus,()=>m.onItemFocus(p)),onKeyDown:l.composeEventHandlers(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void m.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:k[r]}(e,m.orientation,m.dir);if(void 0!==t){e.preventDefault();let n=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=m.loop?function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(n,r+1):n.slice(r+1)}setTimeout(()=>j(n))}})})))}),k={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function j(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const P=O,S=M},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;nfunction(e){const t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)},[])})},function(e,t,n){var r=n(0),a=n(13),l=n(23),o=n(29);!function(e,t,n,r){Object.defineProperty(e,"Presence",{get:()=>i,set:void 0,enumerable:!0,configurable:!0})}(e.exports);const i=e=>{const{present:t,children:n}=e,i=function(e){const[t,n]=r.useState(),l=r.useRef({}),i=r.useRef(e),u=r.useRef("none"),s=e?"mounted":"unmounted",[f,d]=function(e,t){return r.useReducer((e,n)=>{const r=t[e][n];return null!=r?r:e},e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return r.useEffect(()=>{const e=c(l.current);u.current="mounted"===f?e:"none"},[f]),o.useLayoutEffect(()=>{const t=l.current,n=i.current;if(n!==e){const r=u.current,a=c(t);e?d("MOUNT"):"none"===a||"none"===(null==t?void 0:t.display)?d("UNMOUNT"):d(n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),o.useLayoutEffect(()=>{if(t){const e=e=>{const n=c(l.current).includes(e.animationName);e.target===t&&n&&a.flushSync(()=>d("ANIMATION_END"))},n=e=>{e.target===t&&(u.current=c(l.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:r.useCallback(e=>{e&&(l.current=getComputedStyle(e)),n(e)},[])}}(t),u="function"==typeof n?n({present:i.isPresent}):r.Children.only(n),s=l.useComposedRefs(i.ref,u.ref);return"function"==typeof n||i.isPresent?r.cloneElement(u,{ref:s}):null};function c(e){return(null==e?void 0:e.animationName)||"none"}i.displayName="Presence"},function(e,t,n){var r=n(0);!function(e,t,n,r){Object.defineProperty(e,"useLayoutEffect",{get:()=>a,set:void 0,enumerable:!0,configurable:!0})}(e.exports);const a=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?r.useLayoutEffect:()=>{}},function(e,t,n){var r=n(80),a=n(0),l=n(23);function o(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function i(e){return e&&e.__esModule?e.default:e}o(e.exports,"Slot",()=>c),o(e.exports,"Slottable",()=>s),o(e.exports,"Root",()=>d);const c=a.forwardRef((e,t)=>{const{children:n,...l}=e,o=a.Children.toArray(n),c=o.find(f);if(c){const e=c.props.children,n=o.map(t=>t===c?a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null:t);return a.createElement(u,i(r)({},l,{ref:t}),a.isValidElement(e)?a.cloneElement(e,void 0,n):null)}return a.createElement(u,i(r)({},l,{ref:t}),n)});c.displayName="Slot";const u=a.forwardRef((e,t)=>{const{children:n,...r}=e;return a.isValidElement(n)?a.cloneElement(n,{...function(e,t){const n={...t};for(const r in t){const a=e[r],l=t[r];/^on[A-Z]/.test(r)?a&&l?n[r]=(...e)=>{l(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...l}:"className"===r&&(n[r]=[a,l].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:t?l.composeRefs(t,n.ref):n.ref}):a.Children.count(n)>1?a.Children.only(null):null});u.displayName="SlotClone";const s=({children:e})=>a.createElement(a.Fragment,null,e);function f(e){return a.isValidElement(e)&&e.type===s}const d=c},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),a(n(176),t),a(n(177),t)},function(e,t,n){var r=n(0);!function(e,t,n,r){Object.defineProperty(e,"usePrevious",{get:n,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function(e){const t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])})},function(e,t,n){var r=n(0),a=n(29);!function(e,t,n,r){Object.defineProperty(e,"useSize",{get:n,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function(e){const[t,n]=r.useState(void 0);return a.useLayoutEffect(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,l;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,l=t.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t})},function(e,t,n){"use strict";n.r(t),n.d(t,"composeRefs",(function(){return a})),n.d(t,"useComposedRefs",(function(){return l}));var r=n(0);function a(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}function l(...e){return Object(r.useCallback)(a(...e),e)}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;nfunction(e){const t=r.useContext(l);return e||t||"ltr"}),a(e.exports,"Provider",()=>i),a(e.exports,"DirectionProvider",()=>o);const l=r.createContext(void 0),o=e=>{const{dir:t,children:n}=e;return r.createElement(l.Provider,{value:t},n)},i=o},function(e,t,n){var r=n(0),a=n(29);!function(e,t,n,r){Object.defineProperty(e,"useId",{get:n,set:void 0,enumerable:!0,configurable:!0})}(e.exports,0,()=>function(e){const[t,n]=r.useState(l());return a.useLayoutEffect(()=>{e||n(e=>null!=e?e:String(o++))},[e]),e||(t?"radix-"+t:"")});const l=r["useId".toString()]||(()=>{});let o=0},function(e,t,n){"use strict";n.r(t),n.d(t,"useCallbackRef",(function(){return a}));var r=n(0);function a(e){const t=Object(r.useRef)(e);return Object(r.useEffect)(()=>{t.current=e}),Object(r.useMemo)(()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)},[])}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?{r:Number(n[1]),g:Number(n[2]),b:Number(n[3]),a:Number(n[4])}:{r:0,g:0,b:0,a:0}},t.ConvertRgbaStringToBaseRgba=function(e){var t=r.RGBA_REGEX,n=e.match(t);return n&&(null==n?void 0:n.length)>0?{r:Number(n[1])/255,g:Number(n[2])/255,b:Number(n[3])/255,a:Number(n[4])}:{r:0,g:0,b:0,a:0}},t.ConvertBaseRgbaToRgba=function(e,t){var n=e.a?e.a:1;return{r:255*e.r,g:255*e.g,b:255*e.b,a:t?255*n:n}},t.ConvertRgbaToBaseRgba=function(e,t){var n=e.a?e.a:255;return{r:e.r/255,g:e.g/255,b:e.b/255,a:t?n/255:n}},t.ConvertRgbaToHsla=function(e){var t,n=e.r/255,r=e.g/255,a=e.b/255,l=Math.max(n,r,a),o=Math.min(n,r,a),i=0,c=(l+o)/2;if(l===o)i=t=0;else{var u=l-o;switch(t=c>.5?u/(2-l-o):u/(l+o),l){case n:i=(r-a)/u+(r.5?u/(2-l-o):u/(l+o),l){case n:i=(r-a)/u+(ra,Object.values(a));return Object(r.createElement)(n.Provider,{value:l},t)}return a.displayName=e+"Provider",[a,function(a){const l=Object(r.useContext)(n);if(l)return l;if(void 0!==t)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}]}function l(e,t=[]){let n=[];const a=()=>{const t=n.map(e=>Object(r.createContext)(e));return function(n){const a=(null==n?void 0:n[e])||t;return Object(r.useMemo)(()=>({["__scope"+e]:{...n,[e]:a}}),[n,a])}};return a.scopeName=e,[function(t,a){const l=Object(r.createContext)(a),o=n.length;function i(t){const{scope:n,children:a,...i}=t,c=(null==n?void 0:n[e][o])||l,u=Object(r.useMemo)(()=>i,Object.values(i));return Object(r.createElement)(c.Provider,{value:u},a)}return n=[...n,a],i.displayName=t+"Provider",[i,function(n,i){const c=(null==i?void 0:i[e][o])||l,u=Object(r.useContext)(c);if(u)return u;if(void 0!==a)return a;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const a=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)["__scope"+r]}),{});return Object(r.useMemo)(()=>({["__scope"+t.scopeName]:a}),[a])}};return n.scopeName=t.scopeName,n}(a,...t)]}},function(e,t,n){"use strict";n.r(t),n.d(t,"useId",(function(){return i}));var r=n(0),a=n(18);const l=r["useId".toString()]||(()=>{});let o=0;function i(e){const[t,n]=r.useState(l());return Object(a.useLayoutEffect)(()=>{e||n(e=>null!=e?e:String(o++))},[e]),e||(t?"radix-"+t:"")}},function(e,t,n){"use strict";n.r(t),n.d(t,"useControllableState",(function(){return l}));var r=n(0),a=n(16);function l({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[l,o]=function({defaultProp:e,onChange:t}){const n=Object(r.useState)(e),[l]=n,o=Object(r.useRef)(l),i=Object(a.useCallbackRef)(t);return Object(r.useEffect)(()=>{o.current!==l&&(i(l),o.current=l)},[l,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,c=i?e:l,u=Object(a.useCallbackRef)(n);return[c,Object(r.useCallback)(t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&u(n)}else o(t)},[i,e,o,u])]}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1&&(n.l=1),(0,r.ConvertBaseHslaToRgba)(n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConvertBaseHslaToRgba=void 0,t.ConvertBaseHslaToRgba=function(e){var t,n,r,a=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e};if(0===e.s)t=n=r=e.l;else{var l=e.l<.5?e.l*(1+e.s):e.l+e.s-e.l*e.s,o=2*e.l-l;t=a(o,l,e.h+1/3),n=a(o,l,e.h),r=a(o,l,e.h-1/3)}return{r:Math.round(255*t),g:Math.round(255*n),b:Math.round(255*r),a:e.a}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BLURRED=t.CB_ACHROLY=t.CB_ACHRO=t.CB_TRITALY=t.CB_TRITA=t.CB_DEUTERLY=t.CB_DEUTER=t.CB_PROTALY=t.CB_PROTA=t.RGBA_REGEX=void 0,t.RGBA_REGEX=/rgba?\((\d+.?\d+|\d),\s*(\d+.?\d+|\d),\s*(\d+.?\d+|\d),\s*(\d+.?\d+|\d)?\)/,t.CB_PROTA="Protanopia",t.CB_PROTALY="Protanomaly",t.CB_DEUTER="Deuteranopia",t.CB_DEUTERLY="Deuteranomaly",t.CB_TRITA="Tritanopia",t.CB_TRITALY="Tritanomaly",t.CB_ACHRO="Achromatopsia",t.CB_ACHROLY="Achromatomaly",t.BLURRED="Blurred"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GetContrastRatio=void 0,t.GetContrastRatio=function(e,t,n){var r=function(e){var t,n,r;return t=e.r/255,n=e.g/255,r=e.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},a=(Math.max(r(e),r(t))+.05)/(Math.min(r(e),r(t))+.05);if(n){var l=String(a);if(-1!==l.indexOf(".")){var o=l.split(".");a=1===o.length?Number(l):Number(o[0]+"."+o[1].charAt(0)+o[1].charAt(1))}a=Number(a.toFixed(2))}return a}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]=4.5?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"AA"),y.default.createElement("span",null,"4.5:1"))),y.default.createElement("div",{className:"flex items-center gap-1"},999===a?y.default.createElement(b.IconIndeterminate,null):a>=3?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"AA"),y.default.createElement("span",null,"3:1"))),y.default.createElement("div",{className:"flex items-center gap-1"},999===a?y.default.createElement(b.IconIndeterminate,null):a>=7?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"AAA"),y.default.createElement("span",null,"7:1"))),y.default.createElement("div",{className:"flex items-center gap-1"},999===a?y.default.createElement(b.IconIndeterminate,null):a>=4.5?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"AAA"),y.default.createElement("span",null,"4.5:1")))),"apca"===t&&y.default.createElement("div",r({className:"contrast__results mx-6 mt-9 grid grid-cols-2 gap-x-10 gap-y-1 rounded-lg"},o),y.default.createElement("div",{className:"flex items-center gap-x-1"},999===a?y.default.createElement(b.IconIndeterminate,null):Math.abs(a)>=45?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"Large text"),y.default.createElement("span",null,"45"))),y.default.createElement("div",{className:"flex items-center gap-x-1"},999===a?y.default.createElement(b.IconIndeterminate,null):Math.abs(a)>=75?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"Body text"),y.default.createElement("span",null,"75"))),y.default.createElement("div",{className:"flex items-center gap-x-1"},999===a?y.default.createElement(b.IconIndeterminate,null):Math.abs(a)>=60?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"Fluent text"),y.default.createElement("span",null,"60"))),y.default.createElement("div",{className:"flex items-center gap-x-1"},999===a?y.default.createElement(b.IconIndeterminate,null):Math.abs(a)>=90?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"Preferred"),y.default.createElement("span",null,"90")))))},C=function(e){var t=e.isSelected,n=e.isFail,r=e.color,a=e.onClick;return y.default.createElement(b.Toggle,{pressed:t,className:"relative h-12 w-12 rounded transition-all hover:ring-2 hover:ring-purple-500 hover:ring-offset-2 focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 group-[.contrast-error]:!pointer-events-none group-[.contrast-error]:!bg-transparent "+(t&&"!border-2 ring-2 ring-inset ring-base-background ring-offset-1"),style:{backgroundColor:r},onPressedChange:a},n&&y.default.createElement(O,{color:v.GetLuminance(v.ConvertRgbaStringToRgba(r))>.5?"black":"white"}))},O=function(e){var t=e.color;return y.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",fill:"none",viewBox:"0 0 44 44",className:"absolute top-[3px] left-[3px]"},y.default.createElement("rect",{width:"2",height:"30",x:"31.9",y:"10.7",transform:"rotate(45 31.9 10.7)",fill:t}),y.default.createElement("rect",{width:"2",height:"30",x:"33.3",y:"31.9",transform:"rotate(135 33.3 31.9)",fill:t}))},_=function(e){var t=e.backgroundColor,n=void 0===t?w:t,a=e.foregroundColor,l=void 0===a?w:a,o=e.onColorSuggestionClick,i=e.onUpdateClick,c=e.onExpandCollapseClick,s=void 0===c?function(){}:c,f=u(e,["backgroundColor","foregroundColor","onColorSuggestionClick","onUpdateClick","onExpandCollapseClick"]),d=y.useState(n),p=d[0],m=d[1],h=y.useState(l),g=h[0],x=h[1],E=y.useState(!0),O=E[0],_=E[1],M=y.useState(),k=M[0],j=M[1],P=y.useState(0),S=P[0],Z=P[1],T=y.useState(0),N=T[0],I=T[1],L=y.useState([!1,!1,!1,!1,!1]),R=L[0],B=L[1],D=y.useState([!1,!1,!1,!1,!1]),A=D[0],F=D[1],H=function(e,t,n){var r=v.ConvertRgbaStringToRgba(n);if("background"===t){Z(e),m(r);var a=[];null==k||k.foregroundSuggestions.forEach((function(e){a.push(v.GetContrastRatio(r,v.ConvertRgbaStringToRgba(e))<4.5)})),F(a)}else if("foreground"===t){I(e),x(r);var l=[];null==k||k.backgroundSuggestions.forEach((function(e){l.push(v.GetContrastRatio(v.ConvertRgbaStringToRgba(e),r)<4.5)})),B(l)}o(t,r)};return y.useEffect((function(){m(n),x(l),Z(0),I(0),B([!1,!1,!1,!1,!1]),F([!1,!1,!1,!1,!1]),j(function(e,t){var n=v.GetColorSuggestions(e,t,4,.05,.1);n.unshift(v.ConvertRgbaToRgbaString(e));var r=v.GetColorSuggestions(t,e,4,.05,.1);return r.unshift(v.ConvertRgbaToRgbaString(t)),{backgroundSuggestions:n,foregroundSuggestions:r}}(n,l))}),[n,l]),y.default.createElement("section",r({className:"contrast__suggestions relative z-0 ml-2 mr-2 mt-6 animate-rotatingGradient rounded-lg py-2 px-4 before:absolute before:top-px before:right-px before:bottom-px before:left-px before:-z-10 before:rounded-lg before:bg-base-background",style:{background:"conic-gradient(from var(--a) at 50% 50%, rgba(92, 193, 131, 0.41) -37.18deg, rgba(233, 133, 53, 0.49) 39.18deg, rgba(224, 85, 52, 0.15) 116.94deg, #7662F6 196.33deg, rgba(74, 158, 244, 0.38) 259.5deg, rgba(92, 193, 131, 0.41) 322.82deg, rgba(233, 133, 53, 0.49) 399.18deg)"}},f),y.default.createElement("div",{className:"flex items-center justify-between",onClick:function(){s(),_(!O)}},y.default.createElement("div",{className:"flex items-center"},y.default.createElement(b.IconSidekick,{className:"mr-2"}),y.default.createElement(b.Headline,{level:"title"},"Suggestions")),O?y.default.createElement(b.IconChevronDown,{className:"text-gray-900"}):y.default.createElement(b.IconChevronUp,{className:"text-gray-900"})),O&&y.default.createElement(y.default.Fragment,null,y.default.createElement("div",{className:"mb-4 mt-2 grid grid-cols-5 justify-between gap-x-4 gap-y-3"},null==k?void 0:k.backgroundSuggestions.map((function(e,t){return y.default.createElement(C,{key:t,isSelected:S===t,isFail:R[t],color:e,onClick:function(){return H(t,"background",e)}})})),null==k?void 0:k.foregroundSuggestions.map((function(e,t){return y.default.createElement(C,{key:t,isSelected:N===t,isFail:A[t],color:e,onClick:function(){return H(t,"foreground",e)}})}))),y.default.createElement(b.Button,{buttonType:"secondary",size:"large",isBlock:!0,className:"mb-2 group-[.contrast-error]:pointer-events-none group-[.contrast-error]:cursor-not-allowed group-[.contrast-error]:!opacity-50",onClick:function(){i(p,g)}},"Apply suggestions")))}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){var e=document.getElementsByClassName("heading-item");e[e.length-1].scrollIntoView({behavior:"smooth",block:"end",inline:"end"})}};return d.useEffect((function(){c.postMessageToPlugin(o.WebEvs.headings_loaded,{}),window.headingsLoaded=function(e){var t=JSON.parse(e);t.artboards&&v(t.artboards)}}),[]),d.default.createElement("div",{className:"headings relative flex h-full flex-col"},d.default.createElement(u.TopBar,{leftSide:d.default.createElement(f.Label,{level:"large",className:"animate-slide-left"},"Headings"),onBackClick:t,onHelpClick:function(){c.sendUrlToSketch(o.Url.HeadingsHelp),i.trackMixpanelEvent(n,"Help clicked",{Tool:"Headings"})}}),d.default.createElement("main",{className:"flex h-full flex-col"},d.default.createElement("section",null,d.default.createElement(f.Body,{level:"medium",className:"px-4 pt-3 pb-4"},"Select any text layer to indicate its hierarchy",d.default.createElement("br",null),"and click add"),d.default.createElement("form",{className:"mb-0 flex items-end border-b border-b-border-divider pr-4 pb-4 pl-4",onSubmit:function(e){e.preventDefault()}},d.default.createElement(f.Select,{id:"headingType",label:"Heading type",hideLabel:!0,value:a,onChange:function(e){l(e.target.value)}},d.default.createElement("option",{value:"H1",id:"H1option"},"H1"),d.default.createElement("option",{value:"H2",id:"H2option"},"H2"),d.default.createElement("option",{value:"H3",id:"H3option"},"H3"),d.default.createElement("option",{value:"H4",id:"H4option"},"H4"),d.default.createElement("option",{value:"H5",id:"H5option"},"H5"),d.default.createElement("option",{value:"H6",id:"H6option"},"H6")),d.default.createElement(f.Button,{buttonType:"secondary",className:"ml-3",onClick:function(){c.postMessageToPlugin(o.WebEvs.headings_addItem,{headingType:a}),setTimeout(g,100),i.trackMixpanelEvent(n,"Heading added",{Type:a})}},"Add"))),d.default.createElement("section",{className:"h-[467px] flex-auto overflow-auto bg-gray-10"},h.map((function(e,t){return d.default.createElement(p,{key:t+"_"+e.artboardName,artboard:e,onDeleteItemClick:b})})))))};var p=function(e){var t=e.artboard,n=e.onDeleteItemClick,r=d.useState([]),a=r[0],l=r[1];return d.useEffect((function(){l(t.headings)}),[t]),d.default.createElement(u.CollapsibleItemGroup,{title:t.artboardName},a.map((function(e,t){return d.default.createElement(m,{key:t+"_"+e.layerId,level:e.level,layerId:e.layerId,layerName:e.layerName,onDeleteClick:n})})))},m=function(e){var t=e.level,n=e.layerId,r=e.layerName,a=e.onDeleteClick,l=d.useRef(null);return d.default.createElement("div",{id:n,ref:l,className:"heading-item group relative mt-2 flex items-center justify-between overflow-hidden rounded border border-border-divider py-2 px-3 transition-opacity first:mt-0",tabIndex:0},d.default.createElement("div",{className:"flex items-center gap-2"},d.default.createElement(f.Tag,{type:"index",className:"inline-flex h-5 !min-w-[26px] items-center bg-index-bg px-[5px] text-body-medium font-medium text-index-text"},t),d.default.createElement(f.Label,{color:"purple",className:"line-clamp-1"},r)),d.default.createElement("div",{className:"pointer-events-none ml-4 flex flex-nowrap opacity-0 transition-opacity group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100 group-focus:pointer-events-auto group-focus:opacity-100"},d.default.createElement(f.Button,{buttonType:"secondary-icon-only",className:"text-gray-900",onClick:function(){var e;null===(e=l.current)||void 0===e||e.classList.add("scale-y-0","!h-0","!opacity-0","border-b-none"),setTimeout((function(){a(n)}),250)},tabIndex:0},d.default.createElement(f.IconTrash,null))))}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),i=n(7),c=n(9),u=n(8),s=n(5),f=n(2),d=l(n(0));t.default=function(e){var t=e.onBackClick,n=d.useContext(s.UserStateContext),r=d.useState("Aside"),a=r[0],l=r[1],m=d.useState([]),h=m[0],v=m[1],b=function(e){c.postMessageToPlugin(o.WebEvs.landmarks_deleteItem,{layerId:e})},g=function(){if(h&&h.length>0){var e=document.getElementsByClassName("landmark-item");e[e.length-1].scrollIntoView({behavior:"smooth",block:"end",inline:"end"})}};return d.useEffect((function(){c.postMessageToPlugin(o.WebEvs.landmarks_loaded,{}),window.landmarksLoaded=function(e){var t=JSON.parse(e);t.artboards&&v(t.artboards)}}),[]),d.default.createElement("div",{className:"landmarks relative flex h-full flex-col"},d.default.createElement(u.TopBar,{leftSide:d.default.createElement(f.Label,{level:"large",className:"animate-slide-left"},"Landmarks"),onBackClick:t,onHelpClick:function(){c.sendUrlToSketch(o.Url.LandmarksHelp),i.trackMixpanelEvent(n,"Help clicked",{Tool:"Landmarks"})}}),d.default.createElement("main",{className:"flex h-full flex-col"},d.default.createElement("section",null,d.default.createElement(f.Body,{level:"medium",className:"px-4 pt-3 pb-4"},"Select a section on your design then pick a landmark and click the add button."),d.default.createElement("form",{className:"mb-0 flex items-end border-b border-b-border-divider pr-4 pb-4 pl-4",onSubmit:function(e){e.preventDefault()}},d.default.createElement(f.Select,{id:"landmarkType",label:"Landmark type",hideLabel:!0,value:a,onChange:function(e){l(e.target.value)}},d.default.createElement("option",{value:"Aside",id:"Asideoption"},"Aside"),d.default.createElement("option",{value:"Footer",id:"Footeroption"},"Footer"),d.default.createElement("option",{value:"Form",id:"Formoption"},"Form"),d.default.createElement("option",{value:"Header",id:"Headeroption"},"Header"),d.default.createElement("option",{value:"Main",id:"Mainoption"},"Main"),d.default.createElement("option",{value:"Nav",id:"Navoption"},"Nav"),d.default.createElement("option",{value:"Section",id:"Sectionoption"},"Section")),d.default.createElement(f.Button,{buttonType:"secondary",className:"ml-3",onClick:function(){c.postMessageToPlugin(o.WebEvs.landmarks_addItem,{landmarkType:a}),setTimeout(g,100),i.trackMixpanelEvent(n,"Landmark added",{Type:a})}},"Add"))),d.default.createElement("section",{className:"h-[467px] flex-auto overflow-auto bg-gray-10"},h.map((function(e,t){return d.default.createElement(p,{key:t+"_"+e.artboardName,artboard:e,onDeleteItemClick:b})})))))};var p=function(e){var t=e.artboard,n=e.onDeleteItemClick,r=d.useState([]),a=r[0],l=r[1];return d.useEffect((function(){l(t.landmarks)}),[t]),d.default.createElement(u.CollapsibleItemGroup,{title:t.artboardName},a.map((function(e,t){return d.default.createElement(m,{key:t+"_"+e.layerId,type:e.type,layerId:e.layerId,layerName:e.layerName,onDeleteClick:n})})))},m=function(e){var t=e.type,n=e.layerId,r=e.layerName,a=e.onDeleteClick,l=d.useRef(null);return d.default.createElement("div",{id:n,ref:l,className:"landmark-item group relative flex h-12 items-center justify-between border-b border-b-border-divider transition-all last:border-transparent",tabIndex:0},d.default.createElement("div",{className:"flex items-center gap-2"},d.default.createElement(u.LandmarkTag,{type:t}),d.default.createElement(f.Label,null,r)),d.default.createElement("div",{className:"pointer-events-none ml-4 flex flex-nowrap opacity-0 transition-opacity group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100 group-focus:pointer-events-auto group-focus:opacity-100"},d.default.createElement(f.Button,{buttonType:"secondary-icon-only",className:"text-gray-900",onClick:function(){var e;null===(e=l.current)||void 0===e||e.classList.add("scale-y-0","!h-0","!opacity-0","border-b-none"),setTimeout((function(){a(n)}),250)},tabIndex:0},d.default.createElement(f.IconTrash,null))))}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n11),o(n.showBlankState)}}}),[]),p.default.createElement("div",{className:"typography"},p.default.createElement(s.TopBar,{leftSide:p.default.createElement(d.Label,{level:"large",className:"animate-slide-left"},"Typography"),onBackClick:t,onHelpClick:function(){u.sendUrlToSketch(i.Url.TypographyHelp),c.trackMixpanelEvent(n,"Help clicked",{Tool:"Typography"})}}),p.default.createElement("main",null,p.default.createElement("div",{className:"flex items-center justify-center gap-6 border-b border-b-border-divider py-5"},p.default.createElement(d.Button,{buttonType:"primary-icon-only",className:"px-0 text-gray-900",isDisabled:l,onClick:function(){if(parseInt(g)>1){var e=parseInt(g)-1;y(e),N(e,x)}}},p.default.createElement(d.IconMinus,null)),p.default.createElement(d.Display,{className:"min-w-[158px] text-center tabular-nums"},l?"0":g+"px"),p.default.createElement(d.Button,{buttonType:"primary-icon-only",className:"px-0 text-gray-900",isDisabled:l,onClick:function(){if(parseInt(g)<999){var e=parseInt(g)+1;y(e),N(e,x)}}},p.default.createElement(d.IconPlus,null))),p.default.createElement("div",{className:"flex items-center justify-center border-b border-b-border-divider py-4 px-6"},p.default.createElement("div",{className:"tabs inline-flex h-8 w-full items-center rounded bg-tab-bg"},p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("left"===x?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("left")}},p.default.createElement(d.IconTextAlignLeft,null)),p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("center"===x?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("center")}},p.default.createElement(d.IconTextAlignCenter,null)),p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("right"===x?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("right")}},p.default.createElement(d.IconTextAlignRight,null)),p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("justified"===x?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("justified")}},p.default.createElement(d.IconTextAlignJustified,null)))),p.default.createElement("div",{className:"py-5 px-6"},p.default.createElement(d.Headline,{level:"title",className:"mb-2"},"Typography"),p.default.createElement("div",{className:"group mb-2 flex items-center"},g>11?p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconPass,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Font Size above 11px")):p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconFail,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Font Size below 12px")),p.default.createElement("div",{className:"relative ml-auto"},p.default.createElement("div",{className:"invisible absolute bottom-8 -right-[22px] min-w-[216px] rounded border border-gray-900 bg-base-background p-1 opacity-0 transition-opacity delay-700 after:absolute after:-bottom-[7px] after:right-6 after:h-3 after:w-3 after:rotate-45 after:border-b after:border-r after:border-b-gray-900 after:border-r-gray-900 after:bg-base-background group-hover:visible group-hover:opacity-100 group-focus:visible group-focus:opacity-100",role:"tooltip",id:"statusTooltip"},p.default.createElement(d.Body,{className:"relative z-10"},"Text is likely too small to be easily readable. We recommend using a font size of at least 12px.")),p.default.createElement("div",{"aria-describedby":"statusTooltip"},p.default.createElement(d.IconHelp,{height:"16",width:"16",className:"ml-auto text-gray-900"})))),p.default.createElement("div",{className:"group flex items-center"},"justified"===x||l?p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconFail,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Text Align justified")):p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconPass,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Text Align ",x.toLowerCase())),p.default.createElement("div",{className:"relative ml-auto"},p.default.createElement("div",{className:"invisible absolute bottom-8 -right-[22px] min-w-[216px] rounded border border-gray-900 bg-base-background p-1 opacity-0 transition-opacity delay-700 after:absolute after:-bottom-[7px] after:right-6 after:h-3 after:w-3 after:rotate-45 after:border-b after:border-r after:border-b-gray-900 after:border-r-gray-900 after:bg-base-background group-hover:visible group-hover:opacity-100 group-focus:visible group-focus:opacity-100",role:"tooltip",id:"statusTooltip"},p.default.createElement(d.Body,{className:"relative z-10"},"Justified text alignment negatively impacts readability. We recommend using “left” or “right”.")),p.default.createElement("div",{"aria-describedby":"statusTooltip"},p.default.createElement(d.IconHelp,{height:"16",width:"16",className:"ml-auto text-gray-900"}))))),p.default.createElement("footer",{className:"relative z-0 ml-2 mr-2 animate-rotatingGradient rounded-lg py-2 px-4 before:absolute before:top-px before:right-px before:bottom-px before:left-px before:-z-10 before:rounded-lg before:bg-base-background",style:{background:"conic-gradient(from 180deg at 50% 50%, rgba(92, 193, 131, 0.41) -37.18deg, rgba(233, 133, 53, 0.49) 39.18deg, rgba(224, 85, 52, 0.15) 116.94deg, #7662F6 196.33deg, rgba(74, 158, 244, 0.38) 259.5deg, rgba(92, 193, 131, 0.41) 322.82deg, rgba(233, 133, 53, 0.49) 399.18deg)"}},p.default.createElement("div",{className:"flex items-center justify-between",onClick:function(){_(!O),u.postMessageToPlugin(i.WebEvs.typography_expandCollapseClick,{})}},p.default.createElement("div",{className:"flex items-center"},p.default.createElement(d.IconSidekick,{className:"mr-2"}),p.default.createElement(d.Headline,{level:"title"},"Suggestion")),O?p.default.createElement(d.IconChevronDown,{className:"text-gray-900"}):p.default.createElement(d.IconChevronUp,{className:"text-gray-900"})),O&&p.default.createElement(p.default.Fragment,null,p.default.createElement("div",{className:"mb-4 mt-2 flex gap-2"},g<12&&g>0&&p.default.createElement("div",{className:"grow rounded-lg border border-border-divider py-2 px-3 "+(k?"ring-2 ring-purple-500":""),role:"button",tabIndex:0,onKeyPress:function(e){"Enter"===e.key&&j(!k)},onClick:function(){return j(!k)}},p.default.createElement(d.Body,{color:"secondary"},"Font Size"),p.default.createElement(d.Body,{color:"secondary"},"12px")),"justified"===x&&p.default.createElement("div",{className:"grow rounded-lg border border-border-divider py-2 px-3 "+(S?"ring-2 ring-purple-500":""),role:"button",tabIndex:0,onKeyPress:function(e){"Enter"===e.key&&Z(!S)},onClick:function(){return Z(!S)}},p.default.createElement(d.Body,{color:"secondary"},"Text Align"),p.default.createElement(d.Body,{color:"secondary"},"Left")),(l||g>11&&"JUSTIFIED"!==x)&&p.default.createElement("div",{className:"flex h-[58px] grow items-center justify-center rounded-lg border border-border-divider py-2 px-3"},p.default.createElement(d.Body,{level:"medium",color:"secondary"},l?"Select a layer to get suggestions.":"Looks good! Nothing to suggest."))),p.default.createElement(d.Button,{buttonType:"secondary",size:"large",isBlock:!0,isDisabled:g>11&&"justified"!==x||l,className:"mb-2",onClick:function(){var e=k?12:g,t=S?"left":x;y(e),E(t),v(r(r({},h),{size:e,alignment:t})),u.postMessageToPlugin(i.WebEvs.typography_applyTypographyChange,{layerId:h.layerId,fontSize:e,alignment:t}),c.trackMixpanelEvent(n,"Typography suggestion inserted",{Size:e,Alignment:t})}},"Apply suggestion")))))}},function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{__scopeRadio:n,name:i,checked:u=!1,required:s,disabled:f,value:d="on",onCheck:p,...m}=e,[h,v]=Object(a.useState)(null),g=Object(o.useComposedRefs)(t,e=>v(e)),y=Object(a.useRef)(!1),w=!h||Boolean(h.closest("form"));return Object(a.createElement)(b,{scope:n,checked:u,disabled:f},Object(a.createElement)(c.Primitive.button,r({type:"button",role:"radio","aria-checked":u,"data-state":E(u),"data-disabled":f?"":void 0,disabled:f,value:d},m,{ref:g,onClick:Object(l.composeEventHandlers)(e.onClick,e=>{u||null==p||p(),w&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})})),w&&Object(a.createElement)(x,{control:h,bubbles:!y.current,name:i,value:d,checked:u,required:s,disabled:f,style:{transform:"translateX(-100%)"}}))}),w=Object(a.forwardRef)((e,t)=>{const{__scopeRadio:n,forceMount:l,...o}=e,i=g("RadioIndicator",n);return Object(a.createElement)(m.Presence,{present:l||i.checked},Object(a.createElement)(c.Primitive.span,r({"data-state":E(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))}),x=e=>{const{control:t,checked:n,bubbles:l=!0,...o}=e,i=Object(a.useRef)(null),c=Object(p.usePrevious)(n),u=Object(d.useSize)(t);return Object(a.useEffect)(()=>{const e=i.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==n&&r){const t=new Event("click",{bubbles:l});r.call(e,n),e.dispatchEvent(t)}},[c,n,l]),Object(a.createElement)("input",r({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function E(e){return e?"checked":"unchecked"}const C=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],[O,_]=Object(i.createContextScope)("RadioGroup",[u.createRovingFocusGroupScope,v]),M=Object(u.createRovingFocusGroupScope)(),k=v(),[j,P]=O("RadioGroup"),S=Object(a.forwardRef)((e,t)=>{const{__scopeRadioGroup:n,name:l,defaultValue:o,value:i,required:d=!1,disabled:p=!1,orientation:m,dir:h,loop:v=!0,onValueChange:b,...g}=e,y=M(n),w=Object(f.useDirection)(h),[x,E]=Object(s.useControllableState)({prop:i,defaultProp:o,onChange:b});return Object(a.createElement)(j,{scope:n,name:l,required:d,disabled:p,value:x,onValueChange:E},Object(a.createElement)(u.Root,r({asChild:!0},y,{orientation:m,dir:w,loop:v}),Object(a.createElement)(c.Primitive.div,r({role:"radiogroup","aria-required":d,"aria-orientation":m,"data-disabled":p?"":void 0,dir:w},g,{ref:t}))))}),Z=Object(a.forwardRef)((e,t)=>{const{__scopeRadioGroup:n,disabled:i,...c}=e,s=P("RadioGroupItem",n),f=s.disabled||i,d=M(n),p=k(n),m=Object(a.useRef)(null),h=Object(o.useComposedRefs)(t,m),v=s.value===c.value,b=Object(a.useRef)(!1);return Object(a.useEffect)(()=>{const e=e=>{C.includes(e.key)&&(b.current=!0)},t=()=>b.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),Object(a.createElement)(u.Item,r({asChild:!0},d,{focusable:!f,active:v}),Object(a.createElement)(y,r({disabled:f,required:s.required,checked:v},p,c,{name:s.name,ref:h,onCheck:()=>s.onValueChange(c.value),onKeyDown:Object(l.composeEventHandlers)(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:Object(l.composeEventHandlers)(c.onFocus,()=>{var e;b.current&&(null===(e=m.current)||void 0===e||e.click())})})))}),T=Object(a.forwardRef)((e,t)=>{const{__scopeRadioGroup:n,...l}=e,o=k(n);return Object(a.createElement)(w,r({},o,l,{ref:t}))}),N=S,I=Z,L=T},function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{children:n,...l}=e,o=a.Children.toArray(n),c=o.find(u);if(c){const e=c.props.children,n=o.map(t=>t===c?a.Children.count(e)>1?a.Children.only(null):Object(a.isValidElement)(e)?e.props.children:null:t);return Object(a.createElement)(i,r({},l,{ref:t}),Object(a.isValidElement)(e)?Object(a.cloneElement)(e,void 0,n):null)}return Object(a.createElement)(i,r({},l,{ref:t}),n)});o.displayName="Slot";const i=Object(a.forwardRef)((e,t)=>{const{children:n,...r}=e;return Object(a.isValidElement)(n)?Object(a.cloneElement)(n,{...function(e,t){const n={...t};for(const r in t){const a=e[r],l=t[r];/^on[A-Z]/.test(r)?a&&l?n[r]=(...e)=>{l(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...l}:"className"===r&&(n[r]=[a,l].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:t?Object(l.composeRefs)(t,n.ref):n.ref}):a.Children.count(n)>1?a.Children.only(null):null});i.displayName="SlotClone";const c=({children:e})=>Object(a.createElement)(a.Fragment,null,e);function u(e){return Object(a.isValidElement)(e)&&e.type===c}const s=o},function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const n=Object(a.forwardRef)((e,n)=>{const{asChild:l,...i}=e,c=l?o.Slot:t;return Object(a.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),Object(a.createElement)(c,r({},i,{ref:n}))});return n.displayName="Primitive."+t,{...e,[t]:n}},{});function c(e,t){e&&Object(l.flushSync)(()=>e.dispatchEvent(t))}const u=i},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;nfunction(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=a.useCallbackRef(e);r.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[n,t])})},function(e,t,n){"use strict";n.r(t);var r=n(0),a=n.n(r),l=n(13),o=n(57),i=n.n(o),c=n(5);n(194),document.addEventListener("contextmenu",(function(e){return e.preventDefault()})),window.prepareFirstLoad=function(e){Object(l.render)(a.a.createElement(c.UserDataProvider,null,a.a.createElement(c.AppSettingsProvider,null,a.a.createElement(i.a,e))),document.getElementById("react-page"))}},,function(e,t,n){"use strict"; +*/var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,o,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;ca,Object.values(a));return Object(r.createElement)(n.Provider,{value:l},t)}return a.displayName=e+"Provider",[a,function(a){const l=Object(r.useContext)(n);if(l)return l;if(void 0!==t)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}]}function l(e,t=[]){let n=[];const a=()=>{const t=n.map(e=>Object(r.createContext)(e));return function(n){const a=(null==n?void 0:n[e])||t;return Object(r.useMemo)(()=>({["__scope"+e]:{...n,[e]:a}}),[n,a])}};return a.scopeName=e,[function(t,a){const l=Object(r.createContext)(a),o=n.length;function i(t){const{scope:n,children:a,...i}=t,c=(null==n?void 0:n[e][o])||l,u=Object(r.useMemo)(()=>i,Object.values(i));return Object(r.createElement)(c.Provider,{value:u},a)}return n=[...n,a],i.displayName=t+"Provider",[i,function(n,i){const c=(null==i?void 0:i[e][o])||l,u=Object(r.useContext)(c);if(u)return u;if(void 0!==a)return a;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const a=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)["__scope"+r]}),{});return Object(r.useMemo)(()=>({["__scope"+t.scopeName]:a}),[a])}};return n.scopeName=t.scopeName,n}(a,...t)]}},function(e,t,n){"use strict";n.r(t),n.d(t,"useId",(function(){return i}));var r=n(0),a=n(18);const l=r["useId".toString()]||(()=>{});let o=0;function i(e){const[t,n]=r.useState(l());return Object(a.useLayoutEffect)(()=>{e||n(e=>null!=e?e:String(o++))},[e]),e||(t?"radix-"+t:"")}},function(e,t,n){"use strict";n.r(t),n.d(t,"useControllableState",(function(){return l}));var r=n(0),a=n(16);function l({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[l,o]=function({defaultProp:e,onChange:t}){const n=Object(r.useState)(e),[l]=n,o=Object(r.useRef)(l),i=Object(a.useCallbackRef)(t);return Object(r.useEffect)(()=>{o.current!==l&&(i(l),o.current=l)},[l,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,c=i?e:l,u=Object(a.useCallbackRef)(n);return[c,Object(r.useCallback)(t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&u(n)}else o(t)},[i,e,o,u])]}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1&&(n.l=1),(0,r.ConvertBaseHslaToRgba)(n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConvertBaseHslaToRgba=void 0,t.ConvertBaseHslaToRgba=function(e){var t,n,r,a=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e};if(0===e.s)t=n=r=e.l;else{var l=e.l<.5?e.l*(1+e.s):e.l+e.s-e.l*e.s,o=2*e.l-l;t=a(o,l,e.h+1/3),n=a(o,l,e.h),r=a(o,l,e.h-1/3)}return{r:Math.round(255*t),g:Math.round(255*n),b:Math.round(255*r),a:e.a}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BLURRED=t.CB_ACHROLY=t.CB_ACHRO=t.CB_TRITALY=t.CB_TRITA=t.CB_DEUTERLY=t.CB_DEUTER=t.CB_PROTALY=t.CB_PROTA=t.RGBA_REGEX=void 0,t.RGBA_REGEX=/rgba?\((\d+.?\d+|\d),\s*(\d+.?\d+|\d),\s*(\d+.?\d+|\d),\s*(\d+.?\d+|\d)?\)/,t.CB_PROTA="Protanopia",t.CB_PROTALY="Protanomaly",t.CB_DEUTER="Deuteranopia",t.CB_DEUTERLY="Deuteranomaly",t.CB_TRITA="Tritanopia",t.CB_TRITALY="Tritanomaly",t.CB_ACHRO="Achromatopsia",t.CB_ACHROLY="Achromatomaly",t.BLURRED="Blurred"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GetContrastRatio=void 0,t.GetContrastRatio=function(e,t,n){var r=function(e){var t,n,r;return t=e.r/255,n=e.g/255,r=e.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},a=(Math.max(r(e),r(t))+.05)/(Math.min(r(e),r(t))+.05);if(n){var l=String(a);if(-1!==l.indexOf(".")){var o=l.split(".");a=1===o.length?Number(l):Number(o[0]+"."+o[1].charAt(0)+o[1].charAt(1))}a=Number(a.toFixed(2))}return a}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]=4.5?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"AA"),y.default.createElement("span",null,"4.5:1"))),y.default.createElement("div",{className:"flex items-center gap-1"},999===a?y.default.createElement(b.IconIndeterminate,null):a>=3?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"AA"),y.default.createElement("span",null,"3:1"))),y.default.createElement("div",{className:"flex items-center gap-1"},999===a?y.default.createElement(b.IconIndeterminate,null):a>=7?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"AAA"),y.default.createElement("span",null,"7:1"))),y.default.createElement("div",{className:"flex items-center gap-1"},999===a?y.default.createElement(b.IconIndeterminate,null):a>=4.5?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"AAA"),y.default.createElement("span",null,"4.5:1")))),"apca"===t&&y.default.createElement("div",r({className:"contrast__results mx-6 mt-9 grid grid-cols-2 gap-x-10 gap-y-1 rounded-lg"},o),y.default.createElement("div",{className:"flex items-center gap-x-1"},999===a?y.default.createElement(b.IconIndeterminate,null):Math.abs(a)>=45?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"Large text"),y.default.createElement("span",null,"45"))),y.default.createElement("div",{className:"flex items-center gap-x-1"},999===a?y.default.createElement(b.IconIndeterminate,null):Math.abs(a)>=75?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"Body text"),y.default.createElement("span",null,"75"))),y.default.createElement("div",{className:"flex items-center gap-x-1"},999===a?y.default.createElement(b.IconIndeterminate,null):Math.abs(a)>=60?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"Fluent text"),y.default.createElement("span",null,"60"))),y.default.createElement("div",{className:"flex items-center gap-x-1"},999===a?y.default.createElement(b.IconIndeterminate,null):Math.abs(a)>=90?y.default.createElement(b.IconPass,null):y.default.createElement(b.IconFail,null),y.default.createElement(b.Body,{level:"large",className:"flex w-3/4 justify-between"},y.default.createElement("span",{className:"font-medium"},"Preferred"),y.default.createElement("span",null,"90")))))},C=function(e){var t=e.isSelected,n=e.isFail,r=e.color,a=e.onClick;return y.default.createElement(b.Toggle,{pressed:t,className:"relative h-12 w-12 rounded transition-all hover:ring-2 hover:ring-purple-500 hover:ring-offset-2 focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 group-[.contrast-error]:!pointer-events-none group-[.contrast-error]:!bg-transparent "+(t&&"!border-2 ring-2 ring-inset ring-base-background ring-offset-1"),style:{backgroundColor:r},onPressedChange:a},n&&y.default.createElement(O,{color:v.GetLuminance(v.ConvertRgbaStringToRgba(r))>.5?"black":"white"}))},O=function(e){var t=e.color;return y.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",fill:"none",viewBox:"0 0 44 44",className:"absolute top-[3px] left-[3px]"},y.default.createElement("rect",{width:"2",height:"30",x:"31.9",y:"10.7",transform:"rotate(45 31.9 10.7)",fill:t}),y.default.createElement("rect",{width:"2",height:"30",x:"33.3",y:"31.9",transform:"rotate(135 33.3 31.9)",fill:t}))},_=function(e){var t=e.backgroundColor,n=void 0===t?w:t,a=e.foregroundColor,l=void 0===a?w:a,o=e.onColorSuggestionClick,i=e.onUpdateClick,c=e.onExpandCollapseClick,s=void 0===c?function(){}:c,f=u(e,["backgroundColor","foregroundColor","onColorSuggestionClick","onUpdateClick","onExpandCollapseClick"]),d=y.useState(n),p=d[0],m=d[1],h=y.useState(l),g=h[0],x=h[1],E=y.useState(!0),O=E[0],_=E[1],M=y.useState(),k=M[0],j=M[1],P=y.useState(0),S=P[0],Z=P[1],T=y.useState(0),N=T[0],I=T[1],L=y.useState([!1,!1,!1,!1,!1]),R=L[0],B=L[1],D=y.useState([!1,!1,!1,!1,!1]),A=D[0],F=D[1],H=function(e,t,n){var r=v.ConvertRgbaStringToRgba(n);if("background"===t){Z(e),m(r);var a=[];null==k||k.foregroundSuggestions.forEach((function(e){a.push(v.GetContrastRatio(r,v.ConvertRgbaStringToRgba(e))<4.5)})),F(a)}else if("foreground"===t){I(e),x(r);var l=[];null==k||k.backgroundSuggestions.forEach((function(e){l.push(v.GetContrastRatio(v.ConvertRgbaStringToRgba(e),r)<4.5)})),B(l)}o(t,r)};return y.useEffect((function(){m(n),x(l),Z(0),I(0),B([!1,!1,!1,!1,!1]),F([!1,!1,!1,!1,!1]),j(function(e,t){var n=v.GetColorSuggestions(e,t,4,.05,.1);n.unshift(v.ConvertRgbaToRgbaString(e));var r=v.GetColorSuggestions(t,e,4,.05,.1);return r.unshift(v.ConvertRgbaToRgbaString(t)),{backgroundSuggestions:n,foregroundSuggestions:r}}(n,l))}),[n,l]),y.default.createElement("section",r({className:"contrast__suggestions relative z-0 ml-2 mr-2 mt-6 animate-rotatingGradient rounded-lg py-2 px-4 before:absolute before:top-px before:right-px before:bottom-px before:left-px before:-z-10 before:rounded-lg before:bg-base-background",style:{background:"conic-gradient(from var(--a) at 50% 50%, rgba(92, 193, 131, 0.41) -37.18deg, rgba(233, 133, 53, 0.49) 39.18deg, rgba(224, 85, 52, 0.15) 116.94deg, #7662F6 196.33deg, rgba(74, 158, 244, 0.38) 259.5deg, rgba(92, 193, 131, 0.41) 322.82deg, rgba(233, 133, 53, 0.49) 399.18deg)"}},f),y.default.createElement("div",{className:"flex items-center justify-between",onClick:function(){s(),_(!O)}},y.default.createElement("div",{className:"flex items-center"},y.default.createElement(b.IconSidekick,{className:"mr-2"}),y.default.createElement(b.Headline,{level:"title"},"Suggestions")),O?y.default.createElement(b.IconChevronDown,{className:"text-gray-900"}):y.default.createElement(b.IconChevronUp,{className:"text-gray-900"})),O&&y.default.createElement(y.default.Fragment,null,y.default.createElement("div",{className:"mb-4 mt-2 grid grid-cols-5 justify-between gap-x-4 gap-y-3"},null==k?void 0:k.backgroundSuggestions.map((function(e,t){return y.default.createElement(C,{key:t,isSelected:S===t,isFail:R[t],color:e,onClick:function(){return H(t,"background",e)}})})),null==k?void 0:k.foregroundSuggestions.map((function(e,t){return y.default.createElement(C,{key:t,isSelected:N===t,isFail:A[t],color:e,onClick:function(){return H(t,"foreground",e)}})}))),y.default.createElement(b.Button,{buttonType:"secondary",size:"large",isBlock:!0,className:"mb-2 group-[.contrast-error]:pointer-events-none group-[.contrast-error]:cursor-not-allowed group-[.contrast-error]:!opacity-50",onClick:function(){i(p,g)}},"Apply suggestions")))}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){var e=document.getElementsByClassName("heading-item");e[e.length-1].scrollIntoView({behavior:"smooth",block:"end",inline:"end"})}};return d.useEffect((function(){c.postMessageToPlugin(o.WebEvs.headings_loaded,{}),window.headingsLoaded=function(e){var t=JSON.parse(e);t.artboards&&v(t.artboards)}}),[]),d.default.createElement("div",{className:"headings relative flex h-full flex-col"},d.default.createElement(u.TopBar,{leftSide:d.default.createElement(f.Label,{level:"large",className:"animate-slide-left"},"Headings"),onBackClick:t,onHelpClick:function(){c.sendUrlToSketch(o.Url.HeadingsHelp),i.trackMixpanelEvent(n,"Help clicked",{Tool:"Headings"})}}),d.default.createElement("main",{className:"flex h-full flex-col"},d.default.createElement("section",null,d.default.createElement(f.Body,{level:"medium",className:"px-4 pt-3 pb-4"},"Select any text layer to indicate its hierarchy",d.default.createElement("br",null),"and click add"),d.default.createElement("form",{className:"mb-0 flex items-end border-b border-b-border-divider pr-4 pb-4 pl-4",onSubmit:function(e){e.preventDefault()}},d.default.createElement(f.Select,{id:"headingType",label:"Heading type",hideLabel:!0,value:a,onChange:function(e){l(e.target.value)}},d.default.createElement("option",{value:"H1",id:"H1option"},"H1"),d.default.createElement("option",{value:"H2",id:"H2option"},"H2"),d.default.createElement("option",{value:"H3",id:"H3option"},"H3"),d.default.createElement("option",{value:"H4",id:"H4option"},"H4"),d.default.createElement("option",{value:"H5",id:"H5option"},"H5"),d.default.createElement("option",{value:"H6",id:"H6option"},"H6")),d.default.createElement(f.Button,{buttonType:"secondary",className:"ml-3",onClick:function(){c.postMessageToPlugin(o.WebEvs.headings_addItem,{headingType:a}),setTimeout(g,100),i.trackMixpanelEvent(n,"Heading added",{Type:a})}},"Add"))),d.default.createElement("section",{className:"h-[467px] flex-auto overflow-auto bg-gray-10"},h.map((function(e,t){return d.default.createElement(p,{key:t+"_"+e.artboardName,artboard:e,onDeleteItemClick:b})})))))};var p=function(e){var t=e.artboard,n=e.onDeleteItemClick,r=d.useState([]),a=r[0],l=r[1];return d.useEffect((function(){l(t.headings)}),[t]),d.default.createElement(u.CollapsibleItemGroup,{title:t.artboardName},a.map((function(e,t){return d.default.createElement(m,{key:t+"_"+e.layerId,level:e.level,layerId:e.layerId,layerName:e.layerName,onDeleteClick:n})})))},m=function(e){var t=e.level,n=e.layerId,r=e.layerName,a=e.onDeleteClick,l=d.useRef(null);return d.default.createElement("div",{id:n,ref:l,className:"heading-item group relative mt-2 flex items-center justify-between overflow-hidden rounded border border-border-divider py-2 px-3 transition-opacity first:mt-0",tabIndex:0},d.default.createElement("div",{className:"flex items-center gap-2"},d.default.createElement(f.Tag,{type:"index",className:"inline-flex h-5 !min-w-[26px] items-center bg-index-bg px-[5px] text-body-medium font-medium text-index-text"},t),d.default.createElement(f.Label,{color:"purple",className:"line-clamp-1"},r)),d.default.createElement("div",{className:"pointer-events-none ml-4 flex flex-nowrap opacity-0 transition-opacity group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100 group-focus:pointer-events-auto group-focus:opacity-100"},d.default.createElement(f.Button,{buttonType:"secondary-icon-only",className:"text-gray-900",onClick:function(){var e;null===(e=l.current)||void 0===e||e.classList.add("scale-y-0","!h-0","!opacity-0","border-b-none"),setTimeout((function(){a(n)}),250)},tabIndex:0},d.default.createElement(f.IconTrash,null))))}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),i=n(7),c=n(9),u=n(8),s=n(5),f=n(2),d=l(n(0));t.default=function(e){var t=e.onBackClick,n=d.useContext(s.UserStateContext),r=d.useState("Aside"),a=r[0],l=r[1],m=d.useState([]),h=m[0],v=m[1],b=function(e){c.postMessageToPlugin(o.WebEvs.landmarks_deleteItem,{layerId:e})},g=function(){if(h&&h.length>0){var e=document.getElementsByClassName("landmark-item");e[e.length-1].scrollIntoView({behavior:"smooth",block:"end",inline:"end"})}};return d.useEffect((function(){c.postMessageToPlugin(o.WebEvs.landmarks_loaded,{}),window.landmarksLoaded=function(e){var t=JSON.parse(e);t.artboards&&v(t.artboards)}}),[]),d.default.createElement("div",{className:"landmarks relative flex h-full flex-col"},d.default.createElement(u.TopBar,{leftSide:d.default.createElement(f.Label,{level:"large",className:"animate-slide-left"},"Landmarks"),onBackClick:t,onHelpClick:function(){c.sendUrlToSketch(o.Url.LandmarksHelp),i.trackMixpanelEvent(n,"Help clicked",{Tool:"Landmarks"})}}),d.default.createElement("main",{className:"flex h-full flex-col"},d.default.createElement("section",null,d.default.createElement(f.Body,{level:"medium",className:"px-4 pt-3 pb-4"},"Select a section on your design then pick a landmark and click the add button."),d.default.createElement("form",{className:"mb-0 flex items-end border-b border-b-border-divider pr-4 pb-4 pl-4",onSubmit:function(e){e.preventDefault()}},d.default.createElement(f.Select,{id:"landmarkType",label:"Landmark type",hideLabel:!0,value:a,onChange:function(e){l(e.target.value)}},d.default.createElement("option",{value:"Aside",id:"Asideoption"},"Aside"),d.default.createElement("option",{value:"Footer",id:"Footeroption"},"Footer"),d.default.createElement("option",{value:"Form",id:"Formoption"},"Form"),d.default.createElement("option",{value:"Header",id:"Headeroption"},"Header"),d.default.createElement("option",{value:"Main",id:"Mainoption"},"Main"),d.default.createElement("option",{value:"Nav",id:"Navoption"},"Nav"),d.default.createElement("option",{value:"Section",id:"Sectionoption"},"Section")),d.default.createElement(f.Button,{buttonType:"secondary",className:"ml-3",onClick:function(){c.postMessageToPlugin(o.WebEvs.landmarks_addItem,{landmarkType:a}),setTimeout(g,100),i.trackMixpanelEvent(n,"Landmark added",{Type:a})}},"Add"))),d.default.createElement("section",{className:"h-[467px] flex-auto overflow-auto bg-gray-10"},h.map((function(e,t){return d.default.createElement(p,{key:t+"_"+e.artboardName,artboard:e,onDeleteItemClick:b})})))))};var p=function(e){var t=e.artboard,n=e.onDeleteItemClick,r=d.useState([]),a=r[0],l=r[1];return d.useEffect((function(){l(t.landmarks)}),[t]),d.default.createElement(u.CollapsibleItemGroup,{title:t.artboardName},a.map((function(e,t){return d.default.createElement(m,{key:t+"_"+e.layerId,type:e.type,layerId:e.layerId,layerName:e.layerName,onDeleteClick:n})})))},m=function(e){var t=e.type,n=e.layerId,r=e.layerName,a=e.onDeleteClick,l=d.useRef(null);return d.default.createElement("div",{id:n,ref:l,className:"landmark-item group relative flex h-12 items-center justify-between border-b border-b-border-divider transition-all last:border-transparent",tabIndex:0},d.default.createElement("div",{className:"flex items-center gap-2"},d.default.createElement(u.LandmarkTag,{type:t}),d.default.createElement(f.Label,null,r)),d.default.createElement("div",{className:"pointer-events-none ml-4 flex flex-nowrap opacity-0 transition-opacity group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100 group-focus:pointer-events-auto group-focus:opacity-100"},d.default.createElement(f.Button,{buttonType:"secondary-icon-only",className:"text-gray-900",onClick:function(){var e;null===(e=l.current)||void 0===e||e.classList.add("scale-y-0","!h-0","!opacity-0","border-b-none"),setTimeout((function(){a(n)}),250)},tabIndex:0},d.default.createElement(f.IconTrash,null))))}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n11),o(n.showBlankState)}}}),[]),p.default.createElement("div",{className:"typography"},p.default.createElement(s.TopBar,{leftSide:p.default.createElement(d.Label,{level:"large",className:"animate-slide-left"},"Typography"),onBackClick:t,onHelpClick:function(){u.sendUrlToSketch(i.Url.TypographyHelp),c.trackMixpanelEvent(n,"Help clicked",{Tool:"Typography"})}}),p.default.createElement("main",null,p.default.createElement("div",{className:"flex items-center justify-center gap-6 border-b border-b-border-divider py-5"},p.default.createElement(d.Button,{buttonType:"primary-icon-only",className:"px-0 text-gray-900",isDisabled:l,onClick:function(){if(parseInt(g)>1){var e=parseInt(g)-1;y(e),N(e,x)}}},p.default.createElement(d.IconMinus,null)),p.default.createElement(d.Display,{className:"min-w-[158px] text-center tabular-nums"},l?"0":g+"px"),p.default.createElement(d.Button,{buttonType:"primary-icon-only",className:"px-0 text-gray-900",isDisabled:l,onClick:function(){if(parseInt(g)<999){var e=parseInt(g)+1;y(e),N(e,x)}}},p.default.createElement(d.IconPlus,null))),p.default.createElement("div",{className:"flex items-center justify-center border-b border-b-border-divider py-4 px-6"},p.default.createElement("div",{className:"tabs inline-flex h-8 w-full items-center rounded bg-tab-bg"},p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("left"===x?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("left")}},p.default.createElement(d.IconTextAlignLeft,null)),p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("center"===x?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("center")}},p.default.createElement(d.IconTextAlignCenter,null)),p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("right"===x?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("right")}},p.default.createElement(d.IconTextAlignRight,null)),p.default.createElement("button",{className:"tab group my-0 mx-0.5 flex h-7 grow items-center justify-center rounded-sm border-[0.5px] py-0 px-1.5 text-gray-900 transition-all duration-200 ease-in-out "+("justified"===x?"border-border-frame bg-tab-bg-active shadow-tab-selected":"border-transparent"),tabIndex:0,onClick:function(){return T("justified")}},p.default.createElement(d.IconTextAlignJustified,null)))),p.default.createElement("div",{className:"py-5 px-6"},p.default.createElement(d.Headline,{level:"title",className:"mb-2"},"Typography"),p.default.createElement("div",{className:"group mb-2 flex items-center"},g>11?p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconPass,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Font Size above 11px")):p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconFail,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Font Size below 12px")),p.default.createElement("div",{className:"relative ml-auto"},p.default.createElement("div",{className:"invisible absolute bottom-8 -right-[22px] min-w-[216px] rounded border border-gray-900 bg-base-background p-1 opacity-0 transition-opacity delay-700 after:absolute after:-bottom-[7px] after:right-6 after:h-3 after:w-3 after:rotate-45 after:border-b after:border-r after:border-b-gray-900 after:border-r-gray-900 after:bg-base-background group-hover:visible group-hover:opacity-100 group-focus:visible group-focus:opacity-100",role:"tooltip",id:"statusTooltip"},p.default.createElement(d.Body,{className:"relative z-10"},"Text is likely too small to be easily readable. We recommend using a font size of at least 12px.")),p.default.createElement("div",{"aria-describedby":"statusTooltip"},p.default.createElement(d.IconHelp,{height:"16",width:"16",className:"ml-auto text-gray-900"})))),p.default.createElement("div",{className:"group flex items-center"},"justified"===x||l?p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconFail,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Text Align justified")):p.default.createElement(p.default.Fragment,null,p.default.createElement(d.IconPass,null),p.default.createElement(d.Label,{level:"large",className:"ml-1.5"},"Text Align ",x.toLowerCase())),p.default.createElement("div",{className:"relative ml-auto"},p.default.createElement("div",{className:"invisible absolute bottom-8 -right-[22px] min-w-[216px] rounded border border-gray-900 bg-base-background p-1 opacity-0 transition-opacity delay-700 after:absolute after:-bottom-[7px] after:right-6 after:h-3 after:w-3 after:rotate-45 after:border-b after:border-r after:border-b-gray-900 after:border-r-gray-900 after:bg-base-background group-hover:visible group-hover:opacity-100 group-focus:visible group-focus:opacity-100",role:"tooltip",id:"statusTooltip"},p.default.createElement(d.Body,{className:"relative z-10"},"Justified text alignment negatively impacts readability. We recommend using “left” or “right”.")),p.default.createElement("div",{"aria-describedby":"statusTooltip"},p.default.createElement(d.IconHelp,{height:"16",width:"16",className:"ml-auto text-gray-900"}))))),p.default.createElement("footer",{className:"relative z-0 ml-2 mr-2 animate-rotatingGradient rounded-lg py-2 px-4 before:absolute before:top-px before:right-px before:bottom-px before:left-px before:-z-10 before:rounded-lg before:bg-base-background",style:{background:"conic-gradient(from 180deg at 50% 50%, rgba(92, 193, 131, 0.41) -37.18deg, rgba(233, 133, 53, 0.49) 39.18deg, rgba(224, 85, 52, 0.15) 116.94deg, #7662F6 196.33deg, rgba(74, 158, 244, 0.38) 259.5deg, rgba(92, 193, 131, 0.41) 322.82deg, rgba(233, 133, 53, 0.49) 399.18deg)"}},p.default.createElement("div",{className:"flex items-center justify-between",onClick:function(){_(!O),u.postMessageToPlugin(i.WebEvs.typography_expandCollapseClick,{})}},p.default.createElement("div",{className:"flex items-center"},p.default.createElement(d.IconSidekick,{className:"mr-2"}),p.default.createElement(d.Headline,{level:"title"},"Suggestion")),O?p.default.createElement(d.IconChevronDown,{className:"text-gray-900"}):p.default.createElement(d.IconChevronUp,{className:"text-gray-900"})),O&&p.default.createElement(p.default.Fragment,null,p.default.createElement("div",{className:"mb-4 mt-2 flex gap-2"},g<12&&g>0&&p.default.createElement("div",{className:"grow rounded-lg border border-border-divider py-2 px-3 "+(k?"ring-2 ring-purple-500":""),role:"button",tabIndex:0,onKeyPress:function(e){"Enter"===e.key&&j(!k)},onClick:function(){return j(!k)}},p.default.createElement(d.Body,{color:"secondary"},"Font Size"),p.default.createElement(d.Body,{color:"secondary"},"12px")),"justified"===x&&p.default.createElement("div",{className:"grow rounded-lg border border-border-divider py-2 px-3 "+(S?"ring-2 ring-purple-500":""),role:"button",tabIndex:0,onKeyPress:function(e){"Enter"===e.key&&Z(!S)},onClick:function(){return Z(!S)}},p.default.createElement(d.Body,{color:"secondary"},"Text Align"),p.default.createElement(d.Body,{color:"secondary"},"Left")),(l||g>11&&"JUSTIFIED"!==x)&&p.default.createElement("div",{className:"flex h-[58px] grow items-center justify-center rounded-lg border border-border-divider py-2 px-3"},p.default.createElement(d.Body,{level:"medium",color:"secondary"},l?"Select a layer to get suggestions.":"Looks good! Nothing to suggest."))),p.default.createElement(d.Button,{buttonType:"secondary",size:"large",isBlock:!0,isDisabled:g>11&&"justified"!==x||l,className:"mb-2",onClick:function(){var e=k?12:g,t=S?"left":x;y(e),E(t),v(r(r({},h),{size:e,alignment:t})),u.postMessageToPlugin(i.WebEvs.typography_applyTypographyChange,{layerId:h.layerId,fontSize:e,alignment:t}),c.trackMixpanelEvent(n,"Typography suggestion inserted",{Size:e,Alignment:t})}},"Apply suggestion")))))}},function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{__scopeRadio:n,name:i,checked:u=!1,required:s,disabled:f,value:d="on",onCheck:p,...m}=e,[h,v]=Object(a.useState)(null),g=Object(o.useComposedRefs)(t,e=>v(e)),y=Object(a.useRef)(!1),w=!h||Boolean(h.closest("form"));return Object(a.createElement)(b,{scope:n,checked:u,disabled:f},Object(a.createElement)(c.Primitive.button,r({type:"button",role:"radio","aria-checked":u,"data-state":E(u),"data-disabled":f?"":void 0,disabled:f,value:d},m,{ref:g,onClick:Object(l.composeEventHandlers)(e.onClick,e=>{u||null==p||p(),w&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})})),w&&Object(a.createElement)(x,{control:h,bubbles:!y.current,name:i,value:d,checked:u,required:s,disabled:f,style:{transform:"translateX(-100%)"}}))}),w=Object(a.forwardRef)((e,t)=>{const{__scopeRadio:n,forceMount:l,...o}=e,i=g("RadioIndicator",n);return Object(a.createElement)(m.Presence,{present:l||i.checked},Object(a.createElement)(c.Primitive.span,r({"data-state":E(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))}),x=e=>{const{control:t,checked:n,bubbles:l=!0,...o}=e,i=Object(a.useRef)(null),c=Object(p.usePrevious)(n),u=Object(d.useSize)(t);return Object(a.useEffect)(()=>{const e=i.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==n&&r){const t=new Event("click",{bubbles:l});r.call(e,n),e.dispatchEvent(t)}},[c,n,l]),Object(a.createElement)("input",r({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function E(e){return e?"checked":"unchecked"}const C=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],[O,_]=Object(i.createContextScope)("RadioGroup",[u.createRovingFocusGroupScope,v]),M=Object(u.createRovingFocusGroupScope)(),k=v(),[j,P]=O("RadioGroup"),S=Object(a.forwardRef)((e,t)=>{const{__scopeRadioGroup:n,name:l,defaultValue:o,value:i,required:d=!1,disabled:p=!1,orientation:m,dir:h,loop:v=!0,onValueChange:b,...g}=e,y=M(n),w=Object(f.useDirection)(h),[x,E]=Object(s.useControllableState)({prop:i,defaultProp:o,onChange:b});return Object(a.createElement)(j,{scope:n,name:l,required:d,disabled:p,value:x,onValueChange:E},Object(a.createElement)(u.Root,r({asChild:!0},y,{orientation:m,dir:w,loop:v}),Object(a.createElement)(c.Primitive.div,r({role:"radiogroup","aria-required":d,"aria-orientation":m,"data-disabled":p?"":void 0,dir:w},g,{ref:t}))))}),Z=Object(a.forwardRef)((e,t)=>{const{__scopeRadioGroup:n,disabled:i,...c}=e,s=P("RadioGroupItem",n),f=s.disabled||i,d=M(n),p=k(n),m=Object(a.useRef)(null),h=Object(o.useComposedRefs)(t,m),v=s.value===c.value,b=Object(a.useRef)(!1);return Object(a.useEffect)(()=>{const e=e=>{C.includes(e.key)&&(b.current=!0)},t=()=>b.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),Object(a.createElement)(u.Item,r({asChild:!0},d,{focusable:!f,active:v}),Object(a.createElement)(y,r({disabled:f,required:s.required,checked:v},p,c,{name:s.name,ref:h,onCheck:()=>s.onValueChange(c.value),onKeyDown:Object(l.composeEventHandlers)(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:Object(l.composeEventHandlers)(c.onFocus,()=>{var e;b.current&&(null===(e=m.current)||void 0===e||e.click())})})))}),T=Object(a.forwardRef)((e,t)=>{const{__scopeRadioGroup:n,...l}=e,o=k(n);return Object(a.createElement)(w,r({},o,l,{ref:t}))}),N=S,I=Z,L=T},function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{children:n,...l}=e,o=a.Children.toArray(n),c=o.find(u);if(c){const e=c.props.children,n=o.map(t=>t===c?a.Children.count(e)>1?a.Children.only(null):Object(a.isValidElement)(e)?e.props.children:null:t);return Object(a.createElement)(i,r({},l,{ref:t}),Object(a.isValidElement)(e)?Object(a.cloneElement)(e,void 0,n):null)}return Object(a.createElement)(i,r({},l,{ref:t}),n)});o.displayName="Slot";const i=Object(a.forwardRef)((e,t)=>{const{children:n,...r}=e;return Object(a.isValidElement)(n)?Object(a.cloneElement)(n,{...function(e,t){const n={...t};for(const r in t){const a=e[r],l=t[r];/^on[A-Z]/.test(r)?a&&l?n[r]=(...e)=>{l(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...l}:"className"===r&&(n[r]=[a,l].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:t?Object(l.composeRefs)(t,n.ref):n.ref}):a.Children.count(n)>1?a.Children.only(null):null});i.displayName="SlotClone";const c=({children:e})=>Object(a.createElement)(a.Fragment,null,e);function u(e){return Object(a.isValidElement)(e)&&e.type===c}const s=o},function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const n=Object(a.forwardRef)((e,n)=>{const{asChild:l,...i}=e,c=l?o.Slot:t;return Object(a.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),Object(a.createElement)(c,r({},i,{ref:n}))});return n.displayName="Primitive."+t,{...e,[t]:n}},{});function c(e,t){e&&Object(l.flushSync)(()=>e.dispatchEvent(t))}const u=i},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;nfunction(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=a.useCallbackRef(e);r.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[n,t])})},function(e,t,n){"use strict";n.r(t);var r=n(0),a=n.n(r),l=n(13),o=n(57),i=n.n(o),c=n(5);n(194),document.addEventListener("contextmenu",(function(e){return e.preventDefault()})),window.prepareFirstLoad=function(e){Object(l.render)(a.a.createElement(c.UserDataProvider,null,a.a.createElement(c.AppSettingsProvider,null,a.a.createElement(i.a,e))),document.getElementById("react-page"))}},,function(e,t,n){"use strict"; /** @license React v16.9.0 * react.production.min.js * @@ -19,7 +19,7 @@ object-assign * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r=n(0),a=n(35),l=n(63);function o(e){for(var t=e.message,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;rthis.eventPool.length&&this.eventPool.push(e)}function fe(e){e.eventPool=[],e.getPooled=ue,e.release=se}a(ce.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=oe)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=oe)},persist:function(){this.isPersistent=oe},isPersistent:ie,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ie,this._dispatchInstances=this._dispatchListeners=null}}),ce.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ce.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var l=new t;return a(l,n.prototype),n.prototype=l,n.prototype.constructor=n,n.Interface=a({},r.Interface,e),n.extend=r.extend,fe(n),n},fe(ce);var de=ce.extend({data:null}),pe=ce.extend({data:null}),me=[9,13,27,32],he=G&&"CompositionEvent"in window,ve=null;G&&"documentMode"in document&&(ve=document.documentMode);var be=G&&"TextEvent"in window&&!ve,ge=G&&(!he||ve&&8=ve),ye=String.fromCharCode(32),we={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},xe=!1;function Ee(e,t){switch(e){case"keyup":return-1!==me.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Ce(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Oe=!1,_e={eventTypes:we,extractEvents:function(e,t,n,r){var a=void 0,l=void 0;if(he)e:{switch(e){case"compositionstart":a=we.compositionStart;break e;case"compositionend":a=we.compositionEnd;break e;case"compositionupdate":a=we.compositionUpdate;break e}a=void 0}else Oe?Ee(e,n)&&(a=we.compositionEnd):"keydown"===e&&229===n.keyCode&&(a=we.compositionStart);return a?(ge&&"ko"!==n.locale&&(Oe||a!==we.compositionStart?a===we.compositionEnd&&Oe&&(l=le()):(re="value"in(ne=r)?ne.value:ne.textContent,Oe=!0)),a=de.getPooled(a,t,n,r),(l||null!==(l=Ce(n)))&&(a.data=l),V(a),l=a):l=null,(e=be?function(e,t){switch(e){case"compositionend":return Ce(t);case"keypress":return 32!==t.which?null:(xe=!0,ye);case"textInput":return(e=t.data)===ye&&xe?null:e;default:return null}}(e,n):function(e,t){if(Oe)return"compositionend"===e||!he&&Ee(e,t)?(e=le(),ae=re=ne=null,Oe=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1