@solibo/solibo-ui 0.2.14 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/assets/index.css +1 -1
  2. package/dist/assets/index10.css +0 -1
  3. package/dist/assets/index11.css +1 -1
  4. package/dist/assets/index12.css +1 -1
  5. package/dist/assets/index13.css +1 -1
  6. package/dist/assets/index14.css +1 -1
  7. package/dist/assets/index15.css +1 -1
  8. package/dist/assets/index16.css +1 -1
  9. package/dist/assets/index17.css +1 -1
  10. package/dist/assets/index18.css +1 -1
  11. package/dist/assets/index19.css +1 -1
  12. package/dist/assets/index2.css +1 -1
  13. package/dist/assets/index20.css +1 -0
  14. package/dist/assets/index21.css +1 -0
  15. package/dist/assets/index22.css +1 -0
  16. package/dist/assets/index23.css +1 -0
  17. package/dist/assets/index24.css +1 -0
  18. package/dist/assets/index25.css +1 -0
  19. package/dist/assets/index26.css +1 -0
  20. package/dist/assets/index27.css +1 -0
  21. package/dist/assets/index3.css +1 -1
  22. package/dist/assets/index4.css +1 -1
  23. package/dist/assets/index5.css +1 -1
  24. package/dist/assets/index6.css +1 -1
  25. package/dist/assets/index7.css +1 -1
  26. package/dist/assets/index8.css +1 -1
  27. package/dist/assets/index9.css +1 -1
  28. package/dist/assets/styles.css +1 -0
  29. package/dist/components/accordion/index.cjs +1 -1
  30. package/dist/components/accordion/index.cjs.map +1 -1
  31. package/dist/components/accordion/index.js +14 -28
  32. package/dist/components/accordion/index.js.map +1 -1
  33. package/dist/components/aside/index.cjs +1 -1
  34. package/dist/components/aside/index.cjs.map +1 -1
  35. package/dist/components/aside/index.js +19 -17
  36. package/dist/components/aside/index.js.map +1 -1
  37. package/dist/components/banner/index.cjs +1 -1
  38. package/dist/components/banner/index.js +1 -1
  39. package/dist/components/branding/index.cjs +1 -1
  40. package/dist/components/branding/index.js +1 -1
  41. package/dist/components/button/index.cjs +1 -1
  42. package/dist/components/button/index.cjs.map +1 -1
  43. package/dist/components/button/index.js +49 -31
  44. package/dist/components/button/index.js.map +1 -1
  45. package/dist/components/card/index.cjs +1 -1
  46. package/dist/components/card/index.cjs.map +1 -1
  47. package/dist/components/card/index.js +34 -20
  48. package/dist/components/card/index.js.map +1 -1
  49. package/dist/components/checkbox/index.cjs +2 -0
  50. package/dist/components/checkbox/index.cjs.map +1 -0
  51. package/dist/components/checkbox/index.js +32 -0
  52. package/dist/components/checkbox/index.js.map +1 -0
  53. package/dist/components/component/index.cjs +1 -1
  54. package/dist/components/component/index.js +9 -9
  55. package/dist/components/dialog/index.cjs +1 -1
  56. package/dist/components/dialog/index.cjs.map +1 -1
  57. package/dist/components/dialog/index.js +16 -17
  58. package/dist/components/dialog/index.js.map +1 -1
  59. package/dist/components/document/index.cjs +2 -0
  60. package/dist/components/document/index.cjs.map +1 -0
  61. package/dist/components/document/index.js +53 -0
  62. package/dist/components/document/index.js.map +1 -0
  63. package/dist/components/dropdown/index.cjs +1 -1
  64. package/dist/components/dropdown/index.cjs.map +1 -1
  65. package/dist/components/dropdown/index.js +20 -15
  66. package/dist/components/dropdown/index.js.map +1 -1
  67. package/dist/components/dropzone/index.cjs +2 -0
  68. package/dist/components/dropzone/index.cjs.map +1 -0
  69. package/dist/components/dropzone/index.js +63 -0
  70. package/dist/components/dropzone/index.js.map +1 -0
  71. package/dist/components/editor/index.cjs +2 -2
  72. package/dist/components/editor/index.js +2 -2
  73. package/dist/components/figure/index.cjs +1 -1
  74. package/dist/components/figure/index.js +3 -3
  75. package/dist/components/footer/index.cjs +2 -0
  76. package/dist/components/footer/index.cjs.map +1 -0
  77. package/dist/components/footer/index.js +15 -0
  78. package/dist/components/footer/index.js.map +1 -0
  79. package/dist/components/form/index.cjs +1 -1
  80. package/dist/components/form/index.cjs.map +1 -1
  81. package/dist/components/form/index.js +5 -5
  82. package/dist/components/form/index.js.map +1 -1
  83. package/dist/components/grid/index.cjs +2 -0
  84. package/dist/components/grid/index.cjs.map +1 -0
  85. package/dist/components/grid/index.js +140 -0
  86. package/dist/components/grid/index.js.map +1 -0
  87. package/dist/components/header/index.cjs +1 -1
  88. package/dist/components/header/index.cjs.map +1 -1
  89. package/dist/components/header/index.js +11 -10
  90. package/dist/components/header/index.js.map +1 -1
  91. package/dist/components/icon/index.cjs +1 -1
  92. package/dist/components/icon/index.cjs.map +1 -1
  93. package/dist/components/icon/index.js +53 -31
  94. package/dist/components/icon/index.js.map +1 -1
  95. package/dist/components/input/index.cjs +1 -1
  96. package/dist/components/input/index.cjs.map +1 -1
  97. package/dist/components/input/index.js +13 -13
  98. package/dist/components/input/index.js.map +1 -1
  99. package/dist/components/layout/index.cjs +2 -0
  100. package/dist/components/layout/index.cjs.map +1 -0
  101. package/dist/components/layout/index.js +17 -0
  102. package/dist/components/layout/index.js.map +1 -0
  103. package/dist/components/link/index.cjs +1 -1
  104. package/dist/components/link/index.js +9 -9
  105. package/dist/components/list/index.cjs +1 -1
  106. package/dist/components/list/index.js +5 -5
  107. package/dist/components/loading/index.cjs +2 -0
  108. package/dist/components/loading/index.cjs.map +1 -0
  109. package/dist/components/loading/index.js +99 -0
  110. package/dist/components/loading/index.js.map +1 -0
  111. package/dist/components/nav/index.cjs +1 -1
  112. package/dist/components/nav/index.cjs.map +1 -1
  113. package/dist/components/nav/index.js +92 -24
  114. package/dist/components/nav/index.js.map +1 -1
  115. package/dist/components/picture/index.cjs +2 -0
  116. package/dist/components/picture/index.cjs.map +1 -0
  117. package/dist/components/picture/index.js +150 -0
  118. package/dist/components/picture/index.js.map +1 -0
  119. package/dist/components/toggle/index.cjs +2 -0
  120. package/dist/components/toggle/index.cjs.map +1 -0
  121. package/dist/components/toggle/index.js +39 -0
  122. package/dist/components/toggle/index.js.map +1 -0
  123. package/dist/index.cjs +1 -1
  124. package/dist/index.d.ts +153 -21
  125. package/dist/index.js +40 -22
  126. package/dist/index.js.map +1 -1
  127. package/dist/styles.module-B_pXIacc.cjs +2 -0
  128. package/dist/styles.module-B_pXIacc.cjs.map +1 -0
  129. package/dist/styles.module-BhmNqlYd.js +7 -0
  130. package/dist/styles.module-BhmNqlYd.js.map +1 -0
  131. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index7.css');const V=require("react/jsx-runtime"),U=require("react"),Ms=require("react-dom"),dn=require("../../classix-5H4IWnMA.cjs"),cr=require("../button/index.cjs"),fr=require("../icon/index.cjs"),o0=require("../input/index.cjs");function a0(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const Du=a0(U);function Wn(n){return{}}const qi={},l0={},va={},Nt={},Jt={},An={},Xt={},fu={},Qu={},On={},Pn={},Ue={},ji={},Ui={},c0={},wa={},f0={},Sa={},d0={},Ta={},Ca={},Br={},h0={},Ea={},Na={},ka={},p0={},g0={},m0={},Rs={},Aa={},b0={},Oa={},Pa={},y0={},du={},zi={},Yu={},x0={},_0={},dr={},hr={},v0={},w0={},S0={},Re=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,T0=Re&&"documentMode"in document?document.documentMode:null,Ae=Re&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ht=Re&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),$r=!(!Re||!("InputEvent"in window)||T0)&&"getTargetRanges"in new window.InputEvent("input"),hu=Re&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Hn=Re&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,C0=Re&&/Android/.test(navigator.userAgent),Ia=Re&&/^(?=.*Chrome).*/i.test(navigator.userAgent),E0=Re&&C0&&Ia,Wi=Re&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Ia,Vn=1,mt=3,At=0,La=1,Yt=2,N0=0,k0=1,A0=2,Fr=4,qr=8,Hi=128,O0=112|(3|Fr|qr)|Hi,Vi=1,Gi=2,Ki=3,Ji=4,Xi=5,Zi=6,pu=hu||Hn||Wi?" ":"​",Ze=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index12.css');const V=require("react/jsx-runtime"),U=require("react"),Ms=require("react-dom"),dn=require("../../classix-5H4IWnMA.cjs"),cr=require("../button/index.cjs"),fr=require("../icon/index.cjs"),o0=require("../input/index.cjs");function a0(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const Du=a0(U);function Wn(n){return{}}const qi={},l0={},va={},Nt={},Jt={},An={},Xt={},fu={},Qu={},On={},Pn={},Ue={},ji={},Ui={},c0={},wa={},f0={},Sa={},d0={},Ta={},Ca={},Br={},h0={},Ea={},Na={},ka={},p0={},g0={},m0={},Rs={},Aa={},b0={},Oa={},Pa={},y0={},du={},zi={},Yu={},x0={},_0={},dr={},hr={},v0={},w0={},S0={},Re=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,T0=Re&&"documentMode"in document?document.documentMode:null,Ae=Re&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ht=Re&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),$r=!(!Re||!("InputEvent"in window)||T0)&&"getTargetRanges"in new window.InputEvent("input"),hu=Re&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Hn=Re&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,C0=Re&&/Android/.test(navigator.userAgent),Ia=Re&&/^(?=.*Chrome).*/i.test(navigator.userAgent),E0=Re&&C0&&Ia,Wi=Re&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Ia,Vn=1,mt=3,At=0,La=1,Yt=2,N0=0,k0=1,A0=2,Fr=4,qr=8,Hi=128,O0=112|(3|Fr|qr)|Hi,Vi=1,Gi=2,Ki=3,Ji=4,Xi=5,Zi=6,pu=hu||Hn||Wi?" ":"​",Ze=`
2
2
 
3
3
  `,P0=ht?" ":pu,Da="֑-߿יִ-﷽ﹰ-ﻼ",Ma="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",I0=new RegExp("^[^"+Ma+"]*["+Da+"]"),L0=new RegExp("^[^"+Da+"]*["+Ma+"]"),Ot={bold:1,code:16,highlight:Hi,italic:2,strikethrough:Fr,subscript:32,superscript:64,underline:qr},D0={directionless:1,unmergeable:2},Bs={center:Gi,end:Zi,justify:Ji,left:Vi,right:Ki,start:Xi},M0={[Gi]:"center",[Zi]:"end",[Ji]:"justify",[Vi]:"left",[Ki]:"right",[Xi]:"start"},R0={normal:0,segmented:2,token:1},B0={[N0]:"normal",[A0]:"segmented",[k0]:"token"};function $0(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var L=$0(function(n){const e=new URLSearchParams;e.append("code",n);for(let t=1;t<arguments.length;t++)e.append("v",arguments[t]);throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)});function jr(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}const F0=100;let ei=!1,Qi=0;function q0(n){Qi=n.timeStamp}function Mu(n,e,t){const r=n.nodeName==="BR",u=e.__lexicalLineBreak;return u&&(n===u||r&&n.previousSibling===u)||r&&mu(n,t)!==void 0}function j0(n,e,t){const r=Ne(t._window);let u=null,i=null;r!==null&&r.anchorNode===n&&(u=r.anchorOffset,i=r.focusOffset);const s=n.nodeValue;s!==null&&rs(e,s,u,i,!1)}function U0(n,e,t){if(I(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return e.nodeType===mt&&t.isAttached()}function z0(n,e,t,r){for(let u=n;u&&!rf(u);u=Kn(u)){const i=mu(u,e);if(i!==void 0){const s=fe(i,t);if(s)return te(s)?void 0:[u,s]}else if(u===r)return[r,Wa(t)]}}function Ra(n,e,t){ei=!0;const r=performance.now()-Qi>F0;try{Te(n,()=>{const u=$()||function(c){return c.getEditorState().read(()=>{const d=$();return d!==null?d.clone():null})}(n),i=new Map,s=n.getRootElement(),o=n._editorState,a=n._blockCursorElement;let l=!1,f="";for(let c=0;c<e.length;c++){const d=e[c],p=d.type,m=d.target,g=z0(m,n,o,s);if(!g)continue;const[y,b]=g;if(p==="characterData")r&&M(b)&&U0(u,m,b)&&j0(m,b,n);else if(p==="childList"){l=!0;const _=d.addedNodes;for(let S=0;S<_.length;S++){const P=_[S],C=Ua(P),D=P.parentNode;if(D!=null&&P!==a&&C===null&&!Mu(P,D,n)){if(ht){const q=P.innerText||P.nodeValue;q&&(f+=q)}D.removeChild(P)}}const w=d.removedNodes,T=w.length;if(T>0){let S=0;for(let P=0;P<T;P++){const C=w[P];(Mu(C,m,n)||a===C)&&(m.appendChild(C),S++)}T!==S&&i.set(y,b)}}}if(i.size>0)for(const[c,d]of i)d.reconcileObservedMutation(c,n);const h=t.takeRecords();if(h.length>0){for(let c=0;c<h.length;c++){const d=h[c],p=d.addedNodes,m=d.target;for(let g=0;g<p.length;g++){const y=p[g],b=y.parentNode;b==null||y.nodeName!=="BR"||Mu(y,m,n)||b.removeChild(y)}}t.takeRecords()}u!==null&&(l&&(u.dirty=!0,Me(u)),ht&&Ka(n)&&u.insertRawText(f))})}finally{ei=!1}}function Ba(n){const e=n._observer;e!==null&&Ra(n,e.takeRecords(),e)}function $a(n){(function(e){Qi===0&&yu(e).addEventListener("textInput",q0,!0)})(n),n._observer=new MutationObserver((e,t)=>{Ra(n,e,t)})}function $s(n,e){const t=n.__mode,r=n.__format,u=n.__style,i=e.__mode,s=e.__format,o=e.__style;return!(t!==null&&t!==i||r!==null&&r!==s||u!==null&&u!==o)}function Fs(n,e){const t=n.mergeWithSibling(e),r=ue()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function qs(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&M(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if($s(e,r)){r=Fs(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&M(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if($s(r,t)){r=Fs(r,t);break}break}t.remove()}}else r.remove()}function Fa(n){return js(n.anchor),js(n.focus),n}function js(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,u;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),u=!0):(r=e.getChildAtIndex(t),u=!1),M(r)){n.set(r.__key,u?r.getTextContentSize():0,"text");break}if(!E(r))break;n.set(r.__key,u?r.getChildrenSize():0,"element")}}let W0=1;const H0=typeof queueMicrotask=="function"?queueMicrotask:n=>{Promise.resolve().then(n)};function Yi(n){const e=document.activeElement;if(e===null)return!1;const t=e.nodeName;return te(en(n))&&(t==="INPUT"||t==="TEXTAREA"||e.contentEditable==="true"&&gu(e)==null)}function Gn(n,e,t){const r=n.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(t)&&e!==null&&!Yi(e)&&qa(e)===n}catch{return!1}}function es(n){return n instanceof Su}function qa(n){let e=n;for(;e!=null;){const t=gu(e);if(es(t))return t;e=Kn(e)}return null}function gu(n){return n?n.__lexicalEditor:null}function St(n){return n.isToken()||n.isSegmented()}function V0(n){return n.nodeType===mt}function Ur(n){let e=n;for(;e!=null;){if(V0(e))return e;e=e.firstChild}return null}function zr(n,e,t){const r=Ot[e];if(t!==null&&(n&r)==(t&r))return n;let u=n^r;return e==="subscript"?u&=-65:e==="superscript"&&(u&=-33),u}function ja(n){return M(n)||pt(n)||te(n)}function G0(n,e){if(e!=null)return void(n.__key=e);ye(),gl();const t=ue(),r=tt(),u=""+W0++;r._nodeMap.set(u,n),E(n)?t._dirtyElements.set(u,!0):t._dirtyLeaves.add(u),t._cloneNotNeeded.add(u),t._dirtyType=La,n.__key=u}function kt(n){const e=n.getParent();if(e!==null){const t=n.getWritable(),r=e.getWritable(),u=n.getPreviousSibling(),i=n.getNextSibling();if(u===null)if(i!==null){const s=i.getWritable();r.__first=i.__key,s.__prev=null}else r.__first=null;else{const s=u.getWritable();if(i!==null){const o=i.getWritable();o.__prev=s.__key,s.__next=o.__key}else s.__next=null;t.__prev=null}if(i===null)if(u!==null){const s=u.getWritable();r.__last=u.__key,s.__next=null}else r.__last=null;else{const s=i.getWritable();if(u!==null){const o=u.getWritable();o.__next=s.__key,s.__prev=o.__key}else s.__prev=null;t.__next=null}r.__size--,t.__parent=null}}function Wr(n){gl();const e=n.getLatest(),t=e.__parent,r=tt(),u=ue(),i=r._nodeMap,s=u._dirtyElements;t!==null&&function(a,l,f){let h=a;for(;h!==null;){if(f.has(h))return;const c=l.get(h);if(c===void 0)break;f.set(h,!1),h=c.__parent}}(t,i,s);const o=e.__key;u._dirtyType=La,E(n)?s.set(o,!0):u._dirtyLeaves.add(o)}function ce(n){ye();const e=ue(),t=e._compositionKey;if(n!==t){if(e._compositionKey=n,t!==null){const r=fe(t);r!==null&&r.getWritable()}if(n!==null){const r=fe(n);r!==null&&r.getWritable()}}}function lt(){return Yn()?null:ue()._compositionKey}function fe(n,e){const t=(e||tt())._nodeMap.get(n);return t===void 0?null:t}function Ua(n,e){const t=mu(n,ue());return t!==void 0?fe(t,e):null}function mu(n,e){return n[`__lexicalKey_${e._key}`]}function en(n,e){let t=n;for(;t!=null;){const r=Ua(t,e);if(r!==null)return r;t=Kn(t)}return null}function za(n){const e=n._decorators,t=Object.assign({},e);return n._pendingDecorators=t,t}function Us(n){return n.read(()=>ie().getTextContent())}function ie(){return Wa(tt())}function Wa(n){return n._nodeMap.get("root")}function Me(n){ye();const e=tt();n!==null&&(n.dirty=!0,n.setCachedNodes(null)),e._selection=n}function Gt(n){const e=ue(),t=function(r,u){let i=r;for(;i!=null;){const s=mu(i,u);if(s!==void 0)return s;i=Kn(i)}return null}(n,e);return t===null?n===e.getRootElement()?fe("root"):null:fe(t)}function zs(n,e){return e?n.getTextContentSize():0}function Ha(n){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n)}function ts(n){const e=[];let t=n;for(;t!==null;)e.push(t),t=t._parentEditor;return e}function Va(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Ga(n){return n.nodeType===mt?n.nodeValue:null}function ns(n,e,t){const r=Ne(e._window);if(r===null)return;const u=r.anchorNode;let{anchorOffset:i,focusOffset:s}=r;if(u!==null){let o=Ga(u);const a=en(u);if(o!==null&&M(a)){if(o===pu&&t){const l=t.length;o=t,i=l,s=l}o!==null&&rs(a,o,i,s,n)}}}function rs(n,e,t,r,u){let i=n;if(i.isAttached()&&(u||!i.isDirty())){const s=i.isComposing();let o=e;(s||u)&&e[e.length-1]===pu&&(o=e.slice(0,-1));const a=i.getTextContent();if(u||o!==a){if(o===""){if(ce(null),hu||Hn||Wi)i.remove();else{const m=ue();setTimeout(()=>{m.update(()=>{i.isAttached()&&i.remove()})},20)}return}const l=i.getParent(),f=Qn(),h=i.getTextContentSize(),c=lt(),d=i.getKey();if(i.isToken()||c!==null&&d===c&&!s||I(f)&&(l!==null&&!l.canInsertTextBefore()&&f.anchor.offset===0||f.anchor.key===n.__key&&f.anchor.offset===0&&!i.canInsertTextBefore()&&!s||f.focus.key===n.__key&&f.focus.offset===h&&!i.canInsertTextAfter()&&!s))return void i.markDirty();const p=$();if(!I(p)||t===null||r===null)return void i.setTextContent(o);if(p.setTextNodeRange(i,t,i,r),i.isSegmented()){const m=se(i.getTextContent());i.replace(m),i=m}i.setTextContent(o)}}}function K0(n,e){if(e.isSegmented())return!0;if(!n.isCollapsed())return!1;const t=n.anchor.offset,r=e.getParentOrThrow(),u=e.isToken();return t===0?!e.canInsertTextBefore()||!r.canInsertTextBefore()&&!e.isComposing()||u||function(i){const s=i.getPreviousSibling();return(M(s)||E(s)&&s.isInline())&&!s.canInsertTextAfter()}(e):t===e.getTextContentSize()&&(!e.canInsertTextAfter()||!r.canInsertTextAfter()&&!e.isComposing()||u)}function Ws(n){return n==="ArrowLeft"}function Hs(n){return n==="ArrowRight"}function _n(n,e){return Ae?n:e}function Vs(n){return n==="Enter"}function hn(n){return n==="Backspace"}function pn(n){return n==="Delete"}function Gs(n,e,t){return n.toLowerCase()==="a"&&_n(e,t)}function J0(){const n=ie();Me(Fa(n.select(0,n.getChildrenSize())))}function wn(n,e){n.__lexicalClassNameCache===void 0&&(n.__lexicalClassNameCache={});const t=n.__lexicalClassNameCache,r=t[e];if(r!==void 0)return r;const u=n[e];if(typeof u=="string"){const i=jr(u);return t[e]=i,i}return u}function us(n,e,t,r,u){if(t.size===0)return;const i=r.__type,s=r.__key,o=e.get(i);o===void 0&&L(33,i);const a=o.klass;let l=n.get(a);l===void 0&&(l=new Map,n.set(a,l));const f=l.get(s),h=f==="destroyed"&&u==="created";(f===void 0||h)&&l.set(s,h?"updated":u)}function Ks(n,e,t){const r=n.getParent();let u=t,i=n;return r!==null&&(e&&t===0?(u=i.getIndexWithinParent(),i=r):e||t!==i.getChildrenSize()||(u=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(e?u-1:u)}function In(n,e){const t=n.offset;if(n.type==="element")return Ks(n.getNode(),e,t);{const r=n.getNode();if(e&&t===0||!e&&t===r.getTextContentSize()){const u=e?r.getPreviousSibling():r.getNextSibling();return u===null?Ks(r.getParentOrThrow(),e,r.getIndexWithinParent()+(e?0:1)):u}}return null}function Ka(n){const e=yu(n).event,t=e&&e.inputType;return t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function R(n,e,t){return yl(n,e,t)}function bu(n){return!he(n)&&!n.isLastChild()&&!n.isInline()}function Hr(n,e){const t=n._keyToDOMMap.get(e);return t===void 0&&L(75,e),t}function Kn(n){const e=n.assignedSlot||n.parentElement;return e!==null&&e.nodeType===11?e.host:e}function Sn(n,e){let t=n.getParent();for(;t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function yu(n){const e=n._window;return e===null&&L(78),e}function X0(n){let e=n.getParentOrThrow();for(;e!==null;){if(Qe(e))return e;e=e.getParentOrThrow()}return e}function Qe(n){return he(n)||E(n)&&n.isShadowRoot()}function bt(n){const e=ue(),t=n.constructor.getType(),r=e._nodes.get(t);r===void 0&&L(200,n.constructor.name,t);const{replace:u,replaceWithKlass:i}=r;if(u!==null){const s=u(n),o=s.constructor;return i!==null?s instanceof i||L(201,i.name,i.getType(),o.name,o.getType(),n.constructor.name,t):s instanceof n.constructor&&o!==n.constructor||L(202,o.name,o.getType(),n.constructor.name,t),s.__key===n.__key&&L(203,n.constructor.name,t,o.name,o.getType()),s}return n}function Ru(n,e){!he(n.getParent())||E(e)||te(e)||L(99)}function Bu(n){return(te(n)||E(n)&&!n.canBeEmpty())&&!n.isInline()}function is(n,e,t){t.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=n.parentElement;r!==null&&r.removeChild(n)}function Z0(n,e,t){let r=n._blockCursorElement;if(I(t)&&t.isCollapsed()&&t.anchor.type==="element"&&e.contains(document.activeElement)){const u=t.anchor,i=u.getNode(),s=u.offset;let o=!1,a=null;if(s===i.getChildrenSize())Bu(i.getChildAtIndex(s-1))&&(o=!0);else{const l=i.getChildAtIndex(s);if(l!==null&&Bu(l)){const f=l.getPreviousSibling();(f===null||Bu(f))&&(o=!0,a=n.getElementByKey(l.__key))}}if(o){const l=n.getElementByKey(i.__key);return r===null&&(n._blockCursorElement=r=function(f){const h=f.theme,c=document.createElement("div");c.contentEditable="false",c.setAttribute("data-lexical-cursor","true");let d=h.blockCursor;if(d!==void 0){if(typeof d=="string"){const p=jr(d);d=h.blockCursor=p}d!==void 0&&c.classList.add(...d)}return c}(n._config)),e.style.caretColor="transparent",void(a===null?l.appendChild(r):l.insertBefore(r,a))}}r!==null&&is(r,n,e)}function Ne(n){return Re?(n||window).getSelection():null}function Q0(n){return Rt(n)&&n.tagName==="A"}function Rt(n){return n.nodeType===1}function Js(n){return n.nodeType===11}function ti(n){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return n.nodeName.match(e)!==null}function Vr(n){const e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return n.nodeName.match(e)!==null}function ot(n){if(te(n)&&!n.isInline())return!0;if(!E(n)||Qe(n))return!1;const e=n.getFirstChild(),t=e===null||pt(e)||M(e)||e.isInline();return!n.isInline()&&n.canBeEmpty()!==!1&&t}function gn(n,e){let t=n;for(;t!==null&&t.getParent()!==null&&!e(t);)t=t.getParentOrThrow();return e(t)?t:null}function Y0(){return ue()}const Xs=new WeakMap,ef=new Map;function tf(n){if(!n._readOnly&&n.isEmpty())return ef;n._readOnly||L(192);let e=Xs.get(n);if(!e){e=new Map,Xs.set(n,e);for(const[t,r]of n._nodeMap){const u=r.__type;let i=e.get(u);i||(i=new Map,e.set(u,i)),i.set(t,r)}}return e}function ss(n){const e=n.constructor.clone(n);return e.afterCloneFrom(n),e}function nf(n,e){const t=(parseInt(n.style.paddingInlineStart,10)||0)/40;e.setIndent(t)}function rf(n){return n.__lexicalUnmanaged===!0}function Ja(n,e,t,r,u,i){let s=n.getFirstChild();for(;s!==null;){const o=s.__key;s.__parent===e&&(E(s)&&Ja(s,o,t,r,u,i),t.has(o)||i.delete(o),u.push(o)),s=s.getNextSibling()}}let gt,pe,Ln,xu,ni,ri,Pt,De,ui,Dn,oe="",de="",Fe=null,Oe="",Xe="",Xa=!1,Mn=!1,Or=null;function Gr(n,e){const t=Pt.get(n);if(e!==null){const r=oi(n);r.parentNode===e&&e.removeChild(r)}if(De.has(n)||pe._keyToDOMMap.delete(n),E(t)){const r=Jr(t,Pt);ii(r,0,r.length-1,null)}t!==void 0&&us(Dn,Ln,xu,t,"destroyed")}function ii(n,e,t,r){let u=e;for(;u<=t;++u){const i=n[u];i!==void 0&&Gr(i,r)}}function wt(n,e){n.setProperty("text-align",e)}const uf="40px";function Za(n,e){const t=gt.theme.indent;if(typeof t=="string"){const u=n.classList.contains(t);e>0&&!u?n.classList.add(t):e<1&&u&&n.classList.remove(t)}const r=getComputedStyle(n).getPropertyValue("--lexical-indent-base-value")||uf;n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function Qa(n,e){const t=n.style;e===0?wt(t,""):e===Vi?wt(t,"left"):e===Gi?wt(t,"center"):e===Ki?wt(t,"right"):e===Ji?wt(t,"justify"):e===Xi?wt(t,"start"):e===Zi&&wt(t,"end")}function Kr(n,e){const t=De.get(n);t===void 0&&L(60);const r=t.createDOM(gt,pe);if(function(u,i,s){const o=s._keyToDOMMap;(function(a,l,f){a[`__lexicalKey_${l._key}`]=f})(i,s,u),o.set(u,i)}(n,r,pe),M(t)?r.setAttribute("data-lexical-text","true"):te(t)&&r.setAttribute("data-lexical-decorator","true"),E(t)){const u=t.__indent,i=t.__size;if(u!==0&&Za(r,u),i!==0){const o=i-1;(function(a,l,f,h){const c=de;de="",si(a,f,0,l,f.getDOMSlot(h)),el(f,h),de=c})(Jr(t,De),o,t,r)}const s=t.__format;s!==0&&Qa(r,s),t.isInline()||Ya(null,t,r),bu(t)&&(oe+=Ze,Xe+=Ze)}else{const u=t.getTextContent();if(te(t)){const i=t.decorate(pe,gt);i!==null&&tl(n,i),r.contentEditable="false"}else M(t)&&(t.isDirectionless()||(de+=u));oe+=u,Xe+=u}return e!==null&&e.insertChild(r),us(Dn,Ln,xu,t,"created"),r}function si(n,e,t,r,u){const i=oe;oe="";let s=t;for(;s<=r;++s){Kr(n[s],u);const o=De.get(n[s]);o!==null&&M(o)&&(Fe===null&&(Fe=o.getFormat()),Oe===""&&(Oe=o.getStyle()))}bu(e)&&(oe+=Ze),u.element.__lexicalTextContent=oe,oe=i+oe}function Zs(n,e){if(n){const t=n.__last;if(t){const r=e.get(t);if(r)return pt(r)?"line-break":te(r)&&r.isInline()?"decorator":null}return"empty"}return null}function Ya(n,e,t){const r=Zs(n,Pt),u=Zs(e,De);r!==u&&e.getDOMSlot(t).setManagedLineBreak(u)}function el(n,e){const t=e.__lexicalDirTextContent||"",r=e.__lexicalDir||"";if(t!==de||r!==Or){const i=de==="",s=i?Or:(u=de,I0.test(u)?"rtl":L0.test(u)?"ltr":null);if(s!==r){const o=e.classList,a=gt.theme;let l=r!==null?a[r]:void 0,f=s!==null?a[s]:void 0;if(l!==void 0){if(typeof l=="string"){const h=jr(l);l=a[r]=h}o.remove(...l)}if(s===null||i&&s==="ltr")e.removeAttribute("dir");else{if(f!==void 0){if(typeof f=="string"){const h=jr(f);f=a[s]=h}f!==void 0&&o.add(...f)}e.dir=s}Mn||(n.getWritable().__dir=s)}Or=s,e.__lexicalDirTextContent=de,e.__lexicalDir=s}var u}function sf(n,e,t){const r=de;var u;de="",Fe=null,Oe="",function(i,s,o){const a=oe,l=i.__size,f=s.__size;oe="";const h=o.element;if(l===1&&f===1){const c=i.__first,d=s.__first;if(c===d)vn(c,h);else{const m=oi(c),g=Kr(d,null);try{h.replaceChild(g,m)}catch(y){if(typeof y=="object"&&y!=null){const b=`${y.toString()} Parent: ${h.tagName}, new child: {tag: ${g.tagName} key: ${d}}, old child: {tag: ${m.tagName}, key: ${c}}.`;throw new Error(b)}throw y}Gr(c,null)}const p=De.get(d);M(p)&&(Fe===null&&(Fe=p.getFormat()),Oe===""&&(Oe=p.getStyle()))}else{const c=Jr(i,Pt),d=Jr(s,De);if(c.length!==l&&L(227),d.length!==f&&L(228),l===0)f!==0&&si(d,s,0,f-1,o);else if(f===0){if(l!==0){const p=o.after==null&&o.before==null&&o.element.__lexicalLineBreak==null;ii(c,0,l-1,p?null:h),p&&(h.textContent="")}}else(function(p,m,g,y,b,_){const w=y-1,T=b-1;let S,P,C=_.getFirstChild(),D=0,q=0;for(;D<=w&&q<=T;){const A=m[D],B=g[q];if(A===B)C=$u(vn(B,_.element)),D++,q++;else{S===void 0&&(S=new Set(m)),P===void 0&&(P=new Set(g));const O=P.has(A),k=S.has(B);if(O)if(k){const F=Hr(pe,B);F===C?C=$u(vn(B,_.element)):(_.withBefore(C).insertChild(F),vn(B,_.element)),D++,q++}else Kr(B,_.withBefore(C)),q++;else C=$u(oi(A)),Gr(A,_.element),D++}const x=De.get(B);x!==null&&M(x)&&(Fe===null&&(Fe=x.getFormat()),Oe===""&&(Oe=x.getStyle()))}const v=D>w,N=q>T;if(v&&!N){const A=g[T+1],B=A===void 0?null:pe.getElementByKey(A);si(g,p,q,T,_.withBefore(B))}else N&&!v&&ii(m,D,w,_.element)})(s,c,d,l,f,o)}bu(s)&&(oe+=Ze),h.__lexicalTextContent=oe,oe=a+oe}(n,e,e.getDOMSlot(t)),el(e,t),tn(u=e)&&Fe!=null&&Fe!==u.__textFormat&&!Mn&&(u.setTextFormat(Fe),u.setTextStyle(Oe)),function(i){tn(i)&&Oe!==""&&Oe!==i.__textStyle&&!Mn&&i.setTextStyle(Oe)}(e),de=r}function Jr(n,e){const t=[];let r=n.__first;for(;r!==null;){const u=e.get(r);u===void 0&&L(101),t.push(r),r=u.__next}return t}function vn(n,e){const t=Pt.get(n);let r=De.get(n);t!==void 0&&r!==void 0||L(61);const u=Xa||ri.has(n)||ni.has(n),i=Hr(pe,n);if(t===r&&!u){if(E(t)){const s=i.__lexicalTextContent;s!==void 0&&(oe+=s,Xe+=s);const o=i.__lexicalDirTextContent;o!==void 0&&(de+=o)}else{const s=t.getTextContent();M(t)&&!t.isDirectionless()&&(de+=s),Xe+=s,oe+=s}return i}if(t!==r&&u&&us(Dn,Ln,xu,r,"updated"),r.updateDOM(t,i,gt)){const s=Kr(n,null);return e===null&&L(62),e.replaceChild(s,i),Gr(n,null),s}if(E(t)&&E(r)){const s=r.__indent;s!==t.__indent&&Za(i,s);const o=r.__format;o!==t.__format&&Qa(i,o),u&&(sf(t,r,i),he(r)||r.isInline()||Ya(t,r,i)),bu(r)&&(oe+=Ze,Xe+=Ze)}else{const s=r.getTextContent();if(te(r)){const o=r.decorate(pe,gt);o!==null&&tl(n,o)}else M(r)&&!r.isDirectionless()&&(de+=s);oe+=s,Xe+=s}if(!Mn&&he(r)&&r.__cachedText!==Xe){const s=r.getWritable();s.__cachedText=Xe,r=s}return i}function tl(n,e){let t=pe._pendingDecorators;const r=pe._decorators;if(t===null){if(r[n]===e)return;t=za(pe)}t[n]=e}function $u(n){let e=n.nextSibling;return e!==null&&e===pe._blockCursorElement&&(e=e.nextSibling),e}function of(n,e,t,r,u,i){oe="",Xe="",de="",Xa=r===Yt,Or=null,pe=t,gt=t._config,Ln=t._nodes,xu=pe._listeners.mutation,ni=u,ri=i,Pt=n._nodeMap,De=e._nodeMap,Mn=e._readOnly,ui=new Map(t._keyToDOMMap);const s=new Map;return Dn=s,vn("root",null),pe=void 0,Ln=void 0,ni=void 0,ri=void 0,Pt=void 0,De=void 0,gt=void 0,ui=void 0,Dn=void 0,s}function oi(n){const e=ui.get(n);return e===void 0&&L(75,n),e}const Ve=Object.freeze({}),ai=30,li=[["keydown",function(n,e){if(Tn=n.timeStamp,nl=n.key,e.isComposing())return;const{key:t,shiftKey:r,ctrlKey:u,metaKey:i,altKey:s}=n;if(!R(e,c0,n)&&t!=null){if(function(o,a,l,f){return Hs(o)&&!a&&!f&&!l}(t,u,s,i))R(e,wa,n);else if(function(o,a,l,f,h){return Hs(o)&&!f&&!l&&(a||h)}(t,u,r,s,i))R(e,f0,n);else if(function(o,a,l,f){return Ws(o)&&!a&&!f&&!l}(t,u,s,i))R(e,Sa,n);else if(function(o,a,l,f,h){return Ws(o)&&!f&&!l&&(a||h)}(t,u,r,s,i))R(e,d0,n);else if(function(o,a,l){return function(f){return f==="ArrowUp"}(o)&&!a&&!l}(t,u,i))R(e,Ta,n);else if(function(o,a,l){return function(f){return f==="ArrowDown"}(o)&&!a&&!l}(t,u,i))R(e,Ca,n);else if(function(o,a){return Vs(o)&&a}(t,r))Cn=!0,R(e,Br,n);else if(function(o){return o===" "}(t))R(e,h0,n);else if(function(o,a){return Ae&&a&&o.toLowerCase()==="o"}(t,u))n.preventDefault(),Cn=!0,R(e,Jt,!0);else if(function(o,a){return Vs(o)&&!a}(t,r))Cn=!1,R(e,Br,n);else if(function(o,a,l,f){return Ae?!a&&!l&&(hn(o)||o.toLowerCase()==="h"&&f):!(f||a||l)&&hn(o)}(t,s,i,u))hn(t)?R(e,Ea,n):(n.preventDefault(),R(e,Nt,!0));else if(function(o){return o==="Escape"}(t))R(e,Na,n);else if(function(o,a,l,f,h){return Ae?!(l||f||h)&&(pn(o)||o.toLowerCase()==="d"&&a):!(a||f||h)&&pn(o)}(t,u,r,s,i))pn(t)?R(e,ka,n):(n.preventDefault(),R(e,Nt,!1));else if(function(o,a,l){return hn(o)&&(Ae?a:l)}(t,s,u))n.preventDefault(),R(e,On,!0);else if(function(o,a,l){return pn(o)&&(Ae?a:l)}(t,s,u))n.preventDefault(),R(e,On,!1);else if(function(o,a){return Ae&&a&&hn(o)}(t,i))n.preventDefault(),R(e,Pn,!0);else if(function(o,a){return Ae&&a&&pn(o)}(t,i))n.preventDefault(),R(e,Pn,!1);else if(function(o,a,l,f){return o.toLowerCase()==="b"&&!a&&_n(l,f)}(t,s,i,u))n.preventDefault(),R(e,Ue,"bold");else if(function(o,a,l,f){return o.toLowerCase()==="u"&&!a&&_n(l,f)}(t,s,i,u))n.preventDefault(),R(e,Ue,"underline");else if(function(o,a,l,f){return o.toLowerCase()==="i"&&!a&&_n(l,f)}(t,s,i,u))n.preventDefault(),R(e,Ue,"italic");else if(function(o,a,l,f){return o==="Tab"&&!a&&!l&&!f}(t,s,u,i))R(e,p0,n);else if(function(o,a,l,f){return o.toLowerCase()==="z"&&!a&&_n(l,f)}(t,r,i,u))n.preventDefault(),R(e,ji,void 0);else if(function(o,a,l,f){return Ae?o.toLowerCase()==="z"&&l&&a:o.toLowerCase()==="y"&&f||o.toLowerCase()==="z"&&f&&a}(t,r,i,u))n.preventDefault(),R(e,Ui,void 0);else{const o=e._editorState._selection;o===null||I(o)?!ht&&Gs(t,i,u)&&(n.preventDefault(),R(e,Yu,n)):function(a,l,f,h){return!l&&a.toLowerCase()==="c"&&(Ae?f:h)}(t,r,i,u)?(n.preventDefault(),R(e,du,n)):function(a,l,f,h){return!l&&a.toLowerCase()==="x"&&(Ae?f:h)}(t,r,i,u)?(n.preventDefault(),R(e,zi,n)):Gs(t,i,u)&&(n.preventDefault(),R(e,Yu,n))}(function(o,a,l,f){return o||a||l||f})(u,r,s,i)&&R(e,S0,n)}}],["pointerdown",function(n,e){const t=n.target,r=n.pointerType;t instanceof Node&&r!=="touch"&&Te(e,()=>{te(en(t))||(fi=!0)})}],["compositionstart",function(n,e){Te(e,()=>{const t=$();if(I(t)&&!e.isComposing()){const r=t.anchor,u=t.anchor.getNode();ce(r.key),(n.timeStamp<Tn+ai||r.type==="element"||!t.isCollapsed()||u.getFormat()!==t.format||M(u)&&u.getStyle()!==t.style)&&R(e,Xt,P0)}})}],["compositionend",function(n,e){ht?mn=!0:Te(e,()=>{Fu(e,n.data)})}],["input",function(n,e){n.stopPropagation(),Te(e,()=>{const t=$(),r=n.data,u=sl(n);if(r!=null&&I(t)&&il(t,u,r,n.timeStamp,!1)){mn&&(Fu(e,r),mn=!1);const i=t.anchor.getNode(),s=Ne(e._window);if(s===null)return;const o=t.isBackward(),a=o?t.anchor.offset:t.focus.offset,l=o?t.focus.offset:t.anchor.offset;$r&&!t.isCollapsed()&&M(i)&&s.anchorNode!==null&&i.getTextContent().slice(0,a)+r+i.getTextContent().slice(a+l)===Ga(s.anchorNode)||R(e,Xt,r);const f=r.length;ht&&f>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(t.anchor.offset-=f),hu||Hn||Wi||!e.isComposing()||(Tn=0,ce(null))}else ns(!1,e,r!==null?r:void 0),mn&&(Fu(e,r||void 0),mn=!1);ye(),Ba(ue())}),Wt=null}],["click",function(n,e){Te(e,()=>{const t=$(),r=Ne(e._window),u=Qn();if(r){if(I(t)){const i=t.anchor,s=i.getNode();i.type==="element"&&i.offset===0&&t.isCollapsed()&&!he(s)&&ie().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&u!==null&&t.is(u)?(r.removeAllRanges(),t.dirty=!0):n.detail===3&&!t.isCollapsed()&&s!==t.focus.getNode()&&(E(s)?s.select(0):s.getParentOrThrow().select(0))}else if(n.pointerType==="touch"){const i=r.anchorNode;if(i!==null){const s=i.nodeType;(s===Vn||s===mt)&&Me(as(u,r,e,n))}}}R(e,va,n)})}],["cut",Ve],["copy",Ve],["dragstart",Ve],["dragover",Ve],["dragend",Ve],["paste",Ve],["focus",Ve],["blur",Ve],["drop",Ve]];$r&&li.push(["beforeinput",(n,e)=>function(t,r){const u=t.inputType,i=sl(t);u==="deleteCompositionText"||ht&&Ka(r)||u!=="insertCompositionText"&&Te(r,()=>{const s=$();if(u==="deleteContentBackward"){if(s===null){const d=Qn();if(!I(d))return;Me(d.clone())}if(I(s)){const d=s.anchor.key===s.focus.key;if(o=t.timeStamp,nl==="MediaLast"&&o<Tn+ai&&r.isComposing()&&d){if(ce(null),Tn=0,setTimeout(()=>{Te(r,()=>{ce(null)})},ai),I(s)){const p=s.anchor.getNode();p.markDirty(),s.format=p.getFormat(),M(p)||L(142),s.style=p.getStyle()}}else{ce(null),t.preventDefault();const p=s.anchor.getNode(),m=p.getTextContent(),g=p.canInsertTextAfter(),y=s.anchor.offset===0&&s.focus.offset===m.length;E0&&d&&!y&&g||R(r,Nt,!0)}return}}var o;if(!I(s))return;const a=t.data;Wt!==null&&ns(!1,r,Wt),s.dirty&&Wt===null||!s.isCollapsed()||he(s.anchor.getNode())||i===null||s.applyDOMRange(i),Wt=null;const l=s.anchor,f=s.focus,h=l.getNode(),c=f.getNode();if(u!=="insertText"&&u!=="insertTranspose")switch(t.preventDefault(),u){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":R(r,Xt,t);break;case"insertFromComposition":ce(null),R(r,Xt,t);break;case"insertLineBreak":ce(null),R(r,Jt,!1);break;case"insertParagraph":ce(null),Cn&&!Hn?(Cn=!1,R(r,Jt,!1)):R(r,An,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":R(r,fu,t);break;case"deleteByComposition":(function(d,p){return d!==p||E(d)||E(p)||!d.isToken()||!p.isToken()})(h,c)&&R(r,Qu,t);break;case"deleteByDrag":case"deleteByCut":R(r,Qu,t);break;case"deleteContent":R(r,Nt,!1);break;case"deleteWordBackward":R(r,On,!0);break;case"deleteWordForward":R(r,On,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":R(r,Pn,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":R(r,Pn,!1);break;case"formatStrikeThrough":R(r,Ue,"strikethrough");break;case"formatBold":R(r,Ue,"bold");break;case"formatItalic":R(r,Ue,"italic");break;case"formatUnderline":R(r,Ue,"underline");break;case"historyUndo":R(r,ji,void 0);break;case"historyRedo":R(r,Ui,void 0)}else{if(a===`
4
4
  `)t.preventDefault(),R(r,Jt,!1);else if(a===Ze)t.preventDefault(),R(r,An,void 0);else if(a==null&&t.dataTransfer){const d=t.dataTransfer.getData("text/plain");t.preventDefault(),s.insertRawText(d)}else a!=null&&il(s,i,a,t.timeStamp,!0)?(t.preventDefault(),R(r,Xt,a)):Wt=a;rl=t.timeStamp}})}(n,e)]);let Tn=0,nl=null,rl=0,Wt=null;const Xr=new WeakMap;let ci=!1,fi=!1,Cn=!1,mn=!1,ul=[0,"",0,"root",0];function il(n,e,t,r,u){const i=n.anchor,s=n.focus,o=i.getNode(),a=ue(),l=Ne(a._window),f=l!==null?l.anchorNode:null,h=i.key,c=a.getElementByKey(h),d=t.length;return h!==s.key||!M(o)||(!u&&(!$r||rl<r+50)||o.isDirty()&&d<2||Ha(t))&&i.offset!==s.offset&&!o.isComposing()||St(o)||o.isDirty()&&d>1||(u||!$r)&&c!==null&&!o.isComposing()&&f!==Ur(c)||l!==null&&e!==null&&(!e.collapsed||e.startContainer!==l.anchorNode||e.startOffset!==l.anchorOffset)||o.getFormat()!==n.format||o.getStyle()!==n.style||K0(n,o)}function Qs(n,e){return n!==null&&n.nodeValue!==null&&n.nodeType===mt&&e!==0&&e!==n.nodeValue.length}function Ys(n,e,t){const{anchorNode:r,anchorOffset:u,focusNode:i,focusOffset:s}=n;ci&&(ci=!1,Qs(r,u)&&Qs(i,s))||Te(e,()=>{if(!t)return void Me(null);if(!Gn(e,r,i))return;const o=$();if(I(o)){const a=o.anchor,l=a.getNode();if(o.isCollapsed()){n.type==="Range"&&n.anchorNode===n.focusNode&&(o.dirty=!0);const f=yu(e).event,h=f?f.timeStamp:performance.now(),[c,d,p,m,g]=ul,y=ie(),b=e.isComposing()===!1&&y.getTextContent()==="";if(h<g+200&&a.offset===p&&a.key===m)o.format=c,o.style=d;else if(a.type==="text")M(l)||L(141),o.format=l.getFormat(),o.style=l.getStyle();else if(a.type==="element"&&!b){const _=a.getNode();o.style="",_ instanceof an&&_.getChildrenSize()===0?(o.format=_.getTextFormat(),o.style=_.getTextStyle()):o.format=0}}else{const f=a.key,h=o.focus.key,c=o.getNodes(),d=c.length,p=o.isBackward(),m=p?s:u,g=p?u:s,y=p?h:f,b=p?f:h;let _=O0,w=!1;for(let T=0;T<d;T++){const S=c[T],P=S.getTextContentSize();if(M(S)&&P!==0&&!(T===0&&S.__key===y&&m===P||T===d-1&&S.__key===b&&g===0)&&(w=!0,_&=S.getFormat(),_===0))break}o.format=w?_:0}}R(e,qi,void 0)})}function sl(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function Fu(n,e){const t=n._compositionKey;if(ce(null),t!==null&&e!=null){if(e===""){const r=fe(t),u=Ur(n.getElementByKey(t));return void(u!==null&&u.nodeValue!==null&&M(r)&&rs(r,u.nodeValue,null,null,!0))}if(e[e.length-1]===`
@@ -54,5 +54,5 @@ vulnerable to XSS attacks. Please remove it from \`allowedTags\`.
54
54
  Or, to disable this warning, add the \`allowVulnerableTags\` option
55
55
  and ensure you are accounting for this risk.
56
56
 
57
- `)});const o=e.nonTextTags||["script","style","textarea","option"];let a,l;e.allowedAttributes&&(a={},l={},Vt(e.allowedAttributes,function(x,O){a[O]=[];const k=[];x.forEach(function(F){typeof F=="string"&&F.indexOf("*")>=0?k.push(ya(F).replace(/\\\*/g,".*")):a[O].push(F)}),k.length&&(l[O]=new RegExp("^("+k.join("|")+")$"))}));const f={},h={},c={};Vt(e.allowedClasses,function(x,O){if(a&&(Je(a,O)||(a[O]=[]),a[O].push("class")),f[O]=x,Array.isArray(x)){const k=[];f[O]=[],c[O]=[],x.forEach(function(F){typeof F=="string"&&F.indexOf("*")>=0?k.push(ya(F).replace(/\\\*/g,".*")):F instanceof RegExp?c[O].push(F):f[O].push(F)}),k.length&&(h[O]=new RegExp("^("+k.join("|")+")$"))}});const d={};let p;Vt(e.transformTags,function(x,O){let k;typeof x=="function"?k=x:typeof x=="string"&&(k=zn.simpleTransform(x)),O==="*"?p=k:d[O]=k});let m,g,y,b,_,w,T=!1;P();const S=new pg.Parser({onopentag:function(x,O){if(e.onOpenTag&&e.onOpenTag(x,O),e.enforceHtmlBoundary&&x==="html"&&P(),_){w++;return}const k=new i(x,O);g.push(k);let F=!1;const Y=!!k.text;let ne;if(Je(d,x)&&(ne=d[x](x,O),k.attribs=O=ne.attribs,ne.text!==void 0&&(k.innerText=ne.text),x!==ne.tagName&&(k.name=x=ne.tagName,b[m]=ne.tagName)),p&&(ne=p(x,O),k.attribs=O=ne.attribs,x!==ne.tagName&&(k.name=x=ne.tagName,b[m]=ne.tagName)),(!s(x)||e.disallowedTagsMode==="recursiveEscape"&&!_g(y)||e.nestingLimit!=null&&m>=e.nestingLimit)&&(F=!0,y[m]=!0,(e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard")&&o.indexOf(x)!==-1&&(_=!0,w=1)),m++,F){if(e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard"){if(k.innerText&&!Y){const X=C(k.innerText);e.textFilter?r+=e.textFilter(X,x):r+=X,T=!0}return}u=r,r=""}r+="<"+x,x==="script"&&(e.allowedScriptHostnames||e.allowedScriptDomains)&&(k.innerText=""),F&&(e.disallowedTagsMode==="escape"||e.disallowedTagsMode==="recursiveEscape")&&e.preserveEscapedAttributes?Vt(O,function(X,G){r+=" "+G+'="'+C(X||"",!0)+'"'}):(!a||Je(a,x)||a["*"])&&Vt(O,function(X,G){if(!Sg.test(G)){delete k.attribs[G];return}if(X===""&&!e.allowedEmptyAttributes.includes(G)&&(e.nonBooleanAttributes.includes(G)||e.nonBooleanAttributes.includes("*"))){delete k.attribs[G];return}let it=!1;if(!a||Je(a,x)&&a[x].indexOf(G)!==-1||a["*"]&&a["*"].indexOf(G)!==-1||Je(l,x)&&l[x].test(G)||l["*"]&&l["*"].test(G))it=!0;else if(a&&a[x]){for(const W of a[x])if(gg(W)&&W.name&&W.name===G){it=!0;let J="";if(W.multiple===!0){const we=X.split(" ");for(const ge of we)W.values.indexOf(ge)!==-1&&(J===""?J=ge:J+=" "+ge)}else W.values.indexOf(X)>=0&&(J=X);X=J}}if(it){if(e.allowedSchemesAppliedToAttributes.indexOf(G)!==-1&&D(x,X)){delete k.attribs[G];return}if(x==="script"&&G==="src"){let W=!0;try{const J=q(X);if(e.allowedScriptHostnames||e.allowedScriptDomains){const we=(e.allowedScriptHostnames||[]).find(function(me){return me===J.url.hostname}),ge=(e.allowedScriptDomains||[]).find(function(me){return J.url.hostname===me||J.url.hostname.endsWith(`.${me}`)});W=we||ge}}catch{W=!1}if(!W){delete k.attribs[G];return}}if(x==="iframe"&&G==="src"){let W=!0;try{const J=q(X);if(J.isRelativeUrl)W=Je(e,"allowIframeRelativeUrls")?e.allowIframeRelativeUrls:!e.allowedIframeHostnames&&!e.allowedIframeDomains;else if(e.allowedIframeHostnames||e.allowedIframeDomains){const we=(e.allowedIframeHostnames||[]).find(function(me){return me===J.url.hostname}),ge=(e.allowedIframeDomains||[]).find(function(me){return J.url.hostname===me||J.url.hostname.endsWith(`.${me}`)});W=we||ge}}catch{W=!1}if(!W){delete k.attribs[G];return}}if(G==="srcset")try{let W=mg(X);if(W.forEach(function(J){D("srcset",J.url)&&(J.evil=!0)}),W=_a(W,function(J){return!J.evil}),W.length)X=vg(_a(W,function(J){return!J.evil})),k.attribs[G]=X;else{delete k.attribs[G];return}}catch{delete k.attribs[G];return}if(G==="class"){const W=f[x],J=f["*"],we=h[x],ge=c[x],me=c["*"],i0=h["*"],Ds=[we,i0].concat(ge,me).filter(function(s0){return s0});if(W&&J?X=B(X,xa(W,J),Ds):X=B(X,W||J,Ds),!X.length){delete k.attribs[G];return}}if(G==="style"){if(e.parseStyleAttributes)try{const W=bg(x+" {"+X+"}",{map:!1}),J=v(W,e.allowedStyles);if(X=N(J),X.length===0){delete k.attribs[G];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+x+" {"+X+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete k.attribs[G];return}else if(e.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}r+=" "+G,X&&X.length?r+='="'+C(X,!0)+'"':e.allowedEmptyAttributes.includes(G)&&(r+='=""')}else delete k.attribs[G]}),e.selfClosing.indexOf(x)!==-1?r+=" />":(r+=">",k.innerText&&!Y&&!e.textFilter&&(r+=C(k.innerText),T=!0)),F&&(r=u+C(r),u=""),k.openingTagLength=r.length-k.tagPosition},ontext:function(x){if(_)return;const O=g[g.length-1];let k;if(O&&(k=O.tag,x=O.innerText!==void 0?O.innerText:x),e.disallowedTagsMode==="completelyDiscard"&&!s(k))x="";else if((e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard")&&(k==="script"||k==="style"))r+=x;else if(!T){const F=C(x,!1);e.textFilter?r+=e.textFilter(F,k):r+=F}if(g.length){const F=g[g.length-1];F.text+=x}},onclosetag:function(x,O){if(e.onCloseTag&&e.onCloseTag(x,O),_)if(w--,!w)_=!1;else return;const k=g.pop();if(!k)return;if(k.tag!==x){g.push(k);return}_=e.enforceHtmlBoundary?x==="html":!1,m--;const F=y[m];if(F){if(delete y[m],e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard"){k.updateParentNodeText();return}u=r,r=""}if(b[m]&&(x=b[m],delete b[m]),e.exclusiveFilter){const Y=e.exclusiveFilter(k);if(Y==="excludeTag"){F&&(r=u,u=""),r=r.substring(0,k.tagPosition)+r.substring(k.tagPosition+k.openingTagLength);return}else if(Y){r=r.substring(0,k.tagPosition);return}}if(k.updateParentNodeMediaChildren(),k.updateParentNodeText(),e.selfClosing.indexOf(x)!==-1||O&&!s(x)&&["escape","recursiveEscape"].indexOf(e.disallowedTagsMode)>=0){F&&(r=u,u="");return}r+="</"+x+">",F&&(r=u+C(r),u=""),T=!1}},e.parser);return S.write(n),S.end(),r;function P(){r="",m=0,g=[],y={},b={},_=!1,w=0}function C(x,O){return typeof x!="string"&&(x=x+""),e.parser.decodeEntities&&(x=x.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),O&&(x=x.replace(/"/g,"&quot;"))),x=x.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),O&&(x=x.replace(/"/g,"&quot;")),x}function D(x,O){for(O=O.replace(/[\x00-\x20]+/g,"");;){const Y=O.indexOf("<!--");if(Y===-1)break;const ne=O.indexOf("-->",Y+4);if(ne===-1)break;O=O.substring(0,Y)+O.substring(ne+3)}const k=O.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!k)return O.match(/^[/\\]{2}/)?!e.allowProtocolRelative:!1;const F=k[1].toLowerCase();return Je(e.allowedSchemesByTag,x)?e.allowedSchemesByTag[x].indexOf(F)===-1:!e.allowedSchemes||e.allowedSchemes.indexOf(F)===-1}function q(x){if(x=x.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),x.startsWith("relative:"))throw new Error("relative: exploit attempt");let O="relative://relative-site";for(let Y=0;Y<100;Y++)O+=`/${Y}`;const k=new URL(x,O);return{isRelativeUrl:k&&k.hostname==="relative-site"&&k.protocol==="relative:",url:k}}function v(x,O){if(!O)return x;const k=x.nodes[0];let F;return O[k.selector]&&O["*"]?F=xa(O[k.selector],O["*"]):F=O[k.selector]||O["*"],F&&(x.nodes[0].nodes=k.nodes.reduce(A(F),[])),x}function N(x){return x.nodes[0].nodes.reduce(function(O,k){return O.push(`${k.prop}:${k.value}${k.important?" !important":""}`),O},[]).join(";")}function A(x){return function(O,k){return Je(x,k.prop)&&x[k.prop].some(function(Y){return Y.test(k.value)})&&O.push(k),O}}function B(x,O,k){return O?(x=x.split(/\s+/),x.filter(function(F){return O.indexOf(F)!==-1||k.some(function(Y){return Y.test(F)})}).join(" ")):x}}const Tg={decodeEntities:!0};zn.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","menu","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0,preserveEscapedAttributes:!1};zn.simpleTransform=function(n,e,t){return t=t===void 0?!0:t,e=e||{},function(r,u){let i;if(t)for(i in e)u[i]=e[i];else u=e;return{tagName:n,attribs:u}}};const Cg=eh(wg),Eg="_editor_17n1f_1",Ng="_toolbar_17n1f_11",kg="_active_17n1f_32",Ag="_bold_17n1f_37",Og="_italic_17n1f_41",Pg="_link_17n1f_45",Ig="_list_17n1f_51",Lg="_paragraph_17n1f_52",Se={editor:Eg,toolbar:Ng,active:kg,bold:Ag,italic:Og,link:Pg,list:Ig,paragraph:Lg},Dg=()=>{const[n]=ke(),[e,t]=U.useState(!1),[r,u]=U.useState(!1),[i,s]=U.useState(!1),[o,a]=U.useState(!1),[l,f]=U.useState(""),h=U.useRef(null),c=()=>{n.dispatchCommand(Qt,{url:l,target:"_blank"})},d=U.useCallback(()=>{const p=$();if(I(p)){const m=p.getNodes();t(p.hasFormat("bold")),u(p.hasFormat("italic")),m.every(g=>{const y=g.getParent();a(K(y)||re(y)),Tt(y)?(s(!0),f(y.getURL())):(s(!1),f(""))})}},[]);return U.useEffect(()=>nt(n.registerUpdateListener(({editorState:p})=>{p.read(()=>{d()})})),[n,d]),V.jsxs("div",{className:Se.toolbar,children:[V.jsx(cr.Button,{className:dn.t(e&&Se.active),onClick:()=>{n.dispatchCommand(Ue,"bold")},title:"Bold",variant:"minimal",children:V.jsx(fr.Icon,{name:"bold"})}),V.jsx(cr.Button,{className:dn.t(r&&Se.active),onClick:()=>{n.dispatchCommand(Ue,"italic")},title:"Italic",variant:"minimal",children:V.jsx(fr.Icon,{name:"italic"})}),V.jsx(cr.Button,{className:dn.t(o&&Se.active),onClick:()=>{o?n.dispatchCommand($l,void 0):n.dispatchCommand(Bl,void 0)},title:"List",variant:"minimal",children:V.jsx(fr.Icon,{name:"list"})}),V.jsx(cr.Button,{className:dn.t(i&&Se.active),onClick:()=>{i?n.dispatchCommand(Qt,null):(n.dispatchCommand(Qt,{url:"https://"}),setTimeout(()=>h.current.focus(),0))},title:"Link",variant:"minimal",children:V.jsx(fr.Icon,{name:"link"})}),V.jsx(o0.Input,{className:dn.t(i&&Se.active),onBlur:()=>c(),onChange:p=>f(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),c())},ref:h,value:l})]})},Mg=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,Rg=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,Bg=[n=>{const e=Mg.exec(n);return e!=null&&e.length?{index:e.index,length:e[0].length,text:e[0],url:`mailto:${e[0]}`}:null},n=>{const e=Rg.exec(n);return e!=null&&e.length?{index:e.index,length:e[0].length,text:e[0],url:e[0].startsWith("http")?e[0]:`https://${e[0]}`}:null}];function $g(n){try{const e=new URL(n);return e.protocol==="http:"||e.protocol==="https:"}catch{return!1}}function Fg({content:n}){const[e]=ke();return U.useEffect(()=>{e.update(()=>{const r=new DOMParser().parseFromString(n??"","text/html"),u=Nl(e,r);ie().clear().select(),pl(u),Me(null)})},[e,n]),null}const qg=({autofocus:n=!1,autolink:e=!1,content:t,inline:r=!1,onChange:u})=>{const i={namespace:"Editor",theme:{link:Se.link,list:{ol:Se.list,ul:Se.list},paragraph:Se.paragraph,text:{bold:Se.bold,italic:Se.italic}},onError(s){throw s},nodes:[Cu,tr,ln,nr]};return V.jsx("div",{className:Se.editor,children:V.jsxs(cd,{initialConfig:i,children:[!r&&V.jsx(Dg,{}),V.jsx(Qd,{contentEditable:V.jsx(bd,{}),ErrorBoundary:vd}),n&&V.jsx(ed,{}),e&&V.jsx(ad,{matchers:Bg}),V.jsx(Ad,{}),t&&V.jsx(Fg,{content:t}),V.jsx(Od,{validateUrl:$g}),V.jsx(Pd,{}),u&&V.jsx(Ld,{onChange:(s,o)=>{s.read(()=>{const a=kl(o,null),l=Cg(a,{allowedTags:["a","b","br","i","li","ol","p","ul"]});u(l)})}})]})})};exports.Editor=qg;
57
+ `)});const o=e.nonTextTags||["script","style","textarea","option"];let a,l;e.allowedAttributes&&(a={},l={},Vt(e.allowedAttributes,function(x,O){a[O]=[];const k=[];x.forEach(function(F){typeof F=="string"&&F.indexOf("*")>=0?k.push(ya(F).replace(/\\\*/g,".*")):a[O].push(F)}),k.length&&(l[O]=new RegExp("^("+k.join("|")+")$"))}));const f={},h={},c={};Vt(e.allowedClasses,function(x,O){if(a&&(Je(a,O)||(a[O]=[]),a[O].push("class")),f[O]=x,Array.isArray(x)){const k=[];f[O]=[],c[O]=[],x.forEach(function(F){typeof F=="string"&&F.indexOf("*")>=0?k.push(ya(F).replace(/\\\*/g,".*")):F instanceof RegExp?c[O].push(F):f[O].push(F)}),k.length&&(h[O]=new RegExp("^("+k.join("|")+")$"))}});const d={};let p;Vt(e.transformTags,function(x,O){let k;typeof x=="function"?k=x:typeof x=="string"&&(k=zn.simpleTransform(x)),O==="*"?p=k:d[O]=k});let m,g,y,b,_,w,T=!1;P();const S=new pg.Parser({onopentag:function(x,O){if(e.onOpenTag&&e.onOpenTag(x,O),e.enforceHtmlBoundary&&x==="html"&&P(),_){w++;return}const k=new i(x,O);g.push(k);let F=!1;const Y=!!k.text;let ne;if(Je(d,x)&&(ne=d[x](x,O),k.attribs=O=ne.attribs,ne.text!==void 0&&(k.innerText=ne.text),x!==ne.tagName&&(k.name=x=ne.tagName,b[m]=ne.tagName)),p&&(ne=p(x,O),k.attribs=O=ne.attribs,x!==ne.tagName&&(k.name=x=ne.tagName,b[m]=ne.tagName)),(!s(x)||e.disallowedTagsMode==="recursiveEscape"&&!_g(y)||e.nestingLimit!=null&&m>=e.nestingLimit)&&(F=!0,y[m]=!0,(e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard")&&o.indexOf(x)!==-1&&(_=!0,w=1)),m++,F){if(e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard"){if(k.innerText&&!Y){const X=C(k.innerText);e.textFilter?r+=e.textFilter(X,x):r+=X,T=!0}return}u=r,r=""}r+="<"+x,x==="script"&&(e.allowedScriptHostnames||e.allowedScriptDomains)&&(k.innerText=""),F&&(e.disallowedTagsMode==="escape"||e.disallowedTagsMode==="recursiveEscape")&&e.preserveEscapedAttributes?Vt(O,function(X,G){r+=" "+G+'="'+C(X||"",!0)+'"'}):(!a||Je(a,x)||a["*"])&&Vt(O,function(X,G){if(!Sg.test(G)){delete k.attribs[G];return}if(X===""&&!e.allowedEmptyAttributes.includes(G)&&(e.nonBooleanAttributes.includes(G)||e.nonBooleanAttributes.includes("*"))){delete k.attribs[G];return}let it=!1;if(!a||Je(a,x)&&a[x].indexOf(G)!==-1||a["*"]&&a["*"].indexOf(G)!==-1||Je(l,x)&&l[x].test(G)||l["*"]&&l["*"].test(G))it=!0;else if(a&&a[x]){for(const W of a[x])if(gg(W)&&W.name&&W.name===G){it=!0;let J="";if(W.multiple===!0){const we=X.split(" ");for(const ge of we)W.values.indexOf(ge)!==-1&&(J===""?J=ge:J+=" "+ge)}else W.values.indexOf(X)>=0&&(J=X);X=J}}if(it){if(e.allowedSchemesAppliedToAttributes.indexOf(G)!==-1&&D(x,X)){delete k.attribs[G];return}if(x==="script"&&G==="src"){let W=!0;try{const J=q(X);if(e.allowedScriptHostnames||e.allowedScriptDomains){const we=(e.allowedScriptHostnames||[]).find(function(me){return me===J.url.hostname}),ge=(e.allowedScriptDomains||[]).find(function(me){return J.url.hostname===me||J.url.hostname.endsWith(`.${me}`)});W=we||ge}}catch{W=!1}if(!W){delete k.attribs[G];return}}if(x==="iframe"&&G==="src"){let W=!0;try{const J=q(X);if(J.isRelativeUrl)W=Je(e,"allowIframeRelativeUrls")?e.allowIframeRelativeUrls:!e.allowedIframeHostnames&&!e.allowedIframeDomains;else if(e.allowedIframeHostnames||e.allowedIframeDomains){const we=(e.allowedIframeHostnames||[]).find(function(me){return me===J.url.hostname}),ge=(e.allowedIframeDomains||[]).find(function(me){return J.url.hostname===me||J.url.hostname.endsWith(`.${me}`)});W=we||ge}}catch{W=!1}if(!W){delete k.attribs[G];return}}if(G==="srcset")try{let W=mg(X);if(W.forEach(function(J){D("srcset",J.url)&&(J.evil=!0)}),W=_a(W,function(J){return!J.evil}),W.length)X=vg(_a(W,function(J){return!J.evil})),k.attribs[G]=X;else{delete k.attribs[G];return}}catch{delete k.attribs[G];return}if(G==="class"){const W=f[x],J=f["*"],we=h[x],ge=c[x],me=c["*"],i0=h["*"],Ds=[we,i0].concat(ge,me).filter(function(s0){return s0});if(W&&J?X=B(X,xa(W,J),Ds):X=B(X,W||J,Ds),!X.length){delete k.attribs[G];return}}if(G==="style"){if(e.parseStyleAttributes)try{const W=bg(x+" {"+X+"}",{map:!1}),J=v(W,e.allowedStyles);if(X=N(J),X.length===0){delete k.attribs[G];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+x+" {"+X+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete k.attribs[G];return}else if(e.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}r+=" "+G,X&&X.length?r+='="'+C(X,!0)+'"':e.allowedEmptyAttributes.includes(G)&&(r+='=""')}else delete k.attribs[G]}),e.selfClosing.indexOf(x)!==-1?r+=" />":(r+=">",k.innerText&&!Y&&!e.textFilter&&(r+=C(k.innerText),T=!0)),F&&(r=u+C(r),u=""),k.openingTagLength=r.length-k.tagPosition},ontext:function(x){if(_)return;const O=g[g.length-1];let k;if(O&&(k=O.tag,x=O.innerText!==void 0?O.innerText:x),e.disallowedTagsMode==="completelyDiscard"&&!s(k))x="";else if((e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard")&&(k==="script"||k==="style"))r+=x;else if(!T){const F=C(x,!1);e.textFilter?r+=e.textFilter(F,k):r+=F}if(g.length){const F=g[g.length-1];F.text+=x}},onclosetag:function(x,O){if(e.onCloseTag&&e.onCloseTag(x,O),_)if(w--,!w)_=!1;else return;const k=g.pop();if(!k)return;if(k.tag!==x){g.push(k);return}_=e.enforceHtmlBoundary?x==="html":!1,m--;const F=y[m];if(F){if(delete y[m],e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard"){k.updateParentNodeText();return}u=r,r=""}if(b[m]&&(x=b[m],delete b[m]),e.exclusiveFilter){const Y=e.exclusiveFilter(k);if(Y==="excludeTag"){F&&(r=u,u=""),r=r.substring(0,k.tagPosition)+r.substring(k.tagPosition+k.openingTagLength);return}else if(Y){r=r.substring(0,k.tagPosition);return}}if(k.updateParentNodeMediaChildren(),k.updateParentNodeText(),e.selfClosing.indexOf(x)!==-1||O&&!s(x)&&["escape","recursiveEscape"].indexOf(e.disallowedTagsMode)>=0){F&&(r=u,u="");return}r+="</"+x+">",F&&(r=u+C(r),u=""),T=!1}},e.parser);return S.write(n),S.end(),r;function P(){r="",m=0,g=[],y={},b={},_=!1,w=0}function C(x,O){return typeof x!="string"&&(x=x+""),e.parser.decodeEntities&&(x=x.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),O&&(x=x.replace(/"/g,"&quot;"))),x=x.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),O&&(x=x.replace(/"/g,"&quot;")),x}function D(x,O){for(O=O.replace(/[\x00-\x20]+/g,"");;){const Y=O.indexOf("<!--");if(Y===-1)break;const ne=O.indexOf("-->",Y+4);if(ne===-1)break;O=O.substring(0,Y)+O.substring(ne+3)}const k=O.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!k)return O.match(/^[/\\]{2}/)?!e.allowProtocolRelative:!1;const F=k[1].toLowerCase();return Je(e.allowedSchemesByTag,x)?e.allowedSchemesByTag[x].indexOf(F)===-1:!e.allowedSchemes||e.allowedSchemes.indexOf(F)===-1}function q(x){if(x=x.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),x.startsWith("relative:"))throw new Error("relative: exploit attempt");let O="relative://relative-site";for(let Y=0;Y<100;Y++)O+=`/${Y}`;const k=new URL(x,O);return{isRelativeUrl:k&&k.hostname==="relative-site"&&k.protocol==="relative:",url:k}}function v(x,O){if(!O)return x;const k=x.nodes[0];let F;return O[k.selector]&&O["*"]?F=xa(O[k.selector],O["*"]):F=O[k.selector]||O["*"],F&&(x.nodes[0].nodes=k.nodes.reduce(A(F),[])),x}function N(x){return x.nodes[0].nodes.reduce(function(O,k){return O.push(`${k.prop}:${k.value}${k.important?" !important":""}`),O},[]).join(";")}function A(x){return function(O,k){return Je(x,k.prop)&&x[k.prop].some(function(Y){return Y.test(k.value)})&&O.push(k),O}}function B(x,O,k){return O?(x=x.split(/\s+/),x.filter(function(F){return O.indexOf(F)!==-1||k.some(function(Y){return Y.test(F)})}).join(" ")):x}}const Tg={decodeEntities:!0};zn.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","menu","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0,preserveEscapedAttributes:!1};zn.simpleTransform=function(n,e,t){return t=t===void 0?!0:t,e=e||{},function(r,u){let i;if(t)for(i in e)u[i]=e[i];else u=e;return{tagName:n,attribs:u}}};const Cg=eh(wg),Eg="_editor_1ys1k_1",Ng="_toolbar_1ys1k_11",kg="_active_1ys1k_33",Ag="_bold_1ys1k_38",Og="_italic_1ys1k_42",Pg="_link_1ys1k_46",Ig="_list_1ys1k_52",Lg="_paragraph_1ys1k_53",Se={editor:Eg,toolbar:Ng,active:kg,bold:Ag,italic:Og,link:Pg,list:Ig,paragraph:Lg},Dg=()=>{const[n]=ke(),[e,t]=U.useState(!1),[r,u]=U.useState(!1),[i,s]=U.useState(!1),[o,a]=U.useState(!1),[l,f]=U.useState(""),h=U.useRef(null),c=()=>{n.dispatchCommand(Qt,{url:l,target:"_blank"})},d=U.useCallback(()=>{const p=$();if(I(p)){const m=p.getNodes();t(p.hasFormat("bold")),u(p.hasFormat("italic")),m.every(g=>{const y=g.getParent();a(K(y)||re(y)),Tt(y)?(s(!0),f(y.getURL())):(s(!1),f(""))})}},[]);return U.useEffect(()=>nt(n.registerUpdateListener(({editorState:p})=>{p.read(()=>{d()})})),[n,d]),V.jsxs("div",{className:Se.toolbar,children:[V.jsx(cr.Button,{className:dn.t(e&&Se.active),onClick:()=>{n.dispatchCommand(Ue,"bold")},title:"Bold",variant:"minimal",children:V.jsx(fr.Icon,{name:"bold"})}),V.jsx(cr.Button,{className:dn.t(r&&Se.active),onClick:()=>{n.dispatchCommand(Ue,"italic")},title:"Italic",variant:"minimal",children:V.jsx(fr.Icon,{name:"italic"})}),V.jsx(cr.Button,{className:dn.t(o&&Se.active),onClick:()=>{o?n.dispatchCommand($l,void 0):n.dispatchCommand(Bl,void 0)},title:"List",variant:"minimal",children:V.jsx(fr.Icon,{name:"list"})}),V.jsx(cr.Button,{className:dn.t(i&&Se.active),onClick:()=>{i?n.dispatchCommand(Qt,null):(n.dispatchCommand(Qt,{url:"https://"}),setTimeout(()=>h.current.focus(),0))},title:"Link",variant:"minimal",children:V.jsx(fr.Icon,{name:"link"})}),V.jsx(o0.Input,{className:dn.t(i&&Se.active),onBlur:()=>c(),onChange:p=>f(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),c())},ref:h,value:l})]})},Mg=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,Rg=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,Bg=[n=>{const e=Mg.exec(n);return e!=null&&e.length?{index:e.index,length:e[0].length,text:e[0],url:`mailto:${e[0]}`}:null},n=>{const e=Rg.exec(n);return e!=null&&e.length?{index:e.index,length:e[0].length,text:e[0],url:e[0].startsWith("http")?e[0]:`https://${e[0]}`}:null}];function $g(n){try{const e=new URL(n);return e.protocol==="http:"||e.protocol==="https:"}catch{return!1}}function Fg({content:n}){const[e]=ke();return U.useEffect(()=>{e.update(()=>{const r=new DOMParser().parseFromString(n??"","text/html"),u=Nl(e,r);ie().clear().select(),pl(u),Me(null)})},[e,n]),null}const qg=({autofocus:n=!1,autolink:e=!1,content:t,inline:r=!1,onChange:u})=>{const i={namespace:"Editor",theme:{link:Se.link,list:{ol:Se.list,ul:Se.list},paragraph:Se.paragraph,text:{bold:Se.bold,italic:Se.italic}},onError(s){throw s},nodes:[Cu,tr,ln,nr]};return V.jsx("div",{className:Se.editor,children:V.jsxs(cd,{initialConfig:i,children:[!r&&V.jsx(Dg,{}),V.jsx(Qd,{contentEditable:V.jsx(bd,{}),ErrorBoundary:vd}),n&&V.jsx(ed,{}),e&&V.jsx(ad,{matchers:Bg}),V.jsx(Ad,{}),t&&V.jsx(Fg,{content:t}),V.jsx(Od,{validateUrl:$g}),V.jsx(Pd,{}),u&&V.jsx(Ld,{onChange:(s,o)=>{s.read(()=>{const a=kl(o,null),l=Cg(a,{allowedTags:["a","b","br","i","li","ol","p","ul"]});u(l)})}})]})})};exports.Editor=qg;
58
58
  //# sourceMappingURL=index.cjs.map
@@ -6,7 +6,7 @@ import { t as pn } from "../../classix-DG18itHa.js";
6
6
  import { Button as hr } from "../button/index.js";
7
7
  import { Icon as pr } from "../icon/index.js";
8
8
  import { Input as x0 } from "../input/index.js";
9
- import '../../assets/index7.css';function Gn(n) {
9
+ import '../../assets/index12.css';function Gn(n) {
10
10
  return {};
11
11
  }
12
12
  const Wi = {}, _0 = {}, ka = {}, kt = {}, Xt = {}, Pn = {}, Zt = {}, gu = {}, ni = {}, In = {}, Ln = {}, ze = {}, Hi = {}, Vi = {}, v0 = {}, Aa = {}, w0 = {}, Oa = {}, S0 = {}, Pa = {}, Ia = {}, qr = {}, T0 = {}, La = {}, Da = {}, Ma = {}, C0 = {}, E0 = {}, N0 = {}, Fs = {}, Ra = {}, k0 = {}, Ba = {}, $a = {}, A0 = {}, mu = {}, Gi = {}, ri = {}, O0 = {}, P0 = {}, gr = {}, mr = {}, I0 = {}, L0 = {}, D0 = {}, Be = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, M0 = Be && "documentMode" in document ? document.documentMode : null, Ae = Be && /Mac|iPod|iPhone|iPad/.test(navigator.platform), pt = Be && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Ur = !(!Be || !("InputEvent" in window) || M0) && "getTargetRanges" in new window.InputEvent("input"), bu = Be && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Kn = Be && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, R0 = Be && /Android/.test(navigator.userAgent), Fa = Be && /^(?=.*Chrome).*/i.test(navigator.userAgent), B0 = Be && R0 && Fa, Ki = Be && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Fa, Jn = 1, bt = 3, Ot = 0, qa = 1, en = 2, $0 = 0, F0 = 1, q0 = 2, jr = 4, zr = 8, Ji = 128, U0 = 112 | (3 | jr | zr) | Ji, Xi = 1, Zi = 2, Qi = 3, Yi = 4, es = 5, ts = 6, yu = bu || Kn || Ki ? " " : "​", Qe = `
@@ -11249,7 +11249,7 @@ Hn.simpleTransform = function(n, e, t) {
11249
11249
  };
11250
11250
  };
11251
11251
  };
11252
- const Rg = /* @__PURE__ */ fh(Lg), Bg = "_editor_17n1f_1", $g = "_toolbar_17n1f_11", Fg = "_active_17n1f_32", qg = "_bold_17n1f_37", Ug = "_italic_17n1f_41", jg = "_link_17n1f_45", zg = "_list_17n1f_51", Wg = "_paragraph_17n1f_52", Se = {
11252
+ const Rg = /* @__PURE__ */ fh(Lg), Bg = "_editor_1ys1k_1", $g = "_toolbar_1ys1k_11", Fg = "_active_1ys1k_33", qg = "_bold_1ys1k_38", Ug = "_italic_1ys1k_42", jg = "_link_1ys1k_46", zg = "_list_1ys1k_52", Wg = "_paragraph_1ys1k_53", Se = {
11253
11253
  editor: Bg,
11254
11254
  toolbar: $g,
11255
11255
  active: Fg,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index6.css');const i=require("react/jsx-runtime"),t="_figure_b0otf_1",s={figure:t},u=({children:e,label:r})=>i.jsxs("figure",{className:s.figure,children:[e&&e,r&&i.jsx("figcaption",{children:r})]});exports.Figure=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index11.css');const i=require("react/jsx-runtime"),s="_figure_11j06_1",t={figure:s},u=({children:e,label:r})=>i.jsxs("figure",{className:t.figure,children:[e&&e,r&&i.jsx("figcaption",{children:r})]});exports.Figure=u;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,11 +1,11 @@
1
1
  import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
- import '../../assets/index6.css';const t = "_figure_b0otf_1", f = {
2
+ import '../../assets/index11.css';const t = "_figure_11j06_1", f = {
3
3
  figure: t
4
- }, g = ({ children: r, label: e }) => /* @__PURE__ */ i("figure", { className: f.figure, children: [
4
+ }, o = ({ children: r, label: e }) => /* @__PURE__ */ i("figure", { className: f.figure, children: [
5
5
  r && r,
6
6
  e && /* @__PURE__ */ s("figcaption", { children: e })
7
7
  ] });
8
8
  export {
9
- g as Figure
9
+ o as Figure
10
10
  };
11
11
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index10.css');const t=require("react/jsx-runtime"),r="_footer_18shx_1",s={footer:r},n=({children:o,...e})=>t.jsx("footer",{className:s.footer,...e,children:o});exports.Footer=n;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/footer/index.tsx"],"sourcesContent":["import styles from './styles.module.css';\n\nexport type FooterProps = {\n children?: React.ReactNode;\n};\n\nexport const Footer = ({ children, ...props }: FooterProps) => {\n return (\n <footer\n className={styles.footer}\n {...props}\n >\n {children}\n </footer>\n );\n};\n"],"names":["Footer","children","props","jsx","styles"],"mappings":"sJAMaA,EAAS,CAAC,CAAE,SAAAC,EAAU,GAAGC,KAElCC,EAAAA,IAAC,SAAA,CACC,UAAWC,EAAO,OACjB,GAAGF,EAEH,SAAAD,CAAA,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import '../../assets/index10.css';const e = "_footer_18shx_1", s = {
3
+ footer: e
4
+ }, c = ({ children: o, ...t }) => /* @__PURE__ */ r(
5
+ "footer",
6
+ {
7
+ className: s.footer,
8
+ ...t,
9
+ children: o
10
+ }
11
+ );
12
+ export {
13
+ c as Footer
14
+ };
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/footer/index.tsx"],"sourcesContent":["import styles from './styles.module.css';\n\nexport type FooterProps = {\n children?: React.ReactNode;\n};\n\nexport const Footer = ({ children, ...props }: FooterProps) => {\n return (\n <footer\n className={styles.footer}\n {...props}\n >\n {children}\n </footer>\n );\n};\n"],"names":["Footer","children","props","jsx","styles"],"mappings":";;;GAMaA,IAAS,CAAC,EAAE,UAAAC,GAAU,GAAGC,QAElC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAO;AAAA,IACjB,GAAGF;AAAA,IAEH,UAAAD;AAAA,EAAA;AAAA;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index5.css');const t=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),l="_form_13v7z_1",c="_inline_13v7z_15",s={form:l,inline:c},m=({animation:e,children:r,inline:n=!1,...o})=>t.jsx("form",{className:i.t(e&&e,n&&s.inline,s.form),...o,children:r&&r});exports.Form=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const t=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),l="_form_1akkl_1",c="_inline_1akkl_23",s={form:l,inline:c},m=({animation:e,children:r,inline:n=!1,...o})=>t.jsx("form",{className:i.t(e&&e,n&&s.inline,s.form),...o,children:r&&r});exports.Form=m;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/form/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport type { AnimationName } from '../../styles/animations.ts';\nimport styles from './styles.module.css';\n\nexport type FormProps = {\n animation?: AnimationName;\n children?: React.ReactNode;\n inline?: boolean;\n};\n\nexport const Form = ({ animation, children, inline = false, ...props }: FormProps) => {\n return (\n <form\n className={cx(animation && animation, inline && styles.inline, styles.form)}\n {...props}\n >\n {children && children}\n </form>\n );\n};\n"],"names":["Form","animation","children","inline","props","jsx","cx","styles"],"mappings":"wNAWaA,EAAO,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,OAAAC,EAAS,GAAO,GAAGC,KAE3DC,EAAAA,IAAC,OAAA,CACC,UAAWC,EAAAA,EAAGL,GAAaA,EAAWE,GAAUI,EAAO,OAAQA,EAAO,IAAI,EACzE,GAAGH,EAEH,SAAAF,GAAYA,CAAA,CAAA"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/form/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport type { AnimationName } from '../../styles/animations.ts';\nimport styles from './styles.module.css';\n\nexport type FormProps = React.FormHTMLAttributes<HTMLFormElement> & {\n animation?: AnimationName;\n children?: React.ReactNode;\n inline?: boolean;\n};\n\nexport const Form = ({ animation, children, inline = false, ...props }: FormProps) => {\n return (\n <form\n className={cx(animation && animation, inline && styles.inline, styles.form)}\n {...props}\n >\n {children && children}\n </form>\n );\n};\n"],"names":["Form","animation","children","inline","props","jsx","cx","styles"],"mappings":"wNAWaA,EAAO,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,OAAAC,EAAS,GAAO,GAAGC,KAE3DC,EAAAA,IAAC,OAAA,CACC,UAAWC,EAAAA,EAAGL,GAAaA,EAAWE,GAAUI,EAAO,OAAQA,EAAO,IAAI,EACzE,GAAGH,EAEH,SAAAF,GAAYA,CAAA,CAAA"}
@@ -1,12 +1,12 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { t } from "../../classix-DG18itHa.js";
3
- import '../../assets/index5.css';const f = "_form_13v7z_1", i = "_inline_13v7z_15", n = {
4
- form: f,
5
- inline: i
2
+ import { t as l } from "../../classix-DG18itHa.js";
3
+ import '../../assets/index9.css';const t = "_form_1akkl_1", f = "_inline_1akkl_23", n = {
4
+ form: t,
5
+ inline: f
6
6
  }, c = ({ animation: o, children: r, inline: m = !1, ...s }) => /* @__PURE__ */ e(
7
7
  "form",
8
8
  {
9
- className: t(o && o, m && n.inline, n.form),
9
+ className: l(o && o, m && n.inline, n.form),
10
10
  ...s,
11
11
  children: r && r
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/form/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport type { AnimationName } from '../../styles/animations.ts';\nimport styles from './styles.module.css';\n\nexport type FormProps = {\n animation?: AnimationName;\n children?: React.ReactNode;\n inline?: boolean;\n};\n\nexport const Form = ({ animation, children, inline = false, ...props }: FormProps) => {\n return (\n <form\n className={cx(animation && animation, inline && styles.inline, styles.form)}\n {...props}\n >\n {children && children}\n </form>\n );\n};\n"],"names":["Form","animation","children","inline","props","jsx","cx","styles"],"mappings":";;;;;GAWaA,IAAO,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,QAAAC,IAAS,IAAO,GAAGC,QAE3D,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAGL,KAAaA,GAAWE,KAAUI,EAAO,QAAQA,EAAO,IAAI;AAAA,IACzE,GAAGH;AAAA,IAEH,UAAAF,KAAYA;AAAA,EAAA;AAAA;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/form/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport type { AnimationName } from '../../styles/animations.ts';\nimport styles from './styles.module.css';\n\nexport type FormProps = React.FormHTMLAttributes<HTMLFormElement> & {\n animation?: AnimationName;\n children?: React.ReactNode;\n inline?: boolean;\n};\n\nexport const Form = ({ animation, children, inline = false, ...props }: FormProps) => {\n return (\n <form\n className={cx(animation && animation, inline && styles.inline, styles.form)}\n {...props}\n >\n {children && children}\n </form>\n );\n};\n"],"names":["Form","animation","children","inline","props","jsx","cx","styles"],"mappings":";;;;;GAWaA,IAAO,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,QAAAC,IAAS,IAAO,GAAGC,QAE3D,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAGL,KAAaA,GAAWE,KAAUI,EAAO,QAAQA,EAAO,IAAI;AAAA,IACzE,GAAGH;AAAA,IAEH,UAAAF,KAAYA;AAAA,EAAA;AAAA;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index8.css');const i=require("react/jsx-runtime"),g=require("../../classix-5H4IWnMA.cjs"),c=require("react"),D=require("../button/index.cjs"),S="_grid_1x08g_1",q="_items_1x08g_8",E="_controls_1x08g_19",O="_item_1x08g_8",d={grid:S,items:q,"item-container":"_item-container_1x08g_14",controls:E,"active-controls":"_active-controls_1x08g_27",item:O,"arrow-button-up":"_arrow-button-up_1x08g_59"},I=({canRearrange:o=!1,className:j,columns:p,items:a=[],onRearrange:r,...C})=>{const[b,h]=c.useState(a),m=c.useRef(null),v=c.useRef(null);c.useEffect(()=>{const t=a.map(n=>n.id),e=v.current;e&&e.length===t.length&&e.every((n,s)=>n===t[s])||(v.current=t,h(a))},[a]);const k=c.useCallback(t=>e=>{!o||!e.dataTransfer||(m.current=t,e.dataTransfer.effectAllowed="move")},[o]),w=c.useCallback(t=>{!o||!t.dataTransfer||(t.preventDefault(),t.dataTransfer.dropEffect="move")},[o]),y=c.useCallback(t=>e=>{if(!o)return;e.preventDefault();const n=m.current;n===null||n===t||(h(s=>{if(n<0||n>=s.length||t<0||t>s.length)return s;const l=[...s],[u]=l.splice(n,1);if(!u)return s;const f=Math.max(0,Math.min(t,l.length)),_=n<t?Math.min(f,l.length):f;return l.splice(_,0,u),r==null||r(l.map((T,N)=>({id:T.id,index:N}))),l}),m.current=null)},[o,r]),M=c.useCallback(()=>m.current=null,[]),x=c.useCallback((t,e)=>{h(n=>{const s=e==="up"?t-1:t+1;if(s<0||s>=n.length)return n;const l=[...n],[u]=l.splice(t,1);return u?(l.splice(s,0,u),r==null||r(l.map((f,_)=>({id:f.id,index:_}))),l):n})},[r]);return i.jsx("div",{className:g.t(d.grid,j),...C,children:i.jsx("div",{className:d.items,style:p?{gridTemplateColumns:`repeat(${p}, 1fr)`}:{},children:b.map((t,e)=>i.jsxs("div",{className:d["item-container"],children:[i.jsx("div",{className:d.item,"data-grid-id":t.id,draggable:o,onDragEnd:M,onDragOver:w,onDragStart:k(e),onDrop:y(e),children:t.component}),i.jsxs("div",{className:g.t(d.controls,o&&d["active-controls"]),children:[e>0&&i.jsx(D.Button,{"aria-label":"Move item up",variant:"minimal",className:d["arrow-button-up"],"data-direction":"up",type:"button",icon:"chevron",onClick:()=>x(e,"up")}),e<b.length-1&&i.jsx(D.Button,{"aria-label":"Move item down",variant:"minimal","data-direction":"down",type:"button",icon:"chevron",onClick:()=>x(e,"down")})]})]},t.id))})})};exports.Grid=I;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/grid/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { Button } from '@/components/button';\n\nimport styles from './styles.module.css';\n\nexport type GridItem = {\n component: React.ReactNode;\n id: number;\n};\n\ntype DivProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>;\n\nexport type GridProps = DivProps & {\n canRearrange?: boolean;\n columns?: number;\n items: GridItem[];\n onRearrange?: (items: Array<{ id: number; index: number }>) => void;\n};\n\nexport const Grid = ({\n canRearrange = false,\n className,\n columns,\n items = [],\n onRearrange,\n ...props\n}: GridProps) => {\n const [orderedItems, setOrderedItems] = useState<GridItem[]>(items);\n const dragIndexRef = useRef<number | null>(null);\n const previousItemIdsRef = useRef<number[]>(null);\n\n useEffect(() => {\n const nextItemIds = items.map((item) => item.id);\n const previousItemIds = previousItemIdsRef.current;\n\n if (\n previousItemIds &&\n previousItemIds.length === nextItemIds.length &&\n previousItemIds.every((id, index) => id === nextItemIds[index])\n ) {\n return;\n }\n\n previousItemIdsRef.current = nextItemIds;\n setOrderedItems(items);\n }, [items]);\n\n const handleDragStart = useCallback(\n (index: number) => (event: React.DragEvent<HTMLDivElement>) => {\n if (!canRearrange || !event.dataTransfer) {\n return;\n }\n\n dragIndexRef.current = index;\n event.dataTransfer.effectAllowed = 'move';\n },\n [canRearrange]\n );\n\n const handleDragOver = useCallback(\n (event: React.DragEvent<HTMLDivElement>) => {\n if (!canRearrange || !event.dataTransfer) {\n return;\n }\n\n event.preventDefault();\n event.dataTransfer.dropEffect = 'move';\n },\n [canRearrange]\n );\n\n const handleDrop = useCallback(\n (targetIndex: number) => (event: React.DragEvent<HTMLDivElement>) => {\n if (!canRearrange) {\n return;\n }\n\n event.preventDefault();\n\n const fromIndex = dragIndexRef.current;\n\n if (fromIndex === null || fromIndex === targetIndex) {\n return;\n }\n\n setOrderedItems((previousItems) => {\n if (\n fromIndex < 0 ||\n fromIndex >= previousItems.length ||\n targetIndex < 0 ||\n targetIndex > previousItems.length\n ) {\n return previousItems;\n }\n\n const nextItems = [...previousItems];\n const [movedItem] = nextItems.splice(fromIndex, 1);\n\n if (!movedItem) {\n return previousItems;\n }\n\n const boundedTarget = Math.max(0, Math.min(targetIndex, nextItems.length));\n const nextIndex =\n fromIndex < targetIndex ? Math.min(boundedTarget, nextItems.length) : boundedTarget;\n\n nextItems.splice(nextIndex, 0, movedItem);\n\n onRearrange?.(\n nextItems.map((item, index) => ({\n id: item.id,\n index,\n }))\n );\n\n return nextItems;\n });\n\n dragIndexRef.current = null;\n },\n [canRearrange, onRearrange]\n );\n\n const handleDragEnd = useCallback(() => (dragIndexRef.current = null), []);\n\n const handleMove = useCallback(\n (fromIndex: number, direction: 'up' | 'down') => {\n setOrderedItems((previousItems) => {\n const targetIndex = direction === 'up' ? fromIndex - 1 : fromIndex + 1;\n\n if (targetIndex < 0 || targetIndex >= previousItems.length) {\n return previousItems;\n }\n\n const nextItems = [...previousItems];\n const [movedItem] = nextItems.splice(fromIndex, 1);\n\n if (!movedItem) {\n return previousItems;\n }\n\n nextItems.splice(targetIndex, 0, movedItem);\n\n onRearrange?.(\n nextItems.map((item, index) => ({\n id: item.id,\n index,\n }))\n );\n\n return nextItems;\n });\n },\n [onRearrange]\n );\n\n return (\n <div\n className={cx(styles.grid, className)}\n {...props}\n >\n <div\n className={styles.items}\n style={columns ? { gridTemplateColumns: `repeat(${columns}, 1fr)` } : {}}\n >\n {orderedItems.map((item, index) => (\n <div\n key={item.id}\n className={styles['item-container']}\n >\n <div\n className={styles.item}\n data-grid-id={item.id}\n draggable={canRearrange}\n onDragEnd={handleDragEnd}\n onDragOver={handleDragOver}\n onDragStart={handleDragStart(index)}\n onDrop={handleDrop(index)}\n >\n {item.component}\n </div>\n\n <div className={cx(styles.controls, canRearrange && styles['active-controls'])}>\n {index > 0 && (\n <Button\n aria-label='Move item up'\n variant='minimal'\n className={styles['arrow-button-up']}\n data-direction='up'\n type='button'\n icon='chevron'\n onClick={() => handleMove(index, 'up')}\n />\n )}\n {index < orderedItems.length - 1 && (\n <Button\n aria-label='Move item down'\n variant='minimal'\n data-direction='down'\n type='button'\n icon='chevron'\n onClick={() => handleMove(index, 'down')}\n />\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n};\n"],"names":["Grid","canRearrange","className","columns","items","onRearrange","props","orderedItems","setOrderedItems","useState","dragIndexRef","useRef","previousItemIdsRef","useEffect","nextItemIds","item","previousItemIds","id","index","handleDragStart","useCallback","event","handleDragOver","handleDrop","targetIndex","fromIndex","previousItems","nextItems","movedItem","boundedTarget","nextIndex","handleDragEnd","handleMove","direction","jsx","cx","styles","jsxs","Button"],"mappings":"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"}
@@ -0,0 +1,140 @@
1
+ import { jsx as d, jsxs as D } from "react/jsx-runtime";
2
+ import { t as x } from "../../classix-DG18itHa.js";
3
+ import { useState as S, useRef as w, useEffect as j, useCallback as m } from "react";
4
+ import { Button as M } from "../button/index.js";
5
+ import '../../assets/index8.css';const A = "_grid_1x08g_1", B = "_items_1x08g_8", G = "_controls_1x08g_19", $ = "_item_1x08g_8", c = {
6
+ grid: A,
7
+ items: B,
8
+ "item-container": "_item-container_1x08g_14",
9
+ controls: G,
10
+ "active-controls": "_active-controls_1x08g_27",
11
+ item: $,
12
+ "arrow-button-up": "_arrow-button-up_1x08g_59"
13
+ }, J = ({
14
+ canRearrange: i = !1,
15
+ className: N,
16
+ columns: _,
17
+ items: a = [],
18
+ onRearrange: l,
19
+ ...T
20
+ }) => {
21
+ const [v, p] = S(a), u = w(null), b = w(null);
22
+ j(() => {
23
+ const t = a.map((o) => o.id), n = b.current;
24
+ n && n.length === t.length && n.every((o, r) => o === t[r]) || (b.current = t, p(a));
25
+ }, [a]);
26
+ const y = m(
27
+ (t) => (n) => {
28
+ !i || !n.dataTransfer || (u.current = t, n.dataTransfer.effectAllowed = "move");
29
+ },
30
+ [i]
31
+ ), C = m(
32
+ (t) => {
33
+ !i || !t.dataTransfer || (t.preventDefault(), t.dataTransfer.dropEffect = "move");
34
+ },
35
+ [i]
36
+ ), E = m(
37
+ (t) => (n) => {
38
+ if (!i)
39
+ return;
40
+ n.preventDefault();
41
+ const o = u.current;
42
+ o === null || o === t || (p((r) => {
43
+ if (o < 0 || o >= r.length || t < 0 || t > r.length)
44
+ return r;
45
+ const e = [...r], [s] = e.splice(o, 1);
46
+ if (!s)
47
+ return r;
48
+ const f = Math.max(0, Math.min(t, e.length)), h = o < t ? Math.min(f, e.length) : f;
49
+ return e.splice(h, 0, s), l == null || l(
50
+ e.map((I, O) => ({
51
+ id: I.id,
52
+ index: O
53
+ }))
54
+ ), e;
55
+ }), u.current = null);
56
+ },
57
+ [i, l]
58
+ ), k = m(() => u.current = null, []), g = m(
59
+ (t, n) => {
60
+ p((o) => {
61
+ const r = n === "up" ? t - 1 : t + 1;
62
+ if (r < 0 || r >= o.length)
63
+ return o;
64
+ const e = [...o], [s] = e.splice(t, 1);
65
+ return s ? (e.splice(r, 0, s), l == null || l(
66
+ e.map((f, h) => ({
67
+ id: f.id,
68
+ index: h
69
+ }))
70
+ ), e) : o;
71
+ });
72
+ },
73
+ [l]
74
+ );
75
+ return /* @__PURE__ */ d(
76
+ "div",
77
+ {
78
+ className: x(c.grid, N),
79
+ ...T,
80
+ children: /* @__PURE__ */ d(
81
+ "div",
82
+ {
83
+ className: c.items,
84
+ style: _ ? { gridTemplateColumns: `repeat(${_}, 1fr)` } : {},
85
+ children: v.map((t, n) => /* @__PURE__ */ D(
86
+ "div",
87
+ {
88
+ className: c["item-container"],
89
+ children: [
90
+ /* @__PURE__ */ d(
91
+ "div",
92
+ {
93
+ className: c.item,
94
+ "data-grid-id": t.id,
95
+ draggable: i,
96
+ onDragEnd: k,
97
+ onDragOver: C,
98
+ onDragStart: y(n),
99
+ onDrop: E(n),
100
+ children: t.component
101
+ }
102
+ ),
103
+ /* @__PURE__ */ D("div", { className: x(c.controls, i && c["active-controls"]), children: [
104
+ n > 0 && /* @__PURE__ */ d(
105
+ M,
106
+ {
107
+ "aria-label": "Move item up",
108
+ variant: "minimal",
109
+ className: c["arrow-button-up"],
110
+ "data-direction": "up",
111
+ type: "button",
112
+ icon: "chevron",
113
+ onClick: () => g(n, "up")
114
+ }
115
+ ),
116
+ n < v.length - 1 && /* @__PURE__ */ d(
117
+ M,
118
+ {
119
+ "aria-label": "Move item down",
120
+ variant: "minimal",
121
+ "data-direction": "down",
122
+ type: "button",
123
+ icon: "chevron",
124
+ onClick: () => g(n, "down")
125
+ }
126
+ )
127
+ ] })
128
+ ]
129
+ },
130
+ t.id
131
+ ))
132
+ }
133
+ )
134
+ }
135
+ );
136
+ };
137
+ export {
138
+ J as Grid
139
+ };
140
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/grid/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { Button } from '@/components/button';\n\nimport styles from './styles.module.css';\n\nexport type GridItem = {\n component: React.ReactNode;\n id: number;\n};\n\ntype DivProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>;\n\nexport type GridProps = DivProps & {\n canRearrange?: boolean;\n columns?: number;\n items: GridItem[];\n onRearrange?: (items: Array<{ id: number; index: number }>) => void;\n};\n\nexport const Grid = ({\n canRearrange = false,\n className,\n columns,\n items = [],\n onRearrange,\n ...props\n}: GridProps) => {\n const [orderedItems, setOrderedItems] = useState<GridItem[]>(items);\n const dragIndexRef = useRef<number | null>(null);\n const previousItemIdsRef = useRef<number[]>(null);\n\n useEffect(() => {\n const nextItemIds = items.map((item) => item.id);\n const previousItemIds = previousItemIdsRef.current;\n\n if (\n previousItemIds &&\n previousItemIds.length === nextItemIds.length &&\n previousItemIds.every((id, index) => id === nextItemIds[index])\n ) {\n return;\n }\n\n previousItemIdsRef.current = nextItemIds;\n setOrderedItems(items);\n }, [items]);\n\n const handleDragStart = useCallback(\n (index: number) => (event: React.DragEvent<HTMLDivElement>) => {\n if (!canRearrange || !event.dataTransfer) {\n return;\n }\n\n dragIndexRef.current = index;\n event.dataTransfer.effectAllowed = 'move';\n },\n [canRearrange]\n );\n\n const handleDragOver = useCallback(\n (event: React.DragEvent<HTMLDivElement>) => {\n if (!canRearrange || !event.dataTransfer) {\n return;\n }\n\n event.preventDefault();\n event.dataTransfer.dropEffect = 'move';\n },\n [canRearrange]\n );\n\n const handleDrop = useCallback(\n (targetIndex: number) => (event: React.DragEvent<HTMLDivElement>) => {\n if (!canRearrange) {\n return;\n }\n\n event.preventDefault();\n\n const fromIndex = dragIndexRef.current;\n\n if (fromIndex === null || fromIndex === targetIndex) {\n return;\n }\n\n setOrderedItems((previousItems) => {\n if (\n fromIndex < 0 ||\n fromIndex >= previousItems.length ||\n targetIndex < 0 ||\n targetIndex > previousItems.length\n ) {\n return previousItems;\n }\n\n const nextItems = [...previousItems];\n const [movedItem] = nextItems.splice(fromIndex, 1);\n\n if (!movedItem) {\n return previousItems;\n }\n\n const boundedTarget = Math.max(0, Math.min(targetIndex, nextItems.length));\n const nextIndex =\n fromIndex < targetIndex ? Math.min(boundedTarget, nextItems.length) : boundedTarget;\n\n nextItems.splice(nextIndex, 0, movedItem);\n\n onRearrange?.(\n nextItems.map((item, index) => ({\n id: item.id,\n index,\n }))\n );\n\n return nextItems;\n });\n\n dragIndexRef.current = null;\n },\n [canRearrange, onRearrange]\n );\n\n const handleDragEnd = useCallback(() => (dragIndexRef.current = null), []);\n\n const handleMove = useCallback(\n (fromIndex: number, direction: 'up' | 'down') => {\n setOrderedItems((previousItems) => {\n const targetIndex = direction === 'up' ? fromIndex - 1 : fromIndex + 1;\n\n if (targetIndex < 0 || targetIndex >= previousItems.length) {\n return previousItems;\n }\n\n const nextItems = [...previousItems];\n const [movedItem] = nextItems.splice(fromIndex, 1);\n\n if (!movedItem) {\n return previousItems;\n }\n\n nextItems.splice(targetIndex, 0, movedItem);\n\n onRearrange?.(\n nextItems.map((item, index) => ({\n id: item.id,\n index,\n }))\n );\n\n return nextItems;\n });\n },\n [onRearrange]\n );\n\n return (\n <div\n className={cx(styles.grid, className)}\n {...props}\n >\n <div\n className={styles.items}\n style={columns ? { gridTemplateColumns: `repeat(${columns}, 1fr)` } : {}}\n >\n {orderedItems.map((item, index) => (\n <div\n key={item.id}\n className={styles['item-container']}\n >\n <div\n className={styles.item}\n data-grid-id={item.id}\n draggable={canRearrange}\n onDragEnd={handleDragEnd}\n onDragOver={handleDragOver}\n onDragStart={handleDragStart(index)}\n onDrop={handleDrop(index)}\n >\n {item.component}\n </div>\n\n <div className={cx(styles.controls, canRearrange && styles['active-controls'])}>\n {index > 0 && (\n <Button\n aria-label='Move item up'\n variant='minimal'\n className={styles['arrow-button-up']}\n data-direction='up'\n type='button'\n icon='chevron'\n onClick={() => handleMove(index, 'up')}\n />\n )}\n {index < orderedItems.length - 1 && (\n <Button\n aria-label='Move item down'\n variant='minimal'\n data-direction='down'\n type='button'\n icon='chevron'\n onClick={() => handleMove(index, 'down')}\n />\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n};\n"],"names":["Grid","canRearrange","className","columns","items","onRearrange","props","orderedItems","setOrderedItems","useState","dragIndexRef","useRef","previousItemIdsRef","useEffect","nextItemIds","item","previousItemIds","id","index","handleDragStart","useCallback","event","handleDragOver","handleDrop","targetIndex","fromIndex","previousItems","nextItems","movedItem","boundedTarget","nextIndex","handleDragEnd","handleMove","direction","jsx","cx","styles","jsxs","Button"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index13.css');const e=require("react/jsx-runtime"),n="_header_1xswd_1",c={header:n},o=({children:r,size:a=1,label:d="Header",subtitle:s})=>{const t=`h${a}`;return e.jsxs("header",{className:c.header,children:[e.jsx(t,{children:d}),s&&e.jsx("p",{children:s}),r&&r]})};exports.Header=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index21.css');const r=require("react/jsx-runtime"),n="_header_104ft_1",u={header:n},c=({children:s,size:a=1,label:d="Header",...e})=>{const t=`h${a}`;return r.jsxs("header",{className:u.header,children:[e.superHeader&&r.jsx("sup",{children:e.superHeader}),d&&r.jsx(t,{children:d}),e.subHeader&&r.jsx("sub",{children:e.subHeader}),s&&s]})};exports.Header=c;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/header/index.tsx"],"sourcesContent":["import { JSX } from 'react';\n\nimport styles from './styles.module.css';\n\nexport type HeaderProps = {\n children?: React.ReactNode;\n label: string;\n size?: 1 | 2 | 3;\n subtitle?: string;\n};\n\nexport const Header = ({ children, size = 1, label = 'Header', subtitle }: HeaderProps) => {\n const HeaderTag = `h${size}` as keyof JSX.IntrinsicElements;\n\n return (\n <header className={styles.header}>\n <HeaderTag>{label}</HeaderTag>\n {subtitle && <p>{subtitle}</p>}\n {children && children}\n </header>\n );\n};\n"],"names":["Header","children","size","label","subtitle","HeaderTag","jsxs","styles","jsx"],"mappings":"sJAWaA,EAAS,CAAC,CAAE,SAAAC,EAAU,KAAAC,EAAO,EAAG,MAAAC,EAAQ,SAAU,SAAAC,KAA4B,CACzF,MAAMC,EAAY,IAAIH,CAAI,GAE1B,OACEI,EAAAA,KAAC,SAAA,CAAO,UAAWC,EAAO,OACxB,SAAA,CAAAC,EAAAA,IAACH,GAAW,SAAAF,CAAA,CAAM,EACjBC,GAAYI,EAAAA,IAAC,IAAA,CAAG,SAAAJ,CAAA,CAAS,EACzBH,GAAYA,CAAA,EACf,CAEJ"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/header/index.tsx"],"sourcesContent":["import { JSX } from 'react';\n\nimport styles from './styles.module.css';\n\nexport type HeaderProps = {\n children?: React.ReactNode;\n label?: string;\n size?: 1 | 2 | 3;\n superHeader?: string;\n subHeader?: string;\n};\n\nexport const Header = ({ children, size = 1, label = 'Header', ...props }: HeaderProps) => {\n const HeaderTag = `h${size}` as keyof JSX.IntrinsicElements;\n\n return (\n <header className={styles.header}>\n {props.superHeader && <sup>{props.superHeader}</sup>}\n {label && <HeaderTag>{label}</HeaderTag>}\n {props.subHeader && <sub>{props.subHeader}</sub>}\n {children && children}\n </header>\n );\n};\n"],"names":["Header","children","size","label","props","HeaderTag","jsxs","styles","jsx"],"mappings":"sJAYaA,EAAS,CAAC,CAAE,SAAAC,EAAU,KAAAC,EAAO,EAAG,MAAAC,EAAQ,SAAU,GAAGC,KAAyB,CACzF,MAAMC,EAAY,IAAIH,CAAI,GAE1B,OACEI,EAAAA,KAAC,SAAA,CAAO,UAAWC,EAAO,OACvB,SAAA,CAAAH,EAAM,aAAeI,MAAC,MAAA,CAAK,SAAAJ,EAAM,YAAY,EAC7CD,GAASK,EAAAA,IAACH,EAAA,CAAW,SAAAF,CAAA,CAAM,EAC3BC,EAAM,WAAaI,MAAC,MAAA,CAAK,WAAM,UAAU,EACzCP,GAAYA,CAAA,EACf,CAEJ"}
@@ -1,15 +1,16 @@
1
- import { jsxs as c, jsx as a } from "react/jsx-runtime";
2
- import '../../assets/index13.css';const n = "_header_1xswd_1", o = {
3
- header: n
4
- }, x = ({ children: e, size: d = 1, label: s = "Header", subtitle: r }) => {
5
- const h = `h${d}`;
6
- return /* @__PURE__ */ c("header", { className: o.header, children: [
7
- /* @__PURE__ */ a(h, { children: s }),
8
- r && /* @__PURE__ */ a("p", { children: r }),
9
- e && e
1
+ import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
+ import '../../assets/index21.css';const c = "_header_104ft_1", n = {
3
+ header: c
4
+ }, H = ({ children: d, size: s = 1, label: a = "Header", ...e }) => {
5
+ const h = `h${s}`;
6
+ return /* @__PURE__ */ t("header", { className: n.header, children: [
7
+ e.superHeader && /* @__PURE__ */ r("sup", { children: e.superHeader }),
8
+ a && /* @__PURE__ */ r(h, { children: a }),
9
+ e.subHeader && /* @__PURE__ */ r("sub", { children: e.subHeader }),
10
+ d && d
10
11
  ] });
11
12
  };
12
13
  export {
13
- x as Header
14
+ H as Header
14
15
  };
15
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/header/index.tsx"],"sourcesContent":["import { JSX } from 'react';\n\nimport styles from './styles.module.css';\n\nexport type HeaderProps = {\n children?: React.ReactNode;\n label: string;\n size?: 1 | 2 | 3;\n subtitle?: string;\n};\n\nexport const Header = ({ children, size = 1, label = 'Header', subtitle }: HeaderProps) => {\n const HeaderTag = `h${size}` as keyof JSX.IntrinsicElements;\n\n return (\n <header className={styles.header}>\n <HeaderTag>{label}</HeaderTag>\n {subtitle && <p>{subtitle}</p>}\n {children && children}\n </header>\n );\n};\n"],"names":["Header","children","size","label","subtitle","HeaderTag","jsxs","styles","jsx"],"mappings":";;;GAWaA,IAAS,CAAC,EAAE,UAAAC,GAAU,MAAAC,IAAO,GAAG,OAAAC,IAAQ,UAAU,UAAAC,QAA4B;AACzF,QAAMC,IAAY,IAAIH,CAAI;AAE1B,SACE,gBAAAI,EAAC,UAAA,EAAO,WAAWC,EAAO,QACxB,UAAA;AAAA,IAAA,gBAAAC,EAACH,KAAW,UAAAF,EAAA,CAAM;AAAA,IACjBC,KAAY,gBAAAI,EAAC,KAAA,EAAG,UAAAJ,EAAA,CAAS;AAAA,IACzBH,KAAYA;AAAA,EAAA,GACf;AAEJ;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/header/index.tsx"],"sourcesContent":["import { JSX } from 'react';\n\nimport styles from './styles.module.css';\n\nexport type HeaderProps = {\n children?: React.ReactNode;\n label?: string;\n size?: 1 | 2 | 3;\n superHeader?: string;\n subHeader?: string;\n};\n\nexport const Header = ({ children, size = 1, label = 'Header', ...props }: HeaderProps) => {\n const HeaderTag = `h${size}` as keyof JSX.IntrinsicElements;\n\n return (\n <header className={styles.header}>\n {props.superHeader && <sup>{props.superHeader}</sup>}\n {label && <HeaderTag>{label}</HeaderTag>}\n {props.subHeader && <sub>{props.subHeader}</sub>}\n {children && children}\n </header>\n );\n};\n"],"names":["Header","children","size","label","props","HeaderTag","jsxs","styles","jsx"],"mappings":";;;GAYaA,IAAS,CAAC,EAAE,UAAAC,GAAU,MAAAC,IAAO,GAAG,OAAAC,IAAQ,UAAU,GAAGC,QAAyB;AACzF,QAAMC,IAAY,IAAIH,CAAI;AAE1B,SACE,gBAAAI,EAAC,UAAA,EAAO,WAAWC,EAAO,QACvB,UAAA;AAAA,IAAAH,EAAM,eAAe,gBAAAI,EAAC,OAAA,EAAK,UAAAJ,EAAM,aAAY;AAAA,IAC7CD,KAAS,gBAAAK,EAACH,GAAA,EAAW,UAAAF,EAAA,CAAM;AAAA,IAC3BC,EAAM,aAAa,gBAAAI,EAAC,OAAA,EAAK,YAAM,WAAU;AAAA,IACzCP,KAAYA;AAAA,EAAA,GACf;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index19.css');const a=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs");function r(m){return`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='${m}' /%3E%3C/svg%3E%0A")`}const i={bold:"M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25H6.75Zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9h.753Zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497v-6.75Zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25v-7.5Z",chevron:"m19.5 8.25-7.5 7.5-7.5-7.5",home:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25",italic:"M5.248 20.246H9.05m0 0h3.696m-3.696 0 5.893-16.502m0 0h-3.697m3.697 0h3.803",link:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244",list:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z",search:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z",x:"M6 18 18 6M6 6l12 12"},u="_icon_u4umi_1",h="_small_u4umi_8",d="_medium_u4umi_13",_="_large_u4umi_18",g="_dialog_u4umi_27",v="_white_u4umi_31",p="_wrapper_u4umi_35",e={icon:u,small:h,medium:d,large:_,default:"_default_u4umi_23",dialog:g,white:v,wrapper:p},w={medium:e.medium,large:e.large,small:e.small},M={default:e.default,dialog:e.dialog,white:e.white},Z=({name:m="home",size:o="medium",variant:t="default"})=>{const l={maskImage:r(i[m].toString())},n=({children:s})=>t==="dialog"?a.jsx("span",{className:e.wrapper,"data-testid":"wrapper",children:s}):a.jsx(a.Fragment,{children:s});return a.jsx(n,{children:a.jsx("span",{className:c.t(w[o],e.icon,M[t]),style:l})})},x=()=>Object.keys(i);exports.Icon=Z;exports.Icons=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index27.css');const t=require("react/jsx-runtime"),n=require("../../classix-5H4IWnMA.cjs"),M=require("../../styles.module-B_pXIacc.cjs");function i(a){return`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='${a}' /%3E%3C/svg%3E%0A")`}const s={bold:"M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25H6.75Zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9h.753Zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497v-6.75Zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25v-7.5Z",buildings:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z",card:"M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z",chevron:"m19.5 8.25-7.5 7.5-7.5-7.5",clipboard:"M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75",gear:"M2.3 11.2C2.3 16.2 6.4 20.3 11.4 20.3C16.4 20.3 20.4 16.2 20.4 11.2M2.3 11.2C2.3 6.2 6.4 2.1 11.4 2.1C16.4 2.1 20.4 6.2 20.4 11.2M2.3 11.2L0.5 11.2M20.4 11.2L22.2 11.2M20.4 11.2L11.4 11.2M1.2 14.9L2.9 14.3M19.9 8.1L21.6 7.5M3 18.2L4.4 17M18.3 5.4L19.7 4.2M5.9 20.6L6.8 19.1M15.9 3.4L16.8 1.8M9.5 21.9L9.8 20.1M12.9 2.3L13.3 0.5M13.3 21.9L12.9 20.1M9.8 2.3L9.5 0.5M16.8 20.6L15.9 19.1M5.9 1.8L11.4 11.2M19.7 18.2L18.3 17M4.4 5.4L3 4.2M21.6 14.9L19.9 14.3M2.9 8.1L1.2 7.5M11.4 11.2L6.8 19.1",document:"M5.50 5.00A2.00 2.00 0 0 1 7.50 3.00H12.25A0.25 0.25 0 0 1 12.50 3.25V8.00A2.00 2.00 0 0 0 14.50 10.00H19.25A0.25 0.25 0 0 1 19.50 10.25V19.00A2.00 2.00 0 0 1 17.50 21.00H7.50A2.00 2.00 0 0 1 5.50 19.00V5.00Z M13.50 8.00V3.60A0.25 0.25 0 0 1 13.93 3.43L19.07 8.57A0.25 0.25 0 0 1 18.89 9.00H14.50A1.00 1.00 0 0 1 13.50 8.00Z",home:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25",italic:"M5.248 20.246H9.05m0 0h3.696m-3.696 0 5.893-16.502m0 0h-3.697m3.697 0h3.803",link:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244",list:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z",pencil:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32L19.513 8.2Z",people:"M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z",phone:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z",plus:"M12 4.5v15m7.5-7.5h-15",search:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z",toDocument:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25",upload:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5",user:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z",x:"M6 18 18 6M6 6l12 12"},d="_icon_d115m_1",r="_small_d115m_8",v="_medium_d115m_13",u="_large_d115m_18",_="_clickable_d115m_27",L="_deletable_d115m_31",Z="_dialog_d115m_35",p="_white_d115m_39",g="_wrapper_d115m_43",e={icon:d,small:r,medium:v,large:u,default:"_default_d115m_23",clickable:_,deletable:L,dialog:Z,white:p,wrapper:g},A={large:e.large,medium:e.medium,small:e.small},b={clickable:e.clickable,default:e.default,deletable:e.deletable,dialog:e.dialog,white:e.white},H=({name:a="home",size:h="medium",variant:m="default",loading:l=!1})=>{const o={maskImage:i(s[a].toString())},c=t.jsx("span",{className:n.t(A[h],e.icon,l?M.loadingStyles.spinner:b[m]),style:l?{}:o});return m==="dialog"?t.jsx("span",{className:e.wrapper,"data-testid":"wrapper",children:c}):c},V=()=>Object.keys(s);exports.Icon=H;exports.Icons=V;
2
2
  //# sourceMappingURL=index.cjs.map