reactjs-tiptap-editor 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{ActionMenuButton-htJNI0Fa.js → ActionMenuButton-Cc0vy5hy.js} +10 -13
- package/lib/ActionMenuButton-t7e5GCJp.cjs +1 -0
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.js +23 -25
- package/lib/Blockquote.cjs +2 -2
- package/lib/Blockquote.js +5 -6
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +5 -6
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +11 -12
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +3 -3
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +9 -10
- package/lib/CodeBlock.cjs +39 -39
- package/lib/CodeBlock.js +837 -946
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +8 -9
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +18 -19
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +5 -6
- package/lib/{Drawer-1211urKj.js → Drawer-C6WTtcd0.js} +16 -17
- package/lib/Drawer-DRdsK4f_.cjs +1 -0
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +3 -3
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +15 -16
- package/lib/{Excalidraw-Du3hBR8t.js → Excalidraw-DjO5sCC_.js} +31 -32
- package/lib/Excalidraw-gJ99kWdS.cjs +1 -0
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +2 -2
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +17 -18
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +5 -6
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +5 -5
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +5 -5
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +15 -15
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +7 -8
- package/lib/History.cjs +1 -1
- package/lib/History.js +8 -10
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +5 -6
- package/lib/Icon-DHNSWrSX.cjs +1 -0
- package/lib/{Icon-C-qYUAS1.js → Icon-prdLEHMN.js} +3 -4
- package/lib/{Iframe-DTYTLQE6.js → Iframe-CERKUXQh.js} +13 -14
- package/lib/Iframe-CvymVtpM.cjs +1 -0
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +2 -2
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +48 -49
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +22 -23
- package/lib/ImportWord.cjs +2 -2
- package/lib/ImportWord.js +10 -11
- package/lib/{Indent-jOPn3eUM.js → Indent-BfEOOT5B.js} +24 -25
- package/lib/Indent-CE6kk62r.cjs +1 -0
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +2 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +10 -11
- package/lib/{Katex-CERSrcTP.js → Katex-5KNTSK8T.js} +21 -22
- package/lib/Katex-CJ2Fmvut.cjs +4 -0
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +14 -15
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/{LinkEditBlock-B5SdhOfa.js → LinkEditBlock-CFkyS2Ze.js} +55 -56
- package/lib/{LinkEditBlock-DaxljgJC.cjs → LinkEditBlock-D6z0Yohc.cjs} +2 -2
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.js +138 -132
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.js +20 -20
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +22 -24
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +5 -6
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +18 -19
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +13 -13
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +5 -6
- package/lib/{Table-39OkCQbu.js → Table-CWbY_hqo.js} +7 -8
- package/lib/Table-D9pRzwFU.cjs +9 -0
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +13 -14
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +17 -19
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +17 -19
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +5 -6
- package/lib/{Twitter-D7PhLycr.js → Twitter-BV7HA-MO.js} +566 -525
- package/lib/Twitter-D7NK3MZe.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +2 -2
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +24 -25
- package/lib/bubble.cjs +4 -4
- package/lib/bubble.js +433 -423
- package/lib/{button-Crm67hfl.js → button-0963_Pa8.js} +3 -4
- package/lib/button-Bxfjx9_Y.cjs +1 -0
- package/lib/{checkbox-DViVmgJ6.js → checkbox-D4p6-UMt.js} +1 -1
- package/lib/{checkbox-NQC2MdGT.cjs → checkbox-Q6FcMQW5.cjs} +1 -1
- package/lib/{dialog-Ce9Cjfft.js → dialog-B-9_Z5j2.js} +1 -1
- package/lib/{dialog-DaHBd2zw.cjs → dialog-D-oYxagG.cjs} +1 -1
- package/lib/{dropdown-menu-CQykJhBs.js → dropdown-menu-par18QL5.js} +1 -1
- package/lib/{dropdown-menu-CSCDQtq0.cjs → dropdown-menu-r8XibZQU.cjs} +1 -1
- package/lib/extensions/Mention/Mention.d.ts +3 -1
- package/lib/extensions/Mention/components/NodeViewMentionList.d.ts +7 -1
- package/lib/{index-DCJheRBq.cjs → index--nUS7Y66.cjs} +1 -1
- package/lib/{index-DLqogznp.cjs → index-BBNITgNi.cjs} +7 -7
- package/lib/index-BFXkgG1P.cjs +7 -0
- package/lib/{index-prphFVsp.js → index-BQ6ZdLsu.js} +1 -1
- package/lib/{index-DylewabB.cjs → index-BZ6DfR2r.cjs} +1 -1
- package/lib/{index-D-FhWysc.js → index-BimeTI7q.js} +1 -1
- package/lib/{index-TMqmkmT6.cjs → index-CApXPpjF.cjs} +1 -1
- package/lib/{index-nFjllrEl.js → index-CbIQPoF6.js} +19 -18
- package/lib/{index-BeUrdBxf.js → index-EKFybgpP.js} +1 -1
- package/lib/{index-DuZCJJSp.js → index-pgx8gyoC.js} +1118 -504
- package/lib/index.cjs +2 -2
- package/lib/index.js +8 -9
- package/lib/{input-tU3H__39.cjs → input-CZUkD6wF.cjs} +1 -1
- package/lib/{input-DfqFAyKo.js → input-cclJoUeC.js} +1 -1
- package/lib/{isNumber-CTm1pIvN.js → isNumber-8HKEgTkA.js} +1 -1
- package/lib/{isNumber-C2saEiG2.cjs → isNumber-Bv1Qhmw8.cjs} +1 -1
- package/lib/label-CFaBdRGz.cjs +1 -0
- package/lib/label-aveW7pdK.js +18 -0
- package/lib/{popover-CZWSQZ0q.cjs → popover-BWYZO_fD.cjs} +1 -1
- package/lib/{popover-CoepUobG.js → popover-D5YZPv2r.js} +1 -1
- package/lib/{separator-DCQD8P6s.cjs → separator-B978cwAm.cjs} +1 -1
- package/lib/{separator-6SnwzytZ.js → separator-BHjFVmZr.js} +18 -18
- package/lib/{store-726Zjszt.cjs → store-BsBiawfz.cjs} +1 -1
- package/lib/{store-ibARMQ3h.js → store-BsMMRKFd.js} +1 -1
- package/lib/style.css +1 -1
- package/lib/{tabs-DrkJL_C2.js → tabs-Bj8EvAkY.js} +1 -1
- package/lib/{tabs-B_ArrG09.cjs → tabs-CUMyiV80.cjs} +1 -1
- package/lib/{textarea-CmZVZKOo.cjs → textarea-BKb7LDw1.cjs} +1 -1
- package/lib/{textarea-CIs52G8B.js → textarea-CClyW-74.js} +1 -1
- package/lib/{throttle-CGM5M2yG.js → throttle-BIkZV3Y_.js} +1 -1
- package/lib/{throttle-DXN-aiH5.cjs → throttle-BM3Bmbf_.cjs} +1 -1
- package/lib/{updatePosition-DpMKxYdN.js → updatePosition-GLTrgcib.js} +1 -1
- package/lib/{updatePosition-C17CDdjq.cjs → updatePosition-u2mTh3mG.cjs} +1 -1
- package/lib/useButtonProps-B0riSJs9.cjs +1 -0
- package/lib/{useButtonProps-D0SrPzuG.js → useButtonProps-StwAz7Ha.js} +35 -47
- package/package.json +58 -54
- package/lib/ActionMenuButton-DYT5chmX.cjs +0 -1
- package/lib/Drawer-DUFUd5BW.cjs +0 -1
- package/lib/Excalidraw-CajgZDjU.cjs +0 -1
- package/lib/Icon-BjR_or8V.cjs +0 -1
- package/lib/Iframe-CM6mRQmv.cjs +0 -1
- package/lib/Indent-BmhiEb0S.cjs +0 -1
- package/lib/Katex-CUd3LxLh.cjs +0 -4
- package/lib/Table-3VstSlg4.cjs +0 -9
- package/lib/Twitter-DuHPeVW1.cjs +0 -1
- package/lib/button-xNppt_aK.cjs +0 -1
- package/lib/index-BQ17A_37.js +0 -393
- package/lib/index-CNzHZDls.cjs +0 -7
- package/lib/index-DmOTQudI.cjs +0 -1
- package/lib/label-DC33TZy_.js +0 -19
- package/lib/label-DkDE77kc.cjs +0 -1
- package/lib/toggle-DVCNvcqp.cjs +0 -1
- package/lib/toggle-xchtz-Kf.js +0 -92
- package/lib/tooltip-BTFcHrd9.js +0 -24
- package/lib/tooltip-DFjcKu9a.cjs +0 -1
- package/lib/useButtonProps-bei1vI37.cjs +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),x=require("react"),Je=require("@radix-ui/react-slot"),ge=require("./index-FSRjMsxW.cjs"),fe=require("./theme.cjs"),E=require("./events.constant-DQYeJpu5.cjs"),Ye=require("@radix-ui/react-toggle"),et=require("@radix-ui/react-tooltip"),tt=require("@radix-ui/react-select"),s=require("lucide-react"),$=require("@radix-ui/react-icons"),Se=require("./index-BBNITgNi.cjs");function q(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const N=q(x),ke=q(Ye),O=q(et),C=q(tt),oe="-",rt=e=>{const r=nt(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{const a=l.split(oe);return a[0]===""&&a.length!==1&&a.shift(),ze(a,r)||ot(l)},getConflictingClassGroupIds:(l,a)=>{const h=t[l]||[];return a&&o[l]?[...h,...o[l]]:h}}},ze=(e,r)=>{var l;if(e.length===0)return r.classGroupId;const t=e[0],o=r.nextPart.get(t),c=o?ze(e.slice(1),o):void 0;if(c)return c;if(r.validators.length===0)return;const i=e.join(oe);return(l=r.validators.find(({validator:a})=>a(i)))==null?void 0:l.classGroupId},xe=/^\[(.+)\]$/,ot=e=>{if(xe.test(e)){const r=xe.exec(e)[1],t=r==null?void 0:r.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},nt=e=>{const{theme:r,prefix:t}=e,o={nextPart:new Map,validators:[]};return st(Object.entries(e.classGroups),t).forEach(([i,l])=>{te(l,o,i,r)}),o},te=(e,r,t,o)=>{e.forEach(c=>{if(typeof c=="string"){const i=c===""?r:be(r,c);i.classGroupId=t;return}if(typeof c=="function"){if(it(c)){te(c(o),r,t,o);return}r.validators.push({validator:c,classGroupId:t});return}Object.entries(c).forEach(([i,l])=>{te(l,be(r,i),t,o)})})},be=(e,r)=>{let t=e;return r.split(oe).forEach(o=>{t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o)}),t},it=e=>e.isThemeGetter,st=(e,r)=>r?e.map(([t,o])=>{const c=o.map(i=>typeof i=="string"?r+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,a])=>[r+l,a])):i);return[t,c]}):e,ct=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,o=new Map;const c=(i,l)=>{t.set(i,l),r++,r>e&&(r=0,o=t,t=new Map)};return{get(i){let l=t.get(i);if(l!==void 0)return l;if((l=o.get(i))!==void 0)return c(i,l),l},set(i,l){t.has(i)?t.set(i,l):c(i,l)}}},Ee="!",at=e=>{const{separator:r,experimentalParseClassName:t}=e,o=r.length===1,c=r[0],i=r.length,l=a=>{const h=[];let u=0,m=0,g;for(let f=0;f<a.length;f++){let j=a[f];if(u===0){if(j===c&&(o||a.slice(f,f+i)===r)){h.push(a.slice(m,f)),m=f+i;continue}if(j==="/"){g=f;continue}}j==="["?u++:j==="]"&&u--}const d=h.length===0?a:a.substring(m),b=d.startsWith(Ee),S=b?d.substring(1):d,v=g&&g>m?g-m:void 0;return{modifiers:h,hasImportantModifier:b,baseClassName:S,maybePostfixModifierPosition:v}};return t?a=>t({className:a,parseClassName:l}):l},lt=e=>{if(e.length<=1)return e;const r=[];let t=[];return e.forEach(o=>{o[0]==="["?(r.push(...t.sort(),o),t=[]):t.push(o)}),r.push(...t.sort()),r},dt=e=>({cache:ct(e.cacheSize),parseClassName:at(e),...rt(e)}),ut=/\s+/,ht=(e,r)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:c}=r,i=[],l=e.trim().split(ut);let a="";for(let h=l.length-1;h>=0;h-=1){const u=l[h],{modifiers:m,hasImportantModifier:g,baseClassName:d,maybePostfixModifierPosition:b}=t(u);let S=!!b,v=o(S?d.substring(0,b):d);if(!v){if(!S){a=u+(a.length>0?" "+a:a);continue}if(v=o(d),!v){a=u+(a.length>0?" "+a:a);continue}S=!1}const f=lt(m).join(":"),j=g?f+Ee:f,k=j+v;if(i.includes(k))continue;i.push(k);const I=c(v,S);for(let A=0;A<I.length;++A){const W=I[A];i.push(j+W)}a=u+(a.length>0?" "+a:a)}return a};function pt(){let e=0,r,t,o="";for(;e<arguments.length;)(r=arguments[e++])&&(t=Me(r))&&(o&&(o+=" "),o+=t);return o}const Me=e=>{if(typeof e=="string")return e;let r,t="";for(let o=0;o<e.length;o++)e[o]&&(r=Me(e[o]))&&(t&&(t+=" "),t+=r);return t};function mt(e,...r){let t,o,c,i=l;function l(h){const u=r.reduce((m,g)=>g(m),e());return t=dt(u),o=t.cache.get,c=t.cache.set,i=a,a(h)}function a(h){const u=o(h);if(u)return u;const m=ht(h,t);return c(h,m),m}return function(){return i(pt.apply(null,arguments))}}const w=e=>{const r=t=>t[e]||[];return r.isThemeGetter=!0,r},Le=/^\[(?:([a-z-]+):)?(.+)\]$/i,gt=/^\d+\/\d+$/,ft=new Set(["px","full","screen"]),xt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,vt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,L=e=>P(e)||ft.has(e)||gt.test(e),T=e=>V(e,"length",Lt),P=e=>!!e&&!Number.isNaN(Number(e)),Z=e=>V(e,"number",P),B=e=>!!e&&Number.isInteger(Number(e)),Ct=e=>e.endsWith("%")&&P(e.slice(0,-1)),p=e=>Le.test(e),R=e=>xt.test(e),jt=new Set(["length","size","percentage"]),St=e=>V(e,jt,Ne),kt=e=>V(e,"position",Ne),zt=new Set(["image","url"]),Et=e=>V(e,zt,Tt),Mt=e=>V(e,"",Nt),G=()=>!0,V=(e,r,t)=>{const o=Le.exec(e);return o?o[1]?typeof r=="string"?o[1]===r:r.has(o[1]):t(o[2]):!1},Lt=e=>bt.test(e)&&!wt.test(e),Ne=()=>!1,Nt=e=>vt.test(e),Tt=e=>yt.test(e),Rt=()=>{const e=w("colors"),r=w("spacing"),t=w("blur"),o=w("brightness"),c=w("borderColor"),i=w("borderRadius"),l=w("borderSpacing"),a=w("borderWidth"),h=w("contrast"),u=w("grayscale"),m=w("hueRotate"),g=w("invert"),d=w("gap"),b=w("gradientColorStops"),S=w("gradientColorStopPositions"),v=w("inset"),f=w("margin"),j=w("opacity"),k=w("padding"),I=w("saturate"),A=w("scale"),W=w("sepia"),ae=w("skew"),le=w("space"),de=w("translate"),D=()=>["auto","contain","none"],X=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",p,r],y=()=>[p,r],ue=()=>["",L,T],_=()=>["auto",P,p],he=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",p],me=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[P,p];return{cacheSize:500,separator:":",theme:{colors:[G],spacing:[L,T],blur:["none","",R,p],brightness:M(),borderColor:[e],borderRadius:["none","","full",R,p],borderSpacing:y(),borderWidth:ue(),contrast:M(),grayscale:H(),hueRotate:M(),invert:H(),gap:y(),gradientColorStops:[e],gradientColorStopPositions:[Ct,T],inset:K(),margin:K(),opacity:M(),padding:y(),saturate:M(),scale:M(),sepia:H(),skew:M(),space:y(),translate:y()},classGroups:{aspect:[{aspect:["auto","square","video",p]}],container:["container"],columns:[{columns:[R]}],"break-after":[{"break-after":me()}],"break-before":[{"break-before":me()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...he(),p]}],overflow:[{overflow:X()}],"overflow-x":[{"overflow-x":X()}],"overflow-y":[{"overflow-y":X()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",B,p]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",p]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",B,p]}],"grid-cols":[{"grid-cols":[G]}],"col-start-end":[{col:["auto",{span:["full",B,p]},p]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[G]}],"row-start-end":[{row:["auto",{span:[B,p]},p]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",p]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",p]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[f]}],mx:[{mx:[f]}],my:[{my:[f]}],ms:[{ms:[f]}],me:[{me:[f]}],mt:[{mt:[f]}],mr:[{mr:[f]}],mb:[{mb:[f]}],ml:[{ml:[f]}],"space-x":[{"space-x":[le]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[le]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",p,r]}],"min-w":[{"min-w":[p,r,"min","max","fit"]}],"max-w":[{"max-w":[p,r,"none","full","min","max","fit","prose",{screen:[R]},R]}],h:[{h:[p,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[p,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[p,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[p,r,"auto","min","max","fit"]}],"font-size":[{text:["base",R,T]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Z]}],"font-family":[{font:[G]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",p]}],"line-clamp":[{"line-clamp":["none",P,Z]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",L,p]}],"list-image":[{"list-image":["none",p]}],"list-style-type":[{list:["none","disc","decimal",p]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[j]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[j]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",L,T]}],"underline-offset":[{"underline-offset":["auto",L,p]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",p]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",p]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[j]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...he(),kt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",St]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Et]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[j]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[j]}],"divide-style":[{divide:U()}],"border-color":[{border:[c]}],"border-color-x":[{"border-x":[c]}],"border-color-y":[{"border-y":[c]}],"border-color-s":[{"border-s":[c]}],"border-color-e":[{"border-e":[c]}],"border-color-t":[{"border-t":[c]}],"border-color-r":[{"border-r":[c]}],"border-color-b":[{"border-b":[c]}],"border-color-l":[{"border-l":[c]}],"divide-color":[{divide:[c]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[L,p]}],"outline-w":[{outline:[L,T]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[j]}],"ring-offset-w":[{"ring-offset":[L,T]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",R,Mt]}],"shadow-color":[{shadow:[G]}],opacity:[{opacity:[j]}],"mix-blend":[{"mix-blend":[...pe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":pe()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",R,p]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[g]}],saturate:[{saturate:[I]}],sepia:[{sepia:[W]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[j]}],"backdrop-saturate":[{"backdrop-saturate":[I]}],"backdrop-sepia":[{"backdrop-sepia":[W]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",p]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",p]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",p]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[B,p]}],"translate-x":[{"translate-x":[de]}],"translate-y":[{"translate-y":[de]}],"skew-x":[{"skew-x":[ae]}],"skew-y":[{"skew-y":[ae]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",p]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",p]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",p]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[L,T,Z]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},At=mt(Rt);function z(...e){return At(Se.clsx(e))}let J;function Y(){return J===void 0&&(J=navigator.platform.includes("Mac")),J}function Te(e){return`${e}`.toLowerCase()==="mod"?Y()?"⌘":"Ctrl":`${e}`.toLowerCase()==="alt"?Y()?"⌥":"Alt":`${e}`.toLowerCase()==="shift"?Y()?"⇧":"Shift":e}function Re(e){return e.map(Te).join(" ")}const Pt=x.forwardRef((e,r)=>{const{icon:t=void 0,tooltip:o=void 0,disabled:c=!1,customClass:i="",loading:l=void 0,shortcutKeys:a=void 0,tooltipOptions:h={},action:u=void 0,isActive:m=void 0,children:g,asChild:d=!1,upload:b=!1,initialDisplayedColor:S=void 0,dataState:v=!1,...f}=e,j=Ie[t],k=d?Je.Slot:ne;return n.jsxs(Be,{children:[n.jsx(Ge,{asChild:!0,children:n.jsxs(k,{className:z("richtext-w-[32px] richtext-h-[32px]",i),"data-state":v?"on":"off",disabled:c,onClick:u,ref:r,size:"sm",...f,children:[j&&n.jsx(j,{className:"richtext-size-4"}),g]})}),o&&n.jsx(ie,{...h,className:"richtext-tooltip",children:n.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[n.jsx("div",{children:o}),!!(a!=null&&a.length)&&n.jsx("span",{children:Re(a)})]})})]})}),ee=typeof window>"u";function we(e,r,t=window){const o=x.useRef(void 0);x.useEffect(()=>{o.current=r},[r]),x.useEffect(()=>{if(!(t&&t.addEventListener))return;const i=l=>{o.current&&o.current(l)};return t.addEventListener(e,i),()=>{t.removeEventListener(e,i)}},[e,t])}function F(e,r,t={}){const{initializeWithValue:o=!0}=t,c=x.useCallback(d=>t.serializer?t.serializer(d):JSON.stringify(d),[t]),i=x.useCallback(d=>{if(t.deserializer)return t.deserializer(d);if(d==="undefined")return;const b=r instanceof Function?r():r;let S;try{S=JSON.parse(d)}catch(v){return console.error("Error parsing JSON:",v),b}return S},[t,r]),l=x.useCallback(()=>{const d=r instanceof Function?r():r;if(ee)return d;try{const b=window.localStorage.getItem(e);return b?i(b):d}catch(b){return console.warn(`Error reading localStorage key “${e}”:`,b),d}},[r,e,i]),[a,h]=x.useState(()=>o?l():r instanceof Function?r():r),u=x.useCallback(d=>{ee&&console.warn(`Tried setting localStorage key “${e}” even though environment is not a client`);try{const b=d instanceof Function?d(l()):d;window.localStorage.setItem(e,c(b)),h(b),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(b){console.warn(`Error setting localStorage key “${e}”:`,b)}},[e,c,l]),m=x.useCallback(()=>{ee&&console.warn(`Tried removing localStorage key “${e}” even though environment is not a client`);const d=r instanceof Function?r():r;window.localStorage.removeItem(e),h(d),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))},[e,r]);x.useEffect(()=>{h(l())},[e]);const g=x.useCallback(d=>{d.key&&d.key!==e||h(l())},[e,l]);return we("storage",g),we("local-storage",g),[a,u,m]}function Vt(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:n.jsx("path",{fill:"currentColor",d:"M19 12h-2v3h-3v2h5zM7 9h3V7H5v5h2zm14-6H3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 16H3V5h18z"})})}function It(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:n.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 15h15m0 4H6m9-8h6m0-4h-6M9 9h1a1 1 0 1 1-1 1V7.5a2 2 0 0 1 2-2M3 9h1a1 1 0 1 1-1 1V7.5a2 2 0 0 1 2-2"})})}function Ht(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",className:"richtext-w-4 richtext-h-4",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M5.5 3c1.404 0 2.107 0 2.611.38c.219.164.406.375.552.62C9 4.568 9 5.358 9 6.938v10.125c0 1.58 0 2.37-.337 2.937a2.1 2.1 0 0 1-.552.621c-.504.38-1.207.38-2.611.38s-2.107 0-2.611-.38a2.1 2.1 0 0 1-.552-.62C2 19.432 2 18.642 2 17.062V6.938c0-1.58 0-2.37.337-2.938a2.1 2.1 0 0 1 .552-.62C3.393 3 4.096 3 5.5 3M20 11.938v5.124c0 1.58 0 2.37-.337 2.938a2.1 2.1 0 0 1-.552.62c-.504.38-1.207.38-2.611.38s-2.107 0-2.611-.38a2.1 2.1 0 0 1-.552-.62C13 19.433 13 18.642 13 17.063V6.938c0-1.58 0-2.37.337-2.938M22 9l-6-6m6 0l-6 6",color:"currentColor"})})}function Bt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",className:"richtext-w-4 richtext-h-4",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M21 18.5c0 1.404 0 2.107-.38 2.611a2.1 2.1 0 0 1-.62.552c-.567.337-1.358.337-2.937.337H6.938c-1.58 0-2.37 0-2.938-.337a2.1 2.1 0 0 1-.62-.552C3 20.607 3 19.904 3 18.5s0-2.107.38-2.611c.163-.218.374-.406.62-.552C4.567 15 5.357 15 6.938 15h10.125c1.58 0 2.37 0 2.937.337c.246.146.457.334.62.552c.38.504.38 1.207.38 2.611M12.063 4H6.937C5.358 4 4.568 4 4 4.337a2.1 2.1 0 0 0-.62.552C3 5.393 3 6.096 3 7.5s0 2.107.38 2.611c.163.218.374.406.62.552C4.567 11 5.357 11 6.938 11h10.125c1.58 0 2.37 0 2.937-.337M21 8l-6-6m6 0l-6 6",color:"currentColor"})})}function Gt(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:n.jsx("path",{fill:"currentColor",d:"M14 2H6a2 2 0 0 0-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V8zm4 18H6V4h7v5h5zm-.65-10l-2.1 9h-1.4l-1.8-6.79l-1.8 6.79h-1.4l-2.2-9h1.5l1.4 6.81l1.8-6.81h1.3l1.8 6.81l1.4-6.81z"})})}function Ot(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:n.jsx("path",{fill:"currentColor",d:"M21 22H3v-2h18zm0-18H3V2h18zm-11 9.7h4l-2-5.4zM11.2 6h1.7l4.7 12h-2l-.9-2.6H9.4L8.5 18h-2z"})})}function Ae(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 48 48",...e,children:n.jsx("path",{fill:"currentColor",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M36 19L24 31L12 19z"})})}function Wt(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:n.jsx("path",{fill:"currentColor",d:"M9 7v10h6v-2h-4V7z"})})}function _t(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:n.jsx("path",{fill:"currentColor",d:"M9 7c-1.1 0-2 .9-2 2v8h2V9h2v7h2V9h2v8h2V9a2 2 0 0 0-2-2z"})})}function Ut(e){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:n.jsx("path",{fill:"currentColor",d:"M11 7c-1.1 0-2 .9-2 2v2a2 2 0 0 0 2 2h2v2H9v2h4c1.11 0 2-.89 2-2v-2a2 2 0 0 0-2-2h-2V9h4V7z"})})}function $t(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.jsx("path",{fill:"currentColor",d:"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6l1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6l-1.4-1.4z"})})}function Ft(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M14 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m-9 8h4m-2-2v4"})})}function qt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m9 8h4m-2-2v4"})})}function Dt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 21v-4m0-4V9m0-4V3m-2 18h4M8 5v4h11l2-2l-2-2zm6 8v4H6l-2-2l2-2z"})})}function Xt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.jsx("path",{fill:"currentColor",d:"M23.943 19.806a.2.2 0 0 0-.168-.034c-1.26-1.855-2.873-3.61-4.419-5.315l-.252-.284c-.001-.073-.067-.12-.134-.15l-.084-.084c-.05-.1-.169-.167-.286-.1c-.47.234-.907.585-1.327.919c-.554.434-1.109.87-1.63 1.354a5 5 0 0 0-.588.618c-.084.117-.017.217.084.267c-.37.368-.74.736-1.109 1.12a.2.2 0 0 0-.05.134c0 .05.033.1.067.117l.655.502v.016c.924.92 2.554 2.173 4.285 3.527c.251.201.52.402.773.602c.117.134.234.285.335.418c.05.066.169.084.236.033c.033.034.084.067.118.1a.24.24 0 0 0 .1.034a.15.15 0 0 0 .135-.066a.24.24 0 0 0 .033-.1c.017 0 .017.016.034.016a.2.2 0 0 0 .134-.05l3.058-3.327c.12-.116.014-.267 0-.267m-7.628-.134l-1.546-1.17l-.15-.1c-.035-.017-.068-.05-.102-.067l-.117-.1c.66-.66 1.33-1.308 2-1.956c-.488.484-1.463 1.906-1.261 2.373c.002 0 .018.042.067.084zm4.1 3.126l-1.277-.97a27 27 0 0 0-1.58-1.504c.69.518 1.277.97 1.361 1.053c.673.585.638.485 1.093.87l.554.4c-.074.103-.151.148-.151.151m.336.25l-.034-.016a1 1 0 0 0 .152-.117zM.588 3.476c.033.217.084.435.117.636c.201 1.103.403 2.106.772 2.858l.152.568c.05.217.134.485.219.552a67 67 0 0 0 3.578 2.942a.18.18 0 0 0 .219 0s0 .016.016.016a.15.15 0 0 0 .118.05a.2.2 0 0 0 .134-.05c1.798-1.989 3.142-3.627 4.1-4.998c.068-.066.084-.167.084-.25c.067-.067.118-.151.185-.201c.067-.067.067-.184 0-.235l-.017-.016c0-.033-.017-.084-.05-.1c-.42-.401-.722-.685-1.042-.986a94 94 0 0 1-2.352-2.273c-.017-.017-.034-.034-.067-.034c-.336-.117-1.025-.234-1.882-.385c-1.277-.216-3.008-.517-4.57-.986c0 0-.101 0-.118.017l-.05.05C.05.714.022.707 0 .718c.017.1.017.167.05.284c0 .033.068.301.068.334zm7.19 4.78l-.033.034a.036.036 0 0 1 .033-.034M6.553 2.238c.101.1.521.502.622.585c-.437-.2-1.529-.702-2.034-.869c.505.1 1.194.201 1.412.284M.79 1.403c.252.434.454 1.939.655 3.41c-.118-.469-.201-.936-.302-1.372C.992 2.673.84 1.988.638 1.386c.124 0 .152.021.152.017m-.286-.369c0-.016 0-.033-.017-.033c.085 0 .135.017.202.05c0 .006-.145-.017-.185-.017m23.17-.217c.017-.066-.336-.367-.219-.384c.253-.017.253-.401 0-.401c-.335.017-.688.1-1.008.15c-.587.117-1.192.234-1.78.367a80 80 0 0 0-3.949.937c-.403.117-.857.2-1.243.401c-.135.067-.118.2-.05.284c-.034.017-.051.017-.085.034c-.117.017-.218.034-.335.05c-.102.017-.152.1-.135.2c0 .017.017.05.017.067c-.706.936-1.496 1.923-2.353 2.976c-.84.969-1.73 1.989-2.62 3.042c-2.84 3.31-6.05 7.07-9.594 10.38a.16.16 0 0 0 0 .234c.016.016.033.033.05.033c-.05.05-.101.085-.152.134q-.05.05-.05.1a.4.4 0 0 0-.067.084c-.067.067-.067.184.017.234c.067.066.185.066.235-.017c.017-.017.017-.033.033-.033a.265.265 0 0 1 .37 0c.202.217.404.435.588.618l-.42-.35c-.067-.067-.184-.05-.234.016c-.068.066-.051.184.016.234l4.469 3.727c.034.034.067.034.118.034a.15.15 0 0 0 .117-.05l.101-.1c.017.016.05.016.067.016c.05 0 .084-.016.118-.05c6.049-6.05 10.922-10.614 16.5-14.693c.05-.033.067-.1.067-.15c.067 0 .118-.05.15-.117c1.026-3.125 1.228-5.9 1.295-7.27c0-.059.016-.038.016-.068c.017-.033.017-.05.017-.05a.98.98 0 0 0-.067-.619m-10.82 4.915c.268-.301.537-.619.806-.903c-1.73 2.273-4.603 5.767-8.67 9.929c2.773-3.059 5.562-6.218 7.864-9.026M5.14 23.466c-.016-.017-.016-.017 0-.017zm2.504-2.156c.135-.15.27-.284.42-.434c0 0 0 .016.017.016c-.224.198-.433.418-.437.418m.69-.668c.099-.1.14-.173.284-.318c.992-1.02 2.017-2.04 3.059-3.076l.016-.016c.252-.2.555-.418.824-.619a228 228 0 0 0-4.184 4.029M14.852 3.91c-.554.719-1.176 1.671-1.697 2.423c-1.646 2.374-6.94 8.174-7.057 8.274a1190 1190 0 0 1-4.839 4.597l-.1.1c-.085-.1-.085-.25.016-.334C8.652 11.966 13.19 6.133 15.021 3.576c-.05.116-.084.216-.168.334zm2.906 3.427c-.671-.386-.99-.987-.806-1.572l.05-.2a.8.8 0 0 1 .085-.167a1.9 1.9 0 0 1 .756-.703c.016 0 .033 0 .05-.016c-.017-.034-.017-.084-.017-.134c.017-.1.085-.167.202-.167c.202 0 .824.184 1.059.384c.067.05.134.117.202.184c.084.1.218.268.285.401c.034.017.067.184.118.268c.033.134.067.284.05.418c-.017.016 0 .116-.017.116a1.6 1.6 0 0 1-.218.619c-.03.03.006.012-.05.067a1.2 1.2 0 0 1-.32.334a1.49 1.49 0 0 1-1.26.234a2 2 0 0 0-.169-.066m4.37 1.403c0 .017-.017.05 0 .067c-.034 0-.05.017-.085.034a110 110 0 0 0-3.915 3.025c1.11-.986 2.218-1.989 3.378-2.975c.336-.301.571-.686.638-1.12l.168-1.003v-.033c.085-.201.404-.118.353.1c-.004-.001-.173.795-.537 1.905"})})}function Pe(){return n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",children:[n.jsx("path",{fill:"currentColor",d:"M30 18v-2h-6v10h2v-4h3v-2h-3v-2zm-11 8h-4V16h4a3.003 3.003 0 0 1 3 3v4a3.003 3.003 0 0 1-3 3m-2-2h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2zm-6-8H6v10h2v-3h3a2.003 2.003 0 0 0 2-2v-3a2 2 0 0 0-2-2m-3 5v-3h3l.001 3z"}),n.jsx("path",{fill:"currentColor",d:"M22 14v-4a.91.91 0 0 0-.3-.7l-7-7A.9.9 0 0 0 14 2H4a2.006 2.006 0 0 0-2 2v24a2 2 0 0 0 2 2h16v-2H4V4h8v6a2.006 2.006 0 0 0 2 2h6v2Zm-8-4V4.4l5.6 5.6Z"})]})}function Ve(){return n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:"icon",viewBox:"0 0 1024 1024",children:[n.jsx("path",{fill:"currentColor",d:"M679.253 402.364 618.77 561.015l-60.348-158.651a30.04 30.04 0 0 0-30.447-18.637 29.76 29.76 0 0 0-30.447 18.637l-60.416 158.651-60.416-158.651a30.515 30.515 0 0 0-38.843-17.272 28.945 28.945 0 0 0-17.954 37.547l88.815 233.267c4.369 11.469 15.7 19.115 28.398 19.115a30.31 30.31 0 0 0 28.468-19.115l62.395-163.908 62.396 163.84c4.437 11.605 15.701 19.183 28.4 19.183a30.31 30.31 0 0 0 28.466-19.115l88.747-233.267a28.945 28.945 0 0 0-17.886-37.547 30.447 30.447 0 0 0-38.912 17.272zm219.478 395.605-51.883-29.218c-28.672-16.18-52.224-3.072-52.224 29.082v.273H643.209a29.833 29.833 0 0 0-30.31 29.354c0 16.18 13.584 29.218 30.31 29.218h151.825c1.092 30.516 24.03 43.077 52.224 27.648l51.063-27.989c29.013-15.906 29.15-42.189.41-58.368"}),n.jsx("path",{fill:"currentColor",d:"m810.667 913.135-.478.068H201.796c-19.865 0-36.727-11.673-36.727-25.6v-618.36h154.965c51.268 0 92.911-39.39 92.911-87.858v-87.86H810.19c19.797 0 36.522 11.742 36.522 25.669V739.26h61.987V119.262c0-46.421-44.169-84.241-98.51-84.241H328.364l-225.28 194.56v658.09c0 46.285 44.236 84.105 98.713 84.105H810.19c43.759 0 80.554-24.713 93.32-58.573h-92.842zM350.89 94.89v86.562c0 16.11-13.858 29.286-30.925 29.286H216.815L350.959 94.891z"})]})}function Kt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentColor",children:[n.jsx("path",{d:"M14.86 22h-4.312c-3.291 0-4.937 0-6.08-.798a4.2 4.2 0 0 1-.863-.805c-.855-1.066-.855-2.6-.855-5.67v-2.545c0-2.963 0-4.445.473-5.628c.761-1.903 2.37-3.403 4.41-4.113C8.9 2 10.49 2 13.667 2c1.816 0 2.723 0 3.448.252c1.166.406 2.085 1.263 2.52 2.35c.27.676.27 1.523.27 3.216V10"}),n.jsx("path",{d:"M2.75 12c0-1.84 1.506-3.333 3.364-3.333c.672 0 1.464.116 2.117-.057a1.67 1.67 0 0 0 1.19-1.179c.174-.647.057-1.432.057-2.098C9.478 3.493 10.984 2 12.84 2m.002 16h2.523m-4.949-4.15c-.126-.8-.281-.801-1.61-.85h-1.01c-.557 0-1.009.448-1.009 1v3c0 .552.452 1 1.01 1h1.816c.39 0 .803-.313.803-.7v-1.1c0-.11-.113-.304-.224-.304H9.068M12.842 13h1.261m0 0h1.262m-1.262 0v4.875M21.251 13h-2.523c-.557 0-1.009.448-1.009 1v1.5m0 0V18m0-2.5h2.523"})]})})}function Qt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:n.jsx("path",{fill:"currentColor",d:"M6.5 3a.75.75 0 0 1 .697.471l3 7.5a.75.75 0 0 1-1.393.557L7.992 9.5H5.008l-.811 2.028a.75.75 0 0 1-1.393-.556l3-7.5A.75.75 0 0 1 6.5 3m0 2.77L5.608 8h1.784zm8.28-1.55a.75.75 0 1 0-1.06 1.06l.72.72h-3.69a.75.75 0 0 0 0 1.5h3.69l-.72.72a.75.75 0 0 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06zm0 7.5a.75.75 0 1 0-1.06 1.06l.72.72H3.75a.75.75 0 0 0 0 1.5h10.69l-.72.72a.75.75 0 1 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06z"})})}function Zt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48",children:n.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"4",children:[n.jsx("circle",{cx:"10",cy:"24",r:"4"}),n.jsx("circle",{cx:"38",cy:"10",r:"4"}),n.jsx("circle",{cx:"38",cy:"24",r:"4"}),n.jsx("circle",{cx:"38",cy:"38",r:"4"}),n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M34 38H22V10h12M14 24h20"})]})})}function Jt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:n.jsx("path",{fill:"currentColor",d:"M13.5 3a.75.75 0 0 0-.697.471l-3 7.5a.75.75 0 0 0 1.393.557l.812-2.028h2.984l.811 2.028a.75.75 0 0 0 1.393-.556l-3-7.5A.75.75 0 0 0 13.5 3m0 2.77L14.392 8h-1.784zM5.22 4.22a.75.75 0 0 1 1.06 1.06L5.56 6h3.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 0 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06zm0 7.5a.75.75 0 0 1 1.06 1.06l-.72.72h10.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06z"})})}function Yt(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"m3 21l7.548-7.548M21 3l-7.548 7.548m0 0L8 3H3l7.548 10.452m2.904-2.904L21 21h-5l-5.452-7.548",color:"currentColor"})})}function er(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.jsx("path",{fill:"currentColor",d:"M14 2H6a2 2 0 0 0-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V8zm4 18H6V4h7v5h5zm-.65-10l-2.1 9h-1.4l-1.8-6.79l-1.8 6.79h-1.4l-2.2-9h1.5l1.4 6.81l1.8-6.81h1.3l1.8 6.81l1.4-6.81z"})})}function tr(){return n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:n.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[n.jsx("path",{d:"M18 11c0-.818 0-1.57-.152-1.937s-.441-.657-1.02-1.235l-4.736-4.736c-.499-.499-.748-.748-1.058-.896a2 2 0 0 0-.197-.082C10.514 2 10.161 2 9.456 2c-3.245 0-4.868 0-5.967.886a4 4 0 0 0-.603.603C2 4.59 2 6.211 2 9.456V14c0 3.771 0 5.657 1.172 6.828S6.229 22 10 22h8M11 2.5V3c0 2.828 0 4.243.879 5.121C12.757 9 14.172 9 17 9h.5"}),n.jsx("path",{d:"M5 14v2.5M5 19v-2.5M8 14v2.5M8 19v-2.5m-3 0h3m2-2.5h1.25m1.25 0h-1.25m0 0v5m3.25 0v-5l1.75 2.5L18 14v5m2-5v5h2"})]})})}const Ie={Bold:s.Bold,LoaderCircle:s.LoaderCircle,Italic:s.Italic,Underline:s.Underline,Quote:s.Quote,TextQuote:It,Strikethrough:s.Strikethrough,Minus:s.Minus,Eraser:s.Eraser,PaintRoller:s.PaintRoller,Redo2:s.Redo2,Undo2:s.Undo2,AlignCenter:$.TextAlignCenterIcon,AlignJustify:$.TextAlignJustifyIcon,AlignLeft:$.TextAlignLeftIcon,AlignRight:$.TextAlignRightIcon,ChevronDown:s.ChevronDown,Subscript:s.Subscript,Superscript:s.Superscript,Code:s.Code,Code2:s.CodeXml,Type:s.Type,IndentIncrease:s.IndentIncrease,IndentDecrease:s.IndentDecrease,List:s.List,ListOrdered:s.ListOrdered,ListTodo:s.ListTodo,Link:s.Link,ImageUp:s.ImageUp,Video:s.Video,Maximize:s.Maximize,Minimize:s.Minimize,Table:s.Table,Sparkles:s.Sparkles,Pencil:s.Pencil,Unlink:s.Unlink,BetweenHorizonalEnd:s.BetweenHorizonalEnd,BetweenHorizonalStart:s.BetweenHorizonalStart,BetweenVerticalStart:s.BetweenVerticalStart,BetweenVerticalEnd:s.BetweenVerticalEnd,TableCellsMerge:s.TableCellsMerge,TableCellsSplit:s.TableCellsSplit,Trash2:s.Trash2,Trash:s.Trash,Replace:s.Replace,ChevronsUpDown:s.ChevronsUpDown,LineHeight:Ot,Word:Gt,Heading1:s.Heading1,Heading2:s.Heading2,Heading3:s.Heading3,Heading4:s.Heading4,Heading5:s.Heading5,Heading6:s.Heading6,Columns2:s.Columns2,Columns3:s.Columns3,Columns4:s.Columns4,Plus:s.Plus,Grip:s.GripVertical,Copy:s.Copy,Clipboard:s.Clipboard,PanelLeft:s.PanelLeft,PanelRight:s.PanelRight,Columns:s.Columns2,Iframe:s.Frame,MenuDown:Ae,SizeS:Ut,SizeM:_t,SizeL:Wt,AspectRatio:Vt,Emoji:s.SmilePlus,DeleteColumn:Ht,DeleteRow:Bt,SearchAndReplace:s.Replace,EmojiIcon:s.SmilePlusIcon,KatexIcon:s.Sigma,ExportPdf:Pe,ExportWord:Ve,ImportWord:er,ColumnAddLeft:Ft,ColumnAddRight:qt,BookMarked:s.BookMarked,Excalidraw:Xt,ZoomIn:s.ZoomIn,ZoomOut:s.ZoomOut,Settings:s.Settings,Eye:s.Eye,TextDirection:Dt,LeftToRight:Qt,RightToLeft:Jt,Attachment:s.Paperclip,GifIcon:Kt,ChevronUp:s.ChevronUp,Crop:s.CropIcon,Mermaid:Zt,Twitter:Yt,CodeView:$t,FlipX:s.FlipVertical,FlipY:s.FlipHorizontal,PencilRuler:s.PencilRuler,WrapText:s.WrapText,Loader:s.Loader2,X:s.X,Html:tr,ExternalLink:s.ExternalLink},ve=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ye=Se.clsx,He=(e,r)=>t=>{var o;if((r==null?void 0:r.variants)==null)return ye(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:c,defaultVariants:i}=r,l=Object.keys(c).map(u=>{const m=t==null?void 0:t[u],g=i==null?void 0:i[u];if(m===null)return null;const d=ve(m)||ve(g);return c[u][d]}),a=t&&Object.entries(t).reduce((u,m)=>{let[g,d]=m;return d===void 0||(u[g]=d),u},{}),h=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((u,m)=>{let{class:g,className:d,...b}=m;return Object.entries(b).every(S=>{let[v,f]=S;return Array.isArray(f)?f.includes({...i,...a}[v]):{...i,...a}[v]===f})?[...u,g,d]:u},[]);return ye(e,l,h,t==null?void 0:t.class,t==null?void 0:t.className)},rr=He("richtext-inline-flex richtext-items-center richtext-justify-center richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-muted hover:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",{variants:{variant:{default:"richtext-bg-transparent",outline:"richtext-border richtext-border-input richtext-bg-transparent hover:richtext-bg-accent hover:richtext-text-accent-foreground"},size:{default:"richtext-h-10 richtext-px-3",sm:"richtext-h-9 richtext-px-2",lg:"richtext-h-11 richtext-px-5"}},defaultVariants:{variant:"default",size:"default"}}),ne=N.forwardRef(({className:e,variant:r,size:t,...o},c)=>n.jsx(ke.Root,{ref:c,className:z(rr({variant:r,size:t,className:e})),...o}));ne.displayName=ke.Root.displayName;const or=O.Provider,Be=O.Root,Ge=O.Trigger,ie=N.forwardRef(({className:e,sideOffset:r=4,...t},o)=>n.jsx(O.Content,{"data-richtext-portal":!0,ref:o,sideOffset:r,className:z("richtext-z-50 richtext-overflow-hidden richtext-rounded-md richtext-bg-primary richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-primary-foreground richtext-shadow-md richtext-animate-in richtext-fade-in-0 richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2 !richtext-border-none",e),...t}));ie.displayName=O.Content.displayName;const nr=C.Root,ir=C.Value,Oe=N.forwardRef(({className:e,children:r,...t},o)=>n.jsxs(C.Trigger,{ref:o,className:z("richtext-flex richtext-h-10 richtext-w-full richtext-items-center richtext-justify-between richtext-rounded-md richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 [&>span]:richtext-line-clamp-1",e),...t,children:[r,n.jsx(C.Icon,{asChild:!0,children:n.jsx(s.ChevronDown,{className:"richtext-size-4 richtext-opacity-50"})})]}));Oe.displayName=C.Trigger.displayName;const We=N.forwardRef(({className:e,...r},t)=>n.jsx(C.ScrollUpButton,{ref:t,className:z("richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",e),...r,children:n.jsx(s.ChevronUp,{className:"richtext-size-4"})}));We.displayName=C.ScrollUpButton.displayName;const _e=N.forwardRef(({className:e,...r},t)=>n.jsx(C.ScrollDownButton,{ref:t,className:z("richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",e),...r,children:n.jsx(s.ChevronDown,{className:"richtext-size-4"})}));_e.displayName=C.ScrollDownButton.displayName;const Ue=N.forwardRef(({className:e,children:r,position:t="popper",...o},c)=>n.jsx(C.Portal,{children:n.jsxs(C.Content,{"data-richtext-portal":!0,position:t,ref:c,className:z("richtext-relative richtext-z-50 richtext-max-h-60 richtext-overflow-y-auto richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md richtext-border !richtext-border-border richtext-bg-popover richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:richtext-translate-y-1 data-[side=left]:richtext--translate-x-1 data-[side=right]:richtext-translate-x-1 data-[side=top]:richtext--translate-y-1",e),...o,children:[n.jsx(We,{}),n.jsx(C.Viewport,{className:z("richtext-p-1",t==="popper"&&"richtext-h-[var(--radix-select-trigger-height)] richtext-w-full richtext-min-w-[var(--radix-select-trigger-width)]"),children:r}),n.jsx(_e,{})]})}));Ue.displayName=C.Content.displayName;const sr=N.forwardRef(({className:e,...r},t)=>n.jsx(C.Label,{className:z("richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-font-semibold",e),ref:t,...r}));sr.displayName=C.Label.displayName;const $e=N.forwardRef(({className:e,children:r,...t},o)=>n.jsxs(C.Item,{ref:o,className:z("richtext-relative richtext-flex richtext-w-full richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",e),...t,children:[n.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center",children:n.jsx(C.ItemIndicator,{children:n.jsx(s.Check,{className:"richtext-size-4"})})}),n.jsx(C.ItemText,{children:r})]}));$e.displayName=C.Item.displayName;const cr=N.forwardRef(({className:e,...r},t)=>n.jsx(C.Separator,{className:z("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",e),ref:t,...r}));cr.displayName=C.Separator.displayName;function se(e){function r(){const i=x.useRef(e),l=x.useCallback(()=>i.current,[]),a=x.useRef(new Set),h=x.useCallback(m=>{i.current={...i.current,...m},a.current.forEach(g=>g())},[]),u=x.useCallback(m=>(a.current.add(m),()=>a.current.delete(m)),[]);return{get:l,set:h,subscribe:u}}const t=x.createContext(null);function o({children:i}){return n.jsx(t.Provider,{value:r(),children:i})}function c(i){const l=x.useContext(t);if(!l)throw new Error("Store not found");return[x.useSyncExternalStore(l.subscribe,()=>i(l.get()),()=>i(e)),l.set]}return{Provider:o,useStore:c}}se({value:!1});se({value:!1});const{Provider:ar,useStore:Fe}=se({value:!1});function lr(){const[e]=Fe(r=>r.value);return e}const Ce="data-rc-order",je="data-rc-priority",dr="rc-util-key",re=new Map;function ur(e,r){if(!e)return!1;if(e.contains)return e.contains(r);let t=r;for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function qe({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:dr}function ce(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function hr(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function De(e){return[...(re.get(e)||e).children].filter(r=>r.tagName==="STYLE")}function Xe(e,r={}){const{csp:t,prepend:o,priority:c=0}=r,i=hr(o),l=i==="prependQueue",a=document.createElement("style");a.setAttribute(Ce,i),l&&c&&a.setAttribute(je,`${c}`),t!=null&&t.nonce&&(a.nonce=t==null?void 0:t.nonce),a.innerHTML=e;const h=ce(r),{firstChild:u}=h;if(o){if(l){const m=De(h).filter(g=>{if(!["prepend","prependQueue"].includes(g.getAttribute(Ce)))return!1;const d=Number(g.getAttribute(je)||0);return c>=d});if(m.length>0)return h.insertBefore(a,m.at(-1).nextSibling),a}u.before(a)}else h.append(a);return a}function Ke(e,r={}){const t=ce(r);return De(t).find(o=>o.getAttribute(qe(r))===e)}function Qe(e,r={}){const t=Ke(e,r);t&&t.remove()}function pr(e,r){const t=re.get(e);if(!t||!ur(document,t)){const o=Xe("",r),{parentNode:c}=o;re.set(e,c),o.remove()}}function Ze(e,r,t={}){var l,a,h;const o=ce(t);pr(o,t);const c=Ke(r,t);if(c)return(l=t.csp)!=null&&l.nonce&&c.nonce!==((a=t.csp)==null?void 0:a.nonce)&&(c.nonce=(h=t.csp)==null?void 0:h.nonce),c.innerHTML!==e&&(c.innerHTML=e),c;const i=Xe(e,t);return i.setAttribute(qe(t),r),i}const mr=x.memo(({editor:e,children:r})=>{const[,t]=Fe(c=>c.value);x.useEffect(()=>{t({value:e==null?void 0:e.isEditable})},[e==null?void 0:e.isEditable]);const o=()=>{t({value:e==null?void 0:e.isEditable})};return x.useEffect(()=>(e&&e.on("update",o),()=>{e&&e.off("update",o)}),[e]),n.jsx(n.Fragment,{children:r})});function gr(){const[,e]=ge.x(ge.atomLang),r=o=>{e(c=>({...c,currentLang:o.detail}))},t=o=>{const{lang:c,messages:i}=o.detail;e(l=>{if(l.message[c]){const a={...l.message[c],...i};return{currentLang:l.currentLang,message:{...l.message,[c]:a}}}else return{currentLang:l.currentLang,message:{...l.message,[c]:i}}})};return x.useEffect(()=>{const o=E.listenEvent(E.EVENTS.CHANGE_LANGUAGE,r),c=E.listenEvent(E.EVENTS.MODIFY_LANGUAGE,t);return()=>{o(),c()}},[]),n.jsx(n.Fragment,{})}function fr(){const[e,r]=F("richtext-theme","light"),[t,o]=F("richtext-color","default"),[c,i]=F("richtext-border-radius","0.65rem");x.useEffect(()=>{const u=e||"light",m=t||"default";let g=fe.THEME[u][m];if(!g){g=fe.THEME.light.default;return}return Ze(`
|
|
2
|
+
.reactjs-tiptap-editor, .reactjs-tiptap-editor *,
|
|
3
|
+
div[data-richtext-portal], div[data-richtext-portal] * {
|
|
4
|
+
${Object.entries(g).map(([d,b])=>typeof c=="string"&&d==="radius"?`--${d}: ${c};`:`--${d}: ${b};`).join(`
|
|
5
|
+
`)}
|
|
6
|
+
}
|
|
7
|
+
`,"richtext-theme",{priority:50}),()=>{Qe("richtext-theme")}},[e,t,c]);const l=u=>{r(u.detail)},a=u=>{o(u.detail)},h=u=>{i(u.detail)};return x.useEffect(()=>{const u=E.listenEvent(E.EVENTS.CHANGE_THEME,l),m=E.listenEvent(E.EVENTS.CHANGE_COLOR,a),g=E.listenEvent(E.EVENTS.CHANGE_BORDER_RADIUS,h);return()=>{u(),m(),g()}},[]),n.jsx(n.Fragment,{})}function xr({editor:e,children:r,id:t}){return n.jsxs(ar,{children:[n.jsx(mr,{editor:e,id:t,children:r}),n.jsx(gr,{}),n.jsx(fr,{})]})}exports.ActionButton=Pt;exports.ExportPdf=Pe;exports.ExportWord=Ve;exports.MenuDown=Ae;exports.ProviderUniqueId=xr;exports.Select=nr;exports.SelectContent=Ue;exports.SelectItem=$e;exports.SelectTrigger=Oe;exports.SelectValue=ir;exports.Toggle=ne;exports.Tooltip=Be;exports.TooltipContent=ie;exports.TooltipProvider=or;exports.TooltipTrigger=Ge;exports.cn=z;exports.cva=He;exports.getShortcutKey=Te;exports.getShortcutKeys=Re;exports.icons=Ie;exports.removeCSS=Qe;exports.updateCSS=Ze;exports.useEditableEditor=lr;exports.useLocalStorage=F;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("./index-
|
|
1
|
+
"use strict";const i=require("./index-BBNITgNi.cjs");var c=20,u=(t,e=0)=>{const r=[];return!t.children.length||e>c||Array.from(t.children).forEach(o=>{o.tagName==="SPAN"?r.push(o):o.children.length&&r.push(...u(o,e+1))}),r},f=t=>{if(!t.children.length)return;const e=u(t);e&&e.forEach(r=>{var o,n;const s=r.getAttribute("style"),l=(n=(o=r.parentElement)==null?void 0:o.closest("span"))==null?void 0:n.getAttribute("style");r.setAttribute("style",`${l};${s}`)})},m=i.Mark.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&f(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",i.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleTextStyle:t=>({commands:e})=>e.toggleMark(this.name,t),removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(r,o)=>{if(r.isTextblock)return!0;r.marks.filter(n=>n.type===this.type).some(n=>Object.values(n.attrs).some(s=>!!s))||t.removeMark(o,o+r.nodeSize,this.type)}),!0}}}}),g=i.Extension.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>{var e;const r=t.getAttribute("style");if(r){const o=r.split(";").map(n=>n.trim()).filter(Boolean);for(let n=o.length-1;n>=0;n-=1){const s=o[n].split(":");if(s.length>=2){const l=s[0].trim().toLowerCase(),a=s.slice(1).join(":").trim();if(l==="background-color")return a.replace(/['"]+/g,"")}}}return(e=t.style.backgroundColor)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.backgroundColor?{style:`background-color: ${t.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),y=i.Extension.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;const r=t.getAttribute("style");if(r){const o=r.split(";").map(n=>n.trim()).filter(Boolean);for(let n=o.length-1;n>=0;n-=1){const s=o[n].split(":");if(s.length>=2){const l=s[0].trim().toLowerCase(),a=s.slice(1).join(":").trim();if(l==="color")return a.replace(/['"]+/g,"")}}}return(e=t.style.color)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),p=i.Extension.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),h=i.Extension.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize,renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),d=i.Extension.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight,renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t}).run(),unsetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});i.Extension.create({name:"textStyleKit",addExtensions(){const t=[];return this.options.backgroundColor!==!1&&t.push(g.configure(this.options.backgroundColor)),this.options.color!==!1&&t.push(y.configure(this.options.color)),this.options.fontFamily!==!1&&t.push(p.configure(this.options.fontFamily)),this.options.fontSize!==!1&&t.push(h.configure(this.options.fontSize)),this.options.lineHeight!==!1&&t.push(d.configure(this.options.lineHeight)),this.options.textStyle!==!1&&t.push(m.configure(this.options.textStyle)),t}});exports.Color=y;exports.FontFamily=p;exports.LineHeight=d;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as L, w as k, m, r as E, E as H, p as M, i as g, a as B, b as j, g as $, c as K } from "./index-
|
|
1
|
+
import { N as L, w as k, m, r as E, E as H, p as M, i as g, a as B, b as j, g as $, c as K } from "./index-CbIQPoF6.js";
|
|
2
2
|
var V = Object.defineProperty, X = (t, e) => {
|
|
3
3
|
for (var s in e)
|
|
4
4
|
V(t, s, { get: e[s], enumerable: !0 });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const o=require("./index-
|
|
1
|
+
"use strict";const o=require("./index-BBNITgNi.cjs");var _=Object.defineProperty,R=(t,e)=>{for(var s in e)_(t,s,{get:e[s],enumerable:!0})},D="listItem",v="textStyle",I=/^\s*([-+*])\s$/,A=o.Node3.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",o.mergeAttributes(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
2
2
|
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(D,this.editor.getAttributes(v)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=o.wrappingInputRule({find:I,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=o.wrappingInputRule({find:I,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(v),editor:this.editor})),[t]}}),B=o.Node3.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",o.mergeAttributes(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{if(t.type!=="list_item")return[];let s=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(r=>r.type==="paragraph"))s=e.parseChildren(t.tokens);else{const r=t.tokens[0];if(r&&r.type==="text"&&r.tokens&&r.tokens.length>0){if(s=[{type:"paragraph",content:e.parseInline(r.tokens)}],t.tokens.length>1){const l=t.tokens.slice(1),a=e.parseChildren(l);s.push(...a)}}else s=e.parseChildren(t.tokens)}return s.length===0&&(s=[{type:"paragraph",content:[]}]),{type:"listItem",content:s}},renderMarkdown:(t,e,s)=>o.renderNestedMarkdownContent(t,e,n=>n.parentType==="bulletList"?"- ":n.parentType==="orderedList"?`${n.index+1}. `:"- ",s),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),j={};R(j,{findListItemPos:()=>k,getNextListDepth:()=>y,handleBackspace:()=>b,handleDelete:()=>g,hasListBefore:()=>w,hasListItemAfter:()=>K,hasListItemBefore:()=>C,listItemHasSubList:()=>N,nextListIsDeeper:()=>E,nextListIsHigher:()=>H});var k=(t,e)=>{const{$from:s}=e.selection,n=o.getNodeType(t,e.schema);let r=null,i=s.depth,l=s.pos,a=null;for(;i>0&&a===null;)r=s.node(i),r.type===n?a=i:(i-=1,l-=1);return a===null?null:{$pos:e.doc.resolve(l),depth:a}},y=(t,e)=>{const s=k(t,e);if(!s)return!1;const[,n]=o.getNodeAtPosition(e,t,s.$pos.pos+4);return n},w=(t,e,s)=>{const{$anchor:n}=t.selection,r=Math.max(0,n.pos-2),i=t.doc.resolve(r).node();return!(!i||!s.includes(i.type.name))},C=(t,e)=>{var s;const{$anchor:n}=e.selection,r=e.doc.resolve(n.pos-2);return!(r.index()===0||((s=r.nodeBefore)==null?void 0:s.type.name)!==t)},N=(t,e,s)=>{if(!s)return!1;const n=o.getNodeType(t,e.schema);let r=!1;return s.descendants(i=>{i.type===n&&(r=!0)}),r},b=(t,e,s)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!o.isNodeActive(t.state,e)&&w(t.state,e,s)){const{$anchor:a}=t.state.selection,h=t.state.doc.resolve(a.before()-1),m=[];h.node().descendants((c,p)=>{c.type.name===e&&m.push({node:c,pos:p})});const d=m.at(-1);if(!d)return!1;const u=t.state.doc.resolve(h.start()+d.pos+1);return t.chain().cut({from:a.start()-1,to:a.end()+1},u.end()).joinForward().run()}if(!o.isNodeActive(t.state,e)||!o.isAtStartOfNode(t.state))return!1;const n=k(e,t.state);if(!n)return!1;const i=t.state.doc.resolve(n.$pos.pos-2).node(n.depth),l=N(e,t.state,i);return C(e,t.state)&&!l?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},E=(t,e)=>{const s=y(t,e),n=k(t,e);return!n||!s?!1:s>n.depth},H=(t,e)=>{const s=y(t,e),n=k(t,e);return!n||!s?!1:s<n.depth},g=(t,e)=>{if(!o.isNodeActive(t.state,e)||!o.isAtEndOfNode(t.state,e))return!1;const{selection:s}=t.state,{$from:n,$to:r}=s;return!s.empty&&n.sameParent(r)?!1:E(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():H(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},K=(t,e)=>{var s;const{$anchor:n}=e.selection,r=e.doc.resolve(n.pos-n.parentOffset-2);return!(r.index()===r.parent.childCount-1||((s=r.nodeAfter)==null?void 0:s.type.name)!==t)},V=o.Extension.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:s})=>{t.state.schema.nodes[s]!==void 0&&g(t,s)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:s})=>{t.state.schema.nodes[s]!==void 0&&g(t,s)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:s,wrapperNames:n})=>{t.state.schema.nodes[s]!==void 0&&b(t,s,n)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:s,wrapperNames:n})=>{t.state.schema.nodes[s]!==void 0&&b(t,s,n)&&(e=!0)}),e}}}}),T=/^(\s*)(\d+)\.\s+(.*)$/,X=/^\s/;function z(t){const e=[];let s=0,n=0;for(;s<t.length;){const r=t[s],i=r.match(T);if(!i)break;const[,l,a,h]=i,m=l.length;let d=h,u=s+1;const c=[r];for(;u<t.length;){const p=t[u];if(p.match(T))break;if(p.trim()==="")c.push(p),d+=`
|
|
3
3
|
`,u+=1;else if(p.match(X))c.push(p),d+=`
|
|
4
4
|
${p.slice(m+2)}`,u+=1;else break}e.push({indent:m,number:parseInt(a,10),content:d.trim(),raw:c.join(`
|
|
@@ -6958,18 +6958,19 @@ var Ea = class extends L.Component {
|
|
|
6958
6958
|
this.init();
|
|
6959
6959
|
}
|
|
6960
6960
|
init() {
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6961
|
+
var n;
|
|
6962
|
+
const e = this.props.editor;
|
|
6963
|
+
if (e && !e.isDestroyed && ((n = e.view.dom) != null && n.parentNode)) {
|
|
6964
|
+
if (e.contentComponent)
|
|
6964
6965
|
return;
|
|
6965
|
-
const
|
|
6966
|
-
|
|
6967
|
-
element:
|
|
6968
|
-
}),
|
|
6969
|
-
this.setState((
|
|
6966
|
+
const t = this.editorContentRef.current;
|
|
6967
|
+
t.append(...e.view.dom.parentNode.childNodes), e.setOptions({
|
|
6968
|
+
element: t
|
|
6969
|
+
}), e.contentComponent = ba(), this.state.hasContentComponentInitialized || (this.unsubscribeToContentComponent = e.contentComponent.subscribe(() => {
|
|
6970
|
+
this.setState((r) => r.hasContentComponentInitialized ? r : {
|
|
6970
6971
|
hasContentComponentInitialized: !0
|
|
6971
6972
|
}), this.unsubscribeToContentComponent && this.unsubscribeToContentComponent();
|
|
6972
|
-
})),
|
|
6973
|
+
})), e.createNodeViews(), this.initialized = !0;
|
|
6973
6974
|
}
|
|
6974
6975
|
}
|
|
6975
6976
|
componentWillUnmount() {
|
|
@@ -6980,10 +6981,10 @@ var Ea = class extends L.Component {
|
|
|
6980
6981
|
nodeViews: {}
|
|
6981
6982
|
}), this.unsubscribeToContentComponent && this.unsubscribeToContentComponent(), e.contentComponent = null;
|
|
6982
6983
|
try {
|
|
6983
|
-
if (!((n = e.view.dom) != null && n.
|
|
6984
|
+
if (!((n = e.view.dom) != null && n.parentNode))
|
|
6984
6985
|
return;
|
|
6985
6986
|
const t = document.createElement("div");
|
|
6986
|
-
t.append(e.view.dom), e.setOptions({
|
|
6987
|
+
t.append(...e.view.dom.parentNode.childNodes), e.setOptions({
|
|
6987
6988
|
element: t
|
|
6988
6989
|
});
|
|
6989
6990
|
} catch {
|
|
@@ -7329,15 +7330,15 @@ export {
|
|
|
7329
7330
|
j as E,
|
|
7330
7331
|
v as F,
|
|
7331
7332
|
Ia as G,
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7333
|
+
hl as H,
|
|
7334
|
+
dl as I,
|
|
7335
|
+
zs as J,
|
|
7336
|
+
Ws as K,
|
|
7337
|
+
Va as L,
|
|
7337
7338
|
el as M,
|
|
7338
7339
|
cl as N,
|
|
7339
|
-
|
|
7340
|
-
|
|
7340
|
+
tr as O,
|
|
7341
|
+
Ha as P,
|
|
7341
7342
|
ja as Q,
|
|
7342
7343
|
ml as R,
|
|
7343
7344
|
A as S,
|