@spteck/react-controls-v2 2.6.6 → 2.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -168,7 +168,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
168
168
  </tr>
169
169
  </table>
170
170
  </body>
171
- </html>`}var Kp=({className:e,style:r})=>{let{editor:i,withTypographyStyles:a,variant:o,onContentChange:s,onFocus:c,onBlur:l,onCreate:u,onSelectionChange:d,fontFamily:p,bgColor:m,showTableColumnLines:h,showTableRowLines:g,onGetContentAsEmailHtml:_}=Pp(),v=Fp(o),y=t.useRef(s),b=t.useRef(c),x=t.useRef(l),C=t.useRef(u),w=t.useRef(d),T=t.useRef(_);return t.useEffect(()=>{y.current=s},[s]),t.useEffect(()=>{b.current=c},[c]),t.useEffect(()=>{x.current=l},[l]),t.useEffect(()=>{C.current=u},[u]),t.useEffect(()=>{w.current=d},[d]),t.useEffect(()=>{T.current=_},[_]),t.useEffect(()=>{if(!i)return;let e=()=>{y.current?.(i.getHTML(),i.getJSON()),T.current&&T.current(Gp(i.getHTML()))},t=({event:e})=>{b.current?.(e)},n=({event:e})=>{x.current?.(e)},r=()=>{C.current?.(),T.current&&T.current(Gp(i.getHTML()))},a=()=>{w.current?.()};return i.on(`update`,e),i.on(`focus`,t),i.on(`blur`,n),i.on(`create`,r),i.on(`selectionUpdate`,a),()=>{i.off(`update`,e),i.off(`focus`,t),i.off(`blur`,n),i.off(`create`,r),i.off(`selectionUpdate`,a)}},[i]),(0,n.jsx)(`div`,{className:(0,f.cx)(v.content,a&&v.typography,!h&&v.tableHideColumnLines,!g&&v.tableHideRowLines,e),style:{...r,...p?{fontFamily:p}:{},...m?{backgroundColor:m}:{}},children:(0,n.jsx)(S.EditorContent,{editor:i})})};Kp.displayName=`RichTextEditorContent`;var qp=({children:e,className:t,style:r})=>{let{variant:i}=Pp();return(0,n.jsx)(`div`,{className:(0,f.cx)(Fp(i).controlsGroup,t),style:r,role:`group`,children:e})};qp.displayName=`RichTextEditorControlsGroup`;var Jp=t.forwardRef((e,t)=>{let{interactive:r=!0,active:i,disabled:a,onClick:s,onMouseDown:c,children:l,className:u,style:d,...f}=e,{variant:p}=Pp(),m=Fp(p);return(0,n.jsx)(`button`,{ref:t,type:`button`,...f,className:(0,o.mergeClasses)(m.control,i&&m.controlActive,a&&m.controlDisabled,u),style:d,disabled:a,tabIndex:r?0:-1,"data-interactive":r||void 0,"data-disabled":a||void 0,"data-active":i||void 0,"aria-pressed":i&&r?!0:void 0,"aria-hidden":!r||void 0,onMouseDown:e=>{e.preventDefault(),c?.(e)},onClick:s,children:l})});Jp.displayName=`RichTextEditorControl`;var Yp=t.forwardRef(({icon:e,className:t,...r},i)=>{let{variant:a}=Pp(),o=Fp(a),s=a===`subtle`?`16px`:`20px`;return(0,n.jsx)(Jp,{ref:i,className:t,...r,children:(0,n.jsx)(`span`,{className:o.controlIcon,children:(0,n.jsx)(e,{style:{width:s,height:s}})})})});Yp.displayName=`RichTextEditorControlBase`;function K({label:e,isActive:t,operation:r,icon:i,isDisabled:a}){let o=o=>{let{editor:s,labels:c}=Pp(),l=c[e],u=typeof l==`function`?``:l;return(0,n.jsx)(Yp,{"aria-label":u,title:u,active:t?.name?s?.isActive(t.name,t.attributes):!1,icon:o.icon||i,disabled:a?.(s)||!1,...o,onClick:()=>s?.chain().focus()[r.name](r.attributes).run()})};return o.displayName=`RichTextEditorControl_${e}`,o}function q(e){return(0,n.jsx)(`svg`,{...e,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,strokeWidth:`1.5`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})}function Xp(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M7 5h6a3.5 3.5 0 0 1 0 7h-6z`}),(0,n.jsx)(`path`,{d:`M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7`})]})}function Zp(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M11 5l6 0`}),(0,n.jsx)(`path`,{d:`M7 19l6 0`}),(0,n.jsx)(`path`,{d:`M14 5l-4 14`})]})}function Qp(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M7 5v5a5 5 0 0 0 10 0v-5`}),(0,n.jsx)(`path`,{d:`M5 19h14`})]})}function $p(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M5 12l14 0`}),(0,n.jsx)(`path`,{d:`M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5`})]})}function em(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M17 15l4 4m0 -4l-4 4`}),(0,n.jsx)(`path`,{d:`M7 6v-1h11v1`}),(0,n.jsx)(`path`,{d:`M7 19l4 0`}),(0,n.jsx)(`path`,{d:`M13 5l-4 14`})]})}function tm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M19 18v-8l-2 2`}),(0,n.jsx)(`path`,{d:`M4 6v12`}),(0,n.jsx)(`path`,{d:`M12 6v12`}),(0,n.jsx)(`path`,{d:`M11 18h2`}),(0,n.jsx)(`path`,{d:`M3 18h2`}),(0,n.jsx)(`path`,{d:`M4 12h8`}),(0,n.jsx)(`path`,{d:`M3 6h2`}),(0,n.jsx)(`path`,{d:`M11 6h2`})]})}function nm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0`}),(0,n.jsx)(`path`,{d:`M4 6v12`}),(0,n.jsx)(`path`,{d:`M12 6v12`}),(0,n.jsx)(`path`,{d:`M11 18h2`}),(0,n.jsx)(`path`,{d:`M3 18h2`}),(0,n.jsx)(`path`,{d:`M4 12h8`}),(0,n.jsx)(`path`,{d:`M3 6h2`}),(0,n.jsx)(`path`,{d:`M11 6h2`})]})}function rm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M19 14a2 2 0 1 0 -2 -2`}),(0,n.jsx)(`path`,{d:`M17 16a2 2 0 1 0 2 -2`}),(0,n.jsx)(`path`,{d:`M4 6v12`}),(0,n.jsx)(`path`,{d:`M12 6v12`}),(0,n.jsx)(`path`,{d:`M11 18h2`}),(0,n.jsx)(`path`,{d:`M3 18h2`}),(0,n.jsx)(`path`,{d:`M4 12h8`}),(0,n.jsx)(`path`,{d:`M3 6h2`}),(0,n.jsx)(`path`,{d:`M11 6h2`})]})}function im(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M20 18v-8l-4 6h5`}),(0,n.jsx)(`path`,{d:`M4 6v12`}),(0,n.jsx)(`path`,{d:`M12 6v12`}),(0,n.jsx)(`path`,{d:`M11 18h2`}),(0,n.jsx)(`path`,{d:`M3 18h2`}),(0,n.jsx)(`path`,{d:`M4 12h8`}),(0,n.jsx)(`path`,{d:`M3 6h2`}),(0,n.jsx)(`path`,{d:`M11 6h2`})]})}function am(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M17 18h2a2 2 0 1 0 0 -4h-2v-4h4`}),(0,n.jsx)(`path`,{d:`M4 6v12`}),(0,n.jsx)(`path`,{d:`M12 6v12`}),(0,n.jsx)(`path`,{d:`M11 18h2`}),(0,n.jsx)(`path`,{d:`M3 18h2`}),(0,n.jsx)(`path`,{d:`M4 12h8`}),(0,n.jsx)(`path`,{d:`M3 6h2`}),(0,n.jsx)(`path`,{d:`M11 6h2`})]})}function om(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z`}),(0,n.jsx)(`path`,{d:`M21 12a2 2 0 1 0 -4 0v4`}),(0,n.jsx)(`path`,{d:`M4 6v12`}),(0,n.jsx)(`path`,{d:`M12 6v12`}),(0,n.jsx)(`path`,{d:`M11 18h2`}),(0,n.jsx)(`path`,{d:`M3 18h2`}),(0,n.jsx)(`path`,{d:`M4 12h8`}),(0,n.jsx)(`path`,{d:`M3 6h2`}),(0,n.jsx)(`path`,{d:`M11 6h2`})]})}function sm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M9 6l11 0`}),(0,n.jsx)(`path`,{d:`M9 12l11 0`}),(0,n.jsx)(`path`,{d:`M9 18l11 0`}),(0,n.jsx)(`path`,{d:`M5 6l0 .01`}),(0,n.jsx)(`path`,{d:`M5 12l0 .01`}),(0,n.jsx)(`path`,{d:`M5 18l0 .01`})]})}function cm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M11 6h9`}),(0,n.jsx)(`path`,{d:`M11 12h9`}),(0,n.jsx)(`path`,{d:`M12 18h8`}),(0,n.jsx)(`path`,{d:`M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4`}),(0,n.jsx)(`path`,{d:`M6 10v-6l-2 2`})]})}function lm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M17 22v-2`}),(0,n.jsx)(`path`,{d:`M9 15l6 -6`}),(0,n.jsx)(`path`,{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`}),(0,n.jsx)(`path`,{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`}),(0,n.jsx)(`path`,{d:`M20 17h2`}),(0,n.jsx)(`path`,{d:`M2 7h2`}),(0,n.jsx)(`path`,{d:`M7 2v2`})]})}function um(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M6 15h15`}),(0,n.jsx)(`path`,{d:`M21 19h-15`}),(0,n.jsx)(`path`,{d:`M15 11h6`}),(0,n.jsx)(`path`,{d:`M21 7h-6`}),(0,n.jsx)(`path`,{d:`M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2`}),(0,n.jsx)(`path`,{d:`M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2`})]})}function dm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 6l16 0`}),(0,n.jsx)(`path`,{d:`M4 12l10 0`}),(0,n.jsx)(`path`,{d:`M4 18l14 0`})]})}function fm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 6l16 0`}),(0,n.jsx)(`path`,{d:`M10 12l10 0`}),(0,n.jsx)(`path`,{d:`M6 18l14 0`})]})}function pm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 6l16 0`}),(0,n.jsx)(`path`,{d:`M8 12l8 0`}),(0,n.jsx)(`path`,{d:`M6 18l12 0`})]})}function mm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 6l16 0`}),(0,n.jsx)(`path`,{d:`M4 12l16 0`}),(0,n.jsx)(`path`,{d:`M4 18l12 0`})]})}function hm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M5 7l8 10m-8 0l8 -10`}),(0,n.jsx)(`path`,{d:`M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2`})]})}function gm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M5 7l8 10m-8 0l8 -10`}),(0,n.jsx)(`path`,{d:`M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2`})]})}function _m(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M7 8l-4 4l4 4`}),(0,n.jsx)(`path`,{d:`M17 8l4 4l-4 4`}),(0,n.jsx)(`path`,{d:`M14 4l-4 16`})]})}function vm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4`}),(0,n.jsx)(`path`,{d:`M12.5 5.5l4 4`}),(0,n.jsx)(`path`,{d:`M4.5 13.5l4 4`}),(0,n.jsx)(`path`,{d:`M21 15v4h-8l4 -4z`})]})}function ym(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M5 12h2`}),(0,n.jsx)(`path`,{d:`M17 12h2`}),(0,n.jsx)(`path`,{d:`M11 12h2`})]})}function bm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73`}),(0,n.jsx)(`path`,{d:`M3 3l18 18`})]})}function xm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M11 7l6 6`}),(0,n.jsx)(`path`,{d:`M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z`})]})}function Sm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M18 6l-12 12`}),(0,n.jsx)(`path`,{d:`M6 6l12 12`})]})}function Cm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25`}),(0,n.jsx)(`path`,{d:`M8.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}),(0,n.jsx)(`path`,{d:`M12.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}),(0,n.jsx)(`path`,{d:`M16.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`})]})}function wm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M5 12l5 5l10 -10`})]})}function Tm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M9 15l6 -6`}),(0,n.jsx)(`path`,{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`}),(0,n.jsx)(`path`,{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`})]})}function Em(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6`}),(0,n.jsx)(`path`,{d:`M11 13l9 -9`}),(0,n.jsx)(`path`,{d:`M15 4h5v5`})]})}function Dm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M9 14l-4 -4l4 -4`}),(0,n.jsx)(`path`,{d:`M5 10h11a4 4 0 1 1 0 8h-1`})]})}function Om(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M15 14l4 -4l-4 -4`}),(0,n.jsx)(`path`,{d:`M19 10h-11a4 4 0 1 0 0 8h1`})]})}function km(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M3.5 5.5l1.5 1.5l2.5 -2.5`}),(0,n.jsx)(`path`,{d:`M3.5 11.5l1.5 1.5l2.5 -2.5`}),(0,n.jsx)(`path`,{d:`M3.5 17.5l1.5 1.5l2.5 -2.5`}),(0,n.jsx)(`path`,{d:`M11 6l9 0`}),(0,n.jsx)(`path`,{d:`M11 12l9 0`}),(0,n.jsx)(`path`,{d:`M11 18l9 0`})]})}function Am(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M20 6l-11 0`}),(0,n.jsx)(`path`,{d:`M20 12l-7 0`}),(0,n.jsx)(`path`,{d:`M20 18l-11 0`}),(0,n.jsx)(`path`,{d:`M4 8l4 4l-4 4`})]})}function jm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M20 6l-7 0`}),(0,n.jsx)(`path`,{d:`M20 12l-9 0`}),(0,n.jsx)(`path`,{d:`M20 18l-7 0`}),(0,n.jsx)(`path`,{d:`M8 8l-4 4l4 4`})]})}function Mm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`circle`,{cx:`9`,cy:`5`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,n.jsx)(`circle`,{cx:`9`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,n.jsx)(`circle`,{cx:`9`,cy:`19`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,n.jsx)(`circle`,{cx:`15`,cy:`5`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,n.jsx)(`circle`,{cx:`15`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,n.jsx)(`circle`,{cx:`15`,cy:`19`,r:`1`,fill:`currentColor`,stroke:`none`})]})}function Nm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z`}),(0,n.jsx)(`path`,{d:`M3 10h18`}),(0,n.jsx)(`path`,{d:`M10 3v18`})]})}function Pm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M3 3l18 18`}),(0,n.jsx)(`path`,{d:`M9 3h10a2 2 0 0 1 2 2v10`}),(0,n.jsx)(`path`,{d:`M3 9v10a2 2 0 0 0 2 2h10`}),(0,n.jsx)(`path`,{d:`M3 10h6`}),(0,n.jsx)(`path`,{d:`M10 3v6`})]})}function Fm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M14 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1z`}),(0,n.jsx)(`path`,{d:`M5 12l4 0`}),(0,n.jsx)(`path`,{d:`M7 10l0 4`})]})}function Im(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1z`}),(0,n.jsx)(`path`,{d:`M15 12l4 0`}),(0,n.jsx)(`path`,{d:`M17 10l0 4`})]})}function Lm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M7 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1z`}),(0,n.jsx)(`path`,{d:`M14 10l4 4`}),(0,n.jsx)(`path`,{d:`M14 14l4 -4`})]})}function Rm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 18v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1z`}),(0,n.jsx)(`path`,{d:`M12 5l0 4`}),(0,n.jsx)(`path`,{d:`M10 7l4 0`})]})}function zm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 6v4a1 1 0 0 0 1 1h14a1 1 0 0 0 1 -1v-4a1 1 0 0 0 -1 -1h-14a1 1 0 0 0 -1 1z`}),(0,n.jsx)(`path`,{d:`M12 19l0 -4`}),(0,n.jsx)(`path`,{d:`M10 17l4 0`})]})}function Bm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 7v4a1 1 0 0 0 1 1h14a1 1 0 0 0 1 -1v-4a1 1 0 0 0 -1 -1h-14a1 1 0 0 0 -1 1z`}),(0,n.jsx)(`path`,{d:`M14 16l4 4`}),(0,n.jsx)(`path`,{d:`M14 20l4 -4`})]})}function Vm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z`}),(0,n.jsx)(`path`,{d:`M10 3v18`}),(0,n.jsx)(`path`,{d:`M3 9h7`}),(0,n.jsx)(`path`,{d:`M3 15h7`})]})}function Hm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z`}),(0,n.jsx)(`path`,{d:`M9 3v18`}),(0,n.jsx)(`path`,{d:`M15 3v18`})]})}function Um(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z`}),(0,n.jsx)(`path`,{d:`M3 9h18`}),(0,n.jsx)(`path`,{d:`M3 15h18`})]})}function Wm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M19 3v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V7.914a1 1 0 0 1 .293-.707l3.914-3.914A1 1 0 0 1 9.914 3H18a1 1 0 0 1 1 1Z`}),(0,n.jsx)(`path`,{d:`M10 11l-2 2 2 2`}),(0,n.jsx)(`path`,{d:`M14 11l2 2-2 2`})]})}function Gm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 20l3 0`}),(0,n.jsx)(`path`,{d:`M14 20l7 0`}),(0,n.jsx)(`path`,{d:`M6.9 15l6.9 0`}),(0,n.jsx)(`path`,{d:`M10.2 6.3l5.8 13.7`}),(0,n.jsx)(`path`,{d:`M5 20l6 -16l2 0l7 16`})]})}function Km(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M15 8h.01`}),(0,n.jsx)(`path`,{d:`M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z`}),(0,n.jsx)(`path`,{d:`M3 16l5 -5c.928 -.893 2.072 -.893 3 0l4 4`}),(0,n.jsx)(`path`,{d:`M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3`})]})}function qm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M19 11v-7l-7 7v4h4l3 3l3 -3z`}),(0,n.jsx)(`path`,{d:`M5 17a2 2 0 1 0 4 0c0 -1.598 -2 -3.5 -2 -3.5s-2 1.902 -2 3.5z`}),(0,n.jsx)(`path`,{d:`M10 11l-6.5 -6.5`})]})}function Jm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}),(0,n.jsx)(`path`,{d:`M9 10l.01 0`}),(0,n.jsx)(`path`,{d:`M15 10l.01 0`}),(0,n.jsx)(`path`,{d:`M9.5 15a3.5 3.5 0 0 0 5 0`})]})}var Ym=({disableTooltips:e=!1,initialExternal:r=!1,className:i,style:a,...s})=>{let{editor:c,labels:l,variant:u}=Pp(),d=Fp(u),[p,m]=t.useState(``),[h,g]=t.useState(r),[_,v]=t.useState(!1),y=t.useCallback(()=>{v(!0);let e=c?.getAttributes(`link`);m(e?.href||``),g(typeof e?.target==`string`?e.target===`_blank`:r)},[c,r]),b=t.useCallback(()=>{v(!1),m(``),g(r)},[r]),x=t.useCallback(()=>{b(),(c?.chain().focus().extendMarkRange(`link`)).setLink({href:p,target:h?`_blank`:null}).run()},[c,p,h,b]),S=t.useCallback(e=>{e.key===`Enter`&&(e.preventDefault(),x())},[x]);return t.useEffect(()=>{let e=()=>y();return window.addEventListener(`edit-link`,e),()=>window.removeEventListener(`edit-link`,e)},[y]),(0,n.jsxs)(o.Popover,{open:_,onOpenChange:(e,t)=>{t.open||b()},positioning:`below`,trapFocus:!0,children:[(0,n.jsx)(o.PopoverTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(Yp,{icon:e=>(0,n.jsx)(Tm,{...e}),"aria-label":l.linkControlLabel,title:l.linkControlLabel,active:c?.isActive(`link`),onClick:y,className:i,style:a,...s})}),(0,n.jsx)(o.PopoverSurface,{className:d.linkEditorDropdown,children:(0,n.jsxs)(`div`,{className:d.linkEditor,children:[(0,n.jsx)(o.Input,{placeholder:l.linkEditorInputPlaceholder,"aria-label":l.linkEditorInputLabel,type:`url`,value:p,onChange:(e,t)=>m(t.value),onKeyDown:S,className:d.linkEditorInput,size:`small`}),e?(0,n.jsx)(o.Button,{appearance:`subtle`,size:`small`,className:(0,f.cx)(d.linkEditorExternalControl,h&&d.linkEditorExternalControlActive),onClick:()=>g(e=>!e),"aria-label":h?l.linkEditorExternalLink:l.linkEditorInternalLink,icon:(0,n.jsx)(Em,{style:{width:14,height:14}})}):(0,n.jsx)(o.Tooltip,{content:h?l.linkEditorExternalLink:l.linkEditorInternalLink,relationship:`label`,children:(0,n.jsx)(o.Button,{appearance:`subtle`,size:`small`,className:(0,f.cx)(d.linkEditorExternalControl,h&&d.linkEditorExternalControlActive),onClick:()=>g(e=>!e),icon:(0,n.jsx)(Em,{style:{width:14,height:14}})})}),(0,n.jsx)(o.Button,{size:`small`,appearance:`primary`,className:d.linkEditorSave,onClick:x,children:l.linkEditorSave})]})})]})};Ym.displayName=`RichTextEditorLinkControl`;var Xm=({color:e,className:t,style:r})=>{let{editor:i,labels:a,variant:o}=Pp(),s=Fp(o),c=typeof a.colorControlLabel==`function`?a.colorControlLabel(e):`${a.colorControlLabel} ${e}`;return(0,n.jsx)(`button`,{type:`button`,className:(0,f.cx)(s.control,t),style:r,"aria-label":c,title:c,onClick:()=>(i?.chain().focus()).setColor(e).run(),children:(0,n.jsx)(`span`,{className:s.colorSwatch,style:{backgroundColor:e}})})};Xm.displayName=`RichTextEditorColorControl`;var Zm=({colors:e,className:r,style:i})=>{let{editor:a,labels:s,variant:c}=Pp(),l=Fp(c),[u,d]=t.useState(!1),[f,p]=t.useState(`palette`),[m,h]=t.useState(``),g=t.useRef(null),_=t.useCallback(()=>{d(!1)},[]),v=t.useCallback(()=>{(a?.chain().focus()).setColor(m).run(),_()},[a,m,_]),y=t.useCallback(()=>{(a?.chain().focus()).unsetColor().run(),_()},[a,_]),b=t.useCallback(e=>{(a?.chain().focus()).setColor(e).run(),_()},[a,_]);return(0,n.jsxs)(o.Popover,{open:u,onOpenChange:(e,t)=>{t.open?(d(!0),p(`palette`),h(``)):_()},positioning:`below`,trapFocus:!0,children:[(0,n.jsx)(o.PopoverTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(Yp,{icon:e=>(0,n.jsx)(xm,{...e}),"aria-label":s.colorPickerControlLabel,title:s.colorPickerControlLabel,className:r,style:i})}),(0,n.jsxs)(o.PopoverSurface,{className:l.linkEditorDropdown,children:[(0,n.jsx)(`span`,{tabIndex:0,"aria-hidden":`true`,style:{width:0,height:0,overflow:`hidden`,display:`block`,position:`absolute`}}),f===`palette`?(0,n.jsx)(`div`,{className:l.colorSwatchGrid,children:e.map(e=>{let t=typeof s.colorPickerColorLabel==`function`?s.colorPickerColorLabel(e):`${s.colorPickerColorLabel} ${e}`;return(0,n.jsx)(`button`,{type:`button`,className:l.colorSwatch,style:{backgroundColor:e},"aria-label":t,title:t,onClick:()=>b(e)},e)})}):(0,n.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:8},children:(0,n.jsx)(`input`,{ref:g,type:`color`,value:m||`#000000`,onChange:e=>h(e.target.value),style:{width:200,height:40,border:`none`,cursor:`pointer`},"aria-label":s.colorPickerColorPicker})}),(0,n.jsxs)(`div`,{className:l.colorPickerActions,children:[(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:(0,n.jsx)(Sm,{style:{width:14,height:14}}),onClick:_,title:s.colorPickerCancel,"aria-label":s.colorPickerCancel}),(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:(0,n.jsx)(bm,{style:{width:14,height:14}}),onClick:y,title:s.colorPickerClear,"aria-label":s.colorPickerClear}),(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:f===`palette`?(0,n.jsx)(xm,{style:{width:14,height:14}}):(0,n.jsx)(Cm,{style:{width:14,height:14}}),onClick:()=>p(e=>e===`palette`?`colorPicker`:`palette`),title:f===`palette`?s.colorPickerColorPicker:s.colorPickerPalette,"aria-label":f===`palette`?s.colorPickerColorPicker:s.colorPickerPalette}),f===`colorPicker`&&(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:(0,n.jsx)(wm,{style:{width:14,height:14}}),onClick:v,title:s.colorPickerSave,"aria-label":s.colorPickerSave})]})]})]})};Zm.displayName=`RichTextEditorColorPickerControl`;var Qm=({className:e,style:r})=>{let{labels:i,editor:a}=Pp(),o=t.useCallback(()=>{if(!a)return;let e=a.getHTML(),t=a.storage;t?.sourceCode?.active?(a.commands.setContent(a.getText()),t.sourceCode={active:!1}):(a.commands.setContent(`<pre><code>${e}</code></pre>`),t.sourceCode={active:!0})},[a]);return(0,n.jsx)(Yp,{icon:e=>(0,n.jsx)(Wm,{...e}),"aria-label":i.sourceCodeControlLabel,title:i.sourceCodeControlLabel,onClick:o,className:e,style:r})};Qm.displayName=`RichTextEditorSourceCodeControl`;var $m=[`Arial`,`Verdana`,`Tahoma`,`Trebuchet MS`,`Georgia`,`Times New Roman`,`Courier New`,`Segoe UI`],eh=({fontFamilies:e,className:r,style:i})=>{let{editor:a,labels:s,variant:c,fontFamilies:l}=Pp(),u=Fp(c),[d,p]=t.useState(!1),m=e??l??$m,h=t.useMemo(()=>{let e=new Set;return m.filter(t=>{let n=t.toLowerCase();return e.has(n)?!1:(e.add(n),!0)})},[m]),g=a?.getAttributes(`textStyle`)?.fontFamily,_=t.useCallback(e=>{(a?.chain().focus()).setFontFamily(e).run(),p(!1)},[a]),v=t.useCallback(()=>{(a?.chain().focus()).unsetFontFamily().run(),p(!1)},[a]);return(0,n.jsxs)(o.Popover,{open:d,onOpenChange:(e,t)=>p(t.open),positioning:`below`,trapFocus:!0,children:[(0,n.jsx)(o.PopoverTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(Yp,{icon:e=>(0,n.jsx)(Gm,{...e}),"aria-label":s.fontFamilyControlLabel,title:s.fontFamilyControlLabel,className:r,style:i})}),(0,n.jsx)(o.PopoverSurface,{className:u.linkEditorDropdown,children:(0,n.jsxs)(`div`,{className:u.fontFamilyList,role:`menu`,"aria-label":s.fontFamilyControlLabel,children:[(0,n.jsx)(`button`,{type:`button`,role:`menuitem`,className:(0,f.cx)(u.fontFamilyItem,!g&&u.fontFamilyItemActive),onClick:v,children:`Default`}),h.map(e=>{let t=e.split(`,`)[0].replace(/['"]/g,``).trim(),r=g===e;return(0,n.jsx)(`button`,{type:`button`,role:`menuitem`,className:(0,f.cx)(u.fontFamilyItem,r&&u.fontFamilyItemActive),style:{fontFamily:e},onClick:()=>_(e),children:t},e)})]})})]})};eh.displayName=`RichTextEditorFontFamilyControl`;var th=e=>{let{editor:r,labels:i,onImageUpload:a}=Pp(),o=t.useRef(null),s=t.useCallback(e=>{(r?.commands).setImage({src:e})},[r]),c=t.useCallback(()=>{o.current?.click()},[]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`input`,{ref:o,type:`file`,accept:`image/*`,style:{display:`none`},onChange:t.useCallback(e=>{let t=e.target.files?.[0];if(t){if(a)a(t,s);else{let e=new FileReader;e.onload=()=>{typeof e.result==`string`&&s(e.result)},e.readAsDataURL(t)}e.target.value=``}},[a,s]),"aria-hidden":`true`,tabIndex:-1}),(0,n.jsx)(Yp,{...e,icon:Km,"aria-label":e[`aria-label`]??i.imageUploadControlLabel,title:e.title??i.imageUploadControlLabel,onClick:c})]})};th.displayName=`RichTextEditorImageUploadControl`;var nh=({className:e,style:r})=>{let{labels:i,variant:a,bgColor:s,setBgColor:c,bgColorPickerColors:l}=Pp(),u=Fp(a),[d,f]=t.useState(!1),[p,m]=t.useState(`palette`),[h,g]=t.useState(``),_=t.useCallback(()=>{f(!1)},[]),v=t.useCallback(()=>{c(h),_()},[c,h,_]),y=t.useCallback(()=>{c(``),_()},[c,_]),b=t.useCallback(e=>{c(e),_()},[c,_]);return(0,n.jsxs)(o.Popover,{open:d,onOpenChange:(e,t)=>{t.open?(f(!0),m(`palette`),g(s||``)):_()},positioning:`below`,trapFocus:!0,children:[(0,n.jsx)(o.PopoverTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(Yp,{icon:t.useMemo(()=>e=>(0,n.jsxs)(`span`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:2},children:[(0,n.jsx)(qm,{...e}),(0,n.jsx)(`span`,{style:{display:`block`,width:14,height:3,backgroundColor:s||`transparent`,borderRadius:1,border:`1px solid rgba(0,0,0,0.25)`}})]}),[s]),"aria-label":i.bgColorPickerControlLabel,title:i.bgColorPickerControlLabel,className:e,style:r})}),(0,n.jsxs)(o.PopoverSurface,{className:u.linkEditorDropdown,children:[(0,n.jsx)(`span`,{tabIndex:0,"aria-hidden":`true`,style:{width:0,height:0,overflow:`hidden`,display:`block`,position:`absolute`}}),p===`palette`?(0,n.jsx)(`div`,{className:u.colorSwatchGrid,children:l.map(e=>{let t=typeof i.bgColorPickerColorLabel==`function`?i.bgColorPickerColorLabel(e):`${i.bgColorPickerColorLabel} ${e}`;return(0,n.jsx)(`button`,{type:`button`,className:u.colorSwatch,style:{backgroundColor:e},"aria-label":t,title:t,onClick:()=>b(e)},e)})}):(0,n.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:8},children:(0,n.jsx)(`input`,{type:`color`,value:h||`#ffffff`,onChange:e=>g(e.target.value),style:{width:200,height:40,border:`none`,cursor:`pointer`},"aria-label":i.colorPickerColorPicker})}),(0,n.jsxs)(`div`,{className:u.colorPickerActions,children:[(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:(0,n.jsx)(Sm,{style:{width:14,height:14}}),onClick:_,title:i.colorPickerCancel,"aria-label":i.colorPickerCancel}),(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:(0,n.jsx)(bm,{style:{width:14,height:14}}),onClick:y,title:i.colorPickerClear,"aria-label":i.colorPickerClear}),(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:p===`palette`?(0,n.jsx)(xm,{style:{width:14,height:14}}):(0,n.jsx)(Cm,{style:{width:14,height:14}}),onClick:()=>m(e=>e===`palette`?`colorPicker`:`palette`),title:p===`palette`?i.colorPickerColorPicker:i.colorPickerPalette,"aria-label":p===`palette`?i.colorPickerColorPicker:i.colorPickerPalette}),p===`colorPicker`&&(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:(0,n.jsx)(wm,{style:{width:14,height:14}}),onClick:v,title:i.colorPickerSave,"aria-label":i.colorPickerSave})]})]})]})};nh.displayName=`RichTextEditorBgColorPickerControl`;var rh=({nested:e=!1,onNodeChange:t,className:r,style:i})=>{let{editor:a,variant:o}=Pp(),s=Fp(o),c=o===`subtle`?`14px`:`16px`;return a?(0,n.jsx)(R.DragHandle,{editor:a,nested:e,onNodeChange:t,children:(0,n.jsx)(`div`,{className:(0,f.cx)(s.dragHandle,r),style:i,children:(0,n.jsx)(Mm,{style:{width:c,height:c}})})}):null};rh.displayName=`RichTextEditorDragHandle`;var ih=[`Default`,`Light`,`MediumLight`,`Medium`,`MediumDark`,`Dark`],ah={Default:`#FFCD41`,Light:`#FDDBB4`,MediumLight:`#E8B98C`,Medium:`#C68642`,MediumDark:`#8D5524`,Dark:`#4A2912`},oh=[{group:`Smileys & Emotion`,label:`😀`},{group:`People & Body`,label:`👋`},{group:`Animals & Nature`,label:`🐶`},{group:`Food & Drink`,label:`🍎`},{group:`Activities`,label:`⚽`},{group:`Travel & Places`,label:`🚗`},{group:`Objects`,label:`💡`},{group:`Symbols`,label:`❤️`},{group:`Flags`,label:`🏁`}],sh=oh.map(e=>e.group);function ch(e){return e.split(` `).map(e=>String.fromCodePoint(parseInt(e,16))).join(``)}var lh=Object.values(nu).sort((e,t)=>e.sortOrder-t.sortOrder),uh=new Map;for(let e of lh){let t=[e.cldr,e.tts,...e.keywords??[]].filter(Boolean).join(` `).toLowerCase();if(t&&(uh.set(e.glyph,t),e.unicodeSkintones?.length))for(let n of e.unicodeSkintones)uh.set(ch(n),t)}function dh(e=`Default`){let t=ih.indexOf(e),n={};for(let e of lh){let{group:r}=e;if(oh.some(e=>e.group===r))if(n[r]||(n[r]=[]),e.isSkintoneBased&&e.unicodeSkintones){let i=e.unicodeSkintones[t]??e.unicodeSkintones[0];n[r].push(ch(i))}else n[r].push(e.glyph)}return oh.filter(({group:e})=>n[e]).map(({group:e,label:t})=>({label:t,emojis:n[e]}))}function fh(e,t){let n=t.trim().toLowerCase();if(!n)return!0;let r=uh.get(e);return r?r.includes(n):e.includes(t.trim())}dh();var ph=({popoverWidth:e,maxGridHeight:n})=>t.useMemo(()=>({popover:(0,f.css)({padding:0,width:e,overflow:`hidden`,borderRadius:o.tokens.borderRadiusMedium}),header:(0,f.css)({display:`flex`,flexWrap:`wrap`,gap:`2px`,padding:`${o.tokens.spacingVerticalS} ${o.tokens.spacingHorizontalS}`,borderBottom:`1px solid ${o.tokens.colorNeutralStroke2}`}),searchWrapper:(0,f.css)({padding:`${o.tokens.spacingVerticalS} ${o.tokens.spacingHorizontalS}`,"& > *":{width:`100% !important`}}),grid:(0,f.css)({display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(32px, 1fr))`,gap:`2px`,padding:`${o.tokens.spacingVerticalXS} ${o.tokens.spacingHorizontalS}`,maxHeight:n,overflowY:`auto`,scrollbarWidth:`thin`,scrollbarColor:`${o.tokens.colorBrandBackground} transparent`,"&::-webkit-scrollbar":{width:3},"&::-webkit-scrollbar-track":{background:`transparent`},"&::-webkit-scrollbar-thumb":{background:o.tokens.colorBrandBackground,borderRadius:o.tokens.borderRadiusCircular},"&::-webkit-scrollbar-thumb:hover":{background:o.tokens.colorBrandBackgroundHover}}),empty:(0,f.css)({width:`100%`,textAlign:`center`,padding:`${o.tokens.spacingVerticalM} 0`,fontSize:o.tokens.fontSizeBase200,color:o.tokens.colorNeutralForeground3,columnSpan:`all`}),skinToneRow:(0,f.css)({display:`flex`,alignItems:`center`,gap:`6px`,padding:`${o.tokens.spacingVerticalXS} ${o.tokens.spacingHorizontalS} ${o.tokens.spacingVerticalS}`,borderTop:`1px solid ${o.tokens.colorNeutralStroke2}`}),skinToneButton:(0,f.css)({transition:`transform 0.1s, outline-color 0.1s`,cursor:`pointer`,"&:hover":{transform:`scale(1.15)`},"&:focus-visible":{outline:`2px solid ${o.tokens.colorBrandForeground1}`,outlineOffset:2}}),skinToneButtonSelected:(0,f.css)({borderBottom:`2px solid ${o.tokens.colorBrandForeground1}`}),skinToneButtonUnselected:(0,f.css)({borderBottom:`2px solid transparent`})}),[e,n]),mh={Default:`Default`,Light:`Light`,MediumLight:`Medium-Light`,Medium:`Medium`,MediumDark:`Medium-Dark`,Dark:`Dark`},hh=(0,f.css)({background:`none`,border:`none`,padding:2,margin:0,borderRadius:o.tokens.borderRadiusCircular,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`transform 0.12s`,"&:hover":{transform:`scale(1.2)`},"&:focus-visible":{outline:`2px solid ${o.tokens.colorBrandForeground1}`,outlineOffset:2}}),gh=(0,f.css)({borderBottom:`2px solid transparent`}),_h=(0,f.css)({borderBottom:`2px solid ${o.tokens.colorBrandForeground1}`}),vh=t.memo(function({value:e,onChange:t}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Divider,{style:{marginTop:15,marginBottom:5}}),(0,n.jsx)(Cd,{fontSize:`small`,fontWeight:`semibold`,children:`Skin Tone`}),(0,n.jsx)(H,{direction:`horizontal`,gap:`m`,padding:`m`,justifyContent:`center`,children:ih.map(r=>(0,n.jsx)(o.Tooltip,{content:mh[r],relationship:`label`,children:(0,n.jsx)(`div`,{role:`radio`,"aria-checked":e===r,tabIndex:0,className:e===r?_h:gh,children:(0,n.jsx)(o.Badge,{shape:`circular`,size:`large`,role:`radio`,"aria-checked":e===r,tabIndex:0,className:`${hh} `,style:{backgroundColor:ah[r],color:ah[r],outlineColor:e===r?o.tokens.colorBrandForeground1:`transparent`},onClick:()=>t(r)})})},r))})]})});vh.displayName=`SkinToneSelector`;var yh=300,bh=200,xh=50,Sh=t.memo(function({onEmojiSelect:e,trigger:r,open:i,onOpenChange:a,positioning:s=`below-start`,popoverWidth:c=yh,maxGridHeight:l=bh,searchPlaceholder:u=`Search emoji…`,defaultSkinTone:d=`Default`,onSkinToneChange:f,className:p,style:m}){let[h,g]=t.useState(!1),[_,v]=t.useState(0),[y,b]=t.useState(``),[x,S]=t.useState(d),C=t.useRef(null),w=i!==void 0,T=i??h,E=t.useMemo(()=>dh(x),[x]),D=t.useMemo(()=>{let e=y.trim();return e?E.flatMap(e=>e.emojis).filter(t=>fh(t,e)):E[_]?.emojis??[]},[_,y,E]),O=ph({popoverWidth:c,maxGridHeight:l}),k=t.useCallback(e=>{w||g(e),a?.(e),e&&(b(``),v(0),setTimeout(()=>{C.current?.querySelector(`input`)?.focus()},xh))},[w,a]),A=t.useCallback(t=>{e(t),k(!1)},[e,k]),j=t.useCallback(e=>{v(e),b(``)},[]),M=t.useCallback(e=>{S(e),f?.(e)},[f]),N=p?`${O.popover} ${p}`:O.popover;return(0,n.jsxs)(o.Popover,{open:T,onOpenChange:(e,t)=>k(t.open),positioning:s,trapFocus:!0,children:[(0,n.jsx)(o.PopoverTrigger,{disableButtonEnhancement:!0,children:r}),(0,n.jsxs)(o.PopoverSurface,{className:N,style:m,children:[(0,n.jsx)(H,{direction:`horizontal`,gap:`2px`,padding:`${o.tokens.spacingVerticalM} ${o.tokens.spacingHorizontalM}`,"aria-label":`Emoji categories`,justifyContent:`center`,wrap:!0,style:{backgroundColor:o.tokens.colorNeutralBackground3},children:E.map((e,t)=>(0,n.jsx)(o.ToggleButton,{appearance:`subtle`,size:`small`,checked:!y&&_===t,role:`tab`,"aria-selected":!y&&_===t,"aria-label":sh[t],title:sh[t],style:{fontSize:`16px`,minWidth:0,padding:`3px 5px`},onClick:()=>j(t),children:e.label},t))}),(0,n.jsx)(`div`,{ref:C,className:O.searchWrapper,children:(0,n.jsx)($f,{value:y,onChange:e=>b(e),placeholder:u,size:`small`,width:`100%`})}),(0,n.jsx)(`div`,{className:O.grid,role:`listbox`,"aria-label":`Emoji list`,children:D.length>0?D.map((e,t)=>(0,n.jsx)(o.Button,{appearance:`subtle`,size:`small`,role:`option`,"aria-selected":!1,"aria-label":e,title:e,style:{fontSize:`20px`,minWidth:0,width:34,height:34,padding:0},onClick:()=>A(e),children:e},`${e}-${t}`)):(0,n.jsx)(`div`,{className:O.empty,children:`No results`})}),(0,n.jsx)(vh,{value:x,onChange:M})]})]})});Sh.displayName=`EmojiPicker`;var Ch=t.memo(function(e){let{editor:r,labels:i}=Pp(),a=t.useCallback(e=>{r?.commands.insertContent(e)},[r]);return(0,n.jsx)(Sh,{trigger:(0,n.jsx)(Yp,{...e,icon:Jm,"aria-label":e[`aria-label`]??i.emojiPickerControlLabel,title:e.title??i.emojiPickerControlLabel}),onEmojiSelect:a})});Ch.displayName=`RichTextEditorEmojiPickerControl`;var wh=({children:e})=>{let{editor:t}=Pp();return(0,S.useEditorState)({editor:t,selector:e=>e.editor?.isActive(`table`)??!1})?(0,n.jsx)(n.Fragment,{children:e}):null};wh.displayName=`RichTextEditorTableControls`;var Th=K({label:`boldControlLabel`,icon:e=>(0,n.jsx)(Xp,{...e}),isActive:{name:`bold`},operation:{name:`toggleBold`}}),Eh=K({label:`italicControlLabel`,icon:e=>(0,n.jsx)(Zp,{...e}),isActive:{name:`italic`},operation:{name:`toggleItalic`}}),Dh=K({label:`underlineControlLabel`,icon:e=>(0,n.jsx)(Qp,{...e}),isActive:{name:`underline`},operation:{name:`toggleUnderline`}}),Oh=K({label:`strikeControlLabel`,icon:e=>(0,n.jsx)($p,{...e}),isActive:{name:`strike`},operation:{name:`toggleStrike`}}),kh=K({label:`clearFormattingControlLabel`,icon:e=>(0,n.jsx)(em,{...e}),operation:{name:`unsetAllMarks`}}),Ah=K({label:`unlinkControlLabel`,icon:e=>(0,n.jsx)(lm,{...e}),operation:{name:`unsetLink`}}),jh=K({label:`bulletListControlLabel`,icon:e=>(0,n.jsx)(sm,{...e}),isActive:{name:`bulletList`},operation:{name:`toggleBulletList`}}),Mh=K({label:`orderedListControlLabel`,icon:e=>(0,n.jsx)(cm,{...e}),isActive:{name:`orderedList`},operation:{name:`toggleOrderedList`}}),Nh=K({label:`h1ControlLabel`,icon:e=>(0,n.jsx)(tm,{...e}),isActive:{name:`heading`,attributes:{level:1}},operation:{name:`toggleHeading`,attributes:{level:1}}}),Ph=K({label:`h2ControlLabel`,icon:e=>(0,n.jsx)(nm,{...e}),isActive:{name:`heading`,attributes:{level:2}},operation:{name:`toggleHeading`,attributes:{level:2}}}),Fh=K({label:`h3ControlLabel`,icon:e=>(0,n.jsx)(rm,{...e}),isActive:{name:`heading`,attributes:{level:3}},operation:{name:`toggleHeading`,attributes:{level:3}}}),Ih=K({label:`h4ControlLabel`,icon:e=>(0,n.jsx)(im,{...e}),isActive:{name:`heading`,attributes:{level:4}},operation:{name:`toggleHeading`,attributes:{level:4}}}),Lh=K({label:`h5ControlLabel`,icon:e=>(0,n.jsx)(am,{...e}),isActive:{name:`heading`,attributes:{level:5}},operation:{name:`toggleHeading`,attributes:{level:5}}}),Rh=K({label:`h6ControlLabel`,icon:e=>(0,n.jsx)(om,{...e}),isActive:{name:`heading`,attributes:{level:6}},operation:{name:`toggleHeading`,attributes:{level:6}}}),zh=K({label:`blockquoteControlLabel`,icon:e=>(0,n.jsx)(um,{...e}),isActive:{name:`blockquote`},operation:{name:`toggleBlockquote`}}),Bh=K({label:`alignLeftControlLabel`,icon:e=>(0,n.jsx)(dm,{...e}),operation:{name:`setTextAlign`,attributes:`left`}}),Vh=K({label:`alignRightControlLabel`,icon:e=>(0,n.jsx)(fm,{...e}),operation:{name:`setTextAlign`,attributes:`right`}}),Hh=K({label:`alignCenterControlLabel`,icon:e=>(0,n.jsx)(pm,{...e}),operation:{name:`setTextAlign`,attributes:`center`}}),Uh=K({label:`alignJustifyControlLabel`,icon:e=>(0,n.jsx)(mm,{...e}),operation:{name:`setTextAlign`,attributes:`justify`}}),Wh=K({label:`subscriptControlLabel`,icon:e=>(0,n.jsx)(hm,{...e}),isActive:{name:`subscript`},operation:{name:`toggleSubscript`}}),Gh=K({label:`superscriptControlLabel`,icon:e=>(0,n.jsx)(gm,{...e}),isActive:{name:`superscript`},operation:{name:`toggleSuperscript`}}),Kh=K({label:`codeControlLabel`,icon:e=>(0,n.jsx)(_m,{...e}),isActive:{name:`code`},operation:{name:`toggleCode`}}),qh=K({label:`codeBlockControlLabel`,icon:e=>(0,n.jsx)(_m,{...e}),isActive:{name:`codeBlock`},operation:{name:`toggleCodeBlock`}}),Jh=K({label:`highlightControlLabel`,icon:e=>(0,n.jsx)(vm,{...e}),isActive:{name:`highlight`},operation:{name:`toggleHighlight`}}),Yh=K({label:`hrControlLabel`,icon:e=>(0,n.jsx)(ym,{...e}),operation:{name:`setHorizontalRule`}}),Xh=K({label:`unsetColorControlLabel`,icon:e=>(0,n.jsx)(bm,{...e}),operation:{name:`unsetColor`}}),Zh=K({label:`undoControlLabel`,icon:e=>(0,n.jsx)(Dm,{...e}),operation:{name:`undo`}}),Qh=K({label:`redoControlLabel`,icon:e=>(0,n.jsx)(Om,{...e}),operation:{name:`redo`}}),$h=K({label:`tasksControlLabel`,icon:e=>(0,n.jsx)(km,{...e}),isActive:{name:`taskList`},operation:{name:`toggleTaskList`}}),eg=K({label:`tasksSinkLabel`,icon:e=>(0,n.jsx)(Am,{...e}),operation:{name:`sinkListItem`,attributes:`taskItem`},isDisabled:e=>!e?.can().sinkListItem(`taskItem`)}),tg=K({label:`tasksLiftLabel`,icon:e=>(0,n.jsx)(jm,{...e}),operation:{name:`liftListItem`,attributes:`taskItem`},isDisabled:e=>!e?.can().liftListItem(`taskItem`)}),ng=K({label:`tableInsertControlLabel`,icon:e=>(0,n.jsx)(Nm,{...e}),operation:{name:`insertTable`,attributes:{rows:3,cols:3,withHeaderRow:!0}}}),rg=K({label:`tableDeleteControlLabel`,icon:e=>(0,n.jsx)(Pm,{...e}),operation:{name:`deleteTable`},isDisabled:e=>!e?.isActive(`table`)}),ig=K({label:`tableAddColumnBeforeControlLabel`,icon:e=>(0,n.jsx)(Fm,{...e}),operation:{name:`addColumnBefore`},isDisabled:e=>!e?.isActive(`table`)}),ag=K({label:`tableAddColumnAfterControlLabel`,icon:e=>(0,n.jsx)(Im,{...e}),operation:{name:`addColumnAfter`},isDisabled:e=>!e?.isActive(`table`)}),og=K({label:`tableDeleteColumnControlLabel`,icon:e=>(0,n.jsx)(Lm,{...e}),operation:{name:`deleteColumn`},isDisabled:e=>!e?.isActive(`table`)}),sg=K({label:`tableAddRowBeforeControlLabel`,icon:e=>(0,n.jsx)(Rm,{...e}),operation:{name:`addRowBefore`},isDisabled:e=>!e?.isActive(`table`)}),cg=K({label:`tableAddRowAfterControlLabel`,icon:e=>(0,n.jsx)(zm,{...e}),operation:{name:`addRowAfter`},isDisabled:e=>!e?.isActive(`table`)}),lg=K({label:`tableDeleteRowControlLabel`,icon:e=>(0,n.jsx)(Bm,{...e}),operation:{name:`deleteRow`},isDisabled:e=>!e?.isActive(`table`)}),ug=K({label:`tableMergeOrSplitCellControlLabel`,icon:e=>(0,n.jsx)(Vm,{...e}),operation:{name:`mergeOrSplit`},isDisabled:e=>!e?.isActive(`table`)}),dg=K({label:`tableToggleHeaderColumnControlLabel`,icon:e=>(0,n.jsx)(Fm,{...e}),operation:{name:`toggleHeaderColumn`},isDisabled:e=>!e?.isActive(`table`)}),fg=K({label:`tableToggleHeaderRowControlLabel`,icon:e=>(0,n.jsx)(Rm,{...e}),operation:{name:`toggleHeaderRow`},isDisabled:e=>!e?.isActive(`table`)}),pg=e=>{let{labels:t,showTableColumnLines:r,toggleTableColumnLines:i}=Pp(),a=t.tableToggleColumnLinesControlLabel;return(0,n.jsx)(Yp,{"aria-label":a,title:a,active:r,icon:e=>(0,n.jsx)(Hm,{...e}),...e,onClick:i})};pg.displayName=`RichTextEditorControl_tableToggleColumnLinesControlLabel`;var mg=e=>{let{labels:t,showTableRowLines:r,toggleTableRowLines:i}=Pp(),a=t.tableToggleRowLinesControlLabel;return(0,n.jsx)(Yp,{"aria-label":a,title:a,active:r,icon:e=>(0,n.jsx)(Um,{...e}),...e,onClick:i})};mg.displayName=`RichTextEditorControl_tableToggleRowLinesControlLabel`;var hg=[`#ffffff`,`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#e6f7ff`,`#bae7ff`,`#91d5ff`,`#69c0ff`,`#f6ffed`,`#d9f7be`,`#b7eb8f`,`#95de64`,`#fff2f0`,`#ffccc7`,`#ffa39e`,`#ff7875`,`#f9f0ff`,`#efdbff`,`#d3adf7`,`#b37feb`],gg={boldControlLabel:`Bold`,italicControlLabel:`Italic`,underlineControlLabel:`Underline`,strikeControlLabel:`Strikethrough`,clearFormattingControlLabel:`Clear formatting`,linkControlLabel:`Link`,unlinkControlLabel:`Unlink`,bulletListControlLabel:`Bullet list`,orderedListControlLabel:`Ordered list`,h1ControlLabel:`Heading 1`,h2ControlLabel:`Heading 2`,h3ControlLabel:`Heading 3`,h4ControlLabel:`Heading 4`,h5ControlLabel:`Heading 5`,h6ControlLabel:`Heading 6`,blockquoteControlLabel:`Blockquote`,alignLeftControlLabel:`Align left`,alignCenterControlLabel:`Align center`,alignRightControlLabel:`Align right`,alignJustifyControlLabel:`Align justify`,codeControlLabel:`Code`,codeBlockControlLabel:`Code block`,subscriptControlLabel:`Subscript`,superscriptControlLabel:`Superscript`,colorPickerControlLabel:`Text color`,unsetColorControlLabel:`Unset color`,highlightControlLabel:`Highlight`,hrControlLabel:`Horizontal rule`,undoControlLabel:`Undo`,redoControlLabel:`Redo`,colorControlLabel:e=>`Set text color ${e}`,sourceCodeControlLabel:`Source code`,linkEditorInputLabel:`Enter URL`,linkEditorInputPlaceholder:`https://example.com`,linkEditorExternalLink:`Open link in a new tab`,linkEditorInternalLink:`Open link in the same tab`,linkEditorSave:`Save`,colorPickerCancel:`Cancel`,colorPickerClear:`Clear color`,colorPickerColorPicker:`Color picker`,colorPickerPalette:`Color palette`,colorPickerSave:`Save`,colorPickerColorLabel:e=>`Set text color ${e}`,tasksControlLabel:`Task list`,tasksSinkLabel:`Increase indent`,tasksLiftLabel:`Decrease indent`,fontFamilyControlLabel:`Font family`,imageUploadControlLabel:`Insert image`,bgColorPickerControlLabel:`Editor background color`,bgColorPickerColorLabel:e=>`Set background color ${e}`,emojiPickerControlLabel:`Insert emoji`,tableInsertControlLabel:`Insert table`,tableDeleteControlLabel:`Delete table`,tableAddColumnBeforeControlLabel:`Add column before`,tableAddColumnAfterControlLabel:`Add column after`,tableDeleteColumnControlLabel:`Delete column`,tableAddRowBeforeControlLabel:`Add row before`,tableAddRowAfterControlLabel:`Add row after`,tableDeleteRowControlLabel:`Delete row`,tableMergeOrSplitCellControlLabel:`Merge or split cells`,tableToggleHeaderColumnControlLabel:`Toggle header column`,tableToggleHeaderRowControlLabel:`Toggle header row`,tableToggleColumnLinesControlLabel:`Toggle column lines`,tableToggleRowLinesControlLabel:`Toggle row lines`},_g=({content:e,placeholder:r,editable:i,withCodeHighlightStyles:a=!0,withTypographyStyles:o=!0,labels:s,variant:c=`default`,onSourceCodeTextSwitch:l,onContentChange:u,onFocus:d,onBlur:p,onCreate:m,onSelectionChange:h,fontFamily:g,fontFamilies:_,contentBackground:v,bgColorPickerColors:y,onGetContentAsEmailHtml:b,onImageUpload:x,children:S,className:C,style:w})=>{let T=Fp(c),E=Bp({content:e,placeholder:r,editable:i}),[D,O]=t.useReducer(e=>e+1,0);t.useEffect(()=>{if(E)return E.on(`selectionUpdate`,O),E.on(`transaction`,O),()=>{E.off(`selectionUpdate`,O),E.off(`transaction`,O)}},[E]);let[k,A]=t.useState(!0),[j,M]=t.useState(!0),N=t.useCallback(()=>A(e=>!e),[]),P=t.useCallback(()=>M(e=>!e),[]),[F,I]=t.useState(v??``);t.useEffect(()=>{I(v??``)},[v]);let L=t.useMemo(()=>({...gg,...s}),[s]);return(0,n.jsx)(Np,{value:t.useMemo(()=>({editor:E,labels:L,withCodeHighlightStyles:a,withTypographyStyles:o,variant:c,onSourceCodeTextSwitch:l,onContentChange:u,onFocus:d,onBlur:p,onCreate:m,onSelectionChange:h,fontFamily:g,fontFamilies:_,contentBackground:v,bgColor:F,setBgColor:I,bgColorPickerColors:y??hg,showTableColumnLines:k,showTableRowLines:j,toggleTableColumnLines:N,toggleTableRowLines:P,onGetContentAsEmailHtml:b,onImageUpload:x}),[E,D,L,a,o,c,l,u,d,p,m,h,g,_,v,F,I,y,k,j,N,P,b,x]),children:(0,n.jsx)(`div`,{className:(0,f.cx)(T.root,C),style:w,children:S})})};_g.displayName=`RichTextEditor`;var vg=Object.assign(_g,{Toolbar:Vp,Content:Kp,ControlsGroup:qp,Control:Jp,ControlBase:Yp,Bold:Th,Italic:Eh,Underline:Dh,Strikethrough:Oh,ClearFormatting:kh,H1:Nh,H2:Ph,H3:Fh,H4:Ih,H5:Lh,H6:Rh,BulletList:jh,OrderedList:Mh,Blockquote:zh,Link:Ym,Unlink:Ah,AlignLeft:Bh,AlignRight:Vh,AlignCenter:Hh,AlignJustify:Uh,Code:Kh,CodeBlock:qh,Subscript:Wh,Superscript:Gh,Color:Xm,ColorPicker:Zm,Highlight:Jh,UnsetColor:Xh,Hr:Yh,Undo:Zh,Redo:Qh,TaskList:$h,TaskListSink:eg,TaskListLift:tg,SourceCode:Qm,FontFamily:eh,ImageUpload:th,BgColorPicker:nh,EmojiPicker:Ch,DragHandle:rh,TableActiveControls:wh,InsertTable:ng,DeleteTable:rg,AddColumnBefore:ig,AddColumnAfter:ag,DeleteColumn:og,AddRowBefore:sg,AddRowAfter:cg,DeleteRow:lg,MergeOrSplitCell:ug,ToggleHeaderColumn:dg,ToggleHeaderRow:fg,ToggleTableColumnLines:pg,ToggleTableRowLines:mg}),yg=()=>({dropdownRoot:(0,f.css)({border:`1px solid ${o.tokens.colorNeutralStroke2} !important`,borderBottom:`1px solid ${o.tokens.colorNeutralStroke2} !important`,borderRadius:`50px !important`,backgroundColor:`${o.tokens.colorNeutralBackground1} !important`,padding:`0px 10px !important`,boxShadow:`none !important`,transition:`all 0.2s ease`,"&::after":{display:`none !important`,borderWidth:`0 !important`,content:`"none !important"`},"&:hover":{borderColor:`${o.tokens.colorBrandStroke1} !important`},"&:focus-within":{borderColor:`${o.tokens.colorBrandStroke1} !important`,boxShadow:`0 0 0 2px ${o.tokens.colorBrandBackground2} !important`}})}),bg=({options:e,onChange:r,renderItem:i,validate:a,label:s,placeholder:c,defaultValue:l,message:u,messageType:d,required:f,size:p,hint:h})=>{let g=l?e.find(e=>e.value===l):void 0,[_,v]=(0,t.useState)(l||``),[y,b]=(0,t.useState)(g?.text||``),[x,S]=(0,t.useState)(``),C=yg(),w=(e,t)=>{let n=t.optionValue||``,i=t.optionText||``;v(n),b(i);let o=a?a(n):``;S(o),!o&&r&&r(n)},T=t.useMemo(()=>x?`error`:d===`warning`?`warning`:d===`info`?`success`:`none`,[x,d]);return(0,n.jsx)(o.Field,{label:s,required:f,validationMessage:t.useMemo(()=>x||u,[x,u]),validationMessageIcon:t.useCallback(()=>{switch(T){case`error`:return(0,n.jsx)(m.ErrorCircle12Filled,{});case`warning`:return(0,n.jsx)(m.Warning12Filled,{});case`success`:return(0,n.jsx)(m.CheckmarkCircle12Filled,{});default:return null}},[T])(),size:p,hint:h,validationState:T,children:(0,n.jsx)(o.Dropdown,{placeholder:c,onOptionSelect:w,value:y,selectedOptions:_?[_]:[],className:C.dropdownRoot,children:e.map(e=>{let t=e.icon??e.checkIcon;return(0,n.jsx)(o.Option,{value:e.value,disabled:e.disabled,as:e.as,text:e.text||``,children:i?i(e):(0,n.jsxs)(n.Fragment,{children:[t&&(0,n.jsx)(`span`,{style:{marginRight:4,display:`inline-flex`,alignItems:`center`},children:t}),e.text]})},e.value)})})})},xg=()=>({inputRoot:(0,f.css)({border:`1px solid ${o.tokens.colorNeutralStroke2} !important`,borderBottom:`1px solid ${o.tokens.colorNeutralStroke2} !important`,borderRadius:`50px !important`,backgroundColor:`${o.tokens.colorNeutralBackground1} !important`,padding:`0px 10px !important`,boxShadow:`none !important`,transition:`all 0.2s ease`,"&::after":{display:`none !important`,borderWidth:`0 !important`,content:`"none !important"`},"&:hover":{borderColor:`${o.tokens.colorBrandStroke1} !important`},"&:focus-within":{borderColor:`${o.tokens.colorBrandStroke1} !important`,boxShadow:`0 0 0 2px ${o.tokens.colorBrandBackground2} !important`}})}),Sg=({value:r,type:i=`text`,shape:a=`normal`,onChange:s,validate:c,label:l,placeholder:u,message:d,messageType:f,required:p,size:h,hint:g,disabled:_,readOnly:v,min:y,max:b,step:x,contentBefore:S,contentAfter:C})=>{let[w,T]=(0,t.useState)(r===void 0?``:String(r)),[E,D]=(0,t.useState)(``),O=xg(),k=e.u(),A=r!==void 0,j=A?String(r):w,M=(0,t.useCallback)(e=>{if(p&&e.trim()===``)return i===`number`?k.numberRequired:k.fieldRequired;if(i===`number`&&e.trim()!==``){let t=Number(e);if(isNaN(t))return k.invalidNumber;if(y!==void 0&&t<y)return k.valueMustBeAtLeast.replace(`{0}`,String(y));if(b!==void 0&&t>b)return k.valueMustBeAtMost.replace(`{0}`,String(b))}return c?c(i===`number`&&e.trim()!==``?Number(e):e):``},[p,i,c,y,b,k]),N=(0,t.useCallback)((e,t)=>{let n=t.value;if(i===`number`&&n!==``&&!/^-?\d*\.?\d*$/.test(n))return;A||T(n);let r=M(n);D(r),!r&&s&&s(i===`number`&&n.trim()!==``?Number(n):n)},[i,A,M,s]),P=(0,t.useCallback)(()=>{D(M(j))},[M,j]),F=(0,t.useMemo)(()=>E?`error`:f===`warning`?`warning`:f===`info`?`success`:`none`,[E,f]),I=(0,t.useMemo)(()=>E||d,[E,d]),L=(0,t.useCallback)(()=>{switch(F){case`error`:return(0,n.jsx)(m.ErrorCircle12Filled,{});case`warning`:return(0,n.jsx)(m.Warning12Filled,{});case`success`:return(0,n.jsx)(m.CheckmarkCircle12Filled,{});default:return null}},[F]),R=a===`circular`?O.inputRoot:void 0;return(0,n.jsx)(o.Field,{label:l,required:p,validationMessage:I,validationMessageIcon:L(),size:h,hint:g,validationState:F,children:(0,n.jsx)(o.Input,{value:j,placeholder:u,onChange:N,onBlur:P,disabled:_,readOnly:v,type:`text`,inputMode:i===`number`?`decimal`:`text`,step:i===`number`?x:void 0,className:R,contentBefore:S,contentAfter:C})})},Cg=({onChange:e,defaultKey:r,label:i,options:a=[],minWidth:s,styles:c})=>{let[l,u]=(0,t.useState)(()=>a.map(e=>({...e,selected:e.key===(r??`status`)})));(0,t.useEffect)(()=>{let t=l.find(e=>e.selected);t&&e(t.key)},[]);let d=t.default.useCallback(t=>{u(l.map(e=>({...e,selected:e.key===t.key}))),e(t.key)},[l,e]);return(0,n.jsxs)(H,{gap:`s`,children:[i&&(0,n.jsx)(o.Label,{children:i}),(0,n.jsx)(Td,{options:l,onSelected:d,styles:s?{minWidth:s}:c??{}})]})},wg=()=>({menuButton:(0,f.css)({minWidth:200}),popover:(0,f.css)({padding:o.tokens.spacingVerticalS,minWidth:200}),timePicker:(0,f.css)({width:`100%`})}),Tg=()=>({root:(0,f.css)({maxHeight:280,overflowY:`auto`,padding:`${o.tokens.spacingVerticalXS} 0`}),item:(0,f.css)({cursor:`pointer`})}),Eg=`time`,Dg=(e,t,n)=>{let r=new Date(e);return r.setHours(t,n,0,0),r},Og=(e,t,n)=>{let r={hour:`numeric`,minute:`2-digit`,...n&&{second:`2-digit`},...t&&{hourCycle:t}};return new Intl.DateTimeFormat(void 0,r).format(e)},kg=e=>`${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`,Ag=(e,t,n,r)=>{let i=[],a=e*60,o=t*60;for(let e=a;e<o;e+=n){let t=Math.floor(e/60),n=e%60;i.push(Dg(r,t,n))}return i},jg=t.memo(e=>{let{onTimeSelect:r,hourCycle:i,showSeconds:a=!1,startHour:s=0,endHour:c=24,increment:l=30,dateAnchor:u}=e,d=Tg(),f=t.useMemo(()=>u??new Date,[u]),p=t.useMemo(()=>Ag(s,c,l,f),[s,c,l,f]),h=t.useCallback((e,t)=>()=>{r(e,t)},[r]);return(0,n.jsx)(`div`,{className:d.root,children:p.map(e=>{let t=Og(e,i,a),r=kg(e);return(0,n.jsx)(o.MenuItemRadio,{name:Eg,value:r,onClick:h(e,t),icon:(0,n.jsx)(m.ClockRegular,{}),className:d.item,children:t},r)})})}),Mg=(e,t)=>{let n=t?new Date(t):new Date,r=n.getHours()*60+n.getMinutes(),i=Math.ceil(r/e)*e,a=new Date(n);return a.setHours(Math.floor(i/60),i%60,0,0),a},Ng=t.memo(e=>{let{onSelected:r,value:i,placeholder:a=`Select a time`,hourCycle:s,showSeconds:c=!1,startHour:l,endHour:u,increment:d=30,dateAnchor:f}=e,p=wg(),h=t.useMemo(()=>Mg(d,f),[d,f]),g=i??h,[_,v]=t.useState(g),[y,b]=t.useState(()=>Og(g,s,c)),[x,S]=t.useState(!1);t.useEffect(()=>{i&&(v(i),b(Og(i,s,c)))},[i,s,c]);let C=t.useCallback((e,t)=>{S(t.open)},[]),w=t.useMemo(()=>(0,m.bundleIcon)(m.ClockFilled,m.ClockRegular),[]),T=t.useMemo(()=>_?{[Eg]:[kg(_)]}:{[Eg]:[]},[_]),E=t.useCallback((e,t)=>{v(e),b(t),r(e),S(!1)},[r]);return(0,n.jsxs)(o.Menu,{open:x,onOpenChange:C,checkedValues:T,onCheckedValueChange:t.useCallback((e,t)=>{},[]),children:[(0,n.jsx)(o.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(o.MenuButton,{shape:`circular`,icon:(0,n.jsx)(w,{}),className:p.menuButton,"aria-label":`Select time: ${y||a}`,children:y||a})}),(0,n.jsx)(o.MenuPopover,{className:p.popover,children:(0,n.jsx)(o.MenuList,{children:(0,n.jsx)(jg,{value:_,onTimeSelect:E,hourCycle:s,showSeconds:c,startHour:l,endHour:u,increment:d,dateAnchor:f})})})]})}),Pg=()=>({container:(0,f.css)({display:`flex`,flexDirection:`column`,gap:o.tokens.spacingVerticalS,position:`relative`}),pickerList:(0,f.css)({maxHeight:300,overflowY:`auto`,backgroundColor:o.tokens.colorNeutralBackground1,border:`1px solid ${o.tokens.colorNeutralStroke2}`,borderRadius:o.tokens.borderRadiusMedium,boxShadow:o.tokens.shadow16,scrollbarColor:`${o.tokens.colorBrandForeground1} ${o.tokens.colorNeutralBackground1}`,scrollbarWidth:`thin`,"&::-webkit-scrollbar-track":{borderRadius:10,borderWidth:1},"&::-webkit-scrollbar-thumb":{borderRadius:10,borderWidth:1},"&::-webkit-scrollbar":{height:7,width:7}}),optionContent:(0,f.css)({display:`flex`,flexDirection:`column`,gap:o.tokens.spacingVerticalXXS}),optionSecondary:(0,f.css)({fontSize:o.tokens.fontSizeBase200,color:o.tokens.colorNeutralForeground3,fontWeight:o.tokens.fontWeightRegular}),tagPickerControl:(0,f.css)({}),tagPickerInput:(0,f.css)({backgroundColor:`transparent`,border:`none`,outline:`none`,fontSize:o.tokens.fontSizeBase300,"&::placeholder":{color:o.tokens.colorNeutralForeground4},"&:focus":{outline:`none`}})}),Fg=({options:r,selectedOptions:i=[],onSelectionChange:a,onSearchChange:s,onLoadMore:c,pagingInfo:l,placeholder:u,disabled:d=!1,maxSelectedOptions:f,width:p,className:m,noResultsMessage:h,loadingMessage:g,loadingMoreMessage:_,searchDebounceMs:v=300})=>{let y=Pg(),b=e.d(),x=u||b.placeholder,S=h||b.noResultsFound,C=g||b.searching,w=_||b.loadingMore,[T,E]=(0,t.useState)(``),D=(0,t.useRef)(null),O=(0,t.useRef)(null),k=i.map(e=>e.value),A=l?.isLoading??!1,j=l?.isLoadingMore??!1,M=l?.hasMore??!1,N=r.filter(e=>!k.includes(e.value)),P=(0,t.useCallback)(e=>{E(e),D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{s?.(e)},v)},[s,v]),F=(0,t.useCallback)(e=>{if(!M||j)return;let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;t+r>=n-100&&c?.()},[M,j,c]),I=(0,t.useCallback)((e,t)=>{if(t.value===`no-options`||t.value===`loading`||t.value===`loading-more`)return;let n=t.selectedOptions,o=i.filter(e=>n.includes(e.value));if(n.length>k.length){let e=n.find(e=>!k.includes(e));if(e){let t=r.find(t=>t.value===e);if(t){if(f&&i.length>=f)return;o.push(t)}}E(``),s?.(``)}a?.(o)},[r,i,k,a,s,f]);return(0,t.useEffect)(()=>()=>{D.current&&clearTimeout(D.current)},[]),(0,n.jsx)(`div`,{className:`${y.container} ${m||``}`,...p&&{style:{width:p}},children:(0,n.jsxs)(o.TagPicker,{onOptionSelect:I,selectedOptions:k,disabled:d,children:[(0,n.jsxs)(o.TagPickerControl,{className:y.tagPickerControl,children:[(0,n.jsx)(o.TagPickerGroup,{"aria-label":b.selectedItems,children:i.map(e=>(0,n.jsx)(o.Tag,{shape:`circular`,media:e.tagMedia??e.media,value:e.value,dismissible:!0,disabled:d,style:{minHeight:30},children:e.text},e.value))}),(0,n.jsx)(o.TagPickerInput,{className:y.tagPickerInput,"aria-label":b.searchItems,placeholder:x,value:T,onChange:e=>P(e.target.value),disabled:d})]}),(0,n.jsx)(o.TagPickerList,{ref:O,onScroll:F,className:y.pickerList,children:A?(0,n.jsx)(o.TagPickerOption,{value:`loading`,children:C}):N.length>0?(0,n.jsxs)(n.Fragment,{children:[N.map(e=>(0,n.jsx)(o.TagPickerOption,{value:e.value,text:e.text,media:e.media,children:(0,n.jsxs)(`div`,{className:y.optionContent,children:[(0,n.jsx)(o.Text,{weight:`semibold`,children:e.text}),e.secondaryText&&(0,n.jsx)(o.Text,{size:200,className:y.optionSecondary,children:e.secondaryText})]})},e.value)),j&&(0,n.jsx)(o.TagPickerOption,{value:`loading-more`,children:w})]}):(0,n.jsx)(o.TagPickerOption,{value:`no-options`,children:S})})]})})},Ig=(e,t=0,n=10**t)=>Math.round(n*e)/n,Lg=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Rg=({h:e,s:t,v:n,a:r})=>{let i=e/360*6,a=t/100,o=n/100,s=Math.floor(i),c=o*(1-a),l=o*(1-(i-s)*a),u=o*(1-(1-i+s)*a),d=s%6,f=[o,l,c,c,u,o][d],p=[u,o,o,l,c,c][d],m=[c,c,u,o,o,l][d];return{r:Ig(f*255),g:Ig(p*255),b:Ig(m*255),a:Ig(r,2)}},zg=({r:e,g:t,b:n,a:r})=>{let i=Math.max(e,t,n),a=i-Math.min(e,t,n),o=a?i===e?(t-n)/a:i===t?2+(n-e)/a:4+(e-t)/a:0;return{h:Ig(60*(o<0?o+6:o)),s:Ig(i?a/i*100:0),v:Ig(i/255*100),a:r}},Bg=({h:e,s:t,v:n,a:r})=>{let i=(200-t)*n/100;return{h:Ig(e),s:Ig(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Ig(i/2),a:Ig(r,2)}},Vg=({h:e,s:t,l:n,a:r})=>(t*=(n<50?n:100-n)/100,{h:e,s:t>0?2*t/(n+t)*100:0,v:n+t,a:r}),Hg=e=>zg(Gg(e)),Ug=e=>Kg(Rg(e)),Wg=e=>{let t=Math.round(e.a*255).toString(16).padStart(2,`0`);return`${Ug(e)}${t}`},Gg=e=>{let t=e.startsWith(`#`)?e.slice(1):e;return t.length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?Ig(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:t.length>=8?Ig(parseInt(t.slice(6,8),16)/255,2):1}},Kg=({r:e,g:t,b:n})=>`#${[e,t,n].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`,qg=({r:e,g:t,b:n,a:r})=>{let i=Math.round(r*255).toString(16).padStart(2,`0`);return`#${[e,t,n].map(e=>e.toString(16).padStart(2,`0`)).join(``)}${i}`},Jg=e=>{let{h:t,s:n,l:r}=Bg(e);return`hsl(${t}, ${n}%, ${r}%)`},Yg=e=>{let{h:t,s:n,l:r,a:i}=Bg(e);return`hsla(${t}, ${n}%, ${r}%, ${i})`},Xg=e=>{let{r:t,g:n,b:r}=Rg(e);return`rgb(${t}, ${n}, ${r})`},Zg=e=>{let{r:t,g:n,b:r,a:i}=Rg(e);return`rgba(${t}, ${n}, ${r}, ${i})`},Qg=(e,t=`deg`)=>Number(e.replace(RegExp(`${t}$`),``)),$g=e=>{let t=e.match(/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?\s*[,/ ]?\s*(-?\d*\.?\d+)%?\s*[,/ ]?\s*(-?\d*\.?\d+)%?\s*[,/ ]?\s*(-?\d*\.?\d+)?\s*\)?/i);return t?Vg({h:Qg(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])}):{h:0,s:0,v:0,a:1}},e_=e=>{let t=e.match(/rgba?\(?\s*(-?\d*\.?\d+)(%?)?\s*[,/ ]?\s*(-?\d*\.?\d+)(%?)?\s*[,/ ]?\s*(-?\d*\.?\d+)(%?)?\s*[,/ ]?\s*(-?\d*\.?\d+)?\s*\)?/i);return t?zg({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])}):{h:0,s:0,v:0,a:1}},t_={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},J=e=>{let t;if(typeof e!=`string`)t=e;else{let n=e.trim().toLowerCase();t=n in t_?Hg(t_[n]):n.startsWith(`#`)?Hg(n):n.startsWith(`rgb`)?e_(n):n.startsWith(`hsl`)?$g(n):Hg(n)}let n=Rg(t),r=Bg(t);return{hsva:t,hsla:r,rgba:n,hex:Kg(n),hexa:qg(n)}},n_=e=>/^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(e),r_=e=>{let{r:t,g:n,b:r}=Rg(typeof e==`string`?J(e).hsva:e);return(.299*t+.587*n+.114*r)/255>.5?`#000000`:`#ffffff`},i_=(e,t)=>e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a,a_=(e,t)=>{if(e===t)return!0;let n=e=>e.replace(`#`,``).toLowerCase();return n(e)===n(t)},o_=e=>({h:Lg(e.h,0,360),s:Lg(e.s,0,100),v:Lg(e.v,0,100),a:Lg(e.a,0,1)}),Y=()=>({pointer:(0,f.css)({position:`absolute`,width:12,height:12,borderRadius:`50%`,border:`2px solid ${o.tokens.colorNeutralBackground1}`,boxShadow:o.tokens.shadow4,transform:`translate(-50%, -50%)`,pointerEvents:`none`,boxSizing:`border-box`}),interactiveContainer:(0,f.css)({position:`relative`,touchAction:`none`,userSelect:`none`,outline:`none`,cursor:`crosshair`,"&:focus-visible":{outline:`2px solid ${o.tokens.colorBrandStroke1}`,outlineOffset:2}}),saturation:(0,f.css)({position:`relative`,width:`100%`,borderRadius:o.tokens.borderRadiusMedium,overflow:`hidden`,cursor:`crosshair`}),bar:(0,f.css)({position:`relative`,borderRadius:o.tokens.borderRadiusMedium,overflow:`hidden`,cursor:`crosshair`}),checkerboard:(0,f.css)({backgroundImage:`url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoaFBQJouucRlsGnBCgGDAYAAIpGBAWLkEGCAAAAAElFTkSuQmCC")`,backgroundSize:`8px 8px`,backgroundPosition:`0 0, 4px 4px`,position:`absolute`,inset:0,borderRadius:`inherit`}),swatchContainer:(0,f.css)({display:`flex`,flexWrap:`wrap`,gap:o.tokens.spacingHorizontalXS}),swatch:(0,f.css)({position:`relative`,borderRadius:o.tokens.borderRadiusSmall,cursor:`pointer`,border:`1px solid ${o.tokens.colorNeutralStroke2}`,boxSizing:`border-box`,transition:`transform 120ms ease, box-shadow 120ms ease`,outline:`none`,"&:hover":{transform:`scale(1.2)`,zIndex:1,boxShadow:`0 0 0 2px rgba(255,255,255,0.8), 0 2px 6px rgba(0,0,0,0.3)`},"&:focus-visible":{outline:`2px solid ${o.tokens.colorBrandStroke1}`,outlineOffset:2}}),swatchSelected:(0,f.css)({transform:`scale(1.2)`,zIndex:1,boxShadow:`0 0 0 1px ${o.tokens.colorBrandStroke1}`}),editableInputContainer:(0,f.css)({display:`flex`,flexDirection:`column`,alignItems:`center`,gap:o.tokens.spacingVerticalXXS,flex:1,minWidth:36,overflow:`hidden`}),editableInputLabel:(0,f.css)({fontSize:o.tokens.fontSizeBase200,color:o.tokens.colorNeutralForeground3,lineHeight:o.tokens.lineHeightBase200,textTransform:`uppercase`}),sketchContainer:(0,f.css)({padding:o.tokens.spacingHorizontalM,borderRadius:o.tokens.borderRadiusMedium,backgroundColor:o.tokens.colorNeutralBackground1,boxShadow:o.tokens.shadow8,boxSizing:`border-box`}),chromeContainer:(0,f.css)({padding:o.tokens.spacingHorizontalM,borderRadius:o.tokens.borderRadiusMedium,backgroundColor:o.tokens.colorNeutralBackground1,boxShadow:o.tokens.shadow8,boxSizing:`border-box`}),chromePreview:(0,f.css)({width:28,height:28,borderRadius:`50%`,border:`1px solid ${o.tokens.colorNeutralStroke2}`,boxSizing:`border-box`,flexShrink:0}),colorfulContainer:(0,f.css)({borderRadius:o.tokens.borderRadiusMedium,overflow:`hidden`}),wheelContainer:(0,f.css)({position:`relative`,borderRadius:`50%`,overflow:`hidden`}),circleContainer:(0,f.css)({display:`flex`,flexWrap:`wrap`,gap:o.tokens.spacingHorizontalS,justifyContent:`center`}),circlePoint:(0,f.css)({borderRadius:`50%`,cursor:`pointer`,border:`2px solid transparent`,transition:`border-color ${o.tokens.durationNormal} ${o.tokens.curveEasyEase}`,outline:`none`,"&:hover":{opacity:.85},"&:focus-visible":{outline:`2px solid ${o.tokens.colorBrandStroke1}`,outlineOffset:2}}),circlePointSelected:(0,f.css)({borderColor:o.tokens.colorNeutralBackground1,boxShadow:`0 0 0 2px ${o.tokens.colorNeutralStroke1}`}),compactContainer:(0,f.css)({padding:o.tokens.spacingHorizontalS,borderRadius:o.tokens.borderRadiusMedium,backgroundColor:o.tokens.colorNeutralBackground1,boxShadow:o.tokens.shadow4,boxSizing:`border-box`,width:`fit-content`}),blockContainer:(0,f.css)({borderRadius:o.tokens.borderRadiusMedium,backgroundColor:o.tokens.colorNeutralBackground1,boxShadow:o.tokens.shadow8,overflow:`hidden`,boxSizing:`border-box`}),blockHeader:(0,f.css)({display:`flex`,alignItems:`center`,justifyContent:`center`,height:110,position:`relative`,fontSize:o.tokens.fontSizeHero800,fontWeight:o.tokens.fontWeightBold}),blockTriangle:(0,f.css)({position:`absolute`,bottom:-6,left:`50%`,transform:`translateX(-50%)`,width:0,height:0,borderLeft:`6px solid transparent`,borderRight:`6px solid transparent`}),materialContainer:(0,f.css)({width:98,padding:o.tokens.spacingHorizontalM,borderRadius:o.tokens.borderRadiusMedium,backgroundColor:o.tokens.colorNeutralBackground1,boxShadow:o.tokens.shadow8,boxSizing:`border-box`}),materialInputUnderline:(0,f.css)({width:`100%`,height:2,marginTop:o.tokens.spacingVerticalXXS,borderRadius:o.tokens.borderRadiusSmall}),githubContainer:(0,f.css)({padding:o.tokens.spacingHorizontalM,borderRadius:o.tokens.borderRadiusMedium,backgroundColor:o.tokens.colorNeutralBackground1,boxShadow:o.tokens.shadow8,boxSizing:`border-box`,position:`relative`}),githubArrow:(0,f.css)({position:`absolute`,width:0,height:0}),sliderContainer:(0,f.css)({display:`flex`,flexDirection:`column`,gap:o.tokens.spacingVerticalXS})}),s_=(e,t,n)=>{let r=e.getBoundingClientRect();return{left:Math.max(0,Math.min(1,(t-r.left)/r.width)),top:Math.max(0,Math.min(1,(n-r.top)/r.height))}},c_=({onMove:e,onDown:r,className:i,style:a,children:s})=>{let c=(0,t.useRef)(null),l=(0,t.useRef)(!1),u=Y(),d=(0,t.useCallback)((t,n)=>{c.current&&e?.(s_(c.current,t,n))},[e]),f=(0,t.useCallback)(()=>{let e=e=>d(e.clientX,e.clientY),t=()=>{document.removeEventListener(`mousemove`,e),document.removeEventListener(`mouseup`,t)};return{onMouseMove:e,onMouseUp:t}},[d]),p=(0,t.useCallback)(t=>{if(l.current){l.current=!1;return}if(t.preventDefault(),!c.current)return;let n=s_(c.current,t.clientX,t.clientY);r?.(n),e?.(n);let{onMouseMove:i,onMouseUp:a}=f();document.addEventListener(`mousemove`,i),document.addEventListener(`mouseup`,a)},[r,e,f]),m=(0,t.useCallback)(t=>{if(l.current=!0,!c.current||!t.touches[0])return;let n=s_(c.current,t.touches[0].clientX,t.touches[0].clientY);r?.(n),e?.(n)},[r,e]),h=(0,t.useCallback)(e=>{e.touches[0]&&d(e.touches[0].clientX,e.touches[0].clientY)},[d]);return(0,n.jsx)(`div`,{ref:c,className:(0,o.mergeClasses)(u.interactiveContainer,i),style:a,onMouseDown:p,onTouchStart:m,onTouchMove:h,role:`none`,children:s})},l_=({color:e,left:t,top:r})=>(0,n.jsx)(`div`,{className:Y().pointer,style:{left:`${(t??0)*100}%`,top:`${(r??0)*100}%`,backgroundColor:e}}),u_=({hsva:e,onChange:r,pointer:i=l_,radius:a=6,className:s,style:c})=>{let l=Y(),u=(0,t.useCallback)(t=>{let n=o_({h:e.h,s:t.left*100,v:(1-t.top)*100,a:e.a});r?.(J(n))},[e.h,e.a,r]),d=(0,t.useCallback)(t=>{let{s:n,v:i}=e,a=t.shiftKey?10:1;switch(t.key){case`ArrowRight`:n=Math.min(100,n+a);break;case`ArrowLeft`:n=Math.max(0,n-a);break;case`ArrowUp`:i=Math.min(100,i+a);break;case`ArrowDown`:i=Math.max(0,i-a);break;default:return}t.preventDefault(),r?.(J(o_({...e,s:n,v:i})))},[e,r]),p=(0,t.useMemo)(()=>(0,f.css)({height:typeof c?.height==`number`?c.height:150,...c,backgroundImage:`linear-gradient(0deg, #000, transparent), linear-gradient(90deg, #fff, transparent)`,backgroundColor:`hsl(${e.h}, 100%, 50%)`}),[e.h,c]);return(0,n.jsx)(c_,{onMove:u,className:(0,o.mergeClasses)(l.saturation,s),children:(0,n.jsx)(`div`,{className:p,onKeyDown:d,tabIndex:0,role:`slider`,"aria-label":`Saturation and brightness`,"aria-valuetext":`Saturation ${Math.round(e.s)}%, Brightness ${Math.round(e.v)}%`,style:{borderRadius:a},children:(0,n.jsx)(i,{color:J(e).hex,left:e.s/100,top:1-e.v/100})})})},d_=`linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)`,f_=`linear-gradient(to bottom, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)`,p_=({color:e,left:t,top:r})=>(0,n.jsx)(`div`,{className:Y().pointer,style:{left:`${(t??0)*100}%`,top:`${(r??0)*100}%`,backgroundColor:e}}),m_=({hsva:e,onChange:r,width:i=`100%`,height:a=12,direction:s=`horizontal`,pointer:c=p_,radius:l=6,className:u,style:d})=>{let p=Y(),m=s===`horizontal`,h=(0,t.useCallback)(t=>{let n=m?t.left:t.top,i=o_({...e,h:n*360});r?.(J(i))},[e,r,m]),g=(0,t.useCallback)(t=>{let{h:n}=e,i=t.shiftKey?10:1,a=m?`ArrowRight`:`ArrowDown`,o=m?`ArrowLeft`:`ArrowUp`;if(t.key===a)n=(n+i)%360;else if(t.key===o)n=(n-i+360)%360;else return;t.preventDefault(),r?.(J(o_({...e,h:n})))},[e,r,m]),_=(0,t.useMemo)(()=>(0,f.css)({width:i,height:a,backgroundImage:m?d_:f_,borderRadius:l,...d}),[i,a,m,l,d]),v=e.h/360;return(0,n.jsx)(c_,{onMove:h,className:(0,o.mergeClasses)(p.bar,u),children:(0,n.jsx)(`div`,{className:_,onKeyDown:g,tabIndex:0,role:`slider`,"aria-label":`Hue`,"aria-valuemin":0,"aria-valuemax":360,"aria-valuenow":Math.round(e.h),children:(0,n.jsx)(c,{color:`hsl(${e.h}, 100%, 50%)`,left:m?v:.5,top:m?.5:v})})})},h_=({color:e,left:t,top:r})=>(0,n.jsx)(`div`,{className:Y().pointer,style:{left:`${(t??0)*100}%`,top:`${(r??0)*100}%`,backgroundColor:e}}),g_=({hsva:e,onChange:r,width:i=`100%`,height:a=12,direction:s=`horizontal`,pointer:c=h_,radius:l=6,className:u,style:d})=>{let p=Y(),m=s===`horizontal`,h=(0,t.useCallback)(t=>{let n=m?t.left:t.top,i=o_({...e,a:Math.round(n*100)/100});r?.(J(i))},[e,r,m]),g=(0,t.useCallback)(t=>{let{a:n}=e,i=t.shiftKey?.1:.01,a=m?`ArrowRight`:`ArrowDown`,o=m?`ArrowLeft`:`ArrowUp`;if(t.key===a)n=Math.min(1,n+i);else if(t.key===o)n=Math.max(0,n-i);else return;t.preventDefault(),r?.(J(o_({...e,a:Math.round(n*100)/100})))},[e,r,m]),_=Zg({...e,a:0}),v=Zg({...e,a:1}),y=m?`linear-gradient(to right, ${_}, ${v})`:`linear-gradient(to bottom, ${_}, ${v})`,b=(0,t.useMemo)(()=>(0,f.css)({width:i,height:a,position:`relative`,borderRadius:l,...d}),[i,a,l,d]),x=(0,t.useMemo)(()=>(0,f.css)({position:`absolute`,inset:0,backgroundImage:y,borderRadius:`inherit`}),[y]),S=e.a;return(0,n.jsx)(c_,{onMove:h,className:(0,o.mergeClasses)(p.bar,u),children:(0,n.jsxs)(`div`,{className:b,onKeyDown:g,tabIndex:0,role:`slider`,"aria-label":`Alpha`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(e.a*100),children:[(0,n.jsx)(`div`,{className:p.checkerboard}),(0,n.jsx)(`div`,{className:x,children:(0,n.jsx)(c,{color:Zg(e),left:m?S:.5,top:m?.5:S})})]})})},__=({color:e,left:t})=>(0,n.jsx)(`div`,{className:Y().pointer,style:{left:`${(t??0)*100}%`,top:`50%`,backgroundColor:e}}),v_=({hsva:e,onChange:r,width:i=`100%`,height:a=12,pointer:s=__,radius:c=6,className:l,style:u})=>{let d=Y(),p=(0,t.useCallback)(t=>{let n=(1-t.left)*100,i=o_({...e,v:n});r?.(J(i))},[e,r]),m=(0,t.useCallback)(t=>{let{v:n}=e,i=t.shiftKey?10:1;if(t.key===`ArrowRight`)n=Math.max(0,n-i);else if(t.key===`ArrowLeft`)n=Math.min(100,n+i);else return;t.preventDefault(),r?.(J(o_({...e,v:n})))},[e,r]),{h,s:g}=Bg(e),_=`linear-gradient(to right, hsl(${h}, ${g}%, 50%), hsl(${h}, ${g}%, 0%))`,v=(0,t.useMemo)(()=>(0,f.css)({width:i,height:a,backgroundImage:_,borderRadius:c,position:`relative`,...u}),[i,a,_,c,u]),y=1-e.v/100;return(0,n.jsx)(c_,{onMove:p,className:(0,o.mergeClasses)(d.bar,l),children:(0,n.jsx)(`div`,{className:v,onKeyDown:m,tabIndex:0,role:`slider`,"aria-label":`Shade`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(e.v),children:(0,n.jsx)(s,{color:J(e).hex,left:y})})})},y_=e=>typeof e==`string`?{color:e}:e,b_=({color:e,title:r,checked:i,disabled:a,size:s=24,radius:c=4,onClick:l,rectRender:u,addonBefore:d,addonAfter:p,colors:m=[],className:h,style:g})=>{let _=Y(),v=(0,t.useCallback)(e=>{a||l?.(e)},[a,l]);if(m.length===0&&e){let t=i??!1,a=(0,f.css)({width:s,height:s,borderRadius:c,backgroundColor:e}),l=u?u({className:(0,o.mergeClasses)(_.swatch,t?_.swatchSelected:!1,a,h),style:g,onClick:()=>v(e),role:`button`,"aria-pressed":t?`true`:`false`,tabIndex:0}):(0,n.jsx)(`div`,{className:(0,o.mergeClasses)(_.swatch,t?_.swatchSelected:!1,a,h),style:g,onClick:()=>v(e),role:`button`,"aria-pressed":t?`true`:`false`,"aria-label":r??e,tabIndex:0,onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),v(e))}});return r?(0,n.jsx)(o.Tooltip,{content:r,relationship:`label`,children:l}):l}let y=(0,t.useMemo)(()=>new Map(m.map(e=>{let{color:t}=y_(e);return[t,Ug(J(t).hsva)]})),[m]);return(0,n.jsxs)(H,{direction:`vertical`,gap:`xs`,children:[d,(0,n.jsx)(`div`,{className:_.swatchContainer,role:`listbox`,"aria-label":`Color swatches`,children:m.map((t,r)=>{let{color:i,title:a}=y_(t),l=y.get(i)||i,u=e?a_(l,e):!1,d=(0,f.css)({width:s,height:s,borderRadius:c,backgroundColor:i}),p=(0,n.jsx)(`div`,{className:(0,o.mergeClasses)(_.swatch,u?_.swatchSelected:`false`,d),onClick:()=>v(i),role:`option`,"aria-selected":u?`true`:`false`,"aria-label":a??i,tabIndex:0,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(i))},children:u&&(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,width:s*.6,height:s*.6,style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,fill:r_(Hg(i))},children:(0,n.jsx)(`path`,{d:`M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z`})})},`${i}-${r}`);return a?(0,n.jsx)(o.Tooltip,{content:a,relationship:`label`,children:p},`${i}-${r}`):p})}),p]})},x_={width:`100%`,minWidth:0,textAlign:`center`},S_=({label:e,value:r,onChange:i,placeholder:a,className:s,style:c})=>{let l=Y(),[u,d]=(0,t.useState)(String(r??``));(0,t.useEffect)(()=>{d(String(r??``))},[r]);let f=(0,t.useCallback)((e,t)=>{d(t.value)},[]),p=(0,t.useCallback)(()=>{i?.(u)},[u,i]),m=(0,t.useCallback)(e=>{e.key===`Enter`&&i?.(u)},[u,i]);return(0,n.jsxs)(`div`,{className:l.editableInputContainer,style:c,children:[(0,n.jsx)(o.Input,{size:`small`,value:u,onChange:f,onBlur:p,onKeyDown:m,placeholder:a,className:s,"aria-label":e,style:x_}),e&&(0,n.jsx)(`span`,{className:l.editableInputLabel,children:e})]})},C_=({hsva:e,onChange:r,showAlpha:i=!0,className:a,style:o})=>{let s=Rg(e),c=(0,t.useCallback)((e,t)=>{let n=Number(t);if(isNaN(n))return;let i={...s};e===`a`?i.a=Math.max(0,Math.min(1,n/100)):i[e]=Math.max(0,Math.min(255,Math.round(n)));let a=zg(i);r?.(J(a))},[s,r]);return(0,n.jsxs)(H,{direction:`horizontal`,gap:`xs`,className:a,style:(0,t.useMemo)(()=>({flex:3,minWidth:0,...o}),[o]),children:[(0,n.jsx)(S_,{label:`R`,value:s.r,onChange:e=>c(`r`,e)}),(0,n.jsx)(S_,{label:`G`,value:s.g,onChange:e=>c(`g`,e)}),(0,n.jsx)(S_,{label:`B`,value:s.b,onChange:e=>c(`b`,e)}),i&&(0,n.jsx)(S_,{label:`A`,value:Math.round(s.a*100),onChange:e=>c(`a`,e)})]})},w_=({hsva:e,onChange:r,showAlpha:i=!0,className:a,style:o})=>{let s=Bg(e),c=(0,t.useCallback)((e,t)=>{let n=Number(t);if(isNaN(n))return;let i={...s};e===`a`?i.a=Math.max(0,Math.min(1,n/100)):e===`h`?i.h=Math.max(0,Math.min(360,Math.round(n))):i[e]=Math.max(0,Math.min(100,Math.round(n)));let a=Vg(i);r?.(J(a))},[s,r]);return(0,n.jsxs)(H,{direction:`horizontal`,gap:`xs`,className:a,style:(0,t.useMemo)(()=>({flex:3,minWidth:0,...o}),[o]),children:[(0,n.jsx)(S_,{label:`H`,value:Math.round(s.h),onChange:e=>c(`h`,e)}),(0,n.jsx)(S_,{label:`S`,value:Math.round(s.s),onChange:e=>c(`s`,e)}),(0,n.jsx)(S_,{label:`L`,value:Math.round(s.l),onChange:e=>c(`l`,e)}),i&&(0,n.jsx)(S_,{label:`A`,value:Math.round(s.a*100),onChange:e=>c(`a`,e)})]})},T_=[`#D0021B`,`#F5A623`,`#F8E71C`,`#8B572A`,`#7ED321`,`#417505`,`#BD10E0`,`#9013FE`,`#4A90D9`,`#50E3C2`,`#B8E986`,`#000000`,`#4A4A4A`,`#9B9B9B`,`#FFFFFF`],E_=({color:e,onChange:r,width:i=320,presetColors:a=T_,editableDisable:s=!1,disableAlpha:c=!1,className:l,style:u})=>{let d=Y(),f=e=>e?typeof e==`string`?J(e).hsva:e:{h:0,s:0,v:100,a:1},[p,m]=(0,t.useState)(()=>f(e));(0,t.useEffect)(()=>{e!==void 0&&m(f(e))},[e]);let h=(0,t.useCallback)(e=>{m(e.hsva),r?.(e)},[r]),g=(0,t.useCallback)(e=>{let t=e.startsWith(`#`)?e:`#${e}`;if(n_(t)){let e=J(t);m(e.hsva),r?.(e)}},[r]),_=(0,t.useCallback)(e=>{let t=J(e);m(t.hsva),r?.(t)},[r]),v=Ug(p),y=(0,t.useMemo)(()=>({width:i,...u}),[i,u]);return(0,n.jsxs)(H,{direction:`vertical`,gap:`m`,className:(0,o.mergeClasses)(d.sketchContainer,l),style:y,children:[(0,n.jsx)(u_,{hsva:p,onChange:h}),(0,n.jsxs)(H,{direction:`vertical`,gap:`s`,children:[(0,n.jsx)(m_,{hsva:p,onChange:h}),!c&&(0,n.jsx)(g_,{hsva:p,onChange:h})]}),!s&&(0,n.jsxs)(H,{direction:`horizontal`,gap:`xs`,alignItems:`flex-end`,children:[(0,n.jsx)(S_,{label:`Hex`,value:v.replace(`#`,``),onChange:g}),(0,n.jsx)(C_,{hsva:p,onChange:h,showAlpha:!c})]}),a.length>0&&(0,n.jsx)(b_,{colors:a,color:v,onClick:_,size:16,radius:3})]})},D_=function(e){return e.HEXA=`hexa`,e.RGBA=`rgba`,e.HSLA=`hsla`,e}({}),O_={flex:1},k_={flex:`none`},A_={minWidth:28,width:28,padding:0},j_=[D_.HEXA,D_.RGBA,D_.HSLA],M_=({color:e,onChange:r,width:i=320,showAlpha:a=!0,showColorPreview:s=!0,showEditableInput:c=!0,showEyeDropper:l=!0,inputType:u=D_.HEXA,className:d,style:f})=>{let p=Y(),m=e=>e?typeof e==`string`?J(e).hsva:e:{h:0,s:68,v:100,a:1},[h,g]=(0,t.useState)(()=>m(e)),[_,v]=(0,t.useState)(u);(0,t.useEffect)(()=>{e!==void 0&&g(m(e))},[e]);let y=(0,t.useCallback)(e=>{g(e.hsva),r?.(e)},[r]),b=(0,t.useCallback)(e=>{let t=e.startsWith(`#`)?e:`#${e}`;if(n_(t)){let e=J(t);g(e.hsva),r?.(e)}},[r]),x=(0,t.useCallback)(()=>{v(e=>j_[(j_.indexOf(e)+1)%j_.length])},[]),S=(0,t.useCallback)(async()=>{if(`EyeDropper`in window)try{let e=await new window.EyeDropper().open();if(e?.sRGBHex){let t=J(e.sRGBHex);g(t.hsva),r?.(t)}}catch{}},[r]),C=Ug(h),w=Wg(h),T=(0,t.useMemo)(()=>({width:i,...f}),[i,f]);return(0,n.jsxs)(H,{direction:`vertical`,gap:`m`,className:(0,o.mergeClasses)(p.chromeContainer,d),style:T,children:[(0,n.jsx)(u_,{hsva:h,onChange:y}),(0,n.jsxs)(H,{direction:`horizontal`,gap:`m`,alignItems:`center`,children:[s&&(0,n.jsx)(`div`,{className:p.chromePreview,style:{backgroundColor:Zg(h)},"aria-label":`Selected color: ${C}`}),(0,n.jsxs)(H,{direction:`vertical`,gap:`xs`,style:O_,children:[(0,n.jsx)(m_,{hsva:h,onChange:y}),a&&(0,n.jsx)(g_,{hsva:h,onChange:y})]})]}),c&&(0,n.jsxs)(H,{direction:`horizontal`,gap:`xs`,alignItems:`flex-start`,children:[_===D_.HEXA&&(0,n.jsx)(S_,{label:`HEX`,value:a?w.replace(`#`,``):C.replace(`#`,``),onChange:b}),_===D_.RGBA&&(0,n.jsx)(C_,{hsva:h,onChange:y,showAlpha:a}),_===D_.HSLA&&(0,n.jsx)(w_,{hsva:h,onChange:y,showAlpha:a}),(0,n.jsxs)(H,{direction:`horizontal`,gap:`xs`,style:k_,children:[(0,n.jsx)(o.Button,{appearance:`subtle`,size:`small`,icon:(0,n.jsx)(`span`,{children:`⇅`}),onClick:x,"aria-label":`Toggle color format`,style:A_}),l&&`EyeDropper`in window&&(0,n.jsx)(o.Button,{appearance:`subtle`,size:`small`,icon:(0,n.jsx)(`span`,{children:`💧`}),onClick:S,"aria-label":`Pick color from screen`,style:A_})]})]})]})},N_=({color:e,onChange:r,disableAlpha:i=!1,className:a,style:s})=>{let c=Y(),l=e=>e?typeof e==`string`?J(e).hsva:e:{h:0,s:100,v:100,a:1},[u,d]=(0,t.useState)(()=>l(e));(0,t.useEffect)(()=>{e!==void 0&&d(l(e))},[e]);let f=(0,t.useCallback)(e=>{d(e.hsva),r?.(e)},[r]);return(0,n.jsxs)(H,{direction:`vertical`,gap:`m`,className:(0,o.mergeClasses)(c.colorfulContainer,a),style:s,children:[(0,n.jsx)(u_,{hsva:u,onChange:f}),(0,n.jsx)(m_,{hsva:u,onChange:f}),!i&&(0,n.jsx)(g_,{hsva:u,onChange:f})]})},P_=({color:e,left:t,top:r})=>(0,n.jsx)(`div`,{className:Y().pointer,style:{left:`${(t??0)*100}%`,top:`${(r??0)*100}%`,backgroundColor:e}}),F_=(e,t)=>{let n=t/2,r=n*(e.s/100),i=e.h*Math.PI/180;return{x:n+r*Math.cos(i),y:n+r*Math.sin(i)}},I_=(e,t,n)=>{let r=n/2,i=e-r,a=t-r,o=Math.atan2(a,i)*180/Math.PI;o<0&&(o+=360);let s=Math.min(Math.sqrt(i*i+a*a),r);return{h:o,s:s/r*100}},L_=({color:e,onChange:r,width:i=200,height:a,pointer:s=P_,className:c,style:l})=>{let u=Y(),d=a??i,p=(0,t.useRef)(null),m=e=>e?typeof e==`string`?J(e).hsva:e:{h:0,s:100,v:100,a:1},[h,g]=(0,t.useState)(()=>m(e));(0,t.useEffect)(()=>{e!==void 0&&g(m(e))},[e]);let _=(0,t.useCallback)(e=>{let{h:t,s:n}=I_(e.left*i,e.top*d,Math.min(i,d)),a=J({h:t,s:n,v:h.v,a:h.a});g(a.hsva),r?.(a)},[i,d,h.v,h.a,r]),v=F_(h,Math.min(i,d)),y=(0,t.useMemo)(()=>(0,f.css)({width:i,height:d,background:`conic-gradient(
171
+ </html>`}var Kp=({className:e,style:r})=>{let{editor:i,withTypographyStyles:a,variant:o,onContentChange:s,onFocus:c,onBlur:l,onCreate:u,onSelectionChange:d,fontFamily:p,bgColor:m,showTableColumnLines:h,showTableRowLines:g,onGetContentAsEmailHtml:_}=Pp(),v=Fp(o),y=t.useRef(s),b=t.useRef(c),x=t.useRef(l),C=t.useRef(u),w=t.useRef(d),T=t.useRef(_);return t.useEffect(()=>{y.current=s},[s]),t.useEffect(()=>{b.current=c},[c]),t.useEffect(()=>{x.current=l},[l]),t.useEffect(()=>{C.current=u},[u]),t.useEffect(()=>{w.current=d},[d]),t.useEffect(()=>{T.current=_},[_]),t.useEffect(()=>{if(!i)return;let e=()=>{y.current?.(i.getHTML(),i.getJSON()),T.current&&T.current(Gp(i.getHTML()))},t=({event:e})=>{b.current?.(e)},n=({event:e})=>{x.current?.(e)},r=()=>{C.current?.(),T.current&&T.current(Gp(i.getHTML()))},a=()=>{w.current?.()};return i.on(`update`,e),i.on(`focus`,t),i.on(`blur`,n),i.on(`create`,r),i.on(`selectionUpdate`,a),()=>{i.off(`update`,e),i.off(`focus`,t),i.off(`blur`,n),i.off(`create`,r),i.off(`selectionUpdate`,a)}},[i]),(0,n.jsx)(`div`,{className:(0,f.cx)(v.content,a&&v.typography,!h&&v.tableHideColumnLines,!g&&v.tableHideRowLines,e),style:{...r,...p?{fontFamily:p}:{},...m?{backgroundColor:m}:{}},children:(0,n.jsx)(S.EditorContent,{editor:i})})};Kp.displayName=`RichTextEditorContent`;var qp=({children:e,className:t,style:r})=>{let{variant:i}=Pp();return(0,n.jsx)(`div`,{className:(0,f.cx)(Fp(i).controlsGroup,t),style:r,role:`group`,children:e})};qp.displayName=`RichTextEditorControlsGroup`;var Jp=t.forwardRef((e,t)=>{let{interactive:r=!0,active:i,disabled:a,onClick:s,onMouseDown:c,children:l,className:u,style:d,...f}=e,{variant:p}=Pp(),m=Fp(p);return(0,n.jsx)(`button`,{ref:t,type:`button`,...f,className:(0,o.mergeClasses)(m.control,i&&m.controlActive,a&&m.controlDisabled,u),style:d,disabled:a,tabIndex:r?0:-1,"data-interactive":r||void 0,"data-disabled":a||void 0,"data-active":i||void 0,"aria-pressed":i&&r?!0:void 0,"aria-hidden":!r||void 0,onMouseDown:e=>{e.preventDefault(),c?.(e)},onClick:s,children:l})});Jp.displayName=`RichTextEditorControl`;var Yp=t.forwardRef(({icon:e,className:t,...r},i)=>{let{variant:a}=Pp(),o=Fp(a),s=a===`subtle`?`16px`:`20px`;return(0,n.jsx)(Jp,{ref:i,className:t,...r,children:(0,n.jsx)(`span`,{className:o.controlIcon,children:(0,n.jsx)(e,{style:{width:s,height:s}})})})});Yp.displayName=`RichTextEditorControlBase`;function K({label:e,isActive:t,operation:r,icon:i,isDisabled:a}){let o=o=>{let{editor:s,labels:c}=Pp(),l=c[e],u=typeof l==`function`?``:l;return(0,n.jsx)(Yp,{"aria-label":u,title:u,active:t?.name?s?.isActive(t.name,t.attributes):!1,icon:o.icon||i,disabled:a?.(s)||!1,...o,onClick:()=>s?.chain().focus()[r.name](r.attributes).run()})};return o.displayName=`RichTextEditorControl_${e}`,o}function q(e){return(0,n.jsx)(`svg`,{...e,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,strokeWidth:`1.5`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})}function Xp(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M7 5h6a3.5 3.5 0 0 1 0 7h-6z`}),(0,n.jsx)(`path`,{d:`M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7`})]})}function Zp(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M11 5l6 0`}),(0,n.jsx)(`path`,{d:`M7 19l6 0`}),(0,n.jsx)(`path`,{d:`M14 5l-4 14`})]})}function Qp(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M7 5v5a5 5 0 0 0 10 0v-5`}),(0,n.jsx)(`path`,{d:`M5 19h14`})]})}function $p(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M5 12l14 0`}),(0,n.jsx)(`path`,{d:`M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5`})]})}function em(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M17 15l4 4m0 -4l-4 4`}),(0,n.jsx)(`path`,{d:`M7 6v-1h11v1`}),(0,n.jsx)(`path`,{d:`M7 19l4 0`}),(0,n.jsx)(`path`,{d:`M13 5l-4 14`})]})}function tm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M19 18v-8l-2 2`}),(0,n.jsx)(`path`,{d:`M4 6v12`}),(0,n.jsx)(`path`,{d:`M12 6v12`}),(0,n.jsx)(`path`,{d:`M11 18h2`}),(0,n.jsx)(`path`,{d:`M3 18h2`}),(0,n.jsx)(`path`,{d:`M4 12h8`}),(0,n.jsx)(`path`,{d:`M3 6h2`}),(0,n.jsx)(`path`,{d:`M11 6h2`})]})}function nm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0`}),(0,n.jsx)(`path`,{d:`M4 6v12`}),(0,n.jsx)(`path`,{d:`M12 6v12`}),(0,n.jsx)(`path`,{d:`M11 18h2`}),(0,n.jsx)(`path`,{d:`M3 18h2`}),(0,n.jsx)(`path`,{d:`M4 12h8`}),(0,n.jsx)(`path`,{d:`M3 6h2`}),(0,n.jsx)(`path`,{d:`M11 6h2`})]})}function rm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M19 14a2 2 0 1 0 -2 -2`}),(0,n.jsx)(`path`,{d:`M17 16a2 2 0 1 0 2 -2`}),(0,n.jsx)(`path`,{d:`M4 6v12`}),(0,n.jsx)(`path`,{d:`M12 6v12`}),(0,n.jsx)(`path`,{d:`M11 18h2`}),(0,n.jsx)(`path`,{d:`M3 18h2`}),(0,n.jsx)(`path`,{d:`M4 12h8`}),(0,n.jsx)(`path`,{d:`M3 6h2`}),(0,n.jsx)(`path`,{d:`M11 6h2`})]})}function im(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M20 18v-8l-4 6h5`}),(0,n.jsx)(`path`,{d:`M4 6v12`}),(0,n.jsx)(`path`,{d:`M12 6v12`}),(0,n.jsx)(`path`,{d:`M11 18h2`}),(0,n.jsx)(`path`,{d:`M3 18h2`}),(0,n.jsx)(`path`,{d:`M4 12h8`}),(0,n.jsx)(`path`,{d:`M3 6h2`}),(0,n.jsx)(`path`,{d:`M11 6h2`})]})}function am(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M17 18h2a2 2 0 1 0 0 -4h-2v-4h4`}),(0,n.jsx)(`path`,{d:`M4 6v12`}),(0,n.jsx)(`path`,{d:`M12 6v12`}),(0,n.jsx)(`path`,{d:`M11 18h2`}),(0,n.jsx)(`path`,{d:`M3 18h2`}),(0,n.jsx)(`path`,{d:`M4 12h8`}),(0,n.jsx)(`path`,{d:`M3 6h2`}),(0,n.jsx)(`path`,{d:`M11 6h2`})]})}function om(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z`}),(0,n.jsx)(`path`,{d:`M21 12a2 2 0 1 0 -4 0v4`}),(0,n.jsx)(`path`,{d:`M4 6v12`}),(0,n.jsx)(`path`,{d:`M12 6v12`}),(0,n.jsx)(`path`,{d:`M11 18h2`}),(0,n.jsx)(`path`,{d:`M3 18h2`}),(0,n.jsx)(`path`,{d:`M4 12h8`}),(0,n.jsx)(`path`,{d:`M3 6h2`}),(0,n.jsx)(`path`,{d:`M11 6h2`})]})}function sm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M9 6l11 0`}),(0,n.jsx)(`path`,{d:`M9 12l11 0`}),(0,n.jsx)(`path`,{d:`M9 18l11 0`}),(0,n.jsx)(`path`,{d:`M5 6l0 .01`}),(0,n.jsx)(`path`,{d:`M5 12l0 .01`}),(0,n.jsx)(`path`,{d:`M5 18l0 .01`})]})}function cm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M11 6h9`}),(0,n.jsx)(`path`,{d:`M11 12h9`}),(0,n.jsx)(`path`,{d:`M12 18h8`}),(0,n.jsx)(`path`,{d:`M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4`}),(0,n.jsx)(`path`,{d:`M6 10v-6l-2 2`})]})}function lm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M17 22v-2`}),(0,n.jsx)(`path`,{d:`M9 15l6 -6`}),(0,n.jsx)(`path`,{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`}),(0,n.jsx)(`path`,{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`}),(0,n.jsx)(`path`,{d:`M20 17h2`}),(0,n.jsx)(`path`,{d:`M2 7h2`}),(0,n.jsx)(`path`,{d:`M7 2v2`})]})}function um(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M6 15h15`}),(0,n.jsx)(`path`,{d:`M21 19h-15`}),(0,n.jsx)(`path`,{d:`M15 11h6`}),(0,n.jsx)(`path`,{d:`M21 7h-6`}),(0,n.jsx)(`path`,{d:`M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2`}),(0,n.jsx)(`path`,{d:`M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2`})]})}function dm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 6l16 0`}),(0,n.jsx)(`path`,{d:`M4 12l10 0`}),(0,n.jsx)(`path`,{d:`M4 18l14 0`})]})}function fm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 6l16 0`}),(0,n.jsx)(`path`,{d:`M10 12l10 0`}),(0,n.jsx)(`path`,{d:`M6 18l14 0`})]})}function pm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 6l16 0`}),(0,n.jsx)(`path`,{d:`M8 12l8 0`}),(0,n.jsx)(`path`,{d:`M6 18l12 0`})]})}function mm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 6l16 0`}),(0,n.jsx)(`path`,{d:`M4 12l16 0`}),(0,n.jsx)(`path`,{d:`M4 18l12 0`})]})}function hm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M5 7l8 10m-8 0l8 -10`}),(0,n.jsx)(`path`,{d:`M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2`})]})}function gm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M5 7l8 10m-8 0l8 -10`}),(0,n.jsx)(`path`,{d:`M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2`})]})}function _m(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M7 8l-4 4l4 4`}),(0,n.jsx)(`path`,{d:`M17 8l4 4l-4 4`}),(0,n.jsx)(`path`,{d:`M14 4l-4 16`})]})}function vm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4`}),(0,n.jsx)(`path`,{d:`M12.5 5.5l4 4`}),(0,n.jsx)(`path`,{d:`M4.5 13.5l4 4`}),(0,n.jsx)(`path`,{d:`M21 15v4h-8l4 -4z`})]})}function ym(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M5 12h2`}),(0,n.jsx)(`path`,{d:`M17 12h2`}),(0,n.jsx)(`path`,{d:`M11 12h2`})]})}function bm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73`}),(0,n.jsx)(`path`,{d:`M3 3l18 18`})]})}function xm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M11 7l6 6`}),(0,n.jsx)(`path`,{d:`M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z`})]})}function Sm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M18 6l-12 12`}),(0,n.jsx)(`path`,{d:`M6 6l12 12`})]})}function Cm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25`}),(0,n.jsx)(`path`,{d:`M8.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}),(0,n.jsx)(`path`,{d:`M12.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}),(0,n.jsx)(`path`,{d:`M16.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`})]})}function wm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M5 12l5 5l10 -10`})]})}function Tm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M9 15l6 -6`}),(0,n.jsx)(`path`,{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`}),(0,n.jsx)(`path`,{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`})]})}function Em(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6`}),(0,n.jsx)(`path`,{d:`M11 13l9 -9`}),(0,n.jsx)(`path`,{d:`M15 4h5v5`})]})}function Dm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M9 14l-4 -4l4 -4`}),(0,n.jsx)(`path`,{d:`M5 10h11a4 4 0 1 1 0 8h-1`})]})}function Om(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M15 14l4 -4l-4 -4`}),(0,n.jsx)(`path`,{d:`M19 10h-11a4 4 0 1 0 0 8h1`})]})}function km(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M3.5 5.5l1.5 1.5l2.5 -2.5`}),(0,n.jsx)(`path`,{d:`M3.5 11.5l1.5 1.5l2.5 -2.5`}),(0,n.jsx)(`path`,{d:`M3.5 17.5l1.5 1.5l2.5 -2.5`}),(0,n.jsx)(`path`,{d:`M11 6l9 0`}),(0,n.jsx)(`path`,{d:`M11 12l9 0`}),(0,n.jsx)(`path`,{d:`M11 18l9 0`})]})}function Am(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M20 6l-11 0`}),(0,n.jsx)(`path`,{d:`M20 12l-7 0`}),(0,n.jsx)(`path`,{d:`M20 18l-11 0`}),(0,n.jsx)(`path`,{d:`M4 8l4 4l-4 4`})]})}function jm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M20 6l-7 0`}),(0,n.jsx)(`path`,{d:`M20 12l-9 0`}),(0,n.jsx)(`path`,{d:`M20 18l-7 0`}),(0,n.jsx)(`path`,{d:`M8 8l-4 4l4 4`})]})}function Mm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`circle`,{cx:`9`,cy:`5`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,n.jsx)(`circle`,{cx:`9`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,n.jsx)(`circle`,{cx:`9`,cy:`19`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,n.jsx)(`circle`,{cx:`15`,cy:`5`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,n.jsx)(`circle`,{cx:`15`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,n.jsx)(`circle`,{cx:`15`,cy:`19`,r:`1`,fill:`currentColor`,stroke:`none`})]})}function Nm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z`}),(0,n.jsx)(`path`,{d:`M3 10h18`}),(0,n.jsx)(`path`,{d:`M10 3v18`})]})}function Pm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M3 3l18 18`}),(0,n.jsx)(`path`,{d:`M9 3h10a2 2 0 0 1 2 2v10`}),(0,n.jsx)(`path`,{d:`M3 9v10a2 2 0 0 0 2 2h10`}),(0,n.jsx)(`path`,{d:`M3 10h6`}),(0,n.jsx)(`path`,{d:`M10 3v6`})]})}function Fm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M14 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1z`}),(0,n.jsx)(`path`,{d:`M5 12l4 0`}),(0,n.jsx)(`path`,{d:`M7 10l0 4`})]})}function Im(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1z`}),(0,n.jsx)(`path`,{d:`M15 12l4 0`}),(0,n.jsx)(`path`,{d:`M17 10l0 4`})]})}function Lm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M7 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1z`}),(0,n.jsx)(`path`,{d:`M14 10l4 4`}),(0,n.jsx)(`path`,{d:`M14 14l4 -4`})]})}function Rm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 18v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1z`}),(0,n.jsx)(`path`,{d:`M12 5l0 4`}),(0,n.jsx)(`path`,{d:`M10 7l4 0`})]})}function zm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 6v4a1 1 0 0 0 1 1h14a1 1 0 0 0 1 -1v-4a1 1 0 0 0 -1 -1h-14a1 1 0 0 0 -1 1z`}),(0,n.jsx)(`path`,{d:`M12 19l0 -4`}),(0,n.jsx)(`path`,{d:`M10 17l4 0`})]})}function Bm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 7v4a1 1 0 0 0 1 1h14a1 1 0 0 0 1 -1v-4a1 1 0 0 0 -1 -1h-14a1 1 0 0 0 -1 1z`}),(0,n.jsx)(`path`,{d:`M14 16l4 4`}),(0,n.jsx)(`path`,{d:`M14 20l4 -4`})]})}function Vm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z`}),(0,n.jsx)(`path`,{d:`M10 3v18`}),(0,n.jsx)(`path`,{d:`M3 9h7`}),(0,n.jsx)(`path`,{d:`M3 15h7`})]})}function Hm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z`}),(0,n.jsx)(`path`,{d:`M9 3v18`}),(0,n.jsx)(`path`,{d:`M15 3v18`})]})}function Um(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z`}),(0,n.jsx)(`path`,{d:`M3 9h18`}),(0,n.jsx)(`path`,{d:`M3 15h18`})]})}function Wm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M19 3v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V7.914a1 1 0 0 1 .293-.707l3.914-3.914A1 1 0 0 1 9.914 3H18a1 1 0 0 1 1 1Z`}),(0,n.jsx)(`path`,{d:`M10 11l-2 2 2 2`}),(0,n.jsx)(`path`,{d:`M14 11l2 2-2 2`})]})}function Gm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M4 20l3 0`}),(0,n.jsx)(`path`,{d:`M14 20l7 0`}),(0,n.jsx)(`path`,{d:`M6.9 15l6.9 0`}),(0,n.jsx)(`path`,{d:`M10.2 6.3l5.8 13.7`}),(0,n.jsx)(`path`,{d:`M5 20l6 -16l2 0l7 16`})]})}function Km(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M15 8h.01`}),(0,n.jsx)(`path`,{d:`M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z`}),(0,n.jsx)(`path`,{d:`M3 16l5 -5c.928 -.893 2.072 -.893 3 0l4 4`}),(0,n.jsx)(`path`,{d:`M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3`})]})}function qm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M19 11v-7l-7 7v4h4l3 3l3 -3z`}),(0,n.jsx)(`path`,{d:`M5 17a2 2 0 1 0 4 0c0 -1.598 -2 -3.5 -2 -3.5s-2 1.902 -2 3.5z`}),(0,n.jsx)(`path`,{d:`M10 11l-6.5 -6.5`})]})}function Jm(e){return(0,n.jsxs)(q,{...e,children:[(0,n.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,n.jsx)(`path`,{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}),(0,n.jsx)(`path`,{d:`M9 10l.01 0`}),(0,n.jsx)(`path`,{d:`M15 10l.01 0`}),(0,n.jsx)(`path`,{d:`M9.5 15a3.5 3.5 0 0 0 5 0`})]})}var Ym=({disableTooltips:e=!1,initialExternal:r=!1,className:i,style:a,...s})=>{let{editor:c,labels:l,variant:u}=Pp(),d=Fp(u),[p,m]=t.useState(``),[h,g]=t.useState(r),[_,v]=t.useState(!1),y=t.useCallback(()=>{v(!0);let e=c?.getAttributes(`link`);m(e?.href||``),g(typeof e?.target==`string`?e.target===`_blank`:r)},[c,r]),b=t.useCallback(()=>{v(!1),m(``),g(r)},[r]),x=t.useCallback(()=>{b(),(c?.chain().focus().extendMarkRange(`link`)).setLink({href:p,target:h?`_blank`:null}).run()},[c,p,h,b]),S=t.useCallback(e=>{e.key===`Enter`&&(e.preventDefault(),x())},[x]);return t.useEffect(()=>{let e=()=>y();return window.addEventListener(`edit-link`,e),()=>window.removeEventListener(`edit-link`,e)},[y]),(0,n.jsxs)(o.Popover,{open:_,onOpenChange:(e,t)=>{t.open||b()},positioning:`below`,trapFocus:!0,children:[(0,n.jsx)(o.PopoverTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(Yp,{icon:e=>(0,n.jsx)(Tm,{...e}),"aria-label":l.linkControlLabel,title:l.linkControlLabel,active:c?.isActive(`link`),onClick:y,className:i,style:a,...s})}),(0,n.jsx)(o.PopoverSurface,{className:d.linkEditorDropdown,children:(0,n.jsxs)(`div`,{className:d.linkEditor,children:[(0,n.jsx)(o.Input,{placeholder:l.linkEditorInputPlaceholder,"aria-label":l.linkEditorInputLabel,type:`url`,value:p,onChange:(e,t)=>m(t.value),onKeyDown:S,className:d.linkEditorInput,size:`small`}),e?(0,n.jsx)(o.Button,{appearance:`subtle`,size:`small`,className:(0,f.cx)(d.linkEditorExternalControl,h&&d.linkEditorExternalControlActive),onClick:()=>g(e=>!e),"aria-label":h?l.linkEditorExternalLink:l.linkEditorInternalLink,icon:(0,n.jsx)(Em,{style:{width:14,height:14}})}):(0,n.jsx)(o.Tooltip,{content:h?l.linkEditorExternalLink:l.linkEditorInternalLink,relationship:`label`,children:(0,n.jsx)(o.Button,{appearance:`subtle`,size:`small`,className:(0,f.cx)(d.linkEditorExternalControl,h&&d.linkEditorExternalControlActive),onClick:()=>g(e=>!e),icon:(0,n.jsx)(Em,{style:{width:14,height:14}})})}),(0,n.jsx)(o.Button,{size:`small`,appearance:`primary`,className:d.linkEditorSave,onClick:x,children:l.linkEditorSave})]})})]})};Ym.displayName=`RichTextEditorLinkControl`;var Xm=({color:e,className:t,style:r})=>{let{editor:i,labels:a,variant:o}=Pp(),s=Fp(o),c=typeof a.colorControlLabel==`function`?a.colorControlLabel(e):`${a.colorControlLabel} ${e}`;return(0,n.jsx)(`button`,{type:`button`,className:(0,f.cx)(s.control,t),style:r,"aria-label":c,title:c,onClick:()=>(i?.chain().focus()).setColor(e).run(),children:(0,n.jsx)(`span`,{className:s.colorSwatch,style:{backgroundColor:e}})})};Xm.displayName=`RichTextEditorColorControl`;var Zm=({colors:e,className:r,style:i})=>{let{editor:a,labels:s,variant:c}=Pp(),l=Fp(c),[u,d]=t.useState(!1),[f,p]=t.useState(`palette`),[m,h]=t.useState(``),g=t.useRef(null),_=t.useCallback(()=>{d(!1)},[]),v=t.useCallback(()=>{(a?.chain().focus()).setColor(m).run(),_()},[a,m,_]),y=t.useCallback(()=>{(a?.chain().focus()).unsetColor().run(),_()},[a,_]),b=t.useCallback(e=>{(a?.chain().focus()).setColor(e).run(),_()},[a,_]);return(0,n.jsxs)(o.Popover,{open:u,onOpenChange:(e,t)=>{t.open?(d(!0),p(`palette`),h(``)):_()},positioning:`below`,trapFocus:!0,children:[(0,n.jsx)(o.PopoverTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(Yp,{icon:e=>(0,n.jsx)(xm,{...e}),"aria-label":s.colorPickerControlLabel,title:s.colorPickerControlLabel,className:r,style:i})}),(0,n.jsxs)(o.PopoverSurface,{className:l.linkEditorDropdown,children:[(0,n.jsx)(`span`,{tabIndex:0,"aria-hidden":`true`,style:{width:0,height:0,overflow:`hidden`,display:`block`,position:`absolute`}}),f===`palette`?(0,n.jsx)(`div`,{className:l.colorSwatchGrid,children:e.map(e=>{let t=typeof s.colorPickerColorLabel==`function`?s.colorPickerColorLabel(e):`${s.colorPickerColorLabel} ${e}`;return(0,n.jsx)(`button`,{type:`button`,className:l.colorSwatch,style:{backgroundColor:e},"aria-label":t,title:t,onClick:()=>b(e)},e)})}):(0,n.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:8},children:(0,n.jsx)(`input`,{ref:g,type:`color`,value:m||`#000000`,onChange:e=>h(e.target.value),style:{width:200,height:40,border:`none`,cursor:`pointer`},"aria-label":s.colorPickerColorPicker})}),(0,n.jsxs)(`div`,{className:l.colorPickerActions,children:[(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:(0,n.jsx)(Sm,{style:{width:14,height:14}}),onClick:_,title:s.colorPickerCancel,"aria-label":s.colorPickerCancel}),(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:(0,n.jsx)(bm,{style:{width:14,height:14}}),onClick:y,title:s.colorPickerClear,"aria-label":s.colorPickerClear}),(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:f===`palette`?(0,n.jsx)(xm,{style:{width:14,height:14}}):(0,n.jsx)(Cm,{style:{width:14,height:14}}),onClick:()=>p(e=>e===`palette`?`colorPicker`:`palette`),title:f===`palette`?s.colorPickerColorPicker:s.colorPickerPalette,"aria-label":f===`palette`?s.colorPickerColorPicker:s.colorPickerPalette}),f===`colorPicker`&&(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:(0,n.jsx)(wm,{style:{width:14,height:14}}),onClick:v,title:s.colorPickerSave,"aria-label":s.colorPickerSave})]})]})]})};Zm.displayName=`RichTextEditorColorPickerControl`;var Qm=({className:e,style:r})=>{let{labels:i,editor:a}=Pp(),o=t.useCallback(()=>{if(!a)return;let e=a.getHTML(),t=a.storage;t?.sourceCode?.active?(a.commands.setContent(a.getText()),t.sourceCode={active:!1}):(a.commands.setContent(`<pre><code>${e}</code></pre>`),t.sourceCode={active:!0})},[a]);return(0,n.jsx)(Yp,{icon:e=>(0,n.jsx)(Wm,{...e}),"aria-label":i.sourceCodeControlLabel,title:i.sourceCodeControlLabel,onClick:o,className:e,style:r})};Qm.displayName=`RichTextEditorSourceCodeControl`;var $m=[`Arial`,`Verdana`,`Tahoma`,`Trebuchet MS`,`Georgia`,`Times New Roman`,`Courier New`,`Segoe UI`],eh=({fontFamilies:e,className:r,style:i})=>{let{editor:a,labels:s,variant:c,fontFamilies:l}=Pp(),u=Fp(c),[d,p]=t.useState(!1),m=e??l??$m,h=t.useMemo(()=>{let e=new Set;return m.filter(t=>{let n=t.toLowerCase();return e.has(n)?!1:(e.add(n),!0)})},[m]),g=a?.getAttributes(`textStyle`)?.fontFamily,_=t.useCallback(e=>{(a?.chain().focus()).setFontFamily(e).run(),p(!1)},[a]),v=t.useCallback(()=>{(a?.chain().focus()).unsetFontFamily().run(),p(!1)},[a]);return(0,n.jsxs)(o.Popover,{open:d,onOpenChange:(e,t)=>p(t.open),positioning:`below`,trapFocus:!0,children:[(0,n.jsx)(o.PopoverTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(Yp,{icon:e=>(0,n.jsx)(Gm,{...e}),"aria-label":s.fontFamilyControlLabel,title:s.fontFamilyControlLabel,className:r,style:i})}),(0,n.jsx)(o.PopoverSurface,{className:u.linkEditorDropdown,children:(0,n.jsxs)(`div`,{className:u.fontFamilyList,role:`menu`,"aria-label":s.fontFamilyControlLabel,children:[(0,n.jsx)(`button`,{type:`button`,role:`menuitem`,className:(0,f.cx)(u.fontFamilyItem,!g&&u.fontFamilyItemActive),onClick:v,children:`Default`}),h.map(e=>{let t=e.split(`,`)[0].replace(/['"]/g,``).trim(),r=g===e;return(0,n.jsx)(`button`,{type:`button`,role:`menuitem`,className:(0,f.cx)(u.fontFamilyItem,r&&u.fontFamilyItemActive),style:{fontFamily:e},onClick:()=>_(e),children:t},e)})]})})]})};eh.displayName=`RichTextEditorFontFamilyControl`;var th=e=>{let{editor:r,labels:i,onImageUpload:a}=Pp(),o=t.useRef(null),s=t.useCallback(e=>{(r?.commands).setImage({src:e})},[r]),c=t.useCallback(()=>{o.current?.click()},[]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`input`,{ref:o,type:`file`,accept:`image/*`,style:{display:`none`},onChange:t.useCallback(e=>{let t=e.target.files?.[0];if(t){if(a)a(t,s);else{let e=new FileReader;e.onload=()=>{typeof e.result==`string`&&s(e.result)},e.readAsDataURL(t)}e.target.value=``}},[a,s]),"aria-hidden":`true`,tabIndex:-1}),(0,n.jsx)(Yp,{...e,icon:Km,"aria-label":e[`aria-label`]??i.imageUploadControlLabel,title:e.title??i.imageUploadControlLabel,onClick:c})]})};th.displayName=`RichTextEditorImageUploadControl`;var nh=({className:e,style:r})=>{let{labels:i,variant:a,bgColor:s,setBgColor:c,bgColorPickerColors:l}=Pp(),u=Fp(a),[d,f]=t.useState(!1),[p,m]=t.useState(`palette`),[h,g]=t.useState(``),_=t.useCallback(()=>{f(!1)},[]),v=t.useCallback(()=>{c(h),_()},[c,h,_]),y=t.useCallback(()=>{c(``),_()},[c,_]),b=t.useCallback(e=>{c(e),_()},[c,_]);return(0,n.jsxs)(o.Popover,{open:d,onOpenChange:(e,t)=>{t.open?(f(!0),m(`palette`),g(s||``)):_()},positioning:`below`,trapFocus:!0,children:[(0,n.jsx)(o.PopoverTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(Yp,{icon:t.useMemo(()=>e=>(0,n.jsxs)(`span`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:2},children:[(0,n.jsx)(qm,{...e}),(0,n.jsx)(`span`,{style:{display:`block`,width:14,height:3,backgroundColor:s||`transparent`,borderRadius:1,border:`1px solid rgba(0,0,0,0.25)`}})]}),[s]),"aria-label":i.bgColorPickerControlLabel,title:i.bgColorPickerControlLabel,className:e,style:r})}),(0,n.jsxs)(o.PopoverSurface,{className:u.linkEditorDropdown,children:[(0,n.jsx)(`span`,{tabIndex:0,"aria-hidden":`true`,style:{width:0,height:0,overflow:`hidden`,display:`block`,position:`absolute`}}),p===`palette`?(0,n.jsx)(`div`,{className:u.colorSwatchGrid,children:l.map(e=>{let t=typeof i.bgColorPickerColorLabel==`function`?i.bgColorPickerColorLabel(e):`${i.bgColorPickerColorLabel} ${e}`;return(0,n.jsx)(`button`,{type:`button`,className:u.colorSwatch,style:{backgroundColor:e},"aria-label":t,title:t,onClick:()=>b(e)},e)})}):(0,n.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:8},children:(0,n.jsx)(`input`,{type:`color`,value:h||`#ffffff`,onChange:e=>g(e.target.value),style:{width:200,height:40,border:`none`,cursor:`pointer`},"aria-label":i.colorPickerColorPicker})}),(0,n.jsxs)(`div`,{className:u.colorPickerActions,children:[(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:(0,n.jsx)(Sm,{style:{width:14,height:14}}),onClick:_,title:i.colorPickerCancel,"aria-label":i.colorPickerCancel}),(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:(0,n.jsx)(bm,{style:{width:14,height:14}}),onClick:y,title:i.colorPickerClear,"aria-label":i.colorPickerClear}),(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:p===`palette`?(0,n.jsx)(xm,{style:{width:14,height:14}}):(0,n.jsx)(Cm,{style:{width:14,height:14}}),onClick:()=>m(e=>e===`palette`?`colorPicker`:`palette`),title:p===`palette`?i.colorPickerColorPicker:i.colorPickerPalette,"aria-label":p===`palette`?i.colorPickerColorPicker:i.colorPickerPalette}),p===`colorPicker`&&(0,n.jsx)(o.Button,{size:`small`,appearance:`subtle`,icon:(0,n.jsx)(wm,{style:{width:14,height:14}}),onClick:v,title:i.colorPickerSave,"aria-label":i.colorPickerSave})]})]})]})};nh.displayName=`RichTextEditorBgColorPickerControl`;var rh=({nested:e=!1,onNodeChange:t,className:r,style:i})=>{let{editor:a,variant:o}=Pp(),s=Fp(o),c=o===`subtle`?`14px`:`16px`;return a?(0,n.jsx)(R.DragHandle,{editor:a,nested:e,onNodeChange:t,children:(0,n.jsx)(`div`,{className:(0,f.cx)(s.dragHandle,r),style:i,children:(0,n.jsx)(Mm,{style:{width:c,height:c}})})}):null};rh.displayName=`RichTextEditorDragHandle`;var ih=[`Default`,`Light`,`MediumLight`,`Medium`,`MediumDark`,`Dark`],ah={Default:`#FFCD41`,Light:`#FDDBB4`,MediumLight:`#E8B98C`,Medium:`#C68642`,MediumDark:`#8D5524`,Dark:`#4A2912`},oh=[{group:`Smileys & Emotion`,label:`😀`},{group:`People & Body`,label:`👋`},{group:`Animals & Nature`,label:`🐶`},{group:`Food & Drink`,label:`🍎`},{group:`Activities`,label:`⚽`},{group:`Travel & Places`,label:`🚗`},{group:`Objects`,label:`💡`},{group:`Symbols`,label:`❤️`},{group:`Flags`,label:`🏁`}],sh=oh.map(e=>e.group);function ch(e){return e.split(` `).map(e=>String.fromCodePoint(parseInt(e,16))).join(``)}var lh=Object.values(nu).sort((e,t)=>e.sortOrder-t.sortOrder),uh=new Map;for(let e of lh){let t=[e.cldr,e.tts,...e.keywords??[]].filter(Boolean).join(` `).toLowerCase();if(t&&(uh.set(e.glyph,t),e.unicodeSkintones?.length))for(let n of e.unicodeSkintones)uh.set(ch(n),t)}function dh(e=`Default`){let t=ih.indexOf(e),n={};for(let e of lh){let{group:r}=e;if(oh.some(e=>e.group===r))if(n[r]||(n[r]=[]),e.isSkintoneBased&&e.unicodeSkintones){let i=e.unicodeSkintones[t]??e.unicodeSkintones[0];n[r].push(ch(i))}else n[r].push(e.glyph)}return oh.filter(({group:e})=>n[e]).map(({group:e,label:t})=>({label:t,emojis:n[e]}))}function fh(e,t){let n=t.trim().toLowerCase();if(!n)return!0;let r=uh.get(e);return r?r.includes(n):e.includes(t.trim())}dh();var ph=({popoverWidth:e,maxGridHeight:n})=>t.useMemo(()=>({popover:(0,f.css)({padding:0,width:e,overflow:`hidden`,borderRadius:o.tokens.borderRadiusMedium}),header:(0,f.css)({display:`flex`,flexWrap:`wrap`,gap:`2px`,padding:`${o.tokens.spacingVerticalS} ${o.tokens.spacingHorizontalS}`,borderBottom:`1px solid ${o.tokens.colorNeutralStroke2}`}),searchWrapper:(0,f.css)({padding:`${o.tokens.spacingVerticalS} ${o.tokens.spacingHorizontalS}`,"& > *":{width:`100% !important`}}),grid:(0,f.css)({display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(32px, 1fr))`,gap:`2px`,padding:`${o.tokens.spacingVerticalXS} ${o.tokens.spacingHorizontalS}`,maxHeight:n,overflowY:`auto`,scrollbarWidth:`thin`,scrollbarColor:`${o.tokens.colorBrandBackground} transparent`,"&::-webkit-scrollbar":{width:3},"&::-webkit-scrollbar-track":{background:`transparent`},"&::-webkit-scrollbar-thumb":{background:o.tokens.colorBrandBackground,borderRadius:o.tokens.borderRadiusCircular},"&::-webkit-scrollbar-thumb:hover":{background:o.tokens.colorBrandBackgroundHover}}),empty:(0,f.css)({width:`100%`,textAlign:`center`,padding:`${o.tokens.spacingVerticalM} 0`,fontSize:o.tokens.fontSizeBase200,color:o.tokens.colorNeutralForeground3,columnSpan:`all`}),skinToneRow:(0,f.css)({display:`flex`,alignItems:`center`,gap:`6px`,padding:`${o.tokens.spacingVerticalXS} ${o.tokens.spacingHorizontalS} ${o.tokens.spacingVerticalS}`,borderTop:`1px solid ${o.tokens.colorNeutralStroke2}`}),skinToneButton:(0,f.css)({transition:`transform 0.1s, outline-color 0.1s`,cursor:`pointer`,"&:hover":{transform:`scale(1.15)`},"&:focus-visible":{outline:`2px solid ${o.tokens.colorBrandForeground1}`,outlineOffset:2}}),skinToneButtonSelected:(0,f.css)({borderBottom:`2px solid ${o.tokens.colorBrandForeground1}`}),skinToneButtonUnselected:(0,f.css)({borderBottom:`2px solid transparent`})}),[e,n]),mh={Default:`Default`,Light:`Light`,MediumLight:`Medium-Light`,Medium:`Medium`,MediumDark:`Medium-Dark`,Dark:`Dark`},hh=(0,f.css)({background:`none`,border:`none`,padding:2,margin:0,borderRadius:o.tokens.borderRadiusCircular,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`transform 0.12s`,"&:hover":{transform:`scale(1.2)`},"&:focus-visible":{outline:`2px solid ${o.tokens.colorBrandForeground1}`,outlineOffset:2}}),gh=(0,f.css)({borderBottom:`2px solid transparent`}),_h=(0,f.css)({borderBottom:`2px solid ${o.tokens.colorBrandForeground1}`}),vh=t.memo(function({value:e,onChange:t}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Divider,{style:{marginTop:15,marginBottom:5}}),(0,n.jsx)(Cd,{fontSize:`small`,fontWeight:`semibold`,children:`Skin Tone`}),(0,n.jsx)(H,{direction:`horizontal`,gap:`m`,padding:`m`,justifyContent:`center`,children:ih.map(r=>(0,n.jsx)(o.Tooltip,{content:mh[r],relationship:`label`,children:(0,n.jsx)(`div`,{role:`radio`,"aria-checked":e===r,tabIndex:0,className:e===r?_h:gh,children:(0,n.jsx)(o.Badge,{shape:`circular`,size:`large`,role:`radio`,"aria-checked":e===r,tabIndex:0,className:`${hh} `,style:{backgroundColor:ah[r],color:ah[r],outlineColor:e===r?o.tokens.colorBrandForeground1:`transparent`},onClick:()=>t(r)})})},r))})]})});vh.displayName=`SkinToneSelector`;var yh=300,bh=200,xh=50,Sh=t.memo(function({onEmojiSelect:e,trigger:r,open:i,onOpenChange:a,positioning:s=`below-start`,popoverWidth:c=yh,maxGridHeight:l=bh,searchPlaceholder:u=`Search emoji…`,defaultSkinTone:d=`Default`,onSkinToneChange:f,className:p,style:m}){let[h,g]=t.useState(!1),[_,v]=t.useState(0),[y,b]=t.useState(``),[x,S]=t.useState(d),C=t.useRef(null),w=i!==void 0,T=i??h,E=t.useMemo(()=>dh(x),[x]),D=t.useMemo(()=>{let e=y.trim();return e?E.flatMap(e=>e.emojis).filter(t=>fh(t,e)):E[_]?.emojis??[]},[_,y,E]),O=ph({popoverWidth:c,maxGridHeight:l}),k=t.useCallback(e=>{w||g(e),a?.(e),e&&(b(``),v(0),setTimeout(()=>{C.current?.querySelector(`input`)?.focus()},xh))},[w,a]),A=t.useCallback(t=>{e(t),k(!1)},[e,k]),j=t.useCallback(e=>{v(e),b(``)},[]),M=t.useCallback(e=>{S(e),f?.(e)},[f]),N=p?`${O.popover} ${p}`:O.popover;return(0,n.jsxs)(o.Popover,{open:T,onOpenChange:(e,t)=>k(t.open),positioning:s,trapFocus:!0,children:[(0,n.jsx)(o.PopoverTrigger,{disableButtonEnhancement:!0,children:r}),(0,n.jsxs)(o.PopoverSurface,{className:N,style:m,children:[(0,n.jsx)(H,{direction:`horizontal`,gap:`2px`,padding:`${o.tokens.spacingVerticalM} ${o.tokens.spacingHorizontalM}`,"aria-label":`Emoji categories`,justifyContent:`center`,wrap:!0,style:{backgroundColor:o.tokens.colorNeutralBackground3},children:E.map((e,t)=>(0,n.jsx)(o.ToggleButton,{appearance:`subtle`,size:`small`,checked:!y&&_===t,role:`tab`,"aria-selected":!y&&_===t,"aria-label":sh[t],title:sh[t],style:{fontSize:`16px`,minWidth:0,padding:`3px 5px`},onClick:()=>j(t),children:e.label},t))}),(0,n.jsx)(`div`,{ref:C,className:O.searchWrapper,children:(0,n.jsx)($f,{value:y,onChange:e=>b(e),placeholder:u,size:`small`,width:`100%`})}),(0,n.jsx)(`div`,{className:O.grid,role:`listbox`,"aria-label":`Emoji list`,children:D.length>0?D.map((e,t)=>(0,n.jsx)(o.Button,{appearance:`subtle`,size:`small`,role:`option`,"aria-selected":!1,"aria-label":e,title:e,style:{fontSize:`20px`,minWidth:0,width:34,height:34,padding:0},onClick:()=>A(e),children:e},`${e}-${t}`)):(0,n.jsx)(`div`,{className:O.empty,children:`No results`})}),(0,n.jsx)(vh,{value:x,onChange:M})]})]})});Sh.displayName=`EmojiPicker`;var Ch=t.memo(function(e){let{editor:r,labels:i}=Pp(),a=t.useCallback(e=>{r?.commands.insertContent(e)},[r]);return(0,n.jsx)(Sh,{trigger:(0,n.jsx)(Yp,{...e,icon:Jm,"aria-label":e[`aria-label`]??i.emojiPickerControlLabel,title:e.title??i.emojiPickerControlLabel}),onEmojiSelect:a})});Ch.displayName=`RichTextEditorEmojiPickerControl`;var wh=({children:e})=>{let{editor:t}=Pp();return(0,S.useEditorState)({editor:t,selector:e=>e.editor?.isActive(`table`)??!1})?(0,n.jsx)(n.Fragment,{children:e}):null};wh.displayName=`RichTextEditorTableControls`;var Th=K({label:`boldControlLabel`,icon:e=>(0,n.jsx)(Xp,{...e}),isActive:{name:`bold`},operation:{name:`toggleBold`}}),Eh=K({label:`italicControlLabel`,icon:e=>(0,n.jsx)(Zp,{...e}),isActive:{name:`italic`},operation:{name:`toggleItalic`}}),Dh=K({label:`underlineControlLabel`,icon:e=>(0,n.jsx)(Qp,{...e}),isActive:{name:`underline`},operation:{name:`toggleUnderline`}}),Oh=K({label:`strikeControlLabel`,icon:e=>(0,n.jsx)($p,{...e}),isActive:{name:`strike`},operation:{name:`toggleStrike`}}),kh=K({label:`clearFormattingControlLabel`,icon:e=>(0,n.jsx)(em,{...e}),operation:{name:`unsetAllMarks`}}),Ah=K({label:`unlinkControlLabel`,icon:e=>(0,n.jsx)(lm,{...e}),operation:{name:`unsetLink`}}),jh=K({label:`bulletListControlLabel`,icon:e=>(0,n.jsx)(sm,{...e}),isActive:{name:`bulletList`},operation:{name:`toggleBulletList`}}),Mh=K({label:`orderedListControlLabel`,icon:e=>(0,n.jsx)(cm,{...e}),isActive:{name:`orderedList`},operation:{name:`toggleOrderedList`}}),Nh=K({label:`h1ControlLabel`,icon:e=>(0,n.jsx)(tm,{...e}),isActive:{name:`heading`,attributes:{level:1}},operation:{name:`toggleHeading`,attributes:{level:1}}}),Ph=K({label:`h2ControlLabel`,icon:e=>(0,n.jsx)(nm,{...e}),isActive:{name:`heading`,attributes:{level:2}},operation:{name:`toggleHeading`,attributes:{level:2}}}),Fh=K({label:`h3ControlLabel`,icon:e=>(0,n.jsx)(rm,{...e}),isActive:{name:`heading`,attributes:{level:3}},operation:{name:`toggleHeading`,attributes:{level:3}}}),Ih=K({label:`h4ControlLabel`,icon:e=>(0,n.jsx)(im,{...e}),isActive:{name:`heading`,attributes:{level:4}},operation:{name:`toggleHeading`,attributes:{level:4}}}),Lh=K({label:`h5ControlLabel`,icon:e=>(0,n.jsx)(am,{...e}),isActive:{name:`heading`,attributes:{level:5}},operation:{name:`toggleHeading`,attributes:{level:5}}}),Rh=K({label:`h6ControlLabel`,icon:e=>(0,n.jsx)(om,{...e}),isActive:{name:`heading`,attributes:{level:6}},operation:{name:`toggleHeading`,attributes:{level:6}}}),zh=K({label:`blockquoteControlLabel`,icon:e=>(0,n.jsx)(um,{...e}),isActive:{name:`blockquote`},operation:{name:`toggleBlockquote`}}),Bh=K({label:`alignLeftControlLabel`,icon:e=>(0,n.jsx)(dm,{...e}),operation:{name:`setTextAlign`,attributes:`left`}}),Vh=K({label:`alignRightControlLabel`,icon:e=>(0,n.jsx)(fm,{...e}),operation:{name:`setTextAlign`,attributes:`right`}}),Hh=K({label:`alignCenterControlLabel`,icon:e=>(0,n.jsx)(pm,{...e}),operation:{name:`setTextAlign`,attributes:`center`}}),Uh=K({label:`alignJustifyControlLabel`,icon:e=>(0,n.jsx)(mm,{...e}),operation:{name:`setTextAlign`,attributes:`justify`}}),Wh=K({label:`subscriptControlLabel`,icon:e=>(0,n.jsx)(hm,{...e}),isActive:{name:`subscript`},operation:{name:`toggleSubscript`}}),Gh=K({label:`superscriptControlLabel`,icon:e=>(0,n.jsx)(gm,{...e}),isActive:{name:`superscript`},operation:{name:`toggleSuperscript`}}),Kh=K({label:`codeControlLabel`,icon:e=>(0,n.jsx)(_m,{...e}),isActive:{name:`code`},operation:{name:`toggleCode`}}),qh=K({label:`codeBlockControlLabel`,icon:e=>(0,n.jsx)(_m,{...e}),isActive:{name:`codeBlock`},operation:{name:`toggleCodeBlock`}}),Jh=K({label:`highlightControlLabel`,icon:e=>(0,n.jsx)(vm,{...e}),isActive:{name:`highlight`},operation:{name:`toggleHighlight`}}),Yh=K({label:`hrControlLabel`,icon:e=>(0,n.jsx)(ym,{...e}),operation:{name:`setHorizontalRule`}}),Xh=K({label:`unsetColorControlLabel`,icon:e=>(0,n.jsx)(bm,{...e}),operation:{name:`unsetColor`}}),Zh=K({label:`undoControlLabel`,icon:e=>(0,n.jsx)(Dm,{...e}),operation:{name:`undo`}}),Qh=K({label:`redoControlLabel`,icon:e=>(0,n.jsx)(Om,{...e}),operation:{name:`redo`}}),$h=K({label:`tasksControlLabel`,icon:e=>(0,n.jsx)(km,{...e}),isActive:{name:`taskList`},operation:{name:`toggleTaskList`}}),eg=K({label:`tasksSinkLabel`,icon:e=>(0,n.jsx)(Am,{...e}),operation:{name:`sinkListItem`,attributes:`taskItem`},isDisabled:e=>!e?.can().sinkListItem(`taskItem`)}),tg=K({label:`tasksLiftLabel`,icon:e=>(0,n.jsx)(jm,{...e}),operation:{name:`liftListItem`,attributes:`taskItem`},isDisabled:e=>!e?.can().liftListItem(`taskItem`)}),ng=K({label:`tableInsertControlLabel`,icon:e=>(0,n.jsx)(Nm,{...e}),operation:{name:`insertTable`,attributes:{rows:3,cols:3,withHeaderRow:!0}}}),rg=K({label:`tableDeleteControlLabel`,icon:e=>(0,n.jsx)(Pm,{...e}),operation:{name:`deleteTable`},isDisabled:e=>!e?.isActive(`table`)}),ig=K({label:`tableAddColumnBeforeControlLabel`,icon:e=>(0,n.jsx)(Fm,{...e}),operation:{name:`addColumnBefore`},isDisabled:e=>!e?.isActive(`table`)}),ag=K({label:`tableAddColumnAfterControlLabel`,icon:e=>(0,n.jsx)(Im,{...e}),operation:{name:`addColumnAfter`},isDisabled:e=>!e?.isActive(`table`)}),og=K({label:`tableDeleteColumnControlLabel`,icon:e=>(0,n.jsx)(Lm,{...e}),operation:{name:`deleteColumn`},isDisabled:e=>!e?.isActive(`table`)}),sg=K({label:`tableAddRowBeforeControlLabel`,icon:e=>(0,n.jsx)(Rm,{...e}),operation:{name:`addRowBefore`},isDisabled:e=>!e?.isActive(`table`)}),cg=K({label:`tableAddRowAfterControlLabel`,icon:e=>(0,n.jsx)(zm,{...e}),operation:{name:`addRowAfter`},isDisabled:e=>!e?.isActive(`table`)}),lg=K({label:`tableDeleteRowControlLabel`,icon:e=>(0,n.jsx)(Bm,{...e}),operation:{name:`deleteRow`},isDisabled:e=>!e?.isActive(`table`)}),ug=K({label:`tableMergeOrSplitCellControlLabel`,icon:e=>(0,n.jsx)(Vm,{...e}),operation:{name:`mergeOrSplit`},isDisabled:e=>!e?.isActive(`table`)}),dg=K({label:`tableToggleHeaderColumnControlLabel`,icon:e=>(0,n.jsx)(Fm,{...e}),operation:{name:`toggleHeaderColumn`},isDisabled:e=>!e?.isActive(`table`)}),fg=K({label:`tableToggleHeaderRowControlLabel`,icon:e=>(0,n.jsx)(Rm,{...e}),operation:{name:`toggleHeaderRow`},isDisabled:e=>!e?.isActive(`table`)}),pg=e=>{let{labels:t,showTableColumnLines:r,toggleTableColumnLines:i}=Pp(),a=t.tableToggleColumnLinesControlLabel;return(0,n.jsx)(Yp,{"aria-label":a,title:a,active:r,icon:e=>(0,n.jsx)(Hm,{...e}),...e,onClick:i})};pg.displayName=`RichTextEditorControl_tableToggleColumnLinesControlLabel`;var mg=e=>{let{labels:t,showTableRowLines:r,toggleTableRowLines:i}=Pp(),a=t.tableToggleRowLinesControlLabel;return(0,n.jsx)(Yp,{"aria-label":a,title:a,active:r,icon:e=>(0,n.jsx)(Um,{...e}),...e,onClick:i})};mg.displayName=`RichTextEditorControl_tableToggleRowLinesControlLabel`;var hg=[`#ffffff`,`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#e6f7ff`,`#bae7ff`,`#91d5ff`,`#69c0ff`,`#f6ffed`,`#d9f7be`,`#b7eb8f`,`#95de64`,`#fff2f0`,`#ffccc7`,`#ffa39e`,`#ff7875`,`#f9f0ff`,`#efdbff`,`#d3adf7`,`#b37feb`],gg={boldControlLabel:`Bold`,italicControlLabel:`Italic`,underlineControlLabel:`Underline`,strikeControlLabel:`Strikethrough`,clearFormattingControlLabel:`Clear formatting`,linkControlLabel:`Link`,unlinkControlLabel:`Unlink`,bulletListControlLabel:`Bullet list`,orderedListControlLabel:`Ordered list`,h1ControlLabel:`Heading 1`,h2ControlLabel:`Heading 2`,h3ControlLabel:`Heading 3`,h4ControlLabel:`Heading 4`,h5ControlLabel:`Heading 5`,h6ControlLabel:`Heading 6`,blockquoteControlLabel:`Blockquote`,alignLeftControlLabel:`Align left`,alignCenterControlLabel:`Align center`,alignRightControlLabel:`Align right`,alignJustifyControlLabel:`Align justify`,codeControlLabel:`Code`,codeBlockControlLabel:`Code block`,subscriptControlLabel:`Subscript`,superscriptControlLabel:`Superscript`,colorPickerControlLabel:`Text color`,unsetColorControlLabel:`Unset color`,highlightControlLabel:`Highlight`,hrControlLabel:`Horizontal rule`,undoControlLabel:`Undo`,redoControlLabel:`Redo`,colorControlLabel:e=>`Set text color ${e}`,sourceCodeControlLabel:`Source code`,linkEditorInputLabel:`Enter URL`,linkEditorInputPlaceholder:`https://example.com`,linkEditorExternalLink:`Open link in a new tab`,linkEditorInternalLink:`Open link in the same tab`,linkEditorSave:`Save`,colorPickerCancel:`Cancel`,colorPickerClear:`Clear color`,colorPickerColorPicker:`Color picker`,colorPickerPalette:`Color palette`,colorPickerSave:`Save`,colorPickerColorLabel:e=>`Set text color ${e}`,tasksControlLabel:`Task list`,tasksSinkLabel:`Increase indent`,tasksLiftLabel:`Decrease indent`,fontFamilyControlLabel:`Font family`,imageUploadControlLabel:`Insert image`,bgColorPickerControlLabel:`Editor background color`,bgColorPickerColorLabel:e=>`Set background color ${e}`,emojiPickerControlLabel:`Insert emoji`,tableInsertControlLabel:`Insert table`,tableDeleteControlLabel:`Delete table`,tableAddColumnBeforeControlLabel:`Add column before`,tableAddColumnAfterControlLabel:`Add column after`,tableDeleteColumnControlLabel:`Delete column`,tableAddRowBeforeControlLabel:`Add row before`,tableAddRowAfterControlLabel:`Add row after`,tableDeleteRowControlLabel:`Delete row`,tableMergeOrSplitCellControlLabel:`Merge or split cells`,tableToggleHeaderColumnControlLabel:`Toggle header column`,tableToggleHeaderRowControlLabel:`Toggle header row`,tableToggleColumnLinesControlLabel:`Toggle column lines`,tableToggleRowLinesControlLabel:`Toggle row lines`},_g=({content:e,placeholder:r,editable:i,withCodeHighlightStyles:a=!0,withTypographyStyles:o=!0,labels:s,variant:c=`default`,onSourceCodeTextSwitch:l,onContentChange:u,onFocus:d,onBlur:p,onCreate:m,onSelectionChange:h,fontFamily:g,fontFamilies:_,contentBackground:v,bgColorPickerColors:y,onGetContentAsEmailHtml:b,onImageUpload:x,children:S,className:C,style:w})=>{let T=Fp(c),E=Bp({content:e,placeholder:r,editable:i}),[D,O]=t.useReducer(e=>e+1,0);t.useEffect(()=>{if(E)return E.on(`selectionUpdate`,O),E.on(`transaction`,O),()=>{E.off(`selectionUpdate`,O),E.off(`transaction`,O)}},[E]);let[k,A]=t.useState(!0),[j,M]=t.useState(!0),N=t.useCallback(()=>A(e=>!e),[]),P=t.useCallback(()=>M(e=>!e),[]),[F,I]=t.useState(v??``);t.useEffect(()=>{I(v??``)},[v]);let L=t.useMemo(()=>({...gg,...s}),[s]);return(0,n.jsx)(Np,{value:t.useMemo(()=>({editor:E,labels:L,withCodeHighlightStyles:a,withTypographyStyles:o,variant:c,onSourceCodeTextSwitch:l,onContentChange:u,onFocus:d,onBlur:p,onCreate:m,onSelectionChange:h,fontFamily:g,fontFamilies:_,contentBackground:v,bgColor:F,setBgColor:I,bgColorPickerColors:y??hg,showTableColumnLines:k,showTableRowLines:j,toggleTableColumnLines:N,toggleTableRowLines:P,onGetContentAsEmailHtml:b,onImageUpload:x}),[E,D,L,a,o,c,l,u,d,p,m,h,g,_,v,F,I,y,k,j,N,P,b,x]),children:(0,n.jsx)(`div`,{className:(0,f.cx)(T.root,C),style:w,children:S})})};_g.displayName=`RichTextEditor`;var vg=Object.assign(_g,{Toolbar:Vp,Content:Kp,ControlsGroup:qp,Control:Jp,ControlBase:Yp,Bold:Th,Italic:Eh,Underline:Dh,Strikethrough:Oh,ClearFormatting:kh,H1:Nh,H2:Ph,H3:Fh,H4:Ih,H5:Lh,H6:Rh,BulletList:jh,OrderedList:Mh,Blockquote:zh,Link:Ym,Unlink:Ah,AlignLeft:Bh,AlignRight:Vh,AlignCenter:Hh,AlignJustify:Uh,Code:Kh,CodeBlock:qh,Subscript:Wh,Superscript:Gh,Color:Xm,ColorPicker:Zm,Highlight:Jh,UnsetColor:Xh,Hr:Yh,Undo:Zh,Redo:Qh,TaskList:$h,TaskListSink:eg,TaskListLift:tg,SourceCode:Qm,FontFamily:eh,ImageUpload:th,BgColorPicker:nh,EmojiPicker:Ch,DragHandle:rh,TableActiveControls:wh,InsertTable:ng,DeleteTable:rg,AddColumnBefore:ig,AddColumnAfter:ag,DeleteColumn:og,AddRowBefore:sg,AddRowAfter:cg,DeleteRow:lg,MergeOrSplitCell:ug,ToggleHeaderColumn:dg,ToggleHeaderRow:fg,ToggleTableColumnLines:pg,ToggleTableRowLines:mg}),yg=()=>({dropdownRoot:(0,f.css)({border:`1px solid ${o.tokens.colorNeutralStroke2} !important`,borderBottom:`1px solid ${o.tokens.colorNeutralStroke2} !important`,borderRadius:`50px !important`,backgroundColor:`${o.tokens.colorNeutralBackground1} !important`,padding:`0px 10px !important`,boxShadow:`none !important`,transition:`all 0.2s ease`,"&::after":{display:`none !important`,borderWidth:`0 !important`,content:`"none !important"`},"&:hover":{borderColor:`${o.tokens.colorBrandStroke1} !important`},"&:focus-within":{borderColor:`${o.tokens.colorBrandStroke1} !important`,boxShadow:`0 0 0 2px ${o.tokens.colorBrandBackground2} !important`}})}),bg=({options:e,onChange:r,renderItem:i,validate:a,label:s,placeholder:c,defaultValue:l,value:u,message:d,messageType:f,required:p,size:h,hint:g})=>{let _=u!==void 0,v=t=>t?e.find(e=>e.value===t):void 0,y=_?u:l??``,b=v(y),[x,S]=(0,t.useState)(y),[C,w]=(0,t.useState)(b?.text??``),[T,E]=(0,t.useState)(``);t.useEffect(()=>{if(_){let e=v(u);S(u??``),w(e?.text??``)}},[u,_]);let D=_?u??``:x,O=_?v(u)?.text??C:C,k=yg(),A=(e,t)=>{let n=t.optionValue??``,i=t.optionText??``;_||(S(n),w(i));let o=a?a(n):``;E(o),!o&&r&&r(n)},j=t.useMemo(()=>T?`error`:f===`warning`?`warning`:f===`info`?`success`:`none`,[T,f]);return(0,n.jsx)(o.Field,{label:s,required:p,validationMessage:t.useMemo(()=>T||d,[T,d]),validationMessageIcon:t.useCallback(()=>{switch(j){case`error`:return(0,n.jsx)(m.ErrorCircle12Filled,{});case`warning`:return(0,n.jsx)(m.Warning12Filled,{});case`success`:return(0,n.jsx)(m.CheckmarkCircle12Filled,{});default:return null}},[j])(),size:h,hint:g,validationState:j,children:(0,n.jsx)(o.Dropdown,{placeholder:c,onOptionSelect:A,value:O,selectedOptions:D?[D]:[],className:k.dropdownRoot,children:e.map(e=>{let t=e.icon??e.checkIcon;return(0,n.jsx)(o.Option,{value:e.value,disabled:e.disabled,as:e.as,text:e.text||``,children:i?i(e):(0,n.jsxs)(n.Fragment,{children:[t&&(0,n.jsx)(`span`,{style:{marginRight:4,display:`inline-flex`,alignItems:`center`},children:t}),e.text]})},e.value)})})})},xg=()=>({inputRoot:(0,f.css)({border:`1px solid ${o.tokens.colorNeutralStroke2} !important`,borderBottom:`1px solid ${o.tokens.colorNeutralStroke2} !important`,borderRadius:`50px !important`,backgroundColor:`${o.tokens.colorNeutralBackground1} !important`,padding:`0px 10px !important`,boxShadow:`none !important`,transition:`all 0.2s ease`,"&::after":{display:`none !important`,borderWidth:`0 !important`,content:`"none !important"`},"&:hover":{borderColor:`${o.tokens.colorBrandStroke1} !important`},"&:focus-within":{borderColor:`${o.tokens.colorBrandStroke1} !important`,boxShadow:`0 0 0 2px ${o.tokens.colorBrandBackground2} !important`}})}),Sg=({value:r,type:i=`text`,shape:a=`normal`,onChange:s,validate:c,label:l,placeholder:u,message:d,messageType:f,required:p,size:h,hint:g,disabled:_,readOnly:v,min:y,max:b,step:x,contentBefore:S,contentAfter:C})=>{let[w,T]=(0,t.useState)(r===void 0?``:String(r)),[E,D]=(0,t.useState)(``),O=xg(),k=e.u(),A=r!==void 0,j=A?String(r):w,M=(0,t.useCallback)(e=>{if(p&&e.trim()===``)return i===`number`?k.numberRequired:k.fieldRequired;if(i===`number`&&e.trim()!==``){let t=Number(e);if(isNaN(t))return k.invalidNumber;if(y!==void 0&&t<y)return k.valueMustBeAtLeast.replace(`{0}`,String(y));if(b!==void 0&&t>b)return k.valueMustBeAtMost.replace(`{0}`,String(b))}return c?c(i===`number`&&e.trim()!==``?Number(e):e):``},[p,i,c,y,b,k]),N=(0,t.useCallback)((e,t)=>{let n=t.value;if(i===`number`&&n!==``&&!/^-?\d*\.?\d*$/.test(n))return;A||T(n);let r=M(n);D(r),!r&&s&&s(i===`number`&&n.trim()!==``?Number(n):n)},[i,A,M,s]),P=(0,t.useCallback)(()=>{D(M(j))},[M,j]),F=(0,t.useMemo)(()=>E?`error`:f===`warning`?`warning`:f===`info`?`success`:`none`,[E,f]),I=(0,t.useMemo)(()=>E||d,[E,d]),L=(0,t.useCallback)(()=>{switch(F){case`error`:return(0,n.jsx)(m.ErrorCircle12Filled,{});case`warning`:return(0,n.jsx)(m.Warning12Filled,{});case`success`:return(0,n.jsx)(m.CheckmarkCircle12Filled,{});default:return null}},[F]),R=a===`circular`?O.inputRoot:void 0;return(0,n.jsx)(o.Field,{label:l,required:p,validationMessage:I,validationMessageIcon:L(),size:h,hint:g,validationState:F,children:(0,n.jsx)(o.Input,{value:j,placeholder:u,onChange:N,onBlur:P,disabled:_,readOnly:v,type:`text`,inputMode:i===`number`?`decimal`:`text`,step:i===`number`?x:void 0,className:R,contentBefore:S,contentAfter:C})})},Cg=({onChange:e,defaultKey:r,label:i,options:a=[],minWidth:s,styles:c})=>{let[l,u]=(0,t.useState)(()=>a.map(e=>({...e,selected:e.key===(r??`status`)})));(0,t.useEffect)(()=>{let t=l.find(e=>e.selected);t&&e(t.key)},[]);let d=t.default.useCallback(t=>{u(l.map(e=>({...e,selected:e.key===t.key}))),e(t.key)},[l,e]);return(0,n.jsxs)(H,{gap:`s`,children:[i&&(0,n.jsx)(o.Label,{children:i}),(0,n.jsx)(Td,{options:l,onSelected:d,styles:s?{minWidth:s}:c??{}})]})},wg=()=>({menuButton:(0,f.css)({minWidth:200}),popover:(0,f.css)({padding:o.tokens.spacingVerticalS,minWidth:200}),timePicker:(0,f.css)({width:`100%`})}),Tg=()=>({root:(0,f.css)({maxHeight:280,overflowY:`auto`,padding:`${o.tokens.spacingVerticalXS} 0`}),item:(0,f.css)({cursor:`pointer`})}),Eg=`time`,Dg=(e,t,n)=>{let r=new Date(e);return r.setHours(t,n,0,0),r},Og=(e,t,n)=>{let r={hour:`numeric`,minute:`2-digit`,...n&&{second:`2-digit`},...t&&{hourCycle:t}};return new Intl.DateTimeFormat(void 0,r).format(e)},kg=e=>`${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`,Ag=(e,t,n,r)=>{let i=[],a=e*60,o=t*60;for(let e=a;e<o;e+=n){let t=Math.floor(e/60),n=e%60;i.push(Dg(r,t,n))}return i},jg=t.memo(e=>{let{onTimeSelect:r,hourCycle:i,showSeconds:a=!1,startHour:s=0,endHour:c=24,increment:l=30,dateAnchor:u}=e,d=Tg(),f=t.useMemo(()=>u??new Date,[u]),p=t.useMemo(()=>Ag(s,c,l,f),[s,c,l,f]),h=t.useCallback((e,t)=>()=>{r(e,t)},[r]);return(0,n.jsx)(`div`,{className:d.root,children:p.map(e=>{let t=Og(e,i,a),r=kg(e);return(0,n.jsx)(o.MenuItemRadio,{name:Eg,value:r,onClick:h(e,t),icon:(0,n.jsx)(m.ClockRegular,{}),className:d.item,children:t},r)})})}),Mg=(e,t)=>{let n=t?new Date(t):new Date,r=n.getHours()*60+n.getMinutes(),i=Math.ceil(r/e)*e,a=new Date(n);return a.setHours(Math.floor(i/60),i%60,0,0),a},Ng=t.memo(e=>{let{onSelected:r,value:i,placeholder:a=`Select a time`,hourCycle:s,showSeconds:c=!1,startHour:l,endHour:u,increment:d=30,dateAnchor:f}=e,p=wg(),h=t.useMemo(()=>Mg(d,f),[d,f]),g=i??h,[_,v]=t.useState(g),[y,b]=t.useState(()=>Og(g,s,c)),[x,S]=t.useState(!1);t.useEffect(()=>{i&&(v(i),b(Og(i,s,c)))},[i,s,c]);let C=t.useCallback((e,t)=>{S(t.open)},[]),w=t.useMemo(()=>(0,m.bundleIcon)(m.ClockFilled,m.ClockRegular),[]),T=t.useMemo(()=>_?{[Eg]:[kg(_)]}:{[Eg]:[]},[_]),E=t.useCallback((e,t)=>{v(e),b(t),r(e),S(!1)},[r]);return(0,n.jsxs)(o.Menu,{open:x,onOpenChange:C,checkedValues:T,onCheckedValueChange:t.useCallback((e,t)=>{},[]),children:[(0,n.jsx)(o.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(o.MenuButton,{shape:`circular`,icon:(0,n.jsx)(w,{}),className:p.menuButton,"aria-label":`Select time: ${y||a}`,children:y||a})}),(0,n.jsx)(o.MenuPopover,{className:p.popover,children:(0,n.jsx)(o.MenuList,{children:(0,n.jsx)(jg,{value:_,onTimeSelect:E,hourCycle:s,showSeconds:c,startHour:l,endHour:u,increment:d,dateAnchor:f})})})]})}),Pg=()=>({container:(0,f.css)({display:`flex`,flexDirection:`column`,gap:o.tokens.spacingVerticalS,position:`relative`}),pickerList:(0,f.css)({maxHeight:300,overflowY:`auto`,backgroundColor:o.tokens.colorNeutralBackground1,border:`1px solid ${o.tokens.colorNeutralStroke2}`,borderRadius:o.tokens.borderRadiusMedium,boxShadow:o.tokens.shadow16,scrollbarColor:`${o.tokens.colorBrandForeground1} ${o.tokens.colorNeutralBackground1}`,scrollbarWidth:`thin`,"&::-webkit-scrollbar-track":{borderRadius:10,borderWidth:1},"&::-webkit-scrollbar-thumb":{borderRadius:10,borderWidth:1},"&::-webkit-scrollbar":{height:7,width:7}}),optionContent:(0,f.css)({display:`flex`,flexDirection:`column`,gap:o.tokens.spacingVerticalXXS}),optionSecondary:(0,f.css)({fontSize:o.tokens.fontSizeBase200,color:o.tokens.colorNeutralForeground3,fontWeight:o.tokens.fontWeightRegular}),tagPickerControl:(0,f.css)({}),tagPickerInput:(0,f.css)({backgroundColor:`transparent`,border:`none`,outline:`none`,fontSize:o.tokens.fontSizeBase300,"&::placeholder":{color:o.tokens.colorNeutralForeground4},"&:focus":{outline:`none`}})}),Fg=({options:r,selectedOptions:i=[],onSelectionChange:a,onSearchChange:s,onLoadMore:c,pagingInfo:l,placeholder:u,disabled:d=!1,maxSelectedOptions:f,width:p,className:m,noResultsMessage:h,loadingMessage:g,loadingMoreMessage:_,searchDebounceMs:v=300})=>{let y=Pg(),b=e.d(),x=u||b.placeholder,S=h||b.noResultsFound,C=g||b.searching,w=_||b.loadingMore,[T,E]=(0,t.useState)(``),D=(0,t.useRef)(null),O=(0,t.useRef)(null),k=i.map(e=>e.value),A=l?.isLoading??!1,j=l?.isLoadingMore??!1,M=l?.hasMore??!1,N=r.filter(e=>!k.includes(e.value)),P=(0,t.useCallback)(e=>{E(e),D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{s?.(e)},v)},[s,v]),F=(0,t.useCallback)(e=>{if(!M||j)return;let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;t+r>=n-100&&c?.()},[M,j,c]),I=(0,t.useCallback)((e,t)=>{if(t.value===`no-options`||t.value===`loading`||t.value===`loading-more`)return;let n=t.selectedOptions,o=i.filter(e=>n.includes(e.value));if(n.length>k.length){let e=n.find(e=>!k.includes(e));if(e){let t=r.find(t=>t.value===e);if(t){if(f&&i.length>=f)return;o.push(t)}}E(``),s?.(``)}a?.(o)},[r,i,k,a,s,f]);return(0,t.useEffect)(()=>()=>{D.current&&clearTimeout(D.current)},[]),(0,n.jsx)(`div`,{className:`${y.container} ${m||``}`,...p&&{style:{width:p}},children:(0,n.jsxs)(o.TagPicker,{onOptionSelect:I,selectedOptions:k,disabled:d,children:[(0,n.jsxs)(o.TagPickerControl,{className:y.tagPickerControl,children:[(0,n.jsx)(o.TagPickerGroup,{"aria-label":b.selectedItems,children:i.map(e=>(0,n.jsx)(o.Tag,{shape:`circular`,media:e.tagMedia??e.media,value:e.value,dismissible:!0,disabled:d,style:{minHeight:30},children:e.text},e.value))}),(0,n.jsx)(o.TagPickerInput,{className:y.tagPickerInput,"aria-label":b.searchItems,placeholder:x,value:T,onChange:e=>P(e.target.value),disabled:d})]}),(0,n.jsx)(o.TagPickerList,{ref:O,onScroll:F,className:y.pickerList,children:A?(0,n.jsx)(o.TagPickerOption,{value:`loading`,children:C}):N.length>0?(0,n.jsxs)(n.Fragment,{children:[N.map(e=>(0,n.jsx)(o.TagPickerOption,{value:e.value,text:e.text,media:e.media,children:(0,n.jsxs)(`div`,{className:y.optionContent,children:[(0,n.jsx)(o.Text,{weight:`semibold`,children:e.text}),e.secondaryText&&(0,n.jsx)(o.Text,{size:200,className:y.optionSecondary,children:e.secondaryText})]})},e.value)),j&&(0,n.jsx)(o.TagPickerOption,{value:`loading-more`,children:w})]}):(0,n.jsx)(o.TagPickerOption,{value:`no-options`,children:S})})]})})},Ig=(e,t=0,n=10**t)=>Math.round(n*e)/n,Lg=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Rg=({h:e,s:t,v:n,a:r})=>{let i=e/360*6,a=t/100,o=n/100,s=Math.floor(i),c=o*(1-a),l=o*(1-(i-s)*a),u=o*(1-(1-i+s)*a),d=s%6,f=[o,l,c,c,u,o][d],p=[u,o,o,l,c,c][d],m=[c,c,u,o,o,l][d];return{r:Ig(f*255),g:Ig(p*255),b:Ig(m*255),a:Ig(r,2)}},zg=({r:e,g:t,b:n,a:r})=>{let i=Math.max(e,t,n),a=i-Math.min(e,t,n),o=a?i===e?(t-n)/a:i===t?2+(n-e)/a:4+(e-t)/a:0;return{h:Ig(60*(o<0?o+6:o)),s:Ig(i?a/i*100:0),v:Ig(i/255*100),a:r}},Bg=({h:e,s:t,v:n,a:r})=>{let i=(200-t)*n/100;return{h:Ig(e),s:Ig(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Ig(i/2),a:Ig(r,2)}},Vg=({h:e,s:t,l:n,a:r})=>(t*=(n<50?n:100-n)/100,{h:e,s:t>0?2*t/(n+t)*100:0,v:n+t,a:r}),Hg=e=>zg(Gg(e)),Ug=e=>Kg(Rg(e)),Wg=e=>{let t=Math.round(e.a*255).toString(16).padStart(2,`0`);return`${Ug(e)}${t}`},Gg=e=>{let t=e.startsWith(`#`)?e.slice(1):e;return t.length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?Ig(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:t.length>=8?Ig(parseInt(t.slice(6,8),16)/255,2):1}},Kg=({r:e,g:t,b:n})=>`#${[e,t,n].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`,qg=({r:e,g:t,b:n,a:r})=>{let i=Math.round(r*255).toString(16).padStart(2,`0`);return`#${[e,t,n].map(e=>e.toString(16).padStart(2,`0`)).join(``)}${i}`},Jg=e=>{let{h:t,s:n,l:r}=Bg(e);return`hsl(${t}, ${n}%, ${r}%)`},Yg=e=>{let{h:t,s:n,l:r,a:i}=Bg(e);return`hsla(${t}, ${n}%, ${r}%, ${i})`},Xg=e=>{let{r:t,g:n,b:r}=Rg(e);return`rgb(${t}, ${n}, ${r})`},Zg=e=>{let{r:t,g:n,b:r,a:i}=Rg(e);return`rgba(${t}, ${n}, ${r}, ${i})`},Qg=(e,t=`deg`)=>Number(e.replace(RegExp(`${t}$`),``)),$g=e=>{let t=e.match(/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?\s*[,/ ]?\s*(-?\d*\.?\d+)%?\s*[,/ ]?\s*(-?\d*\.?\d+)%?\s*[,/ ]?\s*(-?\d*\.?\d+)?\s*\)?/i);return t?Vg({h:Qg(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])}):{h:0,s:0,v:0,a:1}},e_=e=>{let t=e.match(/rgba?\(?\s*(-?\d*\.?\d+)(%?)?\s*[,/ ]?\s*(-?\d*\.?\d+)(%?)?\s*[,/ ]?\s*(-?\d*\.?\d+)(%?)?\s*[,/ ]?\s*(-?\d*\.?\d+)?\s*\)?/i);return t?zg({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])}):{h:0,s:0,v:0,a:1}},t_={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},J=e=>{let t;if(typeof e!=`string`)t=e;else{let n=e.trim().toLowerCase();t=n in t_?Hg(t_[n]):n.startsWith(`#`)?Hg(n):n.startsWith(`rgb`)?e_(n):n.startsWith(`hsl`)?$g(n):Hg(n)}let n=Rg(t),r=Bg(t);return{hsva:t,hsla:r,rgba:n,hex:Kg(n),hexa:qg(n)}},n_=e=>/^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(e),r_=e=>{let{r:t,g:n,b:r}=Rg(typeof e==`string`?J(e).hsva:e);return(.299*t+.587*n+.114*r)/255>.5?`#000000`:`#ffffff`},i_=(e,t)=>e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a,a_=(e,t)=>{if(e===t)return!0;let n=e=>e.replace(`#`,``).toLowerCase();return n(e)===n(t)},o_=e=>({h:Lg(e.h,0,360),s:Lg(e.s,0,100),v:Lg(e.v,0,100),a:Lg(e.a,0,1)}),Y=()=>({pointer:(0,f.css)({position:`absolute`,width:12,height:12,borderRadius:`50%`,border:`2px solid ${o.tokens.colorNeutralBackground1}`,boxShadow:o.tokens.shadow4,transform:`translate(-50%, -50%)`,pointerEvents:`none`,boxSizing:`border-box`}),interactiveContainer:(0,f.css)({position:`relative`,touchAction:`none`,userSelect:`none`,outline:`none`,cursor:`crosshair`,"&:focus-visible":{outline:`2px solid ${o.tokens.colorBrandStroke1}`,outlineOffset:2}}),saturation:(0,f.css)({position:`relative`,width:`100%`,borderRadius:o.tokens.borderRadiusMedium,overflow:`hidden`,cursor:`crosshair`}),bar:(0,f.css)({position:`relative`,borderRadius:o.tokens.borderRadiusMedium,overflow:`hidden`,cursor:`crosshair`}),checkerboard:(0,f.css)({backgroundImage:`url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoaFBQJouucRlsGnBCgGDAYAAIpGBAWLkEGCAAAAAElFTkSuQmCC")`,backgroundSize:`8px 8px`,backgroundPosition:`0 0, 4px 4px`,position:`absolute`,inset:0,borderRadius:`inherit`}),swatchContainer:(0,f.css)({display:`flex`,flexWrap:`wrap`,gap:o.tokens.spacingHorizontalXS}),swatch:(0,f.css)({position:`relative`,borderRadius:o.tokens.borderRadiusSmall,cursor:`pointer`,border:`1px solid ${o.tokens.colorNeutralStroke2}`,boxSizing:`border-box`,transition:`transform 120ms ease, box-shadow 120ms ease`,outline:`none`,"&:hover":{transform:`scale(1.2)`,zIndex:1,boxShadow:`0 0 0 2px rgba(255,255,255,0.8), 0 2px 6px rgba(0,0,0,0.3)`},"&:focus-visible":{outline:`2px solid ${o.tokens.colorBrandStroke1}`,outlineOffset:2}}),swatchSelected:(0,f.css)({transform:`scale(1.2)`,zIndex:1,boxShadow:`0 0 0 1px ${o.tokens.colorBrandStroke1}`}),editableInputContainer:(0,f.css)({display:`flex`,flexDirection:`column`,alignItems:`center`,gap:o.tokens.spacingVerticalXXS,flex:1,minWidth:36,overflow:`hidden`}),editableInputLabel:(0,f.css)({fontSize:o.tokens.fontSizeBase200,color:o.tokens.colorNeutralForeground3,lineHeight:o.tokens.lineHeightBase200,textTransform:`uppercase`}),sketchContainer:(0,f.css)({padding:o.tokens.spacingHorizontalM,borderRadius:o.tokens.borderRadiusMedium,backgroundColor:o.tokens.colorNeutralBackground1,boxShadow:o.tokens.shadow8,boxSizing:`border-box`}),chromeContainer:(0,f.css)({padding:o.tokens.spacingHorizontalM,borderRadius:o.tokens.borderRadiusMedium,backgroundColor:o.tokens.colorNeutralBackground1,boxShadow:o.tokens.shadow8,boxSizing:`border-box`}),chromePreview:(0,f.css)({width:28,height:28,borderRadius:`50%`,border:`1px solid ${o.tokens.colorNeutralStroke2}`,boxSizing:`border-box`,flexShrink:0}),colorfulContainer:(0,f.css)({borderRadius:o.tokens.borderRadiusMedium,overflow:`hidden`}),wheelContainer:(0,f.css)({position:`relative`,borderRadius:`50%`,overflow:`hidden`}),circleContainer:(0,f.css)({display:`flex`,flexWrap:`wrap`,gap:o.tokens.spacingHorizontalS,justifyContent:`center`}),circlePoint:(0,f.css)({borderRadius:`50%`,cursor:`pointer`,border:`2px solid transparent`,transition:`border-color ${o.tokens.durationNormal} ${o.tokens.curveEasyEase}`,outline:`none`,"&:hover":{opacity:.85},"&:focus-visible":{outline:`2px solid ${o.tokens.colorBrandStroke1}`,outlineOffset:2}}),circlePointSelected:(0,f.css)({borderColor:o.tokens.colorNeutralBackground1,boxShadow:`0 0 0 2px ${o.tokens.colorNeutralStroke1}`}),compactContainer:(0,f.css)({padding:o.tokens.spacingHorizontalS,borderRadius:o.tokens.borderRadiusMedium,backgroundColor:o.tokens.colorNeutralBackground1,boxShadow:o.tokens.shadow4,boxSizing:`border-box`,width:`fit-content`}),blockContainer:(0,f.css)({borderRadius:o.tokens.borderRadiusMedium,backgroundColor:o.tokens.colorNeutralBackground1,boxShadow:o.tokens.shadow8,overflow:`hidden`,boxSizing:`border-box`}),blockHeader:(0,f.css)({display:`flex`,alignItems:`center`,justifyContent:`center`,height:110,position:`relative`,fontSize:o.tokens.fontSizeHero800,fontWeight:o.tokens.fontWeightBold}),blockTriangle:(0,f.css)({position:`absolute`,bottom:-6,left:`50%`,transform:`translateX(-50%)`,width:0,height:0,borderLeft:`6px solid transparent`,borderRight:`6px solid transparent`}),materialContainer:(0,f.css)({width:98,padding:o.tokens.spacingHorizontalM,borderRadius:o.tokens.borderRadiusMedium,backgroundColor:o.tokens.colorNeutralBackground1,boxShadow:o.tokens.shadow8,boxSizing:`border-box`}),materialInputUnderline:(0,f.css)({width:`100%`,height:2,marginTop:o.tokens.spacingVerticalXXS,borderRadius:o.tokens.borderRadiusSmall}),githubContainer:(0,f.css)({padding:o.tokens.spacingHorizontalM,borderRadius:o.tokens.borderRadiusMedium,backgroundColor:o.tokens.colorNeutralBackground1,boxShadow:o.tokens.shadow8,boxSizing:`border-box`,position:`relative`}),githubArrow:(0,f.css)({position:`absolute`,width:0,height:0}),sliderContainer:(0,f.css)({display:`flex`,flexDirection:`column`,gap:o.tokens.spacingVerticalXS})}),s_=(e,t,n)=>{let r=e.getBoundingClientRect();return{left:Math.max(0,Math.min(1,(t-r.left)/r.width)),top:Math.max(0,Math.min(1,(n-r.top)/r.height))}},c_=({onMove:e,onDown:r,className:i,style:a,children:s})=>{let c=(0,t.useRef)(null),l=(0,t.useRef)(!1),u=Y(),d=(0,t.useCallback)((t,n)=>{c.current&&e?.(s_(c.current,t,n))},[e]),f=(0,t.useCallback)(()=>{let e=e=>d(e.clientX,e.clientY),t=()=>{document.removeEventListener(`mousemove`,e),document.removeEventListener(`mouseup`,t)};return{onMouseMove:e,onMouseUp:t}},[d]),p=(0,t.useCallback)(t=>{if(l.current){l.current=!1;return}if(t.preventDefault(),!c.current)return;let n=s_(c.current,t.clientX,t.clientY);r?.(n),e?.(n);let{onMouseMove:i,onMouseUp:a}=f();document.addEventListener(`mousemove`,i),document.addEventListener(`mouseup`,a)},[r,e,f]),m=(0,t.useCallback)(t=>{if(l.current=!0,!c.current||!t.touches[0])return;let n=s_(c.current,t.touches[0].clientX,t.touches[0].clientY);r?.(n),e?.(n)},[r,e]),h=(0,t.useCallback)(e=>{e.touches[0]&&d(e.touches[0].clientX,e.touches[0].clientY)},[d]);return(0,n.jsx)(`div`,{ref:c,className:(0,o.mergeClasses)(u.interactiveContainer,i),style:a,onMouseDown:p,onTouchStart:m,onTouchMove:h,role:`none`,children:s})},l_=({color:e,left:t,top:r})=>(0,n.jsx)(`div`,{className:Y().pointer,style:{left:`${(t??0)*100}%`,top:`${(r??0)*100}%`,backgroundColor:e}}),u_=({hsva:e,onChange:r,pointer:i=l_,radius:a=6,className:s,style:c})=>{let l=Y(),u=(0,t.useCallback)(t=>{let n=o_({h:e.h,s:t.left*100,v:(1-t.top)*100,a:e.a});r?.(J(n))},[e.h,e.a,r]),d=(0,t.useCallback)(t=>{let{s:n,v:i}=e,a=t.shiftKey?10:1;switch(t.key){case`ArrowRight`:n=Math.min(100,n+a);break;case`ArrowLeft`:n=Math.max(0,n-a);break;case`ArrowUp`:i=Math.min(100,i+a);break;case`ArrowDown`:i=Math.max(0,i-a);break;default:return}t.preventDefault(),r?.(J(o_({...e,s:n,v:i})))},[e,r]),p=(0,t.useMemo)(()=>(0,f.css)({height:typeof c?.height==`number`?c.height:150,...c,backgroundImage:`linear-gradient(0deg, #000, transparent), linear-gradient(90deg, #fff, transparent)`,backgroundColor:`hsl(${e.h}, 100%, 50%)`}),[e.h,c]);return(0,n.jsx)(c_,{onMove:u,className:(0,o.mergeClasses)(l.saturation,s),children:(0,n.jsx)(`div`,{className:p,onKeyDown:d,tabIndex:0,role:`slider`,"aria-label":`Saturation and brightness`,"aria-valuetext":`Saturation ${Math.round(e.s)}%, Brightness ${Math.round(e.v)}%`,style:{borderRadius:a},children:(0,n.jsx)(i,{color:J(e).hex,left:e.s/100,top:1-e.v/100})})})},d_=`linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)`,f_=`linear-gradient(to bottom, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)`,p_=({color:e,left:t,top:r})=>(0,n.jsx)(`div`,{className:Y().pointer,style:{left:`${(t??0)*100}%`,top:`${(r??0)*100}%`,backgroundColor:e}}),m_=({hsva:e,onChange:r,width:i=`100%`,height:a=12,direction:s=`horizontal`,pointer:c=p_,radius:l=6,className:u,style:d})=>{let p=Y(),m=s===`horizontal`,h=(0,t.useCallback)(t=>{let n=m?t.left:t.top,i=o_({...e,h:n*360});r?.(J(i))},[e,r,m]),g=(0,t.useCallback)(t=>{let{h:n}=e,i=t.shiftKey?10:1,a=m?`ArrowRight`:`ArrowDown`,o=m?`ArrowLeft`:`ArrowUp`;if(t.key===a)n=(n+i)%360;else if(t.key===o)n=(n-i+360)%360;else return;t.preventDefault(),r?.(J(o_({...e,h:n})))},[e,r,m]),_=(0,t.useMemo)(()=>(0,f.css)({width:i,height:a,backgroundImage:m?d_:f_,borderRadius:l,...d}),[i,a,m,l,d]),v=e.h/360;return(0,n.jsx)(c_,{onMove:h,className:(0,o.mergeClasses)(p.bar,u),children:(0,n.jsx)(`div`,{className:_,onKeyDown:g,tabIndex:0,role:`slider`,"aria-label":`Hue`,"aria-valuemin":0,"aria-valuemax":360,"aria-valuenow":Math.round(e.h),children:(0,n.jsx)(c,{color:`hsl(${e.h}, 100%, 50%)`,left:m?v:.5,top:m?.5:v})})})},h_=({color:e,left:t,top:r})=>(0,n.jsx)(`div`,{className:Y().pointer,style:{left:`${(t??0)*100}%`,top:`${(r??0)*100}%`,backgroundColor:e}}),g_=({hsva:e,onChange:r,width:i=`100%`,height:a=12,direction:s=`horizontal`,pointer:c=h_,radius:l=6,className:u,style:d})=>{let p=Y(),m=s===`horizontal`,h=(0,t.useCallback)(t=>{let n=m?t.left:t.top,i=o_({...e,a:Math.round(n*100)/100});r?.(J(i))},[e,r,m]),g=(0,t.useCallback)(t=>{let{a:n}=e,i=t.shiftKey?.1:.01,a=m?`ArrowRight`:`ArrowDown`,o=m?`ArrowLeft`:`ArrowUp`;if(t.key===a)n=Math.min(1,n+i);else if(t.key===o)n=Math.max(0,n-i);else return;t.preventDefault(),r?.(J(o_({...e,a:Math.round(n*100)/100})))},[e,r,m]),_=Zg({...e,a:0}),v=Zg({...e,a:1}),y=m?`linear-gradient(to right, ${_}, ${v})`:`linear-gradient(to bottom, ${_}, ${v})`,b=(0,t.useMemo)(()=>(0,f.css)({width:i,height:a,position:`relative`,borderRadius:l,...d}),[i,a,l,d]),x=(0,t.useMemo)(()=>(0,f.css)({position:`absolute`,inset:0,backgroundImage:y,borderRadius:`inherit`}),[y]),S=e.a;return(0,n.jsx)(c_,{onMove:h,className:(0,o.mergeClasses)(p.bar,u),children:(0,n.jsxs)(`div`,{className:b,onKeyDown:g,tabIndex:0,role:`slider`,"aria-label":`Alpha`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(e.a*100),children:[(0,n.jsx)(`div`,{className:p.checkerboard}),(0,n.jsx)(`div`,{className:x,children:(0,n.jsx)(c,{color:Zg(e),left:m?S:.5,top:m?.5:S})})]})})},__=({color:e,left:t})=>(0,n.jsx)(`div`,{className:Y().pointer,style:{left:`${(t??0)*100}%`,top:`50%`,backgroundColor:e}}),v_=({hsva:e,onChange:r,width:i=`100%`,height:a=12,pointer:s=__,radius:c=6,className:l,style:u})=>{let d=Y(),p=(0,t.useCallback)(t=>{let n=(1-t.left)*100,i=o_({...e,v:n});r?.(J(i))},[e,r]),m=(0,t.useCallback)(t=>{let{v:n}=e,i=t.shiftKey?10:1;if(t.key===`ArrowRight`)n=Math.max(0,n-i);else if(t.key===`ArrowLeft`)n=Math.min(100,n+i);else return;t.preventDefault(),r?.(J(o_({...e,v:n})))},[e,r]),{h,s:g}=Bg(e),_=`linear-gradient(to right, hsl(${h}, ${g}%, 50%), hsl(${h}, ${g}%, 0%))`,v=(0,t.useMemo)(()=>(0,f.css)({width:i,height:a,backgroundImage:_,borderRadius:c,position:`relative`,...u}),[i,a,_,c,u]),y=1-e.v/100;return(0,n.jsx)(c_,{onMove:p,className:(0,o.mergeClasses)(d.bar,l),children:(0,n.jsx)(`div`,{className:v,onKeyDown:m,tabIndex:0,role:`slider`,"aria-label":`Shade`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(e.v),children:(0,n.jsx)(s,{color:J(e).hex,left:y})})})},y_=e=>typeof e==`string`?{color:e}:e,b_=({color:e,title:r,checked:i,disabled:a,size:s=24,radius:c=4,onClick:l,rectRender:u,addonBefore:d,addonAfter:p,colors:m=[],className:h,style:g})=>{let _=Y(),v=(0,t.useCallback)(e=>{a||l?.(e)},[a,l]);if(m.length===0&&e){let t=i??!1,a=(0,f.css)({width:s,height:s,borderRadius:c,backgroundColor:e}),l=u?u({className:(0,o.mergeClasses)(_.swatch,t?_.swatchSelected:!1,a,h),style:g,onClick:()=>v(e),role:`button`,"aria-pressed":t?`true`:`false`,tabIndex:0}):(0,n.jsx)(`div`,{className:(0,o.mergeClasses)(_.swatch,t?_.swatchSelected:!1,a,h),style:g,onClick:()=>v(e),role:`button`,"aria-pressed":t?`true`:`false`,"aria-label":r??e,tabIndex:0,onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),v(e))}});return r?(0,n.jsx)(o.Tooltip,{content:r,relationship:`label`,children:l}):l}let y=(0,t.useMemo)(()=>new Map(m.map(e=>{let{color:t}=y_(e);return[t,Ug(J(t).hsva)]})),[m]);return(0,n.jsxs)(H,{direction:`vertical`,gap:`xs`,children:[d,(0,n.jsx)(`div`,{className:_.swatchContainer,role:`listbox`,"aria-label":`Color swatches`,children:m.map((t,r)=>{let{color:i,title:a}=y_(t),l=y.get(i)||i,u=e?a_(l,e):!1,d=(0,f.css)({width:s,height:s,borderRadius:c,backgroundColor:i}),p=(0,n.jsx)(`div`,{className:(0,o.mergeClasses)(_.swatch,u?_.swatchSelected:`false`,d),onClick:()=>v(i),role:`option`,"aria-selected":u?`true`:`false`,"aria-label":a??i,tabIndex:0,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(i))},children:u&&(0,n.jsx)(`svg`,{viewBox:`0 0 16 16`,width:s*.6,height:s*.6,style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,fill:r_(Hg(i))},children:(0,n.jsx)(`path`,{d:`M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z`})})},`${i}-${r}`);return a?(0,n.jsx)(o.Tooltip,{content:a,relationship:`label`,children:p},`${i}-${r}`):p})}),p]})},x_={width:`100%`,minWidth:0,textAlign:`center`},S_=({label:e,value:r,onChange:i,placeholder:a,className:s,style:c})=>{let l=Y(),[u,d]=(0,t.useState)(String(r??``));(0,t.useEffect)(()=>{d(String(r??``))},[r]);let f=(0,t.useCallback)((e,t)=>{d(t.value)},[]),p=(0,t.useCallback)(()=>{i?.(u)},[u,i]),m=(0,t.useCallback)(e=>{e.key===`Enter`&&i?.(u)},[u,i]);return(0,n.jsxs)(`div`,{className:l.editableInputContainer,style:c,children:[(0,n.jsx)(o.Input,{size:`small`,value:u,onChange:f,onBlur:p,onKeyDown:m,placeholder:a,className:s,"aria-label":e,style:x_}),e&&(0,n.jsx)(`span`,{className:l.editableInputLabel,children:e})]})},C_=({hsva:e,onChange:r,showAlpha:i=!0,className:a,style:o})=>{let s=Rg(e),c=(0,t.useCallback)((e,t)=>{let n=Number(t);if(isNaN(n))return;let i={...s};e===`a`?i.a=Math.max(0,Math.min(1,n/100)):i[e]=Math.max(0,Math.min(255,Math.round(n)));let a=zg(i);r?.(J(a))},[s,r]);return(0,n.jsxs)(H,{direction:`horizontal`,gap:`xs`,className:a,style:(0,t.useMemo)(()=>({flex:3,minWidth:0,...o}),[o]),children:[(0,n.jsx)(S_,{label:`R`,value:s.r,onChange:e=>c(`r`,e)}),(0,n.jsx)(S_,{label:`G`,value:s.g,onChange:e=>c(`g`,e)}),(0,n.jsx)(S_,{label:`B`,value:s.b,onChange:e=>c(`b`,e)}),i&&(0,n.jsx)(S_,{label:`A`,value:Math.round(s.a*100),onChange:e=>c(`a`,e)})]})},w_=({hsva:e,onChange:r,showAlpha:i=!0,className:a,style:o})=>{let s=Bg(e),c=(0,t.useCallback)((e,t)=>{let n=Number(t);if(isNaN(n))return;let i={...s};e===`a`?i.a=Math.max(0,Math.min(1,n/100)):e===`h`?i.h=Math.max(0,Math.min(360,Math.round(n))):i[e]=Math.max(0,Math.min(100,Math.round(n)));let a=Vg(i);r?.(J(a))},[s,r]);return(0,n.jsxs)(H,{direction:`horizontal`,gap:`xs`,className:a,style:(0,t.useMemo)(()=>({flex:3,minWidth:0,...o}),[o]),children:[(0,n.jsx)(S_,{label:`H`,value:Math.round(s.h),onChange:e=>c(`h`,e)}),(0,n.jsx)(S_,{label:`S`,value:Math.round(s.s),onChange:e=>c(`s`,e)}),(0,n.jsx)(S_,{label:`L`,value:Math.round(s.l),onChange:e=>c(`l`,e)}),i&&(0,n.jsx)(S_,{label:`A`,value:Math.round(s.a*100),onChange:e=>c(`a`,e)})]})},T_=[`#D0021B`,`#F5A623`,`#F8E71C`,`#8B572A`,`#7ED321`,`#417505`,`#BD10E0`,`#9013FE`,`#4A90D9`,`#50E3C2`,`#B8E986`,`#000000`,`#4A4A4A`,`#9B9B9B`,`#FFFFFF`],E_=({color:e,onChange:r,width:i=320,presetColors:a=T_,editableDisable:s=!1,disableAlpha:c=!1,className:l,style:u})=>{let d=Y(),f=e=>e?typeof e==`string`?J(e).hsva:e:{h:0,s:0,v:100,a:1},[p,m]=(0,t.useState)(()=>f(e));(0,t.useEffect)(()=>{e!==void 0&&m(f(e))},[e]);let h=(0,t.useCallback)(e=>{m(e.hsva),r?.(e)},[r]),g=(0,t.useCallback)(e=>{let t=e.startsWith(`#`)?e:`#${e}`;if(n_(t)){let e=J(t);m(e.hsva),r?.(e)}},[r]),_=(0,t.useCallback)(e=>{let t=J(e);m(t.hsva),r?.(t)},[r]),v=Ug(p),y=(0,t.useMemo)(()=>({width:i,...u}),[i,u]);return(0,n.jsxs)(H,{direction:`vertical`,gap:`m`,className:(0,o.mergeClasses)(d.sketchContainer,l),style:y,children:[(0,n.jsx)(u_,{hsva:p,onChange:h}),(0,n.jsxs)(H,{direction:`vertical`,gap:`s`,children:[(0,n.jsx)(m_,{hsva:p,onChange:h}),!c&&(0,n.jsx)(g_,{hsva:p,onChange:h})]}),!s&&(0,n.jsxs)(H,{direction:`horizontal`,gap:`xs`,alignItems:`flex-end`,children:[(0,n.jsx)(S_,{label:`Hex`,value:v.replace(`#`,``),onChange:g}),(0,n.jsx)(C_,{hsva:p,onChange:h,showAlpha:!c})]}),a.length>0&&(0,n.jsx)(b_,{colors:a,color:v,onClick:_,size:16,radius:3})]})},D_=function(e){return e.HEXA=`hexa`,e.RGBA=`rgba`,e.HSLA=`hsla`,e}({}),O_={flex:1},k_={flex:`none`},A_={minWidth:28,width:28,padding:0},j_=[D_.HEXA,D_.RGBA,D_.HSLA],M_=({color:e,onChange:r,width:i=320,showAlpha:a=!0,showColorPreview:s=!0,showEditableInput:c=!0,showEyeDropper:l=!0,inputType:u=D_.HEXA,className:d,style:f})=>{let p=Y(),m=e=>e?typeof e==`string`?J(e).hsva:e:{h:0,s:68,v:100,a:1},[h,g]=(0,t.useState)(()=>m(e)),[_,v]=(0,t.useState)(u);(0,t.useEffect)(()=>{e!==void 0&&g(m(e))},[e]);let y=(0,t.useCallback)(e=>{g(e.hsva),r?.(e)},[r]),b=(0,t.useCallback)(e=>{let t=e.startsWith(`#`)?e:`#${e}`;if(n_(t)){let e=J(t);g(e.hsva),r?.(e)}},[r]),x=(0,t.useCallback)(()=>{v(e=>j_[(j_.indexOf(e)+1)%j_.length])},[]),S=(0,t.useCallback)(async()=>{if(`EyeDropper`in window)try{let e=await new window.EyeDropper().open();if(e?.sRGBHex){let t=J(e.sRGBHex);g(t.hsva),r?.(t)}}catch{}},[r]),C=Ug(h),w=Wg(h),T=(0,t.useMemo)(()=>({width:i,...f}),[i,f]);return(0,n.jsxs)(H,{direction:`vertical`,gap:`m`,className:(0,o.mergeClasses)(p.chromeContainer,d),style:T,children:[(0,n.jsx)(u_,{hsva:h,onChange:y}),(0,n.jsxs)(H,{direction:`horizontal`,gap:`m`,alignItems:`center`,children:[s&&(0,n.jsx)(`div`,{className:p.chromePreview,style:{backgroundColor:Zg(h)},"aria-label":`Selected color: ${C}`}),(0,n.jsxs)(H,{direction:`vertical`,gap:`xs`,style:O_,children:[(0,n.jsx)(m_,{hsva:h,onChange:y}),a&&(0,n.jsx)(g_,{hsva:h,onChange:y})]})]}),c&&(0,n.jsxs)(H,{direction:`horizontal`,gap:`xs`,alignItems:`flex-start`,children:[_===D_.HEXA&&(0,n.jsx)(S_,{label:`HEX`,value:a?w.replace(`#`,``):C.replace(`#`,``),onChange:b}),_===D_.RGBA&&(0,n.jsx)(C_,{hsva:h,onChange:y,showAlpha:a}),_===D_.HSLA&&(0,n.jsx)(w_,{hsva:h,onChange:y,showAlpha:a}),(0,n.jsxs)(H,{direction:`horizontal`,gap:`xs`,style:k_,children:[(0,n.jsx)(o.Button,{appearance:`subtle`,size:`small`,icon:(0,n.jsx)(`span`,{children:`⇅`}),onClick:x,"aria-label":`Toggle color format`,style:A_}),l&&`EyeDropper`in window&&(0,n.jsx)(o.Button,{appearance:`subtle`,size:`small`,icon:(0,n.jsx)(`span`,{children:`💧`}),onClick:S,"aria-label":`Pick color from screen`,style:A_})]})]})]})},N_=({color:e,onChange:r,disableAlpha:i=!1,className:a,style:s})=>{let c=Y(),l=e=>e?typeof e==`string`?J(e).hsva:e:{h:0,s:100,v:100,a:1},[u,d]=(0,t.useState)(()=>l(e));(0,t.useEffect)(()=>{e!==void 0&&d(l(e))},[e]);let f=(0,t.useCallback)(e=>{d(e.hsva),r?.(e)},[r]);return(0,n.jsxs)(H,{direction:`vertical`,gap:`m`,className:(0,o.mergeClasses)(c.colorfulContainer,a),style:s,children:[(0,n.jsx)(u_,{hsva:u,onChange:f}),(0,n.jsx)(m_,{hsva:u,onChange:f}),!i&&(0,n.jsx)(g_,{hsva:u,onChange:f})]})},P_=({color:e,left:t,top:r})=>(0,n.jsx)(`div`,{className:Y().pointer,style:{left:`${(t??0)*100}%`,top:`${(r??0)*100}%`,backgroundColor:e}}),F_=(e,t)=>{let n=t/2,r=n*(e.s/100),i=e.h*Math.PI/180;return{x:n+r*Math.cos(i),y:n+r*Math.sin(i)}},I_=(e,t,n)=>{let r=n/2,i=e-r,a=t-r,o=Math.atan2(a,i)*180/Math.PI;o<0&&(o+=360);let s=Math.min(Math.sqrt(i*i+a*a),r);return{h:o,s:s/r*100}},L_=({color:e,onChange:r,width:i=200,height:a,pointer:s=P_,className:c,style:l})=>{let u=Y(),d=a??i,p=(0,t.useRef)(null),m=e=>e?typeof e==`string`?J(e).hsva:e:{h:0,s:100,v:100,a:1},[h,g]=(0,t.useState)(()=>m(e));(0,t.useEffect)(()=>{e!==void 0&&g(m(e))},[e]);let _=(0,t.useCallback)(e=>{let{h:t,s:n}=I_(e.left*i,e.top*d,Math.min(i,d)),a=J({h:t,s:n,v:h.v,a:h.a});g(a.hsva),r?.(a)},[i,d,h.v,h.a,r]),v=F_(h,Math.min(i,d)),y=(0,t.useMemo)(()=>(0,f.css)({width:i,height:d,background:`conic-gradient(
172
172
  from 90deg,
173
173
  hsl(0, 100%, 50%),
174
174
  hsl(30, 100%, 50%),
@@ -482,10 +482,10 @@ import { AISearchIcon } from './AISearchIcon';
482
482
  `,Rx=f.keyframes`
483
483
  0% { background-position: -200% center; }
484
484
  100% { background-position: 200% center; }
485
- `,zx=()=>({card:(0,f.css)({width:`100%`,height:`310px`,borderRadius:10,background:o.tokens.colorNeutralBackground1,border:`1px solid ${o.tokens.colorNeutralStroke1}`,boxShadow:o.tokens.shadow8,overflow:`visible`,position:`relative`,padding:`0px 15px !important`,transition:`transform 0.25s ease, box-shadow 0.25s ease`,"&:hover, &:focus-within":{zIndex:10,transform:`translateY(-2px)`,boxShadow:o.tokens.shadow16}}),description:(0,f.css)({fontSize:o.tokens.fontSizeBase300,color:o.tokens.colorNeutralForeground4,lineHeight:o.tokens.lineHeightBase400,position:`relative`,zIndex:1}),footerMetric:(0,f.css)({display:`flex`,flexDirection:`column`,alignItems:`center`,gap:o.tokens.spacingVerticalXXS}),footerIcon:(0,f.css)({color:o.tokens.colorNeutralForeground3,fontSize:o.tokens.fontSizeBase300}),footerLabel:(0,f.css)({fontSize:`${o.tokens.fontSizeBase100} !important`,color:o.tokens.colorNeutralForeground3,textTransform:`uppercase`,letterSpacing:`0.8px`,fontWeight:o.tokens.fontWeightMedium,textAlign:`center`}),footerValue:(0,f.css)({fontSize:`${o.tokens.fontSizeBase400} !important`,fontWeight:o.tokens.fontWeightSemibold,color:o.tokens.colorNeutralForeground2,textAlign:`center`}),footerDivider:(0,f.css)({height:`32px`,borderColor:o.tokens.colorNeutralStroke1}),glowBlob:(0,f.css)({position:`absolute`,top:`-60px`,right:`-60px`,width:`180px`,height:`180px`,borderRadius:`50%`,pointerEvents:`none`,zIndex:0,filter:`blur(40px)`}),glowBlobSuccess:(0,f.css)({position:`absolute`,top:`-40px`,right:`-40px`,width:`160px`,height:`160px`,borderRadius:`50%`,pointerEvents:`none`,zIndex:0,background:`radial-gradient(circle, ${o.tokens.colorPaletteLightGreenBackground2} 0%, transparent 70%)`,opacity:.7,filter:`blur(20px)`}),glowBlobError:(0,f.css)({position:`absolute`,top:`-40px`,right:`-40px`,width:`160px`,height:`160px`,borderRadius:`50%`,pointerEvents:`none`,zIndex:0,background:`radial-gradient(circle, ${o.tokens.colorPaletteRedBackground2} 0%, transparent 70%)`,opacity:.6,filter:`blur(20px)`}),headerActionBadge:(0,f.css)({minWidth:`32px`,height:`32px`,borderRadius:`50% !important`,background:`${o.tokens.colorNeutralBackground3} !important`,border:`none !important`,padding:`0 !important`,display:`flex`,alignItems:`center`,justifyContent:`center`}),kpiContainer:(0,f.css)({width:`100%`,backgroundColor:o.tokens.colorNeutralBackground2,borderRadius:8,display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(min(100%, 280px), 1fr))`,gap:16,padding:16}),iconContainer:(0,f.css)({width:48,height:48,borderRadius:8,display:`grid`,placeItems:`center`,background:o.tokens.colorNeutralBackgroundInverted}),noKpiCard:(0,f.css)({width:280,minHeight:160,display:`flex`,alignItems:`center`,justifyContent:`center`}),noKpiCardContainer:(0,f.css)({width:`100%`,minWidth:`280px`,minHeight:`280px`,borderRadius:`16px`,background:`linear-gradient(135deg, ${o.tokens.colorNeutralBackground1} 0%, ${o.tokens.colorNeutralBackground3} 100%)`,border:`1px solid ${o.tokens.colorNeutralStroke1}`,boxShadow:o.tokens.shadow16,overflow:`hidden`,position:`relative`,padding:`32px`,transition:`transform 0.3s ease, box-shadow 0.3s ease`,"&:hover":{transform:`translateY(-4px)`,boxShadow:o.tokens.shadow28}}),noKpiBackgroundOrb1:(0,f.css)({position:`absolute`,top:`0px`,right:`0px`,width:`180px`,height:`180px`,borderRadius:`50%`,background:`radial-gradient(circle, ${o.tokens.colorBrandBackground2} 0%, transparent 70%)`,opacity:.8,pointerEvents:`none`,filter:`blur(25px)`,transform:`translate(30%, -30%)`}),noKpiBackgroundOrb2:(0,f.css)({position:`absolute`,bottom:`-30px`,left:`-30px`,width:`120px`,height:`120px`,borderRadius:`50%`,background:`radial-gradient(circle, ${o.tokens.colorPaletteLavenderBackground2} 0%, transparent 70%)`,opacity:.5,pointerEvents:`none`,filter:`blur(20px)`}),noKpiIconContainer:(0,f.css)({width:`80px`,height:`80px`,borderRadius:`20px`,background:`linear-gradient(135deg, ${o.tokens.colorBrandBackground} 0%, ${o.tokens.colorBrandBackground2} 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px ${o.tokens.colorBrandBackground}40`,animation:`${Lx} 3s ease-in-out infinite`,position:`relative`,zIndex:1}),noKpiIcon:(0,f.css)({fontSize:`36px`,color:o.tokens.colorNeutralForegroundOnBrand}),noKpiSparkle1:(0,f.css)({position:`absolute`,top:`-8px`,right:`-8px`,color:o.tokens.colorPaletteYellowForeground1,fontSize:`20px`,animation:`${Lx} 2s ease-in-out infinite 0.5s`}),noKpiSparkle2:(0,f.css)({position:`absolute`,bottom:`-4px`,left:`-8px`,color:o.tokens.colorPaletteLavenderForeground2,fontSize:`16px`,animation:`${Lx} 2.5s ease-in-out infinite`}),noKpiTitle:(0,f.css)({fontSize:`22px`,fontWeight:o.tokens.fontWeightSemibold,color:o.tokens.colorNeutralForeground1,marginTop:`24px`,textAlign:`center`,position:`relative`,zIndex:1}),noKpiSubtitle:(0,f.css)({fontSize:`14px`,color:o.tokens.colorNeutralForeground3,textAlign:`center`,lineHeight:`1.6`,maxWidth:`320px`,marginTop:`8px`,position:`relative`,zIndex:1}),noKpiHighlight:(0,f.css)({background:`linear-gradient(90deg, ${o.tokens.colorBrandForeground1}, ${o.tokens.colorPaletteLavenderForeground2}, ${o.tokens.colorBrandForeground1})`,backgroundSize:`200% auto`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`,fontWeight:o.tokens.fontWeightSemibold,animation:`${Rx} 3s linear infinite`}),noKpiButtonContainer:(0,f.css)({marginTop:`24px`,position:`relative`,zIndex:1}),noKpiButton:(0,f.css)({borderRadius:`10px`,padding:`10px 20px`,fontWeight:o.tokens.fontWeightSemibold,transition:`transform 0.2s ease`,"&:hover":{transform:`scale(1.02)`}}),noKpiDecorativeLine:(0,f.css)({width:`60px`,height:`4px`,borderRadius:`2px`,background:`linear-gradient(90deg, ${o.tokens.colorBrandBackground}, ${o.tokens.colorPaletteLavenderBackground2})`,marginTop:`16px`,position:`relative`,zIndex:1}),footerGrid:(0,f.css)({width:`100%`,display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(80px, 1fr))`,alignItems:`center`})}),Bx=function(e){return e[e.LOWER_IS_BETTER=1]=`LOWER_IS_BETTER`,e[e.HIGHER_IS_BETTER=2]=`HIGHER_IS_BETTER`,e}({}),Vx=r=>{let{dataCard:i}=r,a=zx(),s=e.f(),[c,l]=t.useState(!1),u=t.useCallback(()=>{l(!1)},[]),d=t.useMemo(()=>i.goalMetric===Bx.LOWER_IS_BETTER?i.currentValue<=i.goal:i.currentValue>=i.goal,[i.currentValue,i.goal,i.goalMetric]),f=t.useMemo(()=>d?`success`:`error`,[d]),p=t.useMemo(()=>i.goal.toLocaleString(),[i.goal]),h=t.useMemo(()=>i.currentValue/i.totalItems*100,[i.currentValue,i.totalItems]),g=t.useMemo(()=>d?o.tokens.colorPaletteLightGreenForeground2:o.tokens.colorPaletteRedForeground2,[d]),_=t.useMemo(()=>d?o.tokens.colorPaletteLightGreenBackground1:o.tokens.colorPaletteRedBackground1,[d]),v=t.useMemo(()=>d?o.tokens.colorPaletteLightGreenBorder1:o.tokens.colorPaletteRedBorder1,[d]),y=t.useMemo(()=>({background:_,border:`1px solid ${v}`,color:g,borderRadius:`20px`,padding:`12px 12px`,fontSize:o.tokens.fontSizeBase200,fontWeight:o.tokens.fontWeightSemibold,letterSpacing:`0.3px`,maxWidth:`fit-content`}),[_,v,g]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(o.Card,{className:a.card,onMouseLeave:u,"aria-label":`${i.title||s.defaultTitle}: ${i.currentValue} of ${i.goal} ${s.goal}, ${d?s.onTrack:s.exceedGoal}`,children:[(0,n.jsx)(`div`,{className:d?a.glowBlobSuccess:a.glowBlobError}),(0,n.jsxs)(H,{gap:`m`,padding:`m`,children:[(0,n.jsx)(o.CardHeader,{header:(0,n.jsxs)(H,{direction:`vertical`,gap:`2px`,children:[(0,n.jsx)(H,{direction:`horizontal`,alignItems:`center`,gap:`8px`,children:(0,n.jsx)(o.InfoLabel,{style:{zIndex:99999},infoButton:{popover:{open:c,onOpenChange:(e,t)=>l(t.open)}},info:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(o.Text,{size:300,color:`neutralSecondary`,children:i.description||s.noDescription})}),children:(0,n.jsx)(o.Text,{weight:`bold`,size:300,children:i.title?.toUpperCase()||s.defaultTitle})})}),(0,n.jsx)(o.Text,{size:200,style:{color:o.tokens.colorNeutralForeground3,fontStyle:`italic`},children:i.goalMetric===Bx.LOWER_IS_BETTER?s.lowerIsBetter:s.higherIsBetter})]}),action:(0,n.jsx)(o.Tooltip,{content:d?`✓ ${s.withinGoalThreshold}`:`⚠ ${s.exceedsGoalThreshold}`,relationship:`description`,children:(0,n.jsx)(o.Badge,{className:a.headerActionBadge,appearance:`ghost`,size:`small`,icon:d?(0,n.jsx)(m.CheckmarkCircleRegular,{style:{color:g,fontSize:`22px`}}):(0,n.jsx)(m.AlertFilled,{style:{color:g,fontSize:`22px`}})})})}),(0,n.jsxs)(H,{gap:`s`,direction:`horizontal`,alignItems:`baseline`,paddingTop:`s`,children:[(0,n.jsxs)(o.Text,{weight:`bold`,size:900,children:[i.currentValue,` `,(0,n.jsx)(`br`,{})]}),(0,n.jsxs)(o.Text,{weight:`semibold`,size:300,color:`neutralSecondary`,children:[`/ `,i.goal,` `,s.goal]})]}),(0,n.jsxs)(H,{gap:`s`,children:[(0,n.jsxs)(H,{direction:`horizontal`,justifyContent:`space-between`,children:[(0,n.jsx)(o.Text,{size:300,color:`neutralSecondary`,children:s.progressGoal}),(0,n.jsxs)(o.Text,{size:300,color:`neutralSecondary`,weight:`bold`,children:[(i.currentValue/i.goal*100).toFixed(2),`%`]})]}),(0,n.jsx)(o.ProgressBar,{value:i.currentValue/i.goal,color:f,style:{height:`8px`},shape:`rounded`})]}),(0,n.jsxs)(o.CardFooter,{children:[(0,n.jsx)(o.Tooltip,{content:s.maxAllowedThreshold,relationship:`description`,children:(0,n.jsxs)(H,{alignItems:`center`,gap:o.tokens.spacingVerticalXXS,children:[(0,n.jsx)(m.TargetRegular,{className:a.footerIcon}),(0,n.jsx)(o.Text,{className:a.footerLabel,children:`Goal`}),(0,n.jsx)(o.Text,{className:a.footerValue,children:p})]})}),(0,n.jsx)(o.Divider,{vertical:!0,className:a.footerDivider}),(0,n.jsx)(o.Tooltip,{content:s.totalItemsInScope,relationship:`description`,children:(0,n.jsxs)(H,{alignItems:`center`,gap:o.tokens.spacingVerticalXXS,children:[(0,n.jsx)(m.DocumentRegular,{className:a.footerIcon}),(0,n.jsx)(o.Text,{className:a.footerLabel,children:s.totalItems}),(0,n.jsx)(o.Text,{className:a.footerValue,children:i.totalItems.toLocaleString()})]})}),(0,n.jsx)(o.Divider,{vertical:!0,className:a.footerDivider}),(0,n.jsx)(o.Tooltip,{content:s.currentValueAsPercent,relationship:`description`,children:(0,n.jsxs)(H,{alignItems:`center`,gap:o.tokens.spacingVerticalXXS,children:[(0,n.jsx)(m.CalculatorRegular,{className:a.footerIcon}),(0,n.jsx)(o.Text,{className:a.footerLabel,children:s.percentOfTotal}),(0,n.jsxs)(o.Text,{className:a.footerValue,children:[h.toFixed(2),`%`]})]})})]}),(0,n.jsx)(H,{children:(0,n.jsx)(o.Badge,{appearance:`outline`,size:`small`,style:y,icon:d?(0,n.jsx)(m.CheckmarkCircleRegular,{style:{fontSize:`14px`}}):(0,n.jsx)(m.AlertFilled,{style:{fontSize:`14px`}}),children:d?s.onTrack:s.exceedGoal})})]})]})})},Hx=()=>{let e=zx(),t={headerTitle:(0,f.css)({width:`120px`,height:`16px`}),headerBadge:(0,f.css)({width:`32px`,height:`32px`,borderRadius:`50%`}),mainValue:(0,f.css)({width:`80px`,height:`42px`}),goalText:(0,f.css)({width:`70px`,height:`16px`}),progressLabel:(0,f.css)({width:`80px`,height:`12px`}),progressValue:(0,f.css)({width:`50px`,height:`12px`}),progressBar:(0,f.css)({width:`100%`,height:`8px`,borderRadius:`4px`}),footerIcon:(0,f.css)({width:`16px`,height:`16px`,borderRadius:`4px`}),footerLabel:(0,f.css)({width:`50px`,height:`10px`}),footerValue:(0,f.css)({width:`40px`,height:`14px`}),badge:(0,f.css)({width:`90px`,height:`32px`,borderRadius:`20px`})};return(0,n.jsx)(o.Card,{className:e.card,children:(0,n.jsx)(o.Skeleton,{animation:`pulse`,children:(0,n.jsxs)(H,{gap:`m`,padding:`m`,children:[(0,n.jsx)(o.CardHeader,{header:(0,n.jsx)(H,{direction:`horizontal`,alignItems:`center`,gap:`8px`,children:(0,n.jsx)(o.SkeletonItem,{className:t.headerTitle})}),action:(0,n.jsx)(o.SkeletonItem,{className:t.headerBadge,shape:`circle`})}),(0,n.jsxs)(H,{gap:`s`,direction:`horizontal`,alignItems:`baseline`,paddingTop:`s`,children:[(0,n.jsx)(o.SkeletonItem,{className:t.mainValue}),(0,n.jsx)(o.SkeletonItem,{className:t.goalText})]}),(0,n.jsxs)(H,{gap:`s`,children:[(0,n.jsxs)(H,{direction:`horizontal`,justifyContent:`space-between`,children:[(0,n.jsx)(o.SkeletonItem,{className:t.progressLabel}),(0,n.jsx)(o.SkeletonItem,{className:t.progressValue})]}),(0,n.jsx)(o.SkeletonItem,{className:t.progressBar})]}),(0,n.jsxs)(o.CardFooter,{children:[(0,n.jsxs)(H,{direction:`vertical`,alignItems:`center`,gap:`xs`,children:[(0,n.jsx)(o.SkeletonItem,{className:t.footerIcon}),(0,n.jsx)(o.SkeletonItem,{className:t.footerLabel}),(0,n.jsx)(o.SkeletonItem,{className:t.footerValue})]}),(0,n.jsx)(o.Divider,{vertical:!0,style:{height:`32px`,borderColor:o.tokens.colorNeutralStroke1}}),(0,n.jsxs)(H,{direction:`vertical`,alignItems:`center`,gap:`xs`,children:[(0,n.jsx)(o.SkeletonItem,{className:t.footerIcon}),(0,n.jsx)(o.SkeletonItem,{className:t.footerLabel}),(0,n.jsx)(o.SkeletonItem,{className:t.footerValue})]}),(0,n.jsx)(o.Divider,{vertical:!0,style:{height:`32px`,borderColor:o.tokens.colorNeutralStroke1}}),(0,n.jsxs)(H,{direction:`vertical`,alignItems:`center`,gap:`xs`,children:[(0,n.jsx)(o.SkeletonItem,{className:t.footerIcon}),(0,n.jsx)(o.SkeletonItem,{className:t.footerLabel}),(0,n.jsx)(o.SkeletonItem,{className:t.footerValue})]})]}),(0,n.jsx)(H,{children:(0,n.jsx)(o.SkeletonItem,{className:t.badge})})]})})})},Ux=`/sites/mock-site/Lists/Directory Status Config`,Wx=()=>{let r=zx(),i=e._(),a=Ux,s=t.useCallback(()=>{let e=`${window.location.origin}${a}/AllItems.aspx`;window.open(e,`_blank`)},[a]);return(0,n.jsxs)(o.Card,{className:r.noKpiCardContainer,children:[(0,n.jsx)(`div`,{className:r.noKpiBackgroundOrb1}),(0,n.jsx)(`div`,{className:r.noKpiBackgroundOrb2}),(0,n.jsxs)(H,{alignItems:`center`,justifyContent:`center`,gap:`s`,children:[(0,n.jsxs)(`div`,{className:r.noKpiIconContainer,children:[(0,n.jsx)(m.DataBarVerticalStarRegular,{className:r.noKpiIcon}),(0,n.jsx)(m.SparkleRegular,{className:r.noKpiSparkle1}),(0,n.jsx)(m.SparkleRegular,{className:r.noKpiSparkle2})]}),(0,n.jsx)(o.Text,{className:r.noKpiTitle,children:i.title}),(0,n.jsx)(`div`,{className:r.noKpiDecorativeLine}),(0,n.jsxs)(o.Text,{className:r.noKpiSubtitle,children:[i.subtitle.split(`{highlight}`)[0],(0,n.jsx)(`span`,{className:r.noKpiHighlight,children:i.highlightText}),i.subtitle.split(`{highlight}`)[1]]}),(0,n.jsx)(`div`,{className:r.noKpiButtonContainer,children:(0,n.jsx)(o.Button,{appearance:`outline`,icon:(0,n.jsx)(m.SettingsRegular,{}),className:r.noKpiButton,onClick:s,children:i.configureButton})})]})]})},Gx=r=>{let{dataCard:i}=r,a=zx(),s=e.f(),[c,l]=t.useState(!1),u=t.useCallback(()=>{l(!1)},[]),d=t.useMemo(()=>i.goalMetric===Bx.LOWER_IS_BETTER?i.currentValue<=i.goal:i.currentValue>=i.goal,[i.currentValue,i.goal,i.goalMetric]),f=t.useMemo(()=>d?`success`:`error`,[d]),p=t.useMemo(()=>d?o.tokens.colorPaletteLightGreenForeground2:o.tokens.colorPaletteRedForeground2,[d]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(o.Card,{className:a.card,style:{height:`168px`},onMouseLeave:u,children:[(0,n.jsx)(`div`,{className:d?a.glowBlobSuccess:a.glowBlobError}),(0,n.jsxs)(H,{gap:`0px`,padding:`m`,children:[(0,n.jsx)(o.CardHeader,{header:(0,n.jsxs)(H,{direction:`vertical`,gap:`2px`,children:[(0,n.jsx)(H,{direction:`horizontal`,alignItems:`center`,gap:`8px`,children:(0,n.jsx)(o.InfoLabel,{infoButton:{popover:{open:c,onOpenChange:(e,t)=>l(t.open)}},info:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(o.Text,{size:300,color:`neutralSecondary`,children:i.description||s.noDescription})}),children:(0,n.jsx)(o.Text,{weight:`bold`,size:300,children:i.title?.toUpperCase()||s.defaultTitle})})}),(0,n.jsx)(o.Text,{size:200,style:{color:o.tokens.colorNeutralForeground3,fontStyle:`italic`},children:i.goalMetric===Bx.LOWER_IS_BETTER?s.lowerIsBetter:s.higherIsBetter})]}),action:(0,n.jsx)(o.Tooltip,{content:d?`✓ ${s.withinGoalThreshold}`:`⚠ ${s.exceedsGoalThreshold}`,relationship:`inaccessible`,children:(0,n.jsx)(o.Badge,{className:a.headerActionBadge,appearance:`ghost`,size:`small`,icon:d?(0,n.jsx)(m.CheckmarkCircleRegular,{style:{color:p,fontSize:`22px`}}):(0,n.jsx)(m.AlertFilled,{style:{color:p,fontSize:`22px`}})})})}),(0,n.jsxs)(H,{gap:`s`,direction:`horizontal`,alignItems:`baseline`,children:[(0,n.jsxs)(o.Text,{weight:`bold`,size:900,children:[i.currentValue,` `,(0,n.jsx)(`br`,{})]}),(0,n.jsxs)(o.Text,{weight:`semibold`,size:300,color:`neutralSecondary`,children:[`/ `,i.goal,` `,s.goal]})]}),(0,n.jsxs)(H,{gap:`s`,children:[(0,n.jsxs)(H,{direction:`horizontal`,justifyContent:`space-between`,children:[(0,n.jsx)(o.Text,{size:300,color:`neutralSecondary`,children:s.progressGoal}),(0,n.jsxs)(o.Text,{size:300,color:`neutralSecondary`,weight:`bold`,children:[(i.currentValue/i.goal*100).toFixed(2),`%`]})]}),(0,n.jsx)(o.ProgressBar,{value:i.currentValue/i.goal,color:f,style:{height:`3px`},shape:`rounded`})]})]})]})})},Kx=[{identifier:`kpi-1`,title:`Sales Revenue`,currentValue:125,goal:150,totalItems:200,description:`This is a comprehensive description of the Total Sales Revenue KPI for Q1. This metric tracks all revenue generated from product sales, service contracts, and recurring subscriptions across all business units and geographic regions. The goal is set based on historical performance, market conditions, and strategic growth objectives. Performance is evaluated weekly with detailed breakdowns by product category, sales team, and customer segment. This KPI is critical for quarterly business reviews and investor reporting.`,goalMetric:2},{identifier:`kpi-2`,title:`Customer Satisfaction`,currentValue:87,goal:90,totalItems:100,description:`Customer satisfaction score`,goalMetric:1},{identifier:`kpi-3`,title:`Tasks Completed`,currentValue:42,goal:50,totalItems:60,description:`Number of tasks completed this month`,goalMetric:2},{identifier:`kpi-4`,title:`New Customers`,currentValue:156,goal:200,totalItems:250,description:`New customer acquisitions this quarter`,goalMetric:1},{identifier:`kpi-5`,title:`Response Time`,currentValue:2.5,goal:2,totalItems:5,description:`Average response time in hours`,goalMetric:2},{identifier:`kpi-6`,title:`Employee Engagement`,currentValue:78,goal:85,totalItems:100,description:`Employee engagement score percentage`,goalMetric:1}],qx=e=>{let{skeletonCount:r=3,compact:i=!1}=e,a=zx(),o=Kx;return t.useCallback(()=>Array.from({length:r}).map((e,t)=>(0,n.jsx)(Hx,{},`kpi-skeleton-${t}`)),[r]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(H,{gap:`l`,direction:`horizontal`,padding:`l`,paddingTop:`s`,children:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{className:a.kpiContainer,children:o.length>0?o.map(e=>i?(0,n.jsx)(Gx,{dataCard:e},e.identifier):(0,n.jsx)(Vx,{dataCard:e},e.identifier)):(0,n.jsx)(Wx,{})})})})})},Jx=new Set([`p`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`li`,`td`,`th`]),Yx=(e,t)=>{let n=parseFloat(e.borderTopLeftRadius)||0,r=parseFloat(e.borderTopRightRadius)||0,i=parseFloat(e.borderBottomRightRadius)||0,a=parseFloat(e.borderBottomLeftRadius)||0;if(n===0&&r===0&&i===0&&a===0)return;let o=t?(()=>{let e=t.getBoundingClientRect();return e.width>0&&e.height>0&&Math.abs(e.width-e.height)<4})():!1;return e.borderRadius===`50%`?`50%`:Math.max(n,r,i,a)>9998?o?`50%`:9999:n===r&&r===i&&i===a?n===8?void 0:n:`${n}px ${r}px ${i}px ${a}px`},Xx=(e,t=`component`,n)=>{let r=e.getBoundingClientRect(),i=[],a=n?.leafTags?new Set([...Jx,...n.leafTags]):Jx,o=n?.captureRoundedBorders??!0,s=n?.excludeTags?new Set(n.excludeTags):null,c=n?.excludeSelectors??null,l=e=>{let t=getComputedStyle(e);if(t.display===`none`||t.visibility===`hidden`||t.opacity===`0`)return;let n=e.tagName.toLowerCase();if(s?.has(n)||c?.some(t=>e.matches(t)))return;let u=[...e.children].filter(e=>{let t=getComputedStyle(e);return t.display!==`none`&&t.visibility!==`hidden`&&t.opacity!==`0`}),d=n===`img`||n===`svg`||n===`video`||n===`canvas`,f=n===`input`||n===`button`||n===`textarea`||n===`select`,p=u.length===0||d||f||a.has(n),m=t.backgroundColor,h=m!==`rgba(0, 0, 0, 0)`&&m!==`transparent`,g=t.backgroundImage!==`none`,_=parseFloat(t.borderTopWidth)||0,v=o&&_>0&&t.borderTopColor!==`rgba(0, 0, 0, 0)`&&t.borderTopColor!==`transparent`,y=(parseFloat(t.borderTopLeftRadius)||0)>0,b=h||g||v&&y,x=n===`tr`||n===`td`||n===`th`||n===`thead`||n===`tbody`||n===`table`;if(p){let n=e.getBoundingClientRect();if(n.width<1||n.height<1)return;let a=d&&n.width>0&&n.height>0&&Math.abs(n.width-n.height)<4,o=x?0:a?`50%`:Yx(t,e)??8,s=r.width;i.push({x:s>0?+((n.left-r.left)/s*100).toFixed(4):0,y:Math.round(n.top-r.top),w:s>0?+(n.width/s*100).toFixed(4):0,h:Math.round(n.height),r:o});return}if(b){let n=e.getBoundingClientRect();if(n.width>=1&&n.height>=1){let a=x?0:Yx(t,e)??8,o=r.width;i.push({x:o>0?+((n.left-r.left)/o*100).toFixed(4):0,y:Math.round(n.top-r.top),w:o>0?+(n.width/o*100).toFixed(4):0,h:Math.round(n.height),r:a,c:!0})}}for(let e of u)l(e)};for(let t of e.children)l(t);return{name:t,viewportWidth:Math.round(r.width),width:Math.round(r.width),height:Math.round(r.height),bones:i}},Zx=(e,n,r,i,a)=>{let[o,s]=(0,t.useState)(null);return(0,t.useEffect)(()=>{if(!n||r||o)return;let t=e.current;if(!t)return;let c=requestAnimationFrame(()=>{let e=t.querySelector(`[data-skeleton-content]`);if(e&&e.children.length>0){let t=Xx(e,i??`auto`,a);t.bones.length>0&&s(t)}});return()=>cancelAnimationFrame(c)},[n,r,o,i,a,e]),o},Qx={angle:110,start:25,end:75,speed:`1.8s`},$x={speed:`1.5s`},eS={bone:`var(--colorNeutralStencil1)`,shimmerHighlight:`var(--colorNeutralStencil2)`},tS=new Map,nS=e=>{for(let[t,n]of Object.entries(e))tS.set(t,n)},rS=e=>tS.get(e),iS=()=>{typeof window<`u`&&window.__SKELETON_BUILD&&(window.__SKELETON_SNAPSHOT=Xx)},aS=()=>typeof window<`u`&&window.__SKELETON_BUILD===!0,oS=(e,t)=>{if(!(`breakpoints`in e))return e;let n=Object.keys(e.breakpoints).map(Number).sort((e,t)=>e-t);if(n.length===0)return null;let r=[...n].reverse().find(e=>t>=e)??n[0];return e.breakpoints[r]??null},sS=e=>Array.isArray(e)?{x:e[0],y:e[1],w:e[2],h:e[3],r:e[4],c:e[5]||void 0}:e,cS={},lS=e=>{cS={...cS,...e}},uS=()=>cS,dS=()=>(0,t.useMemo)(()=>({SHIMMER:Qx,PULSE:$x,DEFAULTS:eS,getRegisteredBones:rS,isBuildMode:aS,normalizeBone:sS,resolveResponsive:oS,getGlobalConfig:uS}),[]),fS=(0,f.keyframes)({"0%, 100%":{opacity:1},"50%":{opacity:.4}}),pS=(0,f.keyframes)({"0%":{backgroundPosition:`200% 0`},"100%":{backgroundPosition:`-200% 0`}}),mS=(0,f.keyframes)({from:{opacity:0},to:{opacity:1}}),hS=(0,f.css)({position:`relative`}),gS=(0,f.css)({position:`absolute`,inset:0,overflow:`hidden`}),_S=(0,f.css)({visibility:`hidden`,pointerEvents:`none`}),vS=(0,f.css)({position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`}),yS={position:`relative`,width:`100%`,height:`100%`},bS=()=>({container:hS,overlay:gS,hiddenContent:_S,fallbackOverlay:vS});iS();var xS=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/,SS=e=>{let[n,r]=(0,t.useState)(!1),i=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(typeof window>`u`)return;let t=e.current;if(!t)return;let n=document.createElement(`span`);n.style.display=`none`,n.style.color=o.tokens.colorNeutralBackground1,t.appendChild(n),i.current=n;let a=()=>{let e=getComputedStyle(n).color.match(xS);if(e){r((parseInt(e[1],10)*299+parseInt(e[2],10)*587+parseInt(e[3],10)*114)/1e3<128);return}r(document.documentElement.classList.contains(`dark`)||!!t.closest(`.dark`))};a();let s=new MutationObserver(a);return s.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]}),()=>{s.disconnect(),n.parentNode&&n.parentNode.removeChild(n),i.current=null}},[e]),n},CS=({loading:e,children:r,name:i,initialBones:a,color:s,darkColor:c,animate:l,stagger:u=!1,transition:d=!1,boneClass:f,className:p,style:m,fallback:h,fixture:g,snapshotConfig:_})=>{let v=bS(),{DEFAULTS:y,SHIMMER:b,PULSE:x,getRegisteredBones:S,isBuildMode:C,normalizeBone:w,resolveResponsive:T,getGlobalConfig:E}=dS(),D=(0,t.useRef)(null),[O,k]=(0,t.useState)(0),[A,j]=(0,t.useState)(0),M=SS(D),N=E(),P=s??N.color,F=c??N.darkColor,I=!!(P||F),L=I?M?F??P:P??y.bone:y.bone,R=l??N.animate??`pulse`,ee=R===!0?`pulse`:R===!1?`solid`:R;(0,t.useEffect)(()=>{let e=D.current;if(!e)return;let t=new ResizeObserver(e=>{let t=e[0]?.contentRect;k(Math.round(t?.width??0)),t&&t.height>0&&j(Math.round(t.height))});t.observe(e);let n=e.getBoundingClientRect();return k(Math.round(n.width)),n.height>0&&j(Math.round(n.height)),()=>t.disconnect()},[]);let te=(0,t.useMemo)(()=>{let e={};return i&&(e[`data-skeleton`]=i,_&&(e[`data-skeleton-config`]=JSON.stringify(_))),e},[i,_]),[ne,z]=(0,t.useState)(!1);(0,t.useLayoutEffect)(()=>{z(!0)},[]);let re=a??(i?S(i):void 0),ie=ne&&typeof window<`u`?window.innerWidth:0,ae=O>0?O:ie,oe=re&&ae>0?T(re,ae):null,se=Zx(D,e,oe,i,_),ce=oe??se,le=(0,t.useMemo)(()=>{let e=u??N.stagger;return e===!0?80:e===!1||!e?0:e},[u,N.stagger]),ue=(0,t.useMemo)(()=>{let e=d??N.transition;return e===!0?300:e===!1||!e?0:e},[d,N.transition]),[de,fe]=(0,t.useState)(!1),pe=(0,t.useRef)(e),me=(0,t.useRef)(null);(0,t.useEffect)(()=>(pe.current&&!e&&ue>0&&ce&&(me.current&&clearTimeout(me.current),fe(!0),me.current=setTimeout(()=>{fe(!1),me.current=null},ue)),pe.current=e,()=>{me.current&&clearTimeout(me.current)}),[e,ue,ce]);let he=(e||de)&&ce,ge=e&&!ce&&!de,_e=A>0?A:ce?.height??0,ve=ce?.height??0,ye=_e>0&&ve>0?_e/ve:1,be=(0,t.useMemo)(()=>ce?ce.bones.map(w).filter(e=>!e.c):[],[ce]),B=(0,t.useCallback)((e,t)=>{let n=e.w/100*(ce?.width??0),r=e.r===`50%`&&Math.abs(n-e.h)<4,i=r?0:2,a=e.h*ye,o=Math.max(a-i*2,2),s={position:`absolute`,left:`${e.x}%`,top:e.y*ye+i,width:r?e.h*ye:`${e.w}%`,height:o,borderRadius:typeof e.r==`string`?e.r:`${e.r}px`},c=N.speed;if(ee===`shimmer`){let e=I?M?N.darkShimmerColor??y.shimmerHighlight:N.shimmerColor??y.shimmerHighlight:y.shimmerHighlight;s.backgroundImage=`linear-gradient(${N.shimmerAngle??b.angle}deg, ${L} ${b.start}%, ${e} 50%, ${L} ${b.end}%)`,s.backgroundSize=`200% 100%`,s.animation=`${pS} ${c??b.speed} linear infinite`}else s.backgroundColor=L,ee===`pulse`&&(s.animation=`${fS} ${c??x.speed} ease-in-out infinite`);return le>0&&(s.opacity=0,s.animation=`${s.animation?`${s.animation}, `:``}${mS} 0.3s ease-out ${t*le}ms forwards`),s},[ce,ye,ee,L,I,M,N,le]);if(C())return(0,n.jsx)(`div`,{ref:D,className:(0,o.mergeClasses)(v.container,p),style:m,...te,children:(0,n.jsx)(`div`,{children:g??r})});let xe=e?{"aria-busy":`true`,"aria-label":`Loading content`}:{};return(0,n.jsxs)(`div`,{ref:D,className:(0,o.mergeClasses)(v.container,p),style:m,role:`status`,...xe,...te,children:[(0,n.jsx)(`div`,{"data-skeleton-content":`true`,className:he?v.hiddenContent:void 0,children:r}),ge&&h&&(0,n.jsx)(`div`,{className:v.fallbackOverlay,children:h}),he&&(0,n.jsx)(`div`,{"data-skeleton-overlay":`true`,className:v.overlay,"aria-hidden":`true`,style:{opacity:de?0:1,transition:ue>0?`opacity ${ue}ms ease-out`:void 0},children:(0,n.jsx)(`div`,{style:yS,children:be.map((e,t)=>(0,n.jsx)(`div`,{"data-skeleton-bone":`true`,className:f??N.boneClass,style:B(e,t)},t))})})]})},wS=()=>{let e=t.useRef(``);return e.current||=`fui-`+Math.random().toString(36).slice(2,9),e.current},TS=e=>{let t=wS(),{theme:r=o.webLightTheme,applicationName:i=t,targetDocument:a=document,applyStylesToPortals:s=!0,className:c,styles:l,children:u}=e;return(0,n.jsx)(o.IdPrefixProvider,{value:i,children:(0,n.jsx)(o.FluentProvider,{theme:r,applyStylesToPortals:s,targetDocument:a,className:c,style:l,children:u})})},ES=(0,f.keyframes)({from:{opacity:0,transform:`scale(1.03)`},to:{opacity:1,transform:`scale(1)`}}),DS={"top-left":{justify:`flex-start`,align:`flex-start`,textAlign:`left`},"top-center":{justify:`flex-start`,align:`center`,textAlign:`center`},"top-right":{justify:`flex-start`,align:`flex-end`,textAlign:`right`},"center-left":{justify:`center`,align:`flex-start`,textAlign:`left`},center:{justify:`center`,align:`center`,textAlign:`center`},"center-right":{justify:`center`,align:`flex-end`,textAlign:`right`},"bottom-left":{justify:`flex-end`,align:`flex-start`,textAlign:`left`},"bottom-center":{justify:`flex-end`,align:`center`,textAlign:`center`},"bottom-right":{justify:`flex-end`,align:`flex-end`,textAlign:`right`}},OS=(e,n,r=`image`)=>{let{borderRadius:i}=e,{getBaseStyles:a}=xu(),s=i??o.tokens.borderRadiusMedium,c=n>0&&n<576;return{heroRootStyles:t.useCallback((t,n)=>({...a(e,t,n),overflow:`hidden`}),[a,e]),item:(0,f.css)({position:`relative`,overflow:`hidden`,width:`100%`,height:`100%`,borderRadius:s,animation:`${ES} 0.5s ease-out`}),overlayRoot:(0,f.css)({position:`absolute`,inset:0,display:`flex`,flexDirection:`column`,borderRadius:s,overflow:`hidden`,zIndex:1,pointerEvents:`none`,background:`color-mix(in srgb, ${o.tokens.colorBackgroundOverlay} 50%, transparent)`}),overlayScrim:e=>(0,f.css)({position:`absolute`,inset:0,background:`linear-gradient(
485
+ `,zx=()=>({card:(0,f.css)({width:`100%`,height:`310px`,borderRadius:10,background:o.tokens.colorNeutralBackground1,border:`1px solid ${o.tokens.colorNeutralStroke1}`,boxShadow:o.tokens.shadow8,overflow:`visible`,position:`relative`,padding:`0px 15px !important`,transition:`transform 0.25s ease, box-shadow 0.25s ease`,"&:hover, &:focus-within":{zIndex:10,transform:`translateY(-2px)`,boxShadow:o.tokens.shadow16}}),description:(0,f.css)({fontSize:o.tokens.fontSizeBase300,color:o.tokens.colorNeutralForeground4,lineHeight:o.tokens.lineHeightBase400,position:`relative`,zIndex:1}),footerMetric:(0,f.css)({display:`flex`,flexDirection:`column`,alignItems:`center`,gap:o.tokens.spacingVerticalXXS}),footerIcon:(0,f.css)({color:o.tokens.colorNeutralForeground3,fontSize:o.tokens.fontSizeBase300}),footerLabel:(0,f.css)({fontSize:`${o.tokens.fontSizeBase100} !important`,color:o.tokens.colorNeutralForeground3,textTransform:`uppercase`,letterSpacing:`0.8px`,fontWeight:o.tokens.fontWeightMedium,textAlign:`center`}),footerValue:(0,f.css)({fontSize:`${o.tokens.fontSizeBase400} !important`,fontWeight:o.tokens.fontWeightSemibold,color:o.tokens.colorNeutralForeground2,textAlign:`center`}),footerDivider:(0,f.css)({height:`32px`,borderColor:o.tokens.colorNeutralStroke1}),glowBlob:(0,f.css)({position:`absolute`,top:`-60px`,right:`-60px`,width:`180px`,height:`180px`,borderRadius:`50%`,pointerEvents:`none`,zIndex:0,filter:`blur(40px)`}),glowBlobSuccess:(0,f.css)({position:`absolute`,top:`-40px`,right:`-40px`,width:`160px`,height:`160px`,borderRadius:`50%`,pointerEvents:`none`,zIndex:0,background:`radial-gradient(circle, ${o.tokens.colorPaletteLightGreenBackground2} 0%, transparent 70%)`,opacity:.7,filter:`blur(20px)`}),glowBlobError:(0,f.css)({position:`absolute`,top:`-40px`,right:`-40px`,width:`160px`,height:`160px`,borderRadius:`50%`,pointerEvents:`none`,zIndex:0,background:`radial-gradient(circle, ${o.tokens.colorPaletteRedBackground2} 0%, transparent 70%)`,opacity:.6,filter:`blur(20px)`}),headerActionBadge:(0,f.css)({minWidth:`32px`,height:`32px`,borderRadius:`50% !important`,background:`${o.tokens.colorNeutralBackground3} !important`,border:`none !important`,padding:`0 !important`,display:`flex`,alignItems:`center`,justifyContent:`center`}),kpiContainer:(0,f.css)({width:`100%`,backgroundColor:o.tokens.colorNeutralBackground2,borderRadius:8,display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(min(100%, 280px), 1fr))`,gap:16,padding:16}),iconContainer:(0,f.css)({width:48,height:48,borderRadius:8,display:`grid`,placeItems:`center`,background:o.tokens.colorNeutralBackgroundInverted}),noKpiCard:(0,f.css)({width:280,minHeight:160,display:`flex`,alignItems:`center`,justifyContent:`center`}),noKpiCardContainer:(0,f.css)({width:`100%`,minWidth:`280px`,minHeight:`280px`,borderRadius:`16px`,background:`linear-gradient(135deg, ${o.tokens.colorNeutralBackground1} 0%, ${o.tokens.colorNeutralBackground3} 100%)`,border:`1px solid ${o.tokens.colorNeutralStroke1}`,boxShadow:o.tokens.shadow16,overflow:`hidden`,position:`relative`,padding:`32px`,transition:`transform 0.3s ease, box-shadow 0.3s ease`,"&:hover":{transform:`translateY(-4px)`,boxShadow:o.tokens.shadow28}}),noKpiBackgroundOrb1:(0,f.css)({position:`absolute`,top:`0px`,right:`0px`,width:`180px`,height:`180px`,borderRadius:`50%`,background:`radial-gradient(circle, ${o.tokens.colorBrandBackground2} 0%, transparent 70%)`,opacity:.8,pointerEvents:`none`,filter:`blur(25px)`,transform:`translate(30%, -30%)`}),noKpiBackgroundOrb2:(0,f.css)({position:`absolute`,bottom:`-30px`,left:`-30px`,width:`120px`,height:`120px`,borderRadius:`50%`,background:`radial-gradient(circle, ${o.tokens.colorPaletteLavenderBackground2} 0%, transparent 70%)`,opacity:.5,pointerEvents:`none`,filter:`blur(20px)`}),noKpiIconContainer:(0,f.css)({width:`80px`,height:`80px`,borderRadius:`20px`,background:`linear-gradient(135deg, ${o.tokens.colorBrandBackground} 0%, ${o.tokens.colorBrandBackground2} 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px ${o.tokens.colorBrandBackground}40`,animation:`${Lx} 3s ease-in-out infinite`,position:`relative`,zIndex:1}),noKpiIcon:(0,f.css)({fontSize:`36px`,color:o.tokens.colorNeutralForegroundOnBrand}),noKpiSparkle1:(0,f.css)({position:`absolute`,top:`-8px`,right:`-8px`,color:o.tokens.colorPaletteYellowForeground1,fontSize:`20px`,animation:`${Lx} 2s ease-in-out infinite 0.5s`}),noKpiSparkle2:(0,f.css)({position:`absolute`,bottom:`-4px`,left:`-8px`,color:o.tokens.colorPaletteLavenderForeground2,fontSize:`16px`,animation:`${Lx} 2.5s ease-in-out infinite`}),noKpiTitle:(0,f.css)({fontSize:`22px`,fontWeight:o.tokens.fontWeightSemibold,color:o.tokens.colorNeutralForeground1,marginTop:`24px`,textAlign:`center`,position:`relative`,zIndex:1}),noKpiSubtitle:(0,f.css)({fontSize:`14px`,color:o.tokens.colorNeutralForeground3,textAlign:`center`,lineHeight:`1.6`,maxWidth:`320px`,marginTop:`8px`,position:`relative`,zIndex:1}),noKpiHighlight:(0,f.css)({background:`linear-gradient(90deg, ${o.tokens.colorBrandForeground1}, ${o.tokens.colorPaletteLavenderForeground2}, ${o.tokens.colorBrandForeground1})`,backgroundSize:`200% auto`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`,fontWeight:o.tokens.fontWeightSemibold,animation:`${Rx} 3s linear infinite`}),noKpiButtonContainer:(0,f.css)({marginTop:`24px`,position:`relative`,zIndex:1}),noKpiButton:(0,f.css)({borderRadius:`10px`,padding:`10px 20px`,fontWeight:o.tokens.fontWeightSemibold,transition:`transform 0.2s ease`,"&:hover":{transform:`scale(1.02)`}}),noKpiDecorativeLine:(0,f.css)({width:`60px`,height:`4px`,borderRadius:`2px`,background:`linear-gradient(90deg, ${o.tokens.colorBrandBackground}, ${o.tokens.colorPaletteLavenderBackground2})`,marginTop:`16px`,position:`relative`,zIndex:1}),footerGrid:(0,f.css)({width:`100%`,display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(80px, 1fr))`,alignItems:`center`})}),Bx=function(e){return e[e.LOWER_IS_BETTER=1]=`LOWER_IS_BETTER`,e[e.HIGHER_IS_BETTER=2]=`HIGHER_IS_BETTER`,e}({}),Vx=r=>{let{dataCard:i}=r,a=zx(),s=e.f(),[c,l]=t.useState(!1),u=t.useCallback(()=>{l(!1)},[]),d=t.useMemo(()=>i.goalMetric===Bx.LOWER_IS_BETTER?i.currentValue<=i.goal:i.currentValue>=i.goal,[i.currentValue,i.goal,i.goalMetric]),f=t.useMemo(()=>d?`success`:`error`,[d]),p=t.useMemo(()=>i.goal.toLocaleString(),[i.goal]),h=t.useMemo(()=>i.currentValue/i.totalItems*100,[i.currentValue,i.totalItems]),g=t.useMemo(()=>d?o.tokens.colorPaletteLightGreenForeground2:o.tokens.colorPaletteRedForeground2,[d]),_=t.useMemo(()=>d?o.tokens.colorPaletteLightGreenBackground1:o.tokens.colorPaletteRedBackground1,[d]),v=t.useMemo(()=>d?o.tokens.colorPaletteLightGreenBorder1:o.tokens.colorPaletteRedBorder1,[d]),y=t.useMemo(()=>({background:_,border:`1px solid ${v}`,color:g,borderRadius:`20px`,padding:`12px 12px`,fontSize:o.tokens.fontSizeBase200,fontWeight:o.tokens.fontWeightSemibold,letterSpacing:`0.3px`,maxWidth:`fit-content`}),[_,v,g]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(o.Card,{className:a.card,onMouseLeave:u,"aria-label":`${i.title||s.defaultTitle}: ${i.currentValue} of ${i.goal} ${s.goal}, ${d?s.onTrack:s.exceedGoal}`,children:[(0,n.jsx)(`div`,{className:d?a.glowBlobSuccess:a.glowBlobError}),(0,n.jsxs)(H,{gap:`m`,padding:`m`,children:[(0,n.jsx)(o.CardHeader,{header:(0,n.jsxs)(H,{direction:`vertical`,gap:`2px`,children:[(0,n.jsx)(H,{direction:`horizontal`,alignItems:`center`,gap:`8px`,children:(0,n.jsx)(o.InfoLabel,{style:{zIndex:99999},infoButton:{popover:{open:c,onOpenChange:(e,t)=>l(t.open)}},info:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(o.Text,{size:300,color:`neutralSecondary`,children:i.description||s.noDescription})}),children:(0,n.jsx)(o.Text,{weight:`bold`,size:300,children:i.title?.toUpperCase()||s.defaultTitle})})}),(0,n.jsx)(o.Text,{size:200,style:{color:o.tokens.colorNeutralForeground3,fontStyle:`italic`},children:i.goalMetric===Bx.LOWER_IS_BETTER?s.lowerIsBetter:s.higherIsBetter})]}),action:(0,n.jsx)(o.Tooltip,{content:d?`✓ ${s.withinGoalThreshold}`:`⚠ ${s.exceedsGoalThreshold}`,relationship:`description`,children:(0,n.jsx)(o.Badge,{className:a.headerActionBadge,appearance:`ghost`,size:`small`,icon:d?(0,n.jsx)(m.CheckmarkCircleRegular,{style:{color:g,fontSize:`22px`}}):(0,n.jsx)(m.AlertFilled,{style:{color:g,fontSize:`22px`}})})})}),(0,n.jsxs)(H,{gap:`s`,direction:`horizontal`,alignItems:`baseline`,paddingTop:`s`,children:[(0,n.jsxs)(o.Text,{weight:`bold`,size:900,children:[i.currentValue,` `,(0,n.jsx)(`br`,{})]}),(0,n.jsxs)(o.Text,{weight:`semibold`,size:300,color:`neutralSecondary`,children:[`/ `,i.goal,` `,s.goal]})]}),(0,n.jsxs)(H,{gap:`s`,children:[(0,n.jsxs)(H,{direction:`horizontal`,justifyContent:`space-between`,children:[(0,n.jsx)(o.Text,{size:300,color:`neutralSecondary`,children:s.progressGoal}),(0,n.jsxs)(o.Text,{size:300,color:`neutralSecondary`,weight:`bold`,children:[(i.currentValue/i.goal*100).toFixed(2),`%`]})]}),(0,n.jsx)(o.ProgressBar,{value:i.currentValue/i.goal,color:f,style:{height:`8px`},shape:`rounded`})]}),(0,n.jsxs)(o.CardFooter,{children:[(0,n.jsx)(o.Tooltip,{content:s.maxAllowedThreshold,relationship:`description`,children:(0,n.jsxs)(H,{alignItems:`center`,gap:o.tokens.spacingVerticalXXS,children:[(0,n.jsx)(m.TargetRegular,{className:a.footerIcon}),(0,n.jsx)(o.Text,{className:a.footerLabel,children:`Goal`}),(0,n.jsx)(o.Text,{className:a.footerValue,children:p})]})}),(0,n.jsx)(o.Divider,{vertical:!0,className:a.footerDivider}),(0,n.jsx)(o.Tooltip,{content:s.totalItemsInScope,relationship:`description`,children:(0,n.jsxs)(H,{alignItems:`center`,gap:o.tokens.spacingVerticalXXS,children:[(0,n.jsx)(m.DocumentRegular,{className:a.footerIcon}),(0,n.jsx)(o.Text,{className:a.footerLabel,children:s.totalItems}),(0,n.jsx)(o.Text,{className:a.footerValue,children:i.totalItems.toLocaleString()})]})}),(0,n.jsx)(o.Divider,{vertical:!0,className:a.footerDivider}),(0,n.jsx)(o.Tooltip,{content:s.currentValueAsPercent,relationship:`description`,children:(0,n.jsxs)(H,{alignItems:`center`,gap:o.tokens.spacingVerticalXXS,children:[(0,n.jsx)(m.CalculatorRegular,{className:a.footerIcon}),(0,n.jsx)(o.Text,{className:a.footerLabel,children:s.percentOfTotal}),(0,n.jsxs)(o.Text,{className:a.footerValue,children:[h.toFixed(2),`%`]})]})})]}),(0,n.jsx)(H,{children:(0,n.jsx)(o.Badge,{appearance:`outline`,size:`small`,style:y,icon:d?(0,n.jsx)(m.CheckmarkCircleRegular,{style:{fontSize:`14px`}}):(0,n.jsx)(m.AlertFilled,{style:{fontSize:`14px`}}),children:d?s.onTrack:s.exceedGoal})})]})]})})},Hx=()=>{let e=zx(),t={headerTitle:(0,f.css)({width:`120px`,height:`16px`}),headerBadge:(0,f.css)({width:`32px`,height:`32px`,borderRadius:`50%`}),mainValue:(0,f.css)({width:`80px`,height:`42px`}),goalText:(0,f.css)({width:`70px`,height:`16px`}),progressLabel:(0,f.css)({width:`80px`,height:`12px`}),progressValue:(0,f.css)({width:`50px`,height:`12px`}),progressBar:(0,f.css)({width:`100%`,height:`8px`,borderRadius:`4px`}),footerIcon:(0,f.css)({width:`16px`,height:`16px`,borderRadius:`4px`}),footerLabel:(0,f.css)({width:`50px`,height:`10px`}),footerValue:(0,f.css)({width:`40px`,height:`14px`}),badge:(0,f.css)({width:`90px`,height:`32px`,borderRadius:`20px`})};return(0,n.jsx)(o.Card,{className:e.card,children:(0,n.jsx)(o.Skeleton,{animation:`pulse`,children:(0,n.jsxs)(H,{gap:`m`,padding:`m`,children:[(0,n.jsx)(o.CardHeader,{header:(0,n.jsx)(H,{direction:`horizontal`,alignItems:`center`,gap:`8px`,children:(0,n.jsx)(o.SkeletonItem,{className:t.headerTitle})}),action:(0,n.jsx)(o.SkeletonItem,{className:t.headerBadge,shape:`circle`})}),(0,n.jsxs)(H,{gap:`s`,direction:`horizontal`,alignItems:`baseline`,paddingTop:`s`,children:[(0,n.jsx)(o.SkeletonItem,{className:t.mainValue}),(0,n.jsx)(o.SkeletonItem,{className:t.goalText})]}),(0,n.jsxs)(H,{gap:`s`,children:[(0,n.jsxs)(H,{direction:`horizontal`,justifyContent:`space-between`,children:[(0,n.jsx)(o.SkeletonItem,{className:t.progressLabel}),(0,n.jsx)(o.SkeletonItem,{className:t.progressValue})]}),(0,n.jsx)(o.SkeletonItem,{className:t.progressBar})]}),(0,n.jsxs)(o.CardFooter,{children:[(0,n.jsxs)(H,{direction:`vertical`,alignItems:`center`,gap:`xs`,children:[(0,n.jsx)(o.SkeletonItem,{className:t.footerIcon}),(0,n.jsx)(o.SkeletonItem,{className:t.footerLabel}),(0,n.jsx)(o.SkeletonItem,{className:t.footerValue})]}),(0,n.jsx)(o.Divider,{vertical:!0,style:{height:`32px`,borderColor:o.tokens.colorNeutralStroke1}}),(0,n.jsxs)(H,{direction:`vertical`,alignItems:`center`,gap:`xs`,children:[(0,n.jsx)(o.SkeletonItem,{className:t.footerIcon}),(0,n.jsx)(o.SkeletonItem,{className:t.footerLabel}),(0,n.jsx)(o.SkeletonItem,{className:t.footerValue})]}),(0,n.jsx)(o.Divider,{vertical:!0,style:{height:`32px`,borderColor:o.tokens.colorNeutralStroke1}}),(0,n.jsxs)(H,{direction:`vertical`,alignItems:`center`,gap:`xs`,children:[(0,n.jsx)(o.SkeletonItem,{className:t.footerIcon}),(0,n.jsx)(o.SkeletonItem,{className:t.footerLabel}),(0,n.jsx)(o.SkeletonItem,{className:t.footerValue})]})]}),(0,n.jsx)(H,{children:(0,n.jsx)(o.SkeletonItem,{className:t.badge})})]})})})},Ux=`/sites/mock-site/Lists/Directory Status Config`,Wx=()=>{let r=zx(),i=e._(),a=Ux,s=t.useCallback(()=>{let e=`${window.location.origin}${a}/AllItems.aspx`;window.open(e,`_blank`)},[a]);return(0,n.jsxs)(o.Card,{className:r.noKpiCardContainer,children:[(0,n.jsx)(`div`,{className:r.noKpiBackgroundOrb1}),(0,n.jsx)(`div`,{className:r.noKpiBackgroundOrb2}),(0,n.jsxs)(H,{alignItems:`center`,justifyContent:`center`,gap:`s`,children:[(0,n.jsxs)(`div`,{className:r.noKpiIconContainer,children:[(0,n.jsx)(m.DataBarVerticalStarRegular,{className:r.noKpiIcon}),(0,n.jsx)(m.SparkleRegular,{className:r.noKpiSparkle1}),(0,n.jsx)(m.SparkleRegular,{className:r.noKpiSparkle2})]}),(0,n.jsx)(o.Text,{className:r.noKpiTitle,children:i.title}),(0,n.jsx)(`div`,{className:r.noKpiDecorativeLine}),(0,n.jsxs)(o.Text,{className:r.noKpiSubtitle,children:[i.subtitle.split(`{highlight}`)[0],(0,n.jsx)(`span`,{className:r.noKpiHighlight,children:i.highlightText}),i.subtitle.split(`{highlight}`)[1]]}),(0,n.jsx)(`div`,{className:r.noKpiButtonContainer,children:(0,n.jsx)(o.Button,{appearance:`outline`,icon:(0,n.jsx)(m.SettingsRegular,{}),className:r.noKpiButton,onClick:s,children:i.configureButton})})]})]})},Gx=r=>{let{dataCard:i}=r,a=zx(),s=e.f(),[c,l]=t.useState(!1),u=t.useCallback(()=>{l(!1)},[]),d=t.useMemo(()=>i.goalMetric===Bx.LOWER_IS_BETTER?i.currentValue<=i.goal:i.currentValue>=i.goal,[i.currentValue,i.goal,i.goalMetric]),f=t.useMemo(()=>d?`success`:`error`,[d]),p=t.useMemo(()=>d?o.tokens.colorPaletteLightGreenForeground2:o.tokens.colorPaletteRedForeground2,[d]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(o.Card,{className:a.card,style:{height:`168px`},onMouseLeave:u,children:[(0,n.jsx)(`div`,{className:d?a.glowBlobSuccess:a.glowBlobError}),(0,n.jsxs)(H,{gap:`0px`,padding:`m`,children:[(0,n.jsx)(o.CardHeader,{header:(0,n.jsxs)(H,{direction:`vertical`,gap:`2px`,children:[(0,n.jsx)(H,{direction:`horizontal`,alignItems:`center`,gap:`8px`,children:(0,n.jsx)(o.InfoLabel,{infoButton:{popover:{open:c,onOpenChange:(e,t)=>l(t.open)}},info:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(o.Text,{size:300,color:`neutralSecondary`,children:i.description||s.noDescription})}),children:(0,n.jsx)(o.Text,{weight:`bold`,size:300,children:i.title?.toUpperCase()||s.defaultTitle})})}),(0,n.jsx)(o.Text,{size:200,style:{color:o.tokens.colorNeutralForeground3,fontStyle:`italic`},children:i.goalMetric===Bx.LOWER_IS_BETTER?s.lowerIsBetter:s.higherIsBetter})]}),action:(0,n.jsx)(o.Tooltip,{content:d?`✓ ${s.withinGoalThreshold}`:`⚠ ${s.exceedsGoalThreshold}`,relationship:`inaccessible`,children:(0,n.jsx)(o.Badge,{className:a.headerActionBadge,appearance:`ghost`,size:`small`,icon:d?(0,n.jsx)(m.CheckmarkCircleRegular,{style:{color:p,fontSize:`22px`}}):(0,n.jsx)(m.AlertFilled,{style:{color:p,fontSize:`22px`}})})})}),(0,n.jsxs)(H,{gap:`s`,direction:`horizontal`,alignItems:`baseline`,children:[(0,n.jsxs)(o.Text,{weight:`bold`,size:900,children:[i.currentValue,` `,(0,n.jsx)(`br`,{})]}),(0,n.jsxs)(o.Text,{weight:`semibold`,size:300,color:`neutralSecondary`,children:[`/ `,i.goal,` `,s.goal]})]}),(0,n.jsxs)(H,{gap:`s`,children:[(0,n.jsxs)(H,{direction:`horizontal`,justifyContent:`space-between`,children:[(0,n.jsx)(o.Text,{size:300,color:`neutralSecondary`,children:s.progressGoal}),(0,n.jsxs)(o.Text,{size:300,color:`neutralSecondary`,weight:`bold`,children:[(i.currentValue/i.goal*100).toFixed(2),`%`]})]}),(0,n.jsx)(o.ProgressBar,{value:i.currentValue/i.goal,color:f,style:{height:`3px`},shape:`rounded`})]})]})]})})},Kx=[{identifier:`kpi-1`,title:`Sales Revenue`,currentValue:125,goal:150,totalItems:200,description:`This is a comprehensive description of the Total Sales Revenue KPI for Q1. This metric tracks all revenue generated from product sales, service contracts, and recurring subscriptions across all business units and geographic regions. The goal is set based on historical performance, market conditions, and strategic growth objectives. Performance is evaluated weekly with detailed breakdowns by product category, sales team, and customer segment. This KPI is critical for quarterly business reviews and investor reporting.`,goalMetric:2},{identifier:`kpi-2`,title:`Customer Satisfaction`,currentValue:87,goal:90,totalItems:100,description:`Customer satisfaction score`,goalMetric:1},{identifier:`kpi-3`,title:`Tasks Completed`,currentValue:42,goal:50,totalItems:60,description:`Number of tasks completed this month`,goalMetric:2},{identifier:`kpi-4`,title:`New Customers`,currentValue:156,goal:200,totalItems:250,description:`New customer acquisitions this quarter`,goalMetric:1},{identifier:`kpi-5`,title:`Response Time`,currentValue:2.5,goal:2,totalItems:5,description:`Average response time in hours`,goalMetric:2},{identifier:`kpi-6`,title:`Employee Engagement`,currentValue:78,goal:85,totalItems:100,description:`Employee engagement score percentage`,goalMetric:1}],qx=e=>{let{skeletonCount:r=3,compact:i=!1}=e,a=zx(),o=Kx;return t.useCallback(()=>Array.from({length:r}).map((e,t)=>(0,n.jsx)(Hx,{},`kpi-skeleton-${t}`)),[r]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(H,{gap:`l`,direction:`horizontal`,padding:`l`,paddingTop:`s`,children:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{className:a.kpiContainer,children:o.length>0?o.map(e=>i?(0,n.jsx)(Gx,{dataCard:e},e.identifier):(0,n.jsx)(Vx,{dataCard:e},e.identifier)):(0,n.jsx)(Wx,{})})})})})},Jx=new Set([`p`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`li`,`td`,`th`]),Yx=(e,t)=>{let n=parseFloat(e.borderTopLeftRadius)||0,r=parseFloat(e.borderTopRightRadius)||0,i=parseFloat(e.borderBottomRightRadius)||0,a=parseFloat(e.borderBottomLeftRadius)||0;if(n===0&&r===0&&i===0&&a===0)return;let o=t?(()=>{let e=t.getBoundingClientRect();return e.width>0&&e.height>0&&Math.abs(e.width-e.height)<4})():!1;return e.borderRadius===`50%`?`50%`:Math.max(n,r,i,a)>9998?o?`50%`:9999:n===r&&r===i&&i===a?n===8?void 0:n:`${n}px ${r}px ${i}px ${a}px`},Xx=(e,t=`component`,n)=>{let r=e.getBoundingClientRect(),i=[],a=n?.leafTags?new Set([...Jx,...n.leafTags]):Jx,o=n?.captureRoundedBorders??!0,s=n?.excludeTags?new Set(n.excludeTags):null,c=n?.excludeSelectors??null,l=e=>{let t=getComputedStyle(e);if(t.display===`none`||t.visibility===`hidden`||t.opacity===`0`)return;let n=e.tagName.toLowerCase();if(s?.has(n)||c?.some(t=>e.matches(t)))return;let u=[...e.children].filter(e=>{let t=getComputedStyle(e);return t.display!==`none`&&t.visibility!==`hidden`&&t.opacity!==`0`}),d=n===`img`||n===`svg`||n===`video`||n===`canvas`,f=n===`input`||n===`button`||n===`textarea`||n===`select`,p=u.length===0||d||f||a.has(n),m=t.backgroundColor,h=m!==`rgba(0, 0, 0, 0)`&&m!==`transparent`,g=t.backgroundImage!==`none`,_=parseFloat(t.borderTopWidth)||0,v=o&&_>0&&t.borderTopColor!==`rgba(0, 0, 0, 0)`&&t.borderTopColor!==`transparent`,y=(parseFloat(t.borderTopLeftRadius)||0)>0,b=h||g||v&&y,x=n===`tr`||n===`td`||n===`th`||n===`thead`||n===`tbody`||n===`table`;if(p){let n=e.getBoundingClientRect();if(n.width<1||n.height<1)return;let a=d&&n.width>0&&n.height>0&&Math.abs(n.width-n.height)<4,o=x?0:a?`50%`:Yx(t,e)??8,s=r.width;i.push({x:s>0?+((n.left-r.left)/s*100).toFixed(4):0,y:Math.round(n.top-r.top),w:s>0?+(n.width/s*100).toFixed(4):0,h:Math.round(n.height),r:o});return}if(b){let n=e.getBoundingClientRect();if(n.width>=1&&n.height>=1){let a=x?0:Yx(t,e)??8,o=r.width;i.push({x:o>0?+((n.left-r.left)/o*100).toFixed(4):0,y:Math.round(n.top-r.top),w:o>0?+(n.width/o*100).toFixed(4):0,h:Math.round(n.height),r:a,c:!0})}}for(let e of u)l(e)};for(let t of e.children)l(t);return{name:t,viewportWidth:Math.round(r.width),width:Math.round(r.width),height:Math.round(r.height),bones:i}},Zx=(e,n,r,i,a)=>{let[o,s]=(0,t.useState)(null);return(0,t.useEffect)(()=>{if(!n||r||o)return;let t=e.current;if(!t)return;let c=requestAnimationFrame(()=>{let e=t.querySelector(`[data-skeleton-content]`);if(e&&e.children.length>0){let t=Xx(e,i??`auto`,a);t.bones.length>0&&s(t)}});return()=>cancelAnimationFrame(c)},[n,r,o,i,a,e]),o},Qx={angle:110,start:25,end:75,speed:`1.8s`},$x={speed:`1.5s`},eS={bone:`var(--colorNeutralStencil1)`,shimmerHighlight:`var(--colorNeutralStencil2)`},tS=new Map,nS=e=>{for(let[t,n]of Object.entries(e))tS.set(t,n)},rS=e=>tS.get(e),iS=()=>{typeof window<`u`&&window.__SKELETON_BUILD&&(window.__SKELETON_SNAPSHOT=Xx)},aS=()=>typeof window<`u`&&window.__SKELETON_BUILD===!0,oS=(e,t)=>{if(!(`breakpoints`in e))return e;let n=Object.keys(e.breakpoints).map(Number).sort((e,t)=>e-t);if(n.length===0)return null;let r=[...n].reverse().find(e=>t>=e)??n[0];return e.breakpoints[r]??null},sS=e=>Array.isArray(e)?{x:e[0],y:e[1],w:e[2],h:e[3],r:e[4],c:e[5]||void 0}:e,cS={},lS=e=>{cS={...cS,...e}},uS=()=>cS,dS=()=>(0,t.useMemo)(()=>({SHIMMER:Qx,PULSE:$x,DEFAULTS:eS,getRegisteredBones:rS,isBuildMode:aS,normalizeBone:sS,resolveResponsive:oS,getGlobalConfig:uS}),[]),fS=(0,f.keyframes)({"0%, 100%":{opacity:1},"50%":{opacity:.4}}),pS=(0,f.keyframes)({"0%":{backgroundPosition:`200% 0`},"100%":{backgroundPosition:`-200% 0`}}),mS=(0,f.keyframes)({from:{opacity:0},to:{opacity:1}}),hS=(0,f.css)({position:`relative`}),gS=(0,f.css)({position:`absolute`,inset:0,overflow:`hidden`}),_S=(0,f.css)({visibility:`hidden`,pointerEvents:`none`}),vS=(0,f.css)({position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`}),yS={position:`relative`,width:`100%`,height:`100%`},bS=()=>({container:hS,overlay:gS,hiddenContent:_S,fallbackOverlay:vS});iS();var xS=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/,SS=e=>{let[n,r]=(0,t.useState)(!1),i=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(typeof window>`u`)return;let t=e.current;if(!t)return;let n=document.createElement(`span`);n.style.display=`none`,n.style.color=o.tokens.colorNeutralBackground1,t.appendChild(n),i.current=n;let a=()=>{let e=getComputedStyle(n).color.match(xS);if(e){r((parseInt(e[1],10)*299+parseInt(e[2],10)*587+parseInt(e[3],10)*114)/1e3<128);return}r(document.documentElement.classList.contains(`dark`)||!!t.closest(`.dark`))};a();let s=new MutationObserver(a);return s.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]}),()=>{s.disconnect(),n.parentNode&&n.parentNode.removeChild(n),i.current=null}},[e]),n},CS=({loading:e,children:r,name:i,initialBones:a,color:s,darkColor:c,animate:l,stagger:u=!1,transition:d=!1,boneClass:f,className:p,style:m,fallback:h,fixture:g,snapshotConfig:_})=>{let v=bS(),{DEFAULTS:y,SHIMMER:b,PULSE:x,getRegisteredBones:S,isBuildMode:C,normalizeBone:w,resolveResponsive:T,getGlobalConfig:E}=dS(),D=(0,t.useRef)(null),[O,k]=(0,t.useState)(0),[A,j]=(0,t.useState)(0),M=SS(D),N=E(),P=s??N.color,F=c??N.darkColor,I=!!(P||F),L=I?M?F??P:P??y.bone:y.bone,R=l??N.animate??`pulse`,ee=R===!0?`pulse`:R===!1?`solid`:R;(0,t.useEffect)(()=>{let e=D.current;if(!e)return;let t=new ResizeObserver(e=>{let t=e[0]?.contentRect;k(Math.round(t?.width??0)),t&&t.height>0&&j(Math.round(t.height))});t.observe(e);let n=e.getBoundingClientRect();return k(Math.round(n.width)),n.height>0&&j(Math.round(n.height)),()=>t.disconnect()},[]);let te=(0,t.useMemo)(()=>{let e={};return i&&(e[`data-skeleton`]=i,_&&(e[`data-skeleton-config`]=JSON.stringify(_))),e},[i,_]),[ne,z]=(0,t.useState)(!1);(0,t.useLayoutEffect)(()=>{z(!0)},[]);let re=a??(i?S(i):void 0),ie=ne&&typeof window<`u`?window.innerWidth:0,ae=O>0?O:ie,oe=re&&ae>0?T(re,ae):null,se=Zx(D,e,oe,i,_),ce=oe??se,le=(0,t.useMemo)(()=>{let e=u??N.stagger;return e===!0?80:e===!1||!e?0:e},[u,N.stagger]),ue=(0,t.useMemo)(()=>{let e=d??N.transition;return e===!0?300:e===!1||!e?0:e},[d,N.transition]),[de,fe]=(0,t.useState)(!1),pe=(0,t.useRef)(e),me=(0,t.useRef)(null);(0,t.useEffect)(()=>(pe.current&&!e&&ue>0&&ce&&(me.current&&clearTimeout(me.current),fe(!0),me.current=setTimeout(()=>{fe(!1),me.current=null},ue)),pe.current=e,()=>{me.current&&clearTimeout(me.current)}),[e,ue,ce]);let he=(e||de)&&ce,ge=e&&!ce&&!de,_e=A>0?A:ce?.height??0,ve=ce?.height??0,ye=_e>0&&ve>0?_e/ve:1,be=(0,t.useMemo)(()=>ce?ce.bones.map(w).filter(e=>!e.c):[],[ce]),B=(0,t.useCallback)((e,t)=>{let n=e.w/100*(ce?.width??0),r=e.r===`50%`&&Math.abs(n-e.h)<4,i=r?0:2,a=e.h*ye,o=Math.max(a-i*2,2),s={position:`absolute`,left:`${e.x}%`,top:e.y*ye+i,width:r?e.h*ye:`${e.w}%`,height:o,borderRadius:typeof e.r==`string`?e.r:`${e.r}px`},c=N.speed;if(ee===`shimmer`){let e=I?M?N.darkShimmerColor??y.shimmerHighlight:N.shimmerColor??y.shimmerHighlight:y.shimmerHighlight;s.backgroundImage=`linear-gradient(${N.shimmerAngle??b.angle}deg, ${L} ${b.start}%, ${e} 50%, ${L} ${b.end}%)`,s.backgroundSize=`200% 100%`,s.animation=`${pS} ${c??b.speed} linear infinite`}else s.backgroundColor=L,ee===`pulse`&&(s.animation=`${fS} ${c??x.speed} ease-in-out infinite`);return le>0&&(s.opacity=0,s.animation=`${s.animation?`${s.animation}, `:``}${mS} 0.3s ease-out ${t*le}ms forwards`),s},[ce,ye,ee,L,I,M,N,le]);if(C())return(0,n.jsx)(`div`,{ref:D,className:(0,o.mergeClasses)(v.container,p),style:m,...te,children:(0,n.jsx)(`div`,{children:g??r})});let xe=e?{"aria-busy":`true`,"aria-label":`Loading content`}:{};return(0,n.jsxs)(`div`,{ref:D,className:(0,o.mergeClasses)(v.container,p),style:m,role:`status`,...xe,...te,children:[(0,n.jsx)(`div`,{"data-skeleton-content":`true`,className:he?v.hiddenContent:void 0,children:r}),ge&&h&&(0,n.jsx)(`div`,{className:v.fallbackOverlay,children:h}),he&&(0,n.jsx)(`div`,{"data-skeleton-overlay":`true`,className:v.overlay,"aria-hidden":`true`,style:{opacity:de?0:1,transition:ue>0?`opacity ${ue}ms ease-out`:void 0},children:(0,n.jsx)(`div`,{style:yS,children:be.map((e,t)=>(0,n.jsx)(`div`,{"data-skeleton-bone":`true`,className:f??N.boneClass,style:B(e,t)},t))})})]})},wS=()=>{let e=t.useRef(``);return e.current||=`fui-`+Math.random().toString(36).slice(2,9),e.current},TS=e=>{let t=wS(),{theme:r=o.webLightTheme,applicationName:i=t,targetDocument:a=document,applyStylesToPortals:s=!0,className:c,styles:l,children:u}=e;return(0,n.jsx)(o.IdPrefixProvider,{value:i,children:(0,n.jsx)(o.FluentProvider,{theme:r,applyStylesToPortals:s,targetDocument:a,className:c,style:l,children:u})})},ES=(0,f.keyframes)({from:{opacity:0,transform:`scale(1.03)`},to:{opacity:1,transform:`scale(1)`}}),DS={"top-left":{justify:`flex-start`,align:`flex-start`,textAlign:`left`},"top-center":{justify:`flex-start`,align:`center`,textAlign:`center`},"top-right":{justify:`flex-start`,align:`flex-end`,textAlign:`right`},"center-left":{justify:`center`,align:`flex-start`,textAlign:`left`},center:{justify:`center`,align:`center`,textAlign:`center`},"center-right":{justify:`center`,align:`flex-end`,textAlign:`right`},"bottom-left":{justify:`flex-end`,align:`flex-start`,textAlign:`left`},"bottom-center":{justify:`flex-end`,align:`center`,textAlign:`center`},"bottom-right":{justify:`flex-end`,align:`flex-end`,textAlign:`right`}},OS=(e,n,r=`image`)=>{let{borderRadius:i}=e,{getBaseStyles:a}=xu(),s=i??o.tokens.borderRadiusMedium,c=n>0&&n<576,l=t.useCallback((t,n)=>({...a(e,t,n),overflow:`hidden`}),[a,e]),u=(0,f.css)({position:`relative`,overflow:`hidden`,width:`100%`,height:`100%`,borderRadius:s,animation:`${ES} 0.5s ease-out`}),d=(0,f.css)({position:`absolute`,inset:0,display:`flex`,flexDirection:`column`,borderRadius:s,overflow:`hidden`,zIndex:1,pointerEvents:`none`,background:`color-mix(in srgb, ${o.tokens.colorBackgroundOverlay} 50%, transparent)`}),p=e=>(0,f.css)({position:`absolute`,inset:0,background:`linear-gradient(
486
486
  to top,
487
487
  color-mix(in srgb, black ${Math.min(Math.round(e*100),100)}%, transparent) 0%,
488
488
  color-mix(in srgb, black ${Math.min(Math.round(e*30),100)}%, transparent) 55%,
489
489
  transparent 100%
490
- )`,zIndex:0}),overlayContent:e=>{let{justify:t,align:n,textAlign:i}=DS[e]??DS[`bottom-left`];return(0,f.css)({position:`relative`,flex:1,display:`flex`,flexDirection:`column`,justifyContent:t,alignItems:n,textAlign:i,zIndex:1,padding:o.tokens.spacingHorizontalXL,paddingBottom:r===`video`?`74px`:o.tokens.spacingHorizontalL,gap:o.tokens.spacingVerticalS,pointerEvents:`none`})},overlayTextGroup:(0,f.css)({overflow:`hidden`,flex:`0 1 auto`,minHeight:0,display:`flex`,flexDirection:`column`,gap:o.tokens.spacingVerticalS}),overlayTitle:(0,f.css)({textShadow:`0 1px 4px color-mix(in srgb, black 65%, transparent)`,color:o.tokens.colorNeutralForegroundStaticInverted,margin:0}),overlayDescription:(0,f.css)({textShadow:`0 1px 3px color-mix(in srgb, black 50%, transparent)`,color:o.tokens.colorNeutralForegroundStaticInverted,opacity:.9,margin:0}),overlayCta:(0,f.css)({flexShrink:0,width:`fit-content`,pointerEvents:`auto`}),fullscreenRoot:(0,f.css)({width:`100%`,height:`100%`,overflow:`hidden`}),splitRoot:(0,f.css)({display:`grid`,gridTemplateColumns:c?`1fr`:`1fr 1fr`,gap:`3px`,width:`100%`,height:`100%`,overflow:`hidden`}),featuredRoot:(0,f.css)({display:`grid`,gridTemplateColumns:c?`1fr`:`2fr 1fr`,gap:`3px`,width:`100%`,height:`100%`,overflow:`hidden`}),mosaicWrapper:(0,f.css)({width:`100%`,height:c?`auto`:`100%`,gap:`3px`,overflow:c?`visible`:`hidden`}),mosaicPrimary:(0,f.css)({flex:c?`none`:`3 0 0`,minWidth:0,width:`100%`,height:c?`260px`:`100%`}),mosaicRightGrid:e=>{let t=n>=1100&&e>=3,r=c?`1fr`:t?`1fr 1fr`:`1fr`,i=c?void 0:e===1?`1fr`:t?`1fr 1fr`:`repeat(${e}, 1fr)`;return(0,f.css)({flex:c?`none`:`2 0 0`,width:c?`100%`:void 0,minWidth:0,display:`grid`,gap:`3px`,gridTemplateColumns:r,gridTemplateRows:i,height:c?`auto`:`100%`})},mosaicSpanFull:(0,f.css)({gridColumn:`1 / -1`}),mosaicMarqueeLane:(0,f.css)({flex:c?`none`:`2 0 0`,minWidth:0,height:c?`320px`:`100%`,overflow:`hidden`}),mosaicMarqueeItem:(0,f.css)({flex:`0 0 auto`,minHeight:c?`160px`:`120px`}),mosaicScrollLane:(0,f.css)({flex:c?`none`:`2 0 0`,minWidth:0,height:c?`320px`:`100%`,overflowY:`auto`,overflowX:`hidden`,scrollbarWidth:`thin`,scrollbarColor:`${o.tokens.colorBrandBackground} transparent`,display:`flex`,flexDirection:`column`,gap:`3px`,"&::-webkit-scrollbar":{width:`4px`},"&::-webkit-scrollbar-track":{background:`transparent`},"&::-webkit-scrollbar-thumb":{background:o.tokens.colorBrandBackground,borderRadius:`999px`}}),gridRoot:(0,f.css)({display:`grid`,gridTemplateColumns:`repeat(${n===0?2:n>=1200?4:n>=992?3:n>=576?2:1}, 1fr)`,gap:`3px`,width:`100%`}),filmstripRoot:(0,f.css)({display:`flex`,flexDirection:`row`,gap:`3px`,overflowX:`auto`,width:`100%`,scrollSnapType:`x mandatory`,scrollbarWidth:`none`,"::-webkit-scrollbar":{display:`none`},paddingBottom:o.tokens.spacingVerticalXS}),filmstripItem:(0,f.css)({flex:`0 0 ${n===0?`280px`:n>=1200?`400px`:n>=992?`340px`:n>=576?`280px`:`220px`}`,scrollSnapAlign:`start`}),carouselWrapper:(0,f.css)({width:`100%`,overflow:`hidden`})}};function kS(e){try{let t=new URL(e);if(t.hostname.includes(`youtube.com`))return{kind:`youtube`,id:t.searchParams.get(`v`)??``};if(t.hostname.includes(`youtu.be`))return{kind:`youtube`,id:t.pathname.slice(1).split(`?`)[0]};if(t.hostname.includes(`vimeo.com`))return{kind:`vimeo`,id:t.pathname.replace(/^\//,``).split(`/`)[0]}}catch{}return{kind:`file`,id:``}}var AS={position:`absolute`,inset:0,overflow:`hidden`,pointerEvents:`none`},jS={position:`absolute`,top:`50%`,left:`50%`,width:`auto`,height:`auto`,minWidth:`100%`,minHeight:`100%`,aspectRatio:`16 / 9`,transform:`translate(-50%, -50%)`,border:`none`,pointerEvents:`none`},MS=({src:e,loop:t=!0,title:r=`background video`})=>{let i=kS(e);if(i.kind===`youtube`&&i.id){let e=i.id;return(0,n.jsx)(`div`,{style:AS,children:(0,n.jsx)(`iframe`,{src:`https://www.youtube.com/embed/${e}?autoplay=1&mute=1${t?`&loop=1&playlist=${e}`:``}&controls=0&showinfo=0&rel=0&modestbranding=1&iv_load_policy=3&playsinline=1&enablejsapi=1`,allow:`autoplay; encrypted-media`,title:r,style:jS})})}if(i.kind===`vimeo`&&i.id){let e=t?`&loop=1`:``;return(0,n.jsx)(`div`,{style:AS,children:(0,n.jsx)(`iframe`,{src:`https://player.vimeo.com/video/${i.id}?autoplay=1&muted=1${e}&background=1&byline=0&title=0&portrait=0`,allow:`autoplay; fullscreen`,title:r,style:jS})})}return(0,n.jsx)(`video`,{src:e,autoPlay:!0,loop:t,muted:!0,playsInline:!0,title:r,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,objectFit:`cover`,pointerEvents:`none`}})};MS.displayName=`BackgroundVideo`;var NS=t.memo(({item:e,heroProps:t,containerWidth:r,mediaType:i=`image`})=>{let{title:a,description:s,callToActionLabel:c,callToActionUrl:l,textPosition:u=`bottom-left`,overlayOpacity:d=.45}=e,f=a||s||c,{overlayRoot:p,overlayScrim:m,overlayContent:h,overlayTextGroup:g,overlayTitle:_,overlayDescription:v,overlayCta:y}=OS(t,r,i);return f?(0,n.jsxs)(H,{className:p,children:[(0,n.jsx)(H,{className:m(d),"aria-hidden":`true`}),(0,n.jsxs)(H,{className:h(u),children:[(a||s)&&(0,n.jsxs)(`div`,{className:g,children:[a&&(0,n.jsx)(Cd,{fontSize:`l`,fontWeight:`bold`,numberOfLines:2,truncate:!0,className:_,children:a}),s&&(0,n.jsx)(Cd,{fontSize:`s`,numberOfLines:2,className:v,children:s})]}),c&&l&&(0,n.jsx)(o.Button,{appearance:`primary`,onClick:e=>{e.stopPropagation(),window.open(l,`_blank`,`noopener,noreferrer`)},target:`_blank`,rel:`noopener noreferrer`,className:y,children:c})]})]}):null});NS.displayName=`HeroOverlay`;var PS=t.memo(({item:e,heroProps:t,containerWidth:r,className:i,itemHeight:a})=>{let{item:s}=OS(t,r),c=a===void 0?`100%`:typeof a==`number`?`${a}px`:a,l=e.mediaType===`video`&&e.videoControls===!1&&e.autoPlay;return(0,n.jsx)(H,{className:(0,o.mergeClasses)(s,i),height:c,role:`region`,"aria-label":e.alt??e.title??e.src,children:e.mediaType===`image`?(0,n.jsx)(Ob,{src:e.src,style:{height:`100%`},children:(0,n.jsx)(NS,{item:e,heroProps:t,containerWidth:r})}):l?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(MS,{src:e.src,loop:e.loop,title:e.alt??e.title}),(0,n.jsx)(NS,{item:e,heroProps:t,containerWidth:r,mediaType:`image`})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Ov,{url:e.src,width:`100%`,height:c,controls:e.videoControls!==!1,playing:e.autoPlay,loop:e.loop,muted:e.autoPlay,playsinline:!0}),(0,n.jsx)(NS,{item:e,heroProps:t,containerWidth:r,mediaType:e.videoControls===!1?`image`:`video`})]})})});PS.displayName=`HeroItem`;var FS=e=>({resolvedHeight:t.useMemo(()=>typeof e==`number`?`${e}px`:e,[e]),numericHeight:t.useMemo(()=>typeof e==`number`?e:parseInt(String(e),10)||480,[e]),mosaicHeight:t.useMemo(()=>typeof e==`number`?`${e+30}px`:`calc(${e} + 30px)`,[e])}),IS=({items:e,height:t,heroProps:r,containerWidth:i})=>{let a=we(e,1,r.rotation),{resolvedHeight:o}=FS(t),s=a[0];return s?(0,n.jsx)(H,{width:`100%`,height:o,children:(0,n.jsx)(PS,{item:s,heroProps:r,containerWidth:i})}):null};IS.displayName=`HeroFullscreen`;var LS=({items:e,height:t,heroProps:r,containerWidth:i})=>{let a=we(e,2,r.rotation),{resolvedHeight:o}=FS(t);return(0,n.jsx)(Xu,{styles:{gridTemplateColumns:i>0&&i<576?`1fr`:`1fr 1fr`,height:o,gap:`3px`,overflow:`hidden`},children:a.map(e=>(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i},e.id))})};LS.displayName=`HeroSplit`;var RS=({items:e,height:t,heroProps:r,containerWidth:i})=>{let a=we(e,2,r.rotation),{resolvedHeight:o}=FS(t);return(0,n.jsx)(Xu,{styles:{gridTemplateColumns:i>0&&i<576?`1fr`:`2fr 1fr`,height:o,gap:`3px`,overflow:`hidden`},children:a.map(e=>(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i},e.id))})};RS.displayName=`HeroFeatured`;var zS=({items:e,height:t,heroProps:r,containerWidth:i,mosaicOverflowMode:a=`marquee`})=>{let{mosaicWrapper:o,mosaicPrimary:s,mosaicRightGrid:c,mosaicSpanFull:l,mosaicScrollLane:u}=OS(r,i),{mosaicHeight:d}=FS(t),f=e.length>5,p=f?e:e.slice(0,5),m=p[0],h=p.slice(1),g=i<576;if(!m)return null;let _=g?160:180;return(0,n.jsxs)(H,{direction:g?`vertical`:`horizontal`,className:o,height:g?void 0:d,children:[(0,n.jsx)(PS,{item:m,heroProps:r,containerWidth:i,className:s,itemHeight:g?260:void 0}),h.length>0&&!f&&(0,n.jsx)(`div`,{className:c(h.length),children:h.map((e,t)=>(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i,itemHeight:g?180:void 0,className:h.length===3&&t===2&&i>=1100?l:void 0},e.id))}),h.length>0&&f&&a===`marquee`&&(0,n.jsx)(`div`,{style:{flex:g?`none`:`2 0 0`,minWidth:0,height:g?`320px`:`100%`,overflow:`hidden`,scrollbarWidth:`none`},children:(0,n.jsx)(Sb,{orientation:`vertical`,duration:6e4,pauseOnHover:!0,repeat:2,gap:`3px`,fadeEdgeSize:`8%`,children:h.map(e=>(0,n.jsx)(`div`,{style:{flex:`0 0 auto`,height:`${_}px`,width:`100%`},children:(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i,itemHeight:_})},e.id))})}),h.length>0&&f&&a===`scroll`&&(0,n.jsx)(`div`,{className:u,children:h.map(e=>(0,n.jsx)(`div`,{style:{flex:`0 0 auto`,height:`${_}px`,width:`100%`},children:(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i,itemHeight:_})},e.id))})]})};zS.displayName=`HeroMosaic`;var BS=({items:e,height:t,heroProps:r,containerWidth:i})=>{let{gridRoot:a}=OS(r,i),{resolvedHeight:o}=FS(t);return(0,n.jsx)(H,{className:a,children:e.map(e=>(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i,itemHeight:o},e.id))})};BS.displayName=`HeroGrid`;var VS=({items:e,height:t,heroProps:r,containerWidth:i})=>{let{filmstripRoot:a,filmstripItem:o}=OS(r,i),{resolvedHeight:s}=FS(t);return(0,n.jsx)(H,{direction:`horizontal`,className:a,height:s,children:e.map(e=>(0,n.jsx)(H,{className:o,children:(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i})},e.id))})};VS.displayName=`HeroFilmstrip`;var HS=({items:e,height:t,heroProps:r,containerWidth:i})=>{let{carouselWrapper:a}=OS(r,i),{numericHeight:o}=FS(t),s=o-50;return(0,n.jsx)(H,{className:a,height:o,children:(0,n.jsx)(pd,{items:e.map(e=>(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i,itemHeight:s},e.id)),height:o})})};HS.displayName=`HeroCarousel`;var US=`480px`,WS=e=>{let{items:r,layout:i=`fullscreen`,height:a=US,className:s}=e,c=t.useRef(null),[l,u]=t.useState(0),[f,p]=t.useState(0),{heroRootStyles:m}=OS(e,l);t.useEffect(()=>{if(!c.current)return;u(c.current.clientWidth),p(c.current.clientHeight);let e=new d.ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;e>0&&u(e),p(n)}});return e.observe(c.current),()=>e.disconnect()},[]),t.useLayoutEffect(()=>{if(!c.current)return;let e=c.current.getBoundingClientRect().width;e>0&&u(e)},[a]);let h={items:r,height:a,heroProps:e,containerWidth:l,mosaicOverflowMode:e.mosaicOverflowMode??`marquee`},g=()=>{switch(i){case`fullscreen`:return(0,n.jsx)(IS,{...h});case`split`:return(0,n.jsx)(LS,{...h});case`featured`:return(0,n.jsx)(RS,{...h});case`mosaic`:return(0,n.jsx)(zS,{...h});case`grid`:return(0,n.jsx)(BS,{...h});case`filmstrip`:return(0,n.jsx)(VS,{...h});case`carousel`:return(0,n.jsx)(HS,{...h});default:return(0,n.jsx)(IS,{...h})}},_=t.useMemo(()=>{let e=m(l,f);if(i===`grid`||i===`mosaic`&&l>0&&l<576){let{height:t,...n}=e;return n}return e},[m,l,f,i]);return(0,n.jsx)(H,{id:`-hero`,role:`region`,"aria-label":`Hero`,ref:c,width:`100%`,className:(0,o.mergeClasses)(s),style:_,children:g()})};WS.displayName=`Hero`,exports.AIAssistant=$y,exports.AISearchControl=Ny,exports.AISearchIcon=ky,exports.AISearchIconExample=Fy,exports.AdaptiveCardHost=Sy,exports.AdaptiveCardHostThemeType=Wv,exports.AddColumnAfterControl=ag,exports.AddColumnBeforeControl=ig,exports.AddRowAfterControl=cg,exports.AddRowBeforeControl=sg,exports.AlignCenterControl=Hh,exports.AlignJustifyControl=Uh,exports.AlignLeftControl=Bh,exports.AlignRightControl=Vh,exports.AppDashboard=Ix,exports.AspectRatio=rd,exports.BackgroundImage=Ob,exports.Blockquote=mb,exports.BlockquoteControl=zh,exports.BoldControl=Th,exports.Breadcrumb=kd,exports.BulletListControl=jh,exports.ButtonMenu=Td,exports.CalendarControl=gf,exports.CalendarGrid=yf,exports.CalendarHeader=bf,exports.CalendarMonth=tf,exports.Card=Ju,exports.Carousel=pd,exports.Center=od,exports.ChatInput=Ly,exports.ChatInputWithMensions=Hy,exports.ChatInputWithMensionsV1=eb,exports.ChatList=Xy,exports.ChromeInputType=D_,exports.ClearFormattingControl=kh,exports.CodeBlockControl=qh,exports.CodeControl=Kh,exports.ColorPicker=X,exports.ColorPickerAlpha=g_,exports.ColorPickerBlock=G_,exports.ColorPickerChrome=M_,exports.ColorPickerCircle=B_,exports.ColorPickerColorful=N_,exports.ColorPickerCompact=U_,exports.ColorPickerEditableInput=S_,exports.ColorPickerEditableInputHSLA=w_,exports.ColorPickerEditableInputRGBA=C_,exports.ColorPickerHue=m_,exports.ColorPickerInteractive=c_,exports.ColorPickerSaturation=u_,exports.ColorPickerShadeSlider=v_,exports.ColorPickerSketch=E_,exports.ColorPickerSlider=q_,exports.ColorPickerSwatch=b_,exports.ColorPickerTheme=ev,exports.ColorPickerWheel=L_,exports.CompactCalendar=jf,exports.CompactCalendarToolbar=xf,exports.ConsoleLoggingProvider=e.k,exports.Container=cd,exports.ContentRenderer=Yy,exports.ContentType=zu,exports.CustomControlBar=bv,exports.DataGrid=iv,exports.DataGridV2=sv,exports.DefaultGraphClient=e.O,exports.DefaultLocalizationProvider=e.T,exports.DeleteColumnControl=og,exports.DeleteRowControl=lg,exports.DeleteTableControl=rg,exports.DropdownField=bg,exports.Dropzone=Cp,exports.DropzoneAccept=vp,exports.DropzoneFullScreen=wp,exports.DropzoneIdle=bp,exports.DropzoneProvider=hp,exports.DropzoneReject=yp,exports.EBreakPoints=ge,exports.ECalendarViews=W,exports.EGoalMetric=Bx,exports.EMessageType=_e,exports.EXE_MIME_TYPE=jp,exports.EmojiPicker=Sh,exports.ErrorType=e.A,exports.EventsList=Sf,exports.FluentUIProvider=TS,exports.GenericOverFlowMenu=wv,exports.Grid=Xu,exports.H1Control=Nh,exports.H2Control=Ph,exports.H3Control=Fh,exports.H4Control=Ih,exports.H5Control=Lh,exports.H6Control=Rh,exports.Hero=WS,exports.HighlightControl=Jh,exports.HrControl=Yh,exports.IMAGE_MIME_TYPE=Ep,exports.IconButton=Ad,exports.InlineSVG=Xb,exports.InputField=Sg,exports.InsertTableControl=ng,exports.ItalicControl=Eh,exports.ItemPicker=Fg,exports.KPICard=Vx,exports.KPICardCompact=Gx,exports.KPICardSkeleton=Hx,exports.Kpis=qx,exports.Layout=$u,exports.LayoutItem=ed,exports.Link=Ip,exports.ListItemActivityMessage=Ex,exports.ListToolbar=fx,exports.LivePersona=ix,exports.LocalStorageProvider=e.w,exports.LocalizationProvider=e.t,exports.LogLevel=e.j,exports.MIME_TYPES=Tp,exports.MS_EXCEL_MIME_TYPE=kp,exports.MS_POWERPOINT_MIME_TYPE=Ap,exports.MS_WORD_MIME_TYPE=Op,exports.MaplibreWorldMap=Uv,exports.MarkdownRenderer=qy,exports.Marquee=Sb,exports.Mensions=zy,exports.MensionsExample=By,exports.MergeOrSplitCellControl=ug,exports.MermaidDiagram=ab,exports.Navigation=Tv,exports.NoKpisCard=Wx,exports.OTPField=rx,exports.OptionTime=jg,exports.OrderedListControl=Mh,exports.PDF_MIME_TYPE=Dp,exports.Popup=gd,exports.RedoControl=Qh,exports.RenderAdaptiveCard=Cy,exports.RenderDialog=uv,exports.RenderDrawer=dv,exports.RenderHeader=fv,exports.RenderLabel=vd,exports.RenderSpinner=bd,exports.RichTextEditor=vg,exports.RichTextEditorBgColorPickerControl=nh,exports.RichTextEditorColorControl=Xm,exports.RichTextEditorColorPickerControl=Zm,exports.RichTextEditorContent=Kp,exports.RichTextEditorControl=Jp,exports.RichTextEditorControlBase=Yp,exports.RichTextEditorControlsGroup=qp,exports.RichTextEditorDragHandle=rh,exports.RichTextEditorFontFamilyControl=eh,Object.defineProperty(exports,`RichTextEditorImage`,{enumerable:!0,get:function(){return L.default}}),exports.RichTextEditorImageUploadControl=th,exports.RichTextEditorLinkControl=Ym,exports.RichTextEditorResizableImage=zp,exports.RichTextEditorSourceCodeControl=Qm,exports.RichTextEditorTableControls=wh,exports.RichTextEditorToolbar=Vp,exports.SearchControl=$f,exports.SelectDay=Qd,exports.SelectMonth=nf,exports.SelectTime=Ng,exports.SelectView=Cg,exports.SelectWeek=sf,exports.ShareDialog=mv,exports.ShowError=gv,exports.ShowMessage=vv,exports.SkeletonLoader=CS,exports.Space=nd,exports.SplitPane=hd,exports.Spoiler=Tb,exports.Spotlight=pp,exports.SpotlightAction=np,exports.SpotlightActionsGroup=rp,exports.SpotlightActionsList=ip,exports.SpotlightEmpty=ap,exports.SpotlightFooter=op,exports.SpotlightRoot=Zf,exports.SpotlightSearch=ep,exports.StackV2=H,exports.StackedUsers=xx,exports.Stepper=zb,exports.StrikeThroughControl=Oh,exports.SubscriptControl=Wh,exports.SuperscriptControl=Gh,exports.TIME_RADIO_GROUP=Eg,exports.TableKit=I.TableKit,exports.TaskListControl=$h,exports.TaskListLiftControl=tg,exports.TaskListSinkControl=eg,exports.Timeline=Nb,exports.ToggleHeaderColumnControl=dg,exports.ToggleHeaderRowControl=fg,exports.ToggleTableColumnLinesControl=pg,exports.ToggleTableRowLinesControl=mg,exports.TypographyControl=Cd,exports.UnderlineControl=Dh,exports.UndoControl=Zh,exports.UniversalProvider=ye,exports.UnlinkControl=Ah,exports.UnsetColorControl=Xh,exports.UserCard=yx,exports.VideoPlayer=Ov,exports.applyHeaderStyles=hu,exports.autoFitColumns=gu,exports.buildHeaderCellStyle=mu,exports.clampHsva=o_,exports.clearInlineSVGCache=Ub,exports.cloneDeep=Ou,exports.closeOnActionTriggerAtom=Lf,exports.closeSpotlight=Wf,exports.color=J,exports.configureSkeletonLoader=lS,exports.createControl=K,exports.createSpotlight=Kf,exports.createSpotlightStore=zf,exports.debounce=Eu,exports.deepMerge=e.E,exports.defaultCalendarControlStrings=ff,exports.defaultCalendarMonthStrings=ef,exports.defaultSelectWeekStrings=rf,exports.defaultSpotlightFilter=dp,exports.detectContentType=Gu,exports.en=e.D,exports.equalColorObjects=i_,exports.equalHex=a_,exports.escapeCsvCell=_u,exports.every=Ru,exports.filter=Iu,exports.formatTime=Og,exports.get=Au,exports.getContentType=Ku,exports.getContrastingColor=r_,exports.getTaskListExtension=Lp,exports.groupBy=Pu,exports.hexToHsva=Hg,exports.hexToRgba=Gg,exports.hslaStringToHsva=$g,exports.hslaToHsva=Vg,exports.hsvaToHex=Ug,exports.hsvaToHexa=Wg,exports.hsvaToHslString=Jg,exports.hsvaToHsla=Bg,exports.hsvaToHslaString=Yg,exports.hsvaToRgbString=Xg,exports.hsvaToRgba=Rg,exports.hsvaToRgbaString=Zg,exports.isActionsGroup=cp,exports.isEmpty=ku,exports.limitActions=fp,exports.listIdAtom=Pf,exports.map=Fu,exports.onQueryChangeCallbackAtom=Rf,exports.openSpotlight=Uf,exports.openedAtom=Mf,exports.parseHue=Qg,exports.queryAtom=Ff,exports.registerBones=nS,exports.registeredActionsAtom=If,exports.renderContentAsEmailHtml=Gp,exports.resolveLocale=Of,exports.rgbaStringToHsva=e_,exports.rgbaToHex=Kg,exports.rgbaToHexa=qg,exports.rgbaToHsva=zg,exports.selectedAtom=Nf,exports.set=ju,exports.snapshotBones=Xx,exports.some=Lu,exports.spotlight=Hf,exports.spotlightActions=G,exports.spotlightStore=Bf,exports.throttle=Du,exports.timeKey=kg,exports.toasterId=fu,exports.toggleSpotlight=Gf,exports.uniq=Mu,exports.uniqBy=Nu,exports.useAIAssistantStrings=e.n,exports.useAISearchControlStrings=e.r,exports.useAppDashboardStrings=e.i,exports.useAppToast=pu,exports.useApplicationContext=be,exports.useAspectRatioStyles=id,exports.useBlockquoteStyles=ub,exports.useBrandCenterFonts=ze,exports.useCalendar=Gd,exports.useCalendarStrings=e.a,exports.useCalendarStyles=Rd,exports.useCenterStyles=ad,exports.useColorPickerStyles=Y,exports.useCommonStrings=e.o,exports.useCompactCalendarEvents=Ef,exports.useComponentStrings=e.c,exports.useComponentUtils=xu,exports.useDataGridStyles=rv,exports.useDateUtils=Su,exports.useDayViewStyles=Kd,exports.useDropzoneContext=gp,exports.useDropzoneStyles=xp,exports.useExportData=bu,exports.useFluentEmoji=du,exports.useGraphAPI=xe,exports.useGridStyles=Yu,exports.useImageUtils=Tu,exports.useIndexedDBCache=Se,exports.useInputFieldStrings=e.u,exports.useItemPickerStrings=e.d,exports.useKpiStrings=e.f,exports.useLayoutStyles=Zu,exports.useListItemActivityStrings=e.p,exports.useLocalization=e.m,exports.useLogging=B,exports.useMarqueeStyles=_b,exports.useMensionsStrings=e.h,exports.useMensionsStyles=Ry,exports.useMermaidDiagramStrings=e.g,exports.useMermaidDiagramStyles=nb,exports.useNavigationStyles=Ev,exports.useNoKpiStrings=e._,exports.useOptionTimeStyles=Tg,exports.usePolling=Ce,exports.useRenderHeaderStyles=pv,exports.useRichTextEditor=Bp,exports.useSearchControlStrings=e.v,exports.useSelectTimeStyles=wg,exports.useShareDialogStrings=e.y,exports.useShowErrorStyles=hv,exports.useShowMessageStyles=_v,exports.useSkeletonExtract=Zx,exports.useSpaceStyles=td,exports.useSplitPaneStyles=md,exports.useSpotlight=qf,exports.useSpotlightShortcut=Yf,exports.useSpotlightStrings=e.b,exports.useStrings=e.x,exports.useStyles=tb,exports.useTimeZoneHelper=Ee,exports.useUserCardStrings=e.S,exports.useUtils=Md,exports.useVideoStyles=Dv,exports.useWeekViewStyles=Vd,exports.useWorldMapStrings=e.C,exports.validHex=n_;
490
+ )`,zIndex:0}),m=o.tokens.spacingHorizontalXL,h=o.tokens.spacingHorizontalXXL,g=`40px`,_={"top-left":{paddingTop:g,paddingRight:m,paddingBottom:m,paddingLeft:g},"top-center":{paddingTop:h,paddingRight:m,paddingBottom:m,paddingLeft:m},"top-right":{paddingTop:g,paddingRight:g,paddingBottom:m,paddingLeft:m},"center-left":{paddingTop:m,paddingRight:m,paddingBottom:m,paddingLeft:h},center:{paddingTop:m,paddingRight:m,paddingBottom:m,paddingLeft:m},"center-right":{paddingTop:m,paddingRight:h,paddingBottom:m,paddingLeft:m},"bottom-left":{paddingTop:m,paddingRight:m,paddingBottom:g,paddingLeft:g},"bottom-center":{paddingTop:m,paddingRight:m,paddingBottom:h,paddingLeft:m},"bottom-right":{paddingTop:m,paddingRight:g,paddingBottom:g,paddingLeft:m}};return{heroRootStyles:l,item:u,overlayRoot:d,overlayScrim:p,overlayContent:e=>{let{justify:t,align:n,textAlign:i}=DS[e]??DS[`bottom-left`],a=_[e]??_[`bottom-left`],s=r===`video`?`74px`:a.paddingBottom;return(0,f.css)({position:`relative`,flex:1,display:`flex`,flexDirection:`column`,justifyContent:t,alignItems:n,textAlign:i,zIndex:1,paddingTop:a.paddingTop,paddingRight:a.paddingRight,paddingBottom:s,paddingLeft:a.paddingLeft,gap:o.tokens.spacingVerticalS,pointerEvents:`none`})},overlayTextGroup:(0,f.css)({overflow:`hidden`,flex:`0 1 auto`,minHeight:0,display:`flex`,flexDirection:`column`,gap:o.tokens.spacingVerticalS}),overlayTitle:(0,f.css)({textShadow:`0 1px 4px color-mix(in srgb, black 65%, transparent)`,color:o.tokens.colorNeutralForegroundStaticInverted,margin:0,maxWidth:`80ch`,lineHeight:1.1}),overlayDescription:(0,f.css)({textShadow:`0 1px 3px color-mix(in srgb, black 50%, transparent)`,color:o.tokens.colorNeutralForegroundStaticInverted,opacity:.9,margin:0,maxWidth:`80ch`}),overlayCta:(0,f.css)({flexShrink:0,width:`fit-content`,pointerEvents:`auto`}),fullscreenRoot:(0,f.css)({width:`100%`,height:`100%`,overflow:`hidden`}),splitRoot:(0,f.css)({display:`grid`,gridTemplateColumns:c?`1fr`:`1fr 1fr`,gap:`3px`,width:`100%`,height:`100%`,overflow:`hidden`}),featuredRoot:(0,f.css)({display:`grid`,gridTemplateColumns:c?`1fr`:`2fr 1fr`,gap:`3px`,width:`100%`,height:`100%`,overflow:`hidden`}),mosaicWrapper:(0,f.css)({width:`100%`,height:c?`auto`:`100%`,gap:`3px`,overflow:c?`visible`:`hidden`}),mosaicPrimary:(0,f.css)({flex:c?`none`:`3 0 0`,minWidth:0,width:`100%`,height:c?`260px`:`100%`}),mosaicRightGrid:e=>{let t=n>=1100&&e>=3,r=c?`1fr`:t?`1fr 1fr`:`1fr`,i=c?void 0:e===1?`1fr`:t?`1fr 1fr`:`repeat(${e}, 1fr)`;return(0,f.css)({flex:c?`none`:`2 0 0`,width:c?`100%`:void 0,minWidth:0,display:`grid`,gap:`3px`,gridTemplateColumns:r,gridTemplateRows:i,height:c?`auto`:`100%`})},mosaicSpanFull:(0,f.css)({gridColumn:`1 / -1`}),mosaicMarqueeLane:(0,f.css)({flex:c?`none`:`2 0 0`,minWidth:0,height:c?`320px`:`100%`,overflow:`hidden`}),mosaicMarqueeItem:(0,f.css)({flex:`0 0 auto`,height:c?`160px`:`180px`,width:`100%`}),mosaicScrollLane:(0,f.css)({flex:c?`none`:`2 0 0`,minWidth:0,height:c?`320px`:`100%`,overflowY:`auto`,overflowX:`hidden`,scrollbarWidth:`thin`,scrollbarColor:`${o.tokens.colorBrandBackground} transparent`,display:`flex`,flexDirection:`column`,gap:`3px`,"&::-webkit-scrollbar":{width:`4px`},"&::-webkit-scrollbar-track":{background:`transparent`},"&::-webkit-scrollbar-thumb":{background:o.tokens.colorBrandBackground,borderRadius:`999px`}}),gridRoot:(0,f.css)({display:`grid`,gridTemplateColumns:`repeat(${n===0?2:n>=1200?4:n>=992?3:n>=576?2:1}, 1fr)`,gap:`3px`,width:`100%`}),filmstripRoot:(0,f.css)({display:`flex`,flexDirection:`row`,gap:`3px`,overflowX:`auto`,width:`100%`,scrollSnapType:`x mandatory`,scrollbarWidth:`none`,"::-webkit-scrollbar":{display:`none`},paddingBottom:o.tokens.spacingVerticalXS}),filmstripItem:(0,f.css)({flex:`0 0 ${n===0?`280px`:n>=1200?`400px`:n>=992?`340px`:n>=576?`280px`:`220px`}`,scrollSnapAlign:`start`}),carouselWrapper:(0,f.css)({width:`100%`,overflow:`hidden`})}};function kS(e){try{let t=new URL(e);if(t.hostname.includes(`youtube.com`))return{kind:`youtube`,id:t.searchParams.get(`v`)??``};if(t.hostname.includes(`youtu.be`))return{kind:`youtube`,id:t.pathname.slice(1).split(`?`)[0]};if(t.hostname.includes(`vimeo.com`))return{kind:`vimeo`,id:t.pathname.replace(/^\//,``).split(`/`)[0]}}catch{}return{kind:`file`,id:``}}var AS={position:`absolute`,inset:0,overflow:`hidden`,pointerEvents:`none`},jS={position:`absolute`,top:`50%`,left:`50%`,width:`auto`,height:`auto`,minWidth:`100%`,minHeight:`100%`,aspectRatio:`16 / 9`,transform:`translate(-50%, -50%)`,border:`none`,pointerEvents:`none`},MS=({src:e,loop:t=!0,title:r=`background video`})=>{let i=kS(e);if(i.kind===`youtube`&&i.id){let e=i.id;return(0,n.jsx)(`div`,{style:AS,children:(0,n.jsx)(`iframe`,{src:`https://www.youtube.com/embed/${e}?autoplay=1&mute=1${t?`&loop=1&playlist=${e}`:``}&controls=0&showinfo=0&rel=0&modestbranding=1&iv_load_policy=3&playsinline=1&enablejsapi=1`,allow:`autoplay; encrypted-media`,title:r,style:jS})})}if(i.kind===`vimeo`&&i.id){let e=t?`&loop=1`:``;return(0,n.jsx)(`div`,{style:AS,children:(0,n.jsx)(`iframe`,{src:`https://player.vimeo.com/video/${i.id}?autoplay=1&muted=1${e}&background=1&byline=0&title=0&portrait=0`,allow:`autoplay; fullscreen`,title:r,style:jS})})}return(0,n.jsx)(`video`,{src:e,autoPlay:!0,loop:t,muted:!0,playsInline:!0,title:r,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,objectFit:`cover`,pointerEvents:`none`}})};MS.displayName=`BackgroundVideo`;var NS=t.memo(({item:e,heroProps:t,containerWidth:r,mediaType:i=`image`})=>{let{title:a,description:s,callToActionLabel:c,callToActionUrl:l,textPosition:u=`bottom-left`,overlayOpacity:d=.45}=e,f=a||s||c,{overlayRoot:p,overlayScrim:m,overlayContent:h,overlayTextGroup:g,overlayTitle:_,overlayDescription:v,overlayCta:y}=OS(t,r,i);return f?(0,n.jsxs)(`div`,{className:p,children:[(0,n.jsx)(`div`,{className:m(d),"aria-hidden":`true`}),(0,n.jsxs)(`div`,{className:h(u),children:[(a||s)&&(0,n.jsxs)(`div`,{className:g,children:[a&&(0,n.jsx)(Cd,{fontSize:`xl`,fontWeight:`bold`,numberOfLines:2,truncate:!0,className:_,children:a}),s&&(0,n.jsx)(Cd,{fontSize:`m`,numberOfLines:2,className:v,children:s})]}),c&&l&&(0,n.jsx)(o.Button,{appearance:`primary`,onClick:e=>{e.stopPropagation(),window.open(l,`_blank`,`noopener,noreferrer`)},target:`_blank`,rel:`noopener noreferrer`,className:y,children:c})]})]}):null}),PS=t.memo(({item:e,heroProps:t,containerWidth:r,className:i,itemHeight:a})=>{let{item:s}=OS(t,r),c=a===void 0?`100%`:typeof a==`number`?`${a}px`:a,l=e.mediaType===`video`&&e.videoControls===!1&&e.autoPlay;return(0,n.jsx)(H,{className:(0,o.mergeClasses)(s,i),height:c,role:`region`,"aria-label":e.alt??e.title??e.src,children:e.mediaType===`image`?(0,n.jsx)(Ob,{src:e.src,style:{height:`100%`},children:(0,n.jsx)(NS,{item:e,heroProps:t,containerWidth:r})}):l?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(MS,{src:e.src,loop:e.loop,title:e.alt??e.title}),(0,n.jsx)(NS,{item:e,heroProps:t,containerWidth:r,mediaType:`video`})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Ov,{url:e.src,width:`100%`,height:c,controls:e.videoControls!==!1,playing:e.autoPlay,loop:e.loop,muted:e.autoPlay,playsinline:!0}),(0,n.jsx)(NS,{item:e,heroProps:t,containerWidth:r,mediaType:e.videoControls===!1?`image`:`video`})]})})}),FS=e=>({resolvedHeight:t.useMemo(()=>typeof e==`number`?`${e}px`:e,[e]),numericHeight:t.useMemo(()=>typeof e==`number`?e:parseInt(String(e),10)||480,[e]),mosaicHeight:t.useMemo(()=>typeof e==`number`?`${e+30}px`:`calc(${e} + 30px)`,[e])}),IS=({items:e,height:t,heroProps:r,containerWidth:i})=>{let a=we(e,1,r.rotation),{resolvedHeight:o}=FS(t),s=a[0];return s?(0,n.jsx)(H,{width:`100%`,height:o,children:(0,n.jsx)(PS,{item:s,heroProps:r,containerWidth:i})}):null},LS=({items:e,height:t,heroProps:r,containerWidth:i})=>{let a=we(e,2,r.rotation),{resolvedHeight:o}=FS(t);return(0,n.jsx)(Xu,{styles:{gridTemplateColumns:i>0&&i<576?`1fr`:`1fr 1fr`,height:o,gap:`3px`,overflow:`hidden`},children:a.map(e=>(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i},e.id))})},RS=({items:e,height:t,heroProps:r,containerWidth:i})=>{let a=we(e,2,r.rotation),{resolvedHeight:o}=FS(t);return(0,n.jsx)(Xu,{styles:{gridTemplateColumns:i>0&&i<576?`1fr`:`2fr 1fr`,height:o,gap:`3px`,overflow:`hidden`},children:a.map(e=>(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i},e.id))})},zS=({items:e,height:t,heroProps:r,containerWidth:i,mosaicOverflowMode:a=`marquee`})=>{let{mosaicWrapper:o,mosaicPrimary:s,mosaicRightGrid:c,mosaicSpanFull:l,mosaicMarqueeLane:u,mosaicMarqueeItem:d,mosaicScrollLane:f}=OS(r,i),{mosaicHeight:p}=FS(t),m=e.length>5,h=m?e:e.slice(0,5),g=h[0],_=h.slice(1),v=i>0&&i<576;if(!g)return null;let y=v?160:180;return(0,n.jsxs)(H,{direction:v?`vertical`:`horizontal`,className:o,height:v?void 0:p,children:[(0,n.jsx)(PS,{item:g,heroProps:r,containerWidth:i,className:s,itemHeight:v?260:void 0}),_.length>0&&!m&&(0,n.jsx)(`div`,{className:c(_.length),children:_.map((e,t)=>(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i,itemHeight:v?180:void 0,className:_.length===3&&t===2&&i>=1100?l:void 0},e.id))}),_.length>0&&m&&a===`marquee`&&(0,n.jsx)(`div`,{className:u,children:(0,n.jsx)(Sb,{orientation:`vertical`,duration:6e4,pauseOnHover:!0,repeat:2,gap:`3px`,fadeEdgeSize:`2%`,children:_.map(e=>(0,n.jsx)(`div`,{className:d,children:(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i,itemHeight:y})},e.id))})}),_.length>0&&m&&a===`scroll`&&(0,n.jsx)(`div`,{className:f,children:_.map(e=>(0,n.jsx)(`div`,{className:d,children:(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i,itemHeight:y})},e.id))})]})},BS=({items:e,height:t,heroProps:r,containerWidth:i})=>{let{gridRoot:a}=OS(r,i),{resolvedHeight:o}=FS(t);return(0,n.jsx)(`div`,{className:a,children:e.map(e=>(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i,itemHeight:o},e.id))})},VS=({items:e,height:t,heroProps:r,containerWidth:i})=>{let{filmstripRoot:a,filmstripItem:o}=OS(r,i),{resolvedHeight:s}=FS(t);return(0,n.jsx)(H,{direction:`horizontal`,className:a,height:s,children:e.map(e=>(0,n.jsx)(H,{className:o,children:(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i})},e.id))})},HS=({items:e,height:t,heroProps:r,containerWidth:i})=>{let{carouselWrapper:a}=OS(r,i),{numericHeight:o}=FS(t),s=o-50;return(0,n.jsx)(H,{className:a,height:o,children:(0,n.jsx)(pd,{items:e.map(e=>(0,n.jsx)(PS,{item:e,heroProps:r,containerWidth:i,itemHeight:s},e.id)),height:o})})},US=`480px`,WS=e=>{let{items:r,layout:i=`fullscreen`,height:a=US,className:s}=e,c=t.useRef(null),[l,u]=t.useState(0),[f,p]=t.useState(0),{heroRootStyles:m}=OS(e,l);t.useEffect(()=>{if(!c.current)return;u(c.current.clientWidth),p(c.current.clientHeight);let e=new d.ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;e>0&&u(e),p(n)}});return e.observe(c.current),()=>e.disconnect()},[]),t.useLayoutEffect(()=>{if(!c.current)return;let e=c.current.getBoundingClientRect().width;e>0&&u(e)},[a]);let h={items:r,height:a,heroProps:e,containerWidth:l,mosaicOverflowMode:e.mosaicOverflowMode??`marquee`},g=()=>{switch(i){case`fullscreen`:return(0,n.jsx)(IS,{...h});case`split`:return(0,n.jsx)(LS,{...h});case`featured`:return(0,n.jsx)(RS,{...h});case`mosaic`:return(0,n.jsx)(zS,{...h});case`grid`:return(0,n.jsx)(BS,{...h});case`filmstrip`:return(0,n.jsx)(VS,{...h});case`carousel`:return(0,n.jsx)(HS,{...h});default:return(0,n.jsx)(IS,{...h})}},_=t.useMemo(()=>{let e=m(l,f);if(i===`grid`||i===`mosaic`&&l>0&&l<576){let{height:t,...n}=e;return n}return e},[m,l,f,i]);return(0,n.jsx)(H,{id:`-hero`,role:`region`,"aria-label":`Hero`,ref:c,width:`100%`,className:(0,o.mergeClasses)(s),style:_,children:g()})};exports.AIAssistant=$y,exports.AISearchControl=Ny,exports.AISearchIcon=ky,exports.AISearchIconExample=Fy,exports.AdaptiveCardHost=Sy,exports.AdaptiveCardHostThemeType=Wv,exports.AddColumnAfterControl=ag,exports.AddColumnBeforeControl=ig,exports.AddRowAfterControl=cg,exports.AddRowBeforeControl=sg,exports.AlignCenterControl=Hh,exports.AlignJustifyControl=Uh,exports.AlignLeftControl=Bh,exports.AlignRightControl=Vh,exports.AppDashboard=Ix,exports.AspectRatio=rd,exports.BackgroundImage=Ob,exports.Blockquote=mb,exports.BlockquoteControl=zh,exports.BoldControl=Th,exports.Breadcrumb=kd,exports.BulletListControl=jh,exports.ButtonMenu=Td,exports.CalendarControl=gf,exports.CalendarGrid=yf,exports.CalendarHeader=bf,exports.CalendarMonth=tf,exports.Card=Ju,exports.Carousel=pd,exports.Center=od,exports.ChatInput=Ly,exports.ChatInputWithMensions=Hy,exports.ChatInputWithMensionsV1=eb,exports.ChatList=Xy,exports.ChromeInputType=D_,exports.ClearFormattingControl=kh,exports.CodeBlockControl=qh,exports.CodeControl=Kh,exports.ColorPicker=X,exports.ColorPickerAlpha=g_,exports.ColorPickerBlock=G_,exports.ColorPickerChrome=M_,exports.ColorPickerCircle=B_,exports.ColorPickerColorful=N_,exports.ColorPickerCompact=U_,exports.ColorPickerEditableInput=S_,exports.ColorPickerEditableInputHSLA=w_,exports.ColorPickerEditableInputRGBA=C_,exports.ColorPickerHue=m_,exports.ColorPickerInteractive=c_,exports.ColorPickerSaturation=u_,exports.ColorPickerShadeSlider=v_,exports.ColorPickerSketch=E_,exports.ColorPickerSlider=q_,exports.ColorPickerSwatch=b_,exports.ColorPickerTheme=ev,exports.ColorPickerWheel=L_,exports.CompactCalendar=jf,exports.CompactCalendarToolbar=xf,exports.ConsoleLoggingProvider=e.k,exports.Container=cd,exports.ContentRenderer=Yy,exports.ContentType=zu,exports.CustomControlBar=bv,exports.DataGrid=iv,exports.DataGridV2=sv,exports.DefaultGraphClient=e.O,exports.DefaultLocalizationProvider=e.T,exports.DeleteColumnControl=og,exports.DeleteRowControl=lg,exports.DeleteTableControl=rg,exports.DropdownField=bg,exports.Dropzone=Cp,exports.DropzoneAccept=vp,exports.DropzoneFullScreen=wp,exports.DropzoneIdle=bp,exports.DropzoneProvider=hp,exports.DropzoneReject=yp,exports.EBreakPoints=ge,exports.ECalendarViews=W,exports.EGoalMetric=Bx,exports.EMessageType=_e,exports.EXE_MIME_TYPE=jp,exports.EmojiPicker=Sh,exports.ErrorType=e.A,exports.EventsList=Sf,exports.FluentUIProvider=TS,exports.GenericOverFlowMenu=wv,exports.Grid=Xu,exports.H1Control=Nh,exports.H2Control=Ph,exports.H3Control=Fh,exports.H4Control=Ih,exports.H5Control=Lh,exports.H6Control=Rh,exports.Hero=WS,exports.HighlightControl=Jh,exports.HrControl=Yh,exports.IMAGE_MIME_TYPE=Ep,exports.IconButton=Ad,exports.InlineSVG=Xb,exports.InputField=Sg,exports.InsertTableControl=ng,exports.ItalicControl=Eh,exports.ItemPicker=Fg,exports.KPICard=Vx,exports.KPICardCompact=Gx,exports.KPICardSkeleton=Hx,exports.Kpis=qx,exports.Layout=$u,exports.LayoutItem=ed,exports.Link=Ip,exports.ListItemActivityMessage=Ex,exports.ListToolbar=fx,exports.LivePersona=ix,exports.LocalStorageProvider=e.w,exports.LocalizationProvider=e.t,exports.LogLevel=e.j,exports.MIME_TYPES=Tp,exports.MS_EXCEL_MIME_TYPE=kp,exports.MS_POWERPOINT_MIME_TYPE=Ap,exports.MS_WORD_MIME_TYPE=Op,exports.MaplibreWorldMap=Uv,exports.MarkdownRenderer=qy,exports.Marquee=Sb,exports.Mensions=zy,exports.MensionsExample=By,exports.MergeOrSplitCellControl=ug,exports.MermaidDiagram=ab,exports.Navigation=Tv,exports.NoKpisCard=Wx,exports.OTPField=rx,exports.OptionTime=jg,exports.OrderedListControl=Mh,exports.PDF_MIME_TYPE=Dp,exports.Popup=gd,exports.RedoControl=Qh,exports.RenderAdaptiveCard=Cy,exports.RenderDialog=uv,exports.RenderDrawer=dv,exports.RenderHeader=fv,exports.RenderLabel=vd,exports.RenderSpinner=bd,exports.RichTextEditor=vg,exports.RichTextEditorBgColorPickerControl=nh,exports.RichTextEditorColorControl=Xm,exports.RichTextEditorColorPickerControl=Zm,exports.RichTextEditorContent=Kp,exports.RichTextEditorControl=Jp,exports.RichTextEditorControlBase=Yp,exports.RichTextEditorControlsGroup=qp,exports.RichTextEditorDragHandle=rh,exports.RichTextEditorFontFamilyControl=eh,Object.defineProperty(exports,`RichTextEditorImage`,{enumerable:!0,get:function(){return L.default}}),exports.RichTextEditorImageUploadControl=th,exports.RichTextEditorLinkControl=Ym,exports.RichTextEditorResizableImage=zp,exports.RichTextEditorSourceCodeControl=Qm,exports.RichTextEditorTableControls=wh,exports.RichTextEditorToolbar=Vp,exports.SearchControl=$f,exports.SelectDay=Qd,exports.SelectMonth=nf,exports.SelectTime=Ng,exports.SelectView=Cg,exports.SelectWeek=sf,exports.ShareDialog=mv,exports.ShowError=gv,exports.ShowMessage=vv,exports.SkeletonLoader=CS,exports.Space=nd,exports.SplitPane=hd,exports.Spoiler=Tb,exports.Spotlight=pp,exports.SpotlightAction=np,exports.SpotlightActionsGroup=rp,exports.SpotlightActionsList=ip,exports.SpotlightEmpty=ap,exports.SpotlightFooter=op,exports.SpotlightRoot=Zf,exports.SpotlightSearch=ep,exports.StackV2=H,exports.StackedUsers=xx,exports.Stepper=zb,exports.StrikeThroughControl=Oh,exports.SubscriptControl=Wh,exports.SuperscriptControl=Gh,exports.TIME_RADIO_GROUP=Eg,exports.TableKit=I.TableKit,exports.TaskListControl=$h,exports.TaskListLiftControl=tg,exports.TaskListSinkControl=eg,exports.Timeline=Nb,exports.ToggleHeaderColumnControl=dg,exports.ToggleHeaderRowControl=fg,exports.ToggleTableColumnLinesControl=pg,exports.ToggleTableRowLinesControl=mg,exports.TypographyControl=Cd,exports.UnderlineControl=Dh,exports.UndoControl=Zh,exports.UniversalProvider=ye,exports.UnlinkControl=Ah,exports.UnsetColorControl=Xh,exports.UserCard=yx,exports.VideoPlayer=Ov,exports.applyHeaderStyles=hu,exports.autoFitColumns=gu,exports.buildHeaderCellStyle=mu,exports.clampHsva=o_,exports.clearInlineSVGCache=Ub,exports.cloneDeep=Ou,exports.closeOnActionTriggerAtom=Lf,exports.closeSpotlight=Wf,exports.color=J,exports.configureSkeletonLoader=lS,exports.createControl=K,exports.createSpotlight=Kf,exports.createSpotlightStore=zf,exports.debounce=Eu,exports.deepMerge=e.E,exports.defaultCalendarControlStrings=ff,exports.defaultCalendarMonthStrings=ef,exports.defaultSelectWeekStrings=rf,exports.defaultSpotlightFilter=dp,exports.detectContentType=Gu,exports.en=e.D,exports.equalColorObjects=i_,exports.equalHex=a_,exports.escapeCsvCell=_u,exports.every=Ru,exports.filter=Iu,exports.formatTime=Og,exports.get=Au,exports.getContentType=Ku,exports.getContrastingColor=r_,exports.getTaskListExtension=Lp,exports.groupBy=Pu,exports.hexToHsva=Hg,exports.hexToRgba=Gg,exports.hslaStringToHsva=$g,exports.hslaToHsva=Vg,exports.hsvaToHex=Ug,exports.hsvaToHexa=Wg,exports.hsvaToHslString=Jg,exports.hsvaToHsla=Bg,exports.hsvaToHslaString=Yg,exports.hsvaToRgbString=Xg,exports.hsvaToRgba=Rg,exports.hsvaToRgbaString=Zg,exports.isActionsGroup=cp,exports.isEmpty=ku,exports.limitActions=fp,exports.listIdAtom=Pf,exports.map=Fu,exports.onQueryChangeCallbackAtom=Rf,exports.openSpotlight=Uf,exports.openedAtom=Mf,exports.parseHue=Qg,exports.queryAtom=Ff,exports.registerBones=nS,exports.registeredActionsAtom=If,exports.renderContentAsEmailHtml=Gp,exports.resolveLocale=Of,exports.rgbaStringToHsva=e_,exports.rgbaToHex=Kg,exports.rgbaToHexa=qg,exports.rgbaToHsva=zg,exports.selectedAtom=Nf,exports.set=ju,exports.snapshotBones=Xx,exports.some=Lu,exports.spotlight=Hf,exports.spotlightActions=G,exports.spotlightStore=Bf,exports.throttle=Du,exports.timeKey=kg,exports.toasterId=fu,exports.toggleSpotlight=Gf,exports.uniq=Mu,exports.uniqBy=Nu,exports.useAIAssistantStrings=e.n,exports.useAISearchControlStrings=e.r,exports.useAppDashboardStrings=e.i,exports.useAppToast=pu,exports.useApplicationContext=be,exports.useAspectRatioStyles=id,exports.useBlockquoteStyles=ub,exports.useBrandCenterFonts=ze,exports.useCalendar=Gd,exports.useCalendarStrings=e.a,exports.useCalendarStyles=Rd,exports.useCenterStyles=ad,exports.useColorPickerStyles=Y,exports.useCommonStrings=e.o,exports.useCompactCalendarEvents=Ef,exports.useComponentStrings=e.c,exports.useComponentUtils=xu,exports.useDataGridStyles=rv,exports.useDateUtils=Su,exports.useDayViewStyles=Kd,exports.useDropzoneContext=gp,exports.useDropzoneStyles=xp,exports.useExportData=bu,exports.useFluentEmoji=du,exports.useGraphAPI=xe,exports.useGridStyles=Yu,exports.useImageUtils=Tu,exports.useIndexedDBCache=Se,exports.useInputFieldStrings=e.u,exports.useItemPickerStrings=e.d,exports.useKpiStrings=e.f,exports.useLayoutStyles=Zu,exports.useListItemActivityStrings=e.p,exports.useLocalization=e.m,exports.useLogging=B,exports.useMarqueeStyles=_b,exports.useMensionsStrings=e.h,exports.useMensionsStyles=Ry,exports.useMermaidDiagramStrings=e.g,exports.useMermaidDiagramStyles=nb,exports.useNavigationStyles=Ev,exports.useNoKpiStrings=e._,exports.useOptionTimeStyles=Tg,exports.usePolling=Ce,exports.useRenderHeaderStyles=pv,exports.useRichTextEditor=Bp,exports.useSearchControlStrings=e.v,exports.useSelectTimeStyles=wg,exports.useShareDialogStrings=e.y,exports.useShowErrorStyles=hv,exports.useShowMessageStyles=_v,exports.useSkeletonExtract=Zx,exports.useSpaceStyles=td,exports.useSplitPaneStyles=md,exports.useSpotlight=qf,exports.useSpotlightShortcut=Yf,exports.useSpotlightStrings=e.b,exports.useStrings=e.x,exports.useStyles=tb,exports.useTimeZoneHelper=Ee,exports.useUserCardStrings=e.S,exports.useUtils=Md,exports.useVideoStyles=Dv,exports.useWeekViewStyles=Vd,exports.useWorldMapStrings=e.C,exports.validHex=n_;
491
491
  //# sourceMappingURL=index.cjs.map