@cloudhal/cli 0.9.0 → 0.10.1
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/README.md +12 -0
- package/dist/assets/starters/blog/package.json +4 -4
- package/dist/assets/starters/blog/src/env.d.ts +2 -1
- package/dist/assets/studio/assets/{AccountPage-nAu_rO1o.js → AccountPage-KnRb0NdZ.js} +2 -2
- package/dist/assets/studio/assets/ActivityPage-97xHggMx.js +2 -0
- package/dist/assets/studio/assets/{AgentModes-_sBUnXcz.js → AgentModes-B0ndZk6-.js} +2 -2
- package/dist/assets/studio/assets/AgentsPage-CaSUxYA6.js +2 -0
- package/dist/assets/studio/assets/{AnalyticsPage-C-ex-HSB.js → AnalyticsPage-BDDle79P.js} +2 -2
- package/dist/assets/studio/assets/{ApprovalsPage-s6dwVD03.js → ApprovalsPage-fQ97gTra.js} +3 -3
- package/dist/assets/studio/assets/{ArticleEditorPage-T1evZ638.js → ArticleEditorPage-BTuLTrRz.js} +2 -2
- package/dist/assets/studio/assets/ArticlesPage-C2W82JpU.js +3 -0
- package/dist/assets/studio/assets/{AssetPage-5LwLx1gR.js → AssetPage-DSFmG_Q5.js} +2 -2
- package/dist/assets/studio/assets/{Audit-DQffLTzE.js → Audit-Cdm2BctF.js} +2 -2
- package/dist/assets/studio/assets/{AuditBadges-CY1uAjI6.js → AuditBadges-CHSvcm9k.js} +2 -2
- package/dist/assets/studio/assets/{AutomationsPage-BDlQj-9A.js → AutomationsPage-2s5bhqNl.js} +2 -2
- package/dist/assets/studio/assets/{BodyChanges-DIjm1bJU.js → BodyChanges-D_RmA99y.js} +2 -2
- package/dist/assets/studio/assets/{BodyEditor-DeqV1Lsh.js → BodyEditor-upQbsOnb.js} +3 -3
- package/dist/assets/studio/assets/BookOpen.es-RObyiWbm.js +2 -0
- package/dist/assets/studio/assets/{BuildPage-CQjvu0rJ.js → BuildPage-2G7MJdni.js} +2 -2
- package/dist/assets/studio/assets/CollectionSettingsPage-DWqVO7uC.js +3 -0
- package/dist/assets/studio/assets/{CollectionsPage-7s3YSr_B.js → CollectionsPage-VEyhuzvN.js} +2 -2
- package/dist/assets/studio/assets/{CommandMenu-N_Ip-LPa.js → CommandMenu-B8e_1Mqk.js} +2 -2
- package/dist/assets/studio/assets/{CommentThreadControls-CQyiHy0N.js → CommentThreadControls-B4KqsWwR.js} +2 -2
- package/dist/assets/studio/assets/{CommentThreadPage-DVSOcxOD.js → CommentThreadPage-Cqf0lMA5.js} +2 -2
- package/dist/assets/studio/assets/{CommenterPage-CPXdSFdV.js → CommenterPage-JE30gYuF.js} +2 -2
- package/dist/assets/studio/assets/{Comments-DJVsgCAa.js → Comments-Z1pe7Eje.js} +2 -2
- package/dist/assets/studio/assets/CommentsPage-Byp1E9GE.js +2 -0
- package/dist/assets/studio/assets/{ConfirmDialog-UY7UuQt8.js → ConfirmDialog-DQTBjdtz.js} +2 -2
- package/dist/assets/studio/assets/{Crumbs-DEIiY7p1.js → Crumbs-Cq31DDaP.js} +2 -2
- package/dist/assets/studio/assets/{DateTimeField-DyVXd_hG.js → DateTimeField-Q1t2hZH5.js} +2 -2
- package/dist/assets/studio/assets/{DeleteReferences-cijJ-S_1.js → DeleteReferences-BZ2-Q7z6.js} +2 -2
- package/dist/assets/studio/assets/{EditorPreview-C3-nmzAO.js → EditorPreview-B-rAr0p-.js} +2 -2
- package/dist/assets/studio/assets/{Elevation-DmmvKhh3.js → Elevation-29GlZjiJ.js} +2 -2
- package/dist/assets/studio/assets/{ElevationRequest-Cayyvqqw.js → ElevationRequest-xDKz9GBv.js} +2 -2
- package/dist/assets/studio/assets/EndedBadge-DtZBIxsu.js +2 -0
- package/dist/assets/studio/assets/{EntryFieldsCard-aHg_PtwX.js → EntryFieldsCard-CfVGl2oF.js} +2 -2
- package/dist/assets/studio/assets/{FieldsSection-Dapb2jAb.js → FieldsSection-Dk0IMgIZ.js} +2 -2
- package/dist/assets/studio/assets/{ForgotPasswordPage-jJLhjZX7.js → ForgotPasswordPage-Dg6lorsR.js} +2 -2
- package/dist/assets/studio/assets/{Gating-HCCmndPb.js → Gating-EbYJlaF7.js} +2 -2
- package/dist/assets/studio/assets/{GovernanceDialog-Cx3r0q-n.js → GovernanceDialog-DkjblwWT.js} +2 -2
- package/dist/assets/studio/assets/{InvitePage-BHGVYDQW.js → InvitePage-CBcoLQGE.js} +2 -2
- package/dist/assets/studio/assets/{ListFieldColumns-BW5Ycf3p.js → ListFieldColumns-Cg7t430N.js} +2 -2
- package/dist/assets/studio/assets/ListToolbar-Dl7JF_yL.js +2 -0
- package/dist/assets/studio/assets/{ListingSections-Cifcu5P5.js → ListingSections-DE8G9HwU.js} +2 -2
- package/dist/assets/studio/assets/{LoginPage-C3-Zu_Ta.js → LoginPage-BZ2zkZBy.js} +2 -2
- package/dist/assets/studio/assets/MediaPage-CibPwRXq.js +2 -0
- package/dist/assets/studio/assets/{MediaPicker-CHinIGGd.js → MediaPicker-xq3mDN8O.js} +2 -2
- package/dist/assets/studio/assets/{MediaUpload-FEtMnYgM.js → MediaUpload-DJp_mOuJ.js} +2 -2
- package/dist/assets/studio/assets/{MembersPage-DRQlIhLy.js → MembersPage-D2QqLRh4.js} +2 -2
- package/dist/assets/studio/assets/{Menus-DpTuIwZQ.js → Menus-v4k8Tqrz.js} +2 -2
- package/dist/assets/studio/assets/{NavigationPage-dmNWCcLa.js → NavigationPage-DUQGXS9h.js} +2 -2
- package/dist/assets/studio/assets/{NewSiteDialog-CXajABEy.js → NewSiteDialog-C486WUcS.js} +2 -2
- package/dist/assets/studio/assets/{NotificationItems-Bql2PkI9.js → NotificationItems-D3ujSgoI.js} +2 -2
- package/dist/assets/studio/assets/{OAuthConsentPage-B-DOabVo.js → OAuthConsentPage-DY6uMxQA.js} +2 -2
- package/dist/assets/studio/assets/{PageEditorPage-CtOD2ZcK.js → PageEditorPage-CTFpnMWJ.js} +2 -2
- package/dist/assets/studio/assets/{PagesPage-DptpPusO.js → PagesPage-Cp2zJvKd.js} +2 -2
- package/dist/assets/studio/assets/{PreviewPanel-DGRZbOUK.js → PreviewPanel-B0Zrx9cb.js} +2 -2
- package/dist/assets/studio/assets/{ProjectPage-B6bKsTrC.js → ProjectPage-D0vxqEn5.js} +2 -2
- package/dist/assets/studio/assets/Readers-lfVDLYVb.js +3 -0
- package/dist/assets/studio/assets/{RedirectDialog-Bi6gecDo.js → RedirectDialog-B3hR7k-E.js} +2 -2
- package/dist/assets/studio/assets/RedirectsPage-VuBze2PX.js +2 -0
- package/dist/assets/studio/assets/{RelativeTime-pU7izbH5.js → RelativeTime-BosTteS_.js} +2 -2
- package/dist/assets/studio/assets/{ReleaseApproval-BJE5qtlq.js → ReleaseApproval-4oFAS20M.js} +2 -2
- package/dist/assets/studio/assets/{ReleasePage-WSfD9gZ3.js → ReleasePage-y62qZka_.js} +2 -2
- package/dist/assets/studio/assets/{ReleaseParts-BtLl_1C4.js → ReleaseParts-D3Wde1-q.js} +2 -2
- package/dist/assets/studio/assets/{ResetPasswordPage-G4u5dPGv.js → ResetPasswordPage-B-n3laYY.js} +2 -2
- package/dist/assets/studio/assets/{RowMenu-BDHWbqzj.js → RowMenu-C_Fth9Tb.js} +2 -2
- package/dist/assets/studio/assets/{ScheduleCard-CU87XC4_.js → ScheduleCard-BtnPrYUf.js} +2 -2
- package/dist/assets/studio/assets/{ScheduleDialog-DZywcZBs.js → ScheduleDialog-DJWak8Wh.js} +2 -2
- package/dist/assets/studio/assets/ScheduleHistoryPage-8U2zrU-1.js +2 -0
- package/dist/assets/studio/assets/{ScheduleStatusBadge-BvBYX3z6.js → ScheduleStatusBadge-CPRnml63.js} +2 -2
- package/dist/assets/studio/assets/{Schedules-WQwT-Vor.js → Schedules-CA_-r-KT.js} +2 -2
- package/dist/assets/studio/assets/SchedulesPage-Bnep_bBB.js +2 -0
- package/dist/assets/studio/assets/{Seo-BFG0drND.js → Seo-CUN9ExWK.js} +2 -2
- package/dist/assets/studio/assets/{SeoPreview-BUgjhYVU.js → SeoPreview-BGYVNywR.js} +2 -2
- package/dist/assets/studio/assets/{Settings-b3xnPmhf.js → Settings-CK5oaZyf.js} +2 -2
- package/dist/assets/studio/assets/{SiteOverviewPage-Ca_9NhG1.js → SiteOverviewPage-DMYnsrCp.js} +2 -2
- package/dist/assets/studio/assets/{SiteSettingsPage-Ci9KyZ3V.js → SiteSettingsPage-C1yPr0YD.js} +2 -2
- package/dist/assets/studio/assets/{SitesPage-DqXhJDMt.js → SitesPage-BDnqFs_w.js} +3 -3
- package/dist/assets/studio/assets/{SkillsPage-IgK0RwyD.js → SkillsPage-DsgOPOHD.js} +3 -3
- package/dist/assets/studio/assets/SnapshotsPage-juzxuJIY.js +2 -0
- package/dist/assets/studio/assets/{StatTile-IFSjHMic.js → StatTile-CdA1sdEg.js} +2 -2
- package/dist/assets/studio/assets/{StatusActions-B1rqPKp6.js → StatusActions-D-UibiFD.js} +3 -3
- package/dist/assets/studio/assets/{TableSkeleton-DqggMdG0.js → TableSkeleton-CuNEabtp.js} +2 -2
- package/dist/assets/studio/assets/{TagsMigration-D6F-LQG_.js → TagsMigration-CY_RNwEY.js} +2 -2
- package/dist/assets/studio/assets/{TaxonomyPage-dXgi9R5w.js → TaxonomyPage-Bnd_ZR0b.js} +2 -2
- package/dist/assets/studio/assets/{TaxonomySettingsDialog-HND1ryKG.js → TaxonomySettingsDialog-BDbLpc0k.js} +2 -2
- package/dist/assets/studio/assets/{TermEditorPage-DXL3ULWI.js → TermEditorPage-C71fUt6l.js} +2 -2
- package/dist/assets/studio/assets/{TermPickers-C8Bo9FgX.js → TermPickers-LA43obMi.js} +2 -2
- package/dist/assets/studio/assets/{TranslationList-BhzYkuAS.js → TranslationList-dYkcEWXh.js} +2 -2
- package/dist/assets/studio/assets/{TranslationsPage-6f2UMDgu.js → TranslationsPage-DMiG7Px3.js} +2 -2
- package/dist/assets/studio/assets/{UsedByCard-0ZXWZYKn.js → UsedByCard-Ci5WhXZr.js} +2 -2
- package/dist/assets/studio/assets/{UsedByList-CqGtfhzh.js → UsedByList-DTTSbfiJ.js} +2 -2
- package/dist/assets/studio/assets/{charts-Bp8JMtwp.js → charts-CyD9XIr2.js} +2 -2
- package/dist/assets/studio/assets/{collapsible-l8g94on4w7qfosmn-D4VL6lMu.js → collapsible-l8g94on4w7qfosmn-DXZ5cSxa.js} +2 -2
- package/dist/assets/studio/assets/collection-icons-DDkx4yxb.js +2 -0
- package/dist/assets/studio/assets/{combobox-hdxtsm2gqcxxgfju-BJ6B99nZ.js → combobox-hdxtsm2gqcxxgfju-BL58YHDj.js} +2 -2
- package/dist/assets/studio/assets/{deleteLabels-CXdCOUFd.js → deleteLabels-C6_mnHMW.js} +2 -2
- package/dist/assets/studio/assets/{editor-BJhMMfuG.js → editor-D-UcfC7J.js} +2 -2
- package/dist/assets/studio/assets/index-B9v-eWBt.js +3 -0
- package/dist/assets/studio/assets/index-D0ZLq-an.css +2 -0
- package/dist/assets/studio/assets/{layer-dialog-j5ywmzs46ccg6oqy-C7BM4aKu.js → layer-dialog-j5ywmzs46ccg6oqy-DdH4sADt.js} +2 -2
- package/dist/assets/studio/assets/{tag-input-ohfybx5dbxy3houy-CsTz-ays.js → tag-input-ohfybx5dbxy3houy-BME_pSFN.js} +2 -2
- package/dist/assets/studio/assets/useCollectionView-YtozZNNc.js +3 -0
- package/dist/assets/studio/index.html +3 -2
- package/dist/src/cli/commands-remote.d.ts +8 -1
- package/dist/src/cli/commands-remote.js +36 -1
- package/dist/src/cli/help.d.ts +1 -1
- package/dist/src/cli/help.js +10 -1
- package/dist/src/cli.d.ts +9 -0
- package/dist/src/cli.js +3 -0
- package/dist/src/commands/deploy/finish.d.ts +32 -0
- package/dist/src/commands/deploy/finish.js +119 -0
- package/dist/src/commands/deploy/options.d.ts +4 -1
- package/dist/src/commands/deploy/options.js +4 -1
- package/dist/src/commands/deploy/prepare.d.ts +333 -6
- package/dist/src/commands/deploy/prepare.js +32 -26
- package/dist/src/commands/deploy/release/checks.d.ts +10 -0
- package/dist/src/commands/deploy/release/checks.js +93 -0
- package/dist/src/commands/deploy/release/configs.d.ts +37 -0
- package/dist/src/commands/deploy/release/configs.js +106 -0
- package/dist/src/commands/deploy/release/errors.d.ts +33 -0
- package/dist/src/commands/deploy/release/errors.js +44 -0
- package/dist/src/commands/deploy/release/extract.d.ts +19 -0
- package/dist/src/commands/deploy/release/extract.js +95 -0
- package/dist/src/commands/deploy/release/fetch-release.d.ts +27 -0
- package/dist/src/commands/deploy/release/fetch-release.js +179 -0
- package/dist/src/commands/deploy/release/index.d.ts +10 -0
- package/dist/src/commands/deploy/release/index.js +289 -0
- package/dist/src/commands/deploy/release/options.d.ts +37 -0
- package/dist/src/commands/deploy/release/options.js +39 -0
- package/dist/src/commands/deploy/release/theme-check.d.ts +23 -0
- package/dist/src/commands/deploy/release/theme-check.js +181 -0
- package/dist/src/commands/deploy/release/trust.d.ts +25 -0
- package/dist/src/commands/deploy/release/trust.js +195 -0
- package/dist/src/commands/deploy/schedules-guard.d.ts +6 -1
- package/dist/src/commands/deploy/schedules-guard.js +8 -3
- package/dist/src/commands/deploy/ship.d.ts +6 -1
- package/dist/src/commands/deploy/ship.js +6 -2
- package/dist/src/commands/deploy.d.ts +4 -0
- package/dist/src/commands/deploy.js +24 -68
- package/dist/src/commands/fields.js +1 -1
- package/dist/src/commands/import-apply.js +5 -1
- package/dist/src/commands/import-revert.js +7 -1
- package/dist/src/commands/import.js +14 -2
- package/dist/src/commands/sync.js +32 -9
- package/dist/src/config-build-keys.d.ts +54 -0
- package/dist/src/config-build-keys.js +131 -0
- package/dist/src/config.d.ts +2 -0
- package/dist/src/config.js +1 -1
- package/dist/src/render-chrome.d.ts +12 -2
- package/dist/src/render-chrome.js +130 -68
- package/package.json +14 -13
- package/dist/assets/studio/assets/ActivityPage-WMRfMUvK.js +0 -2
- package/dist/assets/studio/assets/AgentsPage-DLLmx-so.js +0 -2
- package/dist/assets/studio/assets/ArticlesPage-DMpZFnlE.js +0 -3
- package/dist/assets/studio/assets/CollectionSettingsPage-DWscLife.js +0 -3
- package/dist/assets/studio/assets/CommentsPage-Cf_CseQi.js +0 -2
- package/dist/assets/studio/assets/EndedBadge-SSv5wA-H.js +0 -2
- package/dist/assets/studio/assets/ListToolbar-AiTPzw9z.js +0 -2
- package/dist/assets/studio/assets/MediaPage-By0qbkgh.js +0 -2
- package/dist/assets/studio/assets/Readers-Bvy9rxlu.js +0 -3
- package/dist/assets/studio/assets/RedirectsPage-XukadT0D.js +0 -2
- package/dist/assets/studio/assets/ScheduleHistoryPage-BA8TT-E9.js +0 -2
- package/dist/assets/studio/assets/SchedulesPage-B-H3TV5a.js +0 -2
- package/dist/assets/studio/assets/SnapshotsPage-8W2qFiqI.js +0 -2
- package/dist/assets/studio/assets/collection-icons-KuQZKlox.js +0 -2
- package/dist/assets/studio/assets/index-IQPO-IzP.css +0 -2
- package/dist/assets/studio/assets/index-jx_2-Qkj.js +0 -3
- package/dist/assets/studio/assets/useCollectionView-DIAOpQTO.js +0 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./vendor-styling-da1xibnxfkjmtglr-f72JA6U4.js";import{C as n,Cn as r,Dn as i,Dt as a,I as o,L as s,Ot as c,St as l,Tn as u,Tt as d,Un as f,Ut as p,an as m,ar as h,at as g,b as _,ct as v,dt as y,ft as b,hr as x,ir as S,j as C,or as w,r as T,rr as E,tn as D,ut as O,vn as k,wt as A,yn as j}from"./useBaseUiId-lg1teubxudgin0w2-DE9psqVX.js";import{i as M,n as N,r as ee}from"./react-iRJfyluG.js";import{d as P,f as F,p as I}from"./tooltip-o4natsv01lpq8oq2-BXAIiJ4Y.js";import{t as te}from"./inertValue-e0o6qvuef83v78fk-D0BI_tKj.js";import{i as L,n as ne}from"./resolveAriaLabelledBy-nc8mdie5shy87nsb-BodbanlU.js";import{h as R}from"./skeleton-line-m9dyh126t9k07jvg-Cif2vjvo.js";import{l as re,n as z,u as ie,v as ae,y as oe}from"./useButton-h7s9aq1sfw6arawe-CDg3MSn7.js";import{n as se,o as ce,r as B}from"./input-c8lv9ulv0kortliq-D4CKBAlm.js";import{n as le,r as ue,t as de}from"./useClick-l0p0endoxrlp0ae5-dDySeZPV.js";import{a as V,f as fe,m as pe,r as me,u as he}from"./resolveValueLabel-hpmsash3ektitvnb-CCmVsV0t.js";import{d as H,u as U}from"./composite-ab8dmdfoj6tmhcn1-BnZxF-Cq.js";import{C as W,E as ge,S as G,T as K,_ as _e,a as ve,b as ye,c as be,d as xe,f as q,g as Se,h as Ce,i as we,l as Te,m as Ee,n as De,o as Oe,p as ke,r as Ae,s as J,t as je,u as Me,v as Ne,x as Pe,y as Fe}from"./ComboboxEmpty-o0q20j2l2syar9kx-Br8JgcPC.js";import{a as Ie,i as Le,r as Re}from"./ToolbarRootContext-eqk40r8uh4h6r211-BkyB9D6c.js";import{ut as ze}from"./index-jx_2-Qkj.js";var Y=e(M(),1);function Be(e,t,n,r){if(e.baseUIHandlerPrevented)return;let i=D(e.nativeEvent),a=f(i)?i:null;(a===e.currentTarget||!r?.(a)&&!m(a))&&(e.preventDefault(),!n&&(t.context.inputRef.current?.focus(),t.state.openOnInputClick&&t.context.setOpen(!0,v(l,e.nativeEvent))))}var X=Y.forwardRef(function(e,t){let{render:n,className:i,nativeButton:o=!0,disabled:s=!1,id:c,style:l,...u}=e,{state:f,disabled:m,setTouched:h,setFocused:_,validationMode:y,validation:b}=ae(),{labelId:S}=oe(),w=W(),T=w.useState(`selectionMode`),E=w.useState(`disabled`),A=w.useState(`readOnly`),j=w.useState(`required`),M=w.useState(`positionerElement`),N=w.useState(`listElement`),ee=w.useState(`popupId`),P=w.useState(`triggerProps`),F=w.useState(`inputInsidePopup`),I=w.useState(`id`),te=w.useState(`labelId`),L=w.useState(`open`),R=w.useState(`selectedValue`),ie=w.useState(`activeIndex`),se=w.useState(`selectedIndex`),ce=w.useState(`hasSelectedValue`),B=Fe(),le=ye(),ue=C(),V=m||E||s,fe=K(),pe=ge(w);re({id:F?c:void 0});let me=F?c??I:c,he=ne(S,te),H;L&&F?H=ee??Ee(I):L&&(H=N?.id);let U=Y.useRef(``);function G(e){U.current=e.pointerType}let{reference:_e}=Ie(B,{enabled:!L&&!A&&!E&&T===`single`,listRef:w.context.labelsRef,activeIndex:ie,selectedIndex:se,onMatch(e){let t=w.context.valuesRef.current[e];t!==void 0&&w.context.setSelectedValue(t,v(a))}}),{reference:ve}=de(B,{enabled:!E,event:`mousedown`}),{buttonRef:be,getButtonProps:xe}=z({native:o,disabled:V}),q={...f,readOnly:A,open:L,disabled:V,popupSide:pe,listEmpty:fe,placeholder:T!==`none`&&!ce},Ce=g(e=>{w.set(`triggerElement`,e)});return x(`button`,e,{ref:[t,be,Ce],state:q,props:[P,ve,_e,{id:me,tabIndex:F?0:-1,role:F?`combobox`:void 0,"aria-expanded":L,"aria-haspopup":F?`dialog`:`listbox`,"aria-controls":H,"aria-required":F&&j||void 0,"aria-readonly":F&&A||void 0,"aria-labelledby":he,onPointerDown:G,onPointerEnter:G,onFocus(){_(!0),!V&&ue.start(0,w.context.forceMount)},onBlur(e){if(!p(M,e.relatedTarget)&&(h(!0),_(!1),y===`onBlur`)){let e=T===`none`?le:R;b.commit(e)}},onMouseDown(e){if(V||(F||B.set(`domReferenceElement`,e.currentTarget),w.context.forceMount(),U.current!==`touch`&&(w.context.inputRef.current?.focus(),F||e.preventDefault()),L))return;let t=k(e.currentTarget);function n(e){let t=w.state.triggerElement;if(!t)return;let n=D(e),r=w.state.positionerElement,i=w.state.listElement;p(t,n)||p(r,n)||p(i,n)||Le(e,t)||w.context.setOpen(!1,v(O,e))}F&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(r(e),w.context.setOpen(!0,v(d,e.nativeEvent)),w.context.inputRef.current?.focus())}},b.getValidationProps(V,u),xe],stateAttributesMapping:Se})});X.displayName=`ComboboxTrigger`;var Z=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return x(`span`,e,{ref:t,props:[{"aria-hidden":!0,children:`▼`},a]})});Z.displayName=`ComboboxIcon`;var Ve={...u,...i},He=Y.forwardRef(function(e,t){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,keepMounted:s=!1,style:l,...u}=e,{disabled:d}=ae(),f=W(),p=f.useState(`selectionMode`),m=f.useState(`disabled`),h=f.useState(`readOnly`),g=f.useState(`open`),y=f.useState(`selectedValue`),S=f.useState(`hasSelectionChips`),C=ye(),w=!1;w=p===`none`?C!==``:p===`single`?y!=null:S;let T=d||m||a,{buttonRef:E,getButtonProps:D}=z({native:o,disabled:T}),{mounted:O,transitionStatus:k,setMounted:j}=_(w),M={disabled:T,visible:w,open:g,transitionStatus:k};n({open:w,ref:f.context.clearRef,onComplete(){w||j(!1)}});let N=x(`button`,e,{state:M,ref:[t,E,f.context.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(T||h)return;let t=f.context.keyboardActiveRef.current?A:c;f.context.setInputValue(``,v(b,e.nativeEvent)),p===`none`?f.context.setIndices({activeIndex:null,type:t}):(f.context.setSelectedValue(Array.isArray(y)?[]:null,v(b,e.nativeEvent)),f.context.setIndices({activeIndex:null,selectedIndex:null,type:t})),f.context.inputRef.current?.focus()}},u,D],stateAttributesMapping:Ve});return s||O?N:null});He.displayName=`ComboboxClear`;var Q=ee(),Ue=e(N(),1);function We(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,Q.jsx)(je,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}function Ge(e){let{children:t,placeholder:n}=e,r=W(),i=r.useState(`itemToStringLabel`),a=r.useState(`selectedValue`),o=r.useState(`items`),s=r.useState(`selectionMode`)===`multiple`,c=r.useState(`hasSelectedValue`),l=!c&&n!=null&&t==null,u=r.useState(`hasNullItemLabel`,l),d=null;return d=typeof t==`function`?t(a):t??(!c&&n!=null&&!u?n:s&&Array.isArray(a)?he(a,o,i):fe(a,o,i)),(0,Q.jsx)(Y.Fragment,{children:d})}var Ke=Y.forwardRef(function(e,t){let{selected:n}=Pe();return e.keepMounted||n?(0,Q.jsx)(qe,{...e,ref:t}):null});Ke.displayName=`ComboboxItemIndicator`;var qe=Y.memo(Y.forwardRef((e,t)=>{let{render:r,className:i,style:a,keepMounted:o,...s}=e,{selected:c}=Pe(),l=Y.useRef(null),{transitionStatus:d,setMounted:f}=_(c),p=x(`span`,e,{ref:[t,l],state:{selected:c,transitionStatus:d},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:u});return n({batch:!0,enabled:!c,open:c,ref:l,onComplete(){c||f(!1)}}),p}));qe.displayName=`Inner`;var Je=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=W(),s=o.useState(`open`),c=o.useState(`hasSelectionChips`),[l,u]=Y.useState(void 0);s&&l!==void 0&&u(void 0);let d=Y.useRef([]),f=x(`div`,e,{ref:[t,o.context.chipsContainerRef],props:[c?{role:`toolbar`}:w,{onMouseDown(e){Be(e,o,o.state.disabled)}},a]}),p=Y.useMemo(()=>({highlightedChipIndex:l,setHighlightedChipIndex:u,chipsRef:d}),[l,u,d]);return(0,Q.jsx)(De.Provider,{value:p,children:(0,Q.jsx)(H,{elementsRef:d,children:f})})});Je.displayName=`ComboboxChips`;var Ye=Y.createContext(void 0);Ye.displayName=`ComboboxChipContext`;function Xe(){let e=Y.useContext(Ye);if(!e)throw Error(`Base UI: ComboboxChipContext is missing. ComboboxChip parts must be placed within <Combobox.Chip>.`);return e}var Ze=Y.forwardRef(function(e,t){let{render:n,className:i,style:o,...s}=e,c=W(),{setHighlightedChipIndex:l,chipsRef:u}=_e(),f=T(),p=c.useState(`disabled`),m=c.useState(`readOnly`),h=c.useState(`selectedValue`),{ref:g,index:_}=U();function y(e){let t=_,[n,i]=ke(f);return e.key===n?(e.preventDefault(),t=_>0?_-1:void 0):e.key===i?(e.preventDefault(),t=_<u.current.length-1?_+1:void 0):e.key===`Backspace`||e.key===`Delete`?(t=Ce(_,h.length),r(e),c.context.setIndices({activeIndex:null,selectedIndex:null,type:A}),c.context.setSelectedValue(h.filter((e,t)=>t!==_),v(a,e.nativeEvent))):e.key===`Enter`||e.key===` `?(r(e),t=void 0):e.key===`ArrowDown`||e.key===`ArrowUp`?(r(e),c.context.setOpen(!0,v(d,e.nativeEvent)),t=void 0):e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey||(t=void 0),t}let b=x(`div`,e,{ref:[t,g],state:{disabled:p},props:[{tabIndex:-1,"aria-disabled":p||void 0,"aria-readonly":m||void 0,onKeyDown(e){if(p||m)return;let t=y(e);Ue.flushSync(()=>{l(t)}),t===void 0?c.context.inputRef.current?.focus():u.current[t]?.focus()}},s]}),S=Y.useMemo(()=>({index:_}),[_]);return(0,Q.jsx)(Ye.Provider,{value:S,children:b})});Ze.displayName=`ComboboxChip`;var Qe=Y.forwardRef(function(e,t){let{render:n,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...l}=e,u=W(),{index:d}=Xe(),f=u.useState(`disabled`),p=u.useState(`readOnly`),m=u.useState(`selectedValue`),h=u.useState(`isItemEqualToValue`),g=f||a,{buttonRef:_,getButtonProps:b}=z({native:o,disabled:g||p,focusableWhenDisabled:!0}),S={disabled:g};function C(e){let t=u.state.activeIndex;if(t==null)return;let n=me(u.context.valuesRef.current,e,h);n!==-1&&t===n&&u.context.setIndices({activeIndex:null,type:u.context.keyboardActiveRef.current?A:c})}function w(e){let t=v(y,e.nativeEvent),n=m[d];return C(n),u.context.setSelectedValue(m.filter((e,t)=>t!==d),t),u.context.inputRef.current?.focus(),t}return x(`button`,e,{ref:[t,_],state:S,props:[{tabIndex:-1,onMouseDown(e){e.preventDefault()},onClick(e){w(e).isPropagationAllowed||e.stopPropagation()},onKeyDown(e){e.key!==`Enter`&&e.key!==` `||w(e).isPropagationAllowed||r(e)}},l,b]})});Qe.displayName=`ComboboxChipRemove`;function $e(e,t){let{getValue:n,getLabel:r}=t,i=null;function a(){if(i===null){let t=new Map,r=e?V(e):h;for(let e of r){if(e==null)continue;let r=n(e);t.has(r)?ie(`Two items passed to createItems() derived the value ${String(r)}, so selection and label resolution cannot tell them apart: the first item wins the label and every item carrying the value renders as selected. Return a unique value from \`getValue\`.`):t.set(r,e)}i=t}return i}function o(e){return e==null?e:n(e)}return{data:e,value:o,hasValue(e,t){return q(a(),e,t)!==void 0},itemLabel:r,label(e,t,n){let i=q(a(),e,t);return i===void 0?pe(e,n):r(i)}}}var et=Y.createContext(void 0);et.displayName=`ComboboxPortalContext`;function tt(){let e=Y.useContext(et);if(e===void 0)throw Error(`Base UI: <Combobox.Portal> is missing.`);return e}var nt=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=W(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,Q.jsx)(et.Provider,{value:n,children:(0,Q.jsx)(s,{ref:t,...r})}):null});nt.displayName=`ComboboxPortal`;var rt=Y.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:_=o,style:v,...y}=e,b=W(),x=Fe(),S=tt(),C=b.useState(`modal`),w=b.useState(`open`),T=b.useState(`mounted`),D=b.useState(`openMethod`),O=b.useState(`positionerElement`),k=b.useState(`triggerElement`),A=b.useState(`inputElement`),j=b.useState(`inputGroupElement`),M=b.useState(`inputInsidePopup`),N=b.useState(`transitionStatus`),ee=K(),P=F({anchor:i??(M?k:j??A),floatingRootContext:x,positionMethod:a,mounted:T,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:S,collisionAvoidance:_,lazyFlip:!0});Re(w&&C,D===`touch`,O,k);let L={open:w,side:P.side,align:P.align,anchorHidden:P.anchorHidden,empty:ee};E(()=>{b.set(`popupSide`,P.side)},[b,P.side]);let ne=g(e=>{b.set(`positionerElement`,e)}),R=I(e,L,{styles:P.positionerStyles,transitionStatus:N,props:y,refs:[t,ne],hidden:!T,inert:!w});return(0,Q.jsxs)(xe.Provider,{value:P,children:[T&&C&&(0,Q.jsx)(ue,{inert:te(!w),cutout:j??A??k}),R]})});rt.displayName=`ComboboxPositioner`;var it={...j,...u},at=Y.forwardRef(function(e,t){let{render:r,className:i,style:a,initialFocus:o,finalFocus:s,...c}=e,l=W(),u=G(),d=Fe(),f=l.useState(`mounted`),m=l.useState(`open`),h=l.useState(`openMethod`),g=l.useState(`popupProps`),_=l.useState(`transitionStatus`),v=l.useState(`inputInsidePopup`),y=l.useState(`inputElement`),b=l.useState(`modal`),S=l.useState(`id`),C=K(),w=c.id??(v?Ee(S):void 0);E(()=>(l.set(`popupId`,l.context.popupRef.current?.id||w),()=>{l.set(`popupId`,void 0)}),[l,w]),n({open:m,ref:l.context.popupRef,onComplete(){m&&l.context.onOpenChangeComplete(!0)}});let T={open:m,side:u.side,align:u.align,anchorHidden:u.anchorHidden,transitionStatus:_,empty:C},O=x(`div`,e,{state:T,ref:[t,l.context.popupRef],props:[g,{id:w,role:v?`dialog`:`presentation`,onFocus(e){let t=D(e.nativeEvent);h!==`touch`&&(p(l.state.listElement,t)||t===e.currentTarget)&&l.context.inputRef.current?.focus()}},P(_),c],stateAttributesMapping:it}),k=o===void 0?v?e=>e===`touch`?l.context.popupRef.current:y:!1:o,A;A=s??(v?void 0:!1);let j=!v||b;return(0,Q.jsx)(le,{context:d,disabled:!f,modal:j,openInteractionType:h,initialFocus:k,returnFocus:A,getInsideElements:()=>[l.context.startDismissRef.current,l.context.endDismissRef.current],children:(0,Q.jsxs)(Y.Fragment,{children:[O,j&&(0,Q.jsx)(be,{ref:l.context.endDismissRef})]})})});at.displayName=`ComboboxPopup`,se.size;var $=(0,Y.createContext)({size:`base`,hasError:!1});function ot({label:e,required:t,labelTooltip:n,description:r,error:i,children:a,size:o=`base`,...s}){let c=(0,Q.jsx)($.Provider,{value:{size:o,hasError:!!i},children:(0,Q.jsx)(We,{...s,required:t,children:a})});return e?(0,Q.jsx)(ce,{label:e,required:t,labelTooltip:n,description:r,error:i?typeof i==`string`?{message:i,match:!0}:i:void 0,children:c}):c}function st({children:e,className:n,align:r=`start`,sideOffset:i=4,alignOffset:a,side:o,anchor:s,positionMethod:c,collisionAvoidance:l,collisionBoundary:u,collisionPadding:d,sticky:f,disableAnchorTracking:p,container:m}){let h=S();return(0,Q.jsx)(nt,{container:m??h??void 0,children:(0,Q.jsx)(rt,{className:``,align:r,sideOffset:i,alignOffset:a,side:o,anchor:s,positionMethod:c,collisionAvoidance:l,collisionBoundary:u,collisionPadding:d,sticky:f,disableAnchorTracking:p,children:(0,Q.jsx)(at,{className:t(`flex flex-col`,`max-h-[min(var(--available-height),24rem)] max-w-(--available-width) min-w-(--anchor-width) py-1.5`,`bg-kumo-base text-kumo-default`,`rounded-lg shadow-lg ring ring-kumo-line`,n),children:e})})})}var ct={xs:{padding:`pe-5`,iconSize:12,iconRight:`end-1`},sm:{padding:`pe-6`,iconSize:14,iconRight:`end-1.5`},base:{padding:`pe-8`,iconSize:16,iconRight:`end-2`},lg:{padding:`pe-10`,iconSize:18,iconRight:`end-3`}};function lt({className:e,render:n,...r}){let{size:i,hasError:a}=(0,Y.useContext)($),o=ct[i];return(0,Q.jsxs)(X,{"data-kumo-component":`Combobox`,"data-kumo-part":`trigger`,render:n,className:t(B({size:i,variant:a?`error`:`default`}),`relative flex items-center`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,`data-[placeholder]:text-kumo-placeholder`,o.padding,e),children:[(0,Q.jsx)(Ge,{...r}),(0,Q.jsx)(Z,{className:t(`absolute top-1/2 flex -translate-y-1/2 items-center text-kumo-subtle`,o.iconRight),children:(0,Q.jsx)(L,{size:o.iconSize,className:`fill-current`})})]})}var ut={xs:{padding:`pe-7`,iconSize:12,clearRight:`end-5`,caretRight:`end-1`},sm:{padding:`pe-9`,iconSize:14,clearRight:`end-6`,caretRight:`end-1.5`},base:{padding:`pe-12`,iconSize:16,clearRight:`end-8`,caretRight:`end-2`},lg:{padding:`pe-14`,iconSize:18,clearRight:`end-9`,caretRight:`end-3`}};function dt({clearLabel:e=`Clear selection`,showOptionsLabel:n=`Show options`,...r}){let{size:i,hasError:a}=(0,Y.useContext)($),o=ut[i];return(0,Q.jsxs)(`div`,{className:t(`relative inline-block w-full`,`has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50`,r.className),children:[(0,Q.jsx)(J,{...r,className:t(B({size:i,variant:a?`error`:`default`}),`w-full`,o.padding,`disabled:cursor-not-allowed`)}),(0,Q.jsx)(He,{"data-kumo-component":`Combobox`,"data-kumo-part":`clear`,"aria-label":e,className:t(`absolute top-1/2 flex -translate-y-1/2 cursor-pointer bg-transparent p-0`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-0`,o.clearRight),children:(0,Q.jsx)(ze,{size:o.iconSize})}),(0,Q.jsx)(X,{"data-kumo-component":`Combobox`,"data-kumo-part":`trigger`,"aria-label":n,className:t(`absolute top-1/2 flex -translate-y-1/2 cursor-pointer items-center justify-center text-kumo-subtle`,`m-0 bg-transparent p-0`,o.caretRight),children:(0,Q.jsx)(Z,{className:`flex items-center`,children:(0,Q.jsx)(L,{size:o.iconSize,className:`fill-current`})})})]})}function ft({children:e,className:n,...r}){return(0,Q.jsxs)(Te,{"data-kumo-component":`Combobox`,"data-kumo-part":`item`,...r,className:t(`group mx-1.5 grid grid-cols-[1fr_16px] gap-2 rounded px-2 py-1.5 text-base`,`cursor-pointer data-highlighted:bg-kumo-tint`,`data-[disabled]:cursor-not-allowed data-[disabled]:text-kumo-subtle data-[disabled]:opacity-60 data-[disabled]:data-highlighted:bg-transparent`,n),children:[(0,Q.jsx)(`div`,{className:`col-start-1`,children:e}),(0,Q.jsx)(Ke,{className:`col-start-2 flex items-center`,children:(0,Q.jsx)(R,{})})]})}function pt(e){return(0,Q.jsx)(we,{...e,className:t(`mx-1.5 shrink-0 px-4 py-2 text-[0.925rem] leading-4 text-kumo-subtle empty:m-0 empty:p-0`),children:e.children??`No labels found.`})}function mt(e){return(0,Q.jsx)(J,{...e,className:t(B(),`mx-0 -mt-1.5 w-full shrink-0 rounded-b-none first:mb-2`,e.className)})}function ht({className:e,...n}){return(0,Q.jsx)(Me,{...n,className:t(`min-h-0 flex-1 scroll-pt-2 scroll-pb-2 overflow-y-auto overscroll-contain`,e)})}function gt(e){return(0,Q.jsx)(Oe,{...e,className:t(`mx-1.5 px-2 py-1.5 text-sm text-kumo-subtle`,e.className)})}function _t(e){return(0,Q.jsx)(ve,{...e,className:`mt-2 border-t border-kumo-hairline pt-2 first:mt-0 first:border-t-0 first:pt-0`})}function vt({removeLabel:e=`Remove`,...n}){return(0,Q.jsxs)(Ze,{...n,className:t(`flex items-center gap-2.5`,`h-6 pe-[3px] ps-2`,`rounded-sm ring-1 ring-kumo-hairline`,`bg-kumo-overlay`,`text-sm`),children:[n.children,(0,Q.jsx)(Qe,{"data-kumo-component":`Combobox`,"data-kumo-part":`chip-remove`,"aria-label":e,className:t(`cursor-pointer rounded-md p-1 hover:bg-kumo-fill-hover`,`flex bg-transparent`),children:(0,Q.jsx)(ze,{size:10})})]})}var yt={xs:`min-h-5`,sm:`min-h-6.5`,base:`min-h-9`,lg:`min-h-10`};function bt({placeholder:e,renderItem:n,className:r,inputSide:i=`right`,value:a}){let{size:o,hasError:s}=(0,Y.useContext)($),c=a,l=t=>(0,Q.jsx)(J,{placeholder:e,className:t});return(0,Q.jsxs)(Je,{className:t(B({size:o,variant:s?`error`:`default`}),`flex flex-col`,`gap-1 px-1.5 py-1`,yt[o],`h-auto`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,r),children:[i===`top`&&l(`w-full border-0 bg-inherit px-2 py-1`),(0,Q.jsxs)(`div`,{className:`flex flex-1 flex-wrap items-center gap-1.5`,children:[c!==void 0&&c.length>0&&c.map(e=>n(e)),(0,Q.jsx)(Ge,{children:e=>c===void 0?(0,Q.jsx)(Y.Fragment,{children:e.map(e=>n(e))}):null}),i===`right`&&l(`min-w-[100px] flex-1 border-0 bg-inherit px-2 py-1`)]})]})}ot.displayName=`Combobox.Root`,st.displayName=`Combobox.Content`,lt.displayName=`Combobox.TriggerValue`,dt.displayName=`Combobox.TriggerInput`,ft.displayName=`Combobox.Item`,vt.displayName=`Combobox.Chip`,bt.displayName=`Combobox.TriggerMultipleWithInput`;var xt=Object.assign(ot,{Content:st,TriggerValue:lt,TriggerInput:dt,TriggerMultipleWithInput:bt,Chip:vt,Item:ft,Input:mt,Empty:pt,GroupLabel:gt,Group:_t,List:ht,Collection:Ae,Trigger:X,Value:Ge,Icon:Z,useFilter:Ne,createItems:$e});export{rt as i,at as n,nt as r,xt as t};
|
|
2
|
-
//# sourceMappingURL=combobox-hdxtsm2gqcxxgfju-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./vendor-styling-da1xibnxfkjmtglr-f72JA6U4.js";import{C as n,Cn as r,Dn as i,Dt as a,I as o,L as s,Ot as c,St as l,Tn as u,Tt as d,Un as f,Ut as p,an as m,ar as h,at as g,b as _,ct as v,dt as y,ft as b,hr as x,ir as S,j as C,or as w,r as T,rr as E,tn as D,ut as O,vn as k,wt as A,yn as j}from"./useBaseUiId-lg1teubxudgin0w2-DE9psqVX.js";import{i as M,n as N,r as ee}from"./react-iRJfyluG.js";import{d as P,f as F,p as I}from"./tooltip-o4natsv01lpq8oq2-BXAIiJ4Y.js";import{t as te}from"./inertValue-e0o6qvuef83v78fk-D0BI_tKj.js";import{i as L,n as ne}from"./resolveAriaLabelledBy-nc8mdie5shy87nsb-BodbanlU.js";import{h as R}from"./skeleton-line-m9dyh126t9k07jvg-Cif2vjvo.js";import{l as re,n as z,u as ie,v as ae,y as oe}from"./useButton-h7s9aq1sfw6arawe-CDg3MSn7.js";import{n as se,o as ce,r as B}from"./input-c8lv9ulv0kortliq-D4CKBAlm.js";import{n as le,r as ue,t as de}from"./useClick-l0p0endoxrlp0ae5-dDySeZPV.js";import{a as V,f as fe,m as pe,r as me,u as he}from"./resolveValueLabel-hpmsash3ektitvnb-CCmVsV0t.js";import{d as H,u as U}from"./composite-ab8dmdfoj6tmhcn1-BnZxF-Cq.js";import{C as W,E as ge,S as G,T as K,_ as _e,a as ve,b as ye,c as be,d as xe,f as q,g as Se,h as Ce,i as we,l as Te,m as Ee,n as De,o as Oe,p as ke,r as Ae,s as J,t as je,u as Me,v as Ne,x as Pe,y as Fe}from"./ComboboxEmpty-o0q20j2l2syar9kx-Br8JgcPC.js";import{a as Ie,i as Le,r as Re}from"./ToolbarRootContext-eqk40r8uh4h6r211-BkyB9D6c.js";import{ut as ze}from"./index-B9v-eWBt.js";var Y=e(M(),1);function Be(e,t,n,r){if(e.baseUIHandlerPrevented)return;let i=D(e.nativeEvent),a=f(i)?i:null;(a===e.currentTarget||!r?.(a)&&!m(a))&&(e.preventDefault(),!n&&(t.context.inputRef.current?.focus(),t.state.openOnInputClick&&t.context.setOpen(!0,v(l,e.nativeEvent))))}var X=Y.forwardRef(function(e,t){let{render:n,className:i,nativeButton:o=!0,disabled:s=!1,id:c,style:l,...u}=e,{state:f,disabled:m,setTouched:h,setFocused:_,validationMode:y,validation:b}=ae(),{labelId:S}=oe(),w=W(),T=w.useState(`selectionMode`),E=w.useState(`disabled`),A=w.useState(`readOnly`),j=w.useState(`required`),M=w.useState(`positionerElement`),N=w.useState(`listElement`),ee=w.useState(`popupId`),P=w.useState(`triggerProps`),F=w.useState(`inputInsidePopup`),I=w.useState(`id`),te=w.useState(`labelId`),L=w.useState(`open`),R=w.useState(`selectedValue`),ie=w.useState(`activeIndex`),se=w.useState(`selectedIndex`),ce=w.useState(`hasSelectedValue`),B=Fe(),le=ye(),ue=C(),V=m||E||s,fe=K(),pe=ge(w);re({id:F?c:void 0});let me=F?c??I:c,he=ne(S,te),H;L&&F?H=ee??Ee(I):L&&(H=N?.id);let U=Y.useRef(``);function G(e){U.current=e.pointerType}let{reference:_e}=Ie(B,{enabled:!L&&!A&&!E&&T===`single`,listRef:w.context.labelsRef,activeIndex:ie,selectedIndex:se,onMatch(e){let t=w.context.valuesRef.current[e];t!==void 0&&w.context.setSelectedValue(t,v(a))}}),{reference:ve}=de(B,{enabled:!E,event:`mousedown`}),{buttonRef:be,getButtonProps:xe}=z({native:o,disabled:V}),q={...f,readOnly:A,open:L,disabled:V,popupSide:pe,listEmpty:fe,placeholder:T!==`none`&&!ce},Ce=g(e=>{w.set(`triggerElement`,e)});return x(`button`,e,{ref:[t,be,Ce],state:q,props:[P,ve,_e,{id:me,tabIndex:F?0:-1,role:F?`combobox`:void 0,"aria-expanded":L,"aria-haspopup":F?`dialog`:`listbox`,"aria-controls":H,"aria-required":F&&j||void 0,"aria-readonly":F&&A||void 0,"aria-labelledby":he,onPointerDown:G,onPointerEnter:G,onFocus(){_(!0),!V&&ue.start(0,w.context.forceMount)},onBlur(e){if(!p(M,e.relatedTarget)&&(h(!0),_(!1),y===`onBlur`)){let e=T===`none`?le:R;b.commit(e)}},onMouseDown(e){if(V||(F||B.set(`domReferenceElement`,e.currentTarget),w.context.forceMount(),U.current!==`touch`&&(w.context.inputRef.current?.focus(),F||e.preventDefault()),L))return;let t=k(e.currentTarget);function n(e){let t=w.state.triggerElement;if(!t)return;let n=D(e),r=w.state.positionerElement,i=w.state.listElement;p(t,n)||p(r,n)||p(i,n)||Le(e,t)||w.context.setOpen(!1,v(O,e))}F&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(r(e),w.context.setOpen(!0,v(d,e.nativeEvent)),w.context.inputRef.current?.focus())}},b.getValidationProps(V,u),xe],stateAttributesMapping:Se})});X.displayName=`ComboboxTrigger`;var Z=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return x(`span`,e,{ref:t,props:[{"aria-hidden":!0,children:`▼`},a]})});Z.displayName=`ComboboxIcon`;var Ve={...u,...i},He=Y.forwardRef(function(e,t){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,keepMounted:s=!1,style:l,...u}=e,{disabled:d}=ae(),f=W(),p=f.useState(`selectionMode`),m=f.useState(`disabled`),h=f.useState(`readOnly`),g=f.useState(`open`),y=f.useState(`selectedValue`),S=f.useState(`hasSelectionChips`),C=ye(),w=!1;w=p===`none`?C!==``:p===`single`?y!=null:S;let T=d||m||a,{buttonRef:E,getButtonProps:D}=z({native:o,disabled:T}),{mounted:O,transitionStatus:k,setMounted:j}=_(w),M={disabled:T,visible:w,open:g,transitionStatus:k};n({open:w,ref:f.context.clearRef,onComplete(){w||j(!1)}});let N=x(`button`,e,{state:M,ref:[t,E,f.context.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(T||h)return;let t=f.context.keyboardActiveRef.current?A:c;f.context.setInputValue(``,v(b,e.nativeEvent)),p===`none`?f.context.setIndices({activeIndex:null,type:t}):(f.context.setSelectedValue(Array.isArray(y)?[]:null,v(b,e.nativeEvent)),f.context.setIndices({activeIndex:null,selectedIndex:null,type:t})),f.context.inputRef.current?.focus()}},u,D],stateAttributesMapping:Ve});return s||O?N:null});He.displayName=`ComboboxClear`;var Q=ee(),Ue=e(N(),1);function We(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,Q.jsx)(je,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}function Ge(e){let{children:t,placeholder:n}=e,r=W(),i=r.useState(`itemToStringLabel`),a=r.useState(`selectedValue`),o=r.useState(`items`),s=r.useState(`selectionMode`)===`multiple`,c=r.useState(`hasSelectedValue`),l=!c&&n!=null&&t==null,u=r.useState(`hasNullItemLabel`,l),d=null;return d=typeof t==`function`?t(a):t??(!c&&n!=null&&!u?n:s&&Array.isArray(a)?he(a,o,i):fe(a,o,i)),(0,Q.jsx)(Y.Fragment,{children:d})}var Ke=Y.forwardRef(function(e,t){let{selected:n}=Pe();return e.keepMounted||n?(0,Q.jsx)(qe,{...e,ref:t}):null});Ke.displayName=`ComboboxItemIndicator`;var qe=Y.memo(Y.forwardRef((e,t)=>{let{render:r,className:i,style:a,keepMounted:o,...s}=e,{selected:c}=Pe(),l=Y.useRef(null),{transitionStatus:d,setMounted:f}=_(c),p=x(`span`,e,{ref:[t,l],state:{selected:c,transitionStatus:d},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:u});return n({batch:!0,enabled:!c,open:c,ref:l,onComplete(){c||f(!1)}}),p}));qe.displayName=`Inner`;var Je=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=W(),s=o.useState(`open`),c=o.useState(`hasSelectionChips`),[l,u]=Y.useState(void 0);s&&l!==void 0&&u(void 0);let d=Y.useRef([]),f=x(`div`,e,{ref:[t,o.context.chipsContainerRef],props:[c?{role:`toolbar`}:w,{onMouseDown(e){Be(e,o,o.state.disabled)}},a]}),p=Y.useMemo(()=>({highlightedChipIndex:l,setHighlightedChipIndex:u,chipsRef:d}),[l,u,d]);return(0,Q.jsx)(De.Provider,{value:p,children:(0,Q.jsx)(H,{elementsRef:d,children:f})})});Je.displayName=`ComboboxChips`;var Ye=Y.createContext(void 0);Ye.displayName=`ComboboxChipContext`;function Xe(){let e=Y.useContext(Ye);if(!e)throw Error(`Base UI: ComboboxChipContext is missing. ComboboxChip parts must be placed within <Combobox.Chip>.`);return e}var Ze=Y.forwardRef(function(e,t){let{render:n,className:i,style:o,...s}=e,c=W(),{setHighlightedChipIndex:l,chipsRef:u}=_e(),f=T(),p=c.useState(`disabled`),m=c.useState(`readOnly`),h=c.useState(`selectedValue`),{ref:g,index:_}=U();function y(e){let t=_,[n,i]=ke(f);return e.key===n?(e.preventDefault(),t=_>0?_-1:void 0):e.key===i?(e.preventDefault(),t=_<u.current.length-1?_+1:void 0):e.key===`Backspace`||e.key===`Delete`?(t=Ce(_,h.length),r(e),c.context.setIndices({activeIndex:null,selectedIndex:null,type:A}),c.context.setSelectedValue(h.filter((e,t)=>t!==_),v(a,e.nativeEvent))):e.key===`Enter`||e.key===` `?(r(e),t=void 0):e.key===`ArrowDown`||e.key===`ArrowUp`?(r(e),c.context.setOpen(!0,v(d,e.nativeEvent)),t=void 0):e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey||(t=void 0),t}let b=x(`div`,e,{ref:[t,g],state:{disabled:p},props:[{tabIndex:-1,"aria-disabled":p||void 0,"aria-readonly":m||void 0,onKeyDown(e){if(p||m)return;let t=y(e);Ue.flushSync(()=>{l(t)}),t===void 0?c.context.inputRef.current?.focus():u.current[t]?.focus()}},s]}),S=Y.useMemo(()=>({index:_}),[_]);return(0,Q.jsx)(Ye.Provider,{value:S,children:b})});Ze.displayName=`ComboboxChip`;var Qe=Y.forwardRef(function(e,t){let{render:n,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...l}=e,u=W(),{index:d}=Xe(),f=u.useState(`disabled`),p=u.useState(`readOnly`),m=u.useState(`selectedValue`),h=u.useState(`isItemEqualToValue`),g=f||a,{buttonRef:_,getButtonProps:b}=z({native:o,disabled:g||p,focusableWhenDisabled:!0}),S={disabled:g};function C(e){let t=u.state.activeIndex;if(t==null)return;let n=me(u.context.valuesRef.current,e,h);n!==-1&&t===n&&u.context.setIndices({activeIndex:null,type:u.context.keyboardActiveRef.current?A:c})}function w(e){let t=v(y,e.nativeEvent),n=m[d];return C(n),u.context.setSelectedValue(m.filter((e,t)=>t!==d),t),u.context.inputRef.current?.focus(),t}return x(`button`,e,{ref:[t,_],state:S,props:[{tabIndex:-1,onMouseDown(e){e.preventDefault()},onClick(e){w(e).isPropagationAllowed||e.stopPropagation()},onKeyDown(e){e.key!==`Enter`&&e.key!==` `||w(e).isPropagationAllowed||r(e)}},l,b]})});Qe.displayName=`ComboboxChipRemove`;function $e(e,t){let{getValue:n,getLabel:r}=t,i=null;function a(){if(i===null){let t=new Map,r=e?V(e):h;for(let e of r){if(e==null)continue;let r=n(e);t.has(r)?ie(`Two items passed to createItems() derived the value ${String(r)}, so selection and label resolution cannot tell them apart: the first item wins the label and every item carrying the value renders as selected. Return a unique value from \`getValue\`.`):t.set(r,e)}i=t}return i}function o(e){return e==null?e:n(e)}return{data:e,value:o,hasValue(e,t){return q(a(),e,t)!==void 0},itemLabel:r,label(e,t,n){let i=q(a(),e,t);return i===void 0?pe(e,n):r(i)}}}var et=Y.createContext(void 0);et.displayName=`ComboboxPortalContext`;function tt(){let e=Y.useContext(et);if(e===void 0)throw Error(`Base UI: <Combobox.Portal> is missing.`);return e}var nt=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=W(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,Q.jsx)(et.Provider,{value:n,children:(0,Q.jsx)(s,{ref:t,...r})}):null});nt.displayName=`ComboboxPortal`;var rt=Y.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:_=o,style:v,...y}=e,b=W(),x=Fe(),S=tt(),C=b.useState(`modal`),w=b.useState(`open`),T=b.useState(`mounted`),D=b.useState(`openMethod`),O=b.useState(`positionerElement`),k=b.useState(`triggerElement`),A=b.useState(`inputElement`),j=b.useState(`inputGroupElement`),M=b.useState(`inputInsidePopup`),N=b.useState(`transitionStatus`),ee=K(),P=F({anchor:i??(M?k:j??A),floatingRootContext:x,positionMethod:a,mounted:T,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:S,collisionAvoidance:_,lazyFlip:!0});Re(w&&C,D===`touch`,O,k);let L={open:w,side:P.side,align:P.align,anchorHidden:P.anchorHidden,empty:ee};E(()=>{b.set(`popupSide`,P.side)},[b,P.side]);let ne=g(e=>{b.set(`positionerElement`,e)}),R=I(e,L,{styles:P.positionerStyles,transitionStatus:N,props:y,refs:[t,ne],hidden:!T,inert:!w});return(0,Q.jsxs)(xe.Provider,{value:P,children:[T&&C&&(0,Q.jsx)(ue,{inert:te(!w),cutout:j??A??k}),R]})});rt.displayName=`ComboboxPositioner`;var it={...j,...u},at=Y.forwardRef(function(e,t){let{render:r,className:i,style:a,initialFocus:o,finalFocus:s,...c}=e,l=W(),u=G(),d=Fe(),f=l.useState(`mounted`),m=l.useState(`open`),h=l.useState(`openMethod`),g=l.useState(`popupProps`),_=l.useState(`transitionStatus`),v=l.useState(`inputInsidePopup`),y=l.useState(`inputElement`),b=l.useState(`modal`),S=l.useState(`id`),C=K(),w=c.id??(v?Ee(S):void 0);E(()=>(l.set(`popupId`,l.context.popupRef.current?.id||w),()=>{l.set(`popupId`,void 0)}),[l,w]),n({open:m,ref:l.context.popupRef,onComplete(){m&&l.context.onOpenChangeComplete(!0)}});let T={open:m,side:u.side,align:u.align,anchorHidden:u.anchorHidden,transitionStatus:_,empty:C},O=x(`div`,e,{state:T,ref:[t,l.context.popupRef],props:[g,{id:w,role:v?`dialog`:`presentation`,onFocus(e){let t=D(e.nativeEvent);h!==`touch`&&(p(l.state.listElement,t)||t===e.currentTarget)&&l.context.inputRef.current?.focus()}},P(_),c],stateAttributesMapping:it}),k=o===void 0?v?e=>e===`touch`?l.context.popupRef.current:y:!1:o,A;A=s??(v?void 0:!1);let j=!v||b;return(0,Q.jsx)(le,{context:d,disabled:!f,modal:j,openInteractionType:h,initialFocus:k,returnFocus:A,getInsideElements:()=>[l.context.startDismissRef.current,l.context.endDismissRef.current],children:(0,Q.jsxs)(Y.Fragment,{children:[O,j&&(0,Q.jsx)(be,{ref:l.context.endDismissRef})]})})});at.displayName=`ComboboxPopup`,se.size;var $=(0,Y.createContext)({size:`base`,hasError:!1});function ot({label:e,required:t,labelTooltip:n,description:r,error:i,children:a,size:o=`base`,...s}){let c=(0,Q.jsx)($.Provider,{value:{size:o,hasError:!!i},children:(0,Q.jsx)(We,{...s,required:t,children:a})});return e?(0,Q.jsx)(ce,{label:e,required:t,labelTooltip:n,description:r,error:i?typeof i==`string`?{message:i,match:!0}:i:void 0,children:c}):c}function st({children:e,className:n,align:r=`start`,sideOffset:i=4,alignOffset:a,side:o,anchor:s,positionMethod:c,collisionAvoidance:l,collisionBoundary:u,collisionPadding:d,sticky:f,disableAnchorTracking:p,container:m}){let h=S();return(0,Q.jsx)(nt,{container:m??h??void 0,children:(0,Q.jsx)(rt,{className:``,align:r,sideOffset:i,alignOffset:a,side:o,anchor:s,positionMethod:c,collisionAvoidance:l,collisionBoundary:u,collisionPadding:d,sticky:f,disableAnchorTracking:p,children:(0,Q.jsx)(at,{className:t(`flex flex-col`,`max-h-[min(var(--available-height),24rem)] max-w-(--available-width) min-w-(--anchor-width) py-1.5`,`bg-kumo-base text-kumo-default`,`rounded-lg shadow-lg ring ring-kumo-line`,n),children:e})})})}var ct={xs:{padding:`pe-5`,iconSize:12,iconRight:`end-1`},sm:{padding:`pe-6`,iconSize:14,iconRight:`end-1.5`},base:{padding:`pe-8`,iconSize:16,iconRight:`end-2`},lg:{padding:`pe-10`,iconSize:18,iconRight:`end-3`}};function lt({className:e,render:n,...r}){let{size:i,hasError:a}=(0,Y.useContext)($),o=ct[i];return(0,Q.jsxs)(X,{"data-kumo-component":`Combobox`,"data-kumo-part":`trigger`,render:n,className:t(B({size:i,variant:a?`error`:`default`}),`relative flex items-center`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,`data-[placeholder]:text-kumo-placeholder`,o.padding,e),children:[(0,Q.jsx)(Ge,{...r}),(0,Q.jsx)(Z,{className:t(`absolute top-1/2 flex -translate-y-1/2 items-center text-kumo-subtle`,o.iconRight),children:(0,Q.jsx)(L,{size:o.iconSize,className:`fill-current`})})]})}var ut={xs:{padding:`pe-7`,iconSize:12,clearRight:`end-5`,caretRight:`end-1`},sm:{padding:`pe-9`,iconSize:14,clearRight:`end-6`,caretRight:`end-1.5`},base:{padding:`pe-12`,iconSize:16,clearRight:`end-8`,caretRight:`end-2`},lg:{padding:`pe-14`,iconSize:18,clearRight:`end-9`,caretRight:`end-3`}};function dt({clearLabel:e=`Clear selection`,showOptionsLabel:n=`Show options`,...r}){let{size:i,hasError:a}=(0,Y.useContext)($),o=ut[i];return(0,Q.jsxs)(`div`,{className:t(`relative inline-block w-full`,`has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50`,r.className),children:[(0,Q.jsx)(J,{...r,className:t(B({size:i,variant:a?`error`:`default`}),`w-full`,o.padding,`disabled:cursor-not-allowed`)}),(0,Q.jsx)(He,{"data-kumo-component":`Combobox`,"data-kumo-part":`clear`,"aria-label":e,className:t(`absolute top-1/2 flex -translate-y-1/2 cursor-pointer bg-transparent p-0`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-0`,o.clearRight),children:(0,Q.jsx)(ze,{size:o.iconSize})}),(0,Q.jsx)(X,{"data-kumo-component":`Combobox`,"data-kumo-part":`trigger`,"aria-label":n,className:t(`absolute top-1/2 flex -translate-y-1/2 cursor-pointer items-center justify-center text-kumo-subtle`,`m-0 bg-transparent p-0`,o.caretRight),children:(0,Q.jsx)(Z,{className:`flex items-center`,children:(0,Q.jsx)(L,{size:o.iconSize,className:`fill-current`})})})]})}function ft({children:e,className:n,...r}){return(0,Q.jsxs)(Te,{"data-kumo-component":`Combobox`,"data-kumo-part":`item`,...r,className:t(`group mx-1.5 grid grid-cols-[1fr_16px] gap-2 rounded px-2 py-1.5 text-base`,`cursor-pointer data-highlighted:bg-kumo-tint`,`data-[disabled]:cursor-not-allowed data-[disabled]:text-kumo-subtle data-[disabled]:opacity-60 data-[disabled]:data-highlighted:bg-transparent`,n),children:[(0,Q.jsx)(`div`,{className:`col-start-1`,children:e}),(0,Q.jsx)(Ke,{className:`col-start-2 flex items-center`,children:(0,Q.jsx)(R,{})})]})}function pt(e){return(0,Q.jsx)(we,{...e,className:t(`mx-1.5 shrink-0 px-4 py-2 text-[0.925rem] leading-4 text-kumo-subtle empty:m-0 empty:p-0`),children:e.children??`No labels found.`})}function mt(e){return(0,Q.jsx)(J,{...e,className:t(B(),`mx-0 -mt-1.5 w-full shrink-0 rounded-b-none first:mb-2`,e.className)})}function ht({className:e,...n}){return(0,Q.jsx)(Me,{...n,className:t(`min-h-0 flex-1 scroll-pt-2 scroll-pb-2 overflow-y-auto overscroll-contain`,e)})}function gt(e){return(0,Q.jsx)(Oe,{...e,className:t(`mx-1.5 px-2 py-1.5 text-sm text-kumo-subtle`,e.className)})}function _t(e){return(0,Q.jsx)(ve,{...e,className:`mt-2 border-t border-kumo-hairline pt-2 first:mt-0 first:border-t-0 first:pt-0`})}function vt({removeLabel:e=`Remove`,...n}){return(0,Q.jsxs)(Ze,{...n,className:t(`flex items-center gap-2.5`,`h-6 pe-[3px] ps-2`,`rounded-sm ring-1 ring-kumo-hairline`,`bg-kumo-overlay`,`text-sm`),children:[n.children,(0,Q.jsx)(Qe,{"data-kumo-component":`Combobox`,"data-kumo-part":`chip-remove`,"aria-label":e,className:t(`cursor-pointer rounded-md p-1 hover:bg-kumo-fill-hover`,`flex bg-transparent`),children:(0,Q.jsx)(ze,{size:10})})]})}var yt={xs:`min-h-5`,sm:`min-h-6.5`,base:`min-h-9`,lg:`min-h-10`};function bt({placeholder:e,renderItem:n,className:r,inputSide:i=`right`,value:a}){let{size:o,hasError:s}=(0,Y.useContext)($),c=a,l=t=>(0,Q.jsx)(J,{placeholder:e,className:t});return(0,Q.jsxs)(Je,{className:t(B({size:o,variant:s?`error`:`default`}),`flex flex-col`,`gap-1 px-1.5 py-1`,yt[o],`h-auto`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,r),children:[i===`top`&&l(`w-full border-0 bg-inherit px-2 py-1`),(0,Q.jsxs)(`div`,{className:`flex flex-1 flex-wrap items-center gap-1.5`,children:[c!==void 0&&c.length>0&&c.map(e=>n(e)),(0,Q.jsx)(Ge,{children:e=>c===void 0?(0,Q.jsx)(Y.Fragment,{children:e.map(e=>n(e))}):null}),i===`right`&&l(`min-w-[100px] flex-1 border-0 bg-inherit px-2 py-1`)]})]})}ot.displayName=`Combobox.Root`,st.displayName=`Combobox.Content`,lt.displayName=`Combobox.TriggerValue`,dt.displayName=`Combobox.TriggerInput`,ft.displayName=`Combobox.Item`,vt.displayName=`Combobox.Chip`,bt.displayName=`Combobox.TriggerMultipleWithInput`;var xt=Object.assign(ot,{Content:st,TriggerValue:lt,TriggerInput:dt,TriggerMultipleWithInput:bt,Chip:vt,Item:ft,Input:mt,Empty:pt,GroupLabel:gt,Group:_t,List:ht,Collection:Ae,Trigger:X,Value:Ge,Icon:Z,useFilter:Ne,createItems:$e});export{rt as i,at as n,nt as r,xt as t};
|
|
2
|
+
//# sourceMappingURL=combobox-hdxtsm2gqcxxgfju-BL58YHDj.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./vendor-styling-da1xibnxfkjmtglr-f72JA6U4.js";import{i as n,r}from"./react-iRJfyluG.js";import{t as i}from"./button-pa1bq9b85hawg41a-CTLAwRb5.js";import{m as a}from"./skeleton-line-m9dyh126t9k07jvg-Cif2vjvo.js";import{n as o}from"./Copy.es-DUeQTRuS.js";import{t as s}from"./WarningCircle.es-Cy3I_TDN.js";import{t as c}from"./banner-msnmqm7of2lck01x-FNnkpRbE.js";import{t as l}from"./input-c8lv9ulv0kortliq-D4CKBAlm.js";import{i as u,n as d,r as f,t as p}from"./dialog-glpnivujociqs9lh-RRpeKfY_.js";import{i as m,n as h}from"./i18n-Dpznm8tI.js";import{t as g}from"./api-errors-DLxbD7fm.js";import{dt as _}from"./index-
|
|
2
|
-
//# sourceMappingURL=deleteLabels-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./vendor-styling-da1xibnxfkjmtglr-f72JA6U4.js";import{i as n,r}from"./react-iRJfyluG.js";import{t as i}from"./button-pa1bq9b85hawg41a-CTLAwRb5.js";import{m as a}from"./skeleton-line-m9dyh126t9k07jvg-Cif2vjvo.js";import{n as o}from"./Copy.es-DUeQTRuS.js";import{t as s}from"./WarningCircle.es-Cy3I_TDN.js";import{t as c}from"./banner-msnmqm7of2lck01x-FNnkpRbE.js";import{t as l}from"./input-c8lv9ulv0kortliq-D4CKBAlm.js";import{i as u,n as d,r as f,t as p}from"./dialog-glpnivujociqs9lh-RRpeKfY_.js";import{i as m,n as h}from"./i18n-Dpznm8tI.js";import{t as g}from"./api-errors-DLxbD7fm.js";import{dt as _}from"./index-B9v-eWBt.js";var v=e(n(),1),y=r(),b={size:`base`};function x({open:e,onOpenChange:n,labels:r,resourceName:m,onDelete:h,isDeleting:g=!1,caseSensitive:x=!0,size:w=b.size,errorMessage:T,notice:E,deleteDisabled:D=!1,className:O}){let[k,A]=(0,v.useState)(``),[j,M]=(0,v.useState)(!1);(0,v.useEffect)(()=>{e||(A(``),M(!1))},[e]);let N=(0,v.useCallback)(e=>x?e:e.toLowerCase(),[x]),P=N(k)===N(m),F=(0,v.useCallback)(async()=>{!P||g||D||await h()},[P,g,D,h]),I=(0,v.useCallback)(async()=>{await navigator.clipboard.writeText(m),M(!0),setTimeout(()=>M(!1),1500)},[m]);return(0,y.jsx)(f,{open:e,onOpenChange:n,children:(0,y.jsxs)(p,{size:w,className:t(`p-0`,O),children:[(0,y.jsxs)(`div`,{className:`flex items-center justify-between border-b border-kumo-line px-6 py-4`,children:[(0,y.jsx)(u,{className:`text-lg font-semibold`,children:S(r.title,m)}),(0,y.jsx)(d,{render:e=>(0,y.jsx)(i,{...e,variant:`ghost`,shape:`square`,size:`sm`,"aria-label":r.close,disabled:g,children:(0,y.jsx)(_,{size:18})})})]}),(0,y.jsxs)(`div`,{className:`flex flex-col gap-4 p-6`,children:[(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[T&&(0,y.jsx)(c,{icon:(0,y.jsx)(s,{}),variant:`error`,children:T}),(0,y.jsx)(`p`,{className:`max-w-prose text-base text-pretty text-kumo-subtle`,children:C(r.warning,(0,y.jsx)(`span`,{className:`font-medium text-kumo-default`,children:m}))}),E]}),(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,y.jsx)(`div`,{className:`flex items-center gap-1.5 text-base`,children:(0,y.jsx)(`span`,{children:C(r.typeToConfirm,(0,y.jsxs)(`button`,{className:`group inline rounded-md bg-kumo-tint px-2 py-1 font-mono text-sm font-semibold hover:cursor-pointer hover:bg-kumo-fill`,onClick:I,"aria-label":S(r.copy,m),children:[m,j?(0,y.jsx)(a,{size:12,weight:`bold`,className:`ms-1.5 inline`}):(0,y.jsx)(o,{size:12,weight:`bold`,className:`ms-1.5 inline text-kumo-subtle group-hover:text-kumo-default`})]}))})}),(0,y.jsx)(l,{placeholder:m,value:k,onChange:e=>A(e.target.value),disabled:g,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:!1,"aria-label":S(r.confirmInput,m),className:`w-full`})]})]}),(0,y.jsxs)(`div`,{className:`flex justify-end gap-3 border-t border-kumo-line px-6 py-4`,children:[(0,y.jsx)(d,{render:e=>(0,y.jsx)(i,{...e,variant:`secondary`,disabled:g,children:r.cancel})}),(0,y.jsx)(i,{variant:`destructive`,onClick:F,disabled:!P||g||D,loading:g,children:r.delete})]})]})})}x.displayName=`DeleteResource`;var S=(e,t)=>e.replaceAll(`{name}`,t);function C(e,t){let[n,...r]=e.split(`{name}`);return r.length===0?e:(0,y.jsxs)(y.Fragment,{children:[n,t,r.join(``)]})}function w(e,t,n={}){let r=t.toLocaleLowerCase(h()),i={title:e(`common.deleteResource.title`,m(`name`)),warning:e(`common.deleteResource.warning`,{type:r,...m(`name`)}),typeToConfirm:e(`common.deleteResource.typeToConfirm`,m(`name`)),copy:e(`common.deleteResource.copy`,m(`name`)),confirmInput:e(`common.deleteResource.confirmInput`,m(`name`)),close:e(`common.close`),cancel:e(`common.cancel`),delete:n.action??e(`common.deleteResource.delete`,{type:r})};return n.error?{labels:i,errorMessage:g(e,n.error)}:{labels:i}}export{x as n,w as t};
|
|
2
|
+
//# sourceMappingURL=deleteLabels-C6_mnHMW.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SourceEditor-W-oKqiEa.js","assets/rolldown-runtime-XKyaHtl9.js","assets/react-iRJfyluG.js","assets/w3c-keyname-BOAvb0qz.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./vendor-styling-da1xibnxfkjmtglr-f72JA6U4.js";import{i as n,n as r,r as i}from"./react-iRJfyluG.js";import{t as a}from"./badge-dq8bx752b9dp7dst-BSe3ItaV.js";import{t as o}from"./button-pa1bq9b85hawg41a-CTLAwRb5.js";import{C as s,w as c}from"./tanstack-8GMTaj0M.js";import{t as l}from"./ArrowClockwise.es-CBDiTqBo.js";import{t as u}from"./ArrowCounterClockwise.es-DTfZr_jW.js";import{t as d}from"./blockIcon-DoQ1yAO_.js";import{t as f}from"./Image.es-hbodihZN.js";import{t as p}from"./LinkSimple.es-Bmke3KUE.js";import{t as m}from"./ListBullets.es-BRt_pQYZ.js";import{n as h}from"./checkbox-lbo436duy7krxcsk-CY7ZGWjv.js";import{t as g}from"./PencilSimple.es-Op-nnaqy.js";import{t as _}from"./Quotes.es-DyaHmUO_.js";import{t as v}from"./SlidersHorizontal.es-DU9pP_oN.js";import{t as y}from"./Sparkle.es-CFKD1Frb.js";import{t as b}from"./Table.es-CPWQPhl7.js";import{t as x}from"./IconBase.es-BXBadb8L.js";import{t as S}from"./input-c8lv9ulv0kortliq-D4CKBAlm.js";import{t as C}from"./input-h5ox92gf13ge04hp-C3iQI8nS.js";import{t as w}from"./text-f1wxz183ckq7qtl7-CzhbVjnY.js";import{t as T}from"./toolbar-h213d8e22yjh5cwq-CxGgBLh5.js";import{t as E}from"./switch-cqsvolm7h69z7vgg-JsWPiKhH.js";import{t as ee}from"./tabs-gf57qqf1wcclaejq-DZt0FNBy.js";import{t as te}from"./preload-helper-BLdHbfdN.js";import{a as ne,s as D}from"./blocks-DaRWgHXb.js";import{t as re}from"./InsetPanel-BCDyegfj.js";import{t as ie}from"./BlockPropsForm--Eo9cpDv.js";import{t as ae}from"./marked.esm-CO-4B_gx.js";import{c as oe,i as se,l as ce,o as le,r as ue,s as de}from"./body-blocks-BvozTe2C.js";import{u as fe}from"./names-DtgvAZkI.js";import{ct as pe}from"./index-jx_2-Qkj.js";import{n as me,t as he}from"./w3c-keyname-BOAvb0qz.js";var O=e(n(),1),ge=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M140,104V64a12,12,0,0,1,24,0V75l35.51-35.52a12,12,0,0,1,17,17L181,92h11a12,12,0,0,1,0,24H152A12,12,0,0,1,140,104Zm-36,36H64a12,12,0,0,0,0,24H75L39.51,199.51a12,12,0,0,0,17,17L92,181v11a12,12,0,0,0,24,0V152A12,12,0,0,0,104,140Zm77,24h11a12,12,0,0,0,0-24H152a12,12,0,0,0-12,12v40a12,12,0,0,0,24,0V181l35.51,35.52a12,12,0,0,0,17-17ZM104,52A12,12,0,0,0,92,64V75L56.49,39.51a12,12,0,0,0-17,17L75,92H64a12,12,0,0,0,0,24h40a12,12,0,0,0,12-12V64A12,12,0,0,0,104,52Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M144,104V64a8,8,0,0,1,13.66-5.66L172,72.69l30.34-30.35a8,8,0,0,1,11.32,11.32L183.31,84l14.35,14.34A8,8,0,0,1,192,112H152A8,8,0,0,1,144,104Zm-40,40H64a8,8,0,0,0-5.66,13.66L72.69,172,42.34,202.34a8,8,0,0,0,11.32,11.32L84,183.31l14.34,14.35A8,8,0,0,0,112,192V152A8,8,0,0,0,104,144Zm3.06-87.39a8,8,0,0,0-8.72,1.73L84,72.69,53.66,42.34A8,8,0,0,0,42.34,53.66L72.69,84,58.34,98.34A8,8,0,0,0,64,112h40a8,8,0,0,0,8-8V64A8,8,0,0,0,107.06,56.61ZM183.31,172l14.35-14.34A8,8,0,0,0,192,144H152a8,8,0,0,0-8,8v40a8,8,0,0,0,13.66,5.66L172,183.31l30.34,30.35a8,8,0,0,0,11.32-11.32Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M144,104V64a8,8,0,0,1,16,0V84.69l42.34-42.35a8,8,0,0,1,11.32,11.32L171.31,96H192a8,8,0,0,1,0,16H152A8,8,0,0,1,144,104Zm-40,40H64a8,8,0,0,0,0,16H84.69L42.34,202.34a8,8,0,0,0,11.32,11.32L96,171.31V192a8,8,0,0,0,16,0V152A8,8,0,0,0,104,144Zm67.31,16H192a8,8,0,0,0,0-16H152a8,8,0,0,0-8,8v40a8,8,0,0,0,16,0V171.31l42.34,42.35a8,8,0,0,0,11.32-11.32ZM104,56a8,8,0,0,0-8,8V84.69L53.66,42.34A8,8,0,0,0,42.34,53.66L84.69,96H64a8,8,0,0,0,0,16h40a8,8,0,0,0,8-8V64A8,8,0,0,0,104,56Z`}))]]),_e=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M220,48V96a12,12,0,0,1-24,0V77l-35.51,35.52a12,12,0,0,1-17-17L179,60H160a12,12,0,0,1,0-24h48A12,12,0,0,1,220,48ZM95.51,143.51,60,179V160a12,12,0,0,0-24,0v48a12,12,0,0,0,12,12H96a12,12,0,0,0,0-24H77l35.52-35.51a12,12,0,0,0-17-17ZM208,148a12,12,0,0,0-12,12v19l-35.51-35.52a12,12,0,0,0-17,17L179,196H160a12,12,0,0,0,0,24h48a12,12,0,0,0,12-12V160A12,12,0,0,0,208,148ZM77,60H96a12,12,0,0,0,0-24H48A12,12,0,0,0,36,48V96a12,12,0,0,0,24,0V77l35.51,35.52a12,12,0,0,0,17-17Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M109.66,146.34a8,8,0,0,1,0,11.32L83.31,184l18.35,18.34A8,8,0,0,1,96,216H48a8,8,0,0,1-8-8V160a8,8,0,0,1,13.66-5.66L72,172.69l26.34-26.35A8,8,0,0,1,109.66,146.34ZM83.31,72l18.35-18.34A8,8,0,0,0,96,40H48a8,8,0,0,0-8,8V96a8,8,0,0,0,13.66,5.66L72,83.31l26.34,26.35a8,8,0,0,0,11.32-11.32ZM208,40H160a8,8,0,0,0-5.66,13.66L172.69,72,146.34,98.34a8,8,0,0,0,11.32,11.32L184,83.31l18.34,18.35A8,8,0,0,0,216,96V48A8,8,0,0,0,208,40Zm3.06,112.61a8,8,0,0,0-8.72,1.73L184,172.69l-26.34-26.35a8,8,0,0,0-11.32,11.32L172.69,184l-18.35,18.34A8,8,0,0,0,160,216h48a8,8,0,0,0,8-8V160A8,8,0,0,0,211.06,152.61Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-42.34,42.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM98.34,146.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l42.35-42.34a8,8,0,0,0-11.32-11.32ZM208,152a8,8,0,0,0-8,8v28.69l-42.34-42.35a8,8,0,0,0-11.32,11.32L188.69,200H160a8,8,0,0,0,0,16h48a8,8,0,0,0,8-8V160A8,8,0,0,0,208,152ZM67.31,56H96a8,8,0,0,0,0-16H48a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31l42.34,42.35a8,8,0,0,0,11.32-11.32Z`}))]]),ve=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M51.51,104.49l-32-32a12,12,0,0,1,0-17l32-32a12,12,0,1,1,17,17L45,64,68.49,87.51a12,12,0,0,1-17,17Zm48,0a12,12,0,0,0,17,0l32-32a12,12,0,0,0,0-17l-32-32a12,12,0,1,0-17,17L123,64,99.51,87.51A12,12,0,0,0,99.51,104.49ZM200,36H180a12,12,0,0,0,0,24h16V196H60V140a12,12,0,0,0-24,0v60a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M200,40H168a16,16,0,0,0-16-16H32A16,16,0,0,0,16,40v80a16,16,0,0,0,16,16h8v64a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40ZM106.34,61.66a8,8,0,0,1,11.32-11.32l24,24a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L124.69,80Zm-64,24a8,8,0,0,1,0-11.32l24-24A8,8,0,0,1,77.66,61.66L59.31,80,77.66,98.34a8,8,0,0,1-11.32,11.32ZM200,200H56V136h96a16,16,0,0,0,16-16V56h32Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M58.34,101.66l-32-32a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,69.66,37.66L43.31,64,69.66,90.34a8,8,0,0,1-11.32,11.32Zm40,0a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0,0-11.32l-32-32A8,8,0,0,0,98.34,37.66L124.69,64,98.34,90.34A8,8,0,0,0,98.34,101.66ZM200,40H176a8,8,0,0,0,0,16h24V200H56V136a8,8,0,0,0-16,0v64a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Z`}))]]),ye=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M71.68,97.22,34.74,128l36.94,30.78a12,12,0,1,1-15.36,18.44l-48-40a12,12,0,0,1,0-18.44l48-40A12,12,0,0,1,71.68,97.22Zm176,21.56-48-40a12,12,0,1,0-15.36,18.44L221.26,128l-36.94,30.78a12,12,0,1,0,15.36,18.44l48-40a12,12,0,0,0,0-18.44ZM164.1,28.72a12,12,0,0,0-15.38,7.18l-64,176a12,12,0,0,0,7.18,15.37A11.79,11.79,0,0,0,96,228a12,12,0,0,0,11.28-7.9l64-176A12,12,0,0,0,164.1,28.72Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM92.8,145.6a8,8,0,1,1-9.6,12.8l-32-24a8,8,0,0,1,0-12.8l32-24a8,8,0,0,1,9.6,12.8L69.33,128Zm58.89-71.4-32,112a8,8,0,1,1-15.38-4.4l32-112a8,8,0,0,1,15.38,4.4Zm53.11,60.2-32,24a8,8,0,0,1-9.6-12.8L186.67,128,163.2,110.4a8,8,0,1,1,9.6-12.8l32,24a8,8,0,0,1,0,12.8Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M69.12,94.15,28.5,128l40.62,33.85a8,8,0,1,1-10.24,12.29l-48-40a8,8,0,0,1,0-12.29l48-40a8,8,0,0,1,10.24,12.3Zm176,27.7-48-40a8,8,0,1,0-10.24,12.3L227.5,128l-40.62,33.85a8,8,0,1,0,10.24,12.29l48-40a8,8,0,0,0,0-12.29ZM162.73,32.48a8,8,0,0,0-10.25,4.79l-64,176a8,8,0,0,0,4.79,10.26A8.14,8.14,0,0,0,96,224a8,8,0,0,0,7.52-5.27l64-176A8,8,0,0,0,162.73,32.48Z`}))]]),be=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H128a12,12,0,0,1,0-24h88A12,12,0,0,1,228,128ZM128,76h88a12,12,0,0,0,0-24H128a12,12,0,0,0,0,24Zm88,104H128a12,12,0,0,0,0,24h88a12,12,0,0,0,0-24ZM79.51,39.51,56,63l-7.51-7.52a12,12,0,0,0-17,17l16,16a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17Zm0,64L56,127l-7.51-7.52a12,12,0,1,0-17,17l16,16a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17Zm0,64L56,191l-7.51-7.52a12,12,0,1,0-17,17l16,16a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM117.66,149.66l-32,32a8,8,0,0,1-11.32,0l-16-16a8,8,0,0,1,11.32-11.32L80,164.69l26.34-26.35a8,8,0,0,1,11.32,11.32Zm0-64-32,32a8,8,0,0,1-11.32,0l-16-16A8,8,0,0,1,69.66,90.34L80,100.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM192,168H144a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm0-64H144a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128ZM128,72h88a8,8,0,0,0,0-16H128a8,8,0,0,0,0,16Zm88,112H128a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16ZM82.34,42.34,56,68.69,45.66,58.34A8,8,0,0,0,34.34,69.66l16,16a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,82.34,42.34Zm0,64L56,132.69,45.66,122.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm0,64L56,196.69,45.66,186.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z`}))]]),xe=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M84,64A12,12,0,0,1,96,52H216a12,12,0,0,1,0,24H96A12,12,0,0,1,84,64Zm132,52H96a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Zm0,64H96a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24ZM56,52H40a12,12,0,0,0,0,24H56a12,12,0,0,0,0-24Zm0,64H40a12,12,0,0,0,0,24H56a12,12,0,0,0,0-24Zm0,64H40a12,12,0,0,0,0,24H56a12,12,0,0,0,0-24Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,184H64a8,8,0,0,1,0-16h8a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16h8a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16h8a8,8,0,0,1,0,16Zm120,96H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Zm0-48H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Zm0-48H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M88,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H96A8,8,0,0,1,88,64Zm128,56H96a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Zm0,64H96a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16ZM56,56H40a8,8,0,0,0,0,16H56a8,8,0,0,0,0-16Zm0,64H40a8,8,0,0,0,0,16H56a8,8,0,0,0,0-16Zm0,64H40a8,8,0,0,0,0,16H56a8,8,0,0,0,0-16Z`}))]]),Se=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H116a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM116,76H216a12,12,0,0,0,0-24H116a12,12,0,0,0,0,24ZM216,180H116a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24ZM44,59.31V104a12,12,0,0,0,24,0V40A12,12,0,0,0,50.64,29.27l-16,8a12,12,0,0,0,9.36,22Zm39.73,96.86a27.7,27.7,0,0,0-11.2-18.63A28.89,28.89,0,0,0,32.9,143a27.71,27.71,0,0,0-4.17,7.54,12,12,0,0,0,22.55,8.21,4,4,0,0,1,.58-1,4.78,4.78,0,0,1,6.5-.82,3.82,3.82,0,0,1,1.61,2.6,3.63,3.63,0,0,1-.77,2.77l-.13.17L30.39,200.82A12,12,0,0,0,40,220H72a12,12,0,0,0,0-24H64l14.28-19.11A27.48,27.48,0,0,0,83.73,156.17Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM56.84,75.58a8,8,0,0,1,3.58-10.74l16-8A8,8,0,0,1,88,64v48a8,8,0,0,1-16,0V76.94l-4.42,2.22A8,8,0,0,1,56.84,75.58ZM92,180a8,8,0,0,1,0,16H68a8,8,0,0,1-6.4-12.8l21.67-28.89A3.92,3.92,0,0,0,84,152a4,4,0,0,0-7.77-1.33,8,8,0,0,1-15.09-5.34,20,20,0,1,1,35,18.53L84,180Zm100,4H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Zm0-48H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Zm0-48H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H104a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM104,72H216a8,8,0,0,0,0-16H104a8,8,0,0,0,0,16ZM216,184H104a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16ZM43.58,55.16,48,52.94V104a8,8,0,0,0,16,0V40a8,8,0,0,0-11.58-7.16l-16,8a8,8,0,0,0,7.16,14.32ZM79.77,156.72a23.73,23.73,0,0,0-9.6-15.95,24.86,24.86,0,0,0-34.11,4.7,23.63,23.63,0,0,0-3.57,6.46,8,8,0,1,0,15,5.47,7.84,7.84,0,0,1,1.18-2.13,8.76,8.76,0,0,1,12-1.59A7.91,7.91,0,0,1,63.93,159a7.64,7.64,0,0,1-1.57,5.78,1,1,0,0,0-.08.11L33.59,203.21A8,8,0,0,0,40,216H72a8,8,0,0,0,0-16H56l19.08-25.53A23.47,23.47,0,0,0,79.77,156.72Z`}))]]),Ce=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M185.08,114.46A48,48,0,0,0,148,36H80A12,12,0,0,0,68,48V200a12,12,0,0,0,12,12h80a52,52,0,0,0,25.08-97.54ZM92,60h56a24,24,0,0,1,0,48H92Zm68,128H92V132h68a28,28,0,0,1,0,56Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M168,156a20,20,0,0,1-20,20H96V136h52A20,20,0,0,1,168,156ZM224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48ZM184,156a36,36,0,0,0-18-31.15A36,36,0,0,0,140,64H88a8,8,0,0,0-8,8V184a8,8,0,0,0,8,8h60A36,36,0,0,0,184,156Zm-24-56a20,20,0,0,0-20-20H96v40h44A20,20,0,0,0,160,100Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M178.48,115.7A44,44,0,0,0,148,40H80a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8h80a48,48,0,0,0,18.48-92.3ZM88,56h60a28,28,0,0,1,0,56H88Zm72,136H88V128h72a32,32,0,0,1,0,64Z`}))]]),we=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M252,180a40,40,0,0,1-68.57,28,12,12,0,1,1,17.14-16.79A16,16,0,1,0,212,164a12,12,0,0,1-9.83-18.88L217,124H192a12,12,0,0,1,0-24h48a12,12,0,0,1,9.83,18.88l-18.34,26.2A40,40,0,0,1,252,180ZM144,44a12,12,0,0,0-12,12v48H52V56a12,12,0,0,0-24,0V176a12,12,0,0,0,24,0V128h80v48a12,12,0,0,0,24,0V56A12,12,0,0,0,144,44Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM128,160a8,8,0,0,1-16,0V128H72v32a8,8,0,0,1-16,0V80a8,8,0,0,1,16,0v32h40V80a8,8,0,0,1,16,0Zm40,24a32,32,0,0,1-21.34-8.15,8,8,0,1,1,10.68-11.92A16,16,0,1,0,168,136a8,8,0,0,1-6.4-12.8L176,104H152a8,8,0,0,1,0-16h40a8,8,0,0,1,6.4,12.8l-16.71,22.28A32,32,0,0,1,168,184Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M152,56V176a8,8,0,0,1-16,0V124H48v52a8,8,0,0,1-16,0V56a8,8,0,0,1,16,0v52h88V56a8,8,0,0,1,16,0Zm73.52,90.63,21-30A8,8,0,0,0,240,104H192a8,8,0,0,0,0,16h32.63l-19.18,27.41A8,8,0,0,0,212,160a20,20,0,1,1-14.29,34,8,8,0,1,0-11.42,11.19A36,36,0,0,0,248,180,36.07,36.07,0,0,0,225.52,146.63Z`}))]]),Te=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M156,56V176a12,12,0,0,1-24,0V128H52v48a12,12,0,0,1-24,0V56a12,12,0,0,1,24,0v48h80V56a12,12,0,0,1,24,0Zm84,140H216l28.74-38.33A36,36,0,1,0,182.05,124a12,12,0,0,0,22.63,8,11.67,11.67,0,0,1,1.73-3.22,12,12,0,1,1,19.15,14.46L182.4,200.8A12,12,0,0,0,192,220h48a12,12,0,0,0,0-24Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM128,160a8,8,0,0,1-16,0V128H72v32a8,8,0,0,1-16,0V80a8,8,0,0,1,16,0v32h40V80a8,8,0,0,1,16,0Zm64,24H152a8,8,0,0,1-6.4-12.8l36-48a12,12,0,1,0-19.15-14.46,13.06,13.06,0,0,0-2.58,4.81,8,8,0,1,1-15.68-3.18,28.17,28.17,0,1,1,50.2,22.44L168,168h24a8,8,0,0,1,0,16Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M152,56V176a8,8,0,0,1-16,0V124H48v52a8,8,0,0,1-16,0V56a8,8,0,0,1,16,0v52h88V56a8,8,0,0,1,16,0Zm88,144H208l33.55-44.74a32,32,0,1,0-55.73-29.93,8,8,0,1,0,15.08,5.34,16.28,16.28,0,0,1,2.32-4.3,16,16,0,1,1,25.54,19.27L185.6,203.2A8,8,0,0,0,192,216h48a8,8,0,0,0,0-16Z`}))]]),Ee=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M204,56a12,12,0,0,1-12,12H160.65l-40,120H144a12,12,0,0,1,0,24H64a12,12,0,0,1,0-24H95.35l40-120H112a12,12,0,0,1,0-24h80A12,12,0,0,1,204,56Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM176,80H153.64l-34.29,96H136a8,8,0,0,1,0,16H80a8,8,0,0,1,0-16h22.36l34.29-96H120a8,8,0,0,1,0-16h56a8,8,0,0,1,0,16Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M200,56a8,8,0,0,1-8,8H157.77L115.1,192H144a8,8,0,0,1,0,16H64a8,8,0,0,1,0-16H98.23L140.9,64H112a8,8,0,0,1,0-16h80A8,8,0,0,1,200,56Z`}))]]),De=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H185.86A41.48,41.48,0,0,1,196,168c0,14.45-7.81,28.32-21.43,38.05C162,215.05,145.44,220,128,220s-34-4.95-46.57-13.95C67.81,196.32,60,182.45,60,168a12,12,0,0,1,24,0c0,15.18,20.15,28,44,28s44-12.82,44-28c0-12.76-9.3-20.18-35.35-28H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM75.11,100a12,12,0,0,0,12-12c0-16,17.58-28,40.89-28,17.36,0,31.37,6.65,37.48,17.78a12,12,0,0,0,21-11.56C176.13,47.3,154.25,36,128,36,91,36,63.11,58.35,63.11,88A12,12,0,0,0,75.11,100Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM82.71,94.58C86,76.57,104.58,64,128,64c18.2,0,33.59,7.41,41.18,19.83a8,8,0,1,1-13.66,8.34C150.94,84.66,140.39,80,128,80c-15.3,0-27.73,7.33-29.55,17.42A8,8,0,0,1,90.59,104a7.76,7.76,0,0,1-1.43-.13A8,8,0,0,1,82.71,94.58ZM192,136H168.29A28.45,28.45,0,0,1,176,156c0,20.19-21.08,36-48,36-23.89,0-43.83-12.78-47.43-30.4a8,8,0,1,1,15.67-3.2c2,9.87,16,17.6,31.76,17.6,17.35,0,32-9.16,32-20,0-9.14-6.76-14.43-25.72-20H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H175.93c9.19,7.11,16.07,17.2,16.07,32,0,13.34-7,25.7-19.75,34.79C160.33,211.31,144.61,216,128,216s-32.33-4.69-44.25-13.21C71,193.7,64,181.34,64,168a8,8,0,0,1,16,0c0,17.35,22,32,48,32s48-14.65,48-32c0-14.85-10.54-23.58-38.77-32H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM76.33,104a8,8,0,0,0,7.61-10.49A17.3,17.3,0,0,1,83.11,88c0-18.24,19.3-32,44.89-32,18.84,0,34.16,7.42,41,19.85a8,8,0,0,0,14-7.7C173.33,50.52,152.77,40,128,40,93.29,40,67.11,60.63,67.11,88a33.73,33.73,0,0,0,1.62,10.49A8,8,0,0,0,76.33,104Z`}))]]),Oe=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M212,56V88a12,12,0,0,1-24,0V68H140V188h20a12,12,0,0,1,0,24H96a12,12,0,0,1,0-24h20V68H68V88a12,12,0,0,1-24,0V56A12,12,0,0,1,56,44H200A12,12,0,0,1,212,56Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,96a8,8,0,0,1-16,0V88H136v88h12a8,8,0,0,1,0,16H108a8,8,0,0,1,0-16h12V88H88v8a8,8,0,0,1-16,0V80a8,8,0,0,1,8-8h96a8,8,0,0,1,8,8Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,56V88a8,8,0,0,1-16,0V64H136V192h24a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16h24V64H64V88a8,8,0,0,1-16,0V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z`}))]]),ke=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:ge}));ke.displayName=`ArrowsInIcon`;var Ae=ke,je=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:_e}));je.displayName=`ArrowsOutIcon`;var Me=je,Ne=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:ve}));Ne.displayName=`CodeBlockIcon`;var Pe=Ne,Fe=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:ye}));Fe.displayName=`CodeIcon`;var Ie=Fe,Le=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:be}));Le.displayName=`ListChecksIcon`;var Re=Le,ze=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:xe}));ze.displayName=`ListDashesIcon`;var Be=ze,Ve=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:Se}));Ve.displayName=`ListNumbersIcon`;var He=Ve,Ue=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:Ce}));Ue.displayName=`TextBIcon`;var We=Ue,Ge=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:we}));Ge.displayName=`TextHThreeIcon`;var Ke=Ge,qe=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:Te}));qe.displayName=`TextHTwoIcon`;var Je=qe,Ye=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:Ee}));Ye.displayName=`TextItalicIcon`;var Xe=Ye,Ze=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:De}));Ze.displayName=`TextStrikethroughIcon`;var Qe=Ze,$e=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:Oe}));$e.displayName=`TextTIcon`;var et=$e,tt=Object.defineProperty,nt=(e,t)=>{let n={};for(var r in e)tt(n,r,{get:e[r],enumerable:!0});return t||tt(n,Symbol.toStringTag,{value:`Module`}),n},k=i(),rt=e(r(),1),it=c(),at=s();function ot(e){this.content=e}ot.prototype={constructor:ot,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new ot(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new ot(n)},addToStart:function(e,t){return new ot([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new ot(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new ot(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=ot.from(e),e.size?new ot(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=ot.from(e),e.size?new ot(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=ot.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},ot.from=function(e){if(e instanceof ot)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new ot(t)};function st(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a)n+=i.nodeSize;else{if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){let e=i.text,t=a.text,r=0;for(;e[r]==t[r];r++)n++;return r&&r<e.length&&r<t.length&&ut(e.charCodeAt(r-1))&<(e.charCodeAt(r))&&n--,n}if(i.content.size||a.content.size){let e=st(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}}function ct(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s)n-=c,r-=c;else{if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=o.text,t=s.text,i=e.length,a=t.length;for(;i>0&&a>0&&e[i-1]==t[a-1];)i--,a--,n--,r--;return i&&a&&i<e.length&&ut(e.charCodeAt(i-1))&<(e.charCodeAt(i))&&(n++,r++),{a:n,b:r}}if(o.content.size||s.content.size){let e=ct(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}}function lt(e){return e>=56320&&e<57344}function ut(e){return e>=55296&&e<56320}var A=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return st(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return ct(this,e,t,n)}findIndex(e){if(e==0)return ft(0,e);if(e==this.size)return ft(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?ft(t+1,i):ft(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};A.empty=new A([],0);var dt={index:0,offset:0};function ft(e,t){return dt.index=e,dt.offset=t,dt}function pt(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!pt(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!pt(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var j=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else!n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&pt(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};j.none=[];var mt=class extends Error{},M=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=gt(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(ht(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(A.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};M.empty=new M(A.empty,0,0);function ht(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(ht(a.content,t-i-1,n-i-1)))}function gt(e,t,n,r,i,a){let{index:o,offset:s}=e.findIndex(t),c=e.maybeChild(o);if(s==t||c.isText)return a&&r<=0&&i<=0&&!a.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=gt(c.content,t-s-1,n,o==0?r-1:0,o==e.childCount-1?i-1:0,c);return l&&e.replaceChild(o,c.copy(l))}function _t(e,t,n){if(n.openStart>e.depth)throw new mt(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new mt(`Inconsistent open depths`);return vt(e,t,n,0)}function vt(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=vt(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}if(!n.content.size)return Ct(a,Tt(e,t,r));if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return Ct(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}{let{start:i,end:o}=Et(n,e);return Ct(a,wt(e,i,o,t,r))}}function yt(e,t){if(!t.type.compatibleContent(e.type))throw new mt(`Cannot join `+t.type.name+` onto `+e.type.name)}function bt(e,t,n){let r=e.node(n);return yt(r,t.node(n)),r}function xt(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function St(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(xt(e.nodeAfter,r),a++));for(let e=a;e<o;e++)xt(i.child(e),r);t&&t.depth==n&&t.textOffset&&xt(t.nodeBefore,r)}function Ct(e,t){if(!e.type.validContent(t))throw new mt(`Invalid content for node `+e.type.name);return e.copy(t)}function wt(e,t,n,r,i){let a=e.depth>i&&bt(e,t,i+1),o=r.depth>i&&bt(n,r,i+1),s=[];return St(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(yt(a,o),xt(Ct(a,wt(e,t,n,r,i+1)),s)):(a&&xt(Ct(a,Tt(e,t,i+1)),s),St(t,n,i,s),o&&xt(Ct(o,Tt(n,r,i+1)),s)),St(r,null,i,s),new A(s)}function Tt(e,t,n){let r=[];return St(null,e,n,r),e.depth>n&&xt(Ct(bt(e,t,n+1),Tt(e,t,n+1)),r),St(t,null,n,r),new A(r)}function Et(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(A.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var Dt=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return j.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive!==!1||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive!==!1||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new jt(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e=``;for(let t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=At.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else At.set(t,r=new Ot);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%kt,i}},Ot=class{constructor(){this.elts=[],this.i=0}},kt=12,At=new WeakMap,jt=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},Mt=Object.create(null),Nt=class e{constructor(e,t,n,r=j.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||A.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&pt(this.attrs,t||e.defaultAttrs||Mt)&&j.sameSet(this.marks,n||j.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return M.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new M(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return _t(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return Dt.resolveCached(this,e)}resolveNoCache(e){return Dt.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),Ft(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=A.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),It(this.type.attrs,this.attrs,`node`,this.type.name);let e=j.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];It(n.type.attrs,n.attrs,`mark`,n.type.name),e=n.addToSet(e)}if(!j.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=A.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};Nt.prototype.text=void 0;var Pt=class e extends Nt{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Ft(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function Ft(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}function It(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}var Lt=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Rt(t,n);if(r.next==null)return e.empty;let i=zt(r);r.next&&r.err(`Unexpected trailing text`);let a=Yt(Kt(i));return Xt(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return A.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];a.isLeaf||a.hasRequiredAttrs()||a.name in t||r.type&&!o.validEnd||(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
|
|
2
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./vendor-styling-da1xibnxfkjmtglr-f72JA6U4.js";import{i as n,n as r,r as i}from"./react-iRJfyluG.js";import{t as a}from"./badge-dq8bx752b9dp7dst-BSe3ItaV.js";import{t as o}from"./button-pa1bq9b85hawg41a-CTLAwRb5.js";import{C as s,w as c}from"./tanstack-8GMTaj0M.js";import{t as l}from"./ArrowClockwise.es-CBDiTqBo.js";import{t as u}from"./ArrowCounterClockwise.es-DTfZr_jW.js";import{t as d}from"./blockIcon-DoQ1yAO_.js";import{t as f}from"./Image.es-hbodihZN.js";import{t as p}from"./LinkSimple.es-Bmke3KUE.js";import{t as m}from"./ListBullets.es-BRt_pQYZ.js";import{n as h}from"./checkbox-lbo436duy7krxcsk-CY7ZGWjv.js";import{t as g}from"./PencilSimple.es-Op-nnaqy.js";import{t as _}from"./Quotes.es-DyaHmUO_.js";import{t as v}from"./SlidersHorizontal.es-DU9pP_oN.js";import{t as y}from"./Sparkle.es-CFKD1Frb.js";import{t as b}from"./Table.es-CPWQPhl7.js";import{t as x}from"./IconBase.es-BXBadb8L.js";import{t as S}from"./input-c8lv9ulv0kortliq-D4CKBAlm.js";import{t as C}from"./input-h5ox92gf13ge04hp-C3iQI8nS.js";import{t as w}from"./text-f1wxz183ckq7qtl7-CzhbVjnY.js";import{t as T}from"./toolbar-h213d8e22yjh5cwq-CxGgBLh5.js";import{t as E}from"./switch-cqsvolm7h69z7vgg-JsWPiKhH.js";import{t as ee}from"./tabs-gf57qqf1wcclaejq-DZt0FNBy.js";import{t as te}from"./preload-helper-BLdHbfdN.js";import{a as ne,s as D}from"./blocks-DaRWgHXb.js";import{t as re}from"./InsetPanel-BCDyegfj.js";import{t as ie}from"./BlockPropsForm--Eo9cpDv.js";import{t as ae}from"./marked.esm-CO-4B_gx.js";import{c as oe,i as se,l as ce,o as le,r as ue,s as de}from"./body-blocks-BvozTe2C.js";import{u as fe}from"./names-DtgvAZkI.js";import{ct as pe}from"./index-B9v-eWBt.js";import{n as me,t as he}from"./w3c-keyname-BOAvb0qz.js";var O=e(n(),1),ge=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M140,104V64a12,12,0,0,1,24,0V75l35.51-35.52a12,12,0,0,1,17,17L181,92h11a12,12,0,0,1,0,24H152A12,12,0,0,1,140,104Zm-36,36H64a12,12,0,0,0,0,24H75L39.51,199.51a12,12,0,0,0,17,17L92,181v11a12,12,0,0,0,24,0V152A12,12,0,0,0,104,140Zm77,24h11a12,12,0,0,0,0-24H152a12,12,0,0,0-12,12v40a12,12,0,0,0,24,0V181l35.51,35.52a12,12,0,0,0,17-17ZM104,52A12,12,0,0,0,92,64V75L56.49,39.51a12,12,0,0,0-17,17L75,92H64a12,12,0,0,0,0,24h40a12,12,0,0,0,12-12V64A12,12,0,0,0,104,52Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M144,104V64a8,8,0,0,1,13.66-5.66L172,72.69l30.34-30.35a8,8,0,0,1,11.32,11.32L183.31,84l14.35,14.34A8,8,0,0,1,192,112H152A8,8,0,0,1,144,104Zm-40,40H64a8,8,0,0,0-5.66,13.66L72.69,172,42.34,202.34a8,8,0,0,0,11.32,11.32L84,183.31l14.34,14.35A8,8,0,0,0,112,192V152A8,8,0,0,0,104,144Zm3.06-87.39a8,8,0,0,0-8.72,1.73L84,72.69,53.66,42.34A8,8,0,0,0,42.34,53.66L72.69,84,58.34,98.34A8,8,0,0,0,64,112h40a8,8,0,0,0,8-8V64A8,8,0,0,0,107.06,56.61ZM183.31,172l14.35-14.34A8,8,0,0,0,192,144H152a8,8,0,0,0-8,8v40a8,8,0,0,0,13.66,5.66L172,183.31l30.34,30.35a8,8,0,0,0,11.32-11.32Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M144,104V64a8,8,0,0,1,16,0V84.69l42.34-42.35a8,8,0,0,1,11.32,11.32L171.31,96H192a8,8,0,0,1,0,16H152A8,8,0,0,1,144,104Zm-40,40H64a8,8,0,0,0,0,16H84.69L42.34,202.34a8,8,0,0,0,11.32,11.32L96,171.31V192a8,8,0,0,0,16,0V152A8,8,0,0,0,104,144Zm67.31,16H192a8,8,0,0,0,0-16H152a8,8,0,0,0-8,8v40a8,8,0,0,0,16,0V171.31l42.34,42.35a8,8,0,0,0,11.32-11.32ZM104,56a8,8,0,0,0-8,8V84.69L53.66,42.34A8,8,0,0,0,42.34,53.66L84.69,96H64a8,8,0,0,0,0,16h40a8,8,0,0,0,8-8V64A8,8,0,0,0,104,56Z`}))]]),_e=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M220,48V96a12,12,0,0,1-24,0V77l-35.51,35.52a12,12,0,0,1-17-17L179,60H160a12,12,0,0,1,0-24h48A12,12,0,0,1,220,48ZM95.51,143.51,60,179V160a12,12,0,0,0-24,0v48a12,12,0,0,0,12,12H96a12,12,0,0,0,0-24H77l35.52-35.51a12,12,0,0,0-17-17ZM208,148a12,12,0,0,0-12,12v19l-35.51-35.52a12,12,0,0,0-17,17L179,196H160a12,12,0,0,0,0,24h48a12,12,0,0,0,12-12V160A12,12,0,0,0,208,148ZM77,60H96a12,12,0,0,0,0-24H48A12,12,0,0,0,36,48V96a12,12,0,0,0,24,0V77l35.51,35.52a12,12,0,0,0,17-17Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M109.66,146.34a8,8,0,0,1,0,11.32L83.31,184l18.35,18.34A8,8,0,0,1,96,216H48a8,8,0,0,1-8-8V160a8,8,0,0,1,13.66-5.66L72,172.69l26.34-26.35A8,8,0,0,1,109.66,146.34ZM83.31,72l18.35-18.34A8,8,0,0,0,96,40H48a8,8,0,0,0-8,8V96a8,8,0,0,0,13.66,5.66L72,83.31l26.34,26.35a8,8,0,0,0,11.32-11.32ZM208,40H160a8,8,0,0,0-5.66,13.66L172.69,72,146.34,98.34a8,8,0,0,0,11.32,11.32L184,83.31l18.34,18.35A8,8,0,0,0,216,96V48A8,8,0,0,0,208,40Zm3.06,112.61a8,8,0,0,0-8.72,1.73L184,172.69l-26.34-26.35a8,8,0,0,0-11.32,11.32L172.69,184l-18.35,18.34A8,8,0,0,0,160,216h48a8,8,0,0,0,8-8V160A8,8,0,0,0,211.06,152.61Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-42.34,42.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM98.34,146.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l42.35-42.34a8,8,0,0,0-11.32-11.32ZM208,152a8,8,0,0,0-8,8v28.69l-42.34-42.35a8,8,0,0,0-11.32,11.32L188.69,200H160a8,8,0,0,0,0,16h48a8,8,0,0,0,8-8V160A8,8,0,0,0,208,152ZM67.31,56H96a8,8,0,0,0,0-16H48a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31l42.34,42.35a8,8,0,0,0,11.32-11.32Z`}))]]),ve=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M51.51,104.49l-32-32a12,12,0,0,1,0-17l32-32a12,12,0,1,1,17,17L45,64,68.49,87.51a12,12,0,0,1-17,17Zm48,0a12,12,0,0,0,17,0l32-32a12,12,0,0,0,0-17l-32-32a12,12,0,1,0-17,17L123,64,99.51,87.51A12,12,0,0,0,99.51,104.49ZM200,36H180a12,12,0,0,0,0,24h16V196H60V140a12,12,0,0,0-24,0v60a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M200,40H168a16,16,0,0,0-16-16H32A16,16,0,0,0,16,40v80a16,16,0,0,0,16,16h8v64a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40ZM106.34,61.66a8,8,0,0,1,11.32-11.32l24,24a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L124.69,80Zm-64,24a8,8,0,0,1,0-11.32l24-24A8,8,0,0,1,77.66,61.66L59.31,80,77.66,98.34a8,8,0,0,1-11.32,11.32ZM200,200H56V136h96a16,16,0,0,0,16-16V56h32Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M58.34,101.66l-32-32a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,69.66,37.66L43.31,64,69.66,90.34a8,8,0,0,1-11.32,11.32Zm40,0a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0,0-11.32l-32-32A8,8,0,0,0,98.34,37.66L124.69,64,98.34,90.34A8,8,0,0,0,98.34,101.66ZM200,40H176a8,8,0,0,0,0,16h24V200H56V136a8,8,0,0,0-16,0v64a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Z`}))]]),ye=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M71.68,97.22,34.74,128l36.94,30.78a12,12,0,1,1-15.36,18.44l-48-40a12,12,0,0,1,0-18.44l48-40A12,12,0,0,1,71.68,97.22Zm176,21.56-48-40a12,12,0,1,0-15.36,18.44L221.26,128l-36.94,30.78a12,12,0,1,0,15.36,18.44l48-40a12,12,0,0,0,0-18.44ZM164.1,28.72a12,12,0,0,0-15.38,7.18l-64,176a12,12,0,0,0,7.18,15.37A11.79,11.79,0,0,0,96,228a12,12,0,0,0,11.28-7.9l64-176A12,12,0,0,0,164.1,28.72Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM92.8,145.6a8,8,0,1,1-9.6,12.8l-32-24a8,8,0,0,1,0-12.8l32-24a8,8,0,0,1,9.6,12.8L69.33,128Zm58.89-71.4-32,112a8,8,0,1,1-15.38-4.4l32-112a8,8,0,0,1,15.38,4.4Zm53.11,60.2-32,24a8,8,0,0,1-9.6-12.8L186.67,128,163.2,110.4a8,8,0,1,1,9.6-12.8l32,24a8,8,0,0,1,0,12.8Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M69.12,94.15,28.5,128l40.62,33.85a8,8,0,1,1-10.24,12.29l-48-40a8,8,0,0,1,0-12.29l48-40a8,8,0,0,1,10.24,12.3Zm176,27.7-48-40a8,8,0,1,0-10.24,12.3L227.5,128l-40.62,33.85a8,8,0,1,0,10.24,12.29l48-40a8,8,0,0,0,0-12.29ZM162.73,32.48a8,8,0,0,0-10.25,4.79l-64,176a8,8,0,0,0,4.79,10.26A8.14,8.14,0,0,0,96,224a8,8,0,0,0,7.52-5.27l64-176A8,8,0,0,0,162.73,32.48Z`}))]]),be=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H128a12,12,0,0,1,0-24h88A12,12,0,0,1,228,128ZM128,76h88a12,12,0,0,0,0-24H128a12,12,0,0,0,0,24Zm88,104H128a12,12,0,0,0,0,24h88a12,12,0,0,0,0-24ZM79.51,39.51,56,63l-7.51-7.52a12,12,0,0,0-17,17l16,16a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17Zm0,64L56,127l-7.51-7.52a12,12,0,1,0-17,17l16,16a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17Zm0,64L56,191l-7.51-7.52a12,12,0,1,0-17,17l16,16a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM117.66,149.66l-32,32a8,8,0,0,1-11.32,0l-16-16a8,8,0,0,1,11.32-11.32L80,164.69l26.34-26.35a8,8,0,0,1,11.32,11.32Zm0-64-32,32a8,8,0,0,1-11.32,0l-16-16A8,8,0,0,1,69.66,90.34L80,100.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM192,168H144a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm0-64H144a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128ZM128,72h88a8,8,0,0,0,0-16H128a8,8,0,0,0,0,16Zm88,112H128a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16ZM82.34,42.34,56,68.69,45.66,58.34A8,8,0,0,0,34.34,69.66l16,16a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,82.34,42.34Zm0,64L56,132.69,45.66,122.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm0,64L56,196.69,45.66,186.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z`}))]]),xe=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M84,64A12,12,0,0,1,96,52H216a12,12,0,0,1,0,24H96A12,12,0,0,1,84,64Zm132,52H96a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Zm0,64H96a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24ZM56,52H40a12,12,0,0,0,0,24H56a12,12,0,0,0,0-24Zm0,64H40a12,12,0,0,0,0,24H56a12,12,0,0,0,0-24Zm0,64H40a12,12,0,0,0,0,24H56a12,12,0,0,0,0-24Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,184H64a8,8,0,0,1,0-16h8a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16h8a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16h8a8,8,0,0,1,0,16Zm120,96H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Zm0-48H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Zm0-48H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M88,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H96A8,8,0,0,1,88,64Zm128,56H96a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Zm0,64H96a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16ZM56,56H40a8,8,0,0,0,0,16H56a8,8,0,0,0,0-16Zm0,64H40a8,8,0,0,0,0,16H56a8,8,0,0,0,0-16Zm0,64H40a8,8,0,0,0,0,16H56a8,8,0,0,0,0-16Z`}))]]),Se=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H116a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM116,76H216a12,12,0,0,0,0-24H116a12,12,0,0,0,0,24ZM216,180H116a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24ZM44,59.31V104a12,12,0,0,0,24,0V40A12,12,0,0,0,50.64,29.27l-16,8a12,12,0,0,0,9.36,22Zm39.73,96.86a27.7,27.7,0,0,0-11.2-18.63A28.89,28.89,0,0,0,32.9,143a27.71,27.71,0,0,0-4.17,7.54,12,12,0,0,0,22.55,8.21,4,4,0,0,1,.58-1,4.78,4.78,0,0,1,6.5-.82,3.82,3.82,0,0,1,1.61,2.6,3.63,3.63,0,0,1-.77,2.77l-.13.17L30.39,200.82A12,12,0,0,0,40,220H72a12,12,0,0,0,0-24H64l14.28-19.11A27.48,27.48,0,0,0,83.73,156.17Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM56.84,75.58a8,8,0,0,1,3.58-10.74l16-8A8,8,0,0,1,88,64v48a8,8,0,0,1-16,0V76.94l-4.42,2.22A8,8,0,0,1,56.84,75.58ZM92,180a8,8,0,0,1,0,16H68a8,8,0,0,1-6.4-12.8l21.67-28.89A3.92,3.92,0,0,0,84,152a4,4,0,0,0-7.77-1.33,8,8,0,0,1-15.09-5.34,20,20,0,1,1,35,18.53L84,180Zm100,4H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Zm0-48H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Zm0-48H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H104a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM104,72H216a8,8,0,0,0,0-16H104a8,8,0,0,0,0,16ZM216,184H104a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16ZM43.58,55.16,48,52.94V104a8,8,0,0,0,16,0V40a8,8,0,0,0-11.58-7.16l-16,8a8,8,0,0,0,7.16,14.32ZM79.77,156.72a23.73,23.73,0,0,0-9.6-15.95,24.86,24.86,0,0,0-34.11,4.7,23.63,23.63,0,0,0-3.57,6.46,8,8,0,1,0,15,5.47,7.84,7.84,0,0,1,1.18-2.13,8.76,8.76,0,0,1,12-1.59A7.91,7.91,0,0,1,63.93,159a7.64,7.64,0,0,1-1.57,5.78,1,1,0,0,0-.08.11L33.59,203.21A8,8,0,0,0,40,216H72a8,8,0,0,0,0-16H56l19.08-25.53A23.47,23.47,0,0,0,79.77,156.72Z`}))]]),Ce=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M185.08,114.46A48,48,0,0,0,148,36H80A12,12,0,0,0,68,48V200a12,12,0,0,0,12,12h80a52,52,0,0,0,25.08-97.54ZM92,60h56a24,24,0,0,1,0,48H92Zm68,128H92V132h68a28,28,0,0,1,0,56Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M168,156a20,20,0,0,1-20,20H96V136h52A20,20,0,0,1,168,156ZM224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48ZM184,156a36,36,0,0,0-18-31.15A36,36,0,0,0,140,64H88a8,8,0,0,0-8,8V184a8,8,0,0,0,8,8h60A36,36,0,0,0,184,156Zm-24-56a20,20,0,0,0-20-20H96v40h44A20,20,0,0,0,160,100Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M178.48,115.7A44,44,0,0,0,148,40H80a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8h80a48,48,0,0,0,18.48-92.3ZM88,56h60a28,28,0,0,1,0,56H88Zm72,136H88V128h72a32,32,0,0,1,0,64Z`}))]]),we=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M252,180a40,40,0,0,1-68.57,28,12,12,0,1,1,17.14-16.79A16,16,0,1,0,212,164a12,12,0,0,1-9.83-18.88L217,124H192a12,12,0,0,1,0-24h48a12,12,0,0,1,9.83,18.88l-18.34,26.2A40,40,0,0,1,252,180ZM144,44a12,12,0,0,0-12,12v48H52V56a12,12,0,0,0-24,0V176a12,12,0,0,0,24,0V128h80v48a12,12,0,0,0,24,0V56A12,12,0,0,0,144,44Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM128,160a8,8,0,0,1-16,0V128H72v32a8,8,0,0,1-16,0V80a8,8,0,0,1,16,0v32h40V80a8,8,0,0,1,16,0Zm40,24a32,32,0,0,1-21.34-8.15,8,8,0,1,1,10.68-11.92A16,16,0,1,0,168,136a8,8,0,0,1-6.4-12.8L176,104H152a8,8,0,0,1,0-16h40a8,8,0,0,1,6.4,12.8l-16.71,22.28A32,32,0,0,1,168,184Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M152,56V176a8,8,0,0,1-16,0V124H48v52a8,8,0,0,1-16,0V56a8,8,0,0,1,16,0v52h88V56a8,8,0,0,1,16,0Zm73.52,90.63,21-30A8,8,0,0,0,240,104H192a8,8,0,0,0,0,16h32.63l-19.18,27.41A8,8,0,0,0,212,160a20,20,0,1,1-14.29,34,8,8,0,1,0-11.42,11.19A36,36,0,0,0,248,180,36.07,36.07,0,0,0,225.52,146.63Z`}))]]),Te=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M156,56V176a12,12,0,0,1-24,0V128H52v48a12,12,0,0,1-24,0V56a12,12,0,0,1,24,0v48h80V56a12,12,0,0,1,24,0Zm84,140H216l28.74-38.33A36,36,0,1,0,182.05,124a12,12,0,0,0,22.63,8,11.67,11.67,0,0,1,1.73-3.22,12,12,0,1,1,19.15,14.46L182.4,200.8A12,12,0,0,0,192,220h48a12,12,0,0,0,0-24Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM128,160a8,8,0,0,1-16,0V128H72v32a8,8,0,0,1-16,0V80a8,8,0,0,1,16,0v32h40V80a8,8,0,0,1,16,0Zm64,24H152a8,8,0,0,1-6.4-12.8l36-48a12,12,0,1,0-19.15-14.46,13.06,13.06,0,0,0-2.58,4.81,8,8,0,1,1-15.68-3.18,28.17,28.17,0,1,1,50.2,22.44L168,168h24a8,8,0,0,1,0,16Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M152,56V176a8,8,0,0,1-16,0V124H48v52a8,8,0,0,1-16,0V56a8,8,0,0,1,16,0v52h88V56a8,8,0,0,1,16,0Zm88,144H208l33.55-44.74a32,32,0,1,0-55.73-29.93,8,8,0,1,0,15.08,5.34,16.28,16.28,0,0,1,2.32-4.3,16,16,0,1,1,25.54,19.27L185.6,203.2A8,8,0,0,0,192,216h48a8,8,0,0,0,0-16Z`}))]]),Ee=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M204,56a12,12,0,0,1-12,12H160.65l-40,120H144a12,12,0,0,1,0,24H64a12,12,0,0,1,0-24H95.35l40-120H112a12,12,0,0,1,0-24h80A12,12,0,0,1,204,56Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM176,80H153.64l-34.29,96H136a8,8,0,0,1,0,16H80a8,8,0,0,1,0-16h22.36l34.29-96H120a8,8,0,0,1,0-16h56a8,8,0,0,1,0,16Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M200,56a8,8,0,0,1-8,8H157.77L115.1,192H144a8,8,0,0,1,0,16H64a8,8,0,0,1,0-16H98.23L140.9,64H112a8,8,0,0,1,0-16h80A8,8,0,0,1,200,56Z`}))]]),De=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H185.86A41.48,41.48,0,0,1,196,168c0,14.45-7.81,28.32-21.43,38.05C162,215.05,145.44,220,128,220s-34-4.95-46.57-13.95C67.81,196.32,60,182.45,60,168a12,12,0,0,1,24,0c0,15.18,20.15,28,44,28s44-12.82,44-28c0-12.76-9.3-20.18-35.35-28H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM75.11,100a12,12,0,0,0,12-12c0-16,17.58-28,40.89-28,17.36,0,31.37,6.65,37.48,17.78a12,12,0,0,0,21-11.56C176.13,47.3,154.25,36,128,36,91,36,63.11,58.35,63.11,88A12,12,0,0,0,75.11,100Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM82.71,94.58C86,76.57,104.58,64,128,64c18.2,0,33.59,7.41,41.18,19.83a8,8,0,1,1-13.66,8.34C150.94,84.66,140.39,80,128,80c-15.3,0-27.73,7.33-29.55,17.42A8,8,0,0,1,90.59,104a7.76,7.76,0,0,1-1.43-.13A8,8,0,0,1,82.71,94.58ZM192,136H168.29A28.45,28.45,0,0,1,176,156c0,20.19-21.08,36-48,36-23.89,0-43.83-12.78-47.43-30.4a8,8,0,1,1,15.67-3.2c2,9.87,16,17.6,31.76,17.6,17.35,0,32-9.16,32-20,0-9.14-6.76-14.43-25.72-20H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H175.93c9.19,7.11,16.07,17.2,16.07,32,0,13.34-7,25.7-19.75,34.79C160.33,211.31,144.61,216,128,216s-32.33-4.69-44.25-13.21C71,193.7,64,181.34,64,168a8,8,0,0,1,16,0c0,17.35,22,32,48,32s48-14.65,48-32c0-14.85-10.54-23.58-38.77-32H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM76.33,104a8,8,0,0,0,7.61-10.49A17.3,17.3,0,0,1,83.11,88c0-18.24,19.3-32,44.89-32,18.84,0,34.16,7.42,41,19.85a8,8,0,0,0,14-7.7C173.33,50.52,152.77,40,128,40,93.29,40,67.11,60.63,67.11,88a33.73,33.73,0,0,0,1.62,10.49A8,8,0,0,0,76.33,104Z`}))]]),Oe=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M212,56V88a12,12,0,0,1-24,0V68H140V188h20a12,12,0,0,1,0,24H96a12,12,0,0,1,0-24h20V68H68V88a12,12,0,0,1-24,0V56A12,12,0,0,1,56,44H200A12,12,0,0,1,212,56Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,96a8,8,0,0,1-16,0V88H136v88h12a8,8,0,0,1,0,16H108a8,8,0,0,1,0-16h12V88H88v8a8,8,0,0,1-16,0V80a8,8,0,0,1,8-8h96a8,8,0,0,1,8,8Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,56V88a8,8,0,0,1-16,0V64H136V192h24a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16h24V64H64V88a8,8,0,0,1-16,0V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z`}))]]),ke=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:ge}));ke.displayName=`ArrowsInIcon`;var Ae=ke,je=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:_e}));je.displayName=`ArrowsOutIcon`;var Me=je,Ne=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:ve}));Ne.displayName=`CodeBlockIcon`;var Pe=Ne,Fe=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:ye}));Fe.displayName=`CodeIcon`;var Ie=Fe,Le=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:be}));Le.displayName=`ListChecksIcon`;var Re=Le,ze=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:xe}));ze.displayName=`ListDashesIcon`;var Be=ze,Ve=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:Se}));Ve.displayName=`ListNumbersIcon`;var He=Ve,Ue=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:Ce}));Ue.displayName=`TextBIcon`;var We=Ue,Ge=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:we}));Ge.displayName=`TextHThreeIcon`;var Ke=Ge,qe=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:Te}));qe.displayName=`TextHTwoIcon`;var Je=qe,Ye=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:Ee}));Ye.displayName=`TextItalicIcon`;var Xe=Ye,Ze=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:De}));Ze.displayName=`TextStrikethroughIcon`;var Qe=Ze,$e=O.forwardRef((e,t)=>O.createElement(x,{ref:t,...e,weights:Oe}));$e.displayName=`TextTIcon`;var et=$e,tt=Object.defineProperty,nt=(e,t)=>{let n={};for(var r in e)tt(n,r,{get:e[r],enumerable:!0});return t||tt(n,Symbol.toStringTag,{value:`Module`}),n},k=i(),rt=e(r(),1),it=c(),at=s();function ot(e){this.content=e}ot.prototype={constructor:ot,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new ot(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new ot(n)},addToStart:function(e,t){return new ot([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new ot(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new ot(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=ot.from(e),e.size?new ot(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=ot.from(e),e.size?new ot(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=ot.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},ot.from=function(e){if(e instanceof ot)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new ot(t)};function st(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a)n+=i.nodeSize;else{if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){let e=i.text,t=a.text,r=0;for(;e[r]==t[r];r++)n++;return r&&r<e.length&&r<t.length&&ut(e.charCodeAt(r-1))&<(e.charCodeAt(r))&&n--,n}if(i.content.size||a.content.size){let e=st(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}}function ct(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s)n-=c,r-=c;else{if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=o.text,t=s.text,i=e.length,a=t.length;for(;i>0&&a>0&&e[i-1]==t[a-1];)i--,a--,n--,r--;return i&&a&&i<e.length&&ut(e.charCodeAt(i-1))&<(e.charCodeAt(i))&&(n++,r++),{a:n,b:r}}if(o.content.size||s.content.size){let e=ct(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}}function lt(e){return e>=56320&&e<57344}function ut(e){return e>=55296&&e<56320}var A=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return st(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return ct(this,e,t,n)}findIndex(e){if(e==0)return ft(0,e);if(e==this.size)return ft(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?ft(t+1,i):ft(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};A.empty=new A([],0);var dt={index:0,offset:0};function ft(e,t){return dt.index=e,dt.offset=t,dt}function pt(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!pt(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!pt(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var j=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else!n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&pt(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};j.none=[];var mt=class extends Error{},M=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=gt(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(ht(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(A.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};M.empty=new M(A.empty,0,0);function ht(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(ht(a.content,t-i-1,n-i-1)))}function gt(e,t,n,r,i,a){let{index:o,offset:s}=e.findIndex(t),c=e.maybeChild(o);if(s==t||c.isText)return a&&r<=0&&i<=0&&!a.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=gt(c.content,t-s-1,n,o==0?r-1:0,o==e.childCount-1?i-1:0,c);return l&&e.replaceChild(o,c.copy(l))}function _t(e,t,n){if(n.openStart>e.depth)throw new mt(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new mt(`Inconsistent open depths`);return vt(e,t,n,0)}function vt(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=vt(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}if(!n.content.size)return Ct(a,Tt(e,t,r));if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return Ct(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}{let{start:i,end:o}=Et(n,e);return Ct(a,wt(e,i,o,t,r))}}function yt(e,t){if(!t.type.compatibleContent(e.type))throw new mt(`Cannot join `+t.type.name+` onto `+e.type.name)}function bt(e,t,n){let r=e.node(n);return yt(r,t.node(n)),r}function xt(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function St(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(xt(e.nodeAfter,r),a++));for(let e=a;e<o;e++)xt(i.child(e),r);t&&t.depth==n&&t.textOffset&&xt(t.nodeBefore,r)}function Ct(e,t){if(!e.type.validContent(t))throw new mt(`Invalid content for node `+e.type.name);return e.copy(t)}function wt(e,t,n,r,i){let a=e.depth>i&&bt(e,t,i+1),o=r.depth>i&&bt(n,r,i+1),s=[];return St(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(yt(a,o),xt(Ct(a,wt(e,t,n,r,i+1)),s)):(a&&xt(Ct(a,Tt(e,t,i+1)),s),St(t,n,i,s),o&&xt(Ct(o,Tt(n,r,i+1)),s)),St(r,null,i,s),new A(s)}function Tt(e,t,n){let r=[];return St(null,e,n,r),e.depth>n&&xt(Ct(bt(e,t,n+1),Tt(e,t,n+1)),r),St(t,null,n,r),new A(r)}function Et(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(A.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var Dt=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return j.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive!==!1||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive!==!1||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new jt(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e=``;for(let t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=At.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else At.set(t,r=new Ot);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%kt,i}},Ot=class{constructor(){this.elts=[],this.i=0}},kt=12,At=new WeakMap,jt=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},Mt=Object.create(null),Nt=class e{constructor(e,t,n,r=j.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||A.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&pt(this.attrs,t||e.defaultAttrs||Mt)&&j.sameSet(this.marks,n||j.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return M.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new M(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return _t(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return Dt.resolveCached(this,e)}resolveNoCache(e){return Dt.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),Ft(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=A.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),It(this.type.attrs,this.attrs,`node`,this.type.name);let e=j.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];It(n.type.attrs,n.attrs,`mark`,n.type.name),e=n.addToSet(e)}if(!j.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=A.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};Nt.prototype.text=void 0;var Pt=class e extends Nt{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Ft(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function Ft(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}function It(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}var Lt=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Rt(t,n);if(r.next==null)return e.empty;let i=zt(r);r.next&&r.err(`Unexpected trailing text`);let a=Yt(Kt(i));return Xt(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return A.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];a.isLeaf||a.hasRequiredAttrs()||a.name in t||r.type&&!o.validEnd||(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
|
|
3
3
|
`)}};Lt.empty=new Lt(!0);var Rt=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==``&&this.tokens.pop(),this.tokens[0]==``&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+` (in content expression '`+this.string+`')`)}};function zt(e){let t=[];do t.push(Bt(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function Bt(e){let t=[];do t.push(Vt(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function Vt(e){let t=Gt(e);for(;;)if(e.eat(`+`))t={type:`plus`,expr:t};else if(e.eat(`*`))t={type:`star`,expr:t};else if(e.eat(`?`))t={type:`opt`,expr:t};else if(e.eat(`{`))t=Ut(e,t);else break;return t}function Ht(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function Ut(e,t){let n=Ht(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:Ht(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function Wt(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return i.length==0&&e.err(`No node type or group '`+t+`' found`),i}function Gt(e){if(e.eat(`(`)){let t=zt(e);return e.eat(`)`)||e.err(`Missing closing paren`),t}if(/\W/.test(e.next))e.err(`Unexpected token '`+e.next+`'`);else{let t=Wt(e,e.next).map(t=>(e.inline==null?e.inline=t.isInline:e.inline!=t.isInline&&e.err(`Mixing inline and block content`),{type:`name`,value:t}));return e.pos++,t.length==1?t[0]:{type:`choice`,exprs:t}}}function Kt(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function a(e,t){if(e.type==`choice`)return e.exprs.reduce((e,n)=>e.concat(a(n,t)),[]);if(e.type==`seq`)for(let r=0;;r++){let o=a(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if(e.type==`star`){let o=n();return r(t,o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`plus`){let o=n();return i(a(e.expr,t),o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`opt`)return[r(t)].concat(a(e.expr,t));else if(e.type==`range`){let o=t;for(let t=0;t<e.min;t++){let t=n();i(a(e.expr,o),t),o=t}if(e.max==-1)i(a(e.expr,o),o);else for(let t=e.min;t<e.max;t++){let t=n();r(o,t),i(a(e.expr,o),t),o=t}return[r(o)]}else if(e.type==`name`)return[r(t,void 0,e.value)];else throw Error(`Unknown expr type`)}}function qt(e,t){return t-e}function Jt(e,t){let n=[];return r(t),n.sort(qt);function r(t){let i=e[t];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(t);for(let e=0;e<i.length;e++){let{term:t,to:a}=i[e];!t&&n.indexOf(a)==-1&&r(a)}}}function Yt(e){let t=Object.create(null);return n(Jt(e,0));function n(r){let i=[];r.forEach(t=>{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);Jt(e,n).forEach(e=>{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new Lt(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(qt);a.next.push({type:i[e][0],next:t[r.join(`,`)]||n(r)})}return a}}function Xt(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,a=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];a.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),r.indexOf(o)==-1&&r.push(o)}i&&t.err(`Only non-generatable nodes (`+a.join(`, `)+`) in a required position (see https://prosemirror.net/docs/guide/#generatable)`)}}function Zt(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Qt(e,t){let n=Object.create(null);for(let r in e){let i=e[r],a=t&&t[r];if(a===void 0){if(i.hasDefault)a=i.default;else throw RangeError(`No value supplied for attribute `+r)}else i.validate&&i.validate(a);n[r]=a}return n}function $t(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new nn(e,r,t[r]);return n}var en=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(` `):[],this.attrs=$t(e,n.attrs),this.defaultAttrs=Zt(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e==`text`),this.isText=e==`text`}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Lt.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?`pre`:`normal`)}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Qt(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new Nt(this,this.computeAttrs(e),A.from(t),j.setFrom(n))}createChecked(e=null,t,n){return t=A.from(t),this.checkContent(t),new Nt(this,this.computeAttrs(e),t,j.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=A.from(t),t.size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(A.empty,!0);return i?new Nt(this,e,t.append(i),j.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||=e.slice(0,n);return t?t.length?t:j.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||`doc`;if(!r[i])throw RangeError(`Schema is missing its top node type ('`+i+`')`);if(!r.text)throw RangeError(`Every schema needs a 'text' type`);for(let e in r.text.attrs)throw RangeError(`The text node type should not have attributes`);return r}};function tn(e,t,n){let r=n.split(`|`);return n=>{let i=n===null?`null`:typeof n;if(r.indexOf(i)<0)throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var nn=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?tn(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},rn=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=$t(e,r.attrs),this.excluded=null;let i=Zt(this.attrs);this.instance=i?new j(this,i):null}create(e=null){return!e&&this.instance?this.instance:new j(this,Qt(this.attrs,e))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((t,a)=>r[t]=new e(t,i++,n,a)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}},an=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=ot.from(e.nodes),t.marks=ot.from(e.marks||{}),this.nodes=en.compile(this.spec.nodes,this),this.marks=rn.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+` can not be both a node and a mark`);let t=this.nodes[e],r=t.spec.content||``,i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=Lt.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError(`Multiple linebreak nodes defined`);if(!t.isInline||!t.isLeaf)throw RangeError(`Linebreak replacement nodes must be inline leaf nodes`);this.linebreakReplacement=t}t.markSet=i==`_`?null:i?on(this,i.split(` `)):i==``||!t.inlineContent?[]:null}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=n==null?[t]:n==``?[]:on(this,n.split(` `))}this.nodeFromJSON=e=>Nt.fromJSON(this,e),this.markFromJSON=e=>j.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||`doc`],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e==`string`)e=this.nodeType(e);else if(!(e instanceof en))throw RangeError(`Invalid node type: `+e);else if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new Pt(n,n.defaultAttrs,e,j.setFrom(t))}mark(e,t){return typeof e==`string`&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError(`Unknown node type: `+e);return t}};function on(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e.marks[i],o=a;if(a)n.push(a);else for(let t in e.marks){let r=e.marks[t];(i==`_`||r.spec.group&&r.spec.group.split(` `).indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError(`Unknown mark type: '`+t[r]+`'`)}return n}function sn(e){return e.tag!=null}function cn(e){return e.style!=null}var ln=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(sn(e))this.tags.push(e);else if(cn(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new vn(this,t,!1);return n.addAll(e,j.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new vn(this,t,!0);return n.addAll(e,j.none,t.from,t.to),M.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(bn(e,n.tag)&&(n.namespace===void 0||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(t===!1)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!n.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(e===!1)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=e.priority==null?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((e.priority==null?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=xn(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=xn(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},un={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},dn={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},fn={ol:!0,ul:!0},pn=1,mn=2,hn=4;function gn(e,t,n){return t==null?e&&e.whitespace==`pre`?3:n&-5:(t?pn:0)|(t===`full`?mn:0)}var _n=class{constructor(e,t,n,r,i,a){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=a,this.content=[],this.activeMarks=j.none,this.match=i||(a&hn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(A.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&pn)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=A.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(A.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!un.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},vn=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,a=gn(null,t.preserveWhitespace,0)|(n?hn:0);i=r?new _n(r.type,r.attrs,j.none,!0,t.topMatch||r.type.contentMatch,a):n?new _n(null,null,j.none,!0,null,a):new _n(e.schema.topNodeType,null,j.none,!0,null,a),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=r.options&mn?`full`:this.localPreserveWS||(r.options&pn)>0,{schema:a}=this.parser;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(!i){if(n=n.replace(/[ \t\r\n\u000c]+/g,` `),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&i.nodeName==`BR`||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}}else if(i===`full`)n=n.replace(/\r\n?/g,`
|
|
4
4
|
`);else if(a.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(a.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(a.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(a.text(e[n]),t,!/\S/.test(e[n]));n=``}else n=n.replace(/\r?\n|\r/g,` `);n&&this.insertNode(a.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;(e.tagName==`PRE`||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),o;fn.hasOwnProperty(a)&&this.parser.normalizeLists&&yn(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));out:if(s?s.ignore:dn.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,t);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let n,r=this.needsBlock;if(un.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break out}let o=s&&s.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,s,n,s.consuming===!1?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){e.nodeName==`BR`&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
5
5
|
`),t)}ignoreFallback(e,t){e.nodeName!=`BR`||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text(`-`),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),n.consuming===!1)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,a;if(t.node){if(a=this.parser.schema.nodes[t.node],a.isLeaf)this.insertNode(a.create(t.attrs),n,e.nodeName==`BR`)||this.leafFallback(e,n);else{let e=this.enter(a,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(a&&a.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;typeof t.contentElement==`string`?r=e.querySelector(t.contentElement):typeof t.contentElement==`function`?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let a=n?e.childNodes[n]:e.firstChild,o=r==null?null:e.childNodes[r];a!=o;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,a=0;t>=0;t--){let o=this.nodes[t],s=o.findWrapping(e);if(s&&(!r||r.length>s.length+a)&&(r=s,i=o,!s.length))break;if(o.solid){if(n)break;a+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&=t.match.matchType(e.type);let n=j.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):Sn(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&=this.enterInner(e,t,n,!0,r),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let o=gn(e,i,a.options);a.options&hn&&a.content.length==0&&(o|=hn);let s=j.none;return n=n.filter(t=>!(a.type?a.type.allowsMarkType(t.type):Sn(t.type,e))||(s=t.addToSet(s),!1)),this.nodes.push(new _n(e,t,s,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=pn);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf(`|`)>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split(`/`),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,a=(e,o)=>{for(;e>=0;e--){let s=t[e];if(s==``){if(e==t.length-1||e==0)continue;for(;o>=i;o--)if(a(e-1,o))return!0;return!1}{let e=o>0||o==0&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=s&&!e.isInGroup(s))return!1;o--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}};function yn(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=t.nodeType==1?t.nodeName.toLowerCase():null;e&&fn.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):e==`li`?n=t:e&&(n=null)}}function bn(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function xn(e){let t={};for(let n in e)t[n]=e[n];return t}function Sn(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let a=[],o=e=>{a.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||a.indexOf(i)<0&&o(i))return!0}};if(o(i.contentMatch))return!0}}var Cn=class e{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||=Tn(t).createDocumentFragment();let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,a=0;for(;n<i.length&&a<e.marks.length;){let t=e.marks[a];if(!this.marks[t.type.name])a++;else{if(!t.eq(i[n][0])||t.type.spec.spanning===!1)break;n++,a++}}for(;n<i.length;)r=i.pop()[1];for(;a<e.marks.length;){let n=e.marks[a++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){if(e.isText)return Tn(t).createTextNode(e.text);let{dom:n,contentDOM:r}=kn(Tn(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError(`Content hole not allowed in a leaf node spec`);this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&kn(Tn(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return typeof t==`string`?{dom:e.createTextNode(t)}:kn(e,t,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(e){let t=wn(e.nodes);return t.text||=e=>e.text,t}static marksFromSchema(e){return wn(e.marks)}};function wn(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Tn(e){return e.document||window.document}var En=new WeakMap;function Dn(e){let t=En.get(e);return t===void 0&&En.set(e,t=On(e)),t}function On(e){let t=null;function n(e){if(e&&typeof e==`object`){if(Array.isArray(e)){if(typeof e[0]==`string`)t||=[],t.push(e);else for(let t=0;t<e.length;t++)n(e[t])}else for(let t in e)n(e[t])}}return n(e),t}function kn(e,t,n,r){if(t.nodeType==1)return{dom:t};if(t.dom&&t.dom.nodeType==1)return t;let i=t[0],a;if(typeof i!=`string`)throw RangeError(`Invalid array passed to renderSpec`);if(r&&(a=Dn(r))&&a.indexOf(t)>-1)throw RangeError(`Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.`);let o=i.indexOf(` `);o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s,c=n?e.createElementNS(n,i):e.createElement(i),l=t[1],u=1;if(l&&typeof l==`object`&&l.nodeType==null&&!Array.isArray(l)){u=2;for(let e in l)if(l[e]!=null){let t=e.indexOf(` `);t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),l[e]):e==`style`&&c.style?c.style.cssText=l[e]:c.setAttribute(e,l[e])}}for(let i=u;i<t.length;i++){let a=t[i];if(a===0){if(i<t.length-1||i>u)throw RangeError(`Content hole must be the only child of its parent node`);return{dom:c,contentDOM:c}}if(typeof a==`string`)c.appendChild(e.createTextNode(a));else{let{dom:t,contentDOM:i}=kn(e,a,n,r);if(c.appendChild(t),i){if(s)throw RangeError(`Multiple content holes`);s=i}}}return{dom:c,contentDOM:s}}var An=65535,jn=2**16;function Mn(e,t){return e+t*jn}function Nn(e){return e&An}function Pn(e){return(e-(e&An))/jn}var Fn=1,In=2,Ln=4,Rn=8,zn=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&Rn)>0}get deletedBefore(){return(this.delInfo&5)>0}get deletedAfter(){return(this.delInfo&6)>0}get deletedAcross(){return(this.delInfo&Ln)>0}},Bn=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){let t=0,n=Nn(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[e*3+2]-this.ranges[e*3+1];return this.ranges[n*3]+t+Pn(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let s=this.ranges[o]-(this.inverted?r:0);if(s>e)break;let c=this.ranges[o+i],l=this.ranges[o+a],u=s+c;if(e<=u){let i=c?e==s?-1:e==u?1:t:t,a=s+r+(i<0?0:l);if(n)return a;let d=e==(t<0?s:u)?null:Mn(o/3,e-s),f=0;return c&&(f|=e==s?In:e==u?Fn:Ln,(t<0?e!=s:e!=u)&&(f|=Rn)),new zn(a,f,d)}r+=l-c}return n?e+r:new zn(e+r,0,null)}touches(e,t){let n=0,r=Nn(t),i=this.inverted?2:1,a=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let s=this.ranges[t+i];if(e<=o+s&&t==r*3)return!0;n+=this.ranges[t+a]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let a=this.ranges[r],o=a-(this.inverted?i:0),s=a+(this.inverted?0:i),c=this.ranges[r+t],l=this.ranges[r+n];e(o,o+c,s,s+l),i+=l-c}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?`-`:``)+JSON.stringify(this.ranges)}static offset(t){return t==0?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};Bn.empty=new Bn([]);var Vn=class e{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new e(this._maps,this.mirror,t,n)}appendMap(e,t){this.ownData||=(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],r!=null&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||=[],this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),r!=null&&r>t?n-r-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(i.recover!=null){let t=this.getMirror(n);if(t!=null&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new zn(e,r,null)}},Hn=Object.create(null),Un=class{getMap(){return Bn.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError(`Invalid input for Step.fromJSON`);let n=Hn[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Hn)throw RangeError(`Duplicate use of step JSON ID `+e);return Hn[e]=t,t.prototype.jsonID=e,t}},Wn=class e{constructor(e,t){this.doc=e,this.failed=t}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(t){if(t instanceof mt)return e.fail(t.message);throw t}}};function Gn(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let a=e.child(i);a.content.size&&(a=a.copy(Gn(a.content,t,a))),a.isInline&&(a=t(a,n,i)),r.push(a)}return A.fromArray(r)}var Kn=class e extends Un{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new M(Gn(t.content,(e,t)=>!e.isAtom||!t.type.allowsMarkType(this.mark.type)?e:e.mark(this.mark.addToSet(e.marks)),r),t.openStart,t.openEnd);return Wn.fromReplace(e,this.from,this.to,i)}invert(){return new qn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`addMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for AddMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};Un.jsonID(`addMark`,Kn);var qn=class e extends Un{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new M(Gn(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return Wn.fromReplace(e,this.from,this.to,n)}invert(){return new Kn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`removeMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for RemoveMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};Un.jsonID(`removeMark`,qn);var Jn=class e extends Un{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Wn.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Wn.fromReplace(e,this.pos,this.pos+1,new M(A.from(n),0,+!t.isLeaf))}invert(t){let n=t.nodeAt(this.pos);if(n){let t=this.mark.addToSet(n.marks);if(t.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(t))return new e(this.pos,n.marks[r]);return new e(this.pos,this.mark)}}return new Yn(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`addNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for AddNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};Un.jsonID(`addNodeMark`,Jn);var Yn=class e extends Un{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Wn.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Wn.fromReplace(e,this.pos,this.pos+1,new M(A.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Jn(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`removeNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for RemoveNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};Un.jsonID(`removeNodeMark`,Yn);var Xn=class e extends Un{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&Qn(e,this.from,this.to)?Wn.fail(`Structure replace would overwrite content`):Wn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Bn([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),r=this.from==this.to&&e.MAP_BIAS<0?n:t.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new e(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?M.empty:new M(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?M.empty:new M(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}return null}toJSON(){let e={stepType:`replace`,from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for ReplaceStep.fromJSON`);return new e(n.from,n.to,M.fromJSON(t,n.slice),!!n.structure)}};Xn.MAP_BIAS=1,Un.jsonID(`replace`,Xn);var Zn=class e extends Un{constructor(e,t,n,r,i,a,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=a,this.structure=o}apply(e){if(this.structure&&(Qn(e,this.from,this.gapFrom)||Qn(e,this.gapTo,this.to)))return Wn.fail(`Structure gap-replace would overwrite content`);let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Wn.fail(`Gap is not a flat range`);let n=this.slice.insertAt(this.insert,t.content);return n?Wn.fromReplace(e,this.from,this.to,n):Wn.fail(`Content does not fit in gap`)}getMap(){return new Bn([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),a=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||a>r.pos?null:new e(n.pos,r.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:`replaceAround`,from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`||typeof n.gapFrom!=`number`||typeof n.gapTo!=`number`||typeof n.insert!=`number`)throw RangeError(`Invalid input for ReplaceAroundStep.fromJSON`);return new e(n.from,n.to,n.gapFrom,n.gapTo,M.fromJSON(t,n.slice),n.insert,!!n.structure)}};Un.jsonID(`replaceAround`,Zn);function Qn(e,t,n){let r=e.resolve(t),i=n-t,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function $n(e,t,n,r){let i=[],a=[],o,s;e.doc.nodesBetween(t,n,(e,c,l)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&l.type.allowsMarkType(r.type)){let l=Math.max(c,t),d=Math.min(c+e.nodeSize,n),f=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(o&&o.to==l&&o.mark.eq(u[e])?o.to=d:i.push(o=new qn(l,d,u[e])));s&&s.to==l?s.to=d:a.push(s=new Kn(l,d,r))}}),i.forEach(t=>e.step(t)),a.forEach(t=>e.step(t))}function er(e,t,n,r){let i=[],a=0;e.doc.nodesBetween(t,n,(e,o)=>{if(!e.isInline)return;a++;let s=null;if(r instanceof rn){let t=e.marks,n;for(;n=r.isInSet(t);)(s||=[]).push(n),t=n.removeFromSet(t)}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length){let r=Math.min(o+e.nodeSize,n);for(let e=0;e<s.length;e++){let n=s[e],c;for(let e=0;e<i.length;e++){let t=i[e];t.step==a-1&&n.eq(i[e].style)&&(c=t)}c?(c.to=r,c.step=a):i.push({style:n,from:Math.max(o,t),to:r,step:a})}}}),i.forEach(t=>e.step(new qn(t.from,t.to,t.style)))}function tr(e,t,n,r=n.contentMatch,i=!0){let a=e.doc.nodeAt(t),o=[],s=t+1;for(let t=0;t<a.childCount;t++){let c=a.child(t),l=s+c.nodeSize,u=r.matchType(c.type);if(!u)o.push(new Xn(s,l,M.empty));else{r=u;for(let t=0;t<c.marks.length;t++)n.allowsMarkType(c.marks[t].type)||e.step(new qn(s,l,c.marks[t]));if(i&&c.isText&&n.whitespace!=`pre`){let e,t=/\r?\n|\r/g,r;for(;e=t.exec(c.text);)r||=new M(A.from(n.schema.text(` `,n.allowedMarks(c.marks))),0,0),o.push(new Xn(s+e.index,s+e.index+e[0].length,r))}}s=l}if(!r.validEnd){let t=r.fillBefore(A.empty,!0);e.replace(s,s,new M(t,0,0))}for(let t=o.length-1;t>=0;t--)e.step(o[t])}function nr(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function rr(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let a=e.$from.node(n),o=e.$from.index(n)+r,s=e.$to.indexAfter(n)-i;if(n<e.depth&&a.canReplace(o,s,t))return n;if(n==0||a.type.spec.isolating||!nr(a,o,s))break;o&&(r=1),s<a.childCount&&(i=1)}return null}function ir(e,t,n){let{$from:r,$to:i,depth:a}=t,o=r.before(a+1),s=i.after(a+1),c=o,l=s,u=A.empty,d=0;for(let e=a,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,u=A.from(r.node(e).copy(u)),d++):c--;let f=A.empty,p=0;for(let e=a,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,f=A.from(i.node(e).copy(f)),p++):l++;e.step(new Zn(c,l,o,s,new M(u.append(f),d,p),u.size-d,!0))}function ar(e,t,n=null,r=e){let i=sr(e,t),a=i&&cr(r,t);return a?i.map(or).concat({type:t,attrs:n}).concat(a.map(or)):null}function or(e){return{type:e,attrs:null}}function sr(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let o=a.length?a[0]:t;return n.canReplaceWith(r,i,o)?a:null}function cr(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.child(r),o=t.contentMatch.findWrapping(a.type);if(!o)return null;let s=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;s&&e<i;e++)s=s.matchType(n.child(e).type);return!s||!s.validEnd?null:o}function lr(e,t,n){let r=A.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw RangeError(`Wrapper type given to Transform.wrap does not form valid content of its parent wrapper`)}r=A.from(n[e].type.create(n[e].attrs,r))}let i=t.start,a=t.end;e.step(new Zn(i,a,i,a,new M(r,0,0),n.length,!0))}function ur(e,t,n,r,i){if(!r.isTextblock)throw RangeError(`Type given to setBlockType should be a textblock`);let a=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let o=typeof i==`function`?i(t):i;if(t.isTextblock&&!t.hasMarkup(r,o)&&pr(e.doc,e.mapping.slice(a).map(n),r)){let i=null;if(r.schema.linebreakReplacement){let e=r.whitespace==`pre`,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}i===!1&&fr(e,t,n,a),tr(e,e.mapping.slice(a).map(n,1),r,void 0,i===null);let s=e.mapping.slice(a),c=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new Zn(c,l,c+1,l-1,new M(A.from(r.create(o,null,t.marks)),0,0),1,!0)),i===!0&&dr(e,t,n,a),!1}})}function dr(e,t,n,r){t.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let i=e.mapping.slice(r).map(n+1+a+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function fr(e,t,n,r){t.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(`
|
|
@@ -222,4 +222,4 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
222
222
|
|
|
223
223
|
`),replace:n=>{let r=[];if(e.state.doc.forEach((e,t)=>{t>=s&&t+e.nodeSize<=c&&r.push(e.toJSON())}),JSON.stringify(r)!==l)return!1;let i=(t.load(n).doc.content??[]).filter(e=>!(e.type===`paragraph`&&!e.content?.length));return i.length?e.chain().focus().insertContentAt({from:s,to:c},i).run():!1}}}function Mk({editor:e,labels:t,onAskAi:n}){let r=(0,O.useRef)(!1),i=av({editor:e,selector:({editor:e})=>({bold:e.isActive(`bold`),italic:e.isActive(`italic`),strike:e.isActive(`strike`),code:e.isActive(`code`),link:e.isActive(`link`)})}),a=()=>e.chain().focus(),o=[{key:`bold`,label:t.bold,icon:(0,k.jsx)(We,{}),active:i.bold,run:()=>a().toggleBold().run()},{key:`italic`,label:t.italic,icon:(0,k.jsx)(Xe,{}),active:i.italic,run:()=>a().toggleItalic().run()},{key:`strike`,label:t.strike,icon:(0,k.jsx)(Qe,{}),active:i.strike,run:()=>a().toggleStrike().run()},{key:`code`,label:t.code,icon:(0,k.jsx)(Ie,{}),active:i.code,run:()=>a().toggleCode().run()}];return(0,k.jsx)(Ak,{editor:e,options:{placement:`top`,offset:8},shouldShow:({editor:e,state:t,view:n})=>r.current||n.hasFocus()&&e.isEditable&&!t.selection.empty&&!(t.selection instanceof F)&&!e.isActive(`codeBlock`),className:`z-40`,children:(0,k.jsxs)(T,{size:`sm`,"aria-label":t.selectionToolbar,className:`rounded-lg bg-kumo-elevated shadow-md ring ring-kumo-line`,"data-selection-toolbar":``,children:[o.map(e=>(0,k.jsx)(ZO,{item:e},e.key)),(0,k.jsx)(qO,{editor:e,labels:t,active:i.link,onOpenChange:e=>{r.current=e}}),n&&t.askAi&&(0,k.jsx)(ZO,{item:{key:`ai`,label:t.askAi,icon:(0,k.jsx)(y,{}),run:n}})]})})}function Nk(e,t){let n=[{key:`paragraph`,label:e.paragraph,keywords:[`text`,`paragraph`,`p`],run:e=>e.chain().focus().setParagraph().run()},{key:`heading2`,label:e.heading2,keywords:[`heading`,`title`,`h2`],run:e=>e.chain().focus().setHeading({level:2}).run()},{key:`heading3`,label:e.heading3,keywords:[`subheading`,`h3`],run:e=>e.chain().focus().setHeading({level:3}).run()},{key:`bulletList`,label:e.bulletList,keywords:[`bullet`,`list`,`ul`],run:e=>e.chain().focus().toggleBulletList().run()},{key:`orderedList`,label:e.orderedList,keywords:[`numbered`,`list`,`ol`],run:e=>e.chain().focus().toggleOrderedList().run()},{key:`taskList`,label:e.taskList,keywords:[`todo`,`task`,`checklist`],run:e=>e.chain().focus().toggleTaskList().run()},{key:`quote`,label:e.quote,keywords:[`quote`,`blockquote`],run:e=>e.chain().focus().toggleBlockquote().run()},{key:`codeBlock`,label:e.codeBlock,keywords:[`code`,`pre`,`snippet`],run:e=>e.chain().focus().toggleCodeBlock().run()},{key:`table`,label:e.table,keywords:[`table`,`grid`],run:e=>e.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()},{key:`rule`,label:e.rule,keywords:[`divider`,`rule`,`line`,`hr`],run:e=>e.chain().focus().setHorizontalRule().run()}];return t&&n.push({key:`image`,label:e.image,keywords:[`image`,`picture`,`photo`,`media`],run:e=>void t(e)}),n}function Pk(e,t,n){return e?e.types.filter(e=>e.where.includes(`body`)).map(e=>{let r=d(e),i=ne(e.title,`en`);return{key:`block:${e.name}`,label:ne(e.title,t),keywords:[e.name,i,`block`],icon:(0,k.jsx)(r,{}),run:t=>{let r={name:e.name,props:{...e.example.props}},i=e.content===`markdown`?{type:`directiveContainer`,attrs:r,content:e.example.markdown?n(e.example.markdown):[{type:`paragraph`}]}:{type:`directiveLeaf`,attrs:r};t.chain().focus().insertContent(i).run()}}}):[]}var Fk={paragraph:(0,k.jsx)(et,{}),heading2:(0,k.jsx)(Je,{}),heading3:(0,k.jsx)(Ke,{}),bulletList:(0,k.jsx)(m,{}),orderedList:(0,k.jsx)(He,{}),taskList:(0,k.jsx)(Re,{}),quote:(0,k.jsx)(_,{}),codeBlock:(0,k.jsx)(Pe,{}),table:(0,k.jsx)(b,{}),rule:(0,k.jsx)(h,{}),image:(0,k.jsx)(f,{})};function Ik({state:e,labels:n}){let r=(0,O.useRef)(null),i=(0,O.useRef)(e.mount);return(0,O.useEffect)(()=>{if(r.current)return i.current(r.current)},[]),(0,O.useEffect)(()=>{r.current?.querySelector(`[data-index="${e.index}"]`)?.scrollIntoView({block:`nearest`})},[e.index]),(0,rt.createPortal)((0,k.jsx)(`div`,{ref:r,role:`listbox`,"aria-label":n.insertMenu,"data-slash-menu":``,className:`fixed top-0 left-0 z-50 max-h-72 w-64 overflow-y-auto rounded-lg bg-kumo-elevated p-1 shadow-lg ring ring-kumo-line`,children:e.items.length===0?(0,k.jsx)(`div`,{className:`px-2 py-1.5`,children:(0,k.jsx)(w,{variant:`secondary`,size:`sm`,children:n.noMatches})}):e.items.map((n,r)=>(0,k.jsxs)(`div`,{role:`option`,tabIndex:-1,"aria-selected":r===e.index,"data-index":r,"data-slash-item":n.key,className:t(`flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm text-kumo-default`,r===e.index&&`bg-kumo-tint`),onMouseEnter:()=>e.hover(r),onMouseDown:e=>e.preventDefault(),onClick:()=>e.choose(n),onKeyDown:()=>{},children:[(0,k.jsx)(`span`,{className:`flex size-4 items-center justify-center text-kumo-subtle`,children:n.icon??Fk[n.key]}),n.label]},n.key))}),document.body)}var Lk=`cloudhal.editor.spotlight`,Rk=()=>{try{return globalThis.localStorage?.getItem(Lk)===`1`}catch{return!1}},zk=e=>{try{globalThis.localStorage?.setItem(Lk,e?`1`:`0`)}catch{}};function Bk({rootRef:e,editorRef:t,canFocus:n,slash:r}){let[i,a]=(0,O.useState)(!1),o=(0,O.useRef)(null),s=(0,O.useCallback)(()=>{a(!1),requestAnimationFrame(()=>o.current?.focus())},[]),c=(0,O.useCallback)(()=>{i?s():(a(!0),requestAnimationFrame(()=>t.current?.commands.focus()))},[i,s,t.current?.commands.focus]);return(0,O.useEffect)(()=>{if(!i)return;let t=document.documentElement,n=t.style.overflow;t.style.overflow=`hidden`;let a=[];for(let t=e.current;t&&t!==document.body;t=t.parentElement)for(let e of t.parentElement?.children??[])e!==t&&!e.hasAttribute(`inert`)&&e.tagName!==`SCRIPT`&&(e.setAttribute(`inert`,``),a.push(e));let o=e=>{e.key===`Escape`&&!e.defaultPrevented&&!r&&s()};return document.addEventListener(`keydown`,o),()=>{t.style.overflow=n;for(let e of a)e.removeAttribute(`inert`);document.removeEventListener(`keydown`,o)}},[i,r,s,e.current]),(0,O.useEffect)(()=>{if(!n)return;let t=t=>{(t.ctrlKey||t.metaKey)&&t.shiftKey&&t.code===`Backslash`&&(i||e.current?.contains(document.activeElement))&&(t.preventDefault(),c())};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[n,i,c,e.current?.contains]),{focused:i,focusButton:o,toggleFocus:c}}function Vk(e,t,n){let r=n.clipboardData?.getData(`text/plain`)??``,i=n.clipboardData?.getData(`text/html`)??``;if(!r||e.isActive(`codeBlock`)||!Hk(r)||i&&/<(h[1-6]|ul|ol|li|table|blockquote|pre|strong|em|b|i|a|img)[\s>]/i.test(i))return!1;let a=t.load(r).doc.content??[],o=a.length===1?a[0]:void 0,s=o?.type===`paragraph`?o.content??[]:a;return s.length?(e.chain().focus().insertContent(s).run(),!0):!1}function Hk(e){return/^(#{1,6}\s|[-*+]\s|\d+[.)]\s|>\s?|```|~~~|\|.*\|\s*$|- \[[ xX]\]\s)/m.test(e)||/\*\*[^*\n]+\*\*|__[^_\n]+__|`[^`\n]+`|~~[^~\n]+~~/.test(e)||Wk(e)}var Uk=e=>/\s/.test(e);function Wk(e){let t=-1;for(let n=e.indexOf(`](`,0);n!==-1;n=e.indexOf(`](`,n+1)){let r=!1;for(let t=n-1;t>=0&&e[t]!==`]`&&e[t]!==`
|
|
224
224
|
`;t--)if(e[t]===`[`&&t<n-1){r=!0;break}let i=n+2;if(t<i)for(t=i;t<e.length&&e[t]!==`)`&&!Uk(e[t]);)t++;if(r&&e[t]===`)`&&t>i)return!0}return!1}function Gk(e,n){return{"aria-label":e,"aria-multiline":`true`,role:`textbox`,class:t(`ch-md-content min-w-0 px-3 py-2 outline-none`,n===`sm`?`min-h-32`:`min-h-64`)}}function Kk(e){let{value:t,onChange:n,label:r,labels:i,placeholder:a,resolveSrc:o,size:s,readOnly:c,onPickImage:l,locale:u,onAskAi:d,blocks:f,previewSource:p,setMode:m,setSourceFocus:h,setSlash:g}=e,_=(0,O.useRef)(o);_.current=o;let v=(0,O.useRef)(l);v.current=l;let y=(0,O.useRef)(d);y.current=d;let b=(0,O.useRef)(p);b.current=p;let x=p!==void 0,S=(0,O.useRef)(i);S.current=i;let C=(0,O.useRef)(f);C.current=f;let w=(0,O.useRef)(null),T=(0,O.useCallback)(async e=>{let t=await v.current?.();t?.src?e.chain().focus().setImage({src:t.src,alt:t.alt??``}).run():e.commands.focus()},[]),E=(0,O.useMemo)(()=>Jg(KO({...a?{placeholder:a}:{}})),[a]),ee=(0,O.useMemo)(()=>KO({...a?{placeholder:a}:{},sourceBlock:{badge:i.sourceBadge,hint:i.sourceHint,edit:i.editSource,...i.surfacePreview?{preview:i.surfacePreview}:{},...i.showCode?{showCode:i.showCode}:{},...i.hideCode?{hideCode:i.hideCode}:{}},...x?{previewSource:e=>b.current?.(e)??Promise.resolve(void 0)}:{},onEditSource:e=>{h(e),m(`markdown`)},resolveSrc:e=>_.current?_.current(e):e,spotlight:i.focus!==void 0,slash:{items:()=>[...Nk(S.current,v.current?T:void 0),...Pk(C.current,u,e=>E.load(e).doc.content??[])],onState:g,locale:u}}),[a,i.sourceBadge,i.sourceHint,i.editSource,i.surfacePreview,i.showCode,i.hideCode,x,i.focus,T,u,E,h,g,m]),te=(0,O.useRef)(E.load(t)),ne=(0,O.useRef)(t),D=lv({extensions:ee,content:te.current.doc,editable:!c,immediatelyRender:!0,editorProps:{attributes:Gk(r,s),handlePaste:(e,t)=>{let n=w.current;return n?Vk(n,E,t):!1}},onUpdate:({editor:e})=>{let t=E.save(e.getJSON(),te.current.base);t!==ne.current&&(ne.current=t,n(t))}},[ee]);return w.current=D,(0,O.useEffect)(()=>{D&&t!==ne.current&&(te.current=E.load(t),ne.current=t,D.commands.setContent(te.current.doc,{emitUpdate:!1}))},[D,E,t]),(0,O.useEffect)(()=>{D?.setEditable(!c)},[D,c]),{editor:D,editorRef:w,codec:E,insertImage:T,askRef:y}}var qk=(0,O.lazy)(()=>te(()=>import(`./SourceEditor-W-oKqiEa.js`).then(e=>({default:e.SourceEditor})),__vite__mapDeps([0,1,2,3])));function Jk({value:e,onChange:n,label:r,labels:i,placeholder:a,resolveSrc:s,defaultMode:c=`rich`,size:l=`base`,readOnly:u=!1,className:d,onPickImage:f,locale:p=`en`,onAskAi:m,blocks:h,focusActions:g,previewSource:_}){let[v,y]=(0,O.useState)(c),[b,x]=(0,O.useState)(Rk),S=(0,O.useRef)(null),[w,T]=(0,O.useState)(),[te,ne]=(0,O.useState)(null),{editor:D,editorRef:re,codec:ie,insertImage:ae,askRef:oe}=Kk({value:e,onChange:n,label:r,labels:i,placeholder:a,resolveSrc:s,size:l,readOnly:u,onPickImage:f,locale:p,onAskAi:m,blocks:h,previewSource:_,setMode:y,setSourceFocus:T,setSlash:ne}),se=i.focus!==void 0,{focused:ce,focusButton:le,toggleFocus:ue}=Bk({rootRef:S,editorRef:re,canFocus:se,slash:te});return(0,k.jsxs)(`div`,{ref:S,className:t(`ch-md-editor grid min-w-0 gap-2`,ce&&`fixed inset-0 z-50 content-start overflow-y-auto bg-kumo-base px-4 pt-3 pb-16 sm:px-8`,d),"data-mode":v,"data-focused":ce?``:void 0,"data-spotlight":ce&&b?``:void 0,...ce?{role:`dialog`,"aria-modal":!0,"aria-label":r}:{},children:[(0,k.jsxs)(`div`,{className:t(`flex flex-wrap items-center justify-between gap-2`,ce&&`sticky top-0 z-10 mx-auto w-full max-w-3xl border-b border-kumo-line bg-kumo-base py-2`),children:[v===`rich`&&D?(0,k.jsx)(XO,{editor:D,labels:i,disabled:u,onImage:f?()=>void ae(D):void 0}):(0,k.jsx)(`span`,{}),(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[ce&&g,ce&&i.spotlight&&v===`rich`&&(0,k.jsx)(E,{size:`sm`,label:i.spotlight,checked:b,onCheckedChange:e=>{x(e),zk(e)}}),v===`rich`&&D&&(0,k.jsx)($O,{editor:D,labels:i}),(0,k.jsx)(ee,{variant:`segmented`,size:`sm`,value:v,onValueChange:e=>{T(void 0),y(e)},tabs:[{value:`rich`,label:i.rich},{value:`markdown`,label:i.markdown}]}),se&&(0,k.jsx)(o,{ref:le,variant:ce?`secondary`:`ghost`,size:`sm`,icon:ce?(0,k.jsx)(Ae,{size:16}):(0,k.jsx)(Me,{size:16}),"aria-pressed":ce,title:i.focusShortcut,onClick:ue,"data-testid":`editor-focus`,children:ce?i.focusExit??i.focus:i.focus})]})]}),(0,k.jsxs)(`div`,{hidden:v!==`rich`,className:t(`min-w-0 rounded-lg bg-kumo-control ring ring-kumo-line focus-within:ring-kumo-focus`,ce&&`mx-auto w-full max-w-3xl bg-kumo-base text-base ring-0 focus-within:ring-0`),children:[(0,k.jsx)(Pv.Provider,{value:h?{...h,locale:p,onEditSource:e=>{T(e),y(`markdown`)}}:void 0,children:(0,k.jsx)(nv,{editor:D})}),D&&v===`rich`&&!u&&(0,k.jsx)(Mk,{editor:D,labels:i,...m&&i.askAi?{onAskAi:()=>{let e=jk(D,ie);e&&oe.current?.(e)}}:{}})]}),v===`markdown`&&(0,k.jsx)(O.Suspense,{fallback:(0,k.jsx)(C,{"aria-label":r,value:e,onValueChange:e=>n(e),autoResize:!0,minRows:l===`sm`?6:12,maxRows:40,readOnly:u,className:`w-full font-mono`}),children:(0,k.jsx)(qk,{value:e,onChange:n,label:r,readOnly:u,minRows:l===`sm`?6:12,selectOnMount:w,...a?{placeholder:a}:{}})}),te&&v===`rich`&&(0,k.jsx)(Ik,{state:te,labels:i})]})}export{Jk as MarkdownEditor};
|
|
225
|
-
//# sourceMappingURL=editor-
|
|
225
|
+
//# sourceMappingURL=editor-D-UcfC7J.js.map
|