adminizer 4.6.0 → 4.7.0-build.221
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/assets/RelationDialogStack-CnHFOYyR.css +1 -0
- package/assets/RelationDialogStack-DI2bZxQX.js +20 -0
- package/assets/add-4213XScp.js +1 -0
- package/assets/add-group--F1XxfJ1.js +1 -0
- package/assets/add-group-form-DKRXC2n-.js +1 -0
- package/assets/add-user-b9HfMq7z.js +1 -0
- package/assets/add-user-form-UXAToWQd.js +1 -0
- package/assets/app-Clx8f5hd.css +1 -0
- package/assets/app-layout-C02ja4OI.js +1 -0
- package/assets/app-shell-D8wtkECO.js +1 -0
- package/assets/app-sidebar-BR5_zwxj.js +1 -0
- package/assets/app-sidebar-header-BZbIBQjq.js +1 -0
- package/assets/app.js +59 -7990
- package/assets/breadcrumbs-CODaqVkB.js +1 -0
- package/assets/catalog-6ZZjWdFs.js +6 -0
- package/assets/dashboard-CftAdKiH.js +3 -0
- package/assets/date-picker-DSOkNiNo.js +1 -0
- package/assets/del-modal-Cd4M7af8.js +1 -0
- package/assets/dynamic-controls-BsrJhPDY.js +1 -0
- package/assets/geo-json-CzR5JBXL.js +1 -0
- package/assets/handsontable-BI98OF5R.js +336 -0
- package/assets/history-DLHSU7Ak.js +1 -0
- package/assets/home-NcQ7nnU0.js +2 -0
- package/assets/icon-C2JNaLxH.js +1 -0
- package/assets/init-user-D2HSyXup.js +1 -0
- package/assets/input-error-CH2caTtO.js +1 -0
- package/assets/jsoneditor-DVNQmA6G.js +3869 -0
- package/assets/list-CFU0-TgN.js +4 -0
- package/assets/login-DFSLEO17.js +1 -0
- package/assets/manifest.json +246 -273
- package/assets/material-icon-Bx9pGQiQ.js +1 -0
- package/assets/media-manager-WcKe1EvD.js +6 -0
- package/assets/module-CT7PC6pc.js +1 -0
- package/assets/monaco-Bl4zdWCn.js +11 -0
- package/assets/nav-footer-BiSQkPt4.js +1 -0
- package/assets/nav-main-rTH0PfDw.js +1 -0
- package/assets/nav-user-Bj6cWs0a.js +1 -0
- package/assets/notification-Bi-PX87D.js +20 -0
- package/assets/pagination-render-AKJvTIRA.js +1 -0
- package/assets/register-BTP4uxsK.js +1 -0
- package/assets/ru-eW0WKkga.js +1 -0
- package/assets/theme-switcher-Dm8EOGzx.js +1 -0
- package/assets/toast-editor-DOg_gvSp.js +668 -0
- package/assets/user-filters-list-YUfR4XMI.js +1 -0
- package/assets/user-info-BgSbT02v.js +1 -0
- package/assets/user-menu-content-TQTXHIv6.js +1 -0
- package/assets/{vanilla-picker-l5rcX3cq.js → vanilla-picker-B3LgXoKV.js} +1 -7
- package/assets/welcome-vLwTu1R6.js +1 -0
- package/controllers/add.d.ts +1 -1
- package/controllers/add.js +20 -26
- package/controllers/addGroup.d.ts +1 -1
- package/controllers/addGroup.js +7 -15
- package/controllers/addUser.d.ts +1 -1
- package/controllers/addUser.js +10 -16
- package/controllers/catalog/Catalog.d.ts +1 -1
- package/controllers/catalog/Catalog.js +1 -10
- package/controllers/catalog/FrontendCatalogAdapter.d.ts +3 -3
- package/controllers/catalog/FrontendCatalogAdapter.js +0 -6
- package/controllers/catalog/FrontentCatalogAdapter.d.ts +3 -3
- package/controllers/catalog/FrontentCatalogAdapter.js +0 -4
- package/controllers/ckeditorUpload.js +2 -18
- package/controllers/dashboard.d.ts +1 -1
- package/controllers/dashboard.js +2 -5
- package/controllers/edit.js +24 -37
- package/controllers/editGroup.d.ts +1 -1
- package/controllers/editGroup.js +10 -21
- package/controllers/editUser.d.ts +1 -1
- package/controllers/editUser.js +11 -23
- package/controllers/exportData.d.ts +6 -0
- package/controllers/exportData.js +315 -0
- package/controllers/feed.d.ts +6 -0
- package/controllers/feed.js +73 -0
- package/controllers/feedback/feedbackController.d.ts +1 -1
- package/controllers/feedback/feedbackController.js +5 -7
- package/controllers/filter-fields/columns.d.ts +11 -0
- package/controllers/filter-fields/columns.js +106 -0
- package/controllers/filter-fields/filterFields.d.ts +10 -0
- package/controllers/filter-fields/filterFields.js +141 -0
- package/controllers/filter-fields/getAllUserFilters.d.ts +6 -0
- package/controllers/filter-fields/getAllUserFilters.js +115 -0
- package/controllers/filter-fields/groups.d.ts +5 -0
- package/controllers/filter-fields/groups.js +26 -0
- package/controllers/filter-fields/savedFilters.d.ts +25 -0
- package/controllers/filter-fields/savedFilters.js +317 -0
- package/controllers/getAllWidgets.d.ts +1 -1
- package/controllers/getAllWidgets.js +1 -9
- package/controllers/history-actions/HistoryController.js +6 -31
- package/controllers/initUser.js +6 -5
- package/controllers/inlineUpdate.d.ts +7 -0
- package/controllers/inlineUpdate.js +148 -0
- package/controllers/list.d.ts +1 -1
- package/controllers/list.js +383 -70
- package/controllers/listUserFilters.d.ts +5 -0
- package/controllers/listUserFilters.js +26 -0
- package/controllers/login.js +2 -2
- package/controllers/media-manager/mediaManagerApi.js +0 -9
- package/controllers/navigation/edit.js +3 -9
- package/controllers/notifications/NotificationController.d.ts +1 -1
- package/controllers/notifications/NotificationController.js +12 -36
- package/controllers/register.js +10 -9
- package/controllers/remove.js +10 -19
- package/controllers/timezones.d.ts +1 -1
- package/controllers/timezones.js +0 -6
- package/controllers/userApiKey.d.ts +7 -0
- package/controllers/userApiKey.js +36 -0
- package/controllers/view.js +14 -26
- package/controllers/welcome.d.ts +1 -1
- package/controllers/welcome.js +0 -4
- package/controllers/widgets/Action.d.ts +1 -1
- package/controllers/widgets/Action.js +1 -9
- package/controllers/widgets/Custom.d.ts +1 -1
- package/controllers/widgets/Custom.js +1 -9
- package/controllers/widgets/Info.d.ts +1 -1
- package/controllers/widgets/Info.js +1 -9
- package/controllers/widgets/filterInfo.d.ts +1 -0
- package/controllers/widgets/filterInfo.js +44 -0
- package/controllers/widgets/switch.d.ts +1 -1
- package/controllers/widgets/switch.js +1 -9
- package/controllers/widgetsDB.d.ts +1 -1
- package/controllers/widgetsDB.js +2 -8
- package/helpers/accessRightsHelper.d.ts +1 -1
- package/helpers/accessRightsHelper.js +5 -4
- package/helpers/apiKeyHelper.d.ts +5 -0
- package/helpers/apiKeyHelper.js +8 -0
- package/helpers/configHelper.js +12 -15
- package/helpers/controllerHelper.d.ts +14 -21
- package/helpers/controllerHelper.js +50 -83
- package/helpers/fieldsHelper.js +3 -3
- package/helpers/filterDatetimeHelper.d.ts +5 -0
- package/helpers/filterDatetimeHelper.js +84 -0
- package/helpers/inertiaActionsHelper.d.ts +2 -2
- package/helpers/inertiaActionsHelper.js +5 -4
- package/helpers/inertiaAddHelper.d.ts +3 -414
- package/helpers/inertiaAddHelper.js +39 -15
- package/helpers/inertiaGroupHelper.d.ts +2 -2
- package/helpers/inertiaGroupHelper.js +3 -3
- package/helpers/inertiaListHelper.d.ts +7 -3
- package/helpers/inertiaListHelper.js +26 -12
- package/helpers/inertiaMenuHelper.d.ts +1 -0
- package/helpers/inertiaMenuHelper.js +15 -3
- package/helpers/inertiaUserHelper.d.ts +3 -2
- package/helpers/inertiaUserHelper.js +7 -3
- package/helpers/menuHelper.d.ts +5 -2
- package/helpers/menuHelper.js +64 -12
- package/helpers/viteHelper.js +1 -2
- package/index.d.ts +6 -2
- package/index.js +6 -2
- package/interfaces/adminpanelConfig.d.ts +126 -39
- package/interfaces/internalModelAccess.d.ts +37 -0
- package/interfaces/internalModelAccess.js +1 -0
- package/interfaces/listQueryBuilder.d.ts +22 -0
- package/interfaces/listQueryBuilder.js +1 -0
- package/interfaces/queryCriteria.d.ts +54 -0
- package/interfaces/queryCriteria.js +1 -0
- package/interfaces/types.d.ts +1 -13
- package/lib/Adminizer.d.ts +4 -2
- package/lib/Adminizer.js +29 -10
- package/lib/DataAccessor.d.ts +8 -5
- package/lib/DataAccessor.js +89 -42
- package/lib/I18n.d.ts +5 -1
- package/lib/I18n.js +45 -19
- package/lib/MiddlewareManager.d.ts +8 -0
- package/lib/MiddlewareManager.js +53 -0
- package/lib/ai-assistant/OpenAiModelService.d.ts +3 -3
- package/lib/ai-assistant/OpenAiModelService.js +23 -24
- package/lib/catalog/Navigation.d.ts +1 -0
- package/lib/catalog/Navigation.js +12 -11
- package/lib/controls/jsoneditor/JsonEditor.d.ts +1 -2
- package/lib/controls/markdown/ToastUiEditor.d.ts +1 -2
- package/lib/feedback/FeedbackHandler.js +2 -2
- package/lib/filters/ConditionValidator.d.ts +107 -0
- package/lib/filters/ConditionValidator.js +483 -0
- package/lib/filters/CustomFilterHandler.d.ts +122 -0
- package/lib/filters/CustomFilterHandler.js +131 -0
- package/lib/filters/FilterCustomFieldHandler.d.ts +2 -0
- package/lib/filters/FilterCustomFieldHandler.js +2 -0
- package/lib/filters/FilterService.d.ts +82 -0
- package/lib/filters/FilterService.js +323 -0
- package/lib/filters/index.d.ts +6 -0
- package/lib/filters/index.js +4 -0
- package/lib/history-actions/AbstractHistoryAdapter.d.ts +5 -4
- package/lib/history-actions/AbstractHistoryAdapter.js +45 -30
- package/lib/history-actions/DefaultHistoryAdapter.d.ts +2 -0
- package/lib/history-actions/DefaultHistoryAdapter.js +12 -6
- package/lib/history-actions/HistoryHandler.js +1 -1
- package/lib/list-query-builder/ListQueryBuilder.d.ts +117 -0
- package/lib/list-query-builder/ListQueryBuilder.js +707 -0
- package/lib/media-manager/AbstractMediaManager.d.ts +9 -8
- package/lib/media-manager/DefaultMediaManager.d.ts +2 -0
- package/lib/media-manager/DefaultMediaManager.js +27 -15
- package/lib/media-manager/Items.d.ts +4 -1
- package/lib/media-manager/Items.js +62 -59
- package/lib/media-manager/MediaManagerHandler.js +1 -1
- package/lib/media-manager/helpers/MediaManagerHelper.d.ts +5 -1
- package/lib/media-manager/helpers/MediaManagerHelper.js +38 -4
- package/lib/model/AbstractModel.d.ts +33 -25
- package/lib/model/AbstractModel.js +54 -2
- package/lib/model/InternalModelAccessFactory.d.ts +18 -0
- package/lib/model/InternalModelAccessFactory.js +82 -0
- package/lib/model/ModelHandler.d.ts +6 -0
- package/lib/model/ModelHandler.js +14 -0
- package/lib/model/adapter/sequelize.d.ts +32 -10
- package/lib/model/adapter/sequelize.js +409 -62
- package/lib/model/adapter/typeorm.d.ts +62 -0
- package/lib/model/adapter/typeorm.js +777 -0
- package/lib/model/internalModelAccessToken.d.ts +1 -0
- package/lib/model/internalModelAccessToken.js +1 -0
- package/lib/model/internalModelRepository.d.ts +3 -0
- package/lib/model/internalModelRepository.js +4 -0
- package/lib/notifications/AbstractNotificationService.d.ts +3 -0
- package/lib/notifications/AbstractNotificationService.js +42 -36
- package/lib/notifications/GeneralNotificationService.js +37 -40
- package/lib/notifications/SystemNotificationService.js +33 -36
- package/lib/requestProcessor.js +0 -3
- package/lib/ui-i18n/getUiTranslations.d.ts +1 -0
- package/lib/ui-i18n/getUiTranslations.js +3 -0
- package/lib/ui-i18n/uiTranslationKeys.d.ts +6 -0
- package/lib/ui-i18n/uiTranslationKeys.js +268 -0
- package/lib/widgets/widgetHandler.d.ts +7 -2
- package/lib/widgets/widgetHandler.js +98 -18
- package/models/FilterAP.d.ts +116 -0
- package/models/FilterAP.js +68 -0
- package/models/FilterColumnAP.d.ts +32 -0
- package/models/FilterColumnAP.js +21 -0
- package/models/GroupAP.d.ts +1 -1
- package/models/HistoryActionsAP.d.ts +3 -3
- package/models/MediaManagerMetaAP.d.ts +1 -1
- package/models/NavigationAP.d.ts +1 -1
- package/models/UserAP.d.ts +6 -1
- package/models/UserAP.js +4 -0
- package/package.json +39 -32
- package/policies/authPolicies.d.ts +12 -0
- package/policies/authPolicies.js +104 -0
- package/policies/permissionResolvers.d.ts +12 -0
- package/policies/permissionResolvers.js +52 -0
- package/services/FeedService.d.ts +70 -0
- package/services/FeedService.js +334 -0
- package/system/Router.d.ts +1 -0
- package/system/Router.js +136 -59
- package/system/bindAccessRights.js +11 -30
- package/system/bindAuthorization.js +18 -18
- package/system/bindCors.js +16 -1
- package/system/bindCustomFilterHandlers.d.ts +2 -0
- package/system/bindCustomFilterHandlers.js +4 -0
- package/system/bindInertia.js +18 -61
- package/system/bindReqFunctions.js +10 -2
- package/system/bindTranslations.js +7 -3
- package/system/buildInternalModelAccess.d.ts +4 -0
- package/system/buildInternalModelAccess.js +59 -0
- package/system/defaults.js +18 -14
- package/system/routePolicies.d.ts +2 -0
- package/system/routePolicies.js +29 -0
- package/translations/en.json +151 -39
- package/translations/ru.json +211 -64
- package/ui/components/handsontable.js +13 -27
- package/ui/components/ui/dialog-stack.js +1 -3
- package/ui/components/ui/popover.js +1 -1
- package/ui/components/ui/sidebar.js +1 -1
- package/assets/RelationDialogStack-D9UVEF9s.js +0 -407
- package/assets/RelationDialogStack-DV8OITPR.css +0 -4
- package/assets/add-BlvzWQKF.js +0 -1
- package/assets/add-group-1Uoq9NWe.js +0 -1
- package/assets/add-group-form-B01gwDGu.js +0 -1
- package/assets/add-user-BQCAsaRy.js +0 -1
- package/assets/add-user-form-Cgwc9JkI.js +0 -1
- package/assets/app-DaOMy1nl.css +0 -72
- package/assets/app-layout-CAm60qoE.js +0 -1
- package/assets/app-shell-QWCtn9ye.js +0 -1
- package/assets/app-sidebar-CfaYbnSy.js +0 -1
- package/assets/app-sidebar-header-BsPFDhZ8.js +0 -1
- package/assets/breadcrumbs-CZZirDj8.js +0 -1
- package/assets/catalog-k5myk7fk.js +0 -6
- package/assets/dashboard-BkL9ybBw.js +0 -3
- package/assets/date-picker-B5AZ_7Q9.js +0 -1
- package/assets/del-modal-BoyXZloG.js +0 -1
- package/assets/dynamic-controls-k61T9W2P.js +0 -1
- package/assets/form-1WGY0YgG.js +0 -1
- package/assets/form-DJapG3qF.js +0 -1
- package/assets/geo-json-DsMUHo0l.js +0 -4
- package/assets/handsontable-PxYdjN8c.js +0 -298
- package/assets/history-CluyR-yJ.js +0 -1
- package/assets/home-Dug9zBzM.js +0 -2
- package/assets/icon-DfDLMG5f.js +0 -1
- package/assets/init-user-CF80MEnT.js +0 -1
- package/assets/input-error-DuuqFgZa.js +0 -1
- package/assets/jsoneditor-De1FvcYu.js +0 -3882
- package/assets/list-CuexshNt.js +0 -1
- package/assets/list-table-BsEWjTKY.js +0 -22
- package/assets/login-eDemYzN-.js +0 -1
- package/assets/material-icon-DMT8KdmE.js +0 -1
- package/assets/media-manager-DfYa_mT_.js +0 -14
- package/assets/module-Cd4Tm6uq.js +0 -1
- package/assets/monaco-BhBYtg3d.js +0 -11
- package/assets/nav-footer-D3olYxtz.js +0 -1
- package/assets/nav-main-BctqyzeV.js +0 -1
- package/assets/nav-user-Bn1Lt-BZ.js +0 -1
- package/assets/notification-D64qvni-.js +0 -27
- package/assets/pagination-render-DxD78ahJ.js +0 -1
- package/assets/register-349PwYbe.js +0 -1
- package/assets/theme-switcher-DfExsHW2.js +0 -1
- package/assets/toast-editor-ESK5iWPx.js +0 -845
- package/assets/user-info-DtBK5Kh8.js +0 -1
- package/assets/user-menu-content-0XYOCMaA.js +0 -1
- package/assets/welcome-PDp-gUei.js +0 -1
- package/controllers/form.d.ts +0 -1
- package/controllers/form.js +0 -86
- package/helpers/formHelper.d.ts +0 -6
- package/helpers/formHelper.js +0 -38
- package/helpers/inertiaFromHelper.d.ts +0 -11
- package/helpers/inertiaFromHelper.js +0 -98
- package/helpers/runtimeMode.d.ts +0 -1
- package/helpers/runtimeMode.js +0 -3
- package/lib/PolicyManager.d.ts +0 -8
- package/lib/PolicyManager.js +0 -53
- package/lib/datatable/NodeTable.d.ts +0 -49
- package/lib/datatable/NodeTable.js +0 -207
- package/lib/model/adapter/waterline.d.ts +0 -32
- package/lib/model/adapter/waterline.js +0 -180
- package/migrations/index.d.ts +0 -3
- package/migrations/index.js +0 -4
- package/migrations/knex/20250106000001_adminizer_init.d.ts +0 -8
- package/migrations/knex/20250106000001_adminizer_init.js +0 -164
- package/migrations/umzug/0001.d.ts +0 -7
- package/migrations/umzug/0001.js +0 -121
- package/migrations/umzugExports.d.ts +0 -2
- package/migrations/umzugExports.js +0 -9
- package/system/bindForms.d.ts +0 -2
- package/system/bindForms.js +0 -20
- /package/{policies → middlewares}/addMessages.d.ts +0 -0
- /package/{policies → middlewares}/addMessages.js +0 -0
- /package/{policies → middlewares}/checkAuth.d.ts +0 -0
- /package/{policies → middlewares}/checkAuth.js +0 -0
- /package/{policies → middlewares}/setLocale.d.ts +0 -0
- /package/{policies → middlewares}/setLocale.js +0 -0
|
@@ -1,845 +0,0 @@
|
|
|
1
|
-
import{aw as JZ,ax as YZ,j as Tv}from"./app.js";import{e as Lo,r as ko}from"./handsontable-PxYdjN8c.js";import{k as XZ,j as ZZ,g as QZ}from"./jsoneditor-De1FvcYu.js";import"./monaco-BhBYtg3d.js";function Dr(r){this.content=r}Dr.prototype={constructor:Dr,find:function(r){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===r)return e;return-1},get:function(r){var e=this.find(r);return e==-1?void 0:this.content[e+1]},update:function(r,e,t){var n=t&&t!=r?this.remove(t):this,i=n.find(r),a=n.content.slice();return i==-1?a.push(t||r,e):(a[i+1]=e,t&&(a[i]=t)),new Dr(a)},remove:function(r){var e=this.find(r);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Dr(t)},addToStart:function(r,e){return new Dr([r,e].concat(this.remove(r).content))},addToEnd:function(r,e){var t=this.remove(r).content.slice();return t.push(r,e),new Dr(t)},addBefore:function(r,e,t){var n=this.remove(e),i=n.content.slice(),a=n.find(r);return i.splice(a==-1?i.length:a,0,e,t),new Dr(i)},forEach:function(r){for(var e=0;e<this.content.length;e+=2)r(this.content[e],this.content[e+1])},prepend:function(r){return r=Dr.from(r),r.size?new Dr(r.content.concat(this.subtract(r).content)):this},append:function(r){return r=Dr.from(r),r.size?new Dr(this.subtract(r).content.concat(r.content)):this},subtract:function(r){var e=this;r=Dr.from(r);for(var t=0;t<r.content.length;t+=2)e=e.remove(r.content[t]);return e},toObject:function(){var r={};return this.forEach(function(e,t){r[e]=t}),r},get size(){return this.content.length>>1}};Dr.from=function(r){if(r instanceof Dr)return r;var e=[];if(r)for(var t in r)e.push(t,r[t]);return new Dr(e)};function Xy(r,e,t){for(let n=0;;n++){if(n==r.childCount||n==e.childCount)return r.childCount==e.childCount?null:t;let i=r.child(n),a=e.child(n);if(i==a){t+=i.nodeSize;continue}if(!i.sameMarkup(a))return t;if(i.isText&&i.text!=a.text){for(let o=0;i.text[o]==a.text[o];o++)t++;return t}if(i.content.size||a.content.size){let o=Xy(i.content,a.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function Zy(r,e,t,n){for(let i=r.childCount,a=e.childCount;;){if(i==0||a==0)return i==a?null:{a:t,b:n};let o=r.child(--i),s=e.child(--a),l=o.nodeSize;if(o==s){t-=l,n-=l;continue}if(!o.sameMarkup(s))return{a:t,b:n};if(o.isText&&o.text!=s.text){let f=0,p=Math.min(o.text.length,s.text.length);for(;f<p&&o.text[o.text.length-f-1]==s.text[s.text.length-f-1];)f++,t--,n--;return{a:t,b:n}}if(o.content.size||s.content.size){let f=Zy(o.content,s.content,t-1,n-1);if(f)return f}t-=l,n-=l}}class De{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,i=0,a){for(let o=0,s=0;s<t;o++){let l=this.content[o],f=s+l.nodeSize;if(f>e&&n(l,i+s,a||null,o)!==!1&&l.content.size){let p=s+1;l.nodesBetween(Math.max(0,e-p),Math.min(l.content.size,t-p),n,i+p)}s=f}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,i){let a="",o=!0;return this.nodesBetween(e,t,(s,l)=>{let f=s.isText?s.text.slice(Math.max(e,l)-l,t-l):s.isLeaf?i?typeof i=="function"?i(s):i:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&f||s.isTextblock)&&n&&(o?o=!1:a+=n),a+=f},0),a}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,i=this.content.slice(),a=0;for(t.isText&&t.sameMarkup(n)&&(i[i.length-1]=t.withText(t.text+n.text),a=1);a<e.content.length;a++)i.push(e.content[a]);return new De(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let n=[],i=0;if(t>e)for(let a=0,o=0;o<t;a++){let s=this.content[a],l=o+s.nodeSize;l>e&&((o<e||l>t)&&(s.isText?s=s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s=s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),n.push(s),i+=s.nodeSize),o=l}return new De(n,i)}cutByIndex(e,t){return e==t?De.empty:e==0&&t==this.content.length?this:new De(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let i=this.content.slice(),a=this.size+t.nodeSize-n.nodeSize;return i[e]=t,new De(i,a)}addToStart(e){return new De([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new De(this.content.concat(e),this.size+e.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 new 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 i=this.content[t];e(i,n,t),n+=i.nodeSize}}findDiffStart(e,t=0){return Xy(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Zy(this,e,t,n)}findIndex(e){if(e==0)return Ll(0,e);if(e==this.size)return Ll(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let i=this.child(t),a=n+i.nodeSize;if(a>=e)return a==e?Ll(t+1,a):Ll(t,n);n=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return De.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new De(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return De.empty;let t,n=0;for(let i=0;i<e.length;i++){let a=e[i];n+=a.nodeSize,i&&a.isText&&e[i-1].sameMarkup(a)?(t||(t=e.slice(0,i)),t[t.length-1]=a.withText(t[t.length-1].text+a.text)):t&&t.push(a)}return new De(t||e,n)}static from(e){if(!e)return De.empty;if(e instanceof De)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new De([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}De.empty=new De([],0);const Af={index:0,offset:0};function Ll(r,e){return Af.index=r,Af.offset=e,Af}function nu(r,e){if(r===e)return!0;if(!(r&&typeof r=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(r);if(Array.isArray(e)!=t)return!1;if(t){if(r.length!=e.length)return!1;for(let n=0;n<r.length;n++)if(!nu(r[n],e[n]))return!1}else{for(let n in r)if(!(n in e)||!nu(r[n],e[n]))return!1;for(let n in e)if(!(n in r))return!1}return!0}let Bt=class md{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let i=0;i<e.length;i++){let a=e[i];if(this.eq(a))return e;if(this.type.excludes(a.type))t||(t=e.slice(0,i));else{if(a.type.excludes(this.type))return e;!n&&a.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),n=!0),t&&t.push(a)}}return t||(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&&nu(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 new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=n.create(t.attrs);return n.checkAttrs(i.attrs),i}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(e){if(!e||Array.isArray(e)&&e.length==0)return md.none;if(e instanceof md)return[e];let t=e.slice();return t.sort((n,i)=>n.type.rank-i.type.rank),t}};Bt.none=[];class iu extends Error{}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(e,t){let n=eb(this.content,e+this.openStart,t);return n&&new $e(n,this.openStart,this.openEnd)}removeBetween(e,t){return new $e(Qy(this.content,e+this.openStart,t+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(e,t){if(!t)return $e.empty;let n=t.openStart||0,i=t.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new $e(De.fromJSON(e,t.content),n,i)}static maxOpen(e,t=!0){let n=0,i=0;for(let a=e.firstChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.firstChild)n++;for(let a=e.lastChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.lastChild)i++;return new $e(e,n,i)}}$e.empty=new $e(De.empty,0,0);function Qy(r,e,t){let{index:n,offset:i}=r.findIndex(e),a=r.maybeChild(n),{index:o,offset:s}=r.findIndex(t);if(i==e||a.isText){if(s!=t&&!r.child(o).isText)throw new RangeError("Removing non-flat range");return r.cut(0,e).append(r.cut(t))}if(n!=o)throw new RangeError("Removing non-flat range");return r.replaceChild(n,a.copy(Qy(a.content,e-i-1,t-i-1)))}function eb(r,e,t,n){let{index:i,offset:a}=r.findIndex(e),o=r.maybeChild(i);if(a==e||o.isText)return n&&!n.canReplace(i,i,t)?null:r.cut(0,e).append(t).append(r.cut(e));let s=eb(o.content,e-a-1,t,o);return s&&r.replaceChild(i,o.copy(s))}function eQ(r,e,t){if(t.openStart>r.depth)throw new iu("Inserted content deeper than insertion position");if(r.depth-t.openStart!=e.depth-t.openEnd)throw new iu("Inconsistent open depths");return tb(r,e,t,0)}function tb(r,e,t,n){let i=r.index(n),a=r.node(n);if(i==e.index(n)&&n<r.depth-t.openStart){let o=tb(r,e,t,n+1);return a.copy(a.content.replaceChild(i,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&r.depth==n&&e.depth==n){let o=r.parent,s=o.content;return _a(o,s.cut(0,r.parentOffset).append(t.content).append(s.cut(e.parentOffset)))}else{let{start:o,end:s}=tQ(t,r);return _a(a,nb(r,o,s,e,n))}else return _a(a,au(r,e,n))}function rb(r,e){if(!e.type.compatibleContent(r.type))throw new iu("Cannot join "+e.type.name+" onto "+r.type.name)}function gd(r,e,t){let n=r.node(t);return rb(n,e.node(t)),n}function Ha(r,e){let t=e.length-1;t>=0&&r.isText&&r.sameMarkup(e[t])?e[t]=r.withText(e[t].text+r.text):e.push(r)}function Ts(r,e,t,n){let i=(e||r).node(t),a=0,o=e?e.index(t):i.childCount;r&&(a=r.index(t),r.depth>t?a++:r.textOffset&&(Ha(r.nodeAfter,n),a++));for(let s=a;s<o;s++)Ha(i.child(s),n);e&&e.depth==t&&e.textOffset&&Ha(e.nodeBefore,n)}function _a(r,e){return r.type.checkContent(e),r.copy(e)}function nb(r,e,t,n,i){let a=r.depth>i&&gd(r,e,i+1),o=n.depth>i&&gd(t,n,i+1),s=[];return Ts(null,r,i,s),a&&o&&e.index(i)==t.index(i)?(rb(a,o),Ha(_a(a,nb(r,e,t,n,i+1)),s)):(a&&Ha(_a(a,au(r,e,i+1)),s),Ts(e,t,i,s),o&&Ha(_a(o,au(t,n,i+1)),s)),Ts(n,null,i,s),new De(s)}function au(r,e,t){let n=[];if(Ts(null,r,t,n),r.depth>t){let i=gd(r,e,t+1);Ha(_a(i,au(r,e,t+1)),n)}return Ts(e,null,t,n),new De(n)}function tQ(r,e){let t=e.depth-r.openStart,i=e.node(t).copy(r.content);for(let a=t-1;a>=0;a--)i=e.node(a).copy(De.from(i));return{start:i.resolveNoCache(r.openStart+t),end:i.resolveNoCache(i.content.size-r.openEnd-t)}}class Os{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 new 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 new 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],i=e.child(t);return n?e.child(t).cut(n):i}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],i=t==0?0:this.path[t*3-1]+1;for(let a=0;a<e;a++)i+=n.child(a).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Bt.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),i=e.maybeChild(t);if(!n){let s=n;n=i,i=s}let a=n.marks;for(var o=0;o<a.length;o++)a[o].type.spec.inclusive===!1&&(!i||!a[o].isInSet(i.marks))&&(a=a[o--].removeFromSet(a));return a}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,i=e.parent.maybeChild(e.index());for(var a=0;a<n.length;a++)n[a].type.spec.inclusive===!1&&(!i||!n[a].isInSet(i.marks))&&(n=n[a--].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 ou(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(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],i=0,a=t;for(let o=e;;){let{index:s,offset:l}=o.content.findIndex(a),f=a-l;if(n.push(o,s,i+l),!f||(o=o.child(s),o.isText))break;a=f-1,i+=l+1}return new Os(t,n,a)}static resolveCached(e,t){let n=Sv.get(e);if(n)for(let a=0;a<n.elts.length;a++){let o=n.elts[a];if(o.pos==t)return o}else Sv.set(e,n=new rQ);let i=n.elts[n.i]=Os.resolve(e,t);return n.i=(n.i+1)%nQ,i}}class rQ{constructor(){this.elts=[],this.i=0}}const nQ=12,Sv=new WeakMap;class ou{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)}}const iQ=Object.create(null);let na=class yd{constructor(e,t,n,i=Bt.none){this.type=e,this.attrs=t,this.marks=i,this.content=n||De.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,i=0){this.content.nodesBetween(e,t,n,i,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,i){return this.content.textBetween(e,t,n,i)}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&&nu(this.attrs,t||e.defaultAttrs||iQ)&&Bt.sameSet(this.marks,n||Bt.none)}copy(e=null){return e==this.content?this:new yd(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new yd(this.type,this.attrs,this.content,e)}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 $e.empty;let i=this.resolve(e),a=this.resolve(t),o=n?0:i.sharedDepth(t),s=i.start(o),f=i.node(o).content.cut(i.pos-s,a.pos-s);return new $e(f,i.depth-o,a.depth-o)}replace(e,t,n){return eQ(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(i==e||t.isText)return t;e-=i+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 i=this.content.child(t-1);return{node:i,index:t-1,offset:n-i.nodeSize}}resolve(e){return Os.resolveCached(this,e)}resolveNoCache(e){return Os.resolve(this,e)}rangeHasMark(e,t,n){let i=!1;return t>e&&this.nodesBetween(e,t,a=>(n.isInSet(a.marks)&&(i=!0),!i)),i}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()+")"),ib(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=De.empty,i=0,a=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,i,a),s=o&&o.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let l=i;l<a;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(e,t,n,i){if(i&&!this.type.allowsMarks(i))return!1;let a=this.contentMatchAt(e).matchType(n),o=a&&a.matchFragment(this.content,t);return o?o.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),this.type.checkAttrs(this.attrs);let e=Bt.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!Bt.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.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(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let i=De.fromJSON(e,t.content),a=e.nodeType(t.type).create(t.attrs,i,n);return a.type.checkAttrs(a.attrs),a}};na.prototype.text=void 0;class su extends na{constructor(e,t,n,i){if(super(e,t,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ib(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(e){return e==this.marks?this:new su(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new su(this.type,this.attrs,e,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 ib(r,e){for(let t=r.length-1;t>=0;t--)e=r[t].type.name+"("+e+")";return e}class $a{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new aQ(e,t);if(n.next==null)return $a.empty;let i=ab(n);n.next&&n.err("Unexpected trailing text");let a=dQ(fQ(i));return hQ(a,n),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 i=this;for(let a=t;i&&a<n;a++)i=i.matchType(e.child(a).type);return i}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 i=[this];function a(o,s){let l=o.matchFragment(e,n);if(l&&(!t||l.validEnd))return De.from(s.map(f=>f.createAndFill()));for(let f=0;f<o.next.length;f++){let{type:p,next:b}=o.next[f];if(!(p.isText||p.hasRequiredAttrs())&&i.indexOf(b)==-1){i.push(b);let T=a(b,s.concat(p));if(T)return T}}return null}return a(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+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 i=n.shift(),a=i.match;if(a.matchType(e)){let o=[];for(let s=i;s.type;s=s.via)o.push(s.type);return o.reverse()}for(let o=0;o<a.next.length;o++){let{type:s,next:l}=a.next[o];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in t)&&(!i.type||l.validEnd)&&(n.push({match:s.contentMatch,type:s,via:i}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new 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 i=0;i<n.next.length;i++)e.indexOf(n.next[i].next)==-1&&t(n.next[i].next)}return t(this),e.map((n,i)=>{let a=i+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)a+=(o?", ":"")+n.next[o].type.name+"->"+e.indexOf(n.next[o].next);return a}).join(`
|
|
2
|
-
`)}}$a.empty=new $a(!0);class aQ{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 new SyntaxError(e+" (in content expression '"+this.string+"')")}}function ab(r){let e=[];do e.push(oQ(r));while(r.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function oQ(r){let e=[];do e.push(sQ(r));while(r.next&&r.next!=")"&&r.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function sQ(r){let e=cQ(r);for(;;)if(r.eat("+"))e={type:"plus",expr:e};else if(r.eat("*"))e={type:"star",expr:e};else if(r.eat("?"))e={type:"opt",expr:e};else if(r.eat("{"))e=lQ(r,e);else break;return e}function xv(r){/\D/.test(r.next)&&r.err("Expected number, got '"+r.next+"'");let e=Number(r.next);return r.pos++,e}function lQ(r,e){let t=xv(r),n=t;return r.eat(",")&&(r.next!="}"?n=xv(r):n=-1),r.eat("}")||r.err("Unclosed braced range"),{type:"range",min:t,max:n,expr:e}}function uQ(r,e){let t=r.nodeTypes,n=t[e];if(n)return[n];let i=[];for(let a in t){let o=t[a];o.isInGroup(e)&&i.push(o)}return i.length==0&&r.err("No node type or group '"+e+"' found"),i}function cQ(r){if(r.eat("(")){let e=ab(r);return r.eat(")")||r.err("Missing closing paren"),e}else if(/\W/.test(r.next))r.err("Unexpected token '"+r.next+"'");else{let e=uQ(r,r.next).map(t=>(r.inline==null?r.inline=t.isInline:r.inline!=t.isInline&&r.err("Mixing inline and block content"),{type:"name",value:t}));return r.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function fQ(r){let e=[[]];return i(a(r,0),t()),e;function t(){return e.push([])-1}function n(o,s,l){let f={term:l,to:s};return e[o].push(f),f}function i(o,s){o.forEach(l=>l.to=s)}function a(o,s){if(o.type=="choice")return o.exprs.reduce((l,f)=>l.concat(a(f,s)),[]);if(o.type=="seq")for(let l=0;;l++){let f=a(o.exprs[l],s);if(l==o.exprs.length-1)return f;i(f,s=t())}else if(o.type=="star"){let l=t();return n(s,l),i(a(o.expr,l),l),[n(l)]}else if(o.type=="plus"){let l=t();return i(a(o.expr,s),l),i(a(o.expr,l),l),[n(l)]}else{if(o.type=="opt")return[n(s)].concat(a(o.expr,s));if(o.type=="range"){let l=s;for(let f=0;f<o.min;f++){let p=t();i(a(o.expr,l),p),l=p}if(o.max==-1)i(a(o.expr,l),l);else for(let f=o.min;f<o.max;f++){let p=t();n(l,p),i(a(o.expr,l),p),l=p}return[n(l)]}else{if(o.type=="name")return[n(s,void 0,o.value)];throw new Error("Unknown expr type")}}}}function ob(r,e){return e-r}function Ev(r,e){let t=[];return n(e),t.sort(ob);function n(i){let a=r[i];if(a.length==1&&!a[0].term)return n(a[0].to);t.push(i);for(let o=0;o<a.length;o++){let{term:s,to:l}=a[o];!s&&t.indexOf(l)==-1&&n(l)}}}function dQ(r){let e=Object.create(null);return t(Ev(r,0));function t(n){let i=[];n.forEach(o=>{r[o].forEach(({term:s,to:l})=>{if(!s)return;let f;for(let p=0;p<i.length;p++)i[p][0]==s&&(f=i[p][1]);Ev(r,l).forEach(p=>{f||i.push([s,f=[]]),f.indexOf(p)==-1&&f.push(p)})})});let a=e[n.join(",")]=new $a(n.indexOf(r.length-1)>-1);for(let o=0;o<i.length;o++){let s=i[o][1].sort(ob);a.next.push({type:i[o][0],next:e[s.join(",")]||t(s)})}return a}}function hQ(r,e){for(let t=0,n=[r];t<n.length;t++){let i=n[t],a=!i.validEnd,o=[];for(let s=0;s<i.next.length;s++){let{type:l,next:f}=i.next[s];o.push(l.name),a&&!(l.isText||l.hasRequiredAttrs())&&(a=!1),n.indexOf(f)==-1&&n.push(f)}a&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function sb(r){let e=Object.create(null);for(let t in r){let n=r[t];if(!n.hasDefault)return null;e[t]=n.default}return e}function lb(r,e){let t=Object.create(null);for(let n in r){let i=e&&e[n];if(i===void 0){let a=r[n];if(a.hasDefault)i=a.default;else throw new RangeError("No value supplied for attribute "+n)}t[n]=i}return t}function ub(r,e,t,n){for(let i in e)if(!(i in r))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);for(let i in r){let a=r[i];a.validate&&a.validate(e[i])}}function cb(r,e){let t=Object.create(null);if(e)for(let n in e)t[n]=new vQ(r,n,e[n]);return t}let Mv=class fb{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=cb(e,n.attrs),this.defaultAttrs=sb(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==$a.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:lb(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new na(this,this.computeAttrs(e),De.from(t),Bt.setFrom(n))}createChecked(e=null,t,n){return t=De.from(t),this.checkContent(t),new na(this,this.computeAttrs(e),t,Bt.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=De.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),a=i&&i.fillBefore(De.empty,!0);return a?new na(this,e,t.append(a),Bt.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){ub(this.attrs,e,"node",this.name)}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||(t=e.slice(0,n));return t?t.length?t:Bt.none:e}static compile(e,t){let n=Object.create(null);e.forEach((a,o)=>n[a]=new fb(a,t,o));let i=t.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let a in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function pQ(r,e,t){let n=t.split("|");return i=>{let a=i===null?"null":typeof i;if(n.indexOf(a)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${r}, got ${a}`)}}class vQ{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?pQ(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class Lu{constructor(e,t,n,i){this.name=e,this.rank=t,this.schema=n,this.spec=i,this.attrs=cb(e,i.attrs),this.excluded=null;let a=sb(this.attrs);this.instance=a?new Bt(this,a):null}create(e=null){return!e&&this.instance?this.instance:new Bt(this,lb(this.attrs,e))}static compile(e,t){let n=Object.create(null),i=0;return e.forEach((a,o)=>n[a]=new Lu(a,i++,t,o)),n}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]}checkAttrs(e){ub(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class db{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=Dr.from(e.nodes),t.marks=Dr.from(e.marks||{}),this.nodes=Mv.compile(this.spec.nodes,this),this.marks=Lu.compile(this.spec.marks,this);let n=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let a=this.nodes[i],o=a.spec.content||"",s=a.spec.marks;if(a.contentMatch=n[o]||(n[o]=$a.parse(o,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=s=="_"?null:s?Av(this,s.split(" ")):s==""||!a.inlineContent?[]:null}for(let i in this.marks){let a=this.marks[i],o=a.spec.excludes;a.excluded=o==null?[a]:o==""?[]:Av(this,o.split(" "))}this.nodeFromJSON=i=>na.fromJSON(this,i),this.markFromJSON=i=>Bt.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Mv){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,n,i)}text(e,t){let n=this.nodes.text;return new su(n,n.defaultAttrs,e,Bt.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 new RangeError("Unknown node type: "+e);return t}}function Av(r,e){let t=[];for(let n=0;n<e.length;n++){let i=e[n],a=r.marks[i],o=a;if(a)t.push(a);else for(let s in r.marks){let l=r.marks[s];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&t.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return t}function mQ(r){return r.tag!=null}function gQ(r){return r.style!=null}class Wa{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(i=>{if(mQ(i))this.tags.push(i);else if(gQ(i)){let a=/[^=]*/.exec(i.style)[0];n.indexOf(a)<0&&n.push(a),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let a=e.nodes[i.node];return a.contentMatch.matchType(a)})}parse(e,t={}){let n=new Nv(this,t,!1);return n.addAll(e,Bt.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Nv(this,t,!0);return n.addAll(e,Bt.none,t.from,t.to),$e.maxOpen(n.finish())}matchTag(e,t,n){for(let i=n?this.tags.indexOf(n)+1:0;i<this.tags.length;i++){let a=this.tags[i];if(kQ(e,a.tag)&&(a.namespace===void 0||e.namespaceURI==a.namespace)&&(!a.context||t.matchesContext(a.context))){if(a.getAttrs){let o=a.getAttrs(e);if(o===!1)continue;a.attrs=o||void 0}return a}}}matchStyle(e,t,n,i){for(let a=i?this.styles.indexOf(i)+1:0;a<this.styles.length;a++){let o=this.styles[a],s=o.style;if(!(s.indexOf(e)!=0||o.context&&!n.matchesContext(o.context)||s.length>e.length&&(s.charCodeAt(e.length)!=61||s.slice(e.length+1)!=t))){if(o.getAttrs){let l=o.getAttrs(t);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let t=[];function n(i){let a=i.priority==null?50:i.priority,o=0;for(;o<t.length;o++){let s=t[o];if((s.priority==null?50:s.priority)<a)break}t.splice(o,0,i)}for(let i in e.marks){let a=e.marks[i].spec.parseDOM;a&&a.forEach(o=>{n(o=Dv(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let a=e.nodes[i].spec.parseDOM;a&&a.forEach(o=>{n(o=Dv(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Wa(e,Wa.schemaRules(e)))}}const hb={address:!0,article:!0,aside:!0,blockquote:!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},yQ={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},pb={ol:!0,ul:!0},Ns=1,bd=2,Ss=4;function Ov(r,e,t){return e!=null?(e?Ns:0)|(e==="full"?bd:0):r&&r.whitespace=="pre"?Ns|bd:t&~Ss}class Rl{constructor(e,t,n,i,a,o){this.type=e,this.attrs=t,this.marks=n,this.solid=i,this.options=o,this.content=[],this.activeMarks=Bt.none,this.match=a||(o&Ss?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(De.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(e.type))?(this.match=n,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Ns)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let a=n;n.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-i[0].length))}}let t=De.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(De.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&&!hb.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Nv{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let i=t.topNode,a,o=Ov(null,t.preserveWhitespace,0)|(n?Ss:0);i?a=new Rl(i.type,i.attrs,Bt.none,!0,t.topMatch||i.type.contentMatch,o):n?a=new Rl(null,null,Bt.none,!0,null,o):a=new Rl(e.schema.topNodeType,null,Bt.none,!0,null,o),this.nodes=[a],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,i=this.top,a=i.options&bd?"full":this.localPreserveWS||(i.options&Ns)>0,{schema:o}=this.parser;if(a==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(a)if(a==="full")n=n.replace(/\r\n?/g,`
|
|
3
|
-
`);else if(o.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(o.linebreakReplacement.create())){let s=n.split(/\r?\n|\r/);for(let l=0;l<s.length;l++)l&&this.insertNode(o.linebreakReplacement.create(),t,!0),s[l]&&this.insertNode(o.text(s[l]),t,!/\S/.test(s[l]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let s=i.content[i.content.length-1],l=e.previousSibling;(!s||l&&l.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(n=n.slice(1))}n&&this.insertNode(o.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let i=this.localPreserveWS,a=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),s;pb.hasOwnProperty(o)&&this.parser.normalizeLists&&bQ(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,n));e:if(l?l.ignore:yQ.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let f,p=this.needsBlock;if(hb.hasOwnProperty(o))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),f=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let b=l&&l.skip?t:this.readStyles(e,t);b&&this.addAll(e,b),f&&this.sync(a),this.needsBlock=p}else{let f=this.readStyles(e,t);f&&this.addElementByRule(e,l,f,l.consuming===!1?s:void 0)}this.localPreserveWS=i}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
|
-
`),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 i=0;i<this.parser.matchedStyles.length;i++){let a=this.parser.matchedStyles[i],o=n.getPropertyValue(a);if(o)for(let s=void 0;;){let l=this.parser.matchStyle(a,o,this,s);if(!l)break;if(l.ignore)return null;if(l.clearMark?t=t.filter(f=>!l.clearMark(f)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return t}addElementByRule(e,t,n,i){let a,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),n,e.nodeName=="BR")||this.leafFallback(e,n);else{let l=this.enter(o,t.attrs||null,n,t.preserveWhitespace);l&&(a=!0,n=l)}else{let l=this.parser.schema.marks[t.mark];n=n.concat(l.create(t.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,n,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,n,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,n),this.findAround(e,l,!1)}a&&this.sync(s)&&this.open--}addAll(e,t,n,i){let a=n||0;for(let o=n?e.childNodes[n]:e.firstChild,s=i==null?null:e.childNodes[i];o!=s;o=o.nextSibling,++a)this.findAtPoint(e,a),this.addDOM(o,t);this.findAtPoint(e,a)}findPlace(e,t,n){let i,a;for(let o=this.open,s=0;o>=0;o--){let l=this.nodes[o],f=l.findWrapping(e);if(f&&(!i||i.length>f.length+s)&&(i=f,a=l,!f.length))break;if(l.solid){if(n)break;s+=2}}if(!i)return null;this.sync(a);for(let o=0;o<i.length;o++)t=this.enterInner(i[o],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(t=this.enterInner(a,null,t))}let i=this.findPlace(e,t,n);if(i){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(e.type));let o=Bt.none;for(let s of i.concat(e.marks))(a.type?a.type.allowsMarkType(s.type):Lv(s.type,e.type))&&(o=s.addToSet(o));return a.content.push(e.mark(o)),!0}return!1}enter(e,t,n,i){let a=this.findPlace(e.create(t),n,!1);return a&&(a=this.enterInner(e,t,n,!0,i)),a}enterInner(e,t,n,i=!1,a){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let s=Ov(e,a,o.options);o.options&Ss&&o.content.length==0&&(s|=Ss);let l=Bt.none;return n=n.filter(f=>(o.type?o.type.allowsMarkType(f.type):Lv(f.type,e))?(l=f.addToSet(l),!1):!0),this.nodes.push(new Rl(e,t,l,i,null,s)),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;this.localPreserveWS&&(this.nodes[t].options|=Ns)}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 i=n.length-1;i>=0;i--)e+=n[i].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 i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(n?2:4)&&(this.find[i].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,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),a=-(n?n.depth+1:0)+(i?0:1),o=(s,l)=>{for(;s>=0;s--){let f=t[s];if(f==""){if(s==t.length-1||s==0)continue;for(;l>=a;l--)if(o(s-1,l))return!0;return!1}else{let p=l>0||l==0&&i?this.nodes[l].type:n&&l>=a?n.node(l-a).type:null;if(!p||p.name!=f&&!p.isInGroup(f))return!1;l--}}return!0};return o(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 t in this.parser.schema.nodes){let n=this.parser.schema.nodes[t];if(n.isTextblock&&n.defaultAttrs)return n}}}function bQ(r){for(let e=r.firstChild,t=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&pb.hasOwnProperty(n)&&t?(t.appendChild(e),e=t):n=="li"?t=e:n&&(t=null)}}function kQ(r,e){return(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,e)}function Dv(r){let e={};for(let t in r)e[t]=r[t];return e}function Lv(r,e){let t=e.schema.nodes;for(let n in t){let i=t[n];if(!i.allowsMarkType(r))continue;let a=[],o=s=>{a.push(s);for(let l=0;l<s.edgeCount;l++){let{type:f,next:p}=s.edge(l);if(f==e||a.indexOf(p)<0&&o(p))return!0}};if(o(i.contentMatch))return!0}}class Xo{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=Of(t).createDocumentFragment());let i=n,a=[];return e.forEach(o=>{if(a.length||o.marks.length){let s=0,l=0;for(;s<a.length&&l<o.marks.length;){let f=o.marks[l];if(!this.marks[f.type.name]){l++;continue}if(!f.eq(a[s][0])||f.type.spec.spanning===!1)break;s++,l++}for(;s<a.length;)i=a.pop()[1];for(;l<o.marks.length;){let f=o.marks[l++],p=this.serializeMark(f,o.isInline,t);p&&(a.push([f,i]),i.appendChild(p.dom),i=p.contentDOM||p.dom)}}i.appendChild(this.serializeNodeInner(o,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:i}=Gl(Of(t),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let a=this.serializeMark(e.marks[i],e.isInline,t);a&&((a.contentDOM||a.dom).appendChild(n),n=a.dom)}return n}serializeMark(e,t,n={}){let i=this.marks[e.type.name];return i&&Gl(Of(n),i(e,t),null,e.attrs)}static renderSpec(e,t,n=null,i){return Gl(e,t,n,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Xo(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Rv(e.nodes);return t.text||(t.text=n=>n.text),t}static marksFromSchema(e){return Rv(e.marks)}}function Rv(r){let e={};for(let t in r){let n=r[t].spec.toDOM;n&&(e[t]=n)}return e}function Of(r){return r.document||window.document}const Iv=new WeakMap;function wQ(r){let e=Iv.get(r);return e===void 0&&Iv.set(r,e=CQ(r)),e}function CQ(r){let e=null;function t(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let i=0;i<n.length;i++)t(n[i]);else for(let i in n)t(n[i])}return t(r),e}function Gl(r,e,t,n){if(typeof e=="string")return{dom:r.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],a;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(n&&(a=wQ(n))&&a.indexOf(e)>-1)throw new 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&&(t=i.slice(0,o),i=i.slice(o+1));let s,l=t?r.createElementNS(t,i):r.createElement(i),f=e[1],p=1;if(f&&typeof f=="object"&&f.nodeType==null&&!Array.isArray(f)){p=2;for(let b in f)if(f[b]!=null){let T=b.indexOf(" ");T>0?l.setAttributeNS(b.slice(0,T),b.slice(T+1),f[b]):b=="style"&&l.style?l.style.cssText=f[b]:l.setAttribute(b,f[b])}}for(let b=p;b<e.length;b++){let T=e[b];if(T===0){if(b<e.length-1||b>p)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:x,contentDOM:E}=Gl(r,T,t,n);if(l.appendChild(x),E){if(s)throw new RangeError("Multiple content holes");s=E}}}return{dom:l,contentDOM:s}}const vb=65535,mb=Math.pow(2,16);function TQ(r,e){return r+e*mb}function Pv(r){return r&vb}function SQ(r){return(r-(r&vb))/mb}const gb=1,yb=2,Kl=4,bb=8;class kd{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&bb)>0}get deletedBefore(){return(this.delInfo&(gb|Kl))>0}get deletedAfter(){return(this.delInfo&(yb|Kl))>0}get deletedAcross(){return(this.delInfo&Kl)>0}}class un{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&un.empty)return un.empty}recover(e){let t=0,n=Pv(e);if(!this.inverted)for(let i=0;i<n;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[n*3]+t+SQ(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 i=0,a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?i:0);if(l>e)break;let f=this.ranges[s+a],p=this.ranges[s+o],b=l+f;if(e<=b){let T=f?e==l?-1:e==b?1:t:t,x=l+i+(T<0?0:p);if(n)return x;let E=e==(t<0?l:b)?null:TQ(s/3,e-l),P=e==l?yb:e==b?gb:Kl;return(t<0?e!=l:e!=b)&&(P|=bb),new kd(x,P,E)}i+=p-f}return n?e+i:new kd(e+i,0,null)}touches(e,t){let n=0,i=Pv(t),a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?n:0);if(l>e)break;let f=this.ranges[s+a],p=l+f;if(e<=p&&s==i*3)return!0;n+=this.ranges[s+o]-f}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,a=0;i<this.ranges.length;i+=3){let o=this.ranges[i],s=o-(this.inverted?a:0),l=o+(this.inverted?0:a),f=this.ranges[i+t],p=this.ranges[i+n];e(s,s+f,l,l+p),a+=p-f}}invert(){return new un(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?un.empty:new un(e<0?[0,-e,0]:[0,0,e])}}un.empty=new un([]);class Ds{constructor(e,t,n=0,i=e?e.length:0){this.mirror=t,this.from=n,this.to=i,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new Ds(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!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 i=e.getMirror(t);this.appendMap(e._maps[t],i!=null&&i<t?n+i: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=[]),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 i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?n-i-1:void 0)}}invert(){let e=new Ds;return e.appendMappingInverted(this),e}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 i=0;for(let a=this.from;a<this.to;a++){let o=this._maps[a],s=o.mapResult(e,t);if(s.recover!=null){let l=this.getMirror(a);if(l!=null&&l>a&&l<this.to){a=l,e=this._maps[l].recover(s.recover);continue}}i|=s.delInfo,e=s.pos}return n?e:new kd(e,i,null)}}const Nf=Object.create(null);class Wr{getMap(){return un.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=Nf[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Nf)throw new RangeError("Duplicate use of step JSON ID "+e);return Nf[e]=t,t.prototype.jsonID=e,t}}class vr{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new vr(e,null)}static fail(e){return new vr(null,e)}static fromReplace(e,t,n,i){try{return vr.ok(e.replace(t,n,i))}catch(a){if(a instanceof iu)return vr.fail(a.message);throw a}}}function ah(r,e,t){let n=[];for(let i=0;i<r.childCount;i++){let a=r.child(i);a.content.size&&(a=a.copy(ah(a.content,e,a))),a.isInline&&(a=e(a,t,i)),n.push(a)}return De.fromArray(n)}class ea extends Wr{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),i=n.node(n.sharedDepth(this.to)),a=new $e(ah(t.content,(o,s)=>!o.isAtom||!s.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return vr.fromReplace(e,this.from,this.to,a)}invert(){return new si(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new ea(t.pos,n.pos,this.mark)}merge(e){return e instanceof ea&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ea(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ea(t.from,t.to,e.markFromJSON(t.mark))}}Wr.jsonID("addMark",ea);class si extends Wr{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 $e(ah(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return vr.fromReplace(e,this.from,this.to,n)}invert(){return new ea(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new si(t.pos,n.pos,this.mark)}merge(e){return e instanceof si&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new si(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new si(t.from,t.to,e.markFromJSON(t.mark))}}Wr.jsonID("removeMark",si);class ta extends Wr{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return vr.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return vr.fromReplace(e,this.pos,this.pos+1,new $e(De.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let n=this.mark.addToSet(t.marks);if(n.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(n))return new ta(this.pos,t.marks[i]);return new ta(this.pos,this.mark)}}return new ja(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ta(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ta(t.pos,e.markFromJSON(t.mark))}}Wr.jsonID("addNodeMark",ta);class ja extends Wr{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return vr.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return vr.fromReplace(e,this.pos,this.pos+1,new $e(De.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new ta(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ja(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ja(t.pos,e.markFromJSON(t.mark))}}Wr.jsonID("removeNodeMark",ja);class Vr extends Wr{constructor(e,t,n,i=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=i}apply(e){return this.structure&&wd(e,this.from,this.to)?vr.fail("Structure replace would overwrite content"):vr.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new un([this.from,this.to-this.from,this.slice.size])}invert(e){return new Vr(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new Vr(t.pos,Math.max(t.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Vr)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?$e.empty:new $e(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Vr(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?$e.empty:new $e(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Vr(e.from,this.to,t,this.structure)}else 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(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Vr(t.from,t.to,$e.fromJSON(e,t.slice),!!t.structure)}}Wr.jsonID("replace",Vr);class xr extends Wr{constructor(e,t,n,i,a,o,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=i,this.slice=a,this.insert=o,this.structure=s}apply(e){if(this.structure&&(wd(e,this.from,this.gapFrom)||wd(e,this.gapTo,this.to)))return vr.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return vr.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?vr.fromReplace(e,this.from,this.to,n):vr.fail("Content does not fit in gap")}getMap(){return new un([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new xr(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),a=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||i<t.pos||a>n.pos?null:new xr(t.pos,n.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(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new xr(t.from,t.to,t.gapFrom,t.gapTo,$e.fromJSON(e,t.slice),t.insert,!!t.structure)}}Wr.jsonID("replaceAround",xr);function wd(r,e,t){let n=r.resolve(e),i=t-e,a=n.depth;for(;i>0&&a>0&&n.indexAfter(a)==n.node(a).childCount;)a--,i--;if(i>0){let o=n.node(a).maybeChild(n.indexAfter(a));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function xQ(r,e,t,n){let i=[],a=[],o,s;r.doc.nodesBetween(e,t,(l,f,p)=>{if(!l.isInline)return;let b=l.marks;if(!n.isInSet(b)&&p.type.allowsMarkType(n.type)){let T=Math.max(f,e),x=Math.min(f+l.nodeSize,t),E=n.addToSet(b);for(let P=0;P<b.length;P++)b[P].isInSet(E)||(o&&o.to==T&&o.mark.eq(b[P])?o.to=x:i.push(o=new si(T,x,b[P])));s&&s.to==T?s.to=x:a.push(s=new ea(T,x,n))}}),i.forEach(l=>r.step(l)),a.forEach(l=>r.step(l))}function EQ(r,e,t,n){let i=[],a=0;r.doc.nodesBetween(e,t,(o,s)=>{if(!o.isInline)return;a++;let l=null;if(n instanceof Lu){let f=o.marks,p;for(;p=n.isInSet(f);)(l||(l=[])).push(p),f=p.removeFromSet(f)}else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length){let f=Math.min(s+o.nodeSize,t);for(let p=0;p<l.length;p++){let b=l[p],T;for(let x=0;x<i.length;x++){let E=i[x];E.step==a-1&&b.eq(i[x].style)&&(T=E)}T?(T.to=f,T.step=a):i.push({style:b,from:Math.max(s,e),to:f,step:a})}}}),i.forEach(o=>r.step(new si(o.from,o.to,o.style)))}function oh(r,e,t,n=t.contentMatch,i=!0){let a=r.doc.nodeAt(e),o=[],s=e+1;for(let l=0;l<a.childCount;l++){let f=a.child(l),p=s+f.nodeSize,b=n.matchType(f.type);if(!b)o.push(new Vr(s,p,$e.empty));else{n=b;for(let T=0;T<f.marks.length;T++)t.allowsMarkType(f.marks[T].type)||r.step(new si(s,p,f.marks[T]));if(i&&f.isText&&t.whitespace!="pre"){let T,x=/\r?\n|\r/g,E;for(;T=x.exec(f.text);)E||(E=new $e(De.from(t.schema.text(" ",t.allowedMarks(f.marks))),0,0)),o.push(new Vr(s+T.index,s+T.index+T[0].length,E))}}s=p}if(!n.validEnd){let l=n.fillBefore(De.empty,!0);r.replace(s,s,new $e(l,0,0))}for(let l=o.length-1;l>=0;l--)r.step(o[l])}function MQ(r,e,t){return(e==0||r.canReplace(e,r.childCount))&&(t==r.childCount||r.canReplace(0,t))}function Ru(r){let t=r.parent.content.cutByIndex(r.startIndex,r.endIndex);for(let n=r.depth,i=0,a=0;;--n){let o=r.$from.node(n),s=r.$from.index(n)+i,l=r.$to.indexAfter(n)-a;if(n<r.depth&&o.canReplace(s,l,t))return n;if(n==0||o.type.spec.isolating||!MQ(o,s,l))break;s&&(i=1),l<o.childCount&&(a=1)}return null}function AQ(r,e,t){let{$from:n,$to:i,depth:a}=e,o=n.before(a+1),s=i.after(a+1),l=o,f=s,p=De.empty,b=0;for(let E=a,P=!1;E>t;E--)P||n.index(E)>0?(P=!0,p=De.from(n.node(E).copy(p)),b++):l--;let T=De.empty,x=0;for(let E=a,P=!1;E>t;E--)P||i.after(E+1)<i.end(E)?(P=!0,T=De.from(i.node(E).copy(T)),x++):f++;r.step(new xr(l,f,o,s,new $e(p.append(T),b,x),p.size-b,!0))}function OQ(r,e,t=null,n=r){let i=NQ(r,e),a=i&&DQ(n,e);return a?i.map(Bv).concat({type:e,attrs:t}).concat(a.map(Bv)):null}function Bv(r){return{type:r,attrs:null}}function NQ(r,e){let{parent:t,startIndex:n,endIndex:i}=r,a=t.contentMatchAt(n).findWrapping(e);if(!a)return null;let o=a.length?a[0]:e;return t.canReplaceWith(n,i,o)?a:null}function DQ(r,e){let{parent:t,startIndex:n,endIndex:i}=r,a=t.child(n),o=e.contentMatch.findWrapping(a.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let f=n;l&&f<i;f++)l=l.matchType(t.child(f).type);return!l||!l.validEnd?null:o}function LQ(r,e,t){let n=De.empty;for(let o=t.length-1;o>=0;o--){if(n.size){let s=t[o].type.contentMatch.matchFragment(n);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=De.from(t[o].type.create(t[o].attrs,n))}let i=e.start,a=e.end;r.step(new xr(i,a,i,a,new $e(n,0,0),t.length,!0))}function RQ(r,e,t,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=r.steps.length;r.doc.nodesBetween(e,t,(o,s)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(n,l)&&IQ(r.doc,r.mapping.slice(a).map(s),n)){let f=null;if(n.schema.linebreakReplacement){let x=n.whitespace=="pre",E=!!n.contentMatch.matchType(n.schema.linebreakReplacement);x&&!E?f=!1:!x&&E&&(f=!0)}f===!1&&wb(r,o,s,a),oh(r,r.mapping.slice(a).map(s,1),n,void 0,f===null);let p=r.mapping.slice(a),b=p.map(s,1),T=p.map(s+o.nodeSize,1);return r.step(new xr(b,T,b+1,T-1,new $e(De.from(n.create(l,null,o.marks)),0,0),1,!0)),f===!0&&kb(r,o,s,a),!1}})}function kb(r,e,t,n){e.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let l=r.mapping.slice(n).map(t+1+a+o.index);r.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function wb(r,e,t,n){e.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let o=r.mapping.slice(n).map(t+1+a);r.replaceWith(o,o+1,e.type.schema.text(`
|
|
5
|
-
`))}})}function IQ(r,e,t){let n=r.resolve(e),i=n.index();return n.parent.canReplaceWith(i,i+1,t)}function PQ(r,e,t,n,i){let a=r.doc.nodeAt(e);if(!a)throw new RangeError("No node at given position");t||(t=a.type);let o=t.create(n,null,i||a.marks);if(a.isLeaf)return r.replaceWith(e,e+a.nodeSize,o);if(!t.validContent(a.content))throw new RangeError("Invalid content for node type "+t.name);r.step(new xr(e,e+a.nodeSize,e+1,e+a.nodeSize-1,new $e(De.from(o),0,0),1,!0))}function Ro(r,e,t=1,n){let i=r.resolve(e),a=i.depth-t,o=n&&n[n.length-1]||i.parent;if(a<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let f=i.depth-1,p=t-2;f>a;f--,p--){let b=i.node(f),T=i.index(f);if(b.type.spec.isolating)return!1;let x=b.content.cutByIndex(T,b.childCount),E=n&&n[p+1];E&&(x=x.replaceChild(0,E.type.create(E.attrs)));let P=n&&n[p]||b;if(!b.canReplace(T+1,b.childCount)||!P.type.validContent(x))return!1}let s=i.indexAfter(a),l=n&&n[0];return i.node(a).canReplaceWith(s,s,l?l.type:i.node(a+1).type)}function BQ(r,e,t=1,n){let i=r.doc.resolve(e),a=De.empty,o=De.empty;for(let s=i.depth,l=i.depth-t,f=t-1;s>l;s--,f--){a=De.from(i.node(s).copy(a));let p=n&&n[f];o=De.from(p?p.type.create(p.attrs,o):i.node(s).copy(o))}r.step(new Vr(e,e,new $e(a.append(o),t,t),!0))}function Cb(r,e){let t=r.resolve(e),n=t.index();return qQ(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(n,n+1)}function FQ(r,e){e.content.size||r.type.compatibleContent(e.type);let t=r.contentMatchAt(r.childCount),{linebreakReplacement:n}=r.type.schema;for(let i=0;i<e.childCount;i++){let a=e.child(i),o=a.type==n?r.type.schema.nodes.text:a.type;if(t=t.matchType(o),!t||!r.type.allowsMarks(a.marks))return!1}return t.validEnd}function qQ(r,e){return!!(r&&e&&!r.isLeaf&&FQ(r,e))}function HQ(r,e,t){let n=null,{linebreakReplacement:i}=r.doc.type.schema,a=r.doc.resolve(e-t),o=a.node().type;if(i&&o.inlineContent){let p=o.whitespace=="pre",b=!!o.contentMatch.matchType(i);p&&!b?n=!1:!p&&b&&(n=!0)}let s=r.steps.length;if(n===!1){let p=r.doc.resolve(e+t);wb(r,p.node(),p.before(),s)}o.inlineContent&&oh(r,e+t-1,o,a.node().contentMatchAt(a.index()),n==null);let l=r.mapping.slice(s),f=l.map(e-t);if(r.step(new Vr(f,l.map(e+t,-1),$e.empty,!0)),n===!0){let p=r.doc.resolve(f);kb(r,p.node(),p.before(),r.steps.length)}return r}function _Q(r,e,t){let n=r.resolve(e);if(n.parent.canReplaceWith(n.index(),n.index(),t))return e;if(n.parentOffset==0)for(let i=n.depth-1;i>=0;i--){let a=n.index(i);if(n.node(i).canReplaceWith(a,a,t))return n.before(i+1);if(a>0)return null}if(n.parentOffset==n.parent.content.size)for(let i=n.depth-1;i>=0;i--){let a=n.indexAfter(i);if(n.node(i).canReplaceWith(a,a,t))return n.after(i+1);if(a<n.node(i).childCount)return null}return null}function zQ(r,e,t){let n=r.resolve(e);if(!t.content.size)return e;let i=t.content;for(let a=0;a<t.openStart;a++)i=i.firstChild.content;for(let a=1;a<=(t.openStart==0&&t.size?2:1);a++)for(let o=n.depth;o>=0;o--){let s=o==n.depth?0:n.pos<=(n.start(o+1)+n.end(o+1))/2?-1:1,l=n.index(o)+(s>0?1:0),f=n.node(o),p=!1;if(a==1)p=f.canReplace(l,l,i);else{let b=f.contentMatchAt(l).findWrapping(i.firstChild.type);p=b&&f.canReplaceWith(l,l,b[0])}if(p)return s==0?n.pos:s<0?n.before(o+1):n.after(o+1)}return null}function sh(r,e,t=e,n=$e.empty){if(e==t&&!n.size)return null;let i=r.resolve(e),a=r.resolve(t);return Tb(i,a,n)?new Vr(e,t,n):new VQ(i,a,n).fit()}function Tb(r,e,t){return!t.openStart&&!t.openEnd&&r.start()==e.start()&&r.parent.canReplace(r.index(),e.index(),t.content)}class VQ{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=De.empty;for(let i=0;i<=e.depth;i++){let a=e.node(i);this.frontier.push({type:a.type,match:a.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=De.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let f=this.findFittable();f?this.placeNodes(f):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let a=this.placed,o=n.depth,s=i.depth;for(;o&&s&&a.childCount==1;)a=a.firstChild.content,o--,s--;let l=new $e(a,o,s);return e>-1?new xr(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new Vr(n.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,i=this.unplaced.openEnd;n<e;n++){let a=t.firstChild;if(t.childCount>1&&(i=0),a.type.spec.isolating&&i<=n){e=n;break}t=a.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let i,a=null;n?(a=Df(this.unplaced.content,n-1).firstChild,i=a.content):i=this.unplaced.content;let o=i.firstChild;for(let s=this.depth;s>=0;s--){let{type:l,match:f}=this.frontier[s],p,b=null;if(t==1&&(o?f.matchType(o.type)||(b=f.fillBefore(De.from(o),!1)):a&&l.compatibleContent(a.type)))return{sliceDepth:n,frontierDepth:s,parent:a,inject:b};if(t==2&&o&&(p=f.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:s,parent:a,wrap:p};if(a&&f.matchType(a.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=Df(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new $e(e,t+1,Math.max(n,i.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=Df(e,t);if(i.childCount<=1&&t>0){let a=e.size-t<=t+i.size;this.unplaced=new $e(ys(e,t-1,1),t-1,a?t-1:n)}else this.unplaced=new $e(ys(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:i,wrap:a}){for(;this.depth>t;)this.closeFrontierNode();if(a)for(let P=0;P<a.length;P++)this.openFrontierNode(a[P]);let o=this.unplaced,s=n?n.content:o.content,l=o.openStart-e,f=0,p=[],{match:b,type:T}=this.frontier[t];if(i){for(let P=0;P<i.childCount;P++)p.push(i.child(P));b=b.matchFragment(i)}let x=s.size+e-(o.content.size-o.openEnd);for(;f<s.childCount;){let P=s.child(f),F=b.matchType(P.type);if(!F)break;f++,(f>1||l==0||P.content.size)&&(b=F,p.push(Sb(P.mark(T.allowedMarks(P.marks)),f==1?l:0,f==s.childCount?x:-1)))}let E=f==s.childCount;E||(x=-1),this.placed=bs(this.placed,t,De.from(p)),this.frontier[t].match=b,E&&x<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let P=0,F=s;P<x;P++){let z=F.lastChild;this.frontier.push({type:z.type,match:z.contentMatchAt(z.childCount)}),F=z.content}this.unplaced=E?e==0?$e.empty:new $e(ys(o.content,e-1,1),e-1,x<0?o.openEnd:e-1):new $e(ys(o.content,e,f),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!Lf(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,i=this.$to.after(n);for(;n>1&&i==this.$to.end(--n);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:i}=this.frontier[t],a=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=Lf(e,t,i,n,a);if(o){for(let s=t-1;s>=0;s--){let{match:l,type:f}=this.frontier[s],p=Lf(e,s,f,l,!0);if(!p||p.childCount)continue e}return{depth:t,fit:o,move:a?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=bs(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let i=e.node(n),a=i.type.contentMatch.fillBefore(i.content,!0,e.index(n));this.openFrontierNode(i.type,i.attrs,a)}return e}openFrontierNode(e,t=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=bs(this.placed,this.depth,De.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(De.empty,!0);t.childCount&&(this.placed=bs(this.placed,this.frontier.length,t))}}function ys(r,e,t){return e==0?r.cutByIndex(t,r.childCount):r.replaceChild(0,r.firstChild.copy(ys(r.firstChild.content,e-1,t)))}function bs(r,e,t){return e==0?r.append(t):r.replaceChild(r.childCount-1,r.lastChild.copy(bs(r.lastChild.content,e-1,t)))}function Df(r,e){for(let t=0;t<e;t++)r=r.firstChild.content;return r}function Sb(r,e,t){if(e<=0)return r;let n=r.content;return e>1&&(n=n.replaceChild(0,Sb(n.firstChild,e-1,n.childCount==1?t-1:0))),e>0&&(n=r.type.contentMatch.fillBefore(n).append(n),t<=0&&(n=n.append(r.type.contentMatch.matchFragment(n).fillBefore(De.empty,!0)))),r.copy(n)}function Lf(r,e,t,n,i){let a=r.node(e),o=i?r.indexAfter(e):r.index(e);if(o==a.childCount&&!t.compatibleContent(a.type))return null;let s=n.fillBefore(a.content,!0,o);return s&&!UQ(t,a.content,o)?s:null}function UQ(r,e,t){for(let n=t;n<e.childCount;n++)if(!r.allowsMarks(e.child(n).marks))return!0;return!1}function $Q(r){return r.spec.defining||r.spec.definingForContent}function WQ(r,e,t,n){if(!n.size)return r.deleteRange(e,t);let i=r.doc.resolve(e),a=r.doc.resolve(t);if(Tb(i,a,n))return r.step(new Vr(e,t,n));let o=Eb(i,a);o[o.length-1]==0&&o.pop();let s=-(i.depth+1);o.unshift(s);for(let T=i.depth,x=i.pos-1;T>0;T--,x--){let E=i.node(T).type.spec;if(E.defining||E.definingAsContext||E.isolating)break;o.indexOf(T)>-1?s=T:i.before(T)==x&&o.splice(1,0,-T)}let l=o.indexOf(s),f=[],p=n.openStart;for(let T=n.content,x=0;;x++){let E=T.firstChild;if(f.push(E),x==n.openStart)break;T=E.content}for(let T=p-1;T>=0;T--){let x=f[T],E=$Q(x.type);if(E&&!x.sameMarkup(i.node(Math.abs(s)-1)))p=T;else if(E||!x.type.isTextblock)break}for(let T=n.openStart;T>=0;T--){let x=(T+p+1)%(n.openStart+1),E=f[x];if(E)for(let P=0;P<o.length;P++){let F=o[(P+l)%o.length],z=!0;F<0&&(z=!1,F=-F);let Y=i.node(F-1),ee=i.index(F-1);if(Y.canReplaceWith(ee,ee,E.type,E.marks))return r.replace(i.before(F),z?a.after(F):t,new $e(xb(n.content,0,n.openStart,x),x,n.openEnd))}}let b=r.steps.length;for(let T=o.length-1;T>=0&&(r.replace(e,t,n),!(r.steps.length>b));T--){let x=o[T];x<0||(e=i.before(x),t=a.after(x))}}function xb(r,e,t,n,i){if(e<t){let a=r.firstChild;r=r.replaceChild(0,a.copy(xb(a.content,e+1,t,n,a)))}if(e>n){let a=i.contentMatchAt(0),o=a.fillBefore(r).append(r);r=o.append(a.matchFragment(o).fillBefore(De.empty,!0))}return r}function jQ(r,e,t,n){if(!n.isInline&&e==t&&r.doc.resolve(e).parent.content.size){let i=_Q(r.doc,e,n.type);i!=null&&(e=t=i)}r.replaceRange(e,t,new $e(De.from(n),0,0))}function GQ(r,e,t){let n=r.doc.resolve(e),i=r.doc.resolve(t),a=Eb(n,i);for(let o=0;o<a.length;o++){let s=a[o],l=o==a.length-1;if(l&&s==0||n.node(s).type.contentMatch.validEnd)return r.delete(n.start(s),i.end(s));if(s>0&&(l||n.node(s-1).canReplace(n.index(s-1),i.indexAfter(s-1))))return r.delete(n.before(s),i.after(s))}for(let o=1;o<=n.depth&&o<=i.depth;o++)if(e-n.start(o)==n.depth-o&&t>n.end(o)&&i.end(o)-t!=i.depth-o&&n.start(o-1)==i.start(o-1)&&n.node(o-1).canReplace(n.index(o-1),i.index(o-1)))return r.delete(n.before(o),t);r.delete(e,t)}function Eb(r,e){let t=[],n=Math.min(r.depth,e.depth);for(let i=n;i>=0;i--){let a=r.start(i);if(a<r.pos-(r.depth-i)||e.end(i)>e.pos+(e.depth-i)||r.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(a==e.start(i)||i==r.depth&&i==e.depth&&r.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==a-1)&&t.push(i)}return t}class Io extends Wr{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return vr.fail("No node at attribute step's position");let n=Object.create(null);for(let a in t.attrs)n[a]=t.attrs[a];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return vr.fromReplace(e,this.pos,this.pos+1,new $e(De.from(i),0,t.isLeaf?0:1))}getMap(){return un.empty}invert(e){return new Io(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Io(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Io(t.pos,t.attr,t.value)}}Wr.jsonID("attr",Io);class Ls extends Wr{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return vr.ok(n)}getMap(){return un.empty}invert(e){return new Ls(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ls(t.attr,t.value)}}Wr.jsonID("docAttr",Ls);let Bo=class extends Error{};Bo=function r(e){let t=Error.call(this,e);return t.__proto__=r.prototype,t};Bo.prototype=Object.create(Error.prototype);Bo.prototype.constructor=Bo;Bo.prototype.name="TransformError";class KQ{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ds}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Bo(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let i=this.mapping.maps[n];n&&(e=i.map(e,1),t=i.map(t,-1)),i.forEach((a,o,s,l)=>{e=Math.min(e,s),t=Math.max(t,l)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=$e.empty){let i=sh(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new $e(De.from(n),0,0))}delete(e,t){return this.replace(e,t,$e.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return WQ(this,e,t,n),this}replaceRangeWith(e,t,n){return jQ(this,e,t,n),this}deleteRange(e,t){return GQ(this,e,t),this}lift(e,t){return AQ(this,e,t),this}join(e,t=1){return HQ(this,e,t),this}wrap(e,t){return LQ(this,e,t),this}setBlockType(e,t=e,n,i=null){return RQ(this,e,t,n,i),this}setNodeMarkup(e,t,n=null,i){return PQ(this,e,t,n,i),this}setNodeAttribute(e,t,n){return this.step(new Io(e,t,n)),this}setDocAttribute(e,t){return this.step(new Ls(e,t)),this}addNodeMark(e,t){return this.step(new ta(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(t instanceof Bt)t.isInSet(n.marks)&&this.step(new ja(e,t));else{let i=n.marks,a,o=[];for(;a=t.isInSet(i);)o.push(new ja(e,a)),i=a.removeFromSet(i);for(let s=o.length-1;s>=0;s--)this.step(o[s])}return this}split(e,t=1,n){return BQ(this,e,t,n),this}addMark(e,t,n){return xQ(this,e,t,n),this}removeMark(e,t,n){return EQ(this,e,t,n),this}clearIncompatible(e,t,n){return oh(this,e,t,n),this}}const Rf=Object.create(null);class Tt{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Mb(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=$e.empty){let n=t.content.lastChild,i=null;for(let s=0;s<t.openEnd;s++)i=n,n=n.lastChild;let a=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:l,$to:f}=o[s],p=e.mapping.slice(a);e.replaceRange(p.map(l.pos),p.map(f.pos),s?$e.empty:t),s==0&&Hv(e,a,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){let{$from:o,$to:s}=i[a],l=e.mapping.slice(n),f=l.map(o.pos),p=l.map(s.pos);a?e.deleteRange(f,p):(e.replaceRangeWith(f,p,t),Hv(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let i=e.parent.inlineContent?new xt(e):Mo(e.node(0),e.parent,e.pos,e.index(),t,n);if(i)return i;for(let a=e.depth-1;a>=0;a--){let o=t<0?Mo(e.node(0),e.node(a),e.before(a+1),e.index(a),t,n):Mo(e.node(0),e.node(a),e.after(a+1),e.index(a)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Jr(e.node(0))}static atStart(e){return Mo(e,e,0,0,1)||new Jr(e)}static atEnd(e){return Mo(e,e,e.content.size,e.childCount,-1)||new Jr(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Rf[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Rf)throw new RangeError("Duplicate use of selection JSON ID "+e);return Rf[e]=t,t.prototype.jsonID=e,t}getBookmark(){return xt.between(this.$anchor,this.$head).getBookmark()}}Tt.prototype.visible=!0;class Mb{constructor(e,t){this.$from=e,this.$to=t}}let Fv=!1;function qv(r){!Fv&&!r.parent.inlineContent&&(Fv=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+r.parent.type.name+")"))}class xt extends Tt{constructor(e,t=e){qv(e),qv(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return Tt.near(n);let i=e.resolve(t.map(this.anchor));return new xt(i.parent.inlineContent?i:n,n)}replace(e,t=$e.empty){if(super.replace(e,t),t==$e.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof xt&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Iu(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new xt(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let i=e.resolve(t);return new this(i,n==t?i:e.resolve(n))}static between(e,t,n){let i=e.pos-t.pos;if((!n||i)&&(n=i>=0?1:-1),!t.parent.inlineContent){let a=Tt.findFrom(t,n,!0)||Tt.findFrom(t,-n,!0);if(a)t=a.$head;else return Tt.near(t,n)}return e.parent.inlineContent||(i==0?e=t:(e=(Tt.findFrom(e,-n,!0)||Tt.findFrom(e,n,!0)).$anchor,e.pos<t.pos!=i<0&&(e=t))),new xt(e,t)}}Tt.jsonID("text",xt);class Iu{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Iu(e.map(this.anchor),e.map(this.head))}resolve(e){return xt.between(e.resolve(this.anchor),e.resolve(this.head))}}class ft extends Tt{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:i}=t.mapResult(this.anchor),a=e.resolve(i);return n?Tt.near(a):new ft(a)}content(){return new $e(De.from(this.node),0,0)}eq(e){return e instanceof ft&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new lh(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ft(e.resolve(t.anchor))}static create(e,t){return new ft(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}ft.prototype.visible=!1;Tt.jsonID("node",ft);class lh{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new Iu(n,n):new lh(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&ft.isSelectable(n)?new ft(t):Tt.near(t)}}class Jr extends Tt{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=$e.empty){if(t==$e.empty){e.delete(0,e.doc.content.size);let n=Tt.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Jr(e)}map(e){return new Jr(e)}eq(e){return e instanceof Jr}getBookmark(){return JQ}}Tt.jsonID("all",Jr);const JQ={map(){return this},resolve(r){return new Jr(r)}};function Mo(r,e,t,n,i,a=!1){if(e.inlineContent)return xt.create(r,t);for(let o=n-(i>0?0:1);i>0?o<e.childCount:o>=0;o+=i){let s=e.child(o);if(s.isAtom){if(!a&&ft.isSelectable(s))return ft.create(r,t-(i<0?s.nodeSize:0))}else{let l=Mo(r,s,t+i,i<0?s.childCount:0,i,a);if(l)return l}t+=s.nodeSize*i}return null}function Hv(r,e,t){let n=r.steps.length-1;if(n<e)return;let i=r.steps[n];if(!(i instanceof Vr||i instanceof xr))return;let a=r.mapping.maps[n],o;a.forEach((s,l,f,p)=>{o==null&&(o=p)}),r.setSelection(Tt.near(r.doc.resolve(o),t))}const _v=1,Il=2,zv=4;class YQ extends KQ{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|_v)&~Il,this.storedMarks=null,this}get selectionSet(){return(this.updated&_v)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Il,this}ensureMarks(e){return Bt.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Il)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Il,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Bt.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(n==null&&(n=t),!e)return this.deleteRange(t,n);let a=this.storedMarks;if(!a){let o=this.doc.resolve(t);a=n==t?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,i.text(e,a)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(Tt.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=zv,this}get scrolledIntoView(){return(this.updated&zv)>0}}function Vv(r,e){return!e||!r?r:r.bind(e)}class ks{constructor(e,t,n){this.name=e,this.init=Vv(t.init,n),this.apply=Vv(t.apply,n)}}const XQ=[new ks("doc",{init(r){return r.doc||r.schema.topNodeType.createAndFill()},apply(r){return r.doc}}),new ks("selection",{init(r,e){return r.selection||Tt.atStart(e.doc)},apply(r){return r.selection}}),new ks("storedMarks",{init(r){return r.storedMarks||null},apply(r,e,t,n){return n.selection.$cursor?r.storedMarks:null}}),new ks("scrollToSelection",{init(){return 0},apply(r,e){return r.scrolledIntoView?e+1:e}})];class If{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=XQ.slice(),t&&t.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new ks(n.key,n.spec.state,n))})}}class Ba{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let i=this.config.plugins[n];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),i=null;for(;;){let a=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let l=i?i[o].n:0,f=i?i[o].state:this,p=l<t.length&&s.spec.appendTransaction.call(s,l?t.slice(l):t,f,n);if(p&&n.filterTransaction(p,o)){if(p.setMeta("appendedTransaction",e),!i){i=[];for(let b=0;b<this.config.plugins.length;b++)i.push(b<o?{state:n,n:t.length}:{state:this,n:0})}t.push(p),n=n.applyInner(p),a=!0}i&&(i[o]={state:n,n:t.length})}}if(!a)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new Ba(this.config),n=this.config.fields;for(let i=0;i<n.length;i++){let a=n[i];t[a.name]=a.apply(e,this[a.name],this,t)}return t}get tr(){return new YQ(this)}static create(e){let t=new If(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new Ba(t);for(let i=0;i<t.fields.length;i++)n[t.fields[i].name]=t.fields[i].init(e,n);return n}reconfigure(e){let t=new If(this.schema,e.plugins),n=t.fields,i=new Ba(t);for(let a=0;a<n.length;a++){let o=n[a].name;i[o]=this.hasOwnProperty(o)?this[o]:n[a].init(e,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(n=>n.toJSON())),e&&typeof e=="object")for(let n in e){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[n],a=i.spec.state;a&&a.toJSON&&(t[n]=a.toJSON.call(i,this[i.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new If(e.schema,e.plugins),a=new Ba(i);return i.fields.forEach(o=>{if(o.name=="doc")a.doc=na.fromJSON(e.schema,t.doc);else if(o.name=="selection")a.selection=Tt.fromJSON(a.doc,t.selection);else if(o.name=="storedMarks")t.storedMarks&&(a.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let s in n){let l=n[s],f=l.spec.state;if(l.key==o.name&&f&&f.fromJSON&&Object.prototype.hasOwnProperty.call(t,s)){a[o.name]=f.fromJSON.call(l,e,t[s],a);return}}a[o.name]=o.init(e,a)}}),a}}function Ab(r,e,t){for(let n in r){let i=r[n];i instanceof Function?i=i.bind(e):n=="handleDOMEvents"&&(i=Ab(i,e,{})),t[n]=i}return t}class hn{constructor(e){this.spec=e,this.props={},e.props&&Ab(e.props,this,this.props),this.key=e.key?e.key.key:Ob("plugin")}getState(e){return e[this.key]}}const Pf=Object.create(null);function Ob(r){return r in Pf?r+"$"+ ++Pf[r]:(Pf[r]=0,r+"$")}class Hs{constructor(e="key"){this.key=Ob(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Ir=function(r){for(var e=0;;e++)if(r=r.previousSibling,!r)return e},Fo=function(r){let e=r.assignedSlot||r.parentNode;return e&&e.nodeType==11?e.host:e};let Cd=null;const Oi=function(r,e,t){let n=Cd||(Cd=document.createRange());return n.setEnd(r,t??r.nodeValue.length),n.setStart(r,e||0),n},ZQ=function(){Cd=null},Ga=function(r,e,t,n){return t&&(Uv(r,e,t,n,-1)||Uv(r,e,t,n,1))},QQ=/^(img|br|input|textarea|hr)$/i;function Uv(r,e,t,n,i){for(var a;;){if(r==t&&e==n)return!0;if(e==(i<0?0:Bn(r))){let o=r.parentNode;if(!o||o.nodeType!=1||_s(r)||QQ.test(r.nodeName)||r.contentEditable=="false")return!1;e=Ir(r)+(i<0?0:1),r=o}else if(r.nodeType==1){let o=r.childNodes[e+(i<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((a=o.pmViewDesc)===null||a===void 0)&&a.ignoreForSelection)e+=i;else return!1;else r=o,e=i<0?Bn(r):0}else return!1}}function Bn(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function eee(r,e){for(;;){if(r.nodeType==3&&e)return r;if(r.nodeType==1&&e>0){if(r.contentEditable=="false")return null;r=r.childNodes[e-1],e=Bn(r)}else if(r.parentNode&&!_s(r))e=Ir(r),r=r.parentNode;else return null}}function tee(r,e){for(;;){if(r.nodeType==3&&e<r.nodeValue.length)return r;if(r.nodeType==1&&e<r.childNodes.length){if(r.contentEditable=="false")return null;r=r.childNodes[e],e=0}else if(r.parentNode&&!_s(r))e=Ir(r)+1,r=r.parentNode;else return null}}function ree(r,e,t){for(let n=e==0,i=e==Bn(r);n||i;){if(r==t)return!0;let a=Ir(r);if(r=r.parentNode,!r)return!1;n=n&&a==0,i=i&&a==Bn(r)}}function _s(r){let e;for(let t=r;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==r||e.contentDOM==r)}const Pu=function(r){return r.focusNode&&Ga(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)};function Pa(r,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=r,t.key=t.code=e,t}function nee(r){let e=r.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function iee(r,e,t){if(r.caretPositionFromPoint)try{let n=r.caretPositionFromPoint(e,t);if(n)return{node:n.offsetNode,offset:Math.min(Bn(n.offsetNode),n.offset)}}catch{}if(r.caretRangeFromPoint){let n=r.caretRangeFromPoint(e,t);if(n)return{node:n.startContainer,offset:Math.min(Bn(n.startContainer),n.startOffset)}}}const ci=typeof navigator<"u"?navigator:null,$v=typeof document<"u"?document:null,fa=ci&&ci.userAgent||"",Td=/Edge\/(\d+)/.exec(fa),Nb=/MSIE \d/.exec(fa),Sd=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(fa),fn=!!(Nb||Sd||Td),ia=Nb?document.documentMode:Sd?+Sd[1]:Td?+Td[1]:0,Fn=!fn&&/gecko\/(\d+)/i.test(fa);Fn&&+(/Firefox\/(\d+)/.exec(fa)||[0,0])[1];const xd=!fn&&/Chrome\/(\d+)/.exec(fa),Pr=!!xd,Db=xd?+xd[1]:0,$r=!fn&&!!ci&&/Apple Computer/.test(ci.vendor),qo=$r&&(/Mobile\/\w+/.test(fa)||!!ci&&ci.maxTouchPoints>2),Pn=qo||(ci?/Mac/.test(ci.platform):!1),Lb=ci?/Win/.test(ci.platform):!1,Li=/Android \d/.test(fa),zs=!!$v&&"webkitFontSmoothing"in $v.documentElement.style,aee=zs?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function oee(r){let e=r.defaultView&&r.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:r.documentElement.clientWidth,top:0,bottom:r.documentElement.clientHeight}}function Mi(r,e){return typeof r=="number"?r:r[e]}function see(r){let e=r.getBoundingClientRect(),t=e.width/r.offsetWidth||1,n=e.height/r.offsetHeight||1;return{left:e.left,right:e.left+r.clientWidth*t,top:e.top,bottom:e.top+r.clientHeight*n}}function Wv(r,e,t){let n=r.someProp("scrollThreshold")||0,i=r.someProp("scrollMargin")||5,a=r.dom.ownerDocument;for(let o=t||r.dom;o;){if(o.nodeType!=1){o=Fo(o);continue}let s=o,l=s==a.body,f=l?oee(a):see(s),p=0,b=0;if(e.top<f.top+Mi(n,"top")?b=-(f.top-e.top+Mi(i,"top")):e.bottom>f.bottom-Mi(n,"bottom")&&(b=e.bottom-e.top>f.bottom-f.top?e.top+Mi(i,"top")-f.top:e.bottom-f.bottom+Mi(i,"bottom")),e.left<f.left+Mi(n,"left")?p=-(f.left-e.left+Mi(i,"left")):e.right>f.right-Mi(n,"right")&&(p=e.right-f.right+Mi(i,"right")),p||b)if(l)a.defaultView.scrollBy(p,b);else{let x=s.scrollLeft,E=s.scrollTop;b&&(s.scrollTop+=b),p&&(s.scrollLeft+=p);let P=s.scrollLeft-x,F=s.scrollTop-E;e={left:e.left-P,top:e.top-F,right:e.right-P,bottom:e.bottom-F}}let T=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(T))break;o=T=="absolute"?o.offsetParent:Fo(o)}}function lee(r){let e=r.dom.getBoundingClientRect(),t=Math.max(0,e.top),n,i;for(let a=(e.left+e.right)/2,o=t+1;o<Math.min(innerHeight,e.bottom);o+=5){let s=r.root.elementFromPoint(a,o);if(!s||s==r.dom||!r.dom.contains(s))continue;let l=s.getBoundingClientRect();if(l.top>=t-20){n=s,i=l.top;break}}return{refDOM:n,refTop:i,stack:Rb(r.dom)}}function Rb(r){let e=[],t=r.ownerDocument;for(let n=r;n&&(e.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),r!=t);n=Fo(n));return e}function uee({refDOM:r,refTop:e,stack:t}){let n=r?r.getBoundingClientRect().top:0;Ib(t,n==0?0:n-e)}function Ib(r,e){for(let t=0;t<r.length;t++){let{dom:n,top:i,left:a}=r[t];n.scrollTop!=i+e&&(n.scrollTop=i+e),n.scrollLeft!=a&&(n.scrollLeft=a)}}let wo=null;function cee(r){if(r.setActive)return r.setActive();if(wo)return r.focus(wo);let e=Rb(r);r.focus(wo==null?{get preventScroll(){return wo={preventScroll:!0},!0}}:void 0),wo||(wo=!1,Ib(e,0))}function Pb(r,e){let t,n=2e8,i,a=0,o=e.top,s=e.top,l,f;for(let p=r.firstChild,b=0;p;p=p.nextSibling,b++){let T;if(p.nodeType==1)T=p.getClientRects();else if(p.nodeType==3)T=Oi(p).getClientRects();else continue;for(let x=0;x<T.length;x++){let E=T[x];if(E.top<=o&&E.bottom>=s){o=Math.max(E.bottom,o),s=Math.min(E.top,s);let P=E.left>e.left?E.left-e.left:E.right<e.left?e.left-E.right:0;if(P<n){t=p,n=P,i=P&&t.nodeType==3?{left:E.right<e.left?E.right:E.left,top:e.top}:e,p.nodeType==1&&P&&(a=b+(e.left>=(E.left+E.right)/2?1:0));continue}}else E.top>e.top&&!l&&E.left<=e.left&&E.right>=e.left&&(l=p,f={left:Math.max(E.left,Math.min(E.right,e.left)),top:E.top});!t&&(e.left>=E.right&&e.top>=E.top||e.left>=E.left&&e.top>=E.bottom)&&(a=b+1)}}return!t&&l&&(t=l,i=f,n=0),t&&t.nodeType==3?fee(t,i):!t||n&&t.nodeType==1?{node:r,offset:a}:Pb(t,i)}function fee(r,e){let t=r.nodeValue.length,n=document.createRange(),i;for(let a=0;a<t;a++){n.setEnd(r,a+1),n.setStart(r,a);let o=Ji(n,1);if(o.top!=o.bottom&&uh(e,o)){i={node:r,offset:a+(e.left>=(o.left+o.right)/2?1:0)};break}}return n.detach(),i||{node:r,offset:0}}function uh(r,e){return r.left>=e.left-1&&r.left<=e.right+1&&r.top>=e.top-1&&r.top<=e.bottom+1}function dee(r,e){let t=r.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<r.getBoundingClientRect().left?t:r}function hee(r,e,t){let{node:n,offset:i}=Pb(e,t),a=-1;if(n.nodeType==1&&!n.firstChild){let o=n.getBoundingClientRect();a=o.left!=o.right&&t.left>(o.left+o.right)/2?1:-1}return r.docView.posFromDOM(n,i,a)}function pee(r,e,t,n){let i=-1;for(let a=e,o=!1;a!=r.dom;){let s=r.docView.nearestDesc(a,!0),l;if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((l=s.dom.getBoundingClientRect()).width||l.height)&&(s.node.isBlock&&s.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(s.dom.nodeName)&&(!o&&l.left>n.left||l.top>n.top?i=s.posBefore:(!o&&l.right<n.left||l.bottom<n.top)&&(i=s.posAfter),o=!0),!s.contentDOM&&i<0&&!s.node.isText))return(s.node.isBlock?n.top<(l.top+l.bottom)/2:n.left<(l.left+l.right)/2)?s.posBefore:s.posAfter;a=s.dom.parentNode}return i>-1?i:r.docView.posFromDOM(e,t,-1)}function Bb(r,e,t){let n=r.childNodes.length;if(n&&t.top<t.bottom)for(let i=Math.max(0,Math.min(n-1,Math.floor(n*(e.top-t.top)/(t.bottom-t.top))-2)),a=i;;){let o=r.childNodes[a];if(o.nodeType==1){let s=o.getClientRects();for(let l=0;l<s.length;l++){let f=s[l];if(uh(e,f))return Bb(o,e,f)}}if((a=(a+1)%n)==i)break}return r}function vee(r,e){let t=r.dom.ownerDocument,n,i=0,a=iee(t,e.left,e.top);a&&({node:n,offset:i}=a);let o=(r.root.elementFromPoint?r.root:t).elementFromPoint(e.left,e.top),s;if(!o||!r.dom.contains(o.nodeType!=1?o.parentNode:o)){let f=r.dom.getBoundingClientRect();if(!uh(e,f)||(o=Bb(r.dom,e,f),!o))return null}if($r)for(let f=o;n&&f;f=Fo(f))f.draggable&&(n=void 0);if(o=dee(o,e),n){if(Fn&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let p=n.childNodes[i],b;p.nodeName=="IMG"&&(b=p.getBoundingClientRect()).right<=e.left&&b.bottom>e.top&&i++}let f;zs&&i&&n.nodeType==1&&(f=n.childNodes[i-1]).nodeType==1&&f.contentEditable=="false"&&f.getBoundingClientRect().top>=e.top&&i--,n==r.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&e.top>n.lastChild.getBoundingClientRect().bottom?s=r.state.doc.content.size:(i==0||n.nodeType!=1||n.childNodes[i-1].nodeName!="BR")&&(s=pee(r,n,i,e))}s==null&&(s=hee(r,o,e));let l=r.docView.nearestDesc(o,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function jv(r){return r.top<r.bottom||r.left<r.right}function Ji(r,e){let t=r.getClientRects();if(t.length){let n=t[e<0?0:t.length-1];if(jv(n))return n}return Array.prototype.find.call(t,jv)||r.getBoundingClientRect()}const mee=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Fb(r,e,t){let{node:n,offset:i,atom:a}=r.docView.domFromPos(e,t<0?-1:1),o=zs||Fn;if(n.nodeType==3)if(o&&(mee.test(n.nodeValue)||(t<0?!i:i==n.nodeValue.length))){let l=Ji(Oi(n,i,i),t);if(Fn&&i&&/\s/.test(n.nodeValue[i-1])&&i<n.nodeValue.length){let f=Ji(Oi(n,i-1,i-1),-1);if(f.top==l.top){let p=Ji(Oi(n,i,i+1),-1);if(p.top!=l.top)return ds(p,p.left<f.left)}}return l}else{let l=i,f=i,p=t<0?1:-1;return t<0&&!i?(f++,p=-1):t>=0&&i==n.nodeValue.length?(l--,p=1):t<0?l--:f++,ds(Ji(Oi(n,l,f),p),p<0)}if(!r.state.doc.resolve(e-(a||0)).parent.inlineContent){if(a==null&&i&&(t<0||i==Bn(n))){let l=n.childNodes[i-1];if(l.nodeType==1)return Bf(l.getBoundingClientRect(),!1)}if(a==null&&i<Bn(n)){let l=n.childNodes[i];if(l.nodeType==1)return Bf(l.getBoundingClientRect(),!0)}return Bf(n.getBoundingClientRect(),t>=0)}if(a==null&&i&&(t<0||i==Bn(n))){let l=n.childNodes[i-1],f=l.nodeType==3?Oi(l,Bn(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(f)return ds(Ji(f,1),!1)}if(a==null&&i<Bn(n)){let l=n.childNodes[i];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let f=l?l.nodeType==3?Oi(l,0,o?0:1):l.nodeType==1?l:null:null;if(f)return ds(Ji(f,-1),!0)}return ds(Ji(n.nodeType==3?Oi(n):n,-t),t>=0)}function ds(r,e){if(r.width==0)return r;let t=e?r.left:r.right;return{top:r.top,bottom:r.bottom,left:t,right:t}}function Bf(r,e){if(r.height==0)return r;let t=e?r.top:r.bottom;return{top:t,bottom:t,left:r.left,right:r.right}}function qb(r,e,t){let n=r.state,i=r.root.activeElement;n!=e&&r.updateState(e),i!=r.dom&&r.focus();try{return t()}finally{n!=e&&r.updateState(n),i!=r.dom&&i&&i.focus()}}function gee(r,e,t){let n=e.selection,i=t=="up"?n.$from:n.$to;return qb(r,e,()=>{let{node:a}=r.docView.domFromPos(i.pos,t=="up"?-1:1);for(;;){let s=r.docView.nearestDesc(a,!0);if(!s)break;if(s.node.isBlock){a=s.contentDOM||s.dom;break}a=s.dom.parentNode}let o=Fb(r,i.pos,1);for(let s=a.firstChild;s;s=s.nextSibling){let l;if(s.nodeType==1)l=s.getClientRects();else if(s.nodeType==3)l=Oi(s,0,s.nodeValue.length).getClientRects();else continue;for(let f=0;f<l.length;f++){let p=l[f];if(p.bottom>p.top+1&&(t=="up"?o.top-p.top>(p.bottom-o.top)*2:p.bottom-o.bottom>(o.bottom-p.top)*2))return!1}}return!0})}const yee=/[\u0590-\u08ac]/;function bee(r,e,t){let{$head:n}=e.selection;if(!n.parent.isTextblock)return!1;let i=n.parentOffset,a=!i,o=i==n.parent.content.size,s=r.domSelection();return s?!yee.test(n.parent.textContent)||!s.modify?t=="left"||t=="backward"?a:o:qb(r,e,()=>{let{focusNode:l,focusOffset:f,anchorNode:p,anchorOffset:b}=r.domSelectionRange(),T=s.caretBidiLevel;s.modify("move",t,"character");let x=n.depth?r.docView.domAfterPos(n.before()):r.dom,{focusNode:E,focusOffset:P}=r.domSelectionRange(),F=E&&!x.contains(E.nodeType==1?E:E.parentNode)||l==E&&f==P;try{s.collapse(p,b),l&&(l!=p||f!=b)&&s.extend&&s.extend(l,f)}catch{}return T!=null&&(s.caretBidiLevel=T),F}):n.pos==n.start()||n.pos==n.end()}let Gv=null,Kv=null,Jv=!1;function kee(r,e,t){return Gv==e&&Kv==t?Jv:(Gv=e,Kv=t,Jv=t=="up"||t=="down"?gee(r,e,t):bee(r,e,t))}const qn=0,Yv=1,Fa=2,fi=3;class Vs{constructor(e,t,n,i){this.parent=e,this.children=t,this.dom=n,this.contentDOM=i,this.dirty=qn,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let i=this.children[t];if(i==e)return n;n+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let a,o;if(e==this.contentDOM)a=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;a=e.previousSibling}for(;a&&!((o=a.pmViewDesc)&&o.parent==this);)a=a.previousSibling;return a?this.posBeforeChild(o)+o.size:this.posAtStart}else{let a,o;if(e==this.contentDOM)a=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;a=e.nextSibling}for(;a&&!((o=a.pmViewDesc)&&o.parent==this);)a=a.nextSibling;return a?this.posBeforeChild(o):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=t>Ir(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let a=e;;a=a.parentNode){if(a==this.dom){i=!1;break}if(a.previousSibling)break}if(i==null&&t==e.childNodes.length)for(let a=e;;a=a.parentNode){if(a==this.dom){i=!0;break}if(a.nextSibling)break}}return i??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,i=e;i;i=i.parentNode){let a=this.getDesc(i),o;if(a&&(!t||a.node))if(n&&(o=a.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))n=!1;else return a}}getDesc(e){let t=e.pmViewDesc;for(let n=t;n;n=n.parent)if(n==this)return t}posFromDOM(e,t,n){for(let i=e;i;i=i.parentNode){let a=this.getDesc(i);if(a)return a.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let i=this.children[t],a=n+i.size;if(n==e&&a!=n){for(;!i.border&&i.children.length;)for(let o=0;o<i.children.length;o++){let s=i.children[o];if(s.size){i=s;break}}return i}if(e<a)return i.descAt(e-n-i.border);n=a}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,i=0;for(let a=0;n<this.children.length;n++){let o=this.children[n],s=a+o.size;if(s>e||o instanceof _b){i=e-a;break}a=s}if(i)return this.children[n].domFromPos(i-this.children[n].border,t);for(let a;n&&!(a=this.children[n-1]).size&&a instanceof Hb&&a.side>=0;n--);if(t<=0){let a,o=!0;for(;a=n?this.children[n-1]:null,!(!a||a.dom.parentNode==this.contentDOM);n--,o=!1);return a&&t&&o&&!a.border&&!a.domAtom?a.domFromPos(a.size,t):{node:this.contentDOM,offset:a?Ir(a.dom)+1:0}}else{let a,o=!0;for(;a=n<this.children.length?this.children[n]:null,!(!a||a.dom.parentNode==this.contentDOM);n++,o=!1);return a&&o&&!a.border&&!a.domAtom?a.domFromPos(0,t):{node:this.contentDOM,offset:a?Ir(a.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,a=-1;for(let o=n,s=0;;s++){let l=this.children[s],f=o+l.size;if(i==-1&&e<=f){let p=o+l.border;if(e>=p&&t<=f-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,t,p);e=o;for(let b=s;b>0;b--){let T=this.children[b-1];if(T.size&&T.dom.parentNode==this.contentDOM&&!T.emptyChildAt(1)){i=Ir(T.dom)+1;break}e-=T.size}i==-1&&(i=0)}if(i>-1&&(f>t||s==this.children.length-1)){t=f;for(let p=s+1;p<this.children.length;p++){let b=this.children[p];if(b.size&&b.dom.parentNode==this.contentDOM&&!b.emptyChildAt(-1)){a=Ir(b.dom);break}t+=b.size}a==-1&&(a=this.contentDOM.childNodes.length);break}o=f}return{node:this.contentDOM,from:e,to:t,fromOffset:i,toOffset:a}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(t.nodeType!=1||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,i=!1){let a=Math.min(e,t),o=Math.max(e,t);for(let x=0,E=0;x<this.children.length;x++){let P=this.children[x],F=E+P.size;if(a>E&&o<F)return P.setSelection(e-E-P.border,t-E-P.border,n,i);E=F}let s=this.domFromPos(e,e?-1:1),l=t==e?s:this.domFromPos(t,t?-1:1),f=n.root.getSelection(),p=n.domSelectionRange(),b=!1;if((Fn||$r)&&e==t){let{node:x,offset:E}=s;if(x.nodeType==3){if(b=!!(E&&x.nodeValue[E-1]==`
|
|
6
|
-
`),b&&E==x.nodeValue.length)for(let P=x,F;P;P=P.parentNode){if(F=P.nextSibling){F.nodeName=="BR"&&(s=l={node:F.parentNode,offset:Ir(F)+1});break}let z=P.pmViewDesc;if(z&&z.node&&z.node.isBlock)break}}else{let P=x.childNodes[E-1];b=P&&(P.nodeName=="BR"||P.contentEditable=="false")}}if(Fn&&p.focusNode&&p.focusNode!=l.node&&p.focusNode.nodeType==1){let x=p.focusNode.childNodes[p.focusOffset];x&&x.contentEditable=="false"&&(i=!0)}if(!(i||b&&$r)&&Ga(s.node,s.offset,p.anchorNode,p.anchorOffset)&&Ga(l.node,l.offset,p.focusNode,p.focusOffset))return;let T=!1;if((f.extend||e==t)&&!(b&&Fn)){f.collapse(s.node,s.offset);try{e!=t&&f.extend(l.node,l.offset),T=!0}catch{}}if(!T){if(e>t){let E=s;s=l,l=E}let x=document.createRange();x.setEnd(l.node,l.offset),x.setStart(s.node,s.offset),f.removeAllRanges(),f.addRange(x)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,i=0;i<this.children.length;i++){let a=this.children[i],o=n+a.size;if(n==o?e<=o&&t>=n:e<o&&t>n){let s=n+a.border,l=o-a.border;if(e>=s&&t<=l){this.dirty=e==n||t==o?Fa:Yv,e==s&&t==l&&(a.contentLost||a.dom.parentNode!=this.contentDOM)?a.dirty=fi:a.markDirty(e-s,t-s);return}else a.dirty=a.dom==a.contentDOM&&a.dom.parentNode==this.contentDOM&&!a.children.length?Fa:fi}n=o}this.dirty=Fa}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?Fa:Yv;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class Hb extends Vs{constructor(e,t,n,i){let a,o=t.type.toDOM;if(typeof o=="function"&&(o=o(n,()=>{if(!a)return i;if(a.parent)return a.parent.posBeforeChild(a)})),!t.type.spec.raw){if(o.nodeType!=1){let s=document.createElement("span");s.appendChild(o),o=s}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,a=this}matchesWidget(e){return this.dirty==qn&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class wee extends Vs{constructor(e,t,n,i){super(e,[],t,null),this.textDOM=n,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Ka extends Vs{constructor(e,t,n,i,a){super(e,[],n,i),this.mark=t,this.spec=a}static create(e,t,n,i){let a=i.nodeViews[t.type.name],o=a&&a(t,i,n);return(!o||!o.dom)&&(o=Xo.renderSpec(document,t.type.spec.toDOM(t,n),null,t.attrs)),new Ka(e,t,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&fi||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=fi&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=qn){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty<this.dirty&&(n.dirty=this.dirty),this.dirty=qn}}slice(e,t,n){let i=Ka.create(this.parent,this.mark,!0,n),a=this.children,o=this.size;t<o&&(a=Md(a,t,o,n)),e>0&&(a=Md(a,0,e,n));for(let s=0;s<a.length;s++)a[s].parent=i;return i.children=a,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class aa extends Vs{constructor(e,t,n,i,a,o,s,l,f){super(e,[],a,o),this.node=t,this.outerDeco=n,this.innerDeco=i,this.nodeDOM=s}static create(e,t,n,i,a,o){let s=a.nodeViews[t.type.name],l,f=s&&s(t,a,()=>{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},n,i),p=f&&f.dom,b=f&&f.contentDOM;if(t.isText){if(!p)p=document.createTextNode(t.text);else if(p.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else p||({dom:p,contentDOM:b}=Xo.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!b&&!t.isText&&p.nodeName!="BR"&&(p.hasAttribute("contenteditable")||(p.contentEditable="false"),t.type.spec.draggable&&(p.draggable=!0));let T=p;return p=Ub(p,n,t),f?l=new Cee(e,t,n,i,p,b||null,T,f,a,o+1):t.isText?new Bu(e,t,n,i,p,T,a):new aa(e,t,n,i,p,b||null,T,a,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>De.empty)}return e}matchesNode(e,t,n){return this.dirty==qn&&e.eq(this.node)&&lu(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,i=t,a=e.composing?this.localCompositionInfo(e,t):null,o=a&&a.pos>-1?a:null,s=a&&a.pos<0,l=new See(this,o&&o.node,e);Mee(this.node,this.innerDeco,(f,p,b)=>{f.spec.marks?l.syncToMarks(f.spec.marks,n,e,p):f.type.side>=0&&!b&&l.syncToMarks(p==this.node.childCount?Bt.none:this.node.child(p).marks,n,e,p),l.placeWidget(f,e,i)},(f,p,b,T)=>{l.syncToMarks(f.marks,n,e,T);let x;l.findNodeMatch(f,p,b,T)||s&&e.state.selection.from>i&&e.state.selection.to<i+f.nodeSize&&(x=l.findIndexWithChild(a.node))>-1&&l.updateNodeAt(f,p,b,x,e)||l.updateNextNode(f,p,b,e,T,i)||l.addNode(f,p,b,e,i),i+=f.nodeSize}),l.syncToMarks([],n,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Fa)&&(o&&this.protectLocalComposition(e,o),zb(this.contentDOM,this.children,e),qo&&Aee(this.dom))}localCompositionInfo(e,t){let{from:n,to:i}=e.state.selection;if(!(e.state.selection instanceof xt)||n<t||i>t+this.node.content.size)return null;let a=e.input.compositionNode;if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){let o=a.nodeValue,s=Oee(this.node.content,o,n-t,i-t);return s<0?null:{node:a,pos:s,text:o}}else return{node:a,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:i}){if(this.getDesc(t))return;let a=t;for(;a.parentNode!=this.contentDOM;a=a.parentNode){for(;a.previousSibling;)a.parentNode.removeChild(a.previousSibling);for(;a.nextSibling;)a.parentNode.removeChild(a.nextSibling);a.pmViewDesc&&(a.pmViewDesc=void 0)}let o=new wee(this,a,t,i);e.input.compositionNodes.push(o),this.children=Md(this.children,n,n+i.length,e,o)}update(e,t,n,i){return this.dirty==fi||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,n,i),!0)}updateInner(e,t,n,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=qn}updateOuterDeco(e){if(lu(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=Vb(this.dom,this.nodeDOM,Ed(this.outerDeco,this.node,t),Ed(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Xv(r,e,t,n,i){Ub(n,e,r);let a=new aa(void 0,r,e,t,n,n,n,i,0);return a.contentDOM&&a.updateChildren(i,0),a}class Bu extends aa{constructor(e,t,n,i,a,o,s){super(e,t,n,i,a,null,o,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,i){return this.dirty==fi||this.dirty!=qn&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=qn||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=qn,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,n){let i=this.node.cut(e,t),a=document.createTextNode(i.text);return new Bu(this.parent,i,this.outerDeco,this.innerDeco,a,a,n)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=fi)}get domAtom(){return!1}isText(e){return this.node.text==e}}class _b extends Vs{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==qn&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Cee extends aa{constructor(e,t,n,i,a,o,s,l,f,p){super(e,t,n,i,a,o,s,f,p),this.spec=l}update(e,t,n,i){if(this.dirty==fi)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let a=this.spec.update(e,t,n);return a&&this.updateInner(e,t,n,i),a}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,n,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,i){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function zb(r,e,t){let n=r.firstChild,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=o.dom;if(s.parentNode==r){for(;s!=n;)n=Zv(n),i=!0;n=n.nextSibling}else i=!0,r.insertBefore(s,n);if(o instanceof Ka){let l=n?n.previousSibling:r.lastChild;zb(o.contentDOM,o.children,t),n=l?l.nextSibling:r.firstChild}}for(;n;)n=Zv(n),i=!0;i&&t.trackWrites==r&&(t.trackWrites=null)}const xs=function(r){r&&(this.nodeName=r)};xs.prototype=Object.create(null);const qa=[new xs];function Ed(r,e,t){if(r.length==0)return qa;let n=t?qa[0]:new xs,i=[n];for(let a=0;a<r.length;a++){let o=r[a].type.attrs;if(o){o.nodeName&&i.push(n=new xs(o.nodeName));for(let s in o){let l=o[s];l!=null&&(t&&i.length==1&&i.push(n=new xs(e.isInline?"span":"div")),s=="class"?n.class=(n.class?n.class+" ":"")+l:s=="style"?n.style=(n.style?n.style+";":"")+l:s!="nodeName"&&(n[s]=l))}}}return i}function Vb(r,e,t,n){if(t==qa&&n==qa)return e;let i=e;for(let a=0;a<n.length;a++){let o=n[a],s=t[a];if(a){let l;s&&s.nodeName==o.nodeName&&i!=r&&(l=i.parentNode)&&l.nodeName.toLowerCase()==o.nodeName||(l=document.createElement(o.nodeName),l.pmIsDeco=!0,l.appendChild(i),s=qa[0]),i=l}Tee(i,s||qa[0],o)}return i}function Tee(r,e,t){for(let n in e)n!="class"&&n!="style"&&n!="nodeName"&&!(n in t)&&r.removeAttribute(n);for(let n in t)n!="class"&&n!="style"&&n!="nodeName"&&t[n]!=e[n]&&r.setAttribute(n,t[n]);if(e.class!=t.class){let n=e.class?e.class.split(" ").filter(Boolean):[],i=t.class?t.class.split(" ").filter(Boolean):[];for(let a=0;a<n.length;a++)i.indexOf(n[a])==-1&&r.classList.remove(n[a]);for(let a=0;a<i.length;a++)n.indexOf(i[a])==-1&&r.classList.add(i[a]);r.classList.length==0&&r.removeAttribute("class")}if(e.style!=t.style){if(e.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=n.exec(e.style);)r.style.removeProperty(i[1])}t.style&&(r.style.cssText+=t.style)}}function Ub(r,e,t){return Vb(r,r,qa,Ed(e,t,r.nodeType!=1))}function lu(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(!r[t].type.eq(e[t].type))return!1;return!0}function Zv(r){let e=r.nextSibling;return r.parentNode.removeChild(r),e}class See{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=xee(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,i){let a=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;a<s&&(a==o-1?this.top:this.stack[a+1<<1]).matchesMark(e[a])&&e[a].type.spec.spanning!==!1;)a++;for(;a<o;)this.destroyRest(),this.top.dirty=qn,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let l=-1,f=this.top.children.length;i<this.preMatch.index&&(f=Math.min(this.index+3,f));for(let p=this.index;p<f;p++){let b=this.top.children[p];if(b.matchesMark(e[o])&&!this.isLocked(b.dom)){l=p;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let p=Ka.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,p),this.top=p,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,i){let a=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))a=this.top.children.indexOf(o,this.index);else for(let s=this.index,l=Math.min(this.top.children.length,s+5);s<l;s++){let f=this.top.children[s];if(f.matchesNode(e,t,n)&&!this.preMatch.matched.has(f)){a=s;break}}return a<0?!1:(this.destroyBetween(this.index,a),this.index++,!0)}updateNodeAt(e,t,n,i,a){let o=this.top.children[i];return o.dirty==fi&&o.dom==o.contentDOM&&(o.dirty=Fa),o.update(e,t,n,a)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let n=e.pmViewDesc;if(n){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==n)return i}return-1}e=t}}updateNextNode(e,t,n,i,a,o){for(let s=this.index;s<this.top.children.length;s++){let l=this.top.children[s];if(l instanceof aa){let f=this.preMatch.matched.get(l);if(f!=null&&f!=a)return!1;let p=l.dom,b,T=this.isLocked(p)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=fi&&lu(t,l.outerDeco));if(!T&&l.update(e,t,n,i))return this.destroyBetween(this.index,s),l.dom!=p&&(this.changed=!0),this.index++,!0;if(!T&&(b=this.recreateWrapper(l,e,t,n,i,o)))return this.destroyBetween(this.index,s),this.top.children[this.index]=b,b.contentDOM&&(b.dirty=Fa,b.updateChildren(i,o+1),b.dirty=qn),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,i,a,o){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!lu(n,e.outerDeco)||!i.eq(e.innerDeco))return null;let s=aa.create(this.top,t,n,i,a,o);if(s.contentDOM){s.children=e.children,e.children=[];for(let l of s.children)l.parent=s}return e.destroy(),s}addNode(e,t,n,i,a){let o=aa.create(this.top,e,t,n,i,a);o.contentDOM&&o.updateChildren(i,a+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,t,n){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let a=new Hb(this.top,e,t,n);this.top.children.splice(this.index++,0,a),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof Ka;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Bu)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&(($r||Pr)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e=="IMG"&&(n.className="ProseMirror-separator",n.alt=""),e=="BR"&&(n.className="ProseMirror-trailingBreak");let i=new _b(this.top,[],n,null);t!=this.top?t.children.push(i):t.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function xee(r,e){let t=e,n=t.children.length,i=r.childCount,a=new Map,o=[];e:for(;i>0;){let s;for(;;)if(n){let f=t.children[n-1];if(f instanceof Ka)t=f,n=f.children.length;else{s=f,n--;break}}else{if(t==e)break e;n=t.parent.children.indexOf(t),t=t.parent}let l=s.node;if(l){if(l!=r.child(i-1))break;--i,a.set(s,i),o.push(s)}}return{index:i,matched:a,matches:o.reverse()}}function Eee(r,e){return r.type.side-e.type.side}function Mee(r,e,t,n){let i=e.locals(r),a=0;if(i.length==0){for(let f=0;f<r.childCount;f++){let p=r.child(f);n(p,i,e.forChild(a,p),f),a+=p.nodeSize}return}let o=0,s=[],l=null;for(let f=0;;){let p,b;for(;o<i.length&&i[o].to==a;){let F=i[o++];F.widget&&(p?(b||(b=[p])).push(F):p=F)}if(p)if(b){b.sort(Eee);for(let F=0;F<b.length;F++)t(b[F],f,!!l)}else t(p,f,!!l);let T,x;if(l)x=-1,T=l,l=null;else if(f<r.childCount)x=f,T=r.child(f++);else break;for(let F=0;F<s.length;F++)s[F].to<=a&&s.splice(F--,1);for(;o<i.length&&i[o].from<=a&&i[o].to>a;)s.push(i[o++]);let E=a+T.nodeSize;if(T.isText){let F=E;o<i.length&&i[o].from<F&&(F=i[o].from);for(let z=0;z<s.length;z++)s[z].to<F&&(F=s[z].to);F<E&&(l=T.cut(F-a),T=T.cut(0,F-a),E=F,x=-1)}else for(;o<i.length&&i[o].to<E;)o++;let P=T.isInline&&!T.isLeaf?s.filter(F=>!F.inline):s.slice();n(T,P,e.forChild(a,T),x),a=E}}function Aee(r){if(r.nodeName=="UL"||r.nodeName=="OL"){let e=r.style.cssText;r.style.cssText=e+"; list-style: square !important",window.getComputedStyle(r).listStyle,r.style.cssText=e}}function Oee(r,e,t,n){for(let i=0,a=0;i<r.childCount&&a<=n;){let o=r.child(i++),s=a;if(a+=o.nodeSize,!o.isText)continue;let l=o.text;for(;i<r.childCount;){let f=r.child(i++);if(a+=f.nodeSize,!f.isText)break;l+=f.text}if(a>=t){if(a>=n&&l.slice(n-e.length-s,n-s)==e)return n-e.length;let f=s<n?l.lastIndexOf(e,n-s-1):-1;if(f>=0&&f+e.length+s>=t)return s+f;if(t==n&&l.length>=n+e.length-s&&l.slice(n-s,n-s+e.length)==e)return n}}return-1}function Md(r,e,t,n,i){let a=[];for(let o=0,s=0;o<r.length;o++){let l=r[o],f=s,p=s+=l.size;f>=t||p<=e?a.push(l):(f<e&&a.push(l.slice(0,e-f,n)),i&&(a.push(i),i=void 0),p>t&&a.push(l.slice(t-f,l.size,n)))}return a}function ch(r,e=null){let t=r.domSelectionRange(),n=r.state.doc;if(!t.focusNode)return null;let i=r.docView.nearestDesc(t.focusNode),a=i&&i.size==0,o=r.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(o<0)return null;let s=n.resolve(o),l,f;if(Pu(t)){for(l=o;i&&!i.node;)i=i.parent;let b=i.node;if(i&&b.isAtom&&ft.isSelectable(b)&&i.parent&&!(b.isInline&&ree(t.focusNode,t.focusOffset,i.dom))){let T=i.posBefore;f=new ft(o==T?s:n.resolve(T))}}else{if(t instanceof r.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let b=o,T=o;for(let x=0;x<t.rangeCount;x++){let E=t.getRangeAt(x);b=Math.min(b,r.docView.posFromDOM(E.startContainer,E.startOffset,1)),T=Math.max(T,r.docView.posFromDOM(E.endContainer,E.endOffset,-1))}if(b<0)return null;[l,o]=T==r.state.selection.anchor?[T,b]:[b,T],s=n.resolve(o)}else l=r.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(l<0)return null}let p=n.resolve(l);if(!f){let b=e=="pointer"||r.state.selection.head<s.pos&&!a?1:-1;f=fh(r,p,s,b)}return f}function $b(r){return r.editable?r.hasFocus():jb(r)&&document.activeElement&&document.activeElement.contains(r.dom)}function Ii(r,e=!1){let t=r.state.selection;if(Wb(r,t),!!$b(r)){if(!e&&r.input.mouseDown&&r.input.mouseDown.allowDefault&&Pr){let n=r.domSelectionRange(),i=r.domObserver.currentSelection;if(n.anchorNode&&i.anchorNode&&Ga(n.anchorNode,n.anchorOffset,i.anchorNode,i.anchorOffset)){r.input.mouseDown.delayedSelectionSync=!0,r.domObserver.setCurSelection();return}}if(r.domObserver.disconnectSelection(),r.cursorWrapper)Dee(r);else{let{anchor:n,head:i}=t,a,o;Qv&&!(t instanceof xt)&&(t.$from.parent.inlineContent||(a=em(r,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(o=em(r,t.to))),r.docView.setSelection(n,i,r,e),Qv&&(a&&tm(a),o&&tm(o)),t.visible?r.dom.classList.remove("ProseMirror-hideselection"):(r.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Nee(r))}r.domObserver.setCurSelection(),r.domObserver.connectSelection()}}const Qv=$r||Pr&&Db<63;function em(r,e){let{node:t,offset:n}=r.docView.domFromPos(e,0),i=n<t.childNodes.length?t.childNodes[n]:null,a=n?t.childNodes[n-1]:null;if($r&&i&&i.contentEditable=="false")return Ff(i);if((!i||i.contentEditable=="false")&&(!a||a.contentEditable=="false")){if(i)return Ff(i);if(a)return Ff(a)}}function Ff(r){return r.contentEditable="true",$r&&r.draggable&&(r.draggable=!1,r.wasDraggable=!0),r}function tm(r){r.contentEditable="false",r.wasDraggable&&(r.draggable=!0,r.wasDraggable=null)}function Nee(r){let e=r.dom.ownerDocument;e.removeEventListener("selectionchange",r.input.hideSelectionGuard);let t=r.domSelectionRange(),n=t.anchorNode,i=t.anchorOffset;e.addEventListener("selectionchange",r.input.hideSelectionGuard=()=>{(t.anchorNode!=n||t.anchorOffset!=i)&&(e.removeEventListener("selectionchange",r.input.hideSelectionGuard),setTimeout(()=>{(!$b(r)||r.state.selection.visible)&&r.dom.classList.remove("ProseMirror-hideselection")},20))})}function Dee(r){let e=r.domSelection();if(!e)return;let t=r.cursorWrapper.dom,n=t.nodeName=="IMG";n?e.collapse(t.parentNode,Ir(t)+1):e.collapse(t,0),!n&&!r.state.selection.visible&&fn&&ia<=11&&(t.disabled=!0,t.disabled=!1)}function Wb(r,e){if(e instanceof ft){let t=r.docView.descAt(e.from);t!=r.lastSelectedViewDesc&&(rm(r),t&&t.selectNode(),r.lastSelectedViewDesc=t)}else rm(r)}function rm(r){r.lastSelectedViewDesc&&(r.lastSelectedViewDesc.parent&&r.lastSelectedViewDesc.deselectNode(),r.lastSelectedViewDesc=void 0)}function fh(r,e,t,n){return r.someProp("createSelectionBetween",i=>i(r,e,t))||xt.between(e,t,n)}function nm(r){return r.editable&&!r.hasFocus()?!1:jb(r)}function jb(r){let e=r.domSelectionRange();if(!e.anchorNode)return!1;try{return r.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(r.editable||r.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function Lee(r){let e=r.docView.domFromPos(r.state.selection.anchor,0),t=r.domSelectionRange();return Ga(e.node,e.offset,t.anchorNode,t.anchorOffset)}function Ad(r,e){let{$anchor:t,$head:n}=r.selection,i=e>0?t.max(n):t.min(n),a=i.parent.inlineContent?i.depth?r.doc.resolve(e>0?i.after():i.before()):null:i;return a&&Tt.findFrom(a,e)}function Yi(r,e){return r.dispatch(r.state.tr.setSelection(e).scrollIntoView()),!0}function im(r,e,t){let n=r.state.selection;if(n instanceof xt)if(t.indexOf("s")>-1){let{$head:i}=n,a=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!a||a.isText||!a.isLeaf)return!1;let o=r.state.doc.resolve(i.pos+a.nodeSize*(e<0?-1:1));return Yi(r,new xt(n.$anchor,o))}else if(n.empty){if(r.endOfTextblock(e>0?"forward":"backward")){let i=Ad(r.state,e);return i&&i instanceof ft?Yi(r,i):!1}else if(!(Pn&&t.indexOf("m")>-1)){let i=n.$head,a=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,o;if(!a||a.isText)return!1;let s=e<0?i.pos-a.nodeSize:i.pos;return a.isAtom||(o=r.docView.descAt(s))&&!o.contentDOM?ft.isSelectable(a)?Yi(r,new ft(e<0?r.state.doc.resolve(i.pos-a.nodeSize):i)):zs?Yi(r,new xt(r.state.doc.resolve(e<0?s:s+a.nodeSize))):!1:!1}}else return!1;else{if(n instanceof ft&&n.node.isInline)return Yi(r,new xt(e>0?n.$to:n.$from));{let i=Ad(r.state,e);return i?Yi(r,i):!1}}}function uu(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function Es(r,e){let t=r.pmViewDesc;return t&&t.size==0&&(e<0||r.nextSibling||r.nodeName!="BR")}function Co(r,e){return e<0?Ree(r):Iee(r)}function Ree(r){let e=r.domSelectionRange(),t=e.focusNode,n=e.focusOffset;if(!t)return;let i,a,o=!1;for(Fn&&t.nodeType==1&&n<uu(t)&&Es(t.childNodes[n],-1)&&(o=!0);;)if(n>0){if(t.nodeType!=1)break;{let s=t.childNodes[n-1];if(Es(s,-1))i=t,a=--n;else if(s.nodeType==3)t=s,n=t.nodeValue.length;else break}}else{if(Gb(t))break;{let s=t.previousSibling;for(;s&&Es(s,-1);)i=t.parentNode,a=Ir(s),s=s.previousSibling;if(s)t=s,n=uu(t);else{if(t=t.parentNode,t==r.dom)break;n=0}}}o?Od(r,t,n):i&&Od(r,i,a)}function Iee(r){let e=r.domSelectionRange(),t=e.focusNode,n=e.focusOffset;if(!t)return;let i=uu(t),a,o;for(;;)if(n<i){if(t.nodeType!=1)break;let s=t.childNodes[n];if(Es(s,1))a=t,o=++n;else break}else{if(Gb(t))break;{let s=t.nextSibling;for(;s&&Es(s,1);)a=s.parentNode,o=Ir(s)+1,s=s.nextSibling;if(s)t=s,n=0,i=uu(t);else{if(t=t.parentNode,t==r.dom)break;n=i=0}}}a&&Od(r,a,o)}function Gb(r){let e=r.pmViewDesc;return e&&e.node&&e.node.isBlock}function Pee(r,e){for(;r&&e==r.childNodes.length&&!_s(r);)e=Ir(r)+1,r=r.parentNode;for(;r&&e<r.childNodes.length;){let t=r.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;r=t,e=0}}function Bee(r,e){for(;r&&!e&&!_s(r);)e=Ir(r),r=r.parentNode;for(;r&&e;){let t=r.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;r=t,e=r.childNodes.length}}function Od(r,e,t){if(e.nodeType!=3){let a,o;(o=Pee(e,t))?(e=o,t=0):(a=Bee(e,t))&&(e=a,t=a.nodeValue.length)}let n=r.domSelection();if(!n)return;if(Pu(n)){let a=document.createRange();a.setEnd(e,t),a.setStart(e,t),n.removeAllRanges(),n.addRange(a)}else n.extend&&n.extend(e,t);r.domObserver.setCurSelection();let{state:i}=r;setTimeout(()=>{r.state==i&&Ii(r)},50)}function am(r,e){let t=r.state.doc.resolve(e);if(!(Pr||Lb)&&t.parent.inlineContent){let i=r.coordsAtPos(e);if(e>t.start()){let a=r.coordsAtPos(e-1),o=(a.top+a.bottom)/2;if(o>i.top&&o<i.bottom&&Math.abs(a.left-i.left)>1)return a.left<i.left?"ltr":"rtl"}if(e<t.end()){let a=r.coordsAtPos(e+1),o=(a.top+a.bottom)/2;if(o>i.top&&o<i.bottom&&Math.abs(a.left-i.left)>1)return a.left>i.left?"ltr":"rtl"}}return getComputedStyle(r.dom).direction=="rtl"?"rtl":"ltr"}function om(r,e,t){let n=r.state.selection;if(n instanceof xt&&!n.empty||t.indexOf("s")>-1||Pn&&t.indexOf("m")>-1)return!1;let{$from:i,$to:a}=n;if(!i.parent.inlineContent||r.endOfTextblock(e<0?"up":"down")){let o=Ad(r.state,e);if(o&&o instanceof ft)return Yi(r,o)}if(!i.parent.inlineContent){let o=e<0?i:a,s=n instanceof Jr?Tt.near(o,e):Tt.findFrom(o,e);return s?Yi(r,s):!1}return!1}function sm(r,e){if(!(r.state.selection instanceof xt))return!0;let{$head:t,$anchor:n,empty:i}=r.state.selection;if(!t.sameParent(n))return!0;if(!i)return!1;if(r.endOfTextblock(e>0?"forward":"backward"))return!0;let a=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(a&&!a.isText){let o=r.state.tr;return e<0?o.delete(t.pos-a.nodeSize,t.pos):o.delete(t.pos,t.pos+a.nodeSize),r.dispatch(o),!0}return!1}function lm(r,e,t){r.domObserver.stop(),e.contentEditable=t,r.domObserver.start()}function Fee(r){if(!$r||r.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=r.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let n=e.firstChild;lm(r,n,"true"),setTimeout(()=>lm(r,n,"false"),20)}return!1}function qee(r){let e="";return r.ctrlKey&&(e+="c"),r.metaKey&&(e+="m"),r.altKey&&(e+="a"),r.shiftKey&&(e+="s"),e}function Hee(r,e){let t=e.keyCode,n=qee(e);if(t==8||Pn&&t==72&&n=="c")return sm(r,-1)||Co(r,-1);if(t==46&&!e.shiftKey||Pn&&t==68&&n=="c")return sm(r,1)||Co(r,1);if(t==13||t==27)return!0;if(t==37||Pn&&t==66&&n=="c"){let i=t==37?am(r,r.state.selection.from)=="ltr"?-1:1:-1;return im(r,i,n)||Co(r,i)}else if(t==39||Pn&&t==70&&n=="c"){let i=t==39?am(r,r.state.selection.from)=="ltr"?1:-1:1;return im(r,i,n)||Co(r,i)}else{if(t==38||Pn&&t==80&&n=="c")return om(r,-1,n)||Co(r,-1);if(t==40||Pn&&t==78&&n=="c")return Fee(r)||om(r,1,n)||Co(r,1);if(n==(Pn?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function dh(r,e){r.someProp("transformCopied",x=>{e=x(e,r)});let t=[],{content:n,openStart:i,openEnd:a}=e;for(;i>1&&a>1&&n.childCount==1&&n.firstChild.childCount==1;){i--,a--;let x=n.firstChild;t.push(x.type.name,x.attrs!=x.type.defaultAttrs?x.attrs:null),n=x.content}let o=r.someProp("clipboardSerializer")||Xo.fromSchema(r.state.schema),s=Qb(),l=s.createElement("div");l.appendChild(o.serializeFragment(n,{document:s}));let f=l.firstChild,p,b=0;for(;f&&f.nodeType==1&&(p=Zb[f.nodeName.toLowerCase()]);){for(let x=p.length-1;x>=0;x--){let E=s.createElement(p[x]);for(;l.firstChild;)E.appendChild(l.firstChild);l.appendChild(E),b++}f=l.firstChild}f&&f.nodeType==1&&f.setAttribute("data-pm-slice",`${i} ${a}${b?` -${b}`:""} ${JSON.stringify(t)}`);let T=r.someProp("clipboardTextSerializer",x=>x(e,r))||e.content.textBetween(0,e.content.size,`
|
|
7
|
-
|
|
8
|
-
`);return{dom:l,text:T,slice:e}}function Kb(r,e,t,n,i){let a=i.parent.type.spec.code,o,s;if(!t&&!e)return null;let l=!!e&&(n||a||!t);if(l){if(r.someProp("transformPastedText",T=>{e=T(e,a||n,r)}),a)return s=new $e(De.from(r.state.schema.text(e.replace(/\r\n?/g,`
|
|
9
|
-
`))),0,0),r.someProp("transformPasted",T=>{s=T(s,r,!0)}),s;let b=r.someProp("clipboardTextParser",T=>T(e,i,n,r));if(b)s=b;else{let T=i.marks(),{schema:x}=r.state,E=Xo.fromSchema(x);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(P=>{let F=o.appendChild(document.createElement("p"));P&&F.appendChild(E.serializeNode(x.text(P,T)))})}}else r.someProp("transformPastedHTML",b=>{t=b(t,r)}),o=Uee(t),zs&&$ee(o);let f=o&&o.querySelector("[data-pm-slice]"),p=f&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(f.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let b=+p[3];b>0;b--){let T=o.firstChild;for(;T&&T.nodeType!=1;)T=T.nextSibling;if(!T)break;o=T}if(s||(s=(r.someProp("clipboardParser")||r.someProp("domParser")||Wa.fromSchema(r.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||p),context:i,ruleFromNode(T){return T.nodeName=="BR"&&!T.nextSibling&&T.parentNode&&!_ee.test(T.parentNode.nodeName)?{ignore:!0}:null}})),p)s=Wee(um(s,+p[1],+p[2]),p[4]);else if(s=$e.maxOpen(zee(s.content,i),!0),s.openStart||s.openEnd){let b=0,T=0;for(let x=s.content.firstChild;b<s.openStart&&!x.type.spec.isolating;b++,x=x.firstChild);for(let x=s.content.lastChild;T<s.openEnd&&!x.type.spec.isolating;T++,x=x.lastChild);s=um(s,b,T)}return r.someProp("transformPasted",b=>{s=b(s,r,l)}),s}const _ee=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function zee(r,e){if(r.childCount<2)return r;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),a,o=[];if(r.forEach(s=>{if(!o)return;let l=i.findWrapping(s.type),f;if(!l)return o=null;if(f=o.length&&a.length&&Yb(l,a,s,o[o.length-1],0))o[o.length-1]=f;else{o.length&&(o[o.length-1]=Xb(o[o.length-1],a.length));let p=Jb(s,l);o.push(p),i=i.matchType(p.type),a=l}}),o)return De.from(o)}return r}function Jb(r,e,t=0){for(let n=e.length-1;n>=t;n--)r=e[n].create(null,De.from(r));return r}function Yb(r,e,t,n,i){if(i<r.length&&i<e.length&&r[i]==e[i]){let a=Yb(r,e,t,n.lastChild,i+1);if(a)return n.copy(n.content.replaceChild(n.childCount-1,a));if(n.contentMatchAt(n.childCount).matchType(i==r.length-1?t.type:r[i+1]))return n.copy(n.content.append(De.from(Jb(t,r,i+1))))}}function Xb(r,e){if(e==0)return r;let t=r.content.replaceChild(r.childCount-1,Xb(r.lastChild,e-1)),n=r.contentMatchAt(r.childCount).fillBefore(De.empty,!0);return r.copy(t.append(n))}function Nd(r,e,t,n,i,a){let o=e<0?r.firstChild:r.lastChild,s=o.content;return r.childCount>1&&(a=0),i<n-1&&(s=Nd(s,e,t,n,i+1,a)),i>=t&&(s=e<0?o.contentMatchAt(0).fillBefore(s,a<=i).append(s):s.append(o.contentMatchAt(o.childCount).fillBefore(De.empty,!0))),r.replaceChild(e<0?0:r.childCount-1,o.copy(s))}function um(r,e,t){return e<r.openStart&&(r=new $e(Nd(r.content,-1,e,r.openStart,0,r.openEnd),e,r.openEnd)),t<r.openEnd&&(r=new $e(Nd(r.content,1,t,r.openEnd,0,0),r.openStart,t)),r}const Zb={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let cm=null;function Qb(){return cm||(cm=document.implementation.createHTMLDocument("title"))}let qf=null;function Vee(r){let e=window.trustedTypes;return e?(qf||(qf=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),qf.createHTML(r)):r}function Uee(r){let e=/^(\s*<meta [^>]*>)*/.exec(r);e&&(r=r.slice(e[0].length));let t=Qb().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(r),i;if((i=n&&Zb[n[1].toLowerCase()])&&(r=i.map(a=>"<"+a+">").join("")+r+i.map(a=>"</"+a+">").reverse().join("")),t.innerHTML=Vee(r),i)for(let a=0;a<i.length;a++)t=t.querySelector(i[a])||t;return t}function $ee(r){let e=r.querySelectorAll(Pr?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let n=e[t];n.childNodes.length==1&&n.textContent==" "&&n.parentNode&&n.parentNode.replaceChild(r.ownerDocument.createTextNode(" "),n)}}function Wee(r,e){if(!r.size)return r;let t=r.content.firstChild.type.schema,n;try{n=JSON.parse(e)}catch{return r}let{content:i,openStart:a,openEnd:o}=r;for(let s=n.length-2;s>=0;s-=2){let l=t.nodes[n[s]];if(!l||l.hasRequiredAttrs())break;i=De.from(l.create(n[s+1],i)),a++,o++}return new $e(i,a,o)}const Yr={},Xr={},jee={touchstart:!0,touchmove:!0};class Gee{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Kee(r){for(let e in Yr){let t=Yr[e];r.dom.addEventListener(e,r.input.eventHandlers[e]=n=>{Yee(r,n)&&!hh(r,n)&&(r.editable||!(n.type in Xr))&&t(r,n)},jee[e]?{passive:!0}:void 0)}$r&&r.dom.addEventListener("input",()=>null),Dd(r)}function ra(r,e){r.input.lastSelectionOrigin=e,r.input.lastSelectionTime=Date.now()}function Jee(r){r.domObserver.stop();for(let e in r.input.eventHandlers)r.dom.removeEventListener(e,r.input.eventHandlers[e]);clearTimeout(r.input.composingTimeout),clearTimeout(r.input.lastIOSEnterFallbackTimeout)}function Dd(r){r.someProp("handleDOMEvents",e=>{for(let t in e)r.input.eventHandlers[t]||r.dom.addEventListener(t,r.input.eventHandlers[t]=n=>hh(r,n))})}function hh(r,e){return r.someProp("handleDOMEvents",t=>{let n=t[e.type];return n?n(r,e)||e.defaultPrevented:!1})}function Yee(r,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=r.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function Xee(r,e){!hh(r,e)&&Yr[e.type]&&(r.editable||!(e.type in Xr))&&Yr[e.type](r,e)}Xr.keydown=(r,e)=>{let t=e;if(r.input.shiftKey=t.keyCode==16||t.shiftKey,!tk(r,t)&&(r.input.lastKeyCode=t.keyCode,r.input.lastKeyCodeTime=Date.now(),!(Li&&Pr&&t.keyCode==13)))if(t.keyCode!=229&&r.domObserver.forceFlush(),qo&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let n=Date.now();r.input.lastIOSEnter=n,r.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{r.input.lastIOSEnter==n&&(r.someProp("handleKeyDown",i=>i(r,Pa(13,"Enter"))),r.input.lastIOSEnter=0)},200)}else r.someProp("handleKeyDown",n=>n(r,t))||Hee(r,t)?t.preventDefault():ra(r,"key")};Xr.keyup=(r,e)=>{e.keyCode==16&&(r.input.shiftKey=!1)};Xr.keypress=(r,e)=>{let t=e;if(tk(r,t)||!t.charCode||t.ctrlKey&&!t.altKey||Pn&&t.metaKey)return;if(r.someProp("handleKeyPress",i=>i(r,t))){t.preventDefault();return}let n=r.state.selection;if(!(n instanceof xt)||!n.$from.sameParent(n.$to)){let i=String.fromCharCode(t.charCode),a=()=>r.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!r.someProp("handleTextInput",o=>o(r,n.$from.pos,n.$to.pos,i,a))&&r.dispatch(a()),t.preventDefault()}};function Fu(r){return{left:r.clientX,top:r.clientY}}function Zee(r,e){let t=e.x-r.clientX,n=e.y-r.clientY;return t*t+n*n<100}function ph(r,e,t,n,i){if(n==-1)return!1;let a=r.state.doc.resolve(n);for(let o=a.depth+1;o>0;o--)if(r.someProp(e,s=>o>a.depth?s(r,t,a.nodeAfter,a.before(o),i,!0):s(r,t,a.node(o),a.before(o),i,!1)))return!0;return!1}function Po(r,e,t){if(r.focused||r.focus(),r.state.selection.eq(e))return;let n=r.state.tr.setSelection(e);n.setMeta("pointer",!0),r.dispatch(n)}function Qee(r,e){if(e==-1)return!1;let t=r.state.doc.resolve(e),n=t.nodeAfter;return n&&n.isAtom&&ft.isSelectable(n)?(Po(r,new ft(t)),!0):!1}function ete(r,e){if(e==-1)return!1;let t=r.state.selection,n,i;t instanceof ft&&(n=t.node);let a=r.state.doc.resolve(e);for(let o=a.depth+1;o>0;o--){let s=o>a.depth?a.nodeAfter:a.node(o);if(ft.isSelectable(s)){n&&t.$from.depth>0&&o>=t.$from.depth&&a.before(t.$from.depth+1)==t.$from.pos?i=a.before(t.$from.depth):i=a.before(o);break}}return i!=null?(Po(r,ft.create(r.state.doc,i)),!0):!1}function tte(r,e,t,n,i){return ph(r,"handleClickOn",e,t,n)||r.someProp("handleClick",a=>a(r,e,n))||(i?ete(r,t):Qee(r,t))}function rte(r,e,t,n){return ph(r,"handleDoubleClickOn",e,t,n)||r.someProp("handleDoubleClick",i=>i(r,e,n))}function nte(r,e,t,n){return ph(r,"handleTripleClickOn",e,t,n)||r.someProp("handleTripleClick",i=>i(r,e,n))||ite(r,t,n)}function ite(r,e,t){if(t.button!=0)return!1;let n=r.state.doc;if(e==-1)return n.inlineContent?(Po(r,xt.create(n,0,n.content.size)),!0):!1;let i=n.resolve(e);for(let a=i.depth+1;a>0;a--){let o=a>i.depth?i.nodeAfter:i.node(a),s=i.before(a);if(o.inlineContent)Po(r,xt.create(n,s+1,s+1+o.content.size));else if(ft.isSelectable(o))Po(r,ft.create(n,s));else continue;return!0}}function vh(r){return cu(r)}const ek=Pn?"metaKey":"ctrlKey";Yr.mousedown=(r,e)=>{let t=e;r.input.shiftKey=t.shiftKey;let n=vh(r),i=Date.now(),a="singleClick";i-r.input.lastClick.time<500&&Zee(t,r.input.lastClick)&&!t[ek]&&r.input.lastClick.button==t.button&&(r.input.lastClick.type=="singleClick"?a="doubleClick":r.input.lastClick.type=="doubleClick"&&(a="tripleClick")),r.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:a,button:t.button};let o=r.posAtCoords(Fu(t));o&&(a=="singleClick"?(r.input.mouseDown&&r.input.mouseDown.done(),r.input.mouseDown=new ate(r,o,t,!!n)):(a=="doubleClick"?rte:nte)(r,o.pos,o.inside,t)?t.preventDefault():ra(r,"pointer"))};class ate{constructor(e,t,n,i){this.view=e,this.pos=t,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[ek],this.allowDefault=n.shiftKey;let a,o;if(t.inside>-1)a=e.state.doc.nodeAt(t.inside),o=t.inside;else{let p=e.state.doc.resolve(t.pos);a=p.parent,o=p.depth?p.before():0}const s=i?null:n.target,l=s?e.docView.nearestDesc(s,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:f}=e.state;(n.button==0&&a.type.spec.draggable&&a.type.spec.selectable!==!1||f instanceof ft&&f.from<=o&&f.to>o)&&(this.mightDrag={node:a,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Fn&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ra(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Ii(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Fu(e))),this.updateAllowDefault(e),this.allowDefault||!t?ra(this.view,"pointer"):tte(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||$r&&this.mightDrag&&!this.mightDrag.node.isAtom||Pr&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Po(this.view,Tt.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):ra(this.view,"pointer")}move(e){this.updateAllowDefault(e),ra(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Yr.touchstart=r=>{r.input.lastTouch=Date.now(),vh(r),ra(r,"pointer")};Yr.touchmove=r=>{r.input.lastTouch=Date.now(),ra(r,"pointer")};Yr.contextmenu=r=>vh(r);function tk(r,e){return r.composing?!0:$r&&Math.abs(e.timeStamp-r.input.compositionEndedAt)<500?(r.input.compositionEndedAt=-2e8,!0):!1}const ote=Li?5e3:-1;Xr.compositionstart=Xr.compositionupdate=r=>{if(!r.composing){r.domObserver.flush();let{state:e}=r,t=e.selection.$to;if(e.selection instanceof xt&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)||Pr&&Lb&&ste(r)))r.markCursor=r.state.storedMarks||t.marks(),cu(r,!0),r.markCursor=null;else if(cu(r,!e.selection.empty),Fn&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let n=r.domSelectionRange();for(let i=n.focusNode,a=n.focusOffset;i&&i.nodeType==1&&a!=0;){let o=a<0?i.lastChild:i.childNodes[a-1];if(!o)break;if(o.nodeType==3){let s=r.domSelection();s&&s.collapse(o,o.nodeValue.length);break}else i=o,a=-1}}r.input.composing=!0}rk(r,ote)};function ste(r){let{focusNode:e,focusOffset:t}=r.domSelectionRange();if(!e||e.nodeType!=1||t>=e.childNodes.length)return!1;let n=e.childNodes[t];return n.nodeType==1&&n.contentEditable=="false"}Xr.compositionend=(r,e)=>{r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=e.timeStamp,r.input.compositionPendingChanges=r.domObserver.pendingRecords().length?r.input.compositionID:0,r.input.compositionNode=null,r.input.badSafariComposition?r.domObserver.forceFlush():r.input.compositionPendingChanges&&Promise.resolve().then(()=>r.domObserver.flush()),r.input.compositionID++,rk(r,20))};function rk(r,e){clearTimeout(r.input.composingTimeout),e>-1&&(r.input.composingTimeout=setTimeout(()=>cu(r),e))}function nk(r){for(r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=ute());r.input.compositionNodes.length>0;)r.input.compositionNodes.pop().markParentsDirty()}function lte(r){let e=r.domSelectionRange();if(!e.focusNode)return null;let t=eee(e.focusNode,e.focusOffset),n=tee(e.focusNode,e.focusOffset);if(t&&n&&t!=n){let i=n.pmViewDesc,a=r.domObserver.lastChangedTextNode;if(t==a||n==a)return a;if(!i||!i.isText(n.nodeValue))return n;if(r.input.compositionNode==n){let o=t.pmViewDesc;if(!(!o||!o.isText(t.nodeValue)))return n}}return t||n}function ute(){let r=document.createEvent("Event");return r.initEvent("event",!0,!0),r.timeStamp}function cu(r,e=!1){if(!(Li&&r.domObserver.flushingSoon>=0)){if(r.domObserver.forceFlush(),nk(r),e||r.docView&&r.docView.dirty){let t=ch(r),n=r.state.selection;return t&&!t.eq(n)?r.dispatch(r.state.tr.setSelection(t)):(r.markCursor||e)&&!n.$from.node(n.$from.sharedDepth(n.to)).inlineContent?r.dispatch(r.state.tr.deleteSelection()):r.updateState(r.state),!0}return!1}}function cte(r,e){if(!r.dom.parentNode)return;let t=r.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),i=document.createRange();i.selectNodeContents(e),r.dom.blur(),n.removeAllRanges(),n.addRange(i),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),r.focus()},50)}const Rs=fn&&ia<15||qo&&aee<604;Yr.copy=Xr.cut=(r,e)=>{let t=e,n=r.state.selection,i=t.type=="cut";if(n.empty)return;let a=Rs?null:t.clipboardData,o=n.content(),{dom:s,text:l}=dh(r,o);a?(t.preventDefault(),a.clearData(),a.setData("text/html",s.innerHTML),a.setData("text/plain",l)):cte(r,s),i&&r.dispatch(r.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function fte(r){return r.openStart==0&&r.openEnd==0&&r.content.childCount==1?r.content.firstChild:null}function dte(r,e){if(!r.dom.parentNode)return;let t=r.input.shiftKey||r.state.selection.$from.parent.type.spec.code,n=r.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let i=r.input.shiftKey&&r.input.lastKeyCode!=45;setTimeout(()=>{r.focus(),n.parentNode&&n.parentNode.removeChild(n),t?Is(r,n.value,null,i,e):Is(r,n.textContent,n.innerHTML,i,e)},50)}function Is(r,e,t,n,i){let a=Kb(r,e,t,n,r.state.selection.$from);if(r.someProp("handlePaste",l=>l(r,i,a||$e.empty)))return!0;if(!a)return!1;let o=fte(a),s=o?r.state.tr.replaceSelectionWith(o,n):r.state.tr.replaceSelection(a);return r.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function ik(r){let e=r.getData("text/plain")||r.getData("Text");if(e)return e;let t=r.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}Xr.paste=(r,e)=>{let t=e;if(r.composing&&!Li)return;let n=Rs?null:t.clipboardData,i=r.input.shiftKey&&r.input.lastKeyCode!=45;n&&Is(r,ik(n),n.getData("text/html"),i,t)?t.preventDefault():dte(r,t)};class ak{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}const hte=Pn?"altKey":"ctrlKey";function ok(r,e){let t=r.someProp("dragCopies",n=>!n(e));return t??!e[hte]}Yr.dragstart=(r,e)=>{let t=e,n=r.input.mouseDown;if(n&&n.done(),!t.dataTransfer)return;let i=r.state.selection,a=i.empty?null:r.posAtCoords(Fu(t)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof ft?i.to-1:i.to))){if(n&&n.mightDrag)o=ft.create(r.state.doc,n.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let b=r.docView.nearestDesc(t.target,!0);b&&b.node.type.spec.draggable&&b!=r.docView&&(o=ft.create(r.state.doc,b.posBefore))}}let s=(o||r.state.selection).content(),{dom:l,text:f,slice:p}=dh(r,s);(!t.dataTransfer.files.length||!Pr||Db>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(Rs?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",Rs||t.dataTransfer.setData("text/plain",f),r.dragging=new ak(p,ok(r,t),o)};Yr.dragend=r=>{let e=r.dragging;window.setTimeout(()=>{r.dragging==e&&(r.dragging=null)},50)};Xr.dragover=Xr.dragenter=(r,e)=>e.preventDefault();Xr.drop=(r,e)=>{try{pte(r,e,r.dragging)}finally{r.dragging=null}};function pte(r,e,t){if(!e.dataTransfer)return;let n=r.posAtCoords(Fu(e));if(!n)return;let i=r.state.doc.resolve(n.pos),a=t&&t.slice;a?r.someProp("transformPasted",x=>{a=x(a,r,!1)}):a=Kb(r,ik(e.dataTransfer),Rs?null:e.dataTransfer.getData("text/html"),!1,i);let o=!!(t&&ok(r,e));if(r.someProp("handleDrop",x=>x(r,e,a||$e.empty,o))){e.preventDefault();return}if(!a)return;e.preventDefault();let s=a?zQ(r.state.doc,i.pos,a):i.pos;s==null&&(s=i.pos);let l=r.state.tr;if(o){let{node:x}=t;x?x.replace(l):l.deleteSelection()}let f=l.mapping.map(s),p=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,b=l.doc;if(p?l.replaceRangeWith(f,f,a.content.firstChild):l.replaceRange(f,f,a),l.doc.eq(b))return;let T=l.doc.resolve(f);if(p&&ft.isSelectable(a.content.firstChild)&&T.nodeAfter&&T.nodeAfter.sameMarkup(a.content.firstChild))l.setSelection(new ft(T));else{let x=l.mapping.map(s);l.mapping.maps[l.mapping.maps.length-1].forEach((E,P,F,z)=>x=z),l.setSelection(fh(r,T,l.doc.resolve(x)))}r.focus(),r.dispatch(l.setMeta("uiEvent","drop"))}Yr.focus=r=>{r.input.lastFocus=Date.now(),r.focused||(r.domObserver.stop(),r.dom.classList.add("ProseMirror-focused"),r.domObserver.start(),r.focused=!0,setTimeout(()=>{r.docView&&r.hasFocus()&&!r.domObserver.currentSelection.eq(r.domSelectionRange())&&Ii(r)},20))};Yr.blur=(r,e)=>{let t=e;r.focused&&(r.domObserver.stop(),r.dom.classList.remove("ProseMirror-focused"),r.domObserver.start(),t.relatedTarget&&r.dom.contains(t.relatedTarget)&&r.domObserver.currentSelection.clear(),r.focused=!1)};Yr.beforeinput=(r,e)=>{if(Pr&&Li&&e.inputType=="deleteContentBackward"){r.domObserver.flushSoon();let{domChangeCount:n}=r.input;setTimeout(()=>{if(r.input.domChangeCount!=n||(r.dom.blur(),r.focus(),r.someProp("handleKeyDown",a=>a(r,Pa(8,"Backspace")))))return;let{$cursor:i}=r.state.selection;i&&i.pos>0&&r.dispatch(r.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let r in Xr)Yr[r]=Xr[r];function Ps(r,e){if(r==e)return!0;for(let t in r)if(r[t]!==e[t])return!1;for(let t in e)if(!(t in r))return!1;return!0}class fu{constructor(e,t){this.toDOM=e,this.spec=t||za,this.side=this.spec.side||0}map(e,t,n,i){let{pos:a,deleted:o}=e.mapResult(t.from+i,this.side<0?-1:1);return o?null:new cn(a-n,a-n,this)}valid(){return!0}eq(e){return this==e||e instanceof fu&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Ps(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class oa{constructor(e,t){this.attrs=e,this.spec=t||za}map(e,t,n,i){let a=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-n;return a>=o?null:new cn(a,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof oa&&Ps(this.attrs,e.attrs)&&Ps(this.spec,e.spec)}static is(e){return e.type instanceof oa}destroy(){}}class mh{constructor(e,t){this.attrs=e,this.spec=t||za}map(e,t,n,i){let a=e.mapResult(t.from+i,1);if(a.deleted)return null;let o=e.mapResult(t.to+i,-1);return o.deleted||o.pos<=a.pos?null:new cn(a.pos-n,o.pos-n,this)}valid(e,t){let{index:n,offset:i}=e.content.findIndex(t.from),a;return i==t.from&&!(a=e.child(n)).isText&&i+a.nodeSize==t.to}eq(e){return this==e||e instanceof mh&&Ps(this.attrs,e.attrs)&&Ps(this.spec,e.spec)}destroy(){}}class cn{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new cn(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new cn(e,e,new fu(t,n))}static inline(e,t,n,i){return new cn(e,t,new oa(n,i))}static node(e,t,n,i){return new cn(e,t,new mh(n,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof oa}get widget(){return this.type instanceof fu}}const Ao=[],za={};class dr{constructor(e,t){this.local=e.length?e:Ao,this.children=t.length?t:Ao}static create(e,t){return t.length?du(t,e,0,za):zr}find(e,t,n){let i=[];return this.findInner(e??0,t??1e9,i,0,n),i}findInner(e,t,n,i,a){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=t&&s.to>=e&&(!a||a(s.spec))&&n.push(s.copy(s.from+i,s.to+i))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,i+s,a)}}map(e,t,n){return this==zr||e.maps.length==0?this:this.mapInner(e,t,0,0,n||za)}mapInner(e,t,n,i,a){let o;for(let s=0;s<this.local.length;s++){let l=this.local[s].map(e,n,i);l&&l.type.valid(t,l)?(o||(o=[])).push(l):a.onRemove&&a.onRemove(this.local[s].spec)}return this.children.length?vte(this.children,o||[],e,t,n,i,a):o?new dr(o.sort(Va),Ao):zr}add(e,t){return t.length?this==zr?dr.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let i,a=0;e.forEach((s,l)=>{let f=l+n,p;if(p=lk(t,s,f)){for(i||(i=this.children.slice());a<i.length&&i[a]<l;)a+=3;i[a]==l?i[a+2]=i[a+2].addInner(s,p,f+1):i.splice(a,0,l,l+s.nodeSize,du(p,s,f+1,za)),a+=3}});let o=sk(a?uk(t):t,-n);for(let s=0;s<o.length;s++)o[s].type.valid(e,o[s])||o.splice(s--,1);return new dr(o.length?this.local.concat(o).sort(Va):this.local,i||this.children)}remove(e){return e.length==0||this==zr?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,i=this.local;for(let a=0;a<n.length;a+=3){let o,s=n[a]+t,l=n[a+1]+t;for(let p=0,b;p<e.length;p++)(b=e[p])&&b.from>s&&b.to<l&&(e[p]=null,(o||(o=[])).push(b));if(!o)continue;n==this.children&&(n=this.children.slice());let f=n[a+2].removeInner(o,s+1);f!=zr?n[a+2]=f:(n.splice(a,3),a-=3)}if(i.length){for(let a=0,o;a<e.length;a++)if(o=e[a])for(let s=0;s<i.length;s++)i[s].eq(o,t)&&(i==this.local&&(i=this.local.slice()),i.splice(s--,1))}return n==this.children&&i==this.local?this:i.length||n.length?new dr(i,n):zr}forChild(e,t){if(this==zr)return this;if(t.isLeaf)return dr.empty;let n,i;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=e){this.children[s]==e&&(n=this.children[s+2]);break}let a=e+1,o=a+t.content.size;for(let s=0;s<this.local.length;s++){let l=this.local[s];if(l.from<o&&l.to>a&&l.type instanceof oa){let f=Math.max(a,l.from)-a,p=Math.min(o,l.to)-a;f<p&&(i||(i=[])).push(l.copy(f,p))}}if(i){let s=new dr(i.sort(Va),Ao);return n?new Zi([s,n]):s}return n||zr}eq(e){if(this==e)return!0;if(!(e instanceof dr)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return gh(this.localsInner(e))}localsInner(e){if(this==zr)return Ao;if(e.inlineContent||!this.local.some(oa.is))return this.local;let t=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof oa||t.push(this.local[n]);return t}forEachSet(e){e(this)}}dr.empty=new dr([],[]);dr.removeOverlap=gh;const zr=dr.empty;class Zi{constructor(e){this.members=e}map(e,t){const n=this.members.map(i=>i.map(e,t,za));return Zi.from(n)}forChild(e,t){if(t.isLeaf)return dr.empty;let n=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(e,t);a!=zr&&(a instanceof Zi?n=n.concat(a.members):n.push(a))}return Zi.from(n)}eq(e){if(!(e instanceof Zi)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let i=0;i<this.members.length;i++){let a=this.members[i].localsInner(e);if(a.length)if(!t)t=a;else{n&&(t=t.slice(),n=!1);for(let o=0;o<a.length;o++)t.push(a[o])}}return t?gh(n?t:t.sort(Va)):Ao}static from(e){switch(e.length){case 0:return zr;case 1:return e[0];default:return new Zi(e.every(t=>t instanceof dr)?e:e.reduce((t,n)=>t.concat(n instanceof dr?n:n.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function vte(r,e,t,n,i,a,o){let s=r.slice();for(let f=0,p=a;f<t.maps.length;f++){let b=0;t.maps[f].forEach((T,x,E,P)=>{let F=P-E-(x-T);for(let z=0;z<s.length;z+=3){let Y=s[z+1];if(Y<0||T>Y+p-b)continue;let ee=s[z]+p-b;x>=ee?s[z+1]=T<=ee?-2:-1:T>=p&&F&&(s[z]+=F,s[z+1]+=F)}b+=F}),p=t.maps[f].map(p,-1)}let l=!1;for(let f=0;f<s.length;f+=3)if(s[f+1]<0){if(s[f+1]==-2){l=!0,s[f+1]=-1;continue}let p=t.map(r[f]+a),b=p-i;if(b<0||b>=n.content.size){l=!0;continue}let T=t.map(r[f+1]+a,-1),x=T-i,{index:E,offset:P}=n.content.findIndex(b),F=n.maybeChild(E);if(F&&P==b&&P+F.nodeSize==x){let z=s[f+2].mapInner(t,F,p+1,r[f]+a+1,o);z!=zr?(s[f]=b,s[f+1]=x,s[f+2]=z):(s[f+1]=-2,l=!0)}else l=!0}if(l){let f=mte(s,r,e,t,i,a,o),p=du(f,n,0,o);e=p.local;for(let b=0;b<s.length;b+=3)s[b+1]<0&&(s.splice(b,3),b-=3);for(let b=0,T=0;b<p.children.length;b+=3){let x=p.children[b];for(;T<s.length&&s[T]<x;)T+=3;s.splice(T,0,p.children[b],p.children[b+1],p.children[b+2])}}return new dr(e.sort(Va),s)}function sk(r,e){if(!e||!r.length)return r;let t=[];for(let n=0;n<r.length;n++){let i=r[n];t.push(new cn(i.from+e,i.to+e,i.type))}return t}function mte(r,e,t,n,i,a,o){function s(l,f){for(let p=0;p<l.local.length;p++){let b=l.local[p].map(n,i,f);b?t.push(b):o.onRemove&&o.onRemove(l.local[p].spec)}for(let p=0;p<l.children.length;p+=3)s(l.children[p+2],l.children[p]+f+1)}for(let l=0;l<r.length;l+=3)r[l+1]==-1&&s(r[l+2],e[l]+a+1);return t}function lk(r,e,t){if(e.isLeaf)return null;let n=t+e.nodeSize,i=null;for(let a=0,o;a<r.length;a++)(o=r[a])&&o.from>t&&o.to<n&&((i||(i=[])).push(o),r[a]=null);return i}function uk(r){let e=[];for(let t=0;t<r.length;t++)r[t]!=null&&e.push(r[t]);return e}function du(r,e,t,n){let i=[],a=!1;e.forEach((s,l)=>{let f=lk(r,s,l+t);if(f){a=!0;let p=du(f,s,t+l+1,n);p!=zr&&i.push(l,l+s.nodeSize,p)}});let o=sk(a?uk(r):r,-t).sort(Va);for(let s=0;s<o.length;s++)o[s].type.valid(e,o[s])||(n.onRemove&&n.onRemove(o[s].spec),o.splice(s--,1));return o.length||i.length?new dr(o,i):zr}function Va(r,e){return r.from-e.from||r.to-e.to}function gh(r){let e=r;for(let t=0;t<e.length-1;t++){let n=e[t];if(n.from!=n.to)for(let i=t+1;i<e.length;i++){let a=e[i];if(a.from==n.from){a.to!=n.to&&(e==r&&(e=r.slice()),e[i]=a.copy(a.from,n.to),fm(e,i+1,a.copy(n.to,a.to)));continue}else{a.from<n.to&&(e==r&&(e=r.slice()),e[t]=n.copy(n.from,a.from),fm(e,i,n.copy(a.from,n.to)));break}}}return e}function fm(r,e,t){for(;e<r.length&&Va(t,r[e])>0;)e++;r.splice(e,0,t)}function Hf(r){let e=[];return r.someProp("decorations",t=>{let n=t(r.state);n&&n!=zr&&e.push(n)}),r.cursorWrapper&&e.push(dr.create(r.state.doc,[r.cursorWrapper.deco])),Zi.from(e)}const gte={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},yte=fn&&ia<=11;class bte{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class kte{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new bte,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let i=0;i<n.length;i++)this.queue.push(n[i]);fn&&ia<=11&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():$r&&e.composing&&n.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),yte&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,gte)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(nm(this.view)){if(this.suppressingSelectionUpdates)return Ii(this.view);if(fn&&ia<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Ga(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let a=e.focusNode;a;a=Fo(a))t.add(a);for(let a=e.anchorNode;a;a=Fo(a))if(t.has(a)){n=a;break}let i=n&&this.view.docView.nearestDesc(n);if(i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&nm(e)&&!this.ignoreSelectionChange(n),a=-1,o=-1,s=!1,l=[];if(e.editable)for(let p=0;p<t.length;p++){let b=this.registerMutation(t[p],l);b&&(a=a<0?b.from:Math.min(b.from,a),o=o<0?b.to:Math.max(b.to,o),b.typeOver&&(s=!0))}if(l.some(p=>p.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let p of l)if(p.nodeName=="BR"&&p.parentNode){let b=p.nextSibling;b&&b.nodeType==1&&b.contentEditable=="false"&&p.parentNode.removeChild(p)}}else if(Fn&&l.length){let p=l.filter(b=>b.nodeName=="BR");if(p.length==2){let[b,T]=p;b.parentNode&&b.parentNode.parentNode==T.parentNode?T.remove():b.remove()}else{let{focusNode:b}=this.currentSelection;for(let T of p){let x=T.parentNode;x&&x.nodeName=="LI"&&(!b||Tte(e,b)!=x)&&T.remove()}}}let f=null;a<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Pu(n)&&(f=ch(e))&&f.eq(Tt.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Ii(e),this.currentSelection.set(n),e.scrollToSelection()):(a>-1||i)&&(a>-1&&(e.docView.markDirty(a,o),wte(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,Ste(e,l)),this.handleDOMChange(a,o,s,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Ii(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(n==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if(e.type=="childList"){for(let p=0;p<e.addedNodes.length;p++){let b=e.addedNodes[p];t.push(b),b.nodeType==3&&(this.lastChangedTextNode=b)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let i=e.previousSibling,a=e.nextSibling;if(fn&&ia<=11&&e.addedNodes.length)for(let p=0;p<e.addedNodes.length;p++){let{previousSibling:b,nextSibling:T}=e.addedNodes[p];(!b||Array.prototype.indexOf.call(e.addedNodes,b)<0)&&(i=b),(!T||Array.prototype.indexOf.call(e.addedNodes,T)<0)&&(a=T)}let o=i&&i.parentNode==e.target?Ir(i)+1:0,s=n.localPosFromDOM(e.target,o,-1),l=a&&a.parentNode==e.target?Ir(a):e.target.childNodes.length,f=n.localPosFromDOM(e.target,l,1);return{from:s,to:f}}else return e.type=="attributes"?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let dm=new WeakMap,hm=!1;function wte(r){if(!dm.has(r)&&(dm.set(r,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(r.dom).whiteSpace)!==-1)){if(r.requiresGeckoHackNode=Fn,hm)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),hm=!0}}function pm(r,e){let t=e.startContainer,n=e.startOffset,i=e.endContainer,a=e.endOffset,o=r.domAtPos(r.state.selection.anchor);return Ga(o.node,o.offset,i,a)&&([t,n,i,a]=[i,a,t,n]),{anchorNode:t,anchorOffset:n,focusNode:i,focusOffset:a}}function Cte(r,e){if(e.getComposedRanges){let i=e.getComposedRanges(r.root)[0];if(i)return pm(r,i)}let t;function n(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return r.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),r.dom.removeEventListener("beforeinput",n,!0),t?pm(r,t):null}function Tte(r,e){for(let t=e.parentNode;t&&t!=r.dom;t=t.parentNode){let n=r.docView.nearestDesc(t,!0);if(n&&n.node.isBlock)return t}return null}function Ste(r,e){var t;let{focusNode:n,focusOffset:i}=r.domSelectionRange();for(let a of e)if(((t=a.parentNode)===null||t===void 0?void 0:t.nodeName)=="TR"){let o=a.nextSibling;for(;o&&o.nodeName!="TD"&&o.nodeName!="TH";)o=o.nextSibling;if(o){let s=o;for(;;){let l=s.firstChild;if(!l||l.nodeType!=1||l.contentEditable=="false"||/^(BR|IMG)$/.test(l.nodeName))break;s=l}s.insertBefore(a,s.firstChild),n==a&&r.domSelection().collapse(a,i)}else a.parentNode.removeChild(a)}}function xte(r,e,t){let{node:n,fromOffset:i,toOffset:a,from:o,to:s}=r.docView.parseRange(e,t),l=r.domSelectionRange(),f,p=l.anchorNode;if(p&&r.dom.contains(p.nodeType==1?p:p.parentNode)&&(f=[{node:p,offset:l.anchorOffset}],Pu(l)||f.push({node:l.focusNode,offset:l.focusOffset})),Pr&&r.input.lastKeyCode===8)for(let F=a;F>i;F--){let z=n.childNodes[F-1],Y=z.pmViewDesc;if(z.nodeName=="BR"&&!Y){a=F;break}if(!Y||Y.size)break}let b=r.state.doc,T=r.someProp("domParser")||Wa.fromSchema(r.state.schema),x=b.resolve(o),E=null,P=T.parse(n,{topNode:x.parent,topMatch:x.parent.contentMatchAt(x.index()),topOpen:!0,from:i,to:a,preserveWhitespace:x.parent.type.whitespace=="pre"?"full":!0,findPositions:f,ruleFromNode:Ete,context:x});if(f&&f[0].pos!=null){let F=f[0].pos,z=f[1]&&f[1].pos;z==null&&(z=F),E={anchor:F+o,head:z+o}}return{doc:P,sel:E,from:o,to:s}}function Ete(r){let e=r.pmViewDesc;if(e)return e.parseRule();if(r.nodeName=="BR"&&r.parentNode){if($r&&/^(ul|ol)$/i.test(r.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(r.parentNode.lastChild==r||$r&&/^(tr|table)$/i.test(r.parentNode.nodeName))return{ignore:!0}}else if(r.nodeName=="IMG"&&r.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Mte=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Ate(r,e,t,n,i){let a=r.input.compositionPendingChanges||(r.composing?r.input.compositionID:0);if(r.input.compositionPendingChanges=0,e<0){let le=r.input.lastSelectionTime>Date.now()-50?r.input.lastSelectionOrigin:null,ge=ch(r,le);if(ge&&!r.state.selection.eq(ge)){if(Pr&&Li&&r.input.lastKeyCode===13&&Date.now()-100<r.input.lastKeyCodeTime&&r.someProp("handleKeyDown",Ie=>Ie(r,Pa(13,"Enter"))))return;let xe=r.state.tr.setSelection(ge);le=="pointer"?xe.setMeta("pointer",!0):le=="key"&&xe.scrollIntoView(),a&&xe.setMeta("composition",a),r.dispatch(xe)}return}let o=r.state.doc.resolve(e),s=o.sharedDepth(t);e=o.before(s+1),t=r.state.doc.resolve(t).after(s+1);let l=r.state.selection,f=xte(r,e,t),p=r.state.doc,b=p.slice(f.from,f.to),T,x;r.input.lastKeyCode===8&&Date.now()-100<r.input.lastKeyCodeTime?(T=r.state.selection.to,x="end"):(T=r.state.selection.from,x="start"),r.input.lastKeyCode=null;let E=Dte(b.content,f.doc.content,f.from,T,x);if(E&&r.input.domChangeCount++,(qo&&r.input.lastIOSEnter>Date.now()-225||Li)&&i.some(le=>le.nodeType==1&&!Mte.test(le.nodeName))&&(!E||E.endA>=E.endB)&&r.someProp("handleKeyDown",le=>le(r,Pa(13,"Enter")))){r.input.lastIOSEnter=0;return}if(!E)if(n&&l instanceof xt&&!l.empty&&l.$head.sameParent(l.$anchor)&&!r.composing&&!(f.sel&&f.sel.anchor!=f.sel.head))E={start:l.from,endA:l.to,endB:l.to};else{if(f.sel){let le=vm(r,r.state.doc,f.sel);if(le&&!le.eq(r.state.selection)){let ge=r.state.tr.setSelection(le);a&&ge.setMeta("composition",a),r.dispatch(ge)}}return}r.state.selection.from<r.state.selection.to&&E.start==E.endB&&r.state.selection instanceof xt&&(E.start>r.state.selection.from&&E.start<=r.state.selection.from+2&&r.state.selection.from>=f.from?E.start=r.state.selection.from:E.endA<r.state.selection.to&&E.endA>=r.state.selection.to-2&&r.state.selection.to<=f.to&&(E.endB+=r.state.selection.to-E.endA,E.endA=r.state.selection.to)),fn&&ia<=11&&E.endB==E.start+1&&E.endA==E.start&&E.start>f.from&&f.doc.textBetween(E.start-f.from-1,E.start-f.from+1)==" "&&(E.start--,E.endA--,E.endB--);let P=f.doc.resolveNoCache(E.start-f.from),F=f.doc.resolveNoCache(E.endB-f.from),z=p.resolve(E.start),Y=P.sameParent(F)&&P.parent.inlineContent&&z.end()>=E.endA;if((qo&&r.input.lastIOSEnter>Date.now()-225&&(!Y||i.some(le=>le.nodeName=="DIV"||le.nodeName=="P"))||!Y&&P.pos<f.doc.content.size&&(!P.sameParent(F)||!P.parent.inlineContent)&&P.pos<F.pos&&!/\S/.test(f.doc.textBetween(P.pos,F.pos,"","")))&&r.someProp("handleKeyDown",le=>le(r,Pa(13,"Enter")))){r.input.lastIOSEnter=0;return}if(r.state.selection.anchor>E.start&&Nte(p,E.start,E.endA,P,F)&&r.someProp("handleKeyDown",le=>le(r,Pa(8,"Backspace")))){Li&&Pr&&r.domObserver.suppressSelectionUpdates();return}Pr&&E.endB==E.start&&(r.input.lastChromeDelete=Date.now()),Li&&!Y&&P.start()!=F.start()&&F.parentOffset==0&&P.depth==F.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==E.endA&&(E.endB-=2,F=f.doc.resolveNoCache(E.endB-f.from),setTimeout(()=>{r.someProp("handleKeyDown",function(le){return le(r,Pa(13,"Enter"))})},20));let ee=E.start,se=E.endA,de=le=>{let ge=le||r.state.tr.replace(ee,se,f.doc.slice(E.start-f.from,E.endB-f.from));if(f.sel){let xe=vm(r,ge.doc,f.sel);xe&&!(Pr&&r.composing&&xe.empty&&(E.start!=E.endB||r.input.lastChromeDelete<Date.now()-100)&&(xe.head==ee||xe.head==ge.mapping.map(se)-1)||fn&&xe.empty&&xe.head==ee)&&ge.setSelection(xe)}return a&&ge.setMeta("composition",a),ge.scrollIntoView()},oe;if(Y)if(P.pos==F.pos){fn&&ia<=11&&P.parentOffset==0&&(r.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ii(r),20));let le=de(r.state.tr.delete(ee,se)),ge=p.resolve(E.start).marksAcross(p.resolve(E.endA));ge&&le.ensureMarks(ge),r.dispatch(le)}else if(E.endA==E.endB&&(oe=Ote(P.parent.content.cut(P.parentOffset,F.parentOffset),z.parent.content.cut(z.parentOffset,E.endA-z.start())))){let le=de(r.state.tr);oe.type=="add"?le.addMark(ee,se,oe.mark):le.removeMark(ee,se,oe.mark),r.dispatch(le)}else if(P.parent.child(P.index()).isText&&P.index()==F.index()-(F.textOffset?0:1)){let le=P.parent.textBetween(P.parentOffset,F.parentOffset),ge=()=>de(r.state.tr.insertText(le,ee,se));r.someProp("handleTextInput",xe=>xe(r,ee,se,le,ge))||r.dispatch(ge())}else r.dispatch(de());else r.dispatch(de())}function vm(r,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:fh(r,e.resolve(t.anchor),e.resolve(t.head))}function Ote(r,e){let t=r.firstChild.marks,n=e.firstChild.marks,i=t,a=n,o,s,l;for(let p=0;p<n.length;p++)i=n[p].removeFromSet(i);for(let p=0;p<t.length;p++)a=t[p].removeFromSet(a);if(i.length==1&&a.length==0)s=i[0],o="add",l=p=>p.mark(s.addToSet(p.marks));else if(i.length==0&&a.length==1)s=a[0],o="remove",l=p=>p.mark(s.removeFromSet(p.marks));else return null;let f=[];for(let p=0;p<e.childCount;p++)f.push(l(e.child(p)));if(De.from(f).eq(r))return{mark:s,type:o}}function Nte(r,e,t,n,i){if(t-e<=i.pos-n.pos||_f(n,!0,!1)<i.pos)return!1;let a=r.resolve(e);if(!n.parent.isTextblock){let s=a.nodeAfter;return s!=null&&t==e+s.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let o=r.resolve(_f(a,!0,!0));return!o.parent.isTextblock||o.pos>t||_f(o,!0,!1)<t?!1:n.parent.content.cut(n.parentOffset).eq(o.parent.content)}function _f(r,e,t){let n=r.depth,i=e?r.end():r.pos;for(;n>0&&(e||r.indexAfter(n)==r.node(n).childCount);)n--,i++,e=!1;if(t){let a=r.node(n).maybeChild(r.indexAfter(n));for(;a&&!a.isLeaf;)a=a.firstChild,i++}return i}function Dte(r,e,t,n,i){let a=r.findDiffStart(e,t);if(a==null)return null;let{a:o,b:s}=r.findDiffEnd(e,t+r.size,t+e.size);if(i=="end"){let l=Math.max(0,a-Math.min(o,s));n-=o+l-a}if(o<a&&r.size<e.size){let l=n<=a&&n>=o?a-n:0;a-=l,a&&a<e.size&&mm(e.textBetween(a-1,a+1))&&(a+=l?1:-1),s=a+(s-o),o=a}else if(s<a){let l=n<=a&&n>=s?a-n:0;a-=l,a&&a<r.size&&mm(r.textBetween(a-1,a+1))&&(a+=l?1:-1),o=a+(o-s),s=a}return{start:a,endA:o,endB:s}}function mm(r){if(r.length!=2)return!1;let e=r.charCodeAt(0),t=r.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class qu{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Gee,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(wm),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=bm(this),ym(this),this.nodeViews=km(this),this.docView=Xv(this.state.doc,gm(this),Hf(this),this.dom,this),this.domObserver=new kte(this,(n,i,a,o)=>Ate(this,n,i,a,o)),this.domObserver.start(),Kee(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Dd(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(wm),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let n in this._props)t[n]=this._props[n];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n;let i=this.state,a=!1,o=!1;e.storedMarks&&this.composing&&(nk(this),o=!0),this.state=e;let s=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(s||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let x=km(this);Rte(x,this.nodeViews)&&(this.nodeViews=x,a=!0)}(s||t.handleDOMEvents!=this._props.handleDOMEvents)&&Dd(this),this.editable=bm(this),ym(this);let l=Hf(this),f=gm(this),p=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",b=a||!this.docView.matchesNode(e.doc,f,l);(b||!e.selection.eq(i.selection))&&(o=!0);let T=p=="preserve"&&o&&this.dom.style.overflowAnchor==null&&lee(this);if(o){this.domObserver.stop();let x=b&&(fn||Pr)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&Lte(i.selection,e.selection);if(b){let E=Pr?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=lte(this)),(a||!this.docView.update(e.doc,f,l,this))&&(this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=Xv(e.doc,f,l,this.dom,this)),E&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(x=!0)}x||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Lee(this))?Ii(this,x):(Wb(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((n=this.dragging)===null||n===void 0)&&n.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),p=="reset"?this.dom.scrollTop=0:p=="to selection"?this.scrollToSelection():T&&uee(T)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof ft){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Wv(this,t.getBoundingClientRect(),e)}else Wv(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let n=this.directPlugins[t];n.spec.view&&this.pluginViews.push(n.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let n=this.state.plugins[t];n.spec.view&&this.pluginViews.push(n.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,i=-1;if(this.state.doc.nodeAt(n.from)==n.node)i=n.from;else{let a=n.from+(this.state.doc.content.size-t.doc.content.size);(a>0&&this.state.doc.nodeAt(a))==n.node&&(i=a)}this.dragging=new ak(e.slice,e.move,i<0?void 0:ft.create(this.state.doc,i))}someProp(e,t){let n=this._props&&this._props[e],i;if(n!=null&&(i=t?t(n):n))return i;for(let o=0;o<this.directPlugins.length;o++){let s=this.directPlugins[o].props[e];if(s!=null&&(i=t?t(s):s))return i}let a=this.state.plugins;if(a)for(let o=0;o<a.length;o++){let s=a[o].props[e];if(s!=null&&(i=t?t(s):s))return i}}hasFocus(){if(fn){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&cee(this.dom),Ii(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return vee(this,e)}coordsAtPos(e,t=1){return Fb(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let i=this.docView.posFromDOM(e,t,n);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return kee(this,t||this.state,e)}pasteHTML(e,t){return Is(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Is(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return dh(this,e)}destroy(){this.docView&&(Jee(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Hf(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,ZQ())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Xee(this,e)}domSelectionRange(){let e=this.domSelection();return e?$r&&this.root.nodeType===11&&nee(this.dom.ownerDocument)==this.dom&&Cte(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}qu.prototype.dispatch=function(r){let e=this._props.dispatchTransaction;e?e.call(this,r):this.updateState(this.state.apply(r))};function gm(r){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(r.editable),r.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(r.state)),t)for(let n in t)n=="class"?e.class+=" "+t[n]:n=="style"?e.style=(e.style?e.style+";":"")+t[n]:!e[n]&&n!="contenteditable"&&n!="nodeName"&&(e[n]=String(t[n]))}),e.translate||(e.translate="no"),[cn.node(0,r.state.doc.content.size,e)]}function ym(r){if(r.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),r.cursorWrapper={dom:e,deco:cn.widget(r.state.selection.from,e,{raw:!0,marks:r.markCursor})}}else r.cursorWrapper=null}function bm(r){return!r.someProp("editable",e=>e(r.state)===!1)}function Lte(r,e){let t=Math.min(r.$anchor.sharedDepth(r.head),e.$anchor.sharedDepth(e.head));return r.$anchor.start(t)!=e.$anchor.start(t)}function km(r){let e=Object.create(null);function t(n){for(let i in n)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=n[i])}return r.someProp("nodeViews",t),r.someProp("markViews",t),e}function Rte(r,e){let t=0,n=0;for(let i in r){if(r[i]!=e[i])return!0;t++}for(let i in e)n++;return t!=n}function wm(r){if(r.spec.state||r.spec.filterTransaction||r.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}const Ite=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),Pte=typeof navigator<"u"&&/Win/.test(navigator.platform);function Bte(r){let e=r.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let n,i,a,o;for(let s=0;s<e.length-1;s++){let l=e[s];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))a=!0;else if(/^mod$/i.test(l))Ite?o=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return n&&(t="Alt-"+t),i&&(t="Ctrl-"+t),o&&(t="Meta-"+t),a&&(t="Shift-"+t),t}function Fte(r){let e=Object.create(null);for(let t in r)e[Bte(t)]=r[t];return e}function zf(r,e,t=!0){return e.altKey&&(r="Alt-"+r),e.ctrlKey&&(r="Ctrl-"+r),e.metaKey&&(r="Meta-"+r),t&&e.shiftKey&&(r="Shift-"+r),r}function Bs(r){return new hn({props:{handleKeyDown:qte(r)}})}function qte(r){let e=Fte(r);return function(t,n){let i=XZ(n),a,o=e[zf(i,n)];if(o&&o(t.state,t.dispatch,t))return!0;if(i.length==1&&i!=" "){if(n.shiftKey){let s=e[zf(i,n,!1)];if(s&&s(t.state,t.dispatch,t))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(Pte&&n.ctrlKey&&n.altKey)&&(a=ZZ[n.keyCode])&&a!=i){let s=e[zf(a,n)];if(s&&s(t.state,t.dispatch,t))return!0}}return!1}}const yh=(r,e)=>r.selection.empty?!1:(e&&e(r.tr.deleteSelection().scrollIntoView()),!0);function Hte(r,e){let{$cursor:t}=r.selection;return!t||(e?!e.endOfTextblock("backward",r):t.parentOffset>0)?null:t}const _te=(r,e,t)=>{let n=Hte(r,t);if(!n)return!1;let i=ck(n);if(!i){let o=n.blockRange(),s=o&&Ru(o);return s==null?!1:(e&&e(r.tr.lift(o,s).scrollIntoView()),!0)}let a=i.nodeBefore;if(vk(r,i,e,-1))return!0;if(n.parent.content.size==0&&(Ho(a,"end")||ft.isSelectable(a)))for(let o=n.depth;;o--){let s=sh(r.doc,n.before(o),n.after(o),$e.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=r.tr.step(s);l.setSelection(Ho(a,"end")?Tt.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):ft.create(l.doc,i.pos-a.nodeSize)),e(l.scrollIntoView())}return!0}if(o==1||n.node(o-1).childCount>1)break}return a.isAtom&&i.depth==n.depth-1?(e&&e(r.tr.delete(i.pos-a.nodeSize,i.pos).scrollIntoView()),!0):!1};function Ho(r,e,t=!1){for(let n=r;n;n=e=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(t&&n.childCount!=1)return!1}return!1}const zte=(r,e,t)=>{let{$head:n,empty:i}=r.selection,a=n;if(!i)return!1;if(n.parent.isTextblock){if(t?!t.endOfTextblock("backward",r):n.parentOffset>0)return!1;a=ck(n)}let o=a&&a.nodeBefore;return!o||!ft.isSelectable(o)?!1:(e&&e(r.tr.setSelection(ft.create(r.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function ck(r){if(!r.parent.type.spec.isolating)for(let e=r.depth-1;e>=0;e--){if(r.index(e)>0)return r.doc.resolve(r.before(e+1));if(r.node(e).type.spec.isolating)break}return null}function Vte(r,e){let{$cursor:t}=r.selection;return!t||(e?!e.endOfTextblock("forward",r):t.parentOffset<t.parent.content.size)?null:t}const fk=(r,e,t)=>{let n=Vte(r,t);if(!n)return!1;let i=dk(n);if(!i)return!1;let a=i.nodeAfter;if(vk(r,i,e,1))return!0;if(n.parent.content.size==0&&(Ho(a,"start")||ft.isSelectable(a))){let o=sh(r.doc,n.before(),n.after(),$e.empty);if(o&&o.slice.size<o.to-o.from){if(e){let s=r.tr.step(o);s.setSelection(Ho(a,"start")?Tt.findFrom(s.doc.resolve(s.mapping.map(i.pos)),1):ft.create(s.doc,s.mapping.map(i.pos))),e(s.scrollIntoView())}return!0}}return a.isAtom&&i.depth==n.depth-1?(e&&e(r.tr.delete(i.pos,i.pos+a.nodeSize).scrollIntoView()),!0):!1},Ute=(r,e,t)=>{let{$head:n,empty:i}=r.selection,a=n;if(!i)return!1;if(n.parent.isTextblock){if(t?!t.endOfTextblock("forward",r):n.parentOffset<n.parent.content.size)return!1;a=dk(n)}let o=a&&a.nodeAfter;return!o||!ft.isSelectable(o)?!1:(e&&e(r.tr.setSelection(ft.create(r.doc,a.pos)).scrollIntoView()),!0)};function dk(r){if(!r.parent.type.spec.isolating)for(let e=r.depth-1;e>=0;e--){let t=r.node(e);if(r.index(e)+1<t.childCount)return r.doc.resolve(r.after(e+1));if(t.type.spec.isolating)break}return null}const hk=(r,e)=>{let{$head:t,$anchor:n}=r.selection;return!t.parent.type.spec.code||!t.sameParent(n)?!1:(e&&e(r.tr.insertText(`
|
|
10
|
-
`).scrollIntoView()),!0)};function bh(r){for(let e=0;e<r.edgeCount;e++){let{type:t}=r.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const kh=(r,e)=>{let{$head:t,$anchor:n}=r.selection;if(!t.parent.type.spec.code||!t.sameParent(n))return!1;let i=t.node(-1),a=t.indexAfter(-1),o=bh(i.contentMatchAt(a));if(!o||!i.canReplaceWith(a,a,o))return!1;if(e){let s=t.after(),l=r.tr.replaceWith(s,s,o.createAndFill());l.setSelection(Tt.near(l.doc.resolve(s),1)),e(l.scrollIntoView())}return!0},$te=(r,e)=>{let t=r.selection,{$from:n,$to:i}=t;if(t instanceof Jr||n.parent.inlineContent||i.parent.inlineContent)return!1;let a=bh(i.parent.contentMatchAt(i.indexAfter()));if(!a||!a.isTextblock)return!1;if(e){let o=(!n.parentOffset&&i.index()<i.parent.childCount?n:i).pos,s=r.tr.insert(o,a.createAndFill());s.setSelection(xt.create(s.doc,o+1)),e(s.scrollIntoView())}return!0},Wte=(r,e)=>{let{$cursor:t}=r.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let a=t.before();if(Ro(r.doc,a))return e&&e(r.tr.split(a).scrollIntoView()),!0}let n=t.blockRange(),i=n&&Ru(n);return i==null?!1:(e&&e(r.tr.lift(n,i).scrollIntoView()),!0)};function jte(r){return(e,t)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof ft&&e.selection.node.isBlock)return!n.parentOffset||!Ro(e.doc,n.pos)?!1:(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let a=[],o,s,l=!1,f=!1;for(let x=n.depth;;x--)if(n.node(x).isBlock){l=n.end(x)==n.pos+(n.depth-x),f=n.start(x)==n.pos-(n.depth-x),s=bh(n.node(x-1).contentMatchAt(n.indexAfter(x-1))),a.unshift(l&&s?{type:s}:null),o=x;break}else{if(x==1)return!1;a.unshift(null)}let p=e.tr;(e.selection instanceof xt||e.selection instanceof Jr)&&p.deleteSelection();let b=p.mapping.map(n.pos),T=Ro(p.doc,b,a.length,a);if(T||(a[0]=s?{type:s}:null,T=Ro(p.doc,b,a.length,a)),!T)return!1;if(p.split(b,a.length,a),!l&&f&&n.node(o).type!=s){let x=p.mapping.map(n.before(o)),E=p.doc.resolve(x);s&&n.node(o-1).canReplaceWith(E.index(),E.index()+1,s)&&p.setNodeMarkup(p.mapping.map(n.before(o)),s)}return t&&t(p.scrollIntoView()),!0}}const Gte=jte(),pk=(r,e)=>(e&&e(r.tr.setSelection(new Jr(r.doc))),!0);function Kte(r,e,t){let n=e.nodeBefore,i=e.nodeAfter,a=e.index();return!n||!i||!n.type.compatibleContent(i.type)?!1:!n.content.size&&e.parent.canReplace(a-1,a)?(t&&t(r.tr.delete(e.pos-n.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(a,a+1)||!(i.isTextblock||Cb(r.doc,e.pos))?!1:(t&&t(r.tr.join(e.pos).scrollIntoView()),!0)}function vk(r,e,t,n){let i=e.nodeBefore,a=e.nodeAfter,o,s,l=i.type.spec.isolating||a.type.spec.isolating;if(!l&&Kte(r,e,t))return!0;let f=!l&&e.parent.canReplace(e.index(),e.index()+1);if(f&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&s.matchType(o[0]||a.type).validEnd){if(t){let x=e.pos+a.nodeSize,E=De.empty;for(let z=o.length-1;z>=0;z--)E=De.from(o[z].create(null,E));E=De.from(i.copy(E));let P=r.tr.step(new xr(e.pos-1,x,e.pos,x,new $e(E,1,0),o.length,!0)),F=P.doc.resolve(x+2*o.length);F.nodeAfter&&F.nodeAfter.type==i.type&&Cb(P.doc,F.pos)&&P.join(F.pos),t(P.scrollIntoView())}return!0}let p=a.type.spec.isolating||n>0&&l?null:Tt.findFrom(e,1),b=p&&p.$from.blockRange(p.$to),T=b&&Ru(b);if(T!=null&&T>=e.depth)return t&&t(r.tr.lift(b,T).scrollIntoView()),!0;if(f&&Ho(a,"start",!0)&&Ho(i,"end")){let x=i,E=[];for(;E.push(x),!x.isTextblock;)x=x.lastChild;let P=a,F=1;for(;!P.isTextblock;P=P.firstChild)F++;if(x.canReplace(x.childCount,x.childCount,P.content)){if(t){let z=De.empty;for(let ee=E.length-1;ee>=0;ee--)z=De.from(E[ee].copy(z));let Y=r.tr.step(new xr(e.pos-E.length,e.pos+a.nodeSize,e.pos+F,e.pos+a.nodeSize-F,new $e(z,E.length,0),0,!0));t(Y.scrollIntoView())}return!0}}return!1}function mk(r){return function(e,t){let n=e.selection,i=r<0?n.$from:n.$to,a=i.depth;for(;i.node(a).isInline;){if(!a)return!1;a--}return i.node(a).isTextblock?(t&&t(e.tr.setSelection(xt.create(e.doc,r<0?i.start(a):i.end(a)))),!0):!1}}const Jte=mk(-1),Yte=mk(1);function Xte(r,e=null){return function(t,n){let{$from:i,$to:a}=t.selection,o=i.blockRange(a),s=o&&OQ(o,r,e);return s?(n&&n(t.tr.wrap(o,s).scrollIntoView()),!0):!1}}function wh(r,e=null){return function(t,n){let i=!1;for(let a=0;a<t.selection.ranges.length&&!i;a++){let{$from:{pos:o},$to:{pos:s}}=t.selection.ranges[a];t.doc.nodesBetween(o,s,(l,f)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(r,e)))if(l.type==r)i=!0;else{let p=t.doc.resolve(f),b=p.index();i=p.parent.canReplaceWith(b,b+1,r)}})}if(!i)return!1;if(n){let a=t.tr;for(let o=0;o<t.selection.ranges.length;o++){let{$from:{pos:s},$to:{pos:l}}=t.selection.ranges[o];a.setBlockType(s,l,r,e)}n(a.scrollIntoView())}return!0}}function Zte(r,e,t,n){for(let i=0;i<e.length;i++){let{$from:a,$to:o}=e[i],s=a.depth==0?r.inlineContent&&r.type.allowsMarkType(t):!1;if(r.nodesBetween(a.pos,o.pos,(l,f)=>{if(s)return!1;s=l.inlineContent&&l.type.allowsMarkType(t)}),s)return!0}return!1}function Us(r,e=null,t){return function(n,i){let{empty:a,$cursor:o,ranges:s}=n.selection;if(a&&!o||!Zte(n.doc,s,r))return!1;if(i)if(o)r.isInSet(n.storedMarks||o.marks())?i(n.tr.removeStoredMark(r)):i(n.tr.addStoredMark(r.create(e)));else{let l,f=n.tr;l=!s.some(p=>n.doc.rangeHasMark(p.$from.pos,p.$to.pos,r));for(let p=0;p<s.length;p++){let{$from:b,$to:T}=s[p];if(!l)f.removeMark(b.pos,T.pos,r);else{let x=b.pos,E=T.pos,P=b.nodeAfter,F=T.nodeBefore,z=P&&P.isText?/^\s*/.exec(P.text)[0].length:0,Y=F&&F.isText?/\s*$/.exec(F.text)[0].length:0;x+z<E&&(x+=z,E-=Y),f.addMark(x,E,r.create(e))}}i(f.scrollIntoView())}return!0}}function Hu(...r){return function(e,t,n){for(let i=0;i<r.length;i++)if(r[i](e,t,n))return!0;return!1}}let Vf=Hu(yh,_te,zte),Cm=Hu(yh,fk,Ute);const Ni={Enter:Hu(hk,$te,Wte,Gte),"Mod-Enter":kh,Backspace:Vf,"Mod-Backspace":Vf,"Shift-Backspace":Vf,Delete:Cm,"Mod-Delete":Cm,"Mod-a":pk},gk={"Ctrl-h":Ni.Backspace,"Alt-Backspace":Ni["Mod-Backspace"],"Ctrl-d":Ni.Delete,"Ctrl-Alt-Backspace":Ni["Mod-Delete"],"Alt-Delete":Ni["Mod-Delete"],"Alt-d":Ni["Mod-Delete"],"Ctrl-a":Jte,"Ctrl-e":Yte};for(let r in Ni)gk[r]=Ni[r];const Qte=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,Tm=Qte?gk:Ni;class da{constructor(e,t,n={}){this.match=e,this.match=e,this.handler=typeof t=="string"?ere(t):t,this.undoable=n.undoable!==!1,this.inCode=n.inCode||!1,this.inCodeMark=n.inCodeMark!==!1}}function ere(r){return function(e,t,n,i){let a=r;if(t[1]){let o=t[0].lastIndexOf(t[1]);a+=t[0].slice(o+t[1].length),n+=o;let s=n-i;s>0&&(a=t[0].slice(o-s,o)+a,n=i)}return e.tr.insertText(a,n,i)}}const tre=500;function yk({rules:r}){let e=new hn({state:{init(){return null},apply(t,n){let i=t.getMeta(this);return i||(t.selectionSet||t.docChanged?null:n)}},props:{handleTextInput(t,n,i,a){return Sm(t,n,i,a,r,e)},handleDOMEvents:{compositionend:t=>{setTimeout(()=>{let{$cursor:n}=t.state.selection;n&&Sm(t,n.pos,n.pos,"",r,e)})}}},isInputRules:!0});return e}function Sm(r,e,t,n,i,a){if(r.composing)return!1;let o=r.state,s=o.doc.resolve(e),l=s.parent.textBetween(Math.max(0,s.parentOffset-tre),s.parentOffset,null,"")+n;for(let f=0;f<i.length;f++){let p=i[f];if(!p.inCodeMark&&s.marks().some(E=>E.type.spec.code))continue;if(s.parent.type.spec.code){if(!p.inCode)continue}else if(p.inCode==="only")continue;let b=p.match.exec(l);if(!b||b[0].length<n.length)continue;let T=e-(b[0].length-n.length);if(!p.inCodeMark){let E=!1;if(o.doc.nodesBetween(T,s.pos,P=>{P.isInline&&P.marks.some(F=>F.type.spec.code)&&(E=!0)}),E)continue}let x=p.handler(o,b,T,t);if(x)return p.undoable&&x.setMeta(a,{transform:x,from:e,to:t,text:n}),r.dispatch(x),!0}return!1}const rre=(r,e)=>{let t=r.plugins;for(let n=0;n<t.length;n++){let i=t[n],a;if(i.spec.isInputRules&&(a=i.getState(r))){if(e){let o=r.tr,s=a.transform;for(let l=s.steps.length-1;l>=0;l--)o.step(s.steps[l].invert(s.docs[l]));if(a.text){let l=o.doc.resolve(a.from).marks();o.replaceWith(a.from,a.to,r.schema.text(a.text,l))}else o.delete(a.from,a.to);e(o)}return!0}}return!1};new da(/--$/,"—",{inCodeMark:!1});new da(/\.\.\.$/,"…",{inCodeMark:!1});new da(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“",{inCodeMark:!1});new da(/"$/,"”",{inCodeMark:!1});new da(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘",{inCodeMark:!1});new da(/'$/,"’",{inCodeMark:!1});var hu=200,Er=function(){};Er.prototype.append=function(e){return e.length?(e=Er.from(e),!this.length&&e||e.length<hu&&this.leafAppend(e)||this.length<hu&&e.leafPrepend(this)||this.appendInner(e)):this};Er.prototype.prepend=function(e){return e.length?Er.from(e).append(this):this};Er.prototype.appendInner=function(e){return new nre(this,e)};Er.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?Er.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};Er.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Er.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)};Er.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var i=[];return this.forEach(function(a,o){return i.push(e(a,o))},t,n),i};Er.from=function(e){return e instanceof Er?e:e&&e.length?new bk(e):Er.empty};var bk=(function(r){function e(n){r.call(this),this.values=n}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,a){return i==0&&a==this.length?this:new e(this.values.slice(i,a))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,a,o,s){for(var l=a;l<o;l++)if(i(this.values[l],s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(i,a,o,s){for(var l=a-1;l>=o;l--)if(i(this.values[l],s+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=hu)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=hu)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e})(Er);Er.empty=new bk([]);var nre=(function(r){function e(t,n){r.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,i,a,o){var s=this.left.length;if(i<s&&this.left.forEachInner(n,i,Math.min(a,s),o)===!1||a>s&&this.right.forEachInner(n,Math.max(i-s,0),Math.min(this.length,a)-s,o+s)===!1)return!1},e.prototype.forEachInvertedInner=function(n,i,a,o){var s=this.left.length;if(i>s&&this.right.forEachInvertedInner(n,i-s,Math.max(a,s)-s,o+s)===!1||a<s&&this.left.forEachInvertedInner(n,Math.min(i,s),a,o)===!1)return!1},e.prototype.sliceInner=function(n,i){if(n==0&&i==this.length)return this;var a=this.left.length;return i<=a?this.left.slice(n,i):n>=a?this.right.slice(n-a,i-a):this.left.slice(n,a).append(this.right.slice(0,i-a))},e.prototype.leafAppend=function(n){var i=this.right.leafAppend(n);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(n){var i=this.left.leafPrepend(n);if(i)return new e(i,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e})(Er);const ire=500;class jn{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let i,a;t&&(i=this.remapping(n,this.items.length),a=i.maps.length);let o=e.tr,s,l,f=[],p=[];return this.items.forEach((b,T)=>{if(!b.step){i||(i=this.remapping(n,T+1),a=i.maps.length),a--,p.push(b);return}if(i){p.push(new oi(b.map));let x=b.step.map(i.slice(a)),E;x&&o.maybeStep(x).doc&&(E=o.mapping.maps[o.mapping.maps.length-1],f.push(new oi(E,void 0,void 0,f.length+p.length))),a--,E&&i.appendMap(E,a)}else o.maybeStep(b.step);if(b.selection)return s=i?b.selection.map(i.slice(a)):b.selection,l=new jn(this.items.slice(0,n).append(p.reverse().concat(f)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:s}}addTransform(e,t,n,i){let a=[],o=this.eventCount,s=this.items,l=!i&&s.length?s.get(s.length-1):null;for(let p=0;p<e.steps.length;p++){let b=e.steps[p].invert(e.docs[p]),T=new oi(e.mapping.maps[p],b,t),x;(x=l&&l.merge(T))&&(T=x,p?a.pop():s=s.slice(0,s.length-1)),a.push(T),t&&(o++,t=void 0),i||(l=T)}let f=o-n.depth;return f>ore&&(s=are(s,f),o-=f),new jn(s.append(a),o)}remapping(e,t){let n=new Ds;return this.items.forEach((i,a)=>{let o=i.mirrorOffset!=null&&a-i.mirrorOffset>=e?n.maps.length-i.mirrorOffset:void 0;n.appendMap(i.map,o)},e,t),n}addMaps(e){return this.eventCount==0?this:new jn(this.items.append(e.map(t=>new oi(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-t),a=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach(T=>{T.selection&&s--},i);let l=t;this.items.forEach(T=>{let x=a.getMirror(--l);if(x==null)return;o=Math.min(o,x);let E=a.maps[x];if(T.step){let P=e.steps[x].invert(e.docs[x]),F=T.selection&&T.selection.map(a.slice(l+1,x));F&&s++,n.push(new oi(E,P,F))}else n.push(new oi(E))},i);let f=[];for(let T=t;T<o;T++)f.push(new oi(a.maps[T]));let p=this.items.slice(0,i).append(f).append(n),b=new jn(p,s);return b.emptyItemCount()>ire&&(b=b.compress(this.items.length-n.length)),b}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,i=[],a=0;return this.items.forEach((o,s)=>{if(s>=e)i.push(o),o.selection&&a++;else if(o.step){let l=o.step.map(t.slice(n)),f=l&&l.getMap();if(n--,f&&t.appendMap(f,n),l){let p=o.selection&&o.selection.map(t.slice(n));p&&a++;let b=new oi(f.invert(),l,p),T,x=i.length-1;(T=i.length&&i[x].merge(b))?i[x]=T:i.push(b)}}else o.map&&n--},this.items.length,0),new jn(Er.from(i.reverse()),a)}}jn.empty=new jn(Er.empty,0);function are(r,e){let t;return r.forEach((n,i)=>{if(n.selection&&e--==0)return t=i,!1}),r.slice(t)}class oi{constructor(e,t,n,i){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new oi(t.getMap().invert(),t,this.selection)}}}class Xi{constructor(e,t,n,i,a){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=i,this.prevComposition=a}}const ore=20;function sre(r,e,t,n){let i=t.getMeta(sa),a;if(i)return i.historyState;t.getMeta(cre)&&(r=new Xi(r.done,r.undone,null,0,-1));let o=t.getMeta("appendedTransaction");if(t.steps.length==0)return r;if(o&&o.getMeta(sa))return o.getMeta(sa).redo?new Xi(r.done.addTransform(t,void 0,n,Jl(e)),r.undone,xm(t.mapping.maps),r.prevTime,r.prevComposition):new Xi(r.done,r.undone.addTransform(t,void 0,n,Jl(e)),null,r.prevTime,r.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let s=t.getMeta("composition"),l=r.prevTime==0||!o&&r.prevComposition!=s&&(r.prevTime<(t.time||0)-n.newGroupDelay||!lre(t,r.prevRanges)),f=o?Uf(r.prevRanges,t.mapping):xm(t.mapping.maps);return new Xi(r.done.addTransform(t,l?e.selection.getBookmark():void 0,n,Jl(e)),jn.empty,f,t.time,s??r.prevComposition)}else return(a=t.getMeta("rebased"))?new Xi(r.done.rebased(t,a),r.undone.rebased(t,a),Uf(r.prevRanges,t.mapping),r.prevTime,r.prevComposition):new Xi(r.done.addMaps(t.mapping.maps),r.undone.addMaps(t.mapping.maps),Uf(r.prevRanges,t.mapping),r.prevTime,r.prevComposition)}function lre(r,e){if(!e)return!1;if(!r.docChanged)return!0;let t=!1;return r.mapping.maps[0].forEach((n,i)=>{for(let a=0;a<e.length;a+=2)n<=e[a+1]&&i>=e[a]&&(t=!0)}),t}function xm(r){let e=[];for(let t=r.length-1;t>=0&&e.length==0;t--)r[t].forEach((n,i,a,o)=>e.push(a,o));return e}function Uf(r,e){if(!r)return null;let t=[];for(let n=0;n<r.length;n+=2){let i=e.map(r[n],1),a=e.map(r[n+1],-1);i<=a&&t.push(i,a)}return t}function ure(r,e,t){let n=Jl(e),i=sa.get(e).spec.config,a=(t?r.undone:r.done).popEvent(e,n);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(t?r.done:r.undone).addTransform(a.transform,e.selection.getBookmark(),i,n),l=new Xi(t?s:a.remaining,t?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(sa,{redo:t,historyState:l})}let $f=!1,Em=null;function Jl(r){let e=r.plugins;if(Em!=e){$f=!1,Em=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){$f=!0;break}}return $f}const sa=new Hs("history"),cre=new Hs("closeHistory");function kk(r={}){return r={depth:r.depth||100,newGroupDelay:r.newGroupDelay||500},new hn({key:sa,state:{init(){return new Xi(jn.empty,jn.empty,null,0,-1)},apply(e,t,n){return sre(t,n,e,r)}},config:r,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,i=n=="historyUndo"?Ms:n=="historyRedo"?Ch:null;return!i||!e.editable?!1:(t.preventDefault(),i(e.state,e.dispatch))}}}})}function wk(r,e){return(t,n)=>{let i=sa.getState(t);if(!i||(r?i.undone:i.done).eventCount==0)return!1;if(n){let a=ure(i,t,r);a&&n(e?a.scrollIntoView():a)}return!0}}const Ms=wk(!1,!0),Ch=wk(!0,!0);function fre(r){let e=sa.getState(r);return e?e.done.eventCount:0}/**
|
|
11
|
-
* @toast-ui/editor
|
|
12
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
13
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
14
|
-
* @license MIT
|
|
15
|
-
*//*! *****************************************************************************
|
|
16
|
-
Copyright (c) Microsoft Corporation.
|
|
17
|
-
|
|
18
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
19
|
-
purpose with or without fee is hereby granted.
|
|
20
|
-
|
|
21
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
22
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
23
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
24
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
25
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
26
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
27
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
28
|
-
***************************************************************************** */var Ld=function(r,e){return Ld=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Ld(r,e)};function Ge(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ld(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var we=function(){return we=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},we.apply(this,arguments)};function dn(r,e,t){if(arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))}function Dt(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}function dre(r,e,t){var n;t=t||null;for(n in r)if(r.hasOwnProperty(n)&&e.call(t,r[n],n,r)===!1)break}var _o=dre;function hre(r,e){var t=Object.prototype.hasOwnProperty,n,i,a,o;for(a=1,o=arguments.length;a<o;a+=1){n=arguments[a];for(i in n)t.call(n,i)&&(r[i]=n[i])}return r}var Th=hre;function pre(r){return typeof r=="string"||r instanceof String}var qi=pre;function vre(r){return r instanceof Array}var Zo=vre;function mre(r,e,t){var n=0,i=r.length;for(t=t||null;n<i&&e.call(t,r[n],n,r)!==!1;n+=1);}var zo=mre,gre=Zo,yre=zo,bre=_o;function kre(r,e,t){gre(r)?yre(r,e,t):bre(r,e,t)}var _u=kre,wre=qi,Cre=_u;function Tre(r,e,t){var n=r.style;if(wre(e)){n[e]=t;return}Cre(e,function(i,a){n[a]=i})}var di=Tre,Sre=Zo;function xre(r,e,t){var n,i;if(t=t||0,!Sre(e))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(e,r,t);for(i=e.length,n=t;t>=0&&n<i;n+=1)if(e[n]===r)return n;return-1}var Ja=xre;function Ere(r){return r===void 0}var Yn=Ere,Mre=Yn;function Are(r){return!r||!r.className?"":Mre(r.className.baseVal)?r.className:r.className.baseVal}var Sh=Are,Ore=Zo,Nre=Yn;function Dre(r,e){if(e=Ore(e)?e.join(" "):e,e=e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),Nre(r.className.baseVal)){r.className=e;return}r.className.baseVal=e}var Ck=Dre,Mm=_u,Lre=Ja,Rre=Sh,Ire=Ck;function Pre(r){var e=Array.prototype.slice.call(arguments,1),t=r.classList,n=[],i;if(t){Mm(e,function(a){r.classList.add(a)});return}i=Rre(r),i&&(e=[].concat(i.split(/\s+/),e)),Mm(e,function(a){Lre(a,n)<0&&n.push(a)}),Ire(r,n)}var li=Pre,Am=zo,Bre=Ja,Fre=Sh,qre=Ck;function Hre(r){var e=Array.prototype.slice.call(arguments,1),t=r.classList,n,i;if(t){Am(e,function(a){t.remove(a)});return}n=Fre(r).split(/\s+/),i=[],Am(n,function(a){Bre(a,e)<0&&i.push(a)}),qre(r,i)}var Gn=Hre;function _re(r){return typeof r=="number"||r instanceof Number}var Di=_re;function zre(r){return r===null}var pu=zre,Vre=_o;function Ure(r,e){var t=document.createElement("img"),n="";return Vre(e,function(i,a){n+="&"+a+"="+i}),n=n.substring(1),t.src=r+"?"+n,t.style.display="none",document.body.appendChild(t),document.body.removeChild(t),t}var $re=Ure,Wre=Yn,jre=$re,Gre=10080*60*1e3;function Kre(r){var e=new Date().getTime();return e-r>Gre}function Jre(r,e){var t="https://www.google-analytics.com/collect",n=location.hostname,i="event",a="use",o="TOAST UI "+r+" for "+n+": Statistics",s=window.localStorage.getItem(o);!Wre(window.tui)&&window.tui.usageStatistics===!1||s&&!Kre(s)||(window.localStorage.setItem(o,new Date().getTime()),setTimeout(function(){(document.readyState==="interactive"||document.readyState==="complete")&&jre(t,{v:1,t:i,tid:e,cid:n,dp:n,dh:r,el:r,ec:a})},1e3))}var Yre=Jre,Xre=/[\u0020]+/g,Zre=/[>(){}[\]+-.!#|]/g,Om=/<([a-zA-Z_][a-zA-Z0-9\-._]*)(\s|[^\\>])*\/?>|<(\/)([a-zA-Z_][a-zA-Z0-9\-._]*)\s*\/?>|<!--[^-]+-->|<([a-zA-Z_][a-zA-Z0-9\-.:/]*)>/g,Nm=/\\[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~\\]/g,Qre=/[*_~`]/g,Dm=/!\[.*\]\(.*\)/g,ene=/[[\]]/g,Lm=/(?:^|[^\\])\\(?!\\)/g,tne='[&<>"]',Rm=new RegExp(tne,"g");function rne(r){switch(r){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return r}}function No(r){return Rm.test(r)?r.replace(Rm,rne):r}function nne(){Yre("editor","UA-129966929-1")}function Fr(r,e){return r.indexOf(e)!==-1}var ine=["rel","target","hreflang","type"],ane={codeblock:/(^ {4}[^\n]+\n*)+/,thematicBreak:/^ *((\* *){3,}|(- *){3,} *|(_ *){3,}) */,atxHeading:/^(#{1,6}) +[\s\S]+/,seTextheading:/^([^\n]+)\n *(=|-){2,} */,blockquote:/^( *>[^\n]+.*)+/,list:/^ *(\*+|-+|\d+\.) [\s\S]+/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? */,link:/!?\[.*\]\(.*\)/,reflink:/!?\[.*\]\s*\[([^\]]*)\]/,verticalBar:/\u007C/,fencedCodeblock:/^((`|~){3,})/};function Tk(r){if(!r)return null;var e={};return ine.forEach(function(t){Yn(r[t])||(e[t]=r[t])}),e}function vu(r,e){for(var t="",n=0;n<e;n+=1)t+=r;return t}function one(r){var e=!1;return _o(ane,function(t){return t.test(r)&&(e=!0),!e}),e}function mu(r){for(var e=[],t=Dm.exec(r);t;)e.push([t.index,t.index+t[0].length]),t=Dm.exec(r);return r.replace(ene,function(n,i){var a=e.some(function(o){return i>o[0]&&i<o[1]});return a?n:"\\"+n})}function sne(r){var e=function(i){return"\\"+i},t=function(i){return i+"\\"},n=r.replace(Xre," ");return Nm.test(n)&&(n=n.replace(Nm,e)),Lm.test(n)&&(n=n.replace(Lm,t)),n=n.replace(Qre,e),Om.test(n)&&(n=n.replace(Om,e)),one(n)&&(n=n.replace(Zre,e)),n}function lne(r){var e;return r.indexOf('"')===-1?e='""':e=r.indexOf("'")===-1?"''":"()",e[0]+r+e[1]}function Rd(r){return pu(r)||Yn(r)}function xh(r,e){if(r===null&&r===e)return!0;if(typeof r!="object"||typeof e!="object"||Rd(r)||Rd(e))return r===e;for(var t in r)if(r[t]!==e[t])return!1;for(var t in e)if(!(t in r))return!1;return!0}function Ur(r){return r[r.length-1]}function une(r,e,t){return r>=e&&r<=t}function Eh(r){return typeof r=="object"&&r!==null}function gu(r,e){var t=we({},r);return r&&e&&Object.keys(e).forEach(function(n){Eh(t[n])?Array.isArray(e[n])?t[n]=Mh(e[n]):t.hasOwnProperty(n)?t[n]=gu(t[n],e[n]):t[n]=Ah(e[n]):t[n]=e[n]}),t}function Mh(r){return r.map(function(e){return Eh(e)?Array.isArray(e)?Mh(e):Ah(e):e})}function Ah(r){var e=Object.keys(r);return e.length?e.reduce(function(t,n){return Eh(r[n])?t[n]=Array.isArray(r[n])?Mh(r[n]):Ah(r[n]):t[n]=r[n],t},{}):r}function Oh(r,e){return e===void 0&&(e={}),Object.keys(e).forEach(function(t){r.hasOwnProperty(t)&&typeof r[t]=="object"?Array.isArray(e[t])?r[t]=e[t]:Oh(r[t],e[t]):r[t]=e[t]}),r}function Im(r,e){return r>e?[e,r]:[r,e]}var cne=zo;function fne(r){var e;try{e=Array.prototype.slice.call(r)}catch{e=[],cne(r,function(n){e.push(n)})}return e}var hi=fne;function yu(r,e){var t=r.nodes.paragraph;return e?t.create(null,qi(e)?r.text(e):e):t.createAndFill()}function Br(r,e,t){return r.text(e,t)}function Yt(r,e,t){t===void 0&&(t=e);var n=r.doc.content.size,i=n>0?n-1:1;return xt.create(r.doc,Math.min(e,i),Math.min(t,i))}function Nh(r,e,t){var n=e.pos;return r.replaceWith(n,n,yu(t)),r.setSelection(Yt(r,n+1))}function bu(r){for(var e=r.state,t=r.from,n=r.startIndex,i=r.endIndex,a=r.createText,o=e.tr,s=e.doc,l=e.schema,f=n;f<=i;f+=1){var p=s.child(f),b=p.nodeSize,T=p.textContent,x=p.content,E=a(T),P=E?Br(l,E):De.empty,F=o.mapping.map(t),z=F+x.size;o.replaceWith(F,z,P),t+=b}return o}function Dh(r,e,t,n){var i=t.length;r.split(e).delete(e-i,e).insert(r.mapping.map(e),n).setSelection(Yt(r,r.mapping.map(e)-i))}function $s(r){return r.sourcepos[0][0]}function zu(r){return r.sourcepos[1][0]}function Vu(r){return r.sourcepos[0][1]}function la(r){return r.sourcepos[1][1]}function dne(r){var e=r.type;return e==="htmlBlock"||e==="htmlInline"}function hne(r){var e=r.type;return e==="strike"||e==="strong"||e==="emph"||e==="code"||e==="link"||e==="image"}function pne(r){return r&&r.type==="codeBlock"}function Ya(r){return r&&(r.type==="item"||r.type==="list")}function Sk(r){return Ya(r)&&r.listData.type==="ordered"}function vne(r){return Ya(r)&&r.listData.type!=="ordered"}function Pm(r){return r&&(r.type==="tableCell"||r.type==="tableDelimCell")}function mne(r){switch(r.type){case"code":case"text":case"emph":case"strong":case"strike":case"link":case"image":case"htmlInline":case"linebreak":case"softbreak":case"customInline":return!0;default:return!1}}function Vo(r,e,t){for(t===void 0&&(t=!0),r=t?r:r.parent;r&&r.type!=="document";){if(e(r))return r;r=r.parent}return null}function gne(r,e,t){for(t===void 0&&(t=!0),r=t?r:r.parent;r&&r.type!=="document";)e(r),r=r.parent}function Sr(r,e){return[r[0],r[1]+e]}function ua(r,e){return[r[0],e]}function yne(r){var e=r.firstChild.literal;switch(r.type){case"emph":return"*"+e+"*";case"strong":return"**"+e+"**";case"strike":return"~~"+e+"~~";case"code":return"`"+e+"`";case"link":case"image":var t=r,n=t.destination,i=t.title,a=r.type==="link"?"":"!";return a+"["+e+"]("+n+(i?' "'+i+'"':"")+")";default:return null}}function bne(r){switch(r.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}function kne(r){for(var e=[],t=r.walker(),n=null;n=t.next();){var i=n.node;i.type==="text"&&e.push(i.literal)}return e.join("")}var Fs=[],xk={},Bm=/\$\$widget\d+\s/;function Uu(r){var e=r.search(Bm);if(e!==-1){var t=r.substring(e),n=t.replace(Bm,"").replace("$$","");r=r.substring(0,e),r+=Uu(n)}return r}function Ek(r,e){return"$$"+r+" "+e+"$$"}function Mk(r,e){var t=xk[r],n=t.rule,i=t.toDOM,a=Uu(e).match(n);return a&&(e=a[0]),i(e)}function wne(){return Fs}function Cne(r){Fs=r,Fs.forEach(function(e,t){xk["widget"+t]=e})}function Wf(r,e,t,n){return r.concat(Ua(e,t,n))}function Ua(r,e,t){t===void 0&&(t=0);var n=[],i=(Fs[t]||{}).rule,a=t+1;if(r=Uu(r),i&&i.test(r)){for(var o=void 0;(o=r.search(i))!==-1;){var s=r.substring(0,o);s&&(n=Wf(n,s,e,a)),r=r.substring(o);var l=r.match(i)[0],f="widget"+t;n.push(e.nodes.widget.create({info:f},e.text(Ek(f,l)))),r=r.substring(l.length)}r&&(n=Wf(n,r,e,a))}else r&&(n=t<Fs.length-1?Wf(n,r,e,a):[e.text(r)]);return n}function Ak(r){for(var e,t="",n=r.walker();e=n.next();){var i=e.node,a=e.entering;a&&(i!==r&&i.type!=="text"?(t+=yne(i),n.resumeAt(r,!1),n.next()):i.type==="text"&&(t+=i.literal))}return t}function Ok(){return{deleteSelection:function(){return yh},selectAll:function(){return pk},undo:function(){return Ms},redo:function(){return Ch}}}function Tne(r){return new hn({props:{decorations:function(e){var t=e.doc;if(r.text&&t.childCount===1&&t.firstChild.isTextblock&&t.firstChild.content.size===0){var n=document.createElement("span");return li(n,"placeholder"),r.className&&li(n,r.className),n.textContent=r.text,dr.create(t,[cn.widget(1,n)])}return null}}})}var Sne=Ja,xne=Sh;function Ene(r,e){var t;return r.classList?r.classList.contains(e):(t=xne(r).split(/\s+/),Sne(e,t)>-1)}var Nk=Ene,Mne=Ja,Ane=hi,Pl=Element.prototype,One=Pl.matches||Pl.webkitMatchesSelector||Pl.mozMatchesSelector||Pl.msMatchesSelector||function(r){var e=this.document||this.ownerDocument;return Mne(this,Ane(e.querySelectorAll(r)))>-1};function Nne(r,e){return One.call(r,e)}var Dne=Nne,Dk="[A-Za-z][A-Za-z0-9-]*",Lne="[a-zA-Z_:][a-zA-Z0-9:._-]*",Rne="[^\"'=<>`\\x00-\\x20]+",Ine="'[^']*'",Pne='"[^"]*"',Bne="(?:"+Rne+"|"+Ine+"|"+Pne+")",Fne="(?:\\s*=\\s*"+Bne+")",Lk="(?:\\s+"+Lne+Fne+"?)",Rk="<("+Dk+")("+Lk+")*\\s*/?>",qne="</("+Dk+")\\s*[>]",Ik="(?:"+Rk+"|"+qne+")",Uo=new RegExp("^"+Ik,"i"),Id=/<br\s*\/*>/i,Hne=/<! ---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,Pk="</p><p>";function Lh(r,e,t){var n=parseInt(r.left,10),i=parseInt(r.top,10),a=parseInt(r.width,10)+parseInt(r.paddingLeft,10)+parseInt(r.paddingRight,10),o=parseInt(r.height,10)+parseInt(r.paddingTop,10)+parseInt(r.paddingBottom,10);return e>=n&&e<=n+a&&t>=i&&t<=i+o}var Bk="toastui-editor-";function Je(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=[],n=0,i=r;n<i.length;n++){var a=i[n],o=void 0;Array.isArray(a)?o=a[0]?a[1]:null:o=a,o&&t.push(""+Bk+o)}return t.join(" ")}function wr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.map(function(t){return Bk+"md-"+t}).join(" ")}function _ne(r){return(r==null?void 0:r.nodeType)===Node.TEXT_NODE}function $u(r){return r&&r.nodeType===Node.ELEMENT_NODE}function zne(r,e){var t=hi(r.querySelectorAll(e));return t.length?t:[]}function Vne(r,e){e=Zo(e)?hi(e):[e],e.forEach(function(t){r.appendChild(t)})}function Une(r,e){e.parentNode&&e.parentNode.insertBefore(r,e)}function Xa(r){r.parentNode&&r.parentNode.removeChild(r)}function $ne(r){for(var e=[];r.firstChild;)e.push(r.firstChild),r.parentNode&&r.parentNode.insertBefore(r.firstChild,r);return Xa(r),e}function Rh(r,e,t){Yn(t)&&(t=!Nk(r,e));var n=t?li:Gn;n(r,e)}function Fk(r,e){var t=document.createElement("div");qi(r)?t.innerHTML=r:t.appendChild(r);var n=t.firstChild;return e&&e.appendChild(n),n}function Ih(r){var e=window.getComputedStyle(r);return["margin-left","margin-right"].reduce(function(t,n){return t+parseInt(e.getPropertyValue(n),10)},0)+r.offsetWidth}function ui(r,e){var t;for(qi(e)?t=function(n){return Dne(n,e)}:t=function(n){return n===e};r&&r!==document;){if($u(r)&&t(r))return r;r=r.parentNode}return null}function qk(r,e){for(var t=0,n=0;r&&r!==e;){var i=r.offsetTop,a=r.offsetLeft,o=r.offsetParent;if(t+=i,n+=a,o===e.offsetParent)break;r=r.offsetParent}return{offsetTop:t,offsetLeft:n}}function Ph(r,e){Object.keys(r).forEach(function(t){Rd(r[t])?e.removeAttribute(t):e.setAttribute(t,r[t])})}function Wne(r){var e=r.replace(/<p><br\s*\/*><\/p>/gi,"<p></p>"),t=new RegExp(Ik,"ig"),n=e.match(t);return n==null||n.forEach(function(i,a){if(Id.test(i)){var o=Pk;if(a){var s=n[a-1],l=s.match(Rk);if(l&&!/br/i.test(l[1])){var f=l[1];o="</"+f+"><"+f+">"}}e=e.replace(Id,o)}}),e}function Bh(r){var e=/<img class="ProseMirror-separator" alt="">/g,t=/ class="ProseMirror-trailingBreak"/g,n=r;return n=n.replace(e,""),n=n.replace(t,""),n}var Hk=new Hs("widget"),Fm=5,jne=(function(){function r(e,t){var n=this;this.popup=null,this.removeWidget=function(){n.popup&&(n.rootEl.removeChild(n.popup),n.popup=null)},this.rootEl=e.dom.parentElement,this.eventEmitter=t,this.eventEmitter.listen("blur",this.removeWidget),this.eventEmitter.listen("loadUI",function(){n.rootEl=ui(e.dom.parentElement,"."+Je("defaultUI"))}),this.eventEmitter.listen("removePopupWidget",this.removeWidget)}return r.prototype.update=function(e){var t=Hk.getState(e.state);if(this.removeWidget(),t){var n=t.node,i=t.style,a=e.coordsAtPos(t.pos),o=a.top,s=a.left,l=a.bottom,f=l-o,p=this.rootEl.getBoundingClientRect(),b=o-p.top;di(n,{opacity:"0"}),this.rootEl.appendChild(n),di(n,{position:"absolute",left:s-p.left+Fm+"px",top:(i==="bottom"?b+f-Fm:b-f)+"px",opacity:"1"}),this.popup=n,e.focus()}},r.prototype.destroy=function(){this.eventEmitter.removeEventHandler("blur",this.removeWidget)},r})();function Gne(r){return new hn({key:Hk,state:{init:function(){return null},apply:function(e){return e.getMeta("widget")}},view:function(e){return new jne(e,r)}})}function Kne(r){r.listen("addImageBlobHook",function(e,t){var n=new FileReader;n.onload=function(i){var a=i.target;return t(a.result)},n.readAsDataURL(e)})}function Fh(r,e,t){var n=function(i,a){r.emit("command","addImage",{imageUrl:i,altText:a||e.name||"image"})};r.emit("addImageBlobHook",e,n,t)}function _k(r){var e=hi(r).filter(function(n){var i=n.type;return i.indexOf("image")!==-1});if(e.length===1){var t=e[0];if(t)return t.getAsFile()}return null}function Jne(r){var e=r.eventEmitter;return new hn({props:{handleDOMEvents:{drop:function(t,n){var i,a=(i=n.dataTransfer)===null||i===void 0?void 0:i.files;return a&&zo(a,function(o){return o.type.indexOf("image")!==-1?(n.preventDefault(),n.stopPropagation(),Fh(e,o,n.type),!1):!0}),!0}}}})}var Gt=(function(){function r(){}return Object.defineProperty(r.prototype,"type",{get:function(){return"node"},enumerable:!1,configurable:!0}),r.prototype.setContext=function(e){this.context=e},r})();function zk(r){var e=document.createElement("span"),t=Mk(r.attrs.info,r.textContent);return e.className="tui-widget",e.appendChild(t),{dom:e}}function Pd(r){return r.type.name==="widget"}var Vk=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"widget"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{info:{default:null}},group:"inline",inline:!0,content:"text*",selectable:!1,atom:!0,toDOM:function(){return["span",{class:"tui-widget"},0]},parseDOM:[{tag:"span.tui-widget",getAttrs:function(t){var n=t.textContent,i=n.match(/\$\$(widget\d+)/),a=i[1];return{info:a}}}]}},enumerable:!1,configurable:!0}),e})(Gt),Uk=(function(){function r(e){this.timer=null,this.el=document.createElement("div"),this.el.className="toastui-editor",this.eventEmitter=e,this.placeholder={text:""}}return r.prototype.createState=function(){return Ba.create({schema:this.schema,plugins:this.createPlugins()})},r.prototype.initEvent=function(){var e=this,t=e.eventEmitter,n=e.view,i=e.editorType;n.dom.addEventListener("focus",function(){return t.emit("focus",i)}),n.dom.addEventListener("blur",function(){return t.emit("blur",i)})},r.prototype.emitChangeEvent=function(e){this.eventEmitter.emit("caretChange",this.editorType),e.docChanged&&this.eventEmitter.emit("change",this.editorType)},Object.defineProperty(r.prototype,"defaultPlugins",{get:function(){var e=this.createInputRules(),t=dn(dn([],this.keymaps),[Bs(we({"Shift-Enter":Tm.Enter},Tm)),kk(),Tne(this.placeholder),Gne(this.eventEmitter),Jne(this.context)]);return e?t.concat(e):t},enumerable:!1,configurable:!0}),r.prototype.createInputRules=function(){var e=wne(),t=e.map(function(n){var i=n.rule;return new da(i,function(a,o,s,l){var f=a.schema,p=a.tr,b=a.doc,T=o.input.match(new RegExp(i,"g")),x=b.resolve(s),E=x.parent,P=0;if(Pd(E)&&(E=x.node(x.depth-1)),E.forEach(function(Y){return Pd(Y)&&(P+=1)}),T.length>P){var F=Ur(T),z=Ua(F,f);return p.replaceWith(l-F.length+1,l,z)}return null})});return t.length?yk({rules:t}):null},r.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},r.prototype.createSchema=function(){return new db({nodes:this.specs.nodes,marks:this.specs.marks})},r.prototype.createKeymaps=function(e){var t=Ok(),n=t.undo,i=t.redo,a=this.specs.keymaps(e),o={"Mod-z":n(),"Shift-Mod-z":i()};return e?a.concat(Bs(o)):a},r.prototype.createCommands=function(){return this.specs.commands(this.view)},r.prototype.createPluginProps=function(){var e=this;return this.extraPlugins.map(function(t){return t(e.eventEmitter)})},r.prototype.focus=function(){var e=this;this.clearTimer(),this.timer=setTimeout(function(){e.view.focus(),e.view.dispatch(e.view.state.tr.scrollIntoView())})},r.prototype.blur=function(){this.view.dom.blur()},r.prototype.destroy=function(){var e=this;this.clearTimer(),this.view.destroy(),Object.keys(this).forEach(function(t){delete e[t]})},r.prototype.moveCursorToStart=function(e){var t=this.view.state.tr;this.view.dispatch(t.setSelection(Yt(t,1)).scrollIntoView()),e&&this.focus()},r.prototype.moveCursorToEnd=function(e){var t=this.view.state.tr;this.view.dispatch(t.setSelection(Yt(t,t.doc.content.size-1)).scrollIntoView()),e&&this.focus()},r.prototype.setScrollTop=function(e){this.view.dom.scrollTop=e},r.prototype.getScrollTop=function(){return this.view.dom.scrollTop},r.prototype.setPlaceholder=function(e){this.placeholder.text=e,this.view.dispatch(this.view.state.tr.scrollIntoView())},r.prototype.setHeight=function(e){di(this.el,{height:e+"px"})},r.prototype.setMinHeight=function(e){di(this.el,{minHeight:e+"px"})},r.prototype.getElement=function(){return this.el},r})();function Yne(r){return r instanceof Function}var Hn=Yne,Xne=["Enter","Shift-Enter","Mod-Enter","Tab","Shift-Tab","Delete","Backspace","Mod-Delete","Mod-Backspace","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Mod-d","Mod-D","Alt-ArrowUp","Alt-ArrowDown"];function Bl(r,e,t){return r.focus(),e(t)(r.state,r.dispatch,r)}var $k=(function(){function r(e){this.specs=e}return Object.defineProperty(r.prototype,"nodes",{get:function(){return this.specs.filter(function(e){return e.type==="node"}).reduce(function(e,t){var n,i=t.name,a=t.schema;return we(we({},e),(n={},n[i]=a,n))},{})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"marks",{get:function(){return this.specs.filter(function(e){return e.type==="mark"}).reduce(function(e,t){var n,i=t.name,a=t.schema;return we(we({},e),(n={},n[i]=a,n))},{})},enumerable:!1,configurable:!0}),r.prototype.commands=function(e,t){var n=this.specs.filter(function(a){var o=a.commands;return o}).reduce(function(a,o){var s={},l=o.commands();return Hn(l)?s[o.name]=function(f){return Bl(e,l,f)}:Object.keys(l).forEach(function(f){s[f]=function(p){return Bl(e,l[f],p)}}),we(we({},a),s)},{}),i=Ok();return Object.keys(i).forEach(function(a){n[a]=function(o){return Bl(e,i[a],o)}}),t&&Object.keys(t).forEach(function(a){n[a]=function(o){return Bl(e,t[a],o)}}),n},r.prototype.keymaps=function(e){var t=this.specs.filter(function(n){return n.keymaps}).map(function(n){return n.keymaps()});return t.map(function(n){return e||Object.keys(n).forEach(function(i){Fr(Xne,i)||delete n[i]}),Bs(n)})},r.prototype.setContext=function(e){this.specs.forEach(function(t){t.setContext(e)})},r})();function Wk(r){var e=r.from,t=r.to;return r instanceof Jr?[e+1,t-1]:[e,t]}function qm(r){return r.index(0)+1}function $o(r,e,t){t===void 0&&(t=1);var n=0;return r.forEach(function(i,a){Pd(i)&&a+2<e&&(n+=2*t)}),n}function Yl(r,e,t){t===void 0&&(t=e);var n=e===t,i=r.resolve(e),a=qm(i),o=a,s=i.start(1),l=s;if(!n){var f=r.resolve(t===r.content.size?t-1:t);l=f.start(1),o=qm(f),f.pos===r.content.size&&(t=r.content.size-2)}var p=Math.max(e-s+1,1),b=Math.max(t-l+1,1);return[[a,p+$o(r.child(a-1),p,-1)],[o,b+$o(r.child(o-1),b,-1)]]}function jk(r,e){for(var t=[],n=0,i=0;n<e;n+=1){var a=r.child(n);t[n]=i,i+=a.nodeSize}return t}function Ia(r,e,t){var n=jk(r,t[0]),i=e[0]-1,a=t[0]-1,o=r.child(i),s=r.child(a),l=n[i],f=n[a];return l+=e[1]+$o(o,e[1]-1),f+=t[1]+$o(s,t[1]-1),[l,Math.min(f,r.content.size)]}function kr(r){var e=r.$from,t=r.$to,n=r.from,i=r.to,a=e.doc;return r instanceof Jr&&(e=a.resolve(n+1),t=a.resolve(i-1)),e.depth===0&&(e=a.resolve(n-1),t=e),{startFromOffset:e.start(1),endFromOffset:t.start(1),startToOffset:e.end(1),endToOffset:t.end(1),startIndex:e.index(0),endIndex:t.index(0),from:e.pos,to:t.pos}}function ku(r,e){for(var t=1,n=1,i=0,a=0;i<r.childCount;i+=1){var o=r.child(i).nodeSize;if(t=a+1,n=a+o-1,i===e)break;a+=o}return{startOffset:t,endOffset:n}}var Hm="heading",Zne="blockQuote",Qne="listItem",eie="table",tie="tableCell",rie="codeBlock",nie="thematicBreak",Xl="link",Fl="code",Wu="meta",Za="delimiter",iie="taskDelimiter",qh="markedText",aie="html",oie="customBlock",_m={strong:2,emph:1,strike:2};function Ft(r,e,t,n){return{start:r,end:e,spec:{type:t,attrs:n}}}function sie(r,e,t){var n=r.level,i=r.headingType,a=[Ft(e,t,Hm,{level:n})];return i==="atx"?a.push(Ft(e,Sr(e,n),Za)):a.push(Ft(ua(t,0),t,Hm,{seText:!0})),a}function jf(r,e,t){var n=r.type,i=Sr(e,_m[n]),a=Sr(t,-_m[n]);return[Ft(i,a,n),Ft(e,i,Za),Ft(a,t,Za)]}function Gk(r,e,t,n){return[Ft(r,e,Xl),Ft(ua(r,t[1]+1),ua(e,n),Xl,{desc:!0}),Ft(ua(e,n+2),Sr(e,-1),Xl,{url:!0})]}function lie(r,e,t){var n=r.lastChild,i=n?la(n)+1:3,a=Sr(e,1);return dn([Ft(e,a,Wu)],Gk(e,t,a,i))}function uie(r,e,t){var n=r.lastChild,i=r.extendedAutolink,a=n?la(n)+1:2;return i?[Ft(e,t,Xl,{desc:!0})]:Gk(e,t,e,a)}function cie(r,e,t){var n=r.tickCount,i=Sr(e,n),a=Sr(t,-n);return[Ft(e,t,Fl),Ft(e,i,Fl,{start:!0}),Ft(i,a,Fl,{marked:!0}),Ft(a,t,Fl,{end:!0})]}function Kk(r,e,t,n){var i={start:e,end:t,spec:{attrs:{className:n+"-line-background",codeStart:e[0],codeEnd:t[0]}},lineBackground:!0};return r.type!=="item"&&r.type!=="blockQuote"?[we(we({},i),{end:e,spec:{attrs:{className:n+"-line-background start"}}}),we(we({},i),{start:[Math.min(e[0]+1,t[0]),e[1]]})]:null}function fie(r,e,t,n){var i=r.fenceOffset,a=r.fenceLength,o=r.fenceChar,s=r.info,l=r.infoPadding,f=r.parent,p=i+a,b=[Ft(ua(e,1),t,rie)];o&&b.push(Ft(e,Sr(e,p),Za)),s&&b.push(Ft(Sr(e,a),Sr(e,a+l+s.length),Wu));var T="^(\\s{0,4})("+o+"{"+a+",})",x=new RegExp(T);x.test(n)&&b.push(Ft(ua(t,1),t,Za));var E=Kk(f,e,t,"code-block");return E?b.concat(E):b}function die(r,e,t){var n=r,i=n.offset,a=n.syntaxLength,o=n.info,s=n.parent,l=i+a,f=[Ft(ua(e,1),t,oie)];f.push(Ft(e,Sr(e,l),Za)),o&&f.push(Ft(Sr(e,l),Sr(e,a+o.length),Wu)),f.push(Ft(ua(t,1),t,Za));var p=Kk(s,e,t,"custom-block");return p?f.concat(p):f}function Jk(r,e){for(var t=[];r;){var n=r.type;(n==="paragraph"||n==="codeBlock")&&t.push(Ft([$s(r),Vu(r)-1],[zu(r),la(r)+1],e)),r=r.next}return t}function hie(r){for(var e=[];r;)e.push(Ft([$s(r),Vu(r)],[zu(r),la(r)+1],qh)),r=r.next;return e}function pie(r,e,t){var n=r.parent&&r.parent.type!=="blockQuote"?[Ft(e,t,Zne)]:[];if(r.firstChild){var i=[];r.firstChild.type==="paragraph"?i=hie(r.firstChild.firstChild):r.firstChild.type==="list"&&(i=Jk(r.firstChild,qh)),n=dn(dn([],n),i)}return n}function vie(r){for(var e=0;r.parent.parent&&r.parent.parent.type==="item";)r=r.parent.parent,e+=1;var t=[{odd:!0},{even:!0}][e%2];return[Qne,we(we({},t),{listStyle:!0})]}function mie(r,e){var t=r.listData,n=t.padding,i=t.task,a=vie(r),o=[Ft.apply(void 0,dn([e,Sr(e,n)],a))];return i&&(o.push(Ft(Sr(e,n),Sr(e,n+3),iie)),o.push(Ft(Sr(e,n+1),Sr(e,n+2),Wu))),o.concat(Jk(r.firstChild,qh))}var zm={heading:sie,strong:jf,emph:jf,strike:jf,link:uie,image:lie,code:cie,codeBlock:fie,blockQuote:pie,item:mie,customBlock:die},Vm={thematicBreak:nie,table:eie,tableCell:tie,htmlInline:aie};function gie(r,e,t,n){var i=r.type;return Hn(zm[i])?zm[i](r,e,t,n):Vm[i]?[Ft(e,t,Vm[i])]:null}var qs={};function yie(r){var e=r.schema,t=r.toastMark;return new hn({appendTransaction:function(n,i,a){var o=n[0],s=a.tr;if(o.docChanged){var l=[],f=o.getMeta("editResult");f.forEach(function(p){var b=p.nodes,T=p.removedNodeRange;if(b.length){l=l.concat(Sie(s,b));for(var x=0,E=b;x<E.length;x++)for(var P=E[x],F=P.walker(),z=F.next();z;){var Y=z.node,ee=z.entering;ee&&(l=l.concat(xie(Y,t))),z=F.next()}}else if(T)for(var se=s.doc.childCount-1,de=T.line,oe=de[0],le=de[1],ge=Math.min(oe,se),xe=Math.min(le,se),Ie=ge;Ie<=xe;Ie+=1)qs[Ie]=!0}),wie(s,e,l)}return s.setMeta("widget",o.getMeta("widget"))}})}function bie(r,e,t){return Object.keys(t).some(function(n){return t[n]!==r.child(e).attrs[n]})}function kie(r,e,t,n,i){i===void 0&&(i={});for(var a=n.startIndex,o=n.endIndex,s=n.from,l=n.to,f=!1,p=a;p<=o;p+=1)delete qs[p],f=bie(e,p,i);f&&r.setBlockType(s,l,t,i)}function wie(r,e,t){var n=r.doc,i=e.nodes.paragraph,a=jk(n,n.childCount);t.forEach(function(o){var s=o.start,l=o.end,f=o.spec,p=o.lineBackground,b=Math.min(s[0],n.childCount)-1,T=Math.min(l[0],n.childCount)-1,x=n.child(b),E=n.child(T),P=a[b],F=a[T];if(P+=s[1]+$o(x,s[1]-1),F+=l[1]+$o(E,l[1]-1),f)if(p){var z={from:P,to:F,startIndex:b,endIndex:T};kie(r,n,i,z,f.attrs)}else r.addMark(P,F,e.mark(f.type,f.attrs));else r.removeMark(P,F)}),Cie(r,a,i)}function Cie(r,e,t){Object.keys(qs).forEach(function(n){var i=Number(n),a=Math.min(Number(n)+1,r.doc.childCount-1),o=e[i],s=e[a]-1;i===a&&(s+=2),r.setBlockType(o,s,t)})}function Tie(r,e,t){var n=[];qs={};for(var i=e[0]-1;i<t[0];i+=1){var a=r.child(i),o=a.attrs.codeEnd,s=a.attrs.codeStart;if(s&&o&&!Fr(n,s)){n.push(s),o=Math.min(o,r.childCount);for(var l=s-1,f=t[0],p=l;p<f;p+=1)qs[p]=!0}}}function Sie(r,e){var t=r.doc,n=e[0].sourcepos[0],i=Ur(e).sourcepos,a=i[1],o=[n[0],n[1]],s=[a[0],a[1]+1],l=[];return Tie(t,n,a),l.push({start:o,end:s}),l}function xie(r,e){var t=e.getLineTexts(),n=[$s(r),Vu(r)],i=[zu(r),la(r)+1],a=gie(r,n,i,t[i[0]-1]);return a??[]}var Eie=["taskList","orderedList","bulletList","table","strong","emph","strike","heading","thematicBreak","blockQuote","code","codeBlock","indent","outdent"];function Mie(r){var e=r.type;return Ya(r)?r.listData.task?"taskList":r.listData.type==="ordered"?"orderedList":"bulletList":e.indexOf("table")!==-1?"table":Fr(Eie,e)?e:null}function Aie(r){var e={indent:{active:!1,disabled:!0},outdent:{active:!1,disabled:!0}},t=!0;return gne(r,function(n){var i=Mie(n);i&&(i==="bulletList"||i==="orderedList"?t&&(e[i]={active:!0},e.indent.disabled=!1,e.outdent.disabled=!1,t=!1):e[i]={active:!0})}),e}function Oie(r){var e=r.toastMark,t=r.eventEmitter;return new hn({view:function(){return{update:function(n,i){var a=n.state,o=a.doc,s=a.selection;if(!(i&&i.doc.eq(o)&&i.selection.eq(s))){var l=s.from,f=a.doc.resolve(l).start(),p=a.doc.content.findIndex(l).index+1,b=l-f;l===f&&(b+=1);var T=[p,b],x=e.findNodeAtPosition(T),E=Aie(x);t.emit("changeToolbarState",{cursorPos:T,mdNode:x,toolbarState:E}),t.emit("setFocusedNode",x)}}}}})}var Nie=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"doc"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"block+"}},enumerable:!1,configurable:!0}),e})(Gt),Xt=(function(){function r(){}return Object.defineProperty(r.prototype,"type",{get:function(){return"mark"},enumerable:!1,configurable:!0}),r.prototype.setContext=function(e){this.context=e},r})();function wn(r,e){return ca(r,e-1)}function ca(r,e){return r.child(e).textContent}var ws=/^\s*> ?/,Die=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:wr("block-quote")},0]}}},enumerable:!1,configurable:!0}),e.prototype.createBlockQuoteText=function(t,n){return n?t.replace(ws,"").trim():"> "+t.trim()},e.prototype.extendBlockQuote=function(){var t=this;return function(n,i){var a=n.selection,o=n.doc,s=n.tr,l=n.schema,f=kr(a),p=f.endFromOffset,b=f.endToOffset,T=f.endIndex,x=f.to,E=ca(o,T),P=ws.test(E);if(P&&x>p&&a.empty){var F=!E.replace(ws,"").trim();if(F)s.deleteRange(p,b).split(s.mapping.map(b));else{var z=E.slice(x-p).trim(),Y=Br(l,t.createBlockQuoteText(z));Dh(s,b,z,Y)}return i(s),!0}return!1}},e.prototype.commands=function(){var t=this;return function(){return function(n,i){var a=n.selection,o=n.doc,s=kr(a),l=s.startFromOffset,f=s.endToOffset,p=s.startIndex,b=s.endIndex,T=ws.test(ca(o,p)),x=bu({state:n,startIndex:p,endIndex:b,from:l,createText:function(E){return t.createBlockQuoteText(E,T)}});return i(x.setSelection(Yt(x,x.mapping.map(f)))),!0}}},e.prototype.keymaps=function(){var t=this.commands()();return{"alt-q":t,"alt-Q":t,Enter:this.extendBlockQuote()}},e})(Xt),Qa=/(^\s*)([-*+] |[\d]+\. )/,Hh=/(^\s*)([\d])+\.( \[[ xX]])? /,Pi=/^(\s*)((\d+)([.)]\s(?:\[(?:x|\s)\]\s)?))(.*)/,wu=/(^\s*)([-*+]|[\d]+\.)( \[[ xX]])? /,Lie=/^(\s*)([-*+]+(\s(?:\[(?:x|\s)\]\s)?))(.*)/,Rie=/(^\s*)([-*+] |[\d]+\. )(\[[ xX]] )/,Iie=/(^\s*)([-*+])( \[[ xX]]) /;function _h(r){return Hh.test(r)?"ordered":"bullet"}function zh(r){for(var e=0;r&&r.type!=="document";)r.type==="list"&&(e+=1),r=r.parent;return e}function Bd(r,e,t,n){for(var i=r.getLineTexts(),a=i.length,o=[],s=e;n?s<a:s>1;){s=n?s+1:s-1;var l=r.findFirstNodeAtLine(s),f=zh(l);if(f===t)o.push({line:s,depth:t,mdNode:l});else if(f<t)break}return o}function Pie(r){var e=r.toastMark,t=r.mdNode,n=r.line,i=zh(t),a=Bd(e,n,i,!1).reverse(),o=Bd(e,n,i,!0);return a.concat([{line:n,depth:i,mdNode:t}]).concat(o)}function Bie(r){if(!Qa.test(r))return"* "+r;var e=_h(r);return e==="bullet"&&wu.test(r)?r=r.replace(Iie,"$1$2 "):e==="ordered"&&(r=r.replace(Hh,"$1* ")),r}function Fie(r,e){if(!Qa.test(r))return e+". "+r;var t=_h(r);if(t==="bullet"||t==="ordered"&&wu.test(r))r=r.replace(wu,"$1"+e+". ");else if(t==="ordered"){var n=Pi.exec(r)[3];Number(n)!==e&&(r=r.replace(Hh,"$1"+e+". "))}return r}function Yk(r,e,t,n){n===void 0&&(n=0);var i=Number.MAX_VALUE,a=0,o=e.map(function(s,l){var f=s.line;i=Math.min(f-1,i),a=Math.max(f-1,a);var p=wn(r,f);return p=t==="bullet"?Bie(p):Fie(p,l+1+n),{text:p,line:f}});return{changedResults:o,firstIndex:i,lastIndex:a}}function Um(r,e){var t=Pie(e);return Yk(e.doc,t,r)}var qie={bullet:function(r){return Um("bullet",r)},ordered:function(r){return Um("ordered",r)},task:function(r){var e=r.mdNode,t=r.doc,n=r.line,i=wn(t,n);return e.listData.task?i=i.replace(Rie,"$1$2"):Ya(e)&&(i=i.replace(Qa,"$1$2[ ] ")),{changedResults:[{text:i,line:n}]}}},Hie={bullet:function(r){var e=r.doc,t=r.line,n=wn(e,t),i=[{text:"* "+n,line:t}];return{changedResults:i}},ordered:function(r){for(var e=r.toastMark,t=r.doc,n=r.line,i=r.startLine,a=wn(t,n),o=1,s=i,l=0,f=i-1;f>0;f-=1){var p=e.findFirstNodeAtLine(f),b=wn(t,f),T=b&&!!Vo(p,function(ee){return Ya(ee)}),x=Pi.exec(wn(t,f));if(!x&&!T)break;if(!x&&T){l+=1;continue}var E=x,P=E[1],F=E[3];if(!P){o=Number(F),s=f;break}}var z=o+n-s-l,Y=[{text:z+". "+a,line:n}];return{changedResults:Y}},task:function(r){var e=r.doc,t=r.line,n=wn(e,t),i=[{text:"* [ ] "+n,line:t}];return{changedResults:i}}},_ie={bullet:function(r){var e=r.line,t=r.doc,n=wn(t,e),i=Lie.exec(n),a=i[1],o=i[2];return{listSyntax:""+a+o}},ordered:function(r){var e=r.toastMark,t=r.line,n=r.mdNode,i=r.doc,a=zh(n),o=wn(i,t),s=Pi.exec(o),l=s[1],f=s[3],p=s[4],b=Number(f)+1,T=""+l+b+p,x=Bd(e,t,a,!0),E=x.filter(function(P){var F=Pi.exec(wn(i,P.line));return F&&F[1].length===l.length&&!!Vo(P.mdNode,function(z){return Sk(z)})});return we({listSyntax:T},Yk(i,E,"ordered",b))}};function Xk(r,e,t,n,i){for(var a=[],o=wn(r,t),s=Pi.exec(o);s;){var l=s[1],f=s[4],p=s[5],b=l.length;if(b===i)a.push(Br(e,""+l+n+f+p)),n+=1,t+=1;else if(b>i){var T=Xk(r,e,t,1,b);t=T.line,a=a.concat(T.nodes)}if(b<i||t>r.childCount)break;o=wn(r,t),s=Pi.exec(o)}return{nodes:a,line:t}}var $m=/(^\s{1,4})(.*)/;function Wm(r,e,t){return r<e||Qa.test(t)||ws.test(t)}function jm(r,e,t){var n=t.$from;n.depth===0&&(n=r.resolve(n.pos-1));var i=n.node(1),a=n.start(1),o=i.content.size;return i.rangeHasMark(0,o,e.marks.table)&&n.pos-a!==o&&n.pos!==a}function Gm(r,e){var t=e.from,n=e.to;if(e.type==="indent"){var i=4;t+=i,n+=(e.lineLen+1)*i}else{var a=e.spaceLenList;t-=a[0];for(var o=0;o<a.length;o+=1)n-=a[o]}return Yt(r,t,n)}var zie=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"paragraph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"inline*",attrs:{className:{default:null},codeStart:{default:null},codeEnd:{default:null}},selectable:!1,group:"block",parseDOM:[{tag:"div"}],toDOM:function(t){var n=t.attrs;return n.className?["div",{class:wr(n.className)},0]:["div",0]}}},enumerable:!1,configurable:!0}),e.prototype.reorderList=function(t,n){for(var i=this.context,a=i.view,o=i.toastMark,s=i.schema,l=a.state,f=l.tr,p=l.selection,b=l.doc,T=o.findFirstNodeAtLine(t),x=T;T&&!vne(T)&&T.parent.type!=="document";)if(T=T.parent,Sk(T)){x=T;break}x&&(t=x.sourcepos[0][0]);var E=Pi.exec(wn(b,t)),P=E[1],F=E[3],z=P.length,Y=Xk(b,s,t,Number(F),z),ee=Y.line,se=Y.nodes;n=Math.max(n,ee-1);for(var de=ku(b,t-1).startOffset,oe=t-1;oe<=n-1;oe+=1){var le=b.child(oe),ge=le.nodeSize,xe=le.content,Ie=f.mapping.map(de),ot=Ie+xe.size;f.replaceWith(Ie,ot,se[oe-t+1]),de+=ge}var Fe=Yt(f,p.from,p.to);a.dispatch(f.setSelection(Fe))},e.prototype.indent=function(t){var n=this;return t===void 0&&(t=!1),function(){return function(i,a){var o=i.schema,s=i.selection,l=i.doc,f=kr(s),p=f.from,b=f.to,T=f.startFromOffset,x=f.startIndex,E=f.endIndex;if(t&&jm(l,o,s))return!1;var P=ca(l,x);if(t&&Wm(p,b,P)||!t&&Qa.test(P)){var F=bu({state:i,from:T,startIndex:x,endIndex:E,createText:function(Y){return" "+Y}}),z={type:"indent",from:p,to:b,lineLen:E-x};a(F.setSelection(Gm(F,z))),Pi.test(P)&&n.reorderList(x+1,E+1)}else t&&a(i.tr.insert(b,Br(o," ")));return!0}}},e.prototype.outdent=function(t){var n=this;return t===void 0&&(t=!1),function(){return function(i,a){var o=i.selection,s=i.doc,l=i.schema,f=kr(o),p=f.from,b=f.to,T=f.startFromOffset,x=f.startIndex,E=f.endIndex;if(t&&jm(s,l,o))return!1;var P=ca(s,x);if(t&&Wm(p,b,P)||!t&&Qa.test(P)){var F=[],z=bu({state:i,from:T,startIndex:x,endIndex:E,createText:function(oe){var le=$m.exec(oe);return F.push(le?le[1].length:0),oe.replace($m,"$2")}}),Y={type:"outdent",from:p,to:b,spaceLenList:F};a(z.setSelection(Gm(z,Y))),Pi.test(P)&&n.reorderList(x+1,E+1)}else if(t){var ee=P.slice(0,b-T),se=ee.replace(/\s{1,4}$/,""),de=b-(ee.length-se.length);a(i.tr.delete(de,b))}return!0}}},e.prototype.deleteLines=function(){var t=this;return function(n,i){var a=t.context.view,o=kr(n.selection),s=o.startFromOffset,l=o.endToOffset,f=function(){return i(n.tr.deleteRange(s,l)),!0};return Hu(f,fk)(n,i,a)}},e.prototype.moveDown=function(){return function(t,n){var i=t.doc,a=t.tr,o=t.selection,s=t.schema,l=kr(o),f=l.startFromOffset,p=l.endToOffset,b=l.endIndex;if(b<i.content.childCount-1){var T=i.child(b+1),x=T.nodeSize,E=T.textContent;return a.delete(p,p+x).split(f).insert(a.mapping.map(f)-2,Br(s,E)),n(a),!0}return!1}},e.prototype.moveUp=function(){return function(t,n){var i=t.tr,a=t.doc,o=t.selection,s=t.schema,l=kr(o),f=l.startFromOffset,p=l.endToOffset,b=l.startIndex;if(b>0){var T=a.child(b-1),x=T.nodeSize,E=T.textContent;return i.delete(f-x,f).split(i.mapping.map(p)).insert(i.mapping.map(p),Br(s,E)),n(i),!0}return!1}},e.prototype.commands=function(){return{indent:this.indent(),outdent:this.outdent()}},e.prototype.keymaps=function(){return{Tab:this.indent(!0)(),"Shift-Tab":this.outdent(!0)(),"Mod-d":this.deleteLines(),"Mod-D":this.deleteLines(),"Alt-ArrowUp":this.moveUp(),"Alt-ArrowDown":this.moveDown()}},e})(Gt),Vie=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"text"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{group:"inline"}},enumerable:!1,configurable:!0}),e})(Gt),Uie=/^#{1,6}\s/,$ie=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"heading"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{level:{default:1},seText:{default:!1}},toDOM:function(t){var n=t.attrs,i=n.level,a=n.seText,o="heading|heading"+i;return a&&(o+="|delimiter|setext"),["span",{class:wr.apply(void 0,o.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.createHeadingText=function(t,n,i){for(var a=n.replace(i,"").trim(),o="";t>0;)o+="#",t-=1;return o+" "+a},e.prototype.commands=function(){var t=this;return function(n){return function(i,a){var o=n.level,s=kr(i.selection),l=s.startFromOffset,f=s.endToOffset,p=s.startIndex,b=s.endIndex,T=bu({state:i,from:l,startIndex:p,endIndex:b,createText:function(x){var E=x.match(Uie),P=E?E[0]:"";return t.createHeadingText(o,x,P)}});return a(T.setSelection(Yt(T,T.mapping.map(f)))),!0}}},e})(Xt),Gf="```",Wie=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"codeBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:wr("code-block")},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){var i=t.selection,a=t.schema,o=t.tr,s=kr(i),l=s.startFromOffset,f=s.endToOffset,p=Br(a,Gf);return o.insert(l,p).split(l+Gf.length),o.split(o.mapping.map(f)).insert(o.mapping.map(f),p),n(o.setSelection(Yt(o,o.mapping.map(f)-(Gf.length+2)))),!0}}},e.prototype.keepIndentation=function(){var t=this;return function(n,i){var a=n.selection,o=n.tr,s=n.doc,l=n.schema,f=t.context.toastMark,p=kr(a),b=p.startFromOffset,T=p.endToOffset,x=p.endIndex,E=p.from,P=p.to,F=ca(s,x);if(E===P&&F.trim()){var z=F.match(/^\s+/),Y=f.findFirstNodeAtLine(x+1);if(pne(Y)&&z){var ee=z[0],se=F.slice(P-b),de=Br(l,ee+se);return Dh(o,T,se,de),i(o),!0}}return!1}},e.prototype.keymaps=function(){var t=this.commands()();return{"Shift-Mod-p":t,"Shift-Mod-P":t,Enter:this.keepIndentation()}},e})(Xt),jie=/\||\s/g;function Gie(r){return[Cu(r),Cu(r,!0)]}function Kie(r,e){for(var t=[],n=0;n<e;n+=1)t.push(Cu(r));return t}function Cu(r,e){for(var t="|",n=0;n<r;n+=1)t+=e?" --- |":" |";return t}function Jie(r){return r?{type:"next",parentType:"tableHead",childType:"firstChild"}:{type:"prev",parentType:"tableBody",childType:"lastChild"}}var Yie=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"table"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:wr("table")},0]}}},enumerable:!1,configurable:!0}),e.prototype.extendTable=function(){var t=this;return function(n,i){var a=n.selection,o=n.doc,s=n.tr,l=n.schema;if(!a.empty)return!1;var f=kr(a),p=f.endFromOffset,b=f.endToOffset,T=f.endIndex,x=f.to,E=ca(o,T),P=[T+1,x-p+1],F=t.context.toastMark.findNodeAtPosition(P),z=Vo(F,function(oe){return Pm(oe)&&(oe.parent.type==="tableDelimRow"||oe.parent.parent.type==="tableBody")});if(z){var Y=!E.replace(jie,"").trim(),ee=z.parent,se=ee.parent.parent.columns.length,de=Cu(se);return Y?s.deleteRange(p,b).split(s.mapping.map(b)):s.split(b).insert(s.mapping.map(b),Br(l,de)).setSelection(Yt(s,s.mapping.map(b)-2)),i(s),!0}return!1}},e.prototype.moveTableCell=function(t){var n=this;return function(i,a){var o=i.selection,s=i.tr,l=kr(o),f=l.endFromOffset,p=l.endIndex,b=l.to,T=[p+1,b-f],x=n.context.toastMark.findNodeAtPosition(T),E=Vo(x,function(le){return Pm(le)});if(E){var P=E.parent,F=Jie(t),z=F.type,Y=F.parentType,ee=F.childType,se=la(E);if(E[z])se=la(E[z])-1;else{var de=!P[z]&&P.parent.type===Y?P.parent[z][ee]:P[z];if(z==="next"){var oe=de?la(de[ee]):0;se+=oe+2}else z==="prev"&&(se=de?-4:0)}return a(s.setSelection(Yt(s,f+se))),!0}return!1}},e.prototype.addTable=function(){return function(t){return function(n,i){var a=n.selection,o=n.tr,s=n.schema,l=t,f=l.columnCount,p=l.rowCount,b=kr(a).endToOffset,T=Gie(f),x=Kie(f,p-1),E=dn(dn([],T),x);return E.forEach(function(P){o.split(o.mapping.map(b)).insert(o.mapping.map(b),Br(s,P))}),i(o.setSelection(Yt(o,b+4))),!0}}},e.prototype.commands=function(){return{addTable:this.addTable()}},e.prototype.keymaps=function(){return{Enter:this.extendTable(),Tab:this.moveTableCell(!0),"Shift-Tab":this.moveTableCell(!1)}},e})(Xt),Xie="***",Zie=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"thematicBreak"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:wr("thematic-break")},0]}}},enumerable:!1,configurable:!0}),e.prototype.hr=function(){return function(){return function(t,n){var i=t.selection,a=t.schema,o=t.tr,s=kr(i),l=s.from,f=s.to,p=s.endToOffset,b=Br(a,Xie);return o.split(l).replaceWith(o.mapping.map(l),o.mapping.map(f),b).split(o.mapping.map(f)).setSelection(Yt(o,o.mapping.map(p))),n(o),!0}}},e.prototype.commands=function(){return{hr:this.hr()}},e.prototype.keymaps=function(){var t=this.hr()();return{"Mod-l":t,"Mod-L":t}},e})(Xt);function Qie(r,e){var t=r.type,n=r.sourcepos,i=n[0][0];return e<=i&&(t==="codeBlock"||t==="heading"||t.match("table"))}var eae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"listItem"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{odd:{default:!1},even:{default:!1},listStyle:{default:!1}},toDOM:function(t){var n=t.attrs,i=n.odd,a=n.even,o=n.listStyle,s="list-item";return o&&(s+="|list-item-style"),i&&(s+="|list-item-odd"),a&&(s+="|list-item-even"),["span",{class:wr.apply(void 0,s.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.extendList=function(){var t=this;return function(n,i){var a=n.selection,o=n.doc,s=n.schema,l=n.tr,f=t.context.toastMark,p=kr(a),b=p.to,T=p.startFromOffset,x=p.endFromOffset,E=p.endIndex,P=p.endToOffset,F=ca(o,E),z=Qa.test(F);if(!z||a.from===T||!a.empty)return!1;var Y=!F.replace(wu,"").trim();if(Y)l.deleteRange(x,P).split(l.mapping.map(P));else{var ee=_h(F),se=f.findFirstNodeAtLine(E+1),de=F.slice(b-x),oe={toastMark:f,mdNode:se,doc:o,line:E+1},le=_ie[ee](oe),ge=le.listSyntax,xe=le.changedResults;if(xe!=null&&xe.length){l.split(b),xe.unshift({text:ge+de,line:E+1}),t.changeToListPerLine(l,xe,{from:b,startLine:xe[0].line,endLine:Ur(xe).line});var Ie=l.mapping.map(P)-de.length;l.setSelection(Yt(l,Ie))}else{var ot=Br(s,ge+de);Dh(l,P,de,ot)}}return i(l),!0}},e.prototype.toList=function(t){var n=this;return function(){return function(i,a){for(var o=i.doc,s=i.tr,l=i.selection,f=n.context.toastMark,p=kr(l),b=p.startIndex+1,T=p.endIndex+1,x=p.endToOffset,E=[],P=b;P<=T;P+=1){var F=f.findFirstNodeAtLine(P);if(F&&Qie(F,P))break;if(E.indexOf(P)===-1){var z={toastMark:f,mdNode:F,doc:o,line:P,startLine:b},Y=(Ya(F)?qie[t](z):Hie[t](z)).changedResults,ee=n.changeToListPerLine(s,Y,{from:ku(o,Y[0].line-1).startOffset,startLine:Y[0].line,endLine:Ur(Y).line,indexDiff:1});x=Math.max(ee,x),Y&&(E=E.concat(Y.map(function(se){return se.line})))}}return a(s.setSelection(Yt(s,s.mapping.map(x)))),!0}}},e.prototype.changeToListPerLine=function(t,n,i){for(var a=i.from,o=i.startLine,s=i.endLine,l=i.indexDiff,f=l===void 0?0:l,p=0,b=function(E){var P=t.doc.child(E),F=P.nodeSize,z=P.content,Y=t.mapping.map(a),ee=Y+z.size,se=n.filter(function(de){return de.line-f===E})[0];se&&(t.replaceWith(Y,ee,Br(T.context.schema,se.text)),p=Math.max(p,a+z.size)),a+=F},T=this,x=o-f;x<=s-f;x+=1)b(x);return p},e.prototype.toggleTask=function(){var t=this;return function(n,i){for(var a=n.selection,o=n.tr,s=n.doc,l=n.schema,f=t.context.toastMark,p=kr(a),b=p.startIndex,T=p.endIndex,x=null,E=b;E<=T;E+=1){var P=f.findFirstNodeAtLine(E+1);if(Ya(P)&&P.listData.task){var F=P.listData,z=F.checked,Y=F.padding,ee=z?" ":"x",se=P.sourcepos[0],de=ku(s,se[0]-1).startOffset;de+=se[1]+Y,x=o.replaceWith(de,de+1,l.text(ee))}}return x?(i(x),!0):!1}},e.prototype.commands=function(){return{bulletList:this.toList("bullet"),orderedList:this.toList("ordered"),taskList:this.toList("task")}},e.prototype.keymaps=function(){var t=this.toList("bullet")(),n=this.toList("ordered")(),i=this.toList("task")(),a=this.toggleTask();return{"Mod-u":t,"Mod-U":t,"Mod-o":n,"Mod-O":n,"alt-t":i,"alt-T":i,"Shift-Ctrl-x":a,"Shift-Ctrl-X":a,Enter:this.extendList()}},e})(Xt);function ju(r,e){return function(){return function(t,n){var i=t.tr,a=t.selection,o=Hn(r)?r:function(ee){return r.test(ee)},s=e.length,l=i.doc,f=Wk(a),p=f[0],b=f[1],T=Math.max(p-s,1),x=Math.min(b+s,l.content.size-1),E=a.content(),P=E.content.textBetween(0,E.content.size,`
|
|
29
|
-
`),F=l.textBetween(T,p,`
|
|
30
|
-
`),z=l.textBetween(b,x,`
|
|
31
|
-
`);if(P=""+F+P+z,F&&z&&o(P))i.delete(x-s,x).delete(T,T+s);else{i.insertText(e,b).insertText(e,p);var Y=a.empty?Yt(i,p+s):Yt(i,p+s,b+s);i.setSelection(Y)}return n(i),!0}}}var tae=/^(\*{2}|_{2}).*([\s\S]*)\1$/m,rae="**",nae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strong"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:wr("strong")},0]}}},enumerable:!1,configurable:!0}),e.prototype.bold=function(){return ju(tae,rae)},e.prototype.commands=function(){return{bold:this.bold()}},e.prototype.keymaps=function(){var t=this.bold()();return{"Mod-b":t,"Mod-B":t}},e})(Xt),iae=/^(~{2}).*([\s\S]*)\1$/m,aae="~~",oae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strike"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:wr("strike")},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return ju(iae,aae)},e.prototype.keymaps=function(){var t=this.commands()();return{"Mod-s":t,"Mod-S":t}},e})(Xt),sae=/^(\*|_).*([\s\S]*)\1$/m,lae="*",uae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"emph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:wr("emph")},0]}}},enumerable:!1,configurable:!0}),e.prototype.italic=function(){return ju(sae,lae)},e.prototype.commands=function(){return{italic:this.italic()}},e.prototype.keymaps=function(){var t=this.italic()();return{"Mod-i":t,"Mod-I":t}},e})(Xt),cae=/^(`).*([\s\S]*)\1$/m,fae="`",dae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"code"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{start:{default:!1},end:{default:!1},marked:{default:!1}},toDOM:function(t){var n=t.attrs,i=n.start,a=n.end,o=n.marked,s="code";return i&&(s+="|delimiter|start"),a&&(s+="|delimiter|end"),o&&(s+="|marked-text"),["span",{class:wr.apply(void 0,s.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return ju(cae,fae)},e.prototype.keymaps=function(){var t=this.commands()();return{"Shift-Mod-c":t,"Shift-Mod-C":t}},e})(Xt),hae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"link"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{url:{default:!1},desc:{default:!1}},toDOM:function(t){var n=t.attrs,i=n.url,a=n.desc,o="link";return i&&(o+="|link-url|marked-text"),a&&(o+="|link-desc|marked-text"),["span",{class:wr.apply(void 0,o.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.addLinkOrImage=function(t){return function(n){return function(i,a){var o=i.selection,s=i.tr,l=i.schema,f=Wk(o),p=f[0],b=f[1],T=n,x=T.linkText,E=T.altText,P=T.linkUrl,F=T.imageUrl,z=x,Y=P,ee="";return t==="image"&&(z=E,Y=F,ee="!"),z=mu(z),ee+="["+z+"]("+Y+")",a(s.replaceWith(p,b,Br(l,ee))),!0}}},e.prototype.commands=function(){return{addImage:this.addLinkOrImage("image"),addLink:this.addLinkOrImage("link")}},e})(Xt),pae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"taskDelimiter"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:wr("delimiter","list-item")},0]}}},enumerable:!1,configurable:!0}),e})(Xt),vae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"delimiter"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:wr("delimiter")},0]}}},enumerable:!1,configurable:!0}),e})(Xt),mae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"meta"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:wr("meta")},0]}}},enumerable:!1,configurable:!0}),e})(Xt),gae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"markedText"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:wr("marked-text")},0]}}},enumerable:!1,configurable:!0}),e})(Xt),yae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableCell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:wr("table-cell")},0]}}},enumerable:!1,configurable:!0}),e})(Xt),bae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"html"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:wr("html")},0]}}},enumerable:!1,configurable:!0}),e})(Xt),Kf="$$",kae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"customBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:wr("custom-block")},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(t){return function(n,i){var a=n.selection,o=n.schema,s=n.tr,l=kr(a),f=l.startFromOffset,p=l.endToOffset;if(!(t!=null&&t.info))return!1;var b=""+Kf+t.info,T=Br(o,b),x=Br(o,Kf);return s.insert(f,T).split(f+b.length),s.split(s.mapping.map(p)).insert(s.mapping.map(p),x),i(s.setSelection(Yt(s,s.mapping.map(p)-(Kf.length+2)))),!0}}},e})(Xt),wae=/x|backspace/i,Cae=/^\[(\s*)(x?)(\s*)\](?:\s+)/i;function Tae(r){var e=r.schema,t=r.toastMark;return new hn({props:{handleDOMEvents:{keyup:function(n,i){var a,o=n.state,s=o.doc,l=o.tr,f=o.selection;if(f.empty&&wae.test(i.key)){var p=kr(f),b=p.startIndex,T=p.startFromOffset,x=p.from,E=[b+1,x-T+1],P=t.findNodeAtPosition(E),F=Vo(P,function(ot){var Fe;return ot.type==="paragraph"&&((Fe=ot.parent)===null||Fe===void 0?void 0:Fe.type)==="item"});if(!((a=F==null?void 0:F.firstChild)===null||a===void 0)&&a.literal){var z=F.firstChild,Y=z.literal.match(Cae);if(Y){var ee=z.sourcepos[0],se=Y[1],de=Y[2],oe=Y[3],le=se.length+oe.length,ge=ku(s,ee[0]-1).startOffset,xe=ee[1]+ge;if(de){var Ie=le?le+1:0;l.replaceWith(xe,Ie+xe,e.text(de)),n.dispatch(l)}else le||(l.insertText(" ",xe),n.dispatch(l))}}}return!1}}}})}var Jf="cut",Km=/\r\n|\n|\r/,Sae=(function(r){Ge(e,r);function e(t,n){var i=r.call(this,t)||this,a=n.toastMark,o=n.useCommandShortcut,s=o===void 0?!0:o,l=n.mdPlugins,f=l===void 0?[]:l;return i.editorType="markdown",i.el.classList.add("md-mode"),i.toastMark=a,i.extraPlugins=f,i.specs=i.createSpecs(),i.schema=i.createSchema(),i.context=i.createContext(),i.keymaps=i.createKeymaps(s),i.view=i.createView(),i.commands=i.createCommands(),i.specs.setContext(we(we({},i.context),{view:i.view})),i.createClipboard(),i.eventEmitter.listen("changePreviewTabWrite",function(p){return i.toggleActive(!0,p)}),i.eventEmitter.listen("changePreviewTabPreview",function(){return i.toggleActive(!1)}),i.initEvent(),i}return e.prototype.toggleActive=function(t,n){Rh(this.el,"active",t),t?n||this.focus():this.blur()},e.prototype.createClipboard=function(){var t=this;this.clipboard=document.createElement("textarea"),this.clipboard.className=Je("pseudo-clipboard"),this.clipboard.addEventListener("paste",function(n){var i=n.clipboardData||window.clipboardData,a=i&&i.items;if(a){var o=hi(a).some(function(l){return l.kind==="string"&&l.type==="text/rtf"});if(!o){var s=_k(a);s&&(n.preventDefault(),Fh(t.eventEmitter,s,n.type))}}}),this.clipboard.addEventListener("input",function(n){var i=n.target.value;t.replaceSelection(i),n.preventDefault(),n.target.value=""}),this.el.insertBefore(this.clipboard,this.view.dom)},e.prototype.createContext=function(){return{toastMark:this.toastMark,schema:this.schema,eventEmitter:this.eventEmitter}},e.prototype.createSpecs=function(){return new $k([new Nie,new zie,new Vk,new Vie,new $ie,new Die,new Wie,new kae,new Yie,new yae,new Zie,new eae,new nae,new oae,new uae,new dae,new hae,new vae,new pae,new gae,new mae,new bae])},e.prototype.createPlugins=function(){return dn([yie(this.context),Oie(this.context),Tae(this.context)],this.createPluginProps()).concat(this.defaultPlugins)},e.prototype.createView=function(){var t=this;return new qu(this.el,{state:this.createState(),dispatchTransaction:function(n){t.updateMarkdown(n);var i=t.view.state.applyTransaction(n).state;t.view.updateState(i),t.emitChangeEvent(n)},handleKeyDown:function(n,i){return(i.metaKey||i.ctrlKey)&&i.key.toUpperCase()==="V"&&t.clipboard.focus(),t.eventEmitter.emit("keydown",t.editorType,i),!1},handleDOMEvents:{copy:function(n,i){return t.captureCopy(i)},cut:function(n,i){return t.captureCopy(i,Jf)},scroll:function(){return t.eventEmitter.emit("scroll","editor"),!0},keyup:function(n,i){return t.eventEmitter.emit("keyup",t.editorType,i),!1}},nodeViews:{widget:zk}})},e.prototype.createCommands=function(){return this.specs.commands(this.view)},e.prototype.captureCopy=function(t,n){t.preventDefault();var i=this.view.state,a=i.selection,o=i.tr;if(a.empty)return!0;var s=this.getChanged(a.content());return t.clipboardData?t.clipboardData.setData("text/plain",s):window.clipboardData.setData("Text",s),n===Jf&&this.view.dispatch(o.deleteSelection().scrollIntoView().setMeta("uiEvent",Jf)),!0},e.prototype.updateMarkdown=function(t){var n=this;t.docChanged&&t.steps.forEach(function(i,a){if(i.slice&&!(i instanceof xr)){var o=t.docs[a],s=[i.from,i.to],l=s[0],f=s[1],p=Yl(o,l,f),b=p[0],T=p[1],x=n.getChanged(i.slice);b[0]===T[0]&&b[1]===T[1]&&x===""&&(x=`
|
|
32
|
-
`);var E=n.toastMark.editMarkdown(b,T,x);n.eventEmitter.emit("updatePreview",E),t.setMeta("editResult",E).scrollIntoView()}})},e.prototype.getChanged=function(t){var n="",i=0,a=t.content.size;return t.content.nodesBetween(i,a,function(o,s){o.isText?n+=o.text.slice(Math.max(i,s)-s,a-s):o.isBlock&&s>0&&(n+=`
|
|
33
|
-
`)}),n},e.prototype.setSelection=function(t,n){n===void 0&&(n=t);var i=this.view.state.tr,a=Ia(i.doc,t,n),o=a[0],s=a[1];this.view.dispatch(i.setSelection(Yt(i,o,s)).scrollIntoView())},e.prototype.replaceSelection=function(t,n,i){var a,o=this.view.state,s=o.tr,l=o.schema,f=o.doc,p=t.split(Km),b=p.map(function(F){return yu(l,Ua(F,l))}),T=new $e(De.from(b),1,1);if(this.focus(),n&&i){var x=Ia(f,n,i),E=x[0],P=x[1];a=s.replaceRange(E,P,T)}else a=s.replaceSelection(T);this.view.dispatch(a.scrollIntoView())},e.prototype.deleteSelection=function(t,n){var i,a=this.view.state,o=a.tr,s=a.doc;if(t&&n){var l=Ia(s,t,n),f=l[0],p=l[1];i=o.deleteRange(f,p)}else i=o.deleteSelection();this.view.dispatch(i.scrollIntoView())},e.prototype.getSelectedText=function(t,n){var i=this.view.state,a=i.doc,o=i.selection,s=o.from,l=o.to;if(t&&n){var f=Ia(a,t,n);s=f[0],l=f[1]}return a.textBetween(s,l,`
|
|
34
|
-
`)},e.prototype.getSelection=function(){var t=this.view.state.selection,n=t.from,i=t.to;return Yl(this.view.state.tr.doc,n,i)},e.prototype.setMarkdown=function(t,n){n===void 0&&(n=!0);var i=t.split(Km),a=this.view.state,o=a.tr,s=a.doc,l=a.schema,f=i.map(function(p){return yu(l,Ua(p,l))});this.view.dispatch(o.replaceWith(0,s.content.size,f)),n&&this.moveCursorToEnd(!0)},e.prototype.addWidget=function(t,n,i){var a=this.view.state,o=a.tr,s=a.doc,l=a.selection,f=i?Ia(s,i,i)[0]:l.to;this.view.dispatch(o.setMeta("widget",{pos:f,node:t,style:n}))},e.prototype.replaceWithWidget=function(t,n,i){var a=this.view.state,o=a.tr,s=a.schema,l=a.doc,f=Ia(l,t,n),p=Ua(i,s);this.view.dispatch(o.replaceWith(f[0],f[1],p))},e.prototype.getRangeInfoOfNode=function(t){var n=this.view.state,i=n.doc,a=n.selection,o=t||Yl(i,a.from)[0],s=this.toastMark.findNodeAtPosition(o);return s.type==="text"&&s.parent.type!=="paragraph"&&(s=s.parent),s.sourcepos[1][1]+=1,{range:s.sourcepos,type:s.type}},e.prototype.getMarkdown=function(){return this.toastMark.getLineTexts().map(function(t){return Uu(t)}).join(`
|
|
35
|
-
`)},e.prototype.getToastMark=function(){return this.toastMark},e})(Uk),Jm="_feEventKey";function xae(r,e){var t=r[Jm],n;return t||(t=r[Jm]={}),n=t[e],n||(n=t[e]=[]),n}var Zk=xae,Eae=qi,Tu=_u,Mae=Zk;function Aae(r,e,t){if(Eae(e)){Tu(e.split(/\s+/g),function(n){Ym(r,n,t)});return}Tu(e,function(n,i){Ym(r,i,n)})}function Ym(r,e,t){var n=Mae(r,e),i;t?(Tu(n,function(a,o){return t===a.handler?(Xm(r,e,a.wrappedHandler),i=o,!1):!0}),n.splice(i,1)):(Tu(n,function(a){Xm(r,e,a.wrappedHandler)}),n.splice(0,n.length))}function Xm(r,e,t){"removeEventListener"in r?r.removeEventListener(e,t):"detachEvent"in r&&r.detachEvent("on"+e,t)}var Qk=Aae,Oae=qi,Fd=_u,Nae=Zk;function Dae(r,e,t,n){if(Oae(e)){Fd(e.split(/\s+/g),function(i){Zm(r,i,t,n)});return}Fd(e,function(i,a){Zm(r,a,i,t)})}function Zm(r,e,t,n){function i(a){t.call(n||r,a||window.event)}"addEventListener"in r?r.addEventListener(e,i):"attachEvent"in r&&r.attachEvent("on"+e,i),Lae(r,e,t,i)}function Lae(r,e,t,n){var i=Nae(r,e),a=!1;Fd(i,function(o){return o.handler===t?(a=!0,!1):!0}),a||i.push({handler:t,wrappedHandler:n})}var ew=Dae;/*! *****************************************************************************
|
|
36
|
-
Copyright (c) Microsoft Corporation.
|
|
37
|
-
|
|
38
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
39
|
-
purpose with or without fee is hereby granted.
|
|
40
|
-
|
|
41
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
42
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
43
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
44
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
45
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
46
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
47
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
48
|
-
***************************************************************************** */var qd=function(r,e){return qd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},qd(r,e)};function _n(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");qd(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Rr=function(){return Rr=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Rr.apply(this,arguments)};function Hd(r,e,t){if(arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))}var Wo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Qm={};function Rae(r){var e,t,n=Qm[r];if(n)return n;for(n=Qm[r]=[],e=0;e<128;e++)t=String.fromCharCode(e),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e<r.length;e++)n[r.charCodeAt(e)]=r[e];return n}function Gu(r,e,t){var n,i,a,o,s,l="";for(typeof e!="string"&&(t=e,e=Gu.defaultChars),typeof t>"u"&&(t=!0),s=Rae(e),n=0,i=r.length;n<i;n++){if(a=r.charCodeAt(n),t&&a===37&&n+2<i&&/^[0-9a-f]{2}$/i.test(r.slice(n+1,n+3))){l+=r.slice(n,n+3),n+=2;continue}if(a<128){l+=s[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&n+1<i&&(o=r.charCodeAt(n+1),o>=56320&&o<=57343)){l+=encodeURIComponent(r[n]+r[n+1]),n++;continue}l+="%EF%BF%BD";continue}l+=encodeURIComponent(r[n])}return l}Gu.defaultChars=";/?:@&=+$,-_.!~*'()#";Gu.componentChars="-_.!~*'()";var Iae=Gu,Vh={},Bi={},Pae="Á",Bae="á",Fae="Ă",qae="ă",Hae="∾",_ae="∿",zae="∾̳",Vae="Â",Uae="â",$ae="´",Wae="А",jae="а",Gae="Æ",Kae="æ",Jae="",Yae="𝔄",Xae="𝔞",Zae="À",Qae="à",eoe="ℵ",toe="ℵ",roe="Α",noe="α",ioe="Ā",aoe="ā",ooe="⨿",soe="&",loe="&",uoe="⩕",coe="⩓",foe="∧",doe="⩜",hoe="⩘",poe="⩚",voe="∠",moe="⦤",goe="∠",yoe="⦨",boe="⦩",koe="⦪",woe="⦫",Coe="⦬",Toe="⦭",Soe="⦮",xoe="⦯",Eoe="∡",Moe="∟",Aoe="⊾",Ooe="⦝",Noe="∢",Doe="Å",Loe="⍼",Roe="Ą",Ioe="ą",Poe="𝔸",Boe="𝕒",Foe="⩯",qoe="≈",Hoe="⩰",_oe="≊",zoe="≋",Voe="'",Uoe="",$oe="≈",Woe="≊",joe="Å",Goe="å",Koe="𝒜",Joe="𝒶",Yoe="≔",Xoe="*",Zoe="≈",Qoe="≍",ese="Ã",tse="ã",rse="Ä",nse="ä",ise="∳",ase="⨑",ose="≌",sse="϶",lse="‵",use="∽",cse="⋍",fse="∖",dse="⫧",hse="⊽",pse="⌅",vse="⌆",mse="⌅",gse="⎵",yse="⎶",bse="≌",kse="Б",wse="б",Cse="„",Tse="∵",Sse="∵",xse="∵",Ese="⦰",Mse="϶",Ase="ℬ",Ose="ℬ",Nse="Β",Dse="β",Lse="ℶ",Rse="≬",Ise="𝔅",Pse="𝔟",Bse="⋂",Fse="◯",qse="⋃",Hse="⨀",_se="⨁",zse="⨂",Vse="⨆",Use="★",$se="▽",Wse="△",jse="⨄",Gse="⋁",Kse="⋀",Jse="⤍",Yse="⧫",Xse="▪",Zse="▴",Qse="▾",ele="◂",tle="▸",rle="␣",nle="▒",ile="░",ale="▓",ole="█",sle="=⃥",lle="≡⃥",ule="⫭",cle="⌐",fle="𝔹",dle="𝕓",hle="⊥",ple="⊥",vle="⋈",mle="⧉",gle="┐",yle="╕",ble="╖",kle="╗",wle="┌",Cle="╒",Tle="╓",Sle="╔",xle="─",Ele="═",Mle="┬",Ale="╤",Ole="╥",Nle="╦",Dle="┴",Lle="╧",Rle="╨",Ile="╩",Ple="⊟",Ble="⊞",Fle="⊠",qle="┘",Hle="╛",_le="╜",zle="╝",Vle="└",Ule="╘",$le="╙",Wle="╚",jle="│",Gle="║",Kle="┼",Jle="╪",Yle="╫",Xle="╬",Zle="┤",Qle="╡",eue="╢",tue="╣",rue="├",nue="╞",iue="╟",aue="╠",oue="‵",sue="˘",lue="˘",uue="¦",cue="𝒷",fue="ℬ",due="⁏",hue="∽",pue="⋍",vue="⧅",mue="\\",gue="⟈",yue="•",bue="•",kue="≎",wue="⪮",Cue="≏",Tue="≎",Sue="≏",xue="Ć",Eue="ć",Mue="⩄",Aue="⩉",Oue="⩋",Nue="∩",Due="⋒",Lue="⩇",Rue="⩀",Iue="ⅅ",Pue="∩︀",Bue="⁁",Fue="ˇ",que="ℭ",Hue="⩍",_ue="Č",zue="č",Vue="Ç",Uue="ç",$ue="Ĉ",Wue="ĉ",jue="∰",Gue="⩌",Kue="⩐",Jue="Ċ",Yue="ċ",Xue="¸",Zue="¸",Que="⦲",ece="¢",tce="·",rce="·",nce="𝔠",ice="ℭ",ace="Ч",oce="ч",sce="✓",lce="✓",uce="Χ",cce="χ",fce="ˆ",dce="≗",hce="↺",pce="↻",vce="⊛",mce="⊚",gce="⊝",yce="⊙",bce="®",kce="Ⓢ",wce="⊖",Cce="⊕",Tce="⊗",Sce="○",xce="⧃",Ece="≗",Mce="⨐",Ace="⫯",Oce="⧂",Nce="∲",Dce="”",Lce="’",Rce="♣",Ice="♣",Pce=":",Bce="∷",Fce="⩴",qce="≔",Hce="≔",_ce=",",zce="@",Vce="∁",Uce="∘",$ce="∁",Wce="ℂ",jce="≅",Gce="⩭",Kce="≡",Jce="∮",Yce="∯",Xce="∮",Zce="𝕔",Qce="ℂ",efe="∐",tfe="∐",rfe="©",nfe="©",ife="℗",afe="∳",ofe="↵",sfe="✗",lfe="⨯",ufe="𝒞",cfe="𝒸",ffe="⫏",dfe="⫑",hfe="⫐",pfe="⫒",vfe="⋯",mfe="⤸",gfe="⤵",yfe="⋞",bfe="⋟",kfe="↶",wfe="⤽",Cfe="⩈",Tfe="⩆",Sfe="≍",xfe="∪",Efe="⋓",Mfe="⩊",Afe="⊍",Ofe="⩅",Nfe="∪︀",Dfe="↷",Lfe="⤼",Rfe="⋞",Ife="⋟",Pfe="⋎",Bfe="⋏",Ffe="¤",qfe="↶",Hfe="↷",_fe="⋎",zfe="⋏",Vfe="∲",Ufe="∱",$fe="⌭",Wfe="†",jfe="‡",Gfe="ℸ",Kfe="↓",Jfe="↡",Yfe="⇓",Xfe="‐",Zfe="⫤",Qfe="⊣",ede="⤏",tde="˝",rde="Ď",nde="ď",ide="Д",ade="д",ode="‡",sde="⇊",lde="ⅅ",ude="ⅆ",cde="⤑",fde="⩷",dde="°",hde="∇",pde="Δ",vde="δ",mde="⦱",gde="⥿",yde="𝔇",bde="𝔡",kde="⥥",wde="⇃",Cde="⇂",Tde="´",Sde="˙",xde="˝",Ede="`",Mde="˜",Ade="⋄",Ode="⋄",Nde="⋄",Dde="♦",Lde="♦",Rde="¨",Ide="ⅆ",Pde="ϝ",Bde="⋲",Fde="÷",qde="÷",Hde="⋇",_de="⋇",zde="Ђ",Vde="ђ",Ude="⌞",$de="⌍",Wde="$",jde="𝔻",Gde="𝕕",Kde="¨",Jde="˙",Yde="⃜",Xde="≐",Zde="≑",Qde="≐",ehe="∸",the="∔",rhe="⊡",nhe="⌆",ihe="∯",ahe="¨",ohe="⇓",she="⇐",lhe="⇔",uhe="⫤",che="⟸",fhe="⟺",dhe="⟹",hhe="⇒",phe="⊨",vhe="⇑",mhe="⇕",ghe="∥",yhe="⤓",bhe="↓",khe="↓",whe="⇓",Che="⇵",The="̑",She="⇊",xhe="⇃",Ehe="⇂",Mhe="⥐",Ahe="⥞",Ohe="⥖",Nhe="↽",Dhe="⥟",Lhe="⥗",Rhe="⇁",Ihe="↧",Phe="⊤",Bhe="⤐",Fhe="⌟",qhe="⌌",Hhe="𝒟",_he="𝒹",zhe="Ѕ",Vhe="ѕ",Uhe="⧶",$he="Đ",Whe="đ",jhe="⋱",Ghe="▿",Khe="▾",Jhe="⇵",Yhe="⥯",Xhe="⦦",Zhe="Џ",Qhe="џ",epe="⟿",tpe="É",rpe="é",npe="⩮",ipe="Ě",ape="ě",ope="Ê",spe="ê",lpe="≖",upe="≕",cpe="Э",fpe="э",dpe="⩷",hpe="Ė",ppe="ė",vpe="≑",mpe="ⅇ",gpe="≒",ype="𝔈",bpe="𝔢",kpe="⪚",wpe="È",Cpe="è",Tpe="⪖",Spe="⪘",xpe="⪙",Epe="∈",Mpe="⏧",Ape="ℓ",Ope="⪕",Npe="⪗",Dpe="Ē",Lpe="ē",Rpe="∅",Ipe="∅",Ppe="◻",Bpe="∅",Fpe="▫",qpe=" ",Hpe=" ",_pe=" ",zpe="Ŋ",Vpe="ŋ",Upe=" ",$pe="Ę",Wpe="ę",jpe="𝔼",Gpe="𝕖",Kpe="⋕",Jpe="⧣",Ype="⩱",Xpe="ε",Zpe="Ε",Qpe="ε",eve="ϵ",tve="≖",rve="≕",nve="≂",ive="⪖",ave="⪕",ove="⩵",sve="=",lve="≂",uve="≟",cve="⇌",fve="≡",dve="⩸",hve="⧥",pve="⥱",vve="≓",mve="ℯ",gve="ℰ",yve="≐",bve="⩳",kve="≂",wve="Η",Cve="η",Tve="Ð",Sve="ð",xve="Ë",Eve="ë",Mve="€",Ave="!",Ove="∃",Nve="∃",Dve="ℰ",Lve="ⅇ",Rve="ⅇ",Ive="≒",Pve="Ф",Bve="ф",Fve="♀",qve="ffi",Hve="ff",_ve="ffl",zve="𝔉",Vve="𝔣",Uve="fi",$ve="◼",Wve="▪",jve="fj",Gve="♭",Kve="fl",Jve="▱",Yve="ƒ",Xve="𝔽",Zve="𝕗",Qve="∀",eme="∀",tme="⋔",rme="⫙",nme="ℱ",ime="⨍",ame="½",ome="⅓",sme="¼",lme="⅕",ume="⅙",cme="⅛",fme="⅔",dme="⅖",hme="¾",pme="⅗",vme="⅜",mme="⅘",gme="⅚",yme="⅝",bme="⅞",kme="⁄",wme="⌢",Cme="𝒻",Tme="ℱ",Sme="ǵ",xme="Γ",Eme="γ",Mme="Ϝ",Ame="ϝ",Ome="⪆",Nme="Ğ",Dme="ğ",Lme="Ģ",Rme="Ĝ",Ime="ĝ",Pme="Г",Bme="г",Fme="Ġ",qme="ġ",Hme="≥",_me="≧",zme="⪌",Vme="⋛",Ume="≥",$me="≧",Wme="⩾",jme="⪩",Gme="⩾",Kme="⪀",Jme="⪂",Yme="⪄",Xme="⋛︀",Zme="⪔",Qme="𝔊",ege="𝔤",tge="≫",rge="⋙",nge="⋙",ige="ℷ",age="Ѓ",oge="ѓ",sge="⪥",lge="≷",uge="⪒",cge="⪤",fge="⪊",dge="⪊",hge="⪈",pge="≩",vge="⪈",mge="≩",gge="⋧",yge="𝔾",bge="𝕘",kge="`",wge="≥",Cge="⋛",Tge="≧",Sge="⪢",xge="≷",Ege="⩾",Mge="≳",Age="𝒢",Oge="ℊ",Nge="≳",Dge="⪎",Lge="⪐",Rge="⪧",Ige="⩺",Pge=">",Bge=">",Fge="≫",qge="⋗",Hge="⦕",_ge="⩼",zge="⪆",Vge="⥸",Uge="⋗",$ge="⋛",Wge="⪌",jge="≷",Gge="≳",Kge="≩︀",Jge="≩︀",Yge="ˇ",Xge=" ",Zge="½",Qge="ℋ",eye="Ъ",tye="ъ",rye="⥈",nye="↔",iye="⇔",aye="↭",oye="^",sye="ℏ",lye="Ĥ",uye="ĥ",cye="♥",fye="♥",dye="…",hye="⊹",pye="𝔥",vye="ℌ",mye="ℋ",gye="⤥",yye="⤦",bye="⇿",kye="∻",wye="↩",Cye="↪",Tye="𝕙",Sye="ℍ",xye="―",Eye="─",Mye="𝒽",Aye="ℋ",Oye="ℏ",Nye="Ħ",Dye="ħ",Lye="≎",Rye="≏",Iye="⁃",Pye="‐",Bye="Í",Fye="í",qye="",Hye="Î",_ye="î",zye="И",Vye="и",Uye="İ",$ye="Е",Wye="е",jye="¡",Gye="⇔",Kye="𝔦",Jye="ℑ",Yye="Ì",Xye="ì",Zye="ⅈ",Qye="⨌",ebe="∭",tbe="⧜",rbe="℩",nbe="IJ",ibe="ij",abe="Ī",obe="ī",sbe="ℑ",lbe="ⅈ",ube="ℐ",cbe="ℑ",fbe="ı",dbe="ℑ",hbe="⊷",pbe="Ƶ",vbe="⇒",mbe="℅",gbe="∞",ybe="⧝",bbe="ı",kbe="⊺",wbe="∫",Cbe="∬",Tbe="ℤ",Sbe="∫",xbe="⊺",Ebe="⋂",Mbe="⨗",Abe="⨼",Obe="",Nbe="",Dbe="Ё",Lbe="ё",Rbe="Į",Ibe="į",Pbe="𝕀",Bbe="𝕚",Fbe="Ι",qbe="ι",Hbe="⨼",_be="¿",zbe="𝒾",Vbe="ℐ",Ube="∈",$be="⋵",Wbe="⋹",jbe="⋴",Gbe="⋳",Kbe="∈",Jbe="",Ybe="Ĩ",Xbe="ĩ",Zbe="І",Qbe="і",eke="Ï",tke="ï",rke="Ĵ",nke="ĵ",ike="Й",ake="й",oke="𝔍",ske="𝔧",lke="ȷ",uke="𝕁",cke="𝕛",fke="𝒥",dke="𝒿",hke="Ј",pke="ј",vke="Є",mke="є",gke="Κ",yke="κ",bke="ϰ",kke="Ķ",wke="ķ",Cke="К",Tke="к",Ske="𝔎",xke="𝔨",Eke="ĸ",Mke="Х",Ake="х",Oke="Ќ",Nke="ќ",Dke="𝕂",Lke="𝕜",Rke="𝒦",Ike="𝓀",Pke="⇚",Bke="Ĺ",Fke="ĺ",qke="⦴",Hke="ℒ",_ke="Λ",zke="λ",Vke="⟨",Uke="⟪",$ke="⦑",Wke="⟨",jke="⪅",Gke="ℒ",Kke="«",Jke="⇤",Yke="⤟",Xke="←",Zke="↞",Qke="⇐",ewe="⤝",twe="↩",rwe="↫",nwe="⤹",iwe="⥳",awe="↢",owe="⤙",swe="⤛",lwe="⪫",uwe="⪭",cwe="⪭︀",fwe="⤌",dwe="⤎",hwe="❲",pwe="{",vwe="[",mwe="⦋",gwe="⦏",ywe="⦍",bwe="Ľ",kwe="ľ",wwe="Ļ",Cwe="ļ",Twe="⌈",Swe="{",xwe="Л",Ewe="л",Mwe="⤶",Awe="“",Owe="„",Nwe="⥧",Dwe="⥋",Lwe="↲",Rwe="≤",Iwe="≦",Pwe="⟨",Bwe="⇤",Fwe="←",qwe="←",Hwe="⇐",_we="⇆",zwe="↢",Vwe="⌈",Uwe="⟦",$we="⥡",Wwe="⥙",jwe="⇃",Gwe="⌊",Kwe="↽",Jwe="↼",Ywe="⇇",Xwe="↔",Zwe="↔",Qwe="⇔",e0e="⇆",t0e="⇋",r0e="↭",n0e="⥎",i0e="↤",a0e="⊣",o0e="⥚",s0e="⋋",l0e="⧏",u0e="⊲",c0e="⊴",f0e="⥑",d0e="⥠",h0e="⥘",p0e="↿",v0e="⥒",m0e="↼",g0e="⪋",y0e="⋚",b0e="≤",k0e="≦",w0e="⩽",C0e="⪨",T0e="⩽",S0e="⩿",x0e="⪁",E0e="⪃",M0e="⋚︀",A0e="⪓",O0e="⪅",N0e="⋖",D0e="⋚",L0e="⪋",R0e="⋚",I0e="≦",P0e="≶",B0e="≶",F0e="⪡",q0e="≲",H0e="⩽",_0e="≲",z0e="⥼",V0e="⌊",U0e="𝔏",$0e="𝔩",W0e="≶",j0e="⪑",G0e="⥢",K0e="↽",J0e="↼",Y0e="⥪",X0e="▄",Z0e="Љ",Q0e="љ",eCe="⇇",tCe="≪",rCe="⋘",nCe="⌞",iCe="⇚",aCe="⥫",oCe="◺",sCe="Ŀ",lCe="ŀ",uCe="⎰",cCe="⎰",fCe="⪉",dCe="⪉",hCe="⪇",pCe="≨",vCe="⪇",mCe="≨",gCe="⋦",yCe="⟬",bCe="⇽",kCe="⟦",wCe="⟵",CCe="⟵",TCe="⟸",SCe="⟷",xCe="⟷",ECe="⟺",MCe="⟼",ACe="⟶",OCe="⟶",NCe="⟹",DCe="↫",LCe="↬",RCe="⦅",ICe="𝕃",PCe="𝕝",BCe="⨭",FCe="⨴",qCe="∗",HCe="_",_Ce="↙",zCe="↘",VCe="◊",UCe="◊",$Ce="⧫",WCe="(",jCe="⦓",GCe="⇆",KCe="⌟",JCe="⇋",YCe="⥭",XCe="",ZCe="⊿",QCe="‹",eTe="𝓁",tTe="ℒ",rTe="↰",nTe="↰",iTe="≲",aTe="⪍",oTe="⪏",sTe="[",lTe="‘",uTe="‚",cTe="Ł",fTe="ł",dTe="⪦",hTe="⩹",pTe="<",vTe="<",mTe="≪",gTe="⋖",yTe="⋋",bTe="⋉",kTe="⥶",wTe="⩻",CTe="◃",TTe="⊴",STe="◂",xTe="⦖",ETe="⥊",MTe="⥦",ATe="≨︀",OTe="≨︀",NTe="¯",DTe="♂",LTe="✠",RTe="✠",ITe="↦",PTe="↦",BTe="↧",FTe="↤",qTe="↥",HTe="▮",_Te="⨩",zTe="М",VTe="м",UTe="—",$Te="∺",WTe="∡",jTe=" ",GTe="ℳ",KTe="𝔐",JTe="𝔪",YTe="℧",XTe="µ",ZTe="*",QTe="⫰",e1e="∣",t1e="·",r1e="⊟",n1e="−",i1e="∸",a1e="⨪",o1e="∓",s1e="⫛",l1e="…",u1e="∓",c1e="⊧",f1e="𝕄",d1e="𝕞",h1e="∓",p1e="𝓂",v1e="ℳ",m1e="∾",g1e="Μ",y1e="μ",b1e="⊸",k1e="⊸",w1e="∇",C1e="Ń",T1e="ń",S1e="∠⃒",x1e="≉",E1e="⩰̸",M1e="≋̸",A1e="ʼn",O1e="≉",N1e="♮",D1e="ℕ",L1e="♮",R1e=" ",I1e="≎̸",P1e="≏̸",B1e="⩃",F1e="Ň",q1e="ň",H1e="Ņ",_1e="ņ",z1e="≇",V1e="⩭̸",U1e="⩂",$1e="Н",W1e="н",j1e="–",G1e="⤤",K1e="↗",J1e="⇗",Y1e="↗",X1e="≠",Z1e="≐̸",Q1e="",eSe="",tSe="",rSe="",nSe="≢",iSe="⤨",aSe="≂̸",oSe="≫",sSe="≪",lSe=`
|
|
49
|
-
`,uSe="∄",cSe="∄",fSe="𝔑",dSe="𝔫",hSe="≧̸",pSe="≱",vSe="≱",mSe="≧̸",gSe="⩾̸",ySe="⩾̸",bSe="⋙̸",kSe="≵",wSe="≫⃒",CSe="≯",TSe="≯",SSe="≫̸",xSe="↮",ESe="⇎",MSe="⫲",ASe="∋",OSe="⋼",NSe="⋺",DSe="∋",LSe="Њ",RSe="њ",ISe="↚",PSe="⇍",BSe="‥",FSe="≦̸",qSe="≰",HSe="↚",_Se="⇍",zSe="↮",VSe="⇎",USe="≰",$Se="≦̸",WSe="⩽̸",jSe="⩽̸",GSe="≮",KSe="⋘̸",JSe="≴",YSe="≪⃒",XSe="≮",ZSe="⋪",QSe="⋬",exe="≪̸",txe="∤",rxe="",nxe=" ",ixe="𝕟",axe="ℕ",oxe="⫬",sxe="¬",lxe="≢",uxe="≭",cxe="∦",fxe="∉",dxe="≠",hxe="≂̸",pxe="∄",vxe="≯",mxe="≱",gxe="≧̸",yxe="≫̸",bxe="≹",kxe="⩾̸",wxe="≵",Cxe="≎̸",Txe="≏̸",Sxe="∉",xxe="⋵̸",Exe="⋹̸",Mxe="∉",Axe="⋷",Oxe="⋶",Nxe="⧏̸",Dxe="⋪",Lxe="⋬",Rxe="≮",Ixe="≰",Pxe="≸",Bxe="≪̸",Fxe="⩽̸",qxe="≴",Hxe="⪢̸",_xe="⪡̸",zxe="∌",Vxe="∌",Uxe="⋾",$xe="⋽",Wxe="⊀",jxe="⪯̸",Gxe="⋠",Kxe="∌",Jxe="⧐̸",Yxe="⋫",Xxe="⋭",Zxe="⊏̸",Qxe="⋢",eEe="⊐̸",tEe="⋣",rEe="⊂⃒",nEe="⊈",iEe="⊁",aEe="⪰̸",oEe="⋡",sEe="≿̸",lEe="⊃⃒",uEe="⊉",cEe="≁",fEe="≄",dEe="≇",hEe="≉",pEe="∤",vEe="∦",mEe="∦",gEe="⫽⃥",yEe="∂̸",bEe="⨔",kEe="⊀",wEe="⋠",CEe="⊀",TEe="⪯̸",SEe="⪯̸",xEe="⤳̸",EEe="↛",MEe="⇏",AEe="↝̸",OEe="↛",NEe="⇏",DEe="⋫",LEe="⋭",REe="⊁",IEe="⋡",PEe="⪰̸",BEe="𝒩",FEe="𝓃",qEe="∤",HEe="∦",_Ee="≁",zEe="≄",VEe="≄",UEe="∤",$Ee="∦",WEe="⋢",jEe="⋣",GEe="⊄",KEe="⫅̸",JEe="⊈",YEe="⊂⃒",XEe="⊈",ZEe="⫅̸",QEe="⊁",eMe="⪰̸",tMe="⊅",rMe="⫆̸",nMe="⊉",iMe="⊃⃒",aMe="⊉",oMe="⫆̸",sMe="≹",lMe="Ñ",uMe="ñ",cMe="≸",fMe="⋪",dMe="⋬",hMe="⋫",pMe="⋭",vMe="Ν",mMe="ν",gMe="#",yMe="№",bMe=" ",kMe="≍⃒",wMe="⊬",CMe="⊭",TMe="⊮",SMe="⊯",xMe="≥⃒",EMe=">⃒",MMe="⤄",AMe="⧞",OMe="⤂",NMe="≤⃒",DMe="<⃒",LMe="⊴⃒",RMe="⤃",IMe="⊵⃒",PMe="∼⃒",BMe="⤣",FMe="↖",qMe="⇖",HMe="↖",_Me="⤧",zMe="Ó",VMe="ó",UMe="⊛",$Me="Ô",WMe="ô",jMe="⊚",GMe="О",KMe="о",JMe="⊝",YMe="Ő",XMe="ő",ZMe="⨸",QMe="⊙",eAe="⦼",tAe="Œ",rAe="œ",nAe="⦿",iAe="𝔒",aAe="𝔬",oAe="˛",sAe="Ò",lAe="ò",uAe="⧁",cAe="⦵",fAe="Ω",dAe="∮",hAe="↺",pAe="⦾",vAe="⦻",mAe="‾",gAe="⧀",yAe="Ō",bAe="ō",kAe="Ω",wAe="ω",CAe="Ο",TAe="ο",SAe="⦶",xAe="⊖",EAe="𝕆",MAe="𝕠",AAe="⦷",OAe="“",NAe="‘",DAe="⦹",LAe="⊕",RAe="↻",IAe="⩔",PAe="∨",BAe="⩝",FAe="ℴ",qAe="ℴ",HAe="ª",_Ae="º",zAe="⊶",VAe="⩖",UAe="⩗",$Ae="⩛",WAe="Ⓢ",jAe="𝒪",GAe="ℴ",KAe="Ø",JAe="ø",YAe="⊘",XAe="Õ",ZAe="õ",QAe="⨶",eOe="⨷",tOe="⊗",rOe="Ö",nOe="ö",iOe="⌽",aOe="‾",oOe="⏞",sOe="⎴",lOe="⏜",uOe="¶",cOe="∥",fOe="∥",dOe="⫳",hOe="⫽",pOe="∂",vOe="∂",mOe="П",gOe="п",yOe="%",bOe=".",kOe="‰",wOe="⊥",COe="‱",TOe="𝔓",SOe="𝔭",xOe="Φ",EOe="φ",MOe="ϕ",AOe="ℳ",OOe="☎",NOe="Π",DOe="π",LOe="⋔",ROe="ϖ",IOe="ℏ",POe="ℎ",BOe="ℏ",FOe="⨣",qOe="⊞",HOe="⨢",_Oe="+",zOe="∔",VOe="⨥",UOe="⩲",$Oe="±",WOe="±",jOe="⨦",GOe="⨧",KOe="±",JOe="ℌ",YOe="⨕",XOe="𝕡",ZOe="ℙ",QOe="£",eNe="⪷",tNe="⪻",rNe="≺",nNe="≼",iNe="⪷",aNe="≺",oNe="≼",sNe="≺",lNe="⪯",uNe="≼",cNe="≾",fNe="⪯",dNe="⪹",hNe="⪵",pNe="⋨",vNe="⪯",mNe="⪳",gNe="≾",yNe="′",bNe="″",kNe="ℙ",wNe="⪹",CNe="⪵",TNe="⋨",SNe="∏",xNe="∏",ENe="⌮",MNe="⌒",ANe="⌓",ONe="∝",NNe="∝",DNe="∷",LNe="∝",RNe="≾",INe="⊰",PNe="𝒫",BNe="𝓅",FNe="Ψ",qNe="ψ",HNe=" ",_Ne="𝔔",zNe="𝔮",VNe="⨌",UNe="𝕢",$Ne="ℚ",WNe="⁗",jNe="𝒬",GNe="𝓆",KNe="ℍ",JNe="⨖",YNe="?",XNe="≟",ZNe='"',QNe='"',eDe="⇛",tDe="∽̱",rDe="Ŕ",nDe="ŕ",iDe="√",aDe="⦳",oDe="⟩",sDe="⟫",lDe="⦒",uDe="⦥",cDe="⟩",fDe="»",dDe="⥵",hDe="⇥",pDe="⤠",vDe="⤳",mDe="→",gDe="↠",yDe="⇒",bDe="⤞",kDe="↪",wDe="↬",CDe="⥅",TDe="⥴",SDe="⤖",xDe="↣",EDe="↝",MDe="⤚",ADe="⤜",ODe="∶",NDe="ℚ",DDe="⤍",LDe="⤏",RDe="⤐",IDe="❳",PDe="}",BDe="]",FDe="⦌",qDe="⦎",HDe="⦐",_De="Ř",zDe="ř",VDe="Ŗ",UDe="ŗ",$De="⌉",WDe="}",jDe="Р",GDe="р",KDe="⤷",JDe="⥩",YDe="”",XDe="”",ZDe="↳",QDe="ℜ",eLe="ℛ",tLe="ℜ",rLe="ℝ",nLe="ℜ",iLe="▭",aLe="®",oLe="®",sLe="∋",lLe="⇋",uLe="⥯",cLe="⥽",fLe="⌋",dLe="𝔯",hLe="ℜ",pLe="⥤",vLe="⇁",mLe="⇀",gLe="⥬",yLe="Ρ",bLe="ρ",kLe="ϱ",wLe="⟩",CLe="⇥",TLe="→",SLe="→",xLe="⇒",ELe="⇄",MLe="↣",ALe="⌉",OLe="⟧",NLe="⥝",DLe="⥕",LLe="⇂",RLe="⌋",ILe="⇁",PLe="⇀",BLe="⇄",FLe="⇌",qLe="⇉",HLe="↝",_Le="↦",zLe="⊢",VLe="⥛",ULe="⋌",$Le="⧐",WLe="⊳",jLe="⊵",GLe="⥏",KLe="⥜",JLe="⥔",YLe="↾",XLe="⥓",ZLe="⇀",QLe="˚",eRe="≓",tRe="⇄",rRe="⇌",nRe="",iRe="⎱",aRe="⎱",oRe="⫮",sRe="⟭",lRe="⇾",uRe="⟧",cRe="⦆",fRe="𝕣",dRe="ℝ",hRe="⨮",pRe="⨵",vRe="⥰",mRe=")",gRe="⦔",yRe="⨒",bRe="⇉",kRe="⇛",wRe="›",CRe="𝓇",TRe="ℛ",SRe="↱",xRe="↱",ERe="]",MRe="’",ARe="’",ORe="⋌",NRe="⋊",DRe="▹",LRe="⊵",RRe="▸",IRe="⧎",PRe="⧴",BRe="⥨",FRe="℞",qRe="Ś",HRe="ś",_Re="‚",zRe="⪸",VRe="Š",URe="š",$Re="⪼",WRe="≻",jRe="≽",GRe="⪰",KRe="⪴",JRe="Ş",YRe="ş",XRe="Ŝ",ZRe="ŝ",QRe="⪺",eIe="⪶",tIe="⋩",rIe="⨓",nIe="≿",iIe="С",aIe="с",oIe="⊡",sIe="⋅",lIe="⩦",uIe="⤥",cIe="↘",fIe="⇘",dIe="↘",hIe="§",pIe=";",vIe="⤩",mIe="∖",gIe="∖",yIe="✶",bIe="𝔖",kIe="𝔰",wIe="⌢",CIe="♯",TIe="Щ",SIe="щ",xIe="Ш",EIe="ш",MIe="↓",AIe="←",OIe="∣",NIe="∥",DIe="→",LIe="↑",RIe="",IIe="Σ",PIe="σ",BIe="ς",FIe="ς",qIe="∼",HIe="⩪",_Ie="≃",zIe="≃",VIe="⪞",UIe="⪠",$Ie="⪝",WIe="⪟",jIe="≆",GIe="⨤",KIe="⥲",JIe="←",YIe="∘",XIe="∖",ZIe="⨳",QIe="⧤",ePe="∣",tPe="⌣",rPe="⪪",nPe="⪬",iPe="⪬︀",aPe="Ь",oPe="ь",sPe="⌿",lPe="⧄",uPe="/",cPe="𝕊",fPe="𝕤",dPe="♠",hPe="♠",pPe="∥",vPe="⊓",mPe="⊓︀",gPe="⊔",yPe="⊔︀",bPe="√",kPe="⊏",wPe="⊑",CPe="⊏",TPe="⊑",SPe="⊐",xPe="⊒",EPe="⊐",MPe="⊒",APe="□",OPe="□",NPe="⊓",DPe="⊏",LPe="⊑",RPe="⊐",IPe="⊒",PPe="⊔",BPe="▪",FPe="□",qPe="▪",HPe="→",_Pe="𝒮",zPe="𝓈",VPe="∖",UPe="⌣",$Pe="⋆",WPe="⋆",jPe="☆",GPe="★",KPe="ϵ",JPe="ϕ",YPe="¯",XPe="⊂",ZPe="⋐",QPe="⪽",eBe="⫅",tBe="⊆",rBe="⫃",nBe="⫁",iBe="⫋",aBe="⊊",oBe="⪿",sBe="⥹",lBe="⊂",uBe="⋐",cBe="⊆",fBe="⫅",dBe="⊆",hBe="⊊",pBe="⫋",vBe="⫇",mBe="⫕",gBe="⫓",yBe="⪸",bBe="≻",kBe="≽",wBe="≻",CBe="⪰",TBe="≽",SBe="≿",xBe="⪰",EBe="⪺",MBe="⪶",ABe="⋩",OBe="≿",NBe="∋",DBe="∑",LBe="∑",RBe="♪",IBe="¹",PBe="²",BBe="³",FBe="⊃",qBe="⋑",HBe="⪾",_Be="⫘",zBe="⫆",VBe="⊇",UBe="⫄",$Be="⊃",WBe="⊇",jBe="⟉",GBe="⫗",KBe="⥻",JBe="⫂",YBe="⫌",XBe="⊋",ZBe="⫀",QBe="⊃",eFe="⋑",tFe="⊇",rFe="⫆",nFe="⊋",iFe="⫌",aFe="⫈",oFe="⫔",sFe="⫖",lFe="⤦",uFe="↙",cFe="⇙",fFe="↙",dFe="⤪",hFe="ß",pFe=" ",vFe="⌖",mFe="Τ",gFe="τ",yFe="⎴",bFe="Ť",kFe="ť",wFe="Ţ",CFe="ţ",TFe="Т",SFe="т",xFe="⃛",EFe="⌕",MFe="𝔗",AFe="𝔱",OFe="∴",NFe="∴",DFe="∴",LFe="Θ",RFe="θ",IFe="ϑ",PFe="ϑ",BFe="≈",FFe="∼",qFe=" ",HFe=" ",_Fe=" ",zFe="≈",VFe="∼",UFe="Þ",$Fe="þ",WFe="˜",jFe="∼",GFe="≃",KFe="≅",JFe="≈",YFe="⨱",XFe="⊠",ZFe="×",QFe="⨰",eqe="∭",tqe="⤨",rqe="⌶",nqe="⫱",iqe="⊤",aqe="𝕋",oqe="𝕥",sqe="⫚",lqe="⤩",uqe="‴",cqe="™",fqe="™",dqe="▵",hqe="▿",pqe="◃",vqe="⊴",mqe="≜",gqe="▹",yqe="⊵",bqe="◬",kqe="≜",wqe="⨺",Cqe="⃛",Tqe="⨹",Sqe="⧍",xqe="⨻",Eqe="⏢",Mqe="𝒯",Aqe="𝓉",Oqe="Ц",Nqe="ц",Dqe="Ћ",Lqe="ћ",Rqe="Ŧ",Iqe="ŧ",Pqe="≬",Bqe="↞",Fqe="↠",qqe="Ú",Hqe="ú",_qe="↑",zqe="↟",Vqe="⇑",Uqe="⥉",$qe="Ў",Wqe="ў",jqe="Ŭ",Gqe="ŭ",Kqe="Û",Jqe="û",Yqe="У",Xqe="у",Zqe="⇅",Qqe="Ű",eHe="ű",tHe="⥮",rHe="⥾",nHe="𝔘",iHe="𝔲",aHe="Ù",oHe="ù",sHe="⥣",lHe="↿",uHe="↾",cHe="▀",fHe="⌜",dHe="⌜",hHe="⌏",pHe="◸",vHe="Ū",mHe="ū",gHe="¨",yHe="_",bHe="⏟",kHe="⎵",wHe="⏝",CHe="⋃",THe="⊎",SHe="Ų",xHe="ų",EHe="𝕌",MHe="𝕦",AHe="⤒",OHe="↑",NHe="↑",DHe="⇑",LHe="⇅",RHe="↕",IHe="↕",PHe="⇕",BHe="⥮",FHe="↿",qHe="↾",HHe="⊎",_He="↖",zHe="↗",VHe="υ",UHe="ϒ",$He="ϒ",WHe="Υ",jHe="υ",GHe="↥",KHe="⊥",JHe="⇈",YHe="⌝",XHe="⌝",ZHe="⌎",QHe="Ů",e_e="ů",t_e="◹",r_e="𝒰",n_e="𝓊",i_e="⋰",a_e="Ũ",o_e="ũ",s_e="▵",l_e="▴",u_e="⇈",c_e="Ü",f_e="ü",d_e="⦧",h_e="⦜",p_e="ϵ",v_e="ϰ",m_e="∅",g_e="ϕ",y_e="ϖ",b_e="∝",k_e="↕",w_e="⇕",C_e="ϱ",T_e="ς",S_e="⊊︀",x_e="⫋︀",E_e="⊋︀",M_e="⫌︀",A_e="ϑ",O_e="⊲",N_e="⊳",D_e="⫨",L_e="⫫",R_e="⫩",I_e="В",P_e="в",B_e="⊢",F_e="⊨",q_e="⊩",H_e="⊫",__e="⫦",z_e="⊻",V_e="∨",U_e="⋁",$_e="≚",W_e="⋮",j_e="|",G_e="‖",K_e="|",J_e="‖",Y_e="∣",X_e="|",Z_e="❘",Q_e="≀",eze=" ",tze="𝔙",rze="𝔳",nze="⊲",ize="⊂⃒",aze="⊃⃒",oze="𝕍",sze="𝕧",lze="∝",uze="⊳",cze="𝒱",fze="𝓋",dze="⫋︀",hze="⊊︀",pze="⫌︀",vze="⊋︀",mze="⊪",gze="⦚",yze="Ŵ",bze="ŵ",kze="⩟",wze="∧",Cze="⋀",Tze="≙",Sze="℘",xze="𝔚",Eze="𝔴",Mze="𝕎",Aze="𝕨",Oze="℘",Nze="≀",Dze="≀",Lze="𝒲",Rze="𝓌",Ize="⋂",Pze="◯",Bze="⋃",Fze="▽",qze="𝔛",Hze="𝔵",_ze="⟷",zze="⟺",Vze="Ξ",Uze="ξ",$ze="⟵",Wze="⟸",jze="⟼",Gze="⋻",Kze="⨀",Jze="𝕏",Yze="𝕩",Xze="⨁",Zze="⨂",Qze="⟶",eVe="⟹",tVe="𝒳",rVe="𝓍",nVe="⨆",iVe="⨄",aVe="△",oVe="⋁",sVe="⋀",lVe="Ý",uVe="ý",cVe="Я",fVe="я",dVe="Ŷ",hVe="ŷ",pVe="Ы",vVe="ы",mVe="¥",gVe="𝔜",yVe="𝔶",bVe="Ї",kVe="ї",wVe="𝕐",CVe="𝕪",TVe="𝒴",SVe="𝓎",xVe="Ю",EVe="ю",MVe="ÿ",AVe="Ÿ",OVe="Ź",NVe="ź",DVe="Ž",LVe="ž",RVe="З",IVe="з",PVe="Ż",BVe="ż",FVe="ℨ",qVe="",HVe="Ζ",_Ve="ζ",zVe="𝔷",VVe="ℨ",UVe="Ж",$Ve="ж",WVe="⇝",jVe="𝕫",GVe="ℤ",KVe="𝒵",JVe="𝓏",YVe="",XVe="",tw={Aacute:Pae,aacute:Bae,Abreve:Fae,abreve:qae,ac:Hae,acd:_ae,acE:zae,Acirc:Vae,acirc:Uae,acute:$ae,Acy:Wae,acy:jae,AElig:Gae,aelig:Kae,af:Jae,Afr:Yae,afr:Xae,Agrave:Zae,agrave:Qae,alefsym:eoe,aleph:toe,Alpha:roe,alpha:noe,Amacr:ioe,amacr:aoe,amalg:ooe,amp:soe,AMP:loe,andand:uoe,And:coe,and:foe,andd:doe,andslope:hoe,andv:poe,ang:voe,ange:moe,angle:goe,angmsdaa:yoe,angmsdab:boe,angmsdac:koe,angmsdad:woe,angmsdae:Coe,angmsdaf:Toe,angmsdag:Soe,angmsdah:xoe,angmsd:Eoe,angrt:Moe,angrtvb:Aoe,angrtvbd:Ooe,angsph:Noe,angst:Doe,angzarr:Loe,Aogon:Roe,aogon:Ioe,Aopf:Poe,aopf:Boe,apacir:Foe,ap:qoe,apE:Hoe,ape:_oe,apid:zoe,apos:Voe,ApplyFunction:Uoe,approx:$oe,approxeq:Woe,Aring:joe,aring:Goe,Ascr:Koe,ascr:Joe,Assign:Yoe,ast:Xoe,asymp:Zoe,asympeq:Qoe,Atilde:ese,atilde:tse,Auml:rse,auml:nse,awconint:ise,awint:ase,backcong:ose,backepsilon:sse,backprime:lse,backsim:use,backsimeq:cse,Backslash:fse,Barv:dse,barvee:hse,barwed:pse,Barwed:vse,barwedge:mse,bbrk:gse,bbrktbrk:yse,bcong:bse,Bcy:kse,bcy:wse,bdquo:Cse,becaus:Tse,because:Sse,Because:xse,bemptyv:Ese,bepsi:Mse,bernou:Ase,Bernoullis:Ose,Beta:Nse,beta:Dse,beth:Lse,between:Rse,Bfr:Ise,bfr:Pse,bigcap:Bse,bigcirc:Fse,bigcup:qse,bigodot:Hse,bigoplus:_se,bigotimes:zse,bigsqcup:Vse,bigstar:Use,bigtriangledown:$se,bigtriangleup:Wse,biguplus:jse,bigvee:Gse,bigwedge:Kse,bkarow:Jse,blacklozenge:Yse,blacksquare:Xse,blacktriangle:Zse,blacktriangledown:Qse,blacktriangleleft:ele,blacktriangleright:tle,blank:rle,blk12:nle,blk14:ile,blk34:ale,block:ole,bne:sle,bnequiv:lle,bNot:ule,bnot:cle,Bopf:fle,bopf:dle,bot:hle,bottom:ple,bowtie:vle,boxbox:mle,boxdl:gle,boxdL:yle,boxDl:ble,boxDL:kle,boxdr:wle,boxdR:Cle,boxDr:Tle,boxDR:Sle,boxh:xle,boxH:Ele,boxhd:Mle,boxHd:Ale,boxhD:Ole,boxHD:Nle,boxhu:Dle,boxHu:Lle,boxhU:Rle,boxHU:Ile,boxminus:Ple,boxplus:Ble,boxtimes:Fle,boxul:qle,boxuL:Hle,boxUl:_le,boxUL:zle,boxur:Vle,boxuR:Ule,boxUr:$le,boxUR:Wle,boxv:jle,boxV:Gle,boxvh:Kle,boxvH:Jle,boxVh:Yle,boxVH:Xle,boxvl:Zle,boxvL:Qle,boxVl:eue,boxVL:tue,boxvr:rue,boxvR:nue,boxVr:iue,boxVR:aue,bprime:oue,breve:sue,Breve:lue,brvbar:uue,bscr:cue,Bscr:fue,bsemi:due,bsim:hue,bsime:pue,bsolb:vue,bsol:mue,bsolhsub:gue,bull:yue,bullet:bue,bump:kue,bumpE:wue,bumpe:Cue,Bumpeq:Tue,bumpeq:Sue,Cacute:xue,cacute:Eue,capand:Mue,capbrcup:Aue,capcap:Oue,cap:Nue,Cap:Due,capcup:Lue,capdot:Rue,CapitalDifferentialD:Iue,caps:Pue,caret:Bue,caron:Fue,Cayleys:que,ccaps:Hue,Ccaron:_ue,ccaron:zue,Ccedil:Vue,ccedil:Uue,Ccirc:$ue,ccirc:Wue,Cconint:jue,ccups:Gue,ccupssm:Kue,Cdot:Jue,cdot:Yue,cedil:Xue,Cedilla:Zue,cemptyv:Que,cent:ece,centerdot:tce,CenterDot:rce,cfr:nce,Cfr:ice,CHcy:ace,chcy:oce,check:sce,checkmark:lce,Chi:uce,chi:cce,circ:fce,circeq:dce,circlearrowleft:hce,circlearrowright:pce,circledast:vce,circledcirc:mce,circleddash:gce,CircleDot:yce,circledR:bce,circledS:kce,CircleMinus:wce,CirclePlus:Cce,CircleTimes:Tce,cir:Sce,cirE:xce,cire:Ece,cirfnint:Mce,cirmid:Ace,cirscir:Oce,ClockwiseContourIntegral:Nce,CloseCurlyDoubleQuote:Dce,CloseCurlyQuote:Lce,clubs:Rce,clubsuit:Ice,colon:Pce,Colon:Bce,Colone:Fce,colone:qce,coloneq:Hce,comma:_ce,commat:zce,comp:Vce,compfn:Uce,complement:$ce,complexes:Wce,cong:jce,congdot:Gce,Congruent:Kce,conint:Jce,Conint:Yce,ContourIntegral:Xce,copf:Zce,Copf:Qce,coprod:efe,Coproduct:tfe,copy:rfe,COPY:nfe,copysr:ife,CounterClockwiseContourIntegral:afe,crarr:ofe,cross:sfe,Cross:lfe,Cscr:ufe,cscr:cfe,csub:ffe,csube:dfe,csup:hfe,csupe:pfe,ctdot:vfe,cudarrl:mfe,cudarrr:gfe,cuepr:yfe,cuesc:bfe,cularr:kfe,cularrp:wfe,cupbrcap:Cfe,cupcap:Tfe,CupCap:Sfe,cup:xfe,Cup:Efe,cupcup:Mfe,cupdot:Afe,cupor:Ofe,cups:Nfe,curarr:Dfe,curarrm:Lfe,curlyeqprec:Rfe,curlyeqsucc:Ife,curlyvee:Pfe,curlywedge:Bfe,curren:Ffe,curvearrowleft:qfe,curvearrowright:Hfe,cuvee:_fe,cuwed:zfe,cwconint:Vfe,cwint:Ufe,cylcty:$fe,dagger:Wfe,Dagger:jfe,daleth:Gfe,darr:Kfe,Darr:Jfe,dArr:Yfe,dash:Xfe,Dashv:Zfe,dashv:Qfe,dbkarow:ede,dblac:tde,Dcaron:rde,dcaron:nde,Dcy:ide,dcy:ade,ddagger:ode,ddarr:sde,DD:lde,dd:ude,DDotrahd:cde,ddotseq:fde,deg:dde,Del:hde,Delta:pde,delta:vde,demptyv:mde,dfisht:gde,Dfr:yde,dfr:bde,dHar:kde,dharl:wde,dharr:Cde,DiacriticalAcute:Tde,DiacriticalDot:Sde,DiacriticalDoubleAcute:xde,DiacriticalGrave:Ede,DiacriticalTilde:Mde,diam:Ade,diamond:Ode,Diamond:Nde,diamondsuit:Dde,diams:Lde,die:Rde,DifferentialD:Ide,digamma:Pde,disin:Bde,div:Fde,divide:qde,divideontimes:Hde,divonx:_de,DJcy:zde,djcy:Vde,dlcorn:Ude,dlcrop:$de,dollar:Wde,Dopf:jde,dopf:Gde,Dot:Kde,dot:Jde,DotDot:Yde,doteq:Xde,doteqdot:Zde,DotEqual:Qde,dotminus:ehe,dotplus:the,dotsquare:rhe,doublebarwedge:nhe,DoubleContourIntegral:ihe,DoubleDot:ahe,DoubleDownArrow:ohe,DoubleLeftArrow:she,DoubleLeftRightArrow:lhe,DoubleLeftTee:uhe,DoubleLongLeftArrow:che,DoubleLongLeftRightArrow:fhe,DoubleLongRightArrow:dhe,DoubleRightArrow:hhe,DoubleRightTee:phe,DoubleUpArrow:vhe,DoubleUpDownArrow:mhe,DoubleVerticalBar:ghe,DownArrowBar:yhe,downarrow:bhe,DownArrow:khe,Downarrow:whe,DownArrowUpArrow:Che,DownBreve:The,downdownarrows:She,downharpoonleft:xhe,downharpoonright:Ehe,DownLeftRightVector:Mhe,DownLeftTeeVector:Ahe,DownLeftVectorBar:Ohe,DownLeftVector:Nhe,DownRightTeeVector:Dhe,DownRightVectorBar:Lhe,DownRightVector:Rhe,DownTeeArrow:Ihe,DownTee:Phe,drbkarow:Bhe,drcorn:Fhe,drcrop:qhe,Dscr:Hhe,dscr:_he,DScy:zhe,dscy:Vhe,dsol:Uhe,Dstrok:$he,dstrok:Whe,dtdot:jhe,dtri:Ghe,dtrif:Khe,duarr:Jhe,duhar:Yhe,dwangle:Xhe,DZcy:Zhe,dzcy:Qhe,dzigrarr:epe,Eacute:tpe,eacute:rpe,easter:npe,Ecaron:ipe,ecaron:ape,Ecirc:ope,ecirc:spe,ecir:lpe,ecolon:upe,Ecy:cpe,ecy:fpe,eDDot:dpe,Edot:hpe,edot:ppe,eDot:vpe,ee:mpe,efDot:gpe,Efr:ype,efr:bpe,eg:kpe,Egrave:wpe,egrave:Cpe,egs:Tpe,egsdot:Spe,el:xpe,Element:Epe,elinters:Mpe,ell:Ape,els:Ope,elsdot:Npe,Emacr:Dpe,emacr:Lpe,empty:Rpe,emptyset:Ipe,EmptySmallSquare:Ppe,emptyv:Bpe,EmptyVerySmallSquare:Fpe,emsp13:qpe,emsp14:Hpe,emsp:_pe,ENG:zpe,eng:Vpe,ensp:Upe,Eogon:$pe,eogon:Wpe,Eopf:jpe,eopf:Gpe,epar:Kpe,eparsl:Jpe,eplus:Ype,epsi:Xpe,Epsilon:Zpe,epsilon:Qpe,epsiv:eve,eqcirc:tve,eqcolon:rve,eqsim:nve,eqslantgtr:ive,eqslantless:ave,Equal:ove,equals:sve,EqualTilde:lve,equest:uve,Equilibrium:cve,equiv:fve,equivDD:dve,eqvparsl:hve,erarr:pve,erDot:vve,escr:mve,Escr:gve,esdot:yve,Esim:bve,esim:kve,Eta:wve,eta:Cve,ETH:Tve,eth:Sve,Euml:xve,euml:Eve,euro:Mve,excl:Ave,exist:Ove,Exists:Nve,expectation:Dve,exponentiale:Lve,ExponentialE:Rve,fallingdotseq:Ive,Fcy:Pve,fcy:Bve,female:Fve,ffilig:qve,fflig:Hve,ffllig:_ve,Ffr:zve,ffr:Vve,filig:Uve,FilledSmallSquare:$ve,FilledVerySmallSquare:Wve,fjlig:jve,flat:Gve,fllig:Kve,fltns:Jve,fnof:Yve,Fopf:Xve,fopf:Zve,forall:Qve,ForAll:eme,fork:tme,forkv:rme,Fouriertrf:nme,fpartint:ime,frac12:ame,frac13:ome,frac14:sme,frac15:lme,frac16:ume,frac18:cme,frac23:fme,frac25:dme,frac34:hme,frac35:pme,frac38:vme,frac45:mme,frac56:gme,frac58:yme,frac78:bme,frasl:kme,frown:wme,fscr:Cme,Fscr:Tme,gacute:Sme,Gamma:xme,gamma:Eme,Gammad:Mme,gammad:Ame,gap:Ome,Gbreve:Nme,gbreve:Dme,Gcedil:Lme,Gcirc:Rme,gcirc:Ime,Gcy:Pme,gcy:Bme,Gdot:Fme,gdot:qme,ge:Hme,gE:_me,gEl:zme,gel:Vme,geq:Ume,geqq:$me,geqslant:Wme,gescc:jme,ges:Gme,gesdot:Kme,gesdoto:Jme,gesdotol:Yme,gesl:Xme,gesles:Zme,Gfr:Qme,gfr:ege,gg:tge,Gg:rge,ggg:nge,gimel:ige,GJcy:age,gjcy:oge,gla:sge,gl:lge,glE:uge,glj:cge,gnap:fge,gnapprox:dge,gne:hge,gnE:pge,gneq:vge,gneqq:mge,gnsim:gge,Gopf:yge,gopf:bge,grave:kge,GreaterEqual:wge,GreaterEqualLess:Cge,GreaterFullEqual:Tge,GreaterGreater:Sge,GreaterLess:xge,GreaterSlantEqual:Ege,GreaterTilde:Mge,Gscr:Age,gscr:Oge,gsim:Nge,gsime:Dge,gsiml:Lge,gtcc:Rge,gtcir:Ige,gt:Pge,GT:Bge,Gt:Fge,gtdot:qge,gtlPar:Hge,gtquest:_ge,gtrapprox:zge,gtrarr:Vge,gtrdot:Uge,gtreqless:$ge,gtreqqless:Wge,gtrless:jge,gtrsim:Gge,gvertneqq:Kge,gvnE:Jge,Hacek:Yge,hairsp:Xge,half:Zge,hamilt:Qge,HARDcy:eye,hardcy:tye,harrcir:rye,harr:nye,hArr:iye,harrw:aye,Hat:oye,hbar:sye,Hcirc:lye,hcirc:uye,hearts:cye,heartsuit:fye,hellip:dye,hercon:hye,hfr:pye,Hfr:vye,HilbertSpace:mye,hksearow:gye,hkswarow:yye,hoarr:bye,homtht:kye,hookleftarrow:wye,hookrightarrow:Cye,hopf:Tye,Hopf:Sye,horbar:xye,HorizontalLine:Eye,hscr:Mye,Hscr:Aye,hslash:Oye,Hstrok:Nye,hstrok:Dye,HumpDownHump:Lye,HumpEqual:Rye,hybull:Iye,hyphen:Pye,Iacute:Bye,iacute:Fye,ic:qye,Icirc:Hye,icirc:_ye,Icy:zye,icy:Vye,Idot:Uye,IEcy:$ye,iecy:Wye,iexcl:jye,iff:Gye,ifr:Kye,Ifr:Jye,Igrave:Yye,igrave:Xye,ii:Zye,iiiint:Qye,iiint:ebe,iinfin:tbe,iiota:rbe,IJlig:nbe,ijlig:ibe,Imacr:abe,imacr:obe,image:sbe,ImaginaryI:lbe,imagline:ube,imagpart:cbe,imath:fbe,Im:dbe,imof:hbe,imped:pbe,Implies:vbe,incare:mbe,in:"∈",infin:gbe,infintie:ybe,inodot:bbe,intcal:kbe,int:wbe,Int:Cbe,integers:Tbe,Integral:Sbe,intercal:xbe,Intersection:Ebe,intlarhk:Mbe,intprod:Abe,InvisibleComma:Obe,InvisibleTimes:Nbe,IOcy:Dbe,iocy:Lbe,Iogon:Rbe,iogon:Ibe,Iopf:Pbe,iopf:Bbe,Iota:Fbe,iota:qbe,iprod:Hbe,iquest:_be,iscr:zbe,Iscr:Vbe,isin:Ube,isindot:$be,isinE:Wbe,isins:jbe,isinsv:Gbe,isinv:Kbe,it:Jbe,Itilde:Ybe,itilde:Xbe,Iukcy:Zbe,iukcy:Qbe,Iuml:eke,iuml:tke,Jcirc:rke,jcirc:nke,Jcy:ike,jcy:ake,Jfr:oke,jfr:ske,jmath:lke,Jopf:uke,jopf:cke,Jscr:fke,jscr:dke,Jsercy:hke,jsercy:pke,Jukcy:vke,jukcy:mke,Kappa:gke,kappa:yke,kappav:bke,Kcedil:kke,kcedil:wke,Kcy:Cke,kcy:Tke,Kfr:Ske,kfr:xke,kgreen:Eke,KHcy:Mke,khcy:Ake,KJcy:Oke,kjcy:Nke,Kopf:Dke,kopf:Lke,Kscr:Rke,kscr:Ike,lAarr:Pke,Lacute:Bke,lacute:Fke,laemptyv:qke,lagran:Hke,Lambda:_ke,lambda:zke,lang:Vke,Lang:Uke,langd:$ke,langle:Wke,lap:jke,Laplacetrf:Gke,laquo:Kke,larrb:Jke,larrbfs:Yke,larr:Xke,Larr:Zke,lArr:Qke,larrfs:ewe,larrhk:twe,larrlp:rwe,larrpl:nwe,larrsim:iwe,larrtl:awe,latail:owe,lAtail:swe,lat:lwe,late:uwe,lates:cwe,lbarr:fwe,lBarr:dwe,lbbrk:hwe,lbrace:pwe,lbrack:vwe,lbrke:mwe,lbrksld:gwe,lbrkslu:ywe,Lcaron:bwe,lcaron:kwe,Lcedil:wwe,lcedil:Cwe,lceil:Twe,lcub:Swe,Lcy:xwe,lcy:Ewe,ldca:Mwe,ldquo:Awe,ldquor:Owe,ldrdhar:Nwe,ldrushar:Dwe,ldsh:Lwe,le:Rwe,lE:Iwe,LeftAngleBracket:Pwe,LeftArrowBar:Bwe,leftarrow:Fwe,LeftArrow:qwe,Leftarrow:Hwe,LeftArrowRightArrow:_we,leftarrowtail:zwe,LeftCeiling:Vwe,LeftDoubleBracket:Uwe,LeftDownTeeVector:$we,LeftDownVectorBar:Wwe,LeftDownVector:jwe,LeftFloor:Gwe,leftharpoondown:Kwe,leftharpoonup:Jwe,leftleftarrows:Ywe,leftrightarrow:Xwe,LeftRightArrow:Zwe,Leftrightarrow:Qwe,leftrightarrows:e0e,leftrightharpoons:t0e,leftrightsquigarrow:r0e,LeftRightVector:n0e,LeftTeeArrow:i0e,LeftTee:a0e,LeftTeeVector:o0e,leftthreetimes:s0e,LeftTriangleBar:l0e,LeftTriangle:u0e,LeftTriangleEqual:c0e,LeftUpDownVector:f0e,LeftUpTeeVector:d0e,LeftUpVectorBar:h0e,LeftUpVector:p0e,LeftVectorBar:v0e,LeftVector:m0e,lEg:g0e,leg:y0e,leq:b0e,leqq:k0e,leqslant:w0e,lescc:C0e,les:T0e,lesdot:S0e,lesdoto:x0e,lesdotor:E0e,lesg:M0e,lesges:A0e,lessapprox:O0e,lessdot:N0e,lesseqgtr:D0e,lesseqqgtr:L0e,LessEqualGreater:R0e,LessFullEqual:I0e,LessGreater:P0e,lessgtr:B0e,LessLess:F0e,lesssim:q0e,LessSlantEqual:H0e,LessTilde:_0e,lfisht:z0e,lfloor:V0e,Lfr:U0e,lfr:$0e,lg:W0e,lgE:j0e,lHar:G0e,lhard:K0e,lharu:J0e,lharul:Y0e,lhblk:X0e,LJcy:Z0e,ljcy:Q0e,llarr:eCe,ll:tCe,Ll:rCe,llcorner:nCe,Lleftarrow:iCe,llhard:aCe,lltri:oCe,Lmidot:sCe,lmidot:lCe,lmoustache:uCe,lmoust:cCe,lnap:fCe,lnapprox:dCe,lne:hCe,lnE:pCe,lneq:vCe,lneqq:mCe,lnsim:gCe,loang:yCe,loarr:bCe,lobrk:kCe,longleftarrow:wCe,LongLeftArrow:CCe,Longleftarrow:TCe,longleftrightarrow:SCe,LongLeftRightArrow:xCe,Longleftrightarrow:ECe,longmapsto:MCe,longrightarrow:ACe,LongRightArrow:OCe,Longrightarrow:NCe,looparrowleft:DCe,looparrowright:LCe,lopar:RCe,Lopf:ICe,lopf:PCe,loplus:BCe,lotimes:FCe,lowast:qCe,lowbar:HCe,LowerLeftArrow:_Ce,LowerRightArrow:zCe,loz:VCe,lozenge:UCe,lozf:$Ce,lpar:WCe,lparlt:jCe,lrarr:GCe,lrcorner:KCe,lrhar:JCe,lrhard:YCe,lrm:XCe,lrtri:ZCe,lsaquo:QCe,lscr:eTe,Lscr:tTe,lsh:rTe,Lsh:nTe,lsim:iTe,lsime:aTe,lsimg:oTe,lsqb:sTe,lsquo:lTe,lsquor:uTe,Lstrok:cTe,lstrok:fTe,ltcc:dTe,ltcir:hTe,lt:pTe,LT:vTe,Lt:mTe,ltdot:gTe,lthree:yTe,ltimes:bTe,ltlarr:kTe,ltquest:wTe,ltri:CTe,ltrie:TTe,ltrif:STe,ltrPar:xTe,lurdshar:ETe,luruhar:MTe,lvertneqq:ATe,lvnE:OTe,macr:NTe,male:DTe,malt:LTe,maltese:RTe,Map:"⤅",map:ITe,mapsto:PTe,mapstodown:BTe,mapstoleft:FTe,mapstoup:qTe,marker:HTe,mcomma:_Te,Mcy:zTe,mcy:VTe,mdash:UTe,mDDot:$Te,measuredangle:WTe,MediumSpace:jTe,Mellintrf:GTe,Mfr:KTe,mfr:JTe,mho:YTe,micro:XTe,midast:ZTe,midcir:QTe,mid:e1e,middot:t1e,minusb:r1e,minus:n1e,minusd:i1e,minusdu:a1e,MinusPlus:o1e,mlcp:s1e,mldr:l1e,mnplus:u1e,models:c1e,Mopf:f1e,mopf:d1e,mp:h1e,mscr:p1e,Mscr:v1e,mstpos:m1e,Mu:g1e,mu:y1e,multimap:b1e,mumap:k1e,nabla:w1e,Nacute:C1e,nacute:T1e,nang:S1e,nap:x1e,napE:E1e,napid:M1e,napos:A1e,napprox:O1e,natural:N1e,naturals:D1e,natur:L1e,nbsp:R1e,nbump:I1e,nbumpe:P1e,ncap:B1e,Ncaron:F1e,ncaron:q1e,Ncedil:H1e,ncedil:_1e,ncong:z1e,ncongdot:V1e,ncup:U1e,Ncy:$1e,ncy:W1e,ndash:j1e,nearhk:G1e,nearr:K1e,neArr:J1e,nearrow:Y1e,ne:X1e,nedot:Z1e,NegativeMediumSpace:Q1e,NegativeThickSpace:eSe,NegativeThinSpace:tSe,NegativeVeryThinSpace:rSe,nequiv:nSe,nesear:iSe,nesim:aSe,NestedGreaterGreater:oSe,NestedLessLess:sSe,NewLine:lSe,nexist:uSe,nexists:cSe,Nfr:fSe,nfr:dSe,ngE:hSe,nge:pSe,ngeq:vSe,ngeqq:mSe,ngeqslant:gSe,nges:ySe,nGg:bSe,ngsim:kSe,nGt:wSe,ngt:CSe,ngtr:TSe,nGtv:SSe,nharr:xSe,nhArr:ESe,nhpar:MSe,ni:ASe,nis:OSe,nisd:NSe,niv:DSe,NJcy:LSe,njcy:RSe,nlarr:ISe,nlArr:PSe,nldr:BSe,nlE:FSe,nle:qSe,nleftarrow:HSe,nLeftarrow:_Se,nleftrightarrow:zSe,nLeftrightarrow:VSe,nleq:USe,nleqq:$Se,nleqslant:WSe,nles:jSe,nless:GSe,nLl:KSe,nlsim:JSe,nLt:YSe,nlt:XSe,nltri:ZSe,nltrie:QSe,nLtv:exe,nmid:txe,NoBreak:rxe,NonBreakingSpace:nxe,nopf:ixe,Nopf:axe,Not:oxe,not:sxe,NotCongruent:lxe,NotCupCap:uxe,NotDoubleVerticalBar:cxe,NotElement:fxe,NotEqual:dxe,NotEqualTilde:hxe,NotExists:pxe,NotGreater:vxe,NotGreaterEqual:mxe,NotGreaterFullEqual:gxe,NotGreaterGreater:yxe,NotGreaterLess:bxe,NotGreaterSlantEqual:kxe,NotGreaterTilde:wxe,NotHumpDownHump:Cxe,NotHumpEqual:Txe,notin:Sxe,notindot:xxe,notinE:Exe,notinva:Mxe,notinvb:Axe,notinvc:Oxe,NotLeftTriangleBar:Nxe,NotLeftTriangle:Dxe,NotLeftTriangleEqual:Lxe,NotLess:Rxe,NotLessEqual:Ixe,NotLessGreater:Pxe,NotLessLess:Bxe,NotLessSlantEqual:Fxe,NotLessTilde:qxe,NotNestedGreaterGreater:Hxe,NotNestedLessLess:_xe,notni:zxe,notniva:Vxe,notnivb:Uxe,notnivc:$xe,NotPrecedes:Wxe,NotPrecedesEqual:jxe,NotPrecedesSlantEqual:Gxe,NotReverseElement:Kxe,NotRightTriangleBar:Jxe,NotRightTriangle:Yxe,NotRightTriangleEqual:Xxe,NotSquareSubset:Zxe,NotSquareSubsetEqual:Qxe,NotSquareSuperset:eEe,NotSquareSupersetEqual:tEe,NotSubset:rEe,NotSubsetEqual:nEe,NotSucceeds:iEe,NotSucceedsEqual:aEe,NotSucceedsSlantEqual:oEe,NotSucceedsTilde:sEe,NotSuperset:lEe,NotSupersetEqual:uEe,NotTilde:cEe,NotTildeEqual:fEe,NotTildeFullEqual:dEe,NotTildeTilde:hEe,NotVerticalBar:pEe,nparallel:vEe,npar:mEe,nparsl:gEe,npart:yEe,npolint:bEe,npr:kEe,nprcue:wEe,nprec:CEe,npreceq:TEe,npre:SEe,nrarrc:xEe,nrarr:EEe,nrArr:MEe,nrarrw:AEe,nrightarrow:OEe,nRightarrow:NEe,nrtri:DEe,nrtrie:LEe,nsc:REe,nsccue:IEe,nsce:PEe,Nscr:BEe,nscr:FEe,nshortmid:qEe,nshortparallel:HEe,nsim:_Ee,nsime:zEe,nsimeq:VEe,nsmid:UEe,nspar:$Ee,nsqsube:WEe,nsqsupe:jEe,nsub:GEe,nsubE:KEe,nsube:JEe,nsubset:YEe,nsubseteq:XEe,nsubseteqq:ZEe,nsucc:QEe,nsucceq:eMe,nsup:tMe,nsupE:rMe,nsupe:nMe,nsupset:iMe,nsupseteq:aMe,nsupseteqq:oMe,ntgl:sMe,Ntilde:lMe,ntilde:uMe,ntlg:cMe,ntriangleleft:fMe,ntrianglelefteq:dMe,ntriangleright:hMe,ntrianglerighteq:pMe,Nu:vMe,nu:mMe,num:gMe,numero:yMe,numsp:bMe,nvap:kMe,nvdash:wMe,nvDash:CMe,nVdash:TMe,nVDash:SMe,nvge:xMe,nvgt:EMe,nvHarr:MMe,nvinfin:AMe,nvlArr:OMe,nvle:NMe,nvlt:DMe,nvltrie:LMe,nvrArr:RMe,nvrtrie:IMe,nvsim:PMe,nwarhk:BMe,nwarr:FMe,nwArr:qMe,nwarrow:HMe,nwnear:_Me,Oacute:zMe,oacute:VMe,oast:UMe,Ocirc:$Me,ocirc:WMe,ocir:jMe,Ocy:GMe,ocy:KMe,odash:JMe,Odblac:YMe,odblac:XMe,odiv:ZMe,odot:QMe,odsold:eAe,OElig:tAe,oelig:rAe,ofcir:nAe,Ofr:iAe,ofr:aAe,ogon:oAe,Ograve:sAe,ograve:lAe,ogt:uAe,ohbar:cAe,ohm:fAe,oint:dAe,olarr:hAe,olcir:pAe,olcross:vAe,oline:mAe,olt:gAe,Omacr:yAe,omacr:bAe,Omega:kAe,omega:wAe,Omicron:CAe,omicron:TAe,omid:SAe,ominus:xAe,Oopf:EAe,oopf:MAe,opar:AAe,OpenCurlyDoubleQuote:OAe,OpenCurlyQuote:NAe,operp:DAe,oplus:LAe,orarr:RAe,Or:IAe,or:PAe,ord:BAe,order:FAe,orderof:qAe,ordf:HAe,ordm:_Ae,origof:zAe,oror:VAe,orslope:UAe,orv:$Ae,oS:WAe,Oscr:jAe,oscr:GAe,Oslash:KAe,oslash:JAe,osol:YAe,Otilde:XAe,otilde:ZAe,otimesas:QAe,Otimes:eOe,otimes:tOe,Ouml:rOe,ouml:nOe,ovbar:iOe,OverBar:aOe,OverBrace:oOe,OverBracket:sOe,OverParenthesis:lOe,para:uOe,parallel:cOe,par:fOe,parsim:dOe,parsl:hOe,part:pOe,PartialD:vOe,Pcy:mOe,pcy:gOe,percnt:yOe,period:bOe,permil:kOe,perp:wOe,pertenk:COe,Pfr:TOe,pfr:SOe,Phi:xOe,phi:EOe,phiv:MOe,phmmat:AOe,phone:OOe,Pi:NOe,pi:DOe,pitchfork:LOe,piv:ROe,planck:IOe,planckh:POe,plankv:BOe,plusacir:FOe,plusb:qOe,pluscir:HOe,plus:_Oe,plusdo:zOe,plusdu:VOe,pluse:UOe,PlusMinus:$Oe,plusmn:WOe,plussim:jOe,plustwo:GOe,pm:KOe,Poincareplane:JOe,pointint:YOe,popf:XOe,Popf:ZOe,pound:QOe,prap:eNe,Pr:tNe,pr:rNe,prcue:nNe,precapprox:iNe,prec:aNe,preccurlyeq:oNe,Precedes:sNe,PrecedesEqual:lNe,PrecedesSlantEqual:uNe,PrecedesTilde:cNe,preceq:fNe,precnapprox:dNe,precneqq:hNe,precnsim:pNe,pre:vNe,prE:mNe,precsim:gNe,prime:yNe,Prime:bNe,primes:kNe,prnap:wNe,prnE:CNe,prnsim:TNe,prod:SNe,Product:xNe,profalar:ENe,profline:MNe,profsurf:ANe,prop:ONe,Proportional:NNe,Proportion:DNe,propto:LNe,prsim:RNe,prurel:INe,Pscr:PNe,pscr:BNe,Psi:FNe,psi:qNe,puncsp:HNe,Qfr:_Ne,qfr:zNe,qint:VNe,qopf:UNe,Qopf:$Ne,qprime:WNe,Qscr:jNe,qscr:GNe,quaternions:KNe,quatint:JNe,quest:YNe,questeq:XNe,quot:ZNe,QUOT:QNe,rAarr:eDe,race:tDe,Racute:rDe,racute:nDe,radic:iDe,raemptyv:aDe,rang:oDe,Rang:sDe,rangd:lDe,range:uDe,rangle:cDe,raquo:fDe,rarrap:dDe,rarrb:hDe,rarrbfs:pDe,rarrc:vDe,rarr:mDe,Rarr:gDe,rArr:yDe,rarrfs:bDe,rarrhk:kDe,rarrlp:wDe,rarrpl:CDe,rarrsim:TDe,Rarrtl:SDe,rarrtl:xDe,rarrw:EDe,ratail:MDe,rAtail:ADe,ratio:ODe,rationals:NDe,rbarr:DDe,rBarr:LDe,RBarr:RDe,rbbrk:IDe,rbrace:PDe,rbrack:BDe,rbrke:FDe,rbrksld:qDe,rbrkslu:HDe,Rcaron:_De,rcaron:zDe,Rcedil:VDe,rcedil:UDe,rceil:$De,rcub:WDe,Rcy:jDe,rcy:GDe,rdca:KDe,rdldhar:JDe,rdquo:YDe,rdquor:XDe,rdsh:ZDe,real:QDe,realine:eLe,realpart:tLe,reals:rLe,Re:nLe,rect:iLe,reg:aLe,REG:oLe,ReverseElement:sLe,ReverseEquilibrium:lLe,ReverseUpEquilibrium:uLe,rfisht:cLe,rfloor:fLe,rfr:dLe,Rfr:hLe,rHar:pLe,rhard:vLe,rharu:mLe,rharul:gLe,Rho:yLe,rho:bLe,rhov:kLe,RightAngleBracket:wLe,RightArrowBar:CLe,rightarrow:TLe,RightArrow:SLe,Rightarrow:xLe,RightArrowLeftArrow:ELe,rightarrowtail:MLe,RightCeiling:ALe,RightDoubleBracket:OLe,RightDownTeeVector:NLe,RightDownVectorBar:DLe,RightDownVector:LLe,RightFloor:RLe,rightharpoondown:ILe,rightharpoonup:PLe,rightleftarrows:BLe,rightleftharpoons:FLe,rightrightarrows:qLe,rightsquigarrow:HLe,RightTeeArrow:_Le,RightTee:zLe,RightTeeVector:VLe,rightthreetimes:ULe,RightTriangleBar:$Le,RightTriangle:WLe,RightTriangleEqual:jLe,RightUpDownVector:GLe,RightUpTeeVector:KLe,RightUpVectorBar:JLe,RightUpVector:YLe,RightVectorBar:XLe,RightVector:ZLe,ring:QLe,risingdotseq:eRe,rlarr:tRe,rlhar:rRe,rlm:nRe,rmoustache:iRe,rmoust:aRe,rnmid:oRe,roang:sRe,roarr:lRe,robrk:uRe,ropar:cRe,ropf:fRe,Ropf:dRe,roplus:hRe,rotimes:pRe,RoundImplies:vRe,rpar:mRe,rpargt:gRe,rppolint:yRe,rrarr:bRe,Rrightarrow:kRe,rsaquo:wRe,rscr:CRe,Rscr:TRe,rsh:SRe,Rsh:xRe,rsqb:ERe,rsquo:MRe,rsquor:ARe,rthree:ORe,rtimes:NRe,rtri:DRe,rtrie:LRe,rtrif:RRe,rtriltri:IRe,RuleDelayed:PRe,ruluhar:BRe,rx:FRe,Sacute:qRe,sacute:HRe,sbquo:_Re,scap:zRe,Scaron:VRe,scaron:URe,Sc:$Re,sc:WRe,sccue:jRe,sce:GRe,scE:KRe,Scedil:JRe,scedil:YRe,Scirc:XRe,scirc:ZRe,scnap:QRe,scnE:eIe,scnsim:tIe,scpolint:rIe,scsim:nIe,Scy:iIe,scy:aIe,sdotb:oIe,sdot:sIe,sdote:lIe,searhk:uIe,searr:cIe,seArr:fIe,searrow:dIe,sect:hIe,semi:pIe,seswar:vIe,setminus:mIe,setmn:gIe,sext:yIe,Sfr:bIe,sfr:kIe,sfrown:wIe,sharp:CIe,SHCHcy:TIe,shchcy:SIe,SHcy:xIe,shcy:EIe,ShortDownArrow:MIe,ShortLeftArrow:AIe,shortmid:OIe,shortparallel:NIe,ShortRightArrow:DIe,ShortUpArrow:LIe,shy:RIe,Sigma:IIe,sigma:PIe,sigmaf:BIe,sigmav:FIe,sim:qIe,simdot:HIe,sime:_Ie,simeq:zIe,simg:VIe,simgE:UIe,siml:$Ie,simlE:WIe,simne:jIe,simplus:GIe,simrarr:KIe,slarr:JIe,SmallCircle:YIe,smallsetminus:XIe,smashp:ZIe,smeparsl:QIe,smid:ePe,smile:tPe,smt:rPe,smte:nPe,smtes:iPe,SOFTcy:aPe,softcy:oPe,solbar:sPe,solb:lPe,sol:uPe,Sopf:cPe,sopf:fPe,spades:dPe,spadesuit:hPe,spar:pPe,sqcap:vPe,sqcaps:mPe,sqcup:gPe,sqcups:yPe,Sqrt:bPe,sqsub:kPe,sqsube:wPe,sqsubset:CPe,sqsubseteq:TPe,sqsup:SPe,sqsupe:xPe,sqsupset:EPe,sqsupseteq:MPe,square:APe,Square:OPe,SquareIntersection:NPe,SquareSubset:DPe,SquareSubsetEqual:LPe,SquareSuperset:RPe,SquareSupersetEqual:IPe,SquareUnion:PPe,squarf:BPe,squ:FPe,squf:qPe,srarr:HPe,Sscr:_Pe,sscr:zPe,ssetmn:VPe,ssmile:UPe,sstarf:$Pe,Star:WPe,star:jPe,starf:GPe,straightepsilon:KPe,straightphi:JPe,strns:YPe,sub:XPe,Sub:ZPe,subdot:QPe,subE:eBe,sube:tBe,subedot:rBe,submult:nBe,subnE:iBe,subne:aBe,subplus:oBe,subrarr:sBe,subset:lBe,Subset:uBe,subseteq:cBe,subseteqq:fBe,SubsetEqual:dBe,subsetneq:hBe,subsetneqq:pBe,subsim:vBe,subsub:mBe,subsup:gBe,succapprox:yBe,succ:bBe,succcurlyeq:kBe,Succeeds:wBe,SucceedsEqual:CBe,SucceedsSlantEqual:TBe,SucceedsTilde:SBe,succeq:xBe,succnapprox:EBe,succneqq:MBe,succnsim:ABe,succsim:OBe,SuchThat:NBe,sum:DBe,Sum:LBe,sung:RBe,sup1:IBe,sup2:PBe,sup3:BBe,sup:FBe,Sup:qBe,supdot:HBe,supdsub:_Be,supE:zBe,supe:VBe,supedot:UBe,Superset:$Be,SupersetEqual:WBe,suphsol:jBe,suphsub:GBe,suplarr:KBe,supmult:JBe,supnE:YBe,supne:XBe,supplus:ZBe,supset:QBe,Supset:eFe,supseteq:tFe,supseteqq:rFe,supsetneq:nFe,supsetneqq:iFe,supsim:aFe,supsub:oFe,supsup:sFe,swarhk:lFe,swarr:uFe,swArr:cFe,swarrow:fFe,swnwar:dFe,szlig:hFe,Tab:pFe,target:vFe,Tau:mFe,tau:gFe,tbrk:yFe,Tcaron:bFe,tcaron:kFe,Tcedil:wFe,tcedil:CFe,Tcy:TFe,tcy:SFe,tdot:xFe,telrec:EFe,Tfr:MFe,tfr:AFe,there4:OFe,therefore:NFe,Therefore:DFe,Theta:LFe,theta:RFe,thetasym:IFe,thetav:PFe,thickapprox:BFe,thicksim:FFe,ThickSpace:qFe,ThinSpace:HFe,thinsp:_Fe,thkap:zFe,thksim:VFe,THORN:UFe,thorn:$Fe,tilde:WFe,Tilde:jFe,TildeEqual:GFe,TildeFullEqual:KFe,TildeTilde:JFe,timesbar:YFe,timesb:XFe,times:ZFe,timesd:QFe,tint:eqe,toea:tqe,topbot:rqe,topcir:nqe,top:iqe,Topf:aqe,topf:oqe,topfork:sqe,tosa:lqe,tprime:uqe,trade:cqe,TRADE:fqe,triangle:dqe,triangledown:hqe,triangleleft:pqe,trianglelefteq:vqe,triangleq:mqe,triangleright:gqe,trianglerighteq:yqe,tridot:bqe,trie:kqe,triminus:wqe,TripleDot:Cqe,triplus:Tqe,trisb:Sqe,tritime:xqe,trpezium:Eqe,Tscr:Mqe,tscr:Aqe,TScy:Oqe,tscy:Nqe,TSHcy:Dqe,tshcy:Lqe,Tstrok:Rqe,tstrok:Iqe,twixt:Pqe,twoheadleftarrow:Bqe,twoheadrightarrow:Fqe,Uacute:qqe,uacute:Hqe,uarr:_qe,Uarr:zqe,uArr:Vqe,Uarrocir:Uqe,Ubrcy:$qe,ubrcy:Wqe,Ubreve:jqe,ubreve:Gqe,Ucirc:Kqe,ucirc:Jqe,Ucy:Yqe,ucy:Xqe,udarr:Zqe,Udblac:Qqe,udblac:eHe,udhar:tHe,ufisht:rHe,Ufr:nHe,ufr:iHe,Ugrave:aHe,ugrave:oHe,uHar:sHe,uharl:lHe,uharr:uHe,uhblk:cHe,ulcorn:fHe,ulcorner:dHe,ulcrop:hHe,ultri:pHe,Umacr:vHe,umacr:mHe,uml:gHe,UnderBar:yHe,UnderBrace:bHe,UnderBracket:kHe,UnderParenthesis:wHe,Union:CHe,UnionPlus:THe,Uogon:SHe,uogon:xHe,Uopf:EHe,uopf:MHe,UpArrowBar:AHe,uparrow:OHe,UpArrow:NHe,Uparrow:DHe,UpArrowDownArrow:LHe,updownarrow:RHe,UpDownArrow:IHe,Updownarrow:PHe,UpEquilibrium:BHe,upharpoonleft:FHe,upharpoonright:qHe,uplus:HHe,UpperLeftArrow:_He,UpperRightArrow:zHe,upsi:VHe,Upsi:UHe,upsih:$He,Upsilon:WHe,upsilon:jHe,UpTeeArrow:GHe,UpTee:KHe,upuparrows:JHe,urcorn:YHe,urcorner:XHe,urcrop:ZHe,Uring:QHe,uring:e_e,urtri:t_e,Uscr:r_e,uscr:n_e,utdot:i_e,Utilde:a_e,utilde:o_e,utri:s_e,utrif:l_e,uuarr:u_e,Uuml:c_e,uuml:f_e,uwangle:d_e,vangrt:h_e,varepsilon:p_e,varkappa:v_e,varnothing:m_e,varphi:g_e,varpi:y_e,varpropto:b_e,varr:k_e,vArr:w_e,varrho:C_e,varsigma:T_e,varsubsetneq:S_e,varsubsetneqq:x_e,varsupsetneq:E_e,varsupsetneqq:M_e,vartheta:A_e,vartriangleleft:O_e,vartriangleright:N_e,vBar:D_e,Vbar:L_e,vBarv:R_e,Vcy:I_e,vcy:P_e,vdash:B_e,vDash:F_e,Vdash:q_e,VDash:H_e,Vdashl:__e,veebar:z_e,vee:V_e,Vee:U_e,veeeq:$_e,vellip:W_e,verbar:j_e,Verbar:G_e,vert:K_e,Vert:J_e,VerticalBar:Y_e,VerticalLine:X_e,VerticalSeparator:Z_e,VerticalTilde:Q_e,VeryThinSpace:eze,Vfr:tze,vfr:rze,vltri:nze,vnsub:ize,vnsup:aze,Vopf:oze,vopf:sze,vprop:lze,vrtri:uze,Vscr:cze,vscr:fze,vsubnE:dze,vsubne:hze,vsupnE:pze,vsupne:vze,Vvdash:mze,vzigzag:gze,Wcirc:yze,wcirc:bze,wedbar:kze,wedge:wze,Wedge:Cze,wedgeq:Tze,weierp:Sze,Wfr:xze,wfr:Eze,Wopf:Mze,wopf:Aze,wp:Oze,wr:Nze,wreath:Dze,Wscr:Lze,wscr:Rze,xcap:Ize,xcirc:Pze,xcup:Bze,xdtri:Fze,Xfr:qze,xfr:Hze,xharr:_ze,xhArr:zze,Xi:Vze,xi:Uze,xlarr:$ze,xlArr:Wze,xmap:jze,xnis:Gze,xodot:Kze,Xopf:Jze,xopf:Yze,xoplus:Xze,xotime:Zze,xrarr:Qze,xrArr:eVe,Xscr:tVe,xscr:rVe,xsqcup:nVe,xuplus:iVe,xutri:aVe,xvee:oVe,xwedge:sVe,Yacute:lVe,yacute:uVe,YAcy:cVe,yacy:fVe,Ycirc:dVe,ycirc:hVe,Ycy:pVe,ycy:vVe,yen:mVe,Yfr:gVe,yfr:yVe,YIcy:bVe,yicy:kVe,Yopf:wVe,yopf:CVe,Yscr:TVe,yscr:SVe,YUcy:xVe,yucy:EVe,yuml:MVe,Yuml:AVe,Zacute:OVe,zacute:NVe,Zcaron:DVe,zcaron:LVe,Zcy:RVe,zcy:IVe,Zdot:PVe,zdot:BVe,zeetrf:FVe,ZeroWidthSpace:qVe,Zeta:HVe,zeta:_Ve,zfr:zVe,Zfr:VVe,ZHcy:UVe,zhcy:$Ve,zigrarr:WVe,zopf:jVe,Zopf:GVe,Zscr:KVe,zscr:JVe,zwj:YVe,zwnj:XVe},ZVe="Á",QVe="á",eUe="Â",tUe="â",rUe="´",nUe="Æ",iUe="æ",aUe="À",oUe="à",sUe="&",lUe="&",uUe="Å",cUe="å",fUe="Ã",dUe="ã",hUe="Ä",pUe="ä",vUe="¦",mUe="Ç",gUe="ç",yUe="¸",bUe="¢",kUe="©",wUe="©",CUe="¤",TUe="°",SUe="÷",xUe="É",EUe="é",MUe="Ê",AUe="ê",OUe="È",NUe="è",DUe="Ð",LUe="ð",RUe="Ë",IUe="ë",PUe="½",BUe="¼",FUe="¾",qUe=">",HUe=">",_Ue="Í",zUe="í",VUe="Î",UUe="î",$Ue="¡",WUe="Ì",jUe="ì",GUe="¿",KUe="Ï",JUe="ï",YUe="«",XUe="<",ZUe="<",QUe="¯",e2e="µ",t2e="·",r2e=" ",n2e="¬",i2e="Ñ",a2e="ñ",o2e="Ó",s2e="ó",l2e="Ô",u2e="ô",c2e="Ò",f2e="ò",d2e="ª",h2e="º",p2e="Ø",v2e="ø",m2e="Õ",g2e="õ",y2e="Ö",b2e="ö",k2e="¶",w2e="±",C2e="£",T2e='"',S2e='"',x2e="»",E2e="®",M2e="®",A2e="§",O2e="",N2e="¹",D2e="²",L2e="³",R2e="ß",I2e="Þ",P2e="þ",B2e="×",F2e="Ú",q2e="ú",H2e="Û",_2e="û",z2e="Ù",V2e="ù",U2e="¨",$2e="Ü",W2e="ü",j2e="Ý",G2e="ý",K2e="¥",J2e="ÿ",Y2e={Aacute:ZVe,aacute:QVe,Acirc:eUe,acirc:tUe,acute:rUe,AElig:nUe,aelig:iUe,Agrave:aUe,agrave:oUe,amp:sUe,AMP:lUe,Aring:uUe,aring:cUe,Atilde:fUe,atilde:dUe,Auml:hUe,auml:pUe,brvbar:vUe,Ccedil:mUe,ccedil:gUe,cedil:yUe,cent:bUe,copy:kUe,COPY:wUe,curren:CUe,deg:TUe,divide:SUe,Eacute:xUe,eacute:EUe,Ecirc:MUe,ecirc:AUe,Egrave:OUe,egrave:NUe,ETH:DUe,eth:LUe,Euml:RUe,euml:IUe,frac12:PUe,frac14:BUe,frac34:FUe,gt:qUe,GT:HUe,Iacute:_Ue,iacute:zUe,Icirc:VUe,icirc:UUe,iexcl:$Ue,Igrave:WUe,igrave:jUe,iquest:GUe,Iuml:KUe,iuml:JUe,laquo:YUe,lt:XUe,LT:ZUe,macr:QUe,micro:e2e,middot:t2e,nbsp:r2e,not:n2e,Ntilde:i2e,ntilde:a2e,Oacute:o2e,oacute:s2e,Ocirc:l2e,ocirc:u2e,Ograve:c2e,ograve:f2e,ordf:d2e,ordm:h2e,Oslash:p2e,oslash:v2e,Otilde:m2e,otilde:g2e,Ouml:y2e,ouml:b2e,para:k2e,plusmn:w2e,pound:C2e,quot:T2e,QUOT:S2e,raquo:x2e,reg:E2e,REG:M2e,sect:A2e,shy:O2e,sup1:N2e,sup2:D2e,sup3:L2e,szlig:R2e,THORN:I2e,thorn:P2e,times:B2e,Uacute:F2e,uacute:q2e,Ucirc:H2e,ucirc:_2e,Ugrave:z2e,ugrave:V2e,uml:U2e,Uuml:$2e,uuml:W2e,Yacute:j2e,yacute:G2e,yen:K2e,yuml:J2e},X2e="&",Z2e="'",Q2e=">",e$e="<",t$e='"',rw={amp:X2e,apos:Z2e,gt:Q2e,lt:e$e,quot:t$e},Uh={},r$e={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},n$e=Wo&&Wo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Uh,"__esModule",{value:!0});var eg=n$e(r$e),i$e=String.fromCodePoint||function(r){var e="";return r>65535&&(r-=65536,e+=String.fromCharCode(r>>>10&1023|55296),r=56320|r&1023),e+=String.fromCharCode(r),e};function a$e(r){return r>=55296&&r<=57343||r>1114111?"�":(r in eg.default&&(r=eg.default[r]),i$e(r))}Uh.default=a$e;var Ku=Wo&&Wo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bi,"__esModule",{value:!0});Bi.decodeHTML=Bi.decodeHTMLStrict=Bi.decodeXML=void 0;var _d=Ku(tw),o$e=Ku(Y2e),s$e=Ku(rw),tg=Ku(Uh),l$e=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;Bi.decodeXML=nw(s$e.default);Bi.decodeHTMLStrict=nw(_d.default);function nw(r){var e=iw(r);return function(t){return String(t).replace(l$e,e)}}var rg=function(r,e){return r<e?1:-1};Bi.decodeHTML=(function(){for(var r=Object.keys(o$e.default).sort(rg),e=Object.keys(_d.default).sort(rg),t=0,n=0;t<e.length;t++)r[n]===e[t]?(e[t]+=";?",n++):e[t]+=";";var i=new RegExp("&(?:"+e.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),a=iw(_d.default);function o(s){return s.substr(-1)!==";"&&(s+=";"),a(s)}return function(s){return String(s).replace(i,o)}})();function iw(r){return function(t){if(t.charAt(1)==="#"){var n=t.charAt(2);return n==="X"||n==="x"?tg.default(parseInt(t.substr(3),16)):tg.default(parseInt(t.substr(2),10))}return r[t.slice(1,-1)]||t}}var Cn={},aw=Wo&&Wo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.escapeUTF8=Cn.escape=Cn.encodeNonAsciiHTML=Cn.encodeHTML=Cn.encodeXML=void 0;var u$e=aw(rw),ow=lw(u$e.default),sw=uw(ow);Cn.encodeXML=dw(ow);var c$e=aw(tw),$h=lw(c$e.default),f$e=uw($h);Cn.encodeHTML=h$e($h,f$e);Cn.encodeNonAsciiHTML=dw($h);function lw(r){return Object.keys(r).sort().reduce(function(e,t){return e[r[t]]="&"+t+";",e},{})}function uw(r){for(var e=[],t=[],n=0,i=Object.keys(r);n<i.length;n++){var a=i[n];a.length===1?e.push("\\"+a):t.push(a)}e.sort();for(var o=0;o<e.length-1;o++){for(var s=o;s<e.length-1&&e[s].charCodeAt(1)+1===e[s+1].charCodeAt(1);)s+=1;var l=1+s-o;l<3||e.splice(o,l,e[o]+"-"+e[s])}return t.unshift("["+e.join("")+"]"),new RegExp(t.join("|"),"g")}var cw=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,d$e=String.prototype.codePointAt!=null?function(r){return r.codePointAt(0)}:function(r){return(r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536};function Ju(r){return"&#x"+(r.length>1?d$e(r):r.charCodeAt(0)).toString(16).toUpperCase()+";"}function h$e(r,e){return function(t){return t.replace(e,function(n){return r[n]}).replace(cw,Ju)}}var fw=new RegExp(sw.source+"|"+cw.source,"g");function p$e(r){return r.replace(fw,Ju)}Cn.escape=p$e;function v$e(r){return r.replace(sw,Ju)}Cn.escapeUTF8=v$e;function dw(r){return function(e){return e.replace(fw,function(t){return r[t]||Ju(t)})}}(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.decodeXMLStrict=r.decodeHTML5Strict=r.decodeHTML4Strict=r.decodeHTML5=r.decodeHTML4=r.decodeHTMLStrict=r.decodeHTML=r.decodeXML=r.encodeHTML5=r.encodeHTML4=r.escapeUTF8=r.escape=r.encodeNonAsciiHTML=r.encodeHTML=r.encodeXML=r.encode=r.decodeStrict=r.decode=void 0;var e=Bi,t=Cn;function n(l,f){return(!f||f<=0?e.decodeXML:e.decodeHTML)(l)}r.decode=n;function i(l,f){return(!f||f<=0?e.decodeXML:e.decodeHTMLStrict)(l)}r.decodeStrict=i;function a(l,f){return(!f||f<=0?t.encodeXML:t.encodeHTML)(l)}r.encode=a;var o=Cn;Object.defineProperty(r,"encodeXML",{enumerable:!0,get:function(){return o.encodeXML}}),Object.defineProperty(r,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(r,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(r,"escape",{enumerable:!0,get:function(){return o.escape}}),Object.defineProperty(r,"escapeUTF8",{enumerable:!0,get:function(){return o.escapeUTF8}}),Object.defineProperty(r,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(r,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var s=Bi;Object.defineProperty(r,"decodeXML",{enumerable:!0,get:function(){return s.decodeXML}}),Object.defineProperty(r,"decodeHTML",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(r,"decodeHTMLStrict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(r,"decodeHTML4",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(r,"decodeHTML5",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(r,"decodeHTML4Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(r,"decodeHTML5Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(r,"decodeXMLStrict",{enumerable:!0,get:function(){return s.decodeXML}})})(Vh);var hw="&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});",m$e=92,g$e=/[\\&]/,Wh="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",y$e=new RegExp("\\\\"+Wh+"|"+hw,"gi"),b$e='[&<>"]',ng=new RegExp(b$e,"g"),k$e=function(r){return r.charCodeAt(0)===m$e?r.charAt(1):Vh.decodeHTML(r)};function As(r){return g$e.test(r)?r.replace(y$e,k$e):r}function ql(r){try{return Iae(r)}catch{return r}}function w$e(r){switch(r){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return r}}function Oo(r){return ng.test(r)?r.replace(ng,w$e):r}function zd(r,e){for(var t=[],n=0;n<e;n++)t.push(r);return t.join("")}function ig(r){return r?!/[^ \t]+/.test(r):!0}var C$e=(function(){function r(e){this.current=e,this.root=e,this.entering=!0}return r.prototype.next=function(){var e=this.current,t=this.entering;if(e===null)return null;var n=jh(e);return t&&n?e.firstChild?(this.current=e.firstChild,this.entering=!0):this.entering=!1:e===this.root?this.current=null:e.next===null?(this.current=e.parent,this.entering=!1):(this.current=e.next,this.entering=!0),{entering:t,node:e}},r.prototype.resumeAt=function(e,t){this.current=e,this.entering=t===!0},r})();function jh(r){switch(r.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}var T$e=1,Yu={};function S$e(r){return Yu[r]}function Vd(r){delete Yu[r]}function x$e(){Yu={}}var Ws=(function(){function r(e,t){this.parent=null,this.prev=null,this.next=null,this.firstChild=null,this.lastChild=null,this.literal=null,e==="document"?this.id=-1:this.id=T$e++,this.type=e,this.sourcepos=t,Yu[this.id]=this}return r.prototype.isContainer=function(){return jh(this)},r.prototype.unlink=function(){this.prev?this.prev.next=this.next:this.parent&&(this.parent.firstChild=this.next),this.next?this.next.prev=this.prev:this.parent&&(this.parent.lastChild=this.prev),this.parent=null,this.next=null,this.prev=null},r.prototype.replaceWith=function(e){this.insertBefore(e),this.unlink()},r.prototype.insertAfter=function(e){e.unlink(),e.next=this.next,e.next&&(e.next.prev=e),e.prev=this,this.next=e,this.parent&&(e.parent=this.parent,e.next||(e.parent.lastChild=e))},r.prototype.insertBefore=function(e){e.unlink(),e.prev=this.prev,e.prev&&(e.prev.next=e),e.next=this,this.prev=e,e.parent=this.parent,e.prev||(e.parent.firstChild=e)},r.prototype.appendChild=function(e){e.unlink(),e.parent=this,this.lastChild?(this.lastChild.next=e,e.prev=this.lastChild,this.lastChild=e):(this.firstChild=e,this.lastChild=e)},r.prototype.prependChild=function(e){e.unlink(),e.parent=this,this.firstChild?(this.firstChild.prev=e,e.next=this.firstChild,this.firstChild=e):(this.firstChild=e,this.lastChild=e)},r.prototype.walker=function(){return new C$e(this)},r})(),Hi=(function(r){_n(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.open=!0,i.lineOffsets=null,i.stringContent=null,i.lastLineBlank=!1,i.lastLineChecked=!1,i.type=t,i}return e})(Ws),E$e=(function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.listData=null,t}return e})(Hi),M$e=(function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.level=0,t.headingType="atx",t}return e})(Hi),A$e=(function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.isFenced=!1,t.fenceChar=null,t.fenceLength=0,t.fenceOffset=-1,t.info=null,t.infoPadding=0,t}return e})(Hi),O$e=(function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.columns=[],t}return e})(Hi),N$e=(function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.startIdx=0,t.endIdx=0,t.paddingLeft=0,t.paddingRight=0,t.ignored=!1,t}return e})(Hi),D$e=(function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.title="",t.dest="",t.label="",t}return e})(Hi),L$e=(function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.syntaxLength=0,t.offset=-1,t.info="",t}return e})(Hi),R$e=(function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.htmlBlockType=-1,t}return e})(Hi),I$e=(function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.destination=null,t.title=null,t.extendedAutolink=!1,t}return e})(Ws),P$e=(function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.tickCount=0,t}return e})(Ws),B$e=(function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.info="",t}return e})(Ws);function fr(r,e){switch(r){case"heading":return new M$e(r,e);case"list":case"item":return new E$e(r,e);case"link":case"image":return new I$e(r,e);case"codeBlock":return new A$e(r,e);case"htmlBlock":return new R$e(r,e);case"table":return new O$e(r,e);case"tableCell":return new N$e(r,e);case"document":case"paragraph":case"blockQuote":case"thematicBreak":case"tableRow":case"tableBody":case"tableHead":case"frontMatter":return new Hi(r,e);case"code":return new P$e(r,e);case"refDef":return new D$e(r,e);case"customBlock":return new L$e(r,e);case"customInline":return new B$e(r,e);default:return new Ws(r,e)}}function pw(r){return r.type==="codeBlock"}function F$e(r){return r.type==="htmlBlock"}function q$e(r){return r.type==="heading"}function ag(r){return r.type==="list"}function H$e(r){return r.type==="table"}function To(r){return r.type==="refDef"}function vw(r){return r.type==="customBlock"}function _$e(r){return r.type==="customInline"}function br(r,e){var t=fr("text",e);return t.literal=r,t}var mw="[A-Za-z][A-Za-z0-9-]*",z$e="[a-zA-Z_:][a-zA-Z0-9:._-]*",V$e="[^\"'=<>`\\x00-\\x20]+",U$e="'[^']*'",$$e='"[^"]*"',W$e="(?:"+V$e+"|"+U$e+"|"+$$e+")",j$e="(?:\\s*=\\s*"+W$e+")",G$e="(?:\\s+"+z$e+j$e+"?)",gw="<"+mw+G$e+"*\\s*/?>",yw="</"+mw+"\\s*[>]",K$e="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",J$e="[<][?].*?[?][>]",Y$e="<![A-Z]+\\s+[^>]*>",X$e="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Z$e="(?:"+gw+"|"+yw+"|"+K$e+"|"+J$e+"|"+Y$e+"|"+X$e+")",Q$e=new RegExp("^"+Z$e,"i");/*! http://mths.be/fromcodepoint v0.2.1 by @mathias */var Ud;if(String.fromCodePoint)Ud=function(r){try{return String.fromCodePoint(r)}catch(e){if(e instanceof RangeError)return"�";throw e}};else{var eWe=String.fromCharCode,tWe=Math.floor;Ud=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=16384,n=[],i,a,o=-1,s=r.length;if(!s)return"";for(var l="";++o<s;){var f=Number(r[o]);if(!isFinite(f)||f<0||f>1114111||tWe(f)!==f)return"�";f<=65535?n.push(f):(f-=65536,i=(f>>10)+55296,a=f%1024+56320,n.push(i,a)),(o+1===s||n.length>t)&&(l+=eWe.apply(void 0,n),n.length=0)}return l}}var Yf=Ud,rWe="(?:[w-]+.)*[A-Za-z0-9-]+.[A-Za-z0-9-]+",nWe="[^<\\s]*[^<?!.,:*_?~\\s]",iWe="[\\w.+-]+@(?:[\\w-]+\\.)+[\\w-]+";function aWe(r){var e=/\)+$/.exec(r);if(e){for(var t=0,n=0,i=r;n<i.length;n++){var a=i[n];a==="("?t<0?t=1:t+=1:a===")"&&(t-=1)}if(t<0){var o=Math.min(-t,e[0].length);return r.substring(0,r.length-o)}}return r}function oWe(r){return r.replace(/&[A-Za-z0-9]+;$/,"")}function sWe(r){for(var e=new RegExp(iWe,"g"),t=[],n;n=e.exec(r);){var i=n[0];/[_-]+$/.test(i)||t.push({text:i,range:[n.index,n.index+i.length-1],url:"mailto:"+i})}return t}function lWe(r){for(var e=new RegExp("(www|https?://)."+rWe+nWe,"g"),t=[],n;n=e.exec(r);){var i=oWe(aWe(n[0])),a=n[1]==="www"?"http://":"";t.push({text:i,range:[n.index,n.index+i.length-1],url:""+a+i})}return t}function uWe(r){return Hd(Hd([],lWe(r)),sWe(r)).sort(function(e,t){return e.range[0]-t.range[0]})}function cWe(r,e){typeof e=="boolean"&&(e=uWe);for(var t,n=function(){var i=t.entering,a=t.node;if(i&&a.type==="text"&&a.parent.type!=="link"){var o=a.literal,s=e(o);if(!s||!s.length)return"continue";for(var l=0,f=a.sourcepos[0],p=f[0],b=f[1],T=function(ge,xe){return[[p,b+ge],[p,b+xe]]},x=[],E=0,P=s;E<P.length;E++){var F=P[E],z=F.range,Y=F.url,ee=F.text;z[0]>l&&x.push(br(o.substring(l,z[0]),T(l,z[0]-1)));var se=fr("link",T.apply(void 0,z));se.appendChild(br(ee,T.apply(void 0,z))),se.destination=Y,se.extendedAutolink=!0,x.push(se),l=z[1]+1}l<o.length&&x.push(br(o.substring(l),T(l,o.length-1)));for(var de=0,oe=x;de<oe.length;de++){var le=oe[de];a.insertBefore(le)}a.unlink()}};t=r.next();)n()}function Su(r){return r[r.length-1]}function og(r){return r.slice(1,r.length-1).trim().replace(/[ \t\r\n]+/," ").toLowerCase().toUpperCase()}function Hl(r,e){Object.keys(r).forEach(function(t){e(t,r[t])})}function fWe(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var n=Rr({},r);return e.forEach(function(i){delete n[i]}),n}function So(r){return!Object.keys(r).length}function dWe(r){Object.keys(r).forEach(function(e){delete r[e]})}var $d=10,Xf=42,_l=95,hWe=96,sg=91,pWe=93,zl=126,lg=60,vWe=33,ug=92,mWe=38,cg=40,Zf=41,gWe=58,Oa=39,Na=34,Da=36,Qf="\\\\"+Wh,fg=new RegExp(/[!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/),yWe=new RegExp('^(?:"('+Qf+'|[^"\\x00])*"|'+("'("+Qf+"|[^'\\x00])*'")+"|"+("\\(("+Qf+"|[^()\\x00])*\\))")),bWe=/^(?:<(?:[^<>\n\\\x00]|\\.)*>)/,dg=new RegExp("^"+Wh),kWe=new RegExp("^"+hw,"i"),wWe=/`+/,CWe=/^`+/,TWe=/\.\.\./g,SWe=/--+/g,xWe=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,EWe=/^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*>/i,MWe=/^ *(?:\n *)?/,ed=/^[ \t\n\x0b\x0c\x0d]/,hg=/^\s/,AWe=/ *$/,OWe=/^ */,pg=/^ *(?:\n|$)/,NWe=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/,DWe=/^[^\n`\[\]\\!<&*_'"~$]+/m,LWe=(function(){function r(e){this.subject="",this.delimiters=null,this.brackets=null,this.pos=0,this.lineStartNum=0,this.lineIdx=0,this.lineOffsets=[0],this.linePosOffset=0,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.options=e}return r.prototype.sourcepos=function(e,t){var n=this.linePosOffset+this.lineOffsets[this.lineIdx],i=this.lineStartNum+this.lineIdx,a=[i,e+n];return typeof t=="number"?[a,[i,t+n]]:a},r.prototype.nextLine=function(){this.lineIdx+=1,this.linePosOffset=-this.pos},r.prototype.match=function(e){var t=e.exec(this.subject.slice(this.pos));return t===null?null:(this.pos+=t.index+t[0].length,t[0])},r.prototype.peek=function(){return this.pos<this.subject.length?this.subject.charCodeAt(this.pos):-1},r.prototype.spnl=function(){return this.match(MWe),!0},r.prototype.parseBackticks=function(e){var t=this.pos+1,n=this.match(CWe);if(n===null)return!1;for(var i=this.pos,a;(a=this.match(wWe))!==null;)if(a===n){var o=this.subject.slice(i,this.pos-n.length),s=this.sourcepos(t,this.pos),l=o.split(`
|
|
50
|
-
`);if(l.length>1){var f=Su(l);this.lineIdx+=l.length-1,this.linePosOffset=-(this.pos-f.length-n.length),s[1]=this.sourcepos(this.pos),o=l.join(" ")}var p=fr("code",s);return o.length>0&&o.match(/[^ ]/)!==null&&o[0]==" "&&o[o.length-1]==" "?p.literal=o.slice(1,o.length-1):p.literal=o,p.tickCount=n.length,e.appendChild(p),!0}return this.pos=i,e.appendChild(br(n,this.sourcepos(t,this.pos-1))),!0},r.prototype.parseBackslash=function(e){var t=this.subject,n;this.pos+=1;var i=this.pos;return this.peek()===$d?(this.pos+=1,n=fr("linebreak",this.sourcepos(this.pos-1,this.pos)),e.appendChild(n),this.nextLine()):dg.test(t.charAt(this.pos))?(e.appendChild(br(t.charAt(this.pos),this.sourcepos(i,this.pos))),this.pos+=1):e.appendChild(br("\\",this.sourcepos(i,i))),!0},r.prototype.parseAutolink=function(e){var t,n,i,a=this.pos+1;return(t=this.match(xWe))?(n=t.slice(1,t.length-1),i=fr("link",this.sourcepos(a,this.pos)),i.destination=ql("mailto:"+n),i.title="",i.appendChild(br(n,this.sourcepos(a+1,this.pos-1))),e.appendChild(i),!0):(t=this.match(EWe))?(n=t.slice(1,t.length-1),i=fr("link",this.sourcepos(a,this.pos)),i.destination=ql(n),i.title="",i.appendChild(br(n,this.sourcepos(a+1,this.pos-1))),e.appendChild(i),!0):!1},r.prototype.parseHtmlTag=function(e){var t=this.pos+1,n=this.match(Q$e);if(n===null)return!1;var i=fr("htmlInline",this.sourcepos(t,this.pos));return i.literal=n,e.appendChild(i),!0},r.prototype.scanDelims=function(e){var t=0,n=this.pos;if(e===Oa||e===Na)t++,this.pos++;else for(;this.peek()===e;)t++,this.pos++;if(t===0||t<2&&(e===zl||e===Da))return this.pos=n,null;var i=n===0?`
|
|
51
|
-
`:this.subject.charAt(n-1),a=this.peek(),o;a===-1?o=`
|
|
52
|
-
`:o=Yf(a);var s=hg.test(o),l=fg.test(o),f=hg.test(i),p=fg.test(i),b=!s&&(!l||f||p),T=!f&&(!p||s||l),x,E;return e===_l?(x=b&&(!T||p),E=T&&(!b||l)):e===Oa||e===Na?(x=b&&!T,E=T):e===Da?(x=!s,E=!f):(x=b,E=T),this.pos=n,{numdelims:t,canOpen:x,canClose:E}},r.prototype.handleDelim=function(e,t){var n=this.scanDelims(e);if(!n)return!1;var i=n.numdelims,a=this.pos+1,o;this.pos+=i,e===Oa?o="’":e===Na?o="“":o=this.subject.slice(a-1,this.pos);var s=br(o,this.sourcepos(a,this.pos));return t.appendChild(s),(n.canOpen||n.canClose)&&(this.options.smart||e!==Oa&&e!==Na)&&(this.delimiters={cc:e,numdelims:i,origdelims:i,node:s,previous:this.delimiters,next:null,canOpen:n.canOpen,canClose:n.canClose},this.delimiters.previous&&(this.delimiters.previous.next=this.delimiters)),!0},r.prototype.removeDelimiter=function(e){e.previous!==null&&(e.previous.next=e.next),e.next===null?this.delimiters=e.previous:e.next.previous=e.previous},r.prototype.removeDelimitersBetween=function(e,t){e.next!==t&&(e.next=t,t.previous=e)},r.prototype.processEmphasis=function(e){var t,n,i,a,o,s,l,f=!1,p=(t={},t[_l]=[e,e,e],t[Xf]=[e,e,e],t[Oa]=[e],t[Na]=[e],t[zl]=[e],t[Da]=[e],t);for(i=this.delimiters;i!==null&&i.previous!==e;)i=i.previous;for(;i!==null;){var b=i.cc,T=b===_l||b===Xf;if(!i.canClose)i=i.next;else{for(n=i.previous,l=!1;n!==null&&n!==e&&n!==p[b][T?i.origdelims%3:0];){if(f=T&&(i.canOpen||n.canClose)&&i.origdelims%3!==0&&(n.origdelims+i.origdelims)%3===0,n.cc===i.cc&&n.canOpen&&!f){l=!0;break}n=n.previous}if(a=i,T||b===zl||b===Da){if(!l)i=i.next;else if(n){var x=i.numdelims>=2&&n.numdelims>=2?2:1,E=T?0:1;o=n.node,s=i.node;var P=T?x===1?"emph":"strong":"strike";b===Da&&(P="customInline");var F=fr(P),z=o.sourcepos[1],Y=s.sourcepos[0];F.sourcepos=[[z[0],z[1]-x+1],[Y[0],Y[1]+x-1]],o.sourcepos[1][1]-=x,s.sourcepos[0][1]+=x,o.literal=o.literal.slice(x),s.literal=s.literal.slice(x),n.numdelims-=x,i.numdelims-=x;for(var ee=o.next,se=void 0;ee&&ee!==s;)se=ee.next,ee.unlink(),F.appendChild(ee),ee=se;if(b===Da){var de=F.firstChild,oe=de.literal||"",le=oe.split(/\s/)[0];F.info=le,oe.length<=le.length?de.unlink():(de.sourcepos[0][1]+=le.length,de.literal=oe.replace(le+" ",""))}if(o.insertAfter(F),this.removeDelimitersBetween(n,i),n.numdelims<=E&&(n.numdelims===0&&o.unlink(),this.removeDelimiter(n)),i.numdelims<=E){i.numdelims===0&&s.unlink();var ge=i.next;this.removeDelimiter(i),i=ge}}}else b===Oa?(i.node.literal="’",l&&(n.node.literal="‘"),i=i.next):b===Na&&(i.node.literal="”",l&&(n.node.literal="“"),i=i.next);l||(p[b][T?a.origdelims%3:0]=a.previous,a.canOpen||this.removeDelimiter(a))}}for(;this.delimiters!==null&&this.delimiters!==e;)this.removeDelimiter(this.delimiters)},r.prototype.parseLinkTitle=function(){var e=this.match(yWe);return e===null?null:As(e.substr(1,e.length-2))},r.prototype.parseLinkDestination=function(){var e=this.match(bWe);if(e===null){if(this.peek()===lg)return null;for(var t=this.pos,n=0,i=void 0;(i=this.peek())!==-1;)if(i===ug&&dg.test(this.subject.charAt(this.pos+1)))this.pos+=1,this.peek()!==-1&&(this.pos+=1);else if(i===cg)this.pos+=1,n+=1;else if(i===Zf){if(n<1)break;this.pos+=1,n-=1}else{if(ed.exec(Yf(i))!==null)break;this.pos+=1}return this.pos===t&&i!==Zf||n!==0?null:(e=this.subject.substr(t,this.pos-t),ql(As(e)))}return ql(As(e.substr(1,e.length-2)))},r.prototype.parseLinkLabel=function(){var e=this.match(NWe);return e===null||e.length>1001?0:e.length},r.prototype.parseOpenBracket=function(e){var t=this.pos;this.pos+=1;var n=br("[",this.sourcepos(this.pos,this.pos));return e.appendChild(n),this.addBracket(n,t,!1),!0},r.prototype.parseBang=function(e){var t=this.pos;if(this.pos+=1,this.peek()===sg){this.pos+=1;var n=br("![",this.sourcepos(this.pos-1,this.pos));e.appendChild(n),this.addBracket(n,t+1,!0)}else{var n=br("!",this.sourcepos(this.pos,this.pos));e.appendChild(n)}return!0},r.prototype.parseCloseBracket=function(e){var t=null,n=null,i=!1;this.pos+=1;var a=this.pos,o=this.brackets;if(o===null)return e.appendChild(br("]",this.sourcepos(a,a))),!0;if(!o.active)return e.appendChild(br("]",this.sourcepos(a,a))),this.removeBracket(),!0;var s=o.image,l=this.pos;this.peek()===cg&&(this.pos++,this.spnl()&&(t=this.parseLinkDestination())!==null&&this.spnl()&&(ed.test(this.subject.charAt(this.pos-1))&&(n=this.parseLinkTitle())||!0)&&this.spnl()&&this.peek()===Zf?(this.pos+=1,i=!0):this.pos=l);var f="";if(!i){var p=this.pos,b=this.parseLinkLabel();if(b>2?f=this.subject.slice(p,p+b):o.bracketAfter||(f=this.subject.slice(o.index,a)),b===0&&(this.pos=l),f){f=og(f);var T=this.refMap[f];T&&(t=T.destination,n=T.title,i=!0)}}if(i){var x=fr(s?"image":"link");x.destination=t,x.title=n||"",x.sourcepos=[o.startpos,this.sourcepos(this.pos)];for(var E=o.node.next,P=void 0;E;)P=E.next,E.unlink(),x.appendChild(E),E=P;if(e.appendChild(x),this.processEmphasis(o.previousDelimiter),this.removeBracket(),o.node.unlink(),!s)for(o=this.brackets;o!==null;)o.image||(o.active=!1),o=o.previous;return this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:f}),!0}return this.removeBracket(),this.pos=a,e.appendChild(br("]",this.sourcepos(a,a))),this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:f}),!0},r.prototype.addBracket=function(e,t,n){this.brackets!==null&&(this.brackets.bracketAfter=!0),this.brackets={node:e,startpos:this.sourcepos(t+(n?0:1)),previous:this.brackets,previousDelimiter:this.delimiters,index:t,image:n,active:!0}},r.prototype.removeBracket=function(){this.brackets&&(this.brackets=this.brackets.previous)},r.prototype.parseEntity=function(e){var t,n=this.pos+1;return(t=this.match(kWe))?(e.appendChild(br(Vh.decodeHTML(t),this.sourcepos(n,this.pos))),!0):!1},r.prototype.parseString=function(e){var t,n=this.pos+1;if(t=this.match(DWe)){if(this.options.smart){var i=t.replace(TWe,"…").replace(SWe,function(o){var s=0,l=0;return o.length%3===0?l=o.length/3:o.length%2===0?s=o.length/2:o.length%3===2?(s=1,l=(o.length-2)/3):(s=2,l=(o.length-4)/3),zd("—",l)+zd("–",s)});e.appendChild(br(i,this.sourcepos(n,this.pos)))}else{var a=br(t,this.sourcepos(n,this.pos));e.appendChild(a)}return!0}return!1},r.prototype.parseNewline=function(e){this.pos+=1;var t=e.lastChild;if(t&&t.type==="text"&&t.literal[t.literal.length-1]===" "){var n=t.literal[t.literal.length-2]===" ",i=t.literal.length;t.literal=t.literal.replace(AWe,"");var a=i-t.literal.length;t.sourcepos[1][1]-=a,e.appendChild(fr(n?"linebreak":"softbreak",this.sourcepos(this.pos-a,this.pos)))}else e.appendChild(fr("softbreak",this.sourcepos(this.pos,this.pos)));return this.nextLine(),this.match(OWe),!0},r.prototype.parseReference=function(e,t){if(!this.options.referenceDefinition)return 0;this.subject=e.stringContent,this.pos=0;var n=null,i=this.pos,a=this.parseLinkLabel();if(a===0)return 0;var o=this.subject.substr(0,a);if(this.peek()===gWe)this.pos++;else return this.pos=i,0;this.spnl();var s=this.parseLinkDestination();if(s===null)return this.pos=i,0;var l=this.pos;this.spnl(),this.pos!==l&&(n=this.parseLinkTitle()),n===null&&(n="",this.pos=l);var f=!0;if(this.match(pg)===null&&(n===""?f=!1:(n="",this.pos=l,f=this.match(pg)!==null)),!f)return this.pos=i,0;var p=og(o);if(p==="")return this.pos=i,0;var b=this.getReferenceDefSourcepos(e);e.sourcepos[0][0]=b[1][0]+1;var T=fr("refDef",b);return T.title=n,T.dest=s,T.label=p,e.insertBefore(T),t[p]?this.refDefCandidateMap[T.id]=T:t[p]=Gd(T),this.pos-i},r.prototype.mergeTextNodes=function(e){for(var t,n=[];t=e.next();){var i=t.entering,a=t.node;if(i&&a.type==="text")n.push(a);else if(n.length===1)n=[];else if(n.length>1){var o=n[0],s=n[n.length-1];o.sourcepos&&s.sourcepos&&(o.sourcepos[1]=s.sourcepos[1]),o.next=s.next,o.next&&(o.next.prev=o);for(var l=1;l<n.length;l+=1)o.literal+=n[l].literal,n[l].unlink();n=[]}}},r.prototype.getReferenceDefSourcepos=function(e){for(var t=e.stringContent.split(/\n|\r\n/),n=!1,i=0,a={line:0,ch:0},o=0;o<t.length;o+=1){var s=t[o];if(ed.test(s))break;if(/\:/.test(s)&&i===0){if(n)break;var l=s.indexOf(":")===s.length-1?o+1:o;a={line:l,ch:t[l].length},n=!0}var f=s.match(/'|"/g);if(f&&(i+=f.length),i===2){a={line:o,ch:s.length};break}}return[[e.sourcepos[0][0],e.sourcepos[0][1]],[e.sourcepos[0][0]+a.line,a.ch]]},r.prototype.parseInline=function(e){var t,n=!1,i=this.peek();if(i===-1)return!1;switch(i){case $d:n=this.parseNewline(e);break;case ug:n=this.parseBackslash(e);break;case hWe:n=this.parseBackticks(e);break;case Xf:case _l:case zl:case Da:n=this.handleDelim(i,e);break;case Oa:case Na:n=!!(!((t=this.options)===null||t===void 0)&&t.smart)&&this.handleDelim(i,e);break;case sg:n=this.parseOpenBracket(e);break;case vWe:n=this.parseBang(e);break;case pWe:n=this.parseCloseBracket(e);break;case lg:n=this.parseAutolink(e)||this.parseHtmlTag(e);break;case mWe:e.disabledEntityParse||(n=this.parseEntity(e));break;default:n=this.parseString(e);break}return n||(this.pos+=1,e.appendChild(br(Yf(i),this.sourcepos(this.pos,this.pos+1)))),!0},r.prototype.parse=function(e){for(this.subject=e.stringContent.trim(),this.pos=0,this.delimiters=null,this.brackets=null,this.lineOffsets=e.lineOffsets||[0],this.lineIdx=0,this.linePosOffset=0,this.lineStartNum=e.sourcepos[0][0],q$e(e)&&(this.lineOffsets[0]+=e.level+1);this.parseInline(e););e.stringContent=null,this.processEmphasis(null),this.mergeTextNodes(e.walker());var t=this.options,n=t.extendedAutolinks,i=t.customParser;if(n&&cWe(e.walker(),n),i&&e.firstChild)for(var a,o=e.firstChild.walker();a=o.next();){var s=a.node,l=a.entering;i[s.type]&&i[s.type](s,{entering:l,options:this.options})}},r})(),RWe=/^\[([ \txX])\][ \t]+/;function IWe(r,e){if(e.firstChild&&e.firstChild.type==="paragraph"){var t=e.firstChild,n=t.stringContent.match(RWe);if(n){var i=n[0].length;t.stringContent=t.stringContent.substring(i-1),t.sourcepos[0][1]+=i,t.lineOffsets[0]+=i,e.listData.task=!0,e.listData.checked=/[xX]/.test(n[1])}}}var PWe={continue:function(){return 0},finalize:function(){},canContain:function(r){return r==="tableHead"||r==="tableBody"},acceptsLines:!1},BWe={continue:function(){return 0},finalize:function(){},canContain:function(r){return r==="tableRow"},acceptsLines:!1},FWe={continue:function(){return 1},finalize:function(){},canContain:function(r){return r==="tableRow"||r==="tableDelimRow"},acceptsLines:!1},qWe={continue:function(){return 1},finalize:function(){},canContain:function(r){return r==="tableDelimCell"},acceptsLines:!1},HWe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},_We={continue:function(){return 1},finalize:function(){},canContain:function(r){return r==="tableCell"},acceptsLines:!1},zWe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},xu=4,bw=9,kw=62,VWe=60,ww=32,Cw=91,Tw=/[^ \t\f\v\r\n]/,UWe=/^(?:`{3,}|~{3,})(?= *$)/;function vg(r){for(var e=r;e;){if(e.lastLineBlank)return!0;var t=e.type;if(!e.lastLineChecked&&(t==="list"||t==="item"))e.lastLineChecked=!0,e=e.lastChild;else{e.lastLineChecked=!0;break}}return!1}function Tn(r,e){return e<r.length?r.charCodeAt(e):-1}function Sw(r){return!Tw.test(r)}function jo(r){return r===ww||r===bw}var $We=/^\$\$$/,WWe={continue:function(r,e){var t=r.currentLine,n=t.match($We);if(n)return r.lastLineLength=n[0].length,r.finalize(e,r.lineNumber),2;for(var i=e.offset;i>0&&jo(Tn(t,r.offset));)r.advanceOffset(1,!0),i--;return 0},finalize:function(r,e){if(e.stringContent!==null){var t=e.stringContent,n=t.indexOf(`
|
|
53
|
-
`),i=t.slice(0,n),a=t.slice(n+1),o=i.match(/^(\s*)(.*)/);e.info=As(o[2].trim()),e.literal=a,e.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},xw={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!0},jWe={continue:function(){return 0},finalize:function(){},canContain:function(r){return r!=="item"},acceptsLines:!1},GWe={continue:function(){return 0},finalize:function(r,e){for(var t=e.firstChild;t;){if(vg(t)&&t.next){e.listData.tight=!1;break}for(var n=t.firstChild;n;){if(vg(n)&&(t.next||n.next)){e.listData.tight=!1;break}n=n.next}t=t.next}},canContain:function(r){return r==="item"},acceptsLines:!1},KWe={continue:function(r){var e=r.currentLine;if(!r.indented&&Tn(e,r.nextNonspace)===kw)r.advanceNextNonspace(),r.advanceOffset(1,!1),jo(Tn(e,r.offset))&&r.advanceOffset(1,!0);else return 1;return 0},finalize:function(){},canContain:function(r){return r!=="item"},acceptsLines:!1},JWe={continue:function(r,e){if(r.blank){if(e.firstChild===null)return 1;r.advanceNextNonspace()}else if(r.indent>=e.listData.markerOffset+e.listData.padding)r.advanceOffset(e.listData.markerOffset+e.listData.padding,!0);else return 1;return 0},finalize:IWe,canContain:function(r){return r!=="item"},acceptsLines:!1},YWe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},XWe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},ZWe={continue:function(r,e){var t=r.currentLine,n=r.indent;if(e.isFenced){var i=n<=3&&t.charAt(r.nextNonspace)===e.fenceChar&&t.slice(r.nextNonspace).match(UWe);if(i&&i[0].length>=e.fenceLength)return r.lastLineLength=r.offset+n+i[0].length,r.finalize(e,r.lineNumber),2;for(var a=e.fenceOffset;a>0&&jo(Tn(t,r.offset));)r.advanceOffset(1,!0),a--}else if(n>=xu)r.advanceOffset(xu,!0);else if(r.blank)r.advanceNextNonspace();else return 1;return 0},finalize:function(r,e){var t;if(e.stringContent!==null){if(e.isFenced){var n=e.stringContent,i=n.indexOf(`
|
|
54
|
-
`),a=n.slice(0,i),o=n.slice(i+1),s=a.match(/^(\s*)(.*)/);e.infoPadding=s[1].length,e.info=As(s[2].trim()),e.literal=o}else e.literal=(t=e.stringContent)===null||t===void 0?void 0:t.replace(/(\n *)+$/,`
|
|
55
|
-
`);e.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},QWe={continue:function(r,e){return r.blank&&(e.htmlBlockType===6||e.htmlBlockType===7)?1:0},finalize:function(r,e){var t;e.literal=((t=e.stringContent)===null||t===void 0?void 0:t.replace(/(\n *)+$/,""))||null,e.stringContent=null},canContain:function(){return!1},acceptsLines:!0},e3e={continue:function(r){return r.blank?1:0},finalize:function(r,e){if(e.stringContent!==null){for(var t,n=!1;Tn(e.stringContent,0)===Cw&&(t=r.inlineParser.parseReference(e,r.refMap));)e.stringContent=e.stringContent.slice(t),n=!0;n&&Sw(e.stringContent)&&e.unlink()}},canContain:function(){return!1},acceptsLines:!0},t3e=xw,r3e=xw,xo={document:jWe,list:GWe,blockQuote:KWe,item:JWe,heading:YWe,thematicBreak:XWe,codeBlock:ZWe,htmlBlock:QWe,paragraph:e3e,table:PWe,tableBody:BWe,tableHead:FWe,tableRow:_We,tableCell:zWe,tableDelimRow:qWe,tableDelimCell:HWe,refDef:t3e,customBlock:WWe,frontMatter:r3e};function Wd(r){for(var e=0,t=0,n=[],i=0;i<r.length;i+=1)if(r[i]==="|"&&r[i-1]!=="\\"){var a=r.substring(e,i);e===0&&ig(a)?t=i+1:n.push(a),e=i+1}if(e<r.length){var a=r.substring(e,r.length);ig(a)||n.push(a)}return[t,n]}function jd(r,e,t,n){for(var i=[],a=0,o=e;a<o.length;a++){var s=o[a],l=s.match(/^[ \t]+/),f=l?l[0].length:0,p=void 0,b=void 0;if(f===s.length)f=0,p=0,b="";else{var T=s.match(/[ \t]+$/);p=T?T[0].length:0,b=s.slice(f,s.length-p)}var x=n+f,E=fr(r,[[t,n],[t,n+s.length-1]]);E.stringContent=b.replace(/\\\|/g,"|"),E.startIdx=i.length,E.endIdx=i.length,E.lineOffsets=[x-1],E.paddingLeft=f,E.paddingRight=p,i.push(E),n+=s.length+1}return i}function n3e(r){var e=null,t=r.stringContent,n=t[0],i=t[t.length-1];return i===":"?e=n===":"?"center":"right":n===":"&&(e="left"),{align:e}}var i3e=function(r,e){var t=e.stringContent;if(e.type==="paragraph"&&!r.indented&&!r.blank){var n=t.length-1,i=t.lastIndexOf(`
|
|
56
|
-
`,n-1)+1,a=t.slice(i,n),o=r.currentLine.slice(r.nextNonspace),s=Wd(a),l=s[0],f=s[1],p=Wd(o),b=p[0],T=p[1],x=/^[ \t]*:?-+:?[ \t]*$/;if(!f.length||!T.length||T.some(function(ge){return!x.test(ge)})||T.length===1&&o.indexOf("|")!==0)return 0;var E=e.lineOffsets,P=r.lineNumber-1,F=Su(E)+1,z=fr("table",[[P,F],[r.lineNumber,r.offset]]);if(z.columns=T.map(function(){return{align:null}}),e.insertAfter(z),E.length===1)e.unlink();else{e.stringContent=t.slice(0,i);var Y=t.lastIndexOf(`
|
|
57
|
-
`,i-2)+1,ee=i-Y-1;r.lastLineLength=E[E.length-2]+ee,r.finalize(e,P-1)}r.advanceOffset(r.currentLine.length-r.offset,!1);var se=fr("tableHead",[[P,F],[r.lineNumber,r.offset]]);z.appendChild(se);var de=fr("tableRow",[[P,F],[P,F+a.length-1]]),oe=fr("tableDelimRow",[[r.lineNumber,r.nextNonspace+1],[r.lineNumber,r.offset]]);se.appendChild(de),se.appendChild(oe),jd("tableCell",f,P,F+l).forEach(function(ge){de.appendChild(ge)});var le=jd("tableDelimCell",T,r.lineNumber,r.nextNonspace+1+b);return le.forEach(function(ge){oe.appendChild(ge)}),z.columns=le.map(n3e),r.tip=z,2}return 0},a3e=function(r,e){if(e.type!=="table"&&e.type!=="tableBody"||!r.blank&&r.currentLine.indexOf("|")===-1)return 0;if(r.advanceOffset(r.currentLine.length-r.offset,!1),r.blank){var t=e;return e.type==="tableBody"&&(t=e.parent,r.finalize(e,r.lineNumber-1)),r.finalize(t,r.lineNumber-1),0}var n=e;e.type==="table"&&(n=r.addChild("tableBody",r.nextNonspace),n.stringContent=null);var i=fr("tableRow",[[r.lineNumber,r.nextNonspace+1],[r.lineNumber,r.currentLine.length]]);n.appendChild(i);var a=n.parent,o=r.currentLine.slice(r.nextNonspace),s=Wd(o),l=s[0],f=s[1];return jd("tableCell",f,r.lineNumber,r.nextNonspace+1+l).forEach(function(p,b){b>=a.columns.length&&(p.ignored=!0),i.appendChild(p)}),2},o3e=/^(\$\$)(\s*[a-zA-Z])+/,s3e=/^(\$\$)(\s*[a-zA-Z])+.*(\$\$)/,l3e=function(r){var e;if(!r.indented&&!s3e.test(r.currentLine)&&(e=r.currentLine.match(o3e))){var t=e[1].length;r.closeUnmatchedBlocks();var n=r.addChild("customBlock",r.nextNonspace);return n.syntaxLength=t,n.offset=r.indent,r.advanceNextNonspace(),r.advanceOffset(t,!1),2}return 0},u3e=/^`{3,}(?!.*`)|^~{3,}/,c3e=[/./,/^<(?:script|pre|style)(?:\s|>|$)/i,/^<!--/,/^<[?]/,/^<![A-Z]/,/^<!\[CDATA\[/,/^<[/]?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[123456]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|[/]?[>]|$)/i,new RegExp("^(?:"+gw+"|"+yw+")\\s*$","i")],f3e=/^(?:=+|-+)[ \t]*$/,d3e=/^#{1,6}(?:[ \t]+|$)/,h3e=/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})[ \t]*$/,Ew=/^[*+-]/,Mw=/^(\d{1,9})([.)])/;function p3e(r,e){var t=r.currentLine.slice(r.nextNonspace),n,i,a={type:"bullet",tight:!0,bulletChar:"",start:0,delimiter:"",padding:0,markerOffset:r.indent,task:!1,checked:!1};if(r.indent>=4)return null;if(n=t.match(Ew))a.type="bullet",a.bulletChar=n[0][0];else if((n=t.match(Mw))&&(e.type!=="paragraph"||n[1]==="1"))a.type="ordered",a.start=parseInt(n[1],10),a.delimiter=n[2];else return null;if(i=Tn(r.currentLine,r.nextNonspace+n[0].length),!(i===-1||i===bw||i===ww)||e.type==="paragraph"&&!r.currentLine.slice(r.nextNonspace+n[0].length).match(Tw))return null;r.advanceNextNonspace(),r.advanceOffset(n[0].length,!0);var o=r.column,s=r.offset;do r.advanceOffset(1,!0),i=Tn(r.currentLine,r.offset);while(r.column-o<5&&jo(i));var l=Tn(r.currentLine,r.offset)===-1,f=r.column-o;return f>=5||f<1||l?(a.padding=n[0].length+1,r.column=o,r.offset=s,jo(Tn(r.currentLine,r.offset))&&r.advanceOffset(1,!0)):a.padding=n[0].length+f,a}function v3e(r,e){return r.type===e.type&&r.delimiter===e.delimiter&&r.bulletChar===e.bulletChar}function Aw(r,e){return r.options.disallowDeepHeading&&(e.type==="blockQuote"||e.type==="item")}var m3e=function(r){return!r.indented&&Tn(r.currentLine,r.nextNonspace)===kw?(r.advanceNextNonspace(),r.advanceOffset(1,!1),jo(Tn(r.currentLine,r.offset))&&r.advanceOffset(1,!0),r.closeUnmatchedBlocks(),r.addChild("blockQuote",r.nextNonspace),1):0},g3e=function(r,e){var t;if(!r.indented&&!Aw(r,e)&&(t=r.currentLine.slice(r.nextNonspace).match(d3e))){r.advanceNextNonspace(),r.advanceOffset(t[0].length,!1),r.closeUnmatchedBlocks();var n=r.addChild("heading",r.nextNonspace);return n.level=t[0].trim().length,n.headingType="atx",n.stringContent=r.currentLine.slice(r.offset).replace(/^[ \t]*#+[ \t]*$/,"").replace(/[ \t]+#+[ \t]*$/,""),r.advanceOffset(r.currentLine.length-r.offset),2}return 0},y3e=function(r){var e;if(!r.indented&&(e=r.currentLine.slice(r.nextNonspace).match(u3e))){var t=e[0].length;r.closeUnmatchedBlocks();var n=r.addChild("codeBlock",r.nextNonspace);return n.isFenced=!0,n.fenceLength=t,n.fenceChar=e[0][0],n.fenceOffset=r.indent,r.advanceNextNonspace(),r.advanceOffset(t,!1),2}return 0},b3e=function(r,e){if(!r.indented&&Tn(r.currentLine,r.nextNonspace)===VWe){var t=r.currentLine.slice(r.nextNonspace),n=r.options.disallowedHtmlBlockTags,i=void 0;for(i=1;i<=7;i++){var a=t.match(c3e[i]);if(a){if(i===7){if(e.type==="paragraph")return 0;if(n.length>0){var o=new RegExp("</?(?:"+n.join("|")+")","i");if(o.test(a[0]))return 0}}r.closeUnmatchedBlocks();var s=r.addChild("htmlBlock",r.offset);return s.htmlBlockType=i,2}}}return 0},k3e=function(r,e){var t;if(e.stringContent!==null&&!r.indented&&e.type==="paragraph"&&!Aw(r,e.parent)&&(t=r.currentLine.slice(r.nextNonspace).match(f3e))){r.closeUnmatchedBlocks();for(var n=void 0;Tn(e.stringContent,0)===Cw&&(n=r.inlineParser.parseReference(e,r.refMap));)e.stringContent=e.stringContent.slice(n);if(e.stringContent.length>0){var i=fr("heading",e.sourcepos);return i.level=t[0][0]==="="?1:2,i.headingType="setext",i.stringContent=e.stringContent,e.insertAfter(i),e.unlink(),r.tip=i,r.advanceOffset(r.currentLine.length-r.offset,!1),2}return 0}return 0},w3e=function(r){return!r.indented&&h3e.test(r.currentLine.slice(r.nextNonspace))?(r.closeUnmatchedBlocks(),r.addChild("thematicBreak",r.nextNonspace),r.advanceOffset(r.currentLine.length-r.offset,!1),2):0},C3e=function(r,e){var t,n=e;return(!r.indented||e.type==="list")&&(t=p3e(r,n))?(r.closeUnmatchedBlocks(),(r.tip.type!=="list"||!v3e(n.listData,t))&&(n=r.addChild("list",r.nextNonspace),n.listData=t),n=r.addChild("item",r.nextNonspace),n.listData=t,1):0},T3e=function(r){return r.indented&&r.tip.type!=="paragraph"&&!r.blank?(r.advanceOffset(xu,!0),r.closeUnmatchedBlocks(),r.addChild("codeBlock",r.offset),2):0},td=[m3e,g3e,y3e,b3e,k3e,w3e,C3e,T3e,i3e,a3e,l3e],Ow=/^(-{3}|\+{3}|;{3})$/,S3e=function(r,e){var t=r.currentLine,n=r.lineNumber,i=r.indented;if(n===1&&!i&&e.type==="document"&&Ow.test(t)){r.closeUnmatchedBlocks();var a=r.addChild("frontMatter",r.nextNonspace);return a.stringContent=t,r.advanceNextNonspace(),r.advanceOffset(t.length,!1),2}return 0},x3e={continue:function(r,e){var t=r.currentLine,n=t.match(Ow);return e.type==="frontMatter"&&n?(e.stringContent+=t,r.lastLineLength=n[0].length,r.finalize(e,r.lineNumber),2):0},finalize:function(r,e){e.stringContent!==null&&(e.literal=e.stringContent,e.stringContent=null)},canContain:function(){return!1},acceptsLines:!0},E3e=[/./,/<\/(?:script|pre|style)>/i,/-->/,/\?>/,/>/,/\]\]>/],M3e=/^[#`~*+_=<>0-9-;$]/,A3e=/\r\n|\n|\r/;function rd(){return fr("document",[[1,1],[0,0]])}var O3e={smart:!1,tagFilter:!1,extendedAutolinks:!1,disallowedHtmlBlockTags:[],referenceDefinition:!1,disallowDeepHeading:!1,customParser:null,frontMatter:!1},N3e=(function(){function r(e){this.options=Rr(Rr({},O3e),e),this.doc=rd(),this.tip=this.doc,this.oldtip=this.doc,this.lineNumber=0,this.offset=0,this.column=0,this.nextNonspace=0,this.nextNonspaceColumn=0,this.indent=0,this.currentLine="",this.indented=!1,this.blank=!1,this.partiallyConsumedTab=!1,this.allClosed=!0,this.lastMatchedContainer=this.doc,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.lastLineLength=0,this.lines=[],this.options.frontMatter&&(xo.frontMatter=x3e,td.unshift(S3e)),this.inlineParser=new LWe(this.options)}return r.prototype.advanceOffset=function(e,t){t===void 0&&(t=!1);for(var n=this.currentLine,i,a,o;e>0&&(o=n[this.offset]);)o===" "?(i=4-this.column%4,t?(this.partiallyConsumedTab=i>e,a=i>e?e:i,this.column+=a,this.offset+=this.partiallyConsumedTab?0:1,e-=a):(this.partiallyConsumedTab=!1,this.column+=i,this.offset+=1,e-=1)):(this.partiallyConsumedTab=!1,this.offset+=1,this.column+=1,e-=1)},r.prototype.advanceNextNonspace=function(){this.offset=this.nextNonspace,this.column=this.nextNonspaceColumn,this.partiallyConsumedTab=!1},r.prototype.findNextNonspace=function(){for(var e=this.currentLine,t=this.offset,n=this.column,i;(i=e.charAt(t))!=="";)if(i===" ")t++,n++;else if(i===" ")t++,n+=4-n%4;else break;this.blank=i===`
|
|
58
|
-
`||i==="\r"||i==="",this.nextNonspace=t,this.nextNonspaceColumn=n,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=xu},r.prototype.addLine=function(){if(this.partiallyConsumedTab){this.offset+=1;var e=4-this.column%4;this.tip.stringContent+=zd(" ",e)}this.tip.lineOffsets?this.tip.lineOffsets.push(this.offset):this.tip.lineOffsets=[this.offset],this.tip.stringContent+=this.currentLine.slice(this.offset)+`
|
|
59
|
-
`},r.prototype.addChild=function(e,t){for(;!xo[this.tip.type].canContain(e);)this.finalize(this.tip,this.lineNumber-1);var n=t+1,i=fr(e,[[this.lineNumber,n],[0,0]]);return i.stringContent="",this.tip.appendChild(i),this.tip=i,i},r.prototype.closeUnmatchedBlocks=function(){if(!this.allClosed){for(;this.oldtip!==this.lastMatchedContainer;){var e=this.oldtip.parent;this.finalize(this.oldtip,this.lineNumber-1),this.oldtip=e}this.allClosed=!0}},r.prototype.finalize=function(e,t){var n=e.parent;e.open=!1,e.sourcepos[1]=[t,this.lastLineLength],xo[e.type].finalize(this,e),this.tip=n},r.prototype.processInlines=function(e){var t,n=this.options.customParser,i=e.walker();for(this.inlineParser.refMap=this.refMap,this.inlineParser.refLinkCandidateMap=this.refLinkCandidateMap,this.inlineParser.refDefCandidateMap=this.refDefCandidateMap,this.inlineParser.options=this.options;t=i.next();){var a=t.node,o=t.entering,s=a.type;n&&n[s]&&n[s](a,{entering:o,options:this.options}),!o&&(s==="paragraph"||s==="heading"||s==="tableCell"&&!a.ignored)&&this.inlineParser.parse(a)}},r.prototype.incorporateLine=function(e){var t=this.doc;this.oldtip=this.tip,this.offset=0,this.column=0,this.blank=!1,this.partiallyConsumedTab=!1,this.lineNumber+=1,e.indexOf("\0")!==-1&&(e=e.replace(/\0/g,"�")),this.currentLine=e;for(var n=!0,i;(i=t.lastChild)&&i.open;){switch(t=i,this.findNextNonspace(),xo[t.type].continue(this,t)){case 0:break;case 1:n=!1;break;case 2:this.lastLineLength=e.length;return;default:throw new Error("continue returned illegal value, must be 0, 1, or 2")}if(!n){t=t.parent;break}}this.allClosed=t===this.oldtip,this.lastMatchedContainer=t;for(var a=t.type!=="paragraph"&&xo[t.type].acceptsLines,o=td.length;!a;){if(this.findNextNonspace(),t.type!=="table"&&t.type!=="tableBody"&&t.type!=="paragraph"&&!this.indented&&!M3e.test(e.slice(this.nextNonspace))){this.advanceNextNonspace();break}for(var s=0;s<o;){var l=td[s](this,t);if(l===1){t=this.tip;break}else if(l===2){t=this.tip,a=!0;break}else s++}if(s===o){this.advanceNextNonspace();break}}if(!this.allClosed&&!this.blank&&this.tip.type==="paragraph")this.addLine();else{this.closeUnmatchedBlocks(),this.blank&&t.lastChild&&(t.lastChild.lastLineBlank=!0);for(var f=t.type,p=this.blank&&!(f==="blockQuote"||pw(t)&&t.isFenced||f==="item"&&!t.firstChild&&t.sourcepos[0][0]===this.lineNumber),b=t;b;)b.lastLineBlank=p,b=b.parent;xo[f].acceptsLines?(this.addLine(),F$e(t)&&t.htmlBlockType>=1&&t.htmlBlockType<=5&&E3e[t.htmlBlockType].test(this.currentLine.slice(this.offset))&&(this.lastLineLength=e.length,this.finalize(t,this.lineNumber))):this.offset<e.length&&!this.blank&&(t=this.addChild("paragraph",this.offset),this.advanceNextNonspace(),this.addLine())}this.lastLineLength=e.length},r.prototype.parse=function(e,t){this.doc=rd(),this.tip=this.doc,this.lineNumber=0,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";var n=e.split(A3e),i=n.length;this.lines=t||n,this.options.referenceDefinition&&this.clearRefMaps(),e.charCodeAt(e.length-1)===$d&&(i-=1);for(var a=0;a<i;a++)this.incorporateLine(n[a]);for(;this.tip;)this.finalize(this.tip,i);return this.processInlines(this.doc),this.doc},r.prototype.partialParseStart=function(e,t){this.doc=rd(),this.tip=this.doc,this.lineNumber=e-1,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";for(var n=t.length,i=0;i<n;i++)this.incorporateLine(t[i]);return this.doc},r.prototype.partialParseExtends=function(e){for(var t=0;t<e.length;t++)this.incorporateLine(e[t])},r.prototype.partialParseFinish=function(){for(;this.tip;)this.finalize(this.tip,this.lineNumber);this.processInlines(this.doc)},r.prototype.setRefMaps=function(e,t,n){this.refMap=e,this.refLinkCandidateMap=t,this.refDefCandidateMap=n},r.prototype.clearRefMaps=function(){[this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap].forEach(function(e){dWe(e)})},r})();function mg(r,e){return r[0]<e[0]?1:r[0]>e[0]?-1:r[1]<e[1]?1:r[1]>e[1]?-1:0}function D3e(r,e){var t=r[0],n=r[1];return mg(n,e)===1?1:mg(t,e)===-1?-1:0}function L3e(r,e){if(!(r.parent!==e.parent||r===e)){for(var t=r.next;t&&t!==e;){for(var n=t.next,i=0,a=["parent","prev","next"];i<a.length;i++){var o=a[i];t[o]&&(Vd(t[o].id),t[o]=null)}t=n}r.next=e.next,e.next?e.next.prev=r:r.parent.lastChild=r}}function R3e(r){for(var e=[],t=r.firstChild;t;)e.push(t),t=t.next;return e}function gg(r,e){for(var t=0,n=e;t<n.length;t++){var i=n[t];r.insertBefore(i)}}function I3e(r,e){for(var t=e.length-1;t>=0;t-=1)r.prependChild(e[t])}function P3e(r,e){if(!(!r||!r.parent||e===0)){var t=r.parent.walker();t.resumeAt(r,!0);for(var n;n=t.next();){var i=n.node,a=n.entering;a&&(i.sourcepos[0][0]+=e,i.sourcepos[1][0]+=e)}}}function Nw(r,e){var t=r[0],n=r[1];return n[0]<e?1:t[0]>e?-1:0}function Vl(r,e){for(var t=r.firstChild;t;){var n=Nw(t.sourcepos,e);if(n===0)return t;if(n===-1)return t.prev||t;t=t.next}return r.lastChild}function B3e(r){for(;r.lastChild;)r=r.lastChild;return r}function F3e(r){for(;r.parent&&r.parent.type!=="document"&&r.parent.sourcepos[0][0]===r.sourcepos[0][0];)r=r.parent;return r}function q3e(r,e){for(var t=r.firstChild,n=null;t;){var i=Nw(t.sourcepos,e);if(i===0){if(t.sourcepos[0][0]===e||!t.firstChild)return t;n=t,t=t.firstChild}else{if(i===-1)break;n=t,t=t.next}}return n?F3e(B3e(n)):null}function H3e(r,e){for(var t=r,n=null;t;){var i=D3e(t.sourcepos,e);if(i===0)if(t.firstChild)n=t,t=t.firstChild;else return t;else{if(i===-1)return n;if(t.next)t=t.next;else return n}}return t}function Dw(r){return S$e(r)||null}function nd(r,e,t){if(t===void 0&&(t=null),e)for(var n=e.walker();e&&e!==t;){r(e);var i=n.next();if(i)e=i.node;else break}}function _3e(r){var e=Dw(r);if(!e)return!0;for(;e&&e.type!=="document";){if(!e.parent&&!e.prev&&!e.next)return!0;e=e.parent}return!1}var yg=/\r\n|\n|\r/;function z3e(r){var e=r.match(/^[ \t]+/);if(e&&(e[0].length>=2||/\t/.test(e[0])))return!0;var t=e?r.slice(e.length):r;return Ew.test(t)||Mw.test(t)}function V3e(r){return!Sw(r)&&r.indexOf("|")!==-1}function Gd(r){var e=r.id,t=r.title,n=r.sourcepos,i=r.dest;return{id:e,title:t,sourcepos:n,unlinked:!1,destination:i}}var Lw=(function(){function r(e,t){this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.referenceDefinition=!!(t!=null&&t.referenceDefinition),this.parser=new N3e(t),this.parser.setRefMaps(this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap),this.eventHandlerMap={change:[]},e=e||"",this.lineTexts=e.split(yg),this.root=this.parser.parse(e,this.lineTexts)}return r.prototype.updateLineTexts=function(e,t,n){var i,a=e[0],o=e[1],s=t[0],l=t[1],f=n.split(yg),p=f.length,b=this.lineTexts[a-1],T=this.lineTexts[s-1];f[0]=b.slice(0,o-1)+f[0],f[p-1]=f[p-1]+T.slice(l-1);var x=s-a+1;return(i=this.lineTexts).splice.apply(i,Hd([a-1,x],f)),p-x},r.prototype.updateRootNodeState=function(){if(this.lineTexts.length===1&&this.lineTexts[0]===""){this.root.lastLineBlank=!0,this.root.sourcepos=[[1,1],[1,0]];return}this.root.lastChild&&(this.root.lastLineBlank=this.root.lastChild.lastLineBlank);for(var e=this.lineTexts,t=e.length-1;e[t]==="";)t-=1;e.length-2>t&&(t+=1),this.root.sourcepos[1]=[t+1,e[t].length]},r.prototype.replaceRangeNodes=function(e,t,n){e?(gg(e,n),L3e(e,t),[e.id,t.id].forEach(function(i){return Vd(i)}),e.unlink()):t?(gg(t,n),Vd(t.id),t.unlink()):I3e(this.root,n)},r.prototype.getNodeRange=function(e,t){var n=Vl(this.root,e[0]),i=Vl(this.root,t[0]);return i&&i.next&&t[0]+1===i.next.sourcepos[0][0]&&(i=i.next),[n,i]},r.prototype.trigger=function(e,t){this.eventHandlerMap[e].forEach(function(n){n(t)})},r.prototype.extendEndLine=function(e){for(;this.lineTexts[e]==="";)e+=1;return e},r.prototype.parseRange=function(e,t,n,i){e&&e.prev&&(ag(e.prev)&&z3e(this.lineTexts[n-1])||H$e(e.prev)&&V3e(this.lineTexts[n-1]))&&(e=e.prev,n=e.sourcepos[0][0]);for(var a=this.lineTexts.slice(n-1,i),o=this.parser.partialParseStart(n,a),s=t?t.next:this.root.firstChild,l=o.lastChild,f=l&&pw(l)&&l.open,p=l&&vw(l)&&l.open,b=l&&ag(l);(f||p)&&s||b&&s&&(s.type==="list"||s.sourcepos[0][1]>=2);){var T=this.extendEndLine(s.sourcepos[1][0]);this.parser.partialParseExtends(this.lineTexts.slice(i,T)),e||(e=t),t=s,i=T,s=s.next}this.parser.partialParseFinish();var x=R3e(o);return{newNodes:x,extStartNode:e,extEndNode:t}},r.prototype.getRemovedNodeRange=function(e,t){return!e||e&&To(e)||t&&To(t)?null:{id:[e.id,t.id],line:[e.sourcepos[0][0]-1,t.sourcepos[1][0]-1]}},r.prototype.markDeletedRefMap=function(e,t){var n=this;if(!So(this.refMap)){var i=function(a){if(To(a)){var o=n.refMap[a.label];o&&a.id===o.id&&(o.unlinked=!0)}};e&&nd(i,e.parent,t),t&&nd(i,t)}},r.prototype.replaceWithNewRefDefState=function(e){var t=this;if(!So(this.refMap)){var n=function(i){if(To(i)){var a=i.label,o=t.refMap[a];(!o||o.unlinked)&&(t.refMap[a]=Gd(i))}};e.forEach(function(i){nd(n,i)})}},r.prototype.replaceWithRefDefCandidate=function(){var e=this;So(this.refDefCandidateMap)||Hl(this.refDefCandidateMap,function(t,n){var i=n.label,a=n.sourcepos,o=e.refMap[i];(!o||o.unlinked||o.sourcepos[0][0]>a[0][0])&&(e.refMap[i]=Gd(n))})},r.prototype.getRangeWithRefDef=function(e,t,n,i,a){if(this.referenceDefinition&&!So(this.refMap)){var o=Vl(this.root,e-1),s=Vl(this.root,t+1);o&&To(o)&&o!==n&&o!==i&&(n=o,e=n.sourcepos[0][0]),s&&To(s)&&s!==n&&s!==i&&(i=s,t=this.extendEndLine(i.sourcepos[1][0]+a))}return[n,i,e,t]},r.prototype.parse=function(e,t,n){n===void 0&&(n=0);var i=this.getNodeRange(e,t),a=i[0],o=i[1],s=a?Math.min(a.sourcepos[0][0],e[0]):e[0],l=this.extendEndLine((o?Math.max(o.sourcepos[1][0],t[0]):t[0])+n),f=this.parseRange.apply(this,this.getRangeWithRefDef(s,l,a,o,n)),p=f.newNodes,b=f.extStartNode,T=f.extEndNode,x=this.getRemovedNodeRange(b,T),E=T?T.next:this.root.firstChild;return this.referenceDefinition?(this.markDeletedRefMap(b,T),this.replaceRangeNodes(b,T,p),this.replaceWithNewRefDefState(p)):this.replaceRangeNodes(b,T,p),{nodes:p,removedNodeRange:x,nextNode:E}},r.prototype.parseRefLink=function(){var e=this,t=[];return So(this.refMap)||Hl(this.refMap,function(n,i){i.unlinked&&delete e.refMap[n],Hl(e.refLinkCandidateMap,function(a,o){var s=o.node,l=o.refLabel;l===n&&t.push(e.parse(s.sourcepos[0],s.sourcepos[1]))})}),t},r.prototype.removeUnlinkedCandidate=function(){So(this.refDefCandidateMap)||[this.refLinkCandidateMap,this.refDefCandidateMap].forEach(function(e){Hl(e,function(t){_3e(t)&&delete e[t]})})},r.prototype.editMarkdown=function(e,t,n){var i=this.updateLineTexts(e,t,n),a=this.parse(e,t,i),o=fWe(a,"nextNode");P3e(a.nextNode,i),this.updateRootNodeState();var s=[o];return this.referenceDefinition&&(this.removeUnlinkedCandidate(),this.replaceWithRefDefCandidate(),s=s.concat(this.parseRefLink())),this.trigger("change",s),s},r.prototype.getLineTexts=function(){return this.lineTexts},r.prototype.getRootNode=function(){return this.root},r.prototype.findNodeAtPosition=function(e){var t=H3e(this.root,e);return!t||t===this.root?null:t},r.prototype.findFirstNodeAtLine=function(e){return q3e(this.root,e)},r.prototype.on=function(e,t){this.eventHandlerMap[e].push(t)},r.prototype.off=function(e,t){var n=this.eventHandlerMap[e],i=n.indexOf(t);n.splice(i,1)},r.prototype.findNodeById=function(e){return Dw(e)},r.prototype.removeAllNode=function(){x$e()},r})(),U3e=["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"],bg=new RegExp("<(/?(?:"+U3e.join("|")+")[^>]*>)","ig");function kg(r){return bg.test(r)?r.replace(bg,function(e,t){return"<"+t}):r}var wg={heading:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"h"+r.level,outerNewLine:!0}},text:function(r){return{type:"text",content:r.literal}},softbreak:function(r,e){var t=e.options;return{type:"html",content:t.softbreak}},linebreak:function(){return{type:"html",content:`<br />
|
|
60
|
-
`}},emph:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"em"}},strong:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"strong"}},paragraph:function(r,e){var t,n=e.entering,i=(t=r.parent)===null||t===void 0?void 0:t.parent;return i&&i.type==="list"&&i.listData.tight?null:{type:n?"openTag":"closeTag",tagName:"p",outerNewLine:!0}},thematicBreak:function(){return{type:"openTag",tagName:"hr",outerNewLine:!0,selfClose:!0}},blockQuote:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"blockquote",outerNewLine:!0,innerNewLine:!0}},list:function(r,e){var t=e.entering,n=r.listData,i=n.type,a=n.start,o=i==="bullet"?"ul":"ol",s={};return o==="ol"&&a!==null&&a!==1&&(s.start=a.toString()),{type:t?"openTag":"closeTag",tagName:o,attributes:s,outerNewLine:!0}},item:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"li",outerNewLine:!0}},htmlInline:function(r,e){var t=e.options,n=t.tagFilter?kg(r.literal):r.literal;return{type:"html",content:n}},htmlBlock:function(r,e){var t=e.options,n=t.tagFilter?kg(r.literal):r.literal;return t.nodeId?[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"html",content:n},{type:"closeTag",tagName:"div",outerNewLine:!0}]:{type:"html",content:n,outerNewLine:!0}},code:function(r){return[{type:"openTag",tagName:"code"},{type:"text",content:r.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(r){var e=r.info,t=e?e.split(/\s+/):[],n=[];return t.length>0&&t[0].length>0&&n.push("language-"+Oo(t[0])),[{type:"openTag",tagName:"pre",outerNewLine:!0},{type:"openTag",tagName:"code",classNames:n},{type:"text",content:r.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre",outerNewLine:!0}]},link:function(r,e){var t=e.entering;if(t){var n=r,i=n.title,a=n.destination;return{type:"openTag",tagName:"a",attributes:Rr({href:Oo(a)},i&&{title:Oo(i)})}}return{type:"closeTag",tagName:"a"}},image:function(r,e){var t=e.getChildrenText,n=e.skipChildren,i=r,a=i.title,o=i.destination;return n(),{type:"openTag",tagName:"img",selfClose:!0,attributes:Rr({src:Oo(o),alt:t(r)},a&&{title:Oo(a)})}},customBlock:function(r,e,t){var n=r.info.trim().toLowerCase(),i=t[n];if(i)try{return i(r,e)}catch(a){console.warn("[@toast-ui/editor] - The error occurred when "+n+" block node was parsed in markdown renderer: "+a)}return[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"text",content:r.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},frontMatter:function(r){return[{type:"openTag",tagName:"div",outerNewLine:!0,attributes:{style:"white-space: pre; display: none;"}},{type:"text",content:r.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},customInline:function(r,e,t){var n=r,i=n.info,a=n.firstChild,o=i.trim().toLowerCase(),s=t[o],l=e.entering;if(s)try{return s(r,e)}catch(f){console.warn("[@toast-ui/editor] - The error occurred when "+o+" inline node was parsed in markdown renderer: "+f)}return l?[{type:"openTag",tagName:"span"},{type:"text",content:"$$"+i+(a?" ":"")}]:[{type:"text",content:"$$"},{type:"closeTag",tagName:"span"}]}},Cg={strike:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"del"}},item:function(r,e){var t=e.entering,n=r.listData,i=n.checked,a=n.task;if(t){var o={type:"openTag",tagName:"li",outerNewLine:!0};return a?[o,{type:"openTag",tagName:"input",selfClose:!0,attributes:Rr(Rr({},i&&{checked:""}),{disabled:"",type:"checkbox"})},{type:"text",content:" "}]:o}return{type:"closeTag",tagName:"li",outerNewLine:!0}},table:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"table",outerNewLine:!0}},tableHead:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"thead",outerNewLine:!0}},tableBody:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"tbody",outerNewLine:!0}},tableRow:function(r,e){var t=e.entering;if(t)return{type:"openTag",tagName:"tr",outerNewLine:!0};var n=[];if(r.lastChild)for(var i=r.parent.parent.columns.length,a=r.lastChild.endIdx,o=a+1;o<i;o+=1)n.push({type:"openTag",tagName:"td",outerNewLine:!0},{type:"closeTag",tagName:"td",outerNewLine:!0});return n.push({type:"closeTag",tagName:"tr",outerNewLine:!0}),n},tableCell:function(r,e){var t=e.entering;if(r.ignored)return{type:"text",content:""};var n=r.parent.parent,i=n.type==="tableHead"?"th":"td",a=n.parent,o=a.columns[r.startIdx],s=o!=null&&o.align?{align:o.align}:null;return t?Rr({type:"openTag",tagName:i,outerNewLine:!0},s&&{attributes:s}):{type:"closeTag",tagName:i,outerNewLine:!0}}},$3e={softbreak:`
|
|
61
|
-
`,gfm:!1,tagFilter:!1,nodeId:!1};function W3e(r){for(var e=[],t=r.walker(),n=null;n=t.next();){var i=n.node;i.type==="text"&&e.push(i.literal)}return e.join("")}var Gh=(function(){function r(e){this.buffer=[],this.options=Rr(Rr({},$3e),e),this.convertors=this.createConvertors(),delete this.options.convertors}return r.prototype.createConvertors=function(){var e=Rr({},wg);if(this.options.gfm&&(e=Rr(Rr({},e),Cg)),this.options.convertors){var t=this.options.convertors,n=Object.keys(t),i=Rr(Rr({},wg),Cg);n.forEach(function(a){var o=e[a],s=t[a],l=Object.keys(i).indexOf(a)===-1?a.toLowerCase():a;o?e[l]=function(f,p,b){return p.origin=function(){return o(f,p,b)},s(f,p)}:e[l]=s})}return e},r.prototype.getConvertors=function(){return this.convertors},r.prototype.getOptions=function(){return this.options},r.prototype.render=function(e){var t=this;this.buffer=[];for(var n=e.walker(),i=null,a=function(){var s=i.node,l=i.entering,f=o.convertors[s.type];if(!f)return"continue";var p=!1,b={entering:l,leaf:!jh(s),options:o.options,getChildrenText:W3e,skipChildren:function(){p=!0}},T=vw(s)||_$e(s)?f(s,b,o.convertors):f(s,b);if(T){var x=Array.isArray(T)?T:[T];x.forEach(function(E,P){E.type==="openTag"&&t.options.nodeId&&P===0&&(E.attributes||(E.attributes={}),E.attributes["data-nodeid"]=String(s.id)),t.renderHTMLNode(E)}),p&&(n.resumeAt(s,!1),n.next())}},o=this;i=n.next();)a();return this.addNewLine(),this.buffer.join("")},r.prototype.renderHTMLNode=function(e){switch(e.type){case"openTag":case"closeTag":this.renderElementNode(e);break;case"text":this.renderTextNode(e);break;case"html":this.renderRawHtmlNode(e);break}},r.prototype.generateOpenTagString=function(e){var t=this,n=e.tagName,i=e.classNames,a=e.attributes;this.buffer.push("<"+n),i&&i.length>0&&this.buffer.push(' class="'+i.join(" ")+'"'),a&&Object.keys(a).forEach(function(o){var s=a[o];t.buffer.push(" "+o+'="'+s+'"')}),e.selfClose&&this.buffer.push(" /"),this.buffer.push(">")},r.prototype.generateCloseTagString=function(e){var t=e.tagName;this.buffer.push("</"+t+">")},r.prototype.addNewLine=function(){this.buffer.length&&Su(Su(this.buffer))!==`
|
|
62
|
-
`&&this.buffer.push(`
|
|
63
|
-
`)},r.prototype.addOuterNewLine=function(e){e.outerNewLine&&this.addNewLine()},r.prototype.addInnerNewLine=function(e){e.innerNewLine&&this.addNewLine()},r.prototype.renderTextNode=function(e){this.buffer.push(Oo(e.content))},r.prototype.renderRawHtmlNode=function(e){this.addOuterNewLine(e),this.buffer.push(e.content),this.addOuterNewLine(e)},r.prototype.renderElementNode=function(e){e.type==="openTag"?(this.addOuterNewLine(e),this.generateOpenTagString(e),e.selfClose?this.addOuterNewLine(e):this.addInnerNewLine(e)):(this.addInnerNewLine(e),this.generateCloseTagString(e),this.addOuterNewLine(e))},r})();/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */function j3e(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}else return Array.from(r)}var G3e=Object.hasOwnProperty,Tg=Object.setPrototypeOf,K3e=Object.isFrozen,J3e=Object.getPrototypeOf,Y3e=Object.getOwnPropertyDescriptor,Zr=Object.freeze,Fi=Object.seal,X3e=Object.create,Rw=typeof Reflect<"u"&&Reflect,Eu=Rw.apply,Kd=Rw.construct;Eu||(Eu=function(e,t,n){return e.apply(t,n)});Zr||(Zr=function(e){return e});Fi||(Fi=function(e){return e});Kd||(Kd=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(j3e(t))))});var Z3e=Xn(Array.prototype.forEach),Sg=Xn(Array.prototype.pop),hs=Xn(Array.prototype.push),Zl=Xn(String.prototype.toLowerCase),xg=Xn(String.prototype.match),Ki=Xn(String.prototype.replace),Q3e=Xn(String.prototype.indexOf),eje=Xn(String.prototype.trim),Ai=Xn(RegExp.prototype.test),Eg=tje(TypeError);function Xn(r){return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Eu(r,e,n)}}function tje(r){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Kd(r,t)}}function yt(r,e){Tg&&Tg(r,null);for(var t=e.length;t--;){var n=e[t];if(typeof n=="string"){var i=Zl(n);i!==n&&(K3e(e)||(e[t]=i),n=i)}r[n]=!0}return r}function La(r){var e=X3e(null),t=void 0;for(t in r)Eu(G3e,r,[t])&&(e[t]=r[t]);return e}function Ul(r,e){for(;r!==null;){var t=Y3e(r,e);if(t){if(t.get)return Xn(t.get);if(typeof t.value=="function")return Xn(t.value)}r=J3e(r)}function n(i){return console.warn("fallback value for",i),null}return n}var Mg=Zr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),id=Zr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ad=Zr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),rje=Zr(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),od=Zr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),nje=Zr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ag=Zr(["#text"]),Og=Zr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),sd=Zr(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ng=Zr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),$l=Zr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ije=Fi(/\{\{[\s\S]*|[\s\S]*\}\}/gm),aje=Fi(/<%[\s\S]*|[\s\S]*%>/gm),oje=Fi(/^data-[\-\w.\u00B7-\uFFFF]/),sje=Fi(/^aria-[\-\w]+$/),lje=Fi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),uje=Fi(/^(?:\w+script|data):/i),cje=Fi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function ii(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}else return Array.from(r)}var fje=function(){return typeof window>"u"?null:window},dje=function(e,t){if((typeof e>"u"?"undefined":Cs(e))!=="object"||typeof e.createPolicy!="function")return null;var n=null,i="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(i)&&(n=t.currentScript.getAttribute(i));var a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function Iw(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fje(),e=function(J){return Iw(J)};if(e.version="2.3.3",e.removed=[],!r||!r.document||r.document.nodeType!==9)return e.isSupported=!1,e;var t=r.document,n=r.document,i=r.DocumentFragment,a=r.HTMLTemplateElement,o=r.Node,s=r.Element,l=r.NodeFilter,f=r.NamedNodeMap,p=f===void 0?r.NamedNodeMap||r.MozNamedAttrMap:f,b=r.Text,T=r.Comment,x=r.DOMParser,E=r.trustedTypes,P=s.prototype,F=Ul(P,"cloneNode"),z=Ul(P,"nextSibling"),Y=Ul(P,"childNodes"),ee=Ul(P,"parentNode");if(typeof a=="function"){var se=n.createElement("template");se.content&&se.content.ownerDocument&&(n=se.content.ownerDocument)}var de=dje(E,t),oe=de&<?de.createHTML(""):"",le=n,ge=le.implementation,xe=le.createNodeIterator,Ie=le.createDocumentFragment,ot=le.getElementsByTagName,Fe=t.importNode,bt={};try{bt=La(n).documentMode?n.documentMode:{}}catch{}var ct={};e.isSupported=typeof ee=="function"&&ge&&typeof ge.createHTMLDocument<"u"&&bt!==9;var mt=ije,nt=aje,Et=oje,It=sje,Ut=uje,Ye=cje,dt=lje,st=null,St=yt({},[].concat(ii(Mg),ii(id),ii(ad),ii(od),ii(Ag))),Mt=null,nr=yt({},[].concat(ii(Og),ii(sd),ii(Ng),ii($l))),$t=null,Qt=null,be=!0,ve=!0,ie=!1,ae=!1,Z=!1,ke=!1,Ee=!1,ze=!1,Xe=!1,kt=!0,lt=!1,Ht=!0,At=!0,jt=!1,Ot={},hr=null,Sn=yt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Qr=null,ir=yt({},["audio","video","img","source","image","track"]),_e=null,Ue=yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),at="http://www.w3.org/1998/Math/MathML",ut="http://www.w3.org/2000/svg",Ct="http://www.w3.org/1999/xhtml",gr=Ct,_t=!1,Wt=void 0,qr=["application/xhtml+xml","text/html"],pn="text/html",ar=void 0,Hr=null,xn=n.createElement("form"),vn=function(J){Hr&&Hr===J||((!J||(typeof J>"u"?"undefined":Cs(J))!=="object")&&(J={}),J=La(J),st="ALLOWED_TAGS"in J?yt({},J.ALLOWED_TAGS):St,Mt="ALLOWED_ATTR"in J?yt({},J.ALLOWED_ATTR):nr,_e="ADD_URI_SAFE_ATTR"in J?yt(La(Ue),J.ADD_URI_SAFE_ATTR):Ue,Qr="ADD_DATA_URI_TAGS"in J?yt(La(ir),J.ADD_DATA_URI_TAGS):ir,hr="FORBID_CONTENTS"in J?yt({},J.FORBID_CONTENTS):Sn,$t="FORBID_TAGS"in J?yt({},J.FORBID_TAGS):{},Qt="FORBID_ATTR"in J?yt({},J.FORBID_ATTR):{},Ot="USE_PROFILES"in J?J.USE_PROFILES:!1,be=J.ALLOW_ARIA_ATTR!==!1,ve=J.ALLOW_DATA_ATTR!==!1,ie=J.ALLOW_UNKNOWN_PROTOCOLS||!1,ae=J.SAFE_FOR_TEMPLATES||!1,Z=J.WHOLE_DOCUMENT||!1,ze=J.RETURN_DOM||!1,Xe=J.RETURN_DOM_FRAGMENT||!1,kt=J.RETURN_DOM_IMPORT!==!1,lt=J.RETURN_TRUSTED_TYPE||!1,Ee=J.FORCE_BODY||!1,Ht=J.SANITIZE_DOM!==!1,At=J.KEEP_CONTENT!==!1,jt=J.IN_PLACE||!1,dt=J.ALLOWED_URI_REGEXP||dt,gr=J.NAMESPACE||Ct,Wt=qr.indexOf(J.PARSER_MEDIA_TYPE)===-1?Wt=pn:Wt=J.PARSER_MEDIA_TYPE,ar=Wt==="application/xhtml+xml"?function(me){return me}:Zl,ae&&(ve=!1),Xe&&(ze=!0),Ot&&(st=yt({},[].concat(ii(Ag))),Mt=[],Ot.html===!0&&(yt(st,Mg),yt(Mt,Og)),Ot.svg===!0&&(yt(st,id),yt(Mt,sd),yt(Mt,$l)),Ot.svgFilters===!0&&(yt(st,ad),yt(Mt,sd),yt(Mt,$l)),Ot.mathMl===!0&&(yt(st,od),yt(Mt,Ng),yt(Mt,$l))),J.ADD_TAGS&&(st===St&&(st=La(st)),yt(st,J.ADD_TAGS)),J.ADD_ATTR&&(Mt===nr&&(Mt=La(Mt)),yt(Mt,J.ADD_ATTR)),J.ADD_URI_SAFE_ATTR&&yt(_e,J.ADD_URI_SAFE_ATTR),J.FORBID_CONTENTS&&(hr===Sn&&(hr=La(hr)),yt(hr,J.FORBID_CONTENTS)),At&&(st["#text"]=!0),Z&&yt(st,["html","head","body"]),st.table&&(yt(st,["tbody"]),delete $t.tbody),Zr&&Zr(J),Hr=J)},en=yt({},["mi","mo","mn","ms","mtext"]),Gr=yt({},["foreignobject","desc","title","annotation-xml"]),_r=yt({},id);yt(_r,ad),yt(_r,rje);var or=yt({},od);yt(or,nje);var tn=function(J){var me=ee(J);(!me||!me.tagName)&&(me={namespaceURI:Ct,tagName:"template"});var Te=Zl(J.tagName),He=Zl(me.tagName);if(J.namespaceURI===ut)return me.namespaceURI===Ct?Te==="svg":me.namespaceURI===at?Te==="svg"&&(He==="annotation-xml"||en[He]):!!_r[Te];if(J.namespaceURI===at)return me.namespaceURI===Ct?Te==="math":me.namespaceURI===ut?Te==="math"&&Gr[He]:!!or[Te];if(J.namespaceURI===Ct){if(me.namespaceURI===ut&&!Gr[He]||me.namespaceURI===at&&!en[He])return!1;var Ze=yt({},["title","style","font","a","script"]);return!or[Te]&&(Ze[Te]||!_r[Te])}return!1},zt=function(J){hs(e.removed,{element:J});try{J.parentNode.removeChild(J)}catch{try{J.outerHTML=oe}catch{J.remove()}}},pr=function(J,me){try{hs(e.removed,{attribute:me.getAttributeNode(J),from:me})}catch{hs(e.removed,{attribute:null,from:me})}if(me.removeAttribute(J),J==="is"&&!Mt[J])if(ze||Xe)try{zt(me)}catch{}else try{me.setAttribute(J,"")}catch{}},W=function(J){var me=void 0,Te=void 0;if(Ee)J="<remove></remove>"+J;else{var He=xg(J,/^[\r\n\t ]+/);Te=He&&He[0]}Wt==="application/xhtml+xml"&&(J='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+J+"</body></html>");var Ze=de?de.createHTML(J):J;if(gr===Ct)try{me=new x().parseFromString(Ze,Wt)}catch{}if(!me||!me.documentElement){me=ge.createDocument(gr,"template",null);try{me.documentElement.innerHTML=_t?"":Ze}catch{}}var I=me.body||me.documentElement;return J&&Te&&I.insertBefore(n.createTextNode(Te),I.childNodes[0]||null),gr===Ct?ot.call(me,Z?"html":"body")[0]:Z?me.documentElement:I},$=function(J){return xe.call(J.ownerDocument||J,J,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},R=function(J){return J instanceof b||J instanceof T?!1:typeof J.nodeName!="string"||typeof J.textContent!="string"||typeof J.removeChild!="function"||!(J.attributes instanceof p)||typeof J.removeAttribute!="function"||typeof J.setAttribute!="function"||typeof J.namespaceURI!="string"||typeof J.insertBefore!="function"},D=function(J){return(typeof o>"u"?"undefined":Cs(o))==="object"?J instanceof o:J&&(typeof J>"u"?"undefined":Cs(J))==="object"&&typeof J.nodeType=="number"&&typeof J.nodeName=="string"},B=function(J,me,Te){ct[J]&&Z3e(ct[J],function(He){He.call(e,me,Te,Hr)})},H=function(J){var me=void 0;if(B("beforeSanitizeElements",J,null),R(J)||xg(J.nodeName,/[\u0080-\uFFFF]/))return zt(J),!0;var Te=ar(J.nodeName);if(B("uponSanitizeElement",J,{tagName:Te,allowedTags:st}),!D(J.firstElementChild)&&(!D(J.content)||!D(J.content.firstElementChild))&&Ai(/<[/\w]/g,J.innerHTML)&&Ai(/<[/\w]/g,J.textContent)||Te==="select"&&Ai(/<template/i,J.innerHTML))return zt(J),!0;if(!st[Te]||$t[Te]){if(At&&!hr[Te]){var He=ee(J)||J.parentNode,Ze=Y(J)||J.childNodes;if(Ze&&He)for(var I=Ze.length,M=I-1;M>=0;--M)He.insertBefore(F(Ze[M],!0),z(J))}return zt(J),!0}return J instanceof s&&!tn(J)||(Te==="noscript"||Te==="noembed")&&Ai(/<\/no(script|embed)/i,J.innerHTML)?(zt(J),!0):(ae&&J.nodeType===3&&(me=J.textContent,me=Ki(me,mt," "),me=Ki(me,nt," "),J.textContent!==me&&(hs(e.removed,{element:J.cloneNode()}),J.textContent=me)),B("afterSanitizeElements",J,null),!1)},K=function(J,me,Te){if(Ht&&(me==="id"||me==="name")&&(Te in n||Te in xn))return!1;if(!(ve&&!Qt[me]&&Ai(Et,me))){if(!(be&&Ai(It,me))){if(!Mt[me]||Qt[me])return!1;if(!_e[me]){if(!Ai(dt,Ki(Te,Ye,""))){if(!((me==="src"||me==="xlink:href"||me==="href")&&J!=="script"&&Q3e(Te,"data:")===0&&Qr[J])){if(!(ie&&!Ai(Ut,Ki(Te,Ye,"")))){if(Te)return!1}}}}}}return!0},he=function(J){var me=void 0,Te=void 0,He=void 0,Ze=void 0;B("beforeSanitizeAttributes",J,null);var I=J.attributes;if(I){var M={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Mt};for(Ze=I.length;Ze--;){me=I[Ze];var g=me,w=g.name,N=g.namespaceURI;if(Te=eje(me.value),He=ar(w),M.attrName=He,M.attrValue=Te,M.keepAttr=!0,M.forceKeepAttr=void 0,B("uponSanitizeAttribute",J,M),Te=M.attrValue,!M.forceKeepAttr&&(pr(w,J),!!M.keepAttr)){if(Ai(/\/>/i,Te)){pr(w,J);continue}ae&&(Te=Ki(Te,mt," "),Te=Ki(Te,nt," "));var _=ar(J.nodeName);if(K(_,He,Te))try{N?J.setAttributeNS(N,w,Te):J.setAttribute(w,Te),Sg(e.removed)}catch{}}}B("afterSanitizeAttributes",J,null)}},Ce=function re(J){var me=void 0,Te=$(J);for(B("beforeSanitizeShadowDOM",J,null);me=Te.nextNode();)B("uponSanitizeShadowNode",me,null),!H(me)&&(me.content instanceof i&&re(me.content),he(me));B("afterSanitizeShadowDOM",J,null)};return e.sanitize=function(re,J){var me=void 0,Te=void 0,He=void 0,Ze=void 0,I=void 0;if(_t=!re,_t&&(re="<!-->"),typeof re!="string"&&!D(re)){if(typeof re.toString!="function")throw Eg("toString is not a function");if(re=re.toString(),typeof re!="string")throw Eg("dirty is not a string, aborting")}if(!e.isSupported){if(Cs(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof re=="string")return r.toStaticHTML(re);if(D(re))return r.toStaticHTML(re.outerHTML)}return re}if(ke||vn(J),e.removed=[],typeof re=="string"&&(jt=!1),!jt)if(re instanceof o)me=W("<!---->"),Te=me.ownerDocument.importNode(re,!0),Te.nodeType===1&&Te.nodeName==="BODY"||Te.nodeName==="HTML"?me=Te:me.appendChild(Te);else{if(!ze&&!ae&&!Z&&re.indexOf("<")===-1)return de&<?de.createHTML(re):re;if(me=W(re),!me)return ze?null:oe}me&&Ee&&zt(me.firstChild);for(var M=$(jt?re:me);He=M.nextNode();)He.nodeType===3&&He===Ze||H(He)||(He.content instanceof i&&Ce(He.content),he(He),Ze=He);if(Ze=null,jt)return re;if(ze){if(Xe)for(I=Ie.call(me.ownerDocument);me.firstChild;)I.appendChild(me.firstChild);else I=me;return kt&&(I=Fe.call(t,I,!0)),I}var g=Z?me.outerHTML:me.innerHTML;return ae&&(g=Ki(g,mt," "),g=Ki(g,nt," ")),de&<?de.createHTML(g):g},e.setConfig=function(re){vn(re),ke=!0},e.clearConfig=function(){Hr=null,ke=!1},e.isValidAttribute=function(re,J,me){Hr||vn({});var Te=ar(re),He=ar(J);return K(Te,He,me)},e.addHook=function(re,J){typeof J=="function"&&(ct[re]=ct[re]||[],hs(ct[re],J))},e.removeHook=function(re){ct[re]&&Sg(ct[re])},e.removeHooks=function(re){ct[re]&&(ct[re]=[])},e.removeAllHooks=function(){ct={}},e}var hje=Iw(),pje=["iframe","embed"],Pw=[];function Bw(r){Fr(pje,r)&&Pw.push(r.toLowerCase())}function eo(r,e){return hje.sanitize(r,we({ADD_TAGS:Pw,ADD_ATTR:["rel","target","hreflang","type"],FORBID_TAGS:["input","script","textarea","form","button","select","meta","style","link","title","object","base"]},e))}function Fw(r,e){return r.literal.replace(new RegExp("(<\\s*"+e+"[^>]*>)|(</"+e+"\\s*[>])","ig"),"").trim()}function Jd(r){r=r.match(Uo)[0];var e=r.match(new RegExp(Lk,"g"));return e?e.reduce(function(t,n){var i=n.trim().split("="),a=i[0],o=i.slice(1);return o.length&&(t[a]=o.join("=").replace(/'|"/g,"").trim()),t},{}):{}}function Yd(r){return hi(r.attributes).reduce(function(e,t){return e[t.nodeName]=t.nodeValue,e},{})}function Dg(r,e,t,n){var i=n.getToDOMNode(e)(r),a=t(i.outerHTML),o=document.createElement("div");o.innerHTML=a,i=o.firstChild;var s=Yd(i);return{dom:i,htmlAttrs:s}}var vje={htmlBlock:function(r,e,t){return{atom:!0,content:"block+",group:"block",attrs:{htmlAttrs:{default:{}},childrenHTML:{default:""},htmlBlock:{default:!0}},parseDOM:[{tag:r,getAttrs:function(n){return{htmlAttrs:Yd(n),childrenHTML:n.innerHTML}}}],toDOM:function(n){var i=Dg(n,r,e,t),a=i.dom,o=i.htmlAttrs;return o.class=o.class?o.class+" html-block":"html-block",dn([r,o],hi(a.childNodes))}}},htmlInline:function(r,e,t){return{attrs:{htmlAttrs:{default:{}},htmlInline:{default:!0}},parseDOM:[{tag:r,getAttrs:function(n){return{htmlAttrs:Yd(n)}}}],toDOM:function(n){var i=Dg(n,r,e,t).htmlAttrs;return[r,i,0]}}}};function mje(r,e,t){var n={nodes:{},marks:{}};return["htmlBlock","htmlInline"].forEach(function(i){r[i]&&Object.keys(r[i]).forEach(function(a){var o=i==="htmlBlock"?"nodes":"marks";Bw(a),n[o][a]=vje[i](a,e,t)})}),n}var gje=/^\s*<\s*\//,yje={paragraph:function(r,e){var t=e.entering,n=e.origin,i=e.options;return i.nodeId?{type:t?"openTag":"closeTag",outerNewLine:!0,tagName:"p"}:n()},softbreak:function(r){var e=r.prev&&r.prev.type==="htmlInline",t=e&&/<br ?\/?>/.test(r.prev.literal),n=t?`
|
|
64
|
-
`:`<br>
|
|
65
|
-
`;return{type:"html",content:n}},item:function(r,e){var t=e.entering;if(t){var n={},i=[];return r.listData.task&&(n["data-task"]="",i.push("task-list-item"),r.listData.checked&&(i.push("checked"),n["data-task-checked"]="")),{type:"openTag",tagName:"li",classNames:i,attributes:n,outerNewLine:!0}}return{type:"closeTag",tagName:"li",outerNewLine:!0}},code:function(r){var e={"data-backticks":String(r.tickCount)};return[{type:"openTag",tagName:"code",attributes:e},{type:"text",content:r.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(r){var e=r,t=e.fenceLength,n=e.info,i=n?n.split(/\s+/):[],a=[],o={};if(t>3&&(o["data-backticks"]=t),i.length>0&&i[0].length>0){var s=i[0];a.push("lang-"+s),o["data-language"]=s}return[{type:"openTag",tagName:"pre",classNames:a},{type:"openTag",tagName:"code",attributes:o},{type:"text",content:r.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre"}]},customInline:function(r,e){var t=e.origin,n=e.entering,i=e.skipChildren,a=r.info;if(a.indexOf("widget")!==-1&&n){i();var o=Ak(r),s=Mk(a,o).outerHTML;return[{type:"openTag",tagName:"span",classNames:["tui-widget"]},{type:"html",content:s},{type:"closeTag",tagName:"span"}]}return t()}};function Kh(r,e){var t=we({},yje);return r&&(t.link=function(n,i){var a=i.entering,o=i.origin,s=o();return a&&(s.attributes=we(we({},s.attributes),r)),s}),e&&Object.keys(e).forEach(function(n){var i=t[n],a=e[n];i&&Hn(a)?t[n]=function(o,s){var l=we({},s);return l.origin=function(){return i(o,s)},a(o,l)}:Fr(["htmlBlock","htmlInline"],n)&&!Hn(a)?t[n]=function(o,s){var l=o.literal.match(Uo);if(l){var f=l[0],p=l[1],b=l[3],T=(p||b).toLowerCase(),x=a[T],E=Fw(o,T);if(x){var P=we({},o);return P.attrs=Jd(f),P.childrenHTML=E,P.type=T,s.entering=!gje.test(o.literal),x(P,s)}}return s.origin()}:t[n]=a}),t}var bje=["list","item","blockQuote"],kje=["UL","OL","BLOCKQUOTE"];function wje(r,e){var t,n=r.child(e);return!n.childCount||n.childCount===1&&!(!((t=n.firstChild.text)===null||t===void 0)&&t.trim())}function Lg(r,e,t){var n=$s(e)-1,i=zu(e)-1,a=t[n].getBoundingClientRect(),o=t[i].offsetTop-t[n].offsetTop+t[i].clientHeight;return{height:o<=0?t[n].clientHeight:o+Cje(r,t,Math.min(i+1,r.childCount-1)),rect:a}}function Cje(r,e,t){for(var n=r.childCount-1,i=0;t<=n&&wje(r,t);)i+=e[t].clientHeight,t+=1;return i}function Tje(r,e){for(;!r.getAttribute("data-nodeid")&&r.parentElement!==e;)r=r.parentElement;return r}function Mu(r,e){for(var t=0;r&&r!==e&&(Fr(kje,r.tagName)||(t+=r.offsetTop),r.offsetParent!==e.offsetParent);)r=r.parentElement;return t}function Sje(r,e){for(var t=e,n=null;t;){var i=t.firstElementChild;if(!i)break;var a=qw(i,r,Mu(t,e));n=t,t=a}var o=t||n;return o===e?null:o}function qw(r,e,t){return r&&e>t+r.offsetTop?qw(r.nextElementSibling,e,t)||r:null}function xje(r,e,t,n){var i=Math.min((r-e)/t,1);return i*n}function ld(r,e){for(var t=r.querySelector('[data-nodeid="'+e.id+'"]');!t||hne(e);)e=e.parent,t=r.querySelector('[data-nodeid="'+e.id+'"]');return Eje({mdNode:e,el:t})}function Eje(r){for(var e=r.mdNode,t=r.el;(Fr(bje,e.type)||e.type==="table")&&e.firstChild;)e=e.firstChild,t=t.firstElementChild;return{mdNode:e,el:t}}var Kn={};function Mje(r,e){Kn[r]=Kn[r]||{},Kn[r].height=e}function Aje(r,e){Kn[r]=Kn[r]||{},Kn[r].offsetTop=e}function Oje(r){return Kn[r]&&Kn[r].height}function Nje(r){return Kn[r]&&Kn[r].offsetTop}function Xd(r){r&&(delete Kn[Number(r.getAttribute("data-nodeid"))],hi(r.children).forEach(function(e){Xd(e)}))}function Dje(r,e,t){var n=Oje(t),i=Nje(t),a=n||r.clientHeight,o=i||Mu(r,e)||r.offsetTop;return n||Mje(t,a),i||Aje(t,o),{nodeHeight:a,offsetTop:o}}var ud=Je("md-preview-highlight");function Lje(r,e){for(var t=r.firstChild;t&&t.next&&!(Vu(t.next)>e+1);)t=t.next;return t}var Hw=(function(){function r(e,t){var n=document.createElement("div");this.el=n,this.eventEmitter=e,this.isViewer=!!t.isViewer,this.el.className=Je("md-preview");var i=t.linkAttributes,a=t.customHTMLRenderer,o=t.sanitizer,s=t.highlight,l=s===void 0?!1:s;this.renderer=new Gh({gfm:!0,nodeId:!0,convertors:Kh(i,a)}),this.cursorNodeId=null,this.sanitizer=o,this.initEvent(l),this.initContentSection(),this.isViewer&&(this.previewContent.style.overflowWrap="break-word")}return r.prototype.initContentSection=function(){this.previewContent=Fk('<div class="'+Je("contents")+'"></div>'),this.isViewer||this.el.appendChild(this.previewContent)},r.prototype.toggleActive=function(e){Rh(this.el,"active",e)},r.prototype.initEvent=function(e){var t=this;this.eventEmitter.listen("updatePreview",this.update.bind(this)),!this.isViewer&&(e&&(this.eventEmitter.listen("changeToolbarState",function(n){var i=n.mdNode,a=n.cursorPos;t.updateCursorNode(i,a)}),this.eventEmitter.listen("blur",function(){t.removeHighlight()})),ew(this.el,"scroll",function(n){t.eventEmitter.emit("scroll","preview",Sje(n.target.scrollTop,t.previewContent))}),this.eventEmitter.listen("changePreviewTabPreview",function(){return t.toggleActive(!0)}),this.eventEmitter.listen("changePreviewTabWrite",function(){return t.toggleActive(!1)}))},r.prototype.removeHighlight=function(){if(this.cursorNodeId){var e=this.getElementByNodeId(this.cursorNodeId);e&&Gn(e,ud)}},r.prototype.updateCursorNode=function(e,t){e&&(e=Vo(e,function(o){return!mne(o)}),e.type==="tableRow"?e=Lje(e,t[1]):e.type==="tableBody"&&(e=null));var n=e?e.id:null;if(this.cursorNodeId!==n){var i=this.getElementByNodeId(this.cursorNodeId),a=this.getElementByNodeId(n);i&&Gn(i,ud),a&&li(a,ud),this.cursorNodeId=n}},r.prototype.getElementByNodeId=function(e){return e?this.previewContent.querySelector('[data-nodeid="'+e+'"]'):null},r.prototype.update=function(e){var t=this;e.forEach(function(n){return t.replaceRangeNodes(n)}),this.eventEmitter.emit("afterPreviewRender",this)},r.prototype.replaceRangeNodes=function(e){var t=this,n=e.nodes,i=e.removedNodeRange,a=this.previewContent,o=this.eventEmitter.emitReduce("beforePreviewRender",this.sanitizer(n.map(function(E){return t.renderer.render(E)}).join("")));if(!i)a.insertAdjacentHTML("afterbegin",o);else{var s=i.id,l=s[0],f=s[1],p=this.getElementByNodeId(l),b=this.getElementByNodeId(f);if(p){p.insertAdjacentHTML("beforebegin",o);for(var T=p;T&&T!==b;){var x=T.nextElementSibling;Xa(T),Xd(T),T=x}T!=null&&T.parentNode&&(Xa(T),Xd(T))}}},r.prototype.getRenderer=function(){return this.renderer},r.prototype.destroy=function(){Qk(this.el,"scroll"),this.el=null},r.prototype.getElement=function(){return this.el},r.prototype.getHTML=function(){return Bh(this.previewContent.innerHTML)},r.prototype.setHTML=function(e){this.previewContent.innerHTML=e},r.prototype.setHeight=function(e){di(this.el,{height:e+"px"})},r.prototype.setMinHeight=function(e){di(this.el,{minHeight:e+"px"})},r})();function Ri(r,e){for(var t=r.depth;t;){var n=r.node(t);if(e(n,t))return{node:n,depth:t,offset:t>0?r.before(t):0};t-=1}return null}function Go(r){return!!Ri(r,function(e){var t=e.type;return t.name==="listItem"||t.name==="bulletList"||t.name==="orderedList"})}function Au(r){return!!Ri(r,function(e){var t=e.type;return t.name==="tableHeadCell"||t.name==="tableBodyCell"})}function Ko(r){return Ri(r,function(e){var t=e.type;return t.name==="listItem"})}function Xu(r){return{tag:r,getAttrs:function(e){var t=e.getAttribute("data-raw-html");return we({},t&&{rawHTML:t})}}}function _w(r){return Object.keys(r).reduce(function(e,t){return t!=="rawHTML"&&r[t]&&(t=t==="className"?"class":t,e[t]=r[t]),e},{})}function zw(r){return{tag:r,getAttrs:function(e){return["rawHTML","colspan","rowspan","extended"].reduce(function(t,n){var i=n==="rawHTML"?"data-raw-html":n,a=e.getAttribute(i);return a&&(t[n]=Fr(["rawHTML","extended"],n)?a:Number(a)),t},{})}}}function Mr(){return{htmlAttrs:{default:null},classNames:{default:null}}}function mr(r){var e=r.htmlAttrs,t=r.classNames;return we(we({},e),{class:t?t.join(" "):null})}function Rje(r,e){var t=r.parent,n=r.startIndex,i=r.endIndex,a=t.contentMatchAt(n).findWrapping(e);if(a){var o=a.length?a[0]:e;return t.canReplaceWith(n,i,o)?a:null}return null}function Ije(r,e){var t=r.parent,n=r.startIndex,i=r.endIndex,a=t.child(n),o=e.contentMatch.findWrapping(a.type);if(o){for(var s=o.length?o[o.length-1]:e,l=s.contentMatch,f=n;l&&f<i;f+=1)l=l.matchType(t.child(f).type);if(l&&l.validEnd)return o}return null}function Pje(r,e,t,n){var i=Rje(r,t),a=Ije(e,t);if(i&&a){var o=i.map(function(l){return{type:l}}),s=a.map(function(l){return{type:l,attrs:n}});return o.concat({type:t}).concat(s)}return null}function Bje(r,e,t,n,i){for(var a=e.start,o=e.end,s=e.startIndex,l=e.endIndex,f=e.parent,p=De.empty,b=t.length-1;b>=0;b-=1)p=De.from(t[b].type.create(t[b].attrs,p));r.step(new xr(a-(n?2:0),o,a,o,new $e(p,0,0),t.length,!0));for(var T=0,b=0;b<t.length;b+=1)if(t[b].type===i){T=b+1;break}for(var x=t.length-T,E=a+t.length-(n?2:0),b=s,P=l;b<P;b+=1){var F=b===s;!F&&Ro(r.doc,E,x)&&(r.split(E,x),E+=x*2),E+=f.child(b).nodeSize}return r}function Vw(r,e,t,n){var i=e.$from,a=e.$to,o=e.depth,s=e,l=!1;if(o>=2&&i.node(o-1).type.compatibleContent(t)&&e.startIndex===0&&i.index(o-1)){var f=r.doc.resolve(e.start-2);s=new ou(f,f,o),e.endIndex<e.parent.childCount&&(e=new ou(i,r.doc.resolve(a.end(o)),o)),l=!0}var p=Pje(s,e,t,n);return p?Bje(r,e,p,l,t):r}function Uw(r,e){for(var t=r.resolve(e);t.node().type.name!=="paragraph";)e-=2,t=r.resolve(e);return Ko(t)}function Fje(r,e){var t=e.$from,n=e.$to,i=Ko(t),a=Ko(n);if(i&&a)for(;a;){var o=a.offset,s=a.node,l={task:!s.attrs.task,checked:!1};if(r.setNodeMarkup(o,null,l),o===i.offset)break;a=Uw(r.doc,o)}return r}function qje(r,e,t){var n=e.$from,i=e.$to,a=Ko(n),o=Ko(i);if(a&&o)for(;o;){var s=o.offset,l=o.node,f=o.depth;l.attrs.task&&r.setNodeMarkup(s,null,{task:!1,checked:!1});var p=r.doc.resolve(s);if(p.parent.type!==t){var b=p.before(f-1);r.setNodeMarkup(b,t)}if(s===a.offset)break;o=Uw(r.doc,s)}return r}function $w(r){return function(e,t){var n=e.selection,i=e.tr,a=n.$from,o=n.$to,s=a.blockRange(o);if(s){var l=Go(a)?qje(i,s,r):Vw(i,s,r);return t(l),!0}return!1}}function Hje(){return function(r,e){var t=r.selection,n=r.tr,i=r.schema,a=t.$from,o=t.$to,s=a.blockRange(o);if(s){var l=Go(a)?Fje(n,s):Vw(n,s,i.nodes.bulletList,{task:!0});return e(l),!0}return!1}}function _je(r){return function(e,t){var n=e.tr,i=e.selection,a=i.$from,o=i.$to,s=a.blockRange(o,function(P){var F=P.childCount,z=P.firstChild;return!!F&&z.type===r});if(s&&s.startIndex>0){var l=s.parent,f=l.child(s.startIndex-1);if(f.type!==r)return!1;var p=f.lastChild&&f.lastChild.type===l.type,b=p?De.from(r.create()):null,T=new $e(De.from(r.create(null,De.from(l.type.create(null,b)))),p?3:1,0),x=s.start,E=s.end;return n.step(new xr(x-(p?3:1),E,x,E,T,1,!0)),t(n),!0}return!1}}function zje(r,e,t){var n=e.$from,i=e.$to,a=e.end,o=e.depth,s=e.parent,l=i.end(o);return a<l&&(r.step(new xr(a-1,l,a,l,new $e(De.from(t.create(null,s.copy())),1,0),1,!0)),e=new ou(r.doc.resolve(n.pos),r.doc.resolve(l),o)),r.lift(e,Ru(e)),r}function Vje(r,e){for(var t=e.parent,n=e.end,i=e.endIndex-1,a=e.startIndex;i>a;i-=1)n-=t.child(i).nodeSize,r.delete(n-1,n+1);var o=r.doc.resolve(e.start),s=o.nodeAfter,l=e.startIndex===0,f=e.endIndex===t.childCount,p=o.node(-1),b=o.index(-1),T=p.canReplace(b+(l?0:1),b+1,s==null?void 0:s.content.append(f?De.empty:De.from(t)));if(s&&T){var x=o.pos,E=x+s.nodeSize;r.step(new xr(x-(l?1:0),E+(f?1:0),x+1,E-1,new $e((l?De.empty:De.from(t.copy(De.empty))).append(f?De.empty:De.from(t.copy(De.empty))),l?0:1,f?0:1),l?0:1))}return r}function Uje(r){return function(e,t){var n=e.tr,i=e.selection,a=i.$from,o=i.$to,s=a.blockRange(o,function(p){var b=p.childCount,T=p.firstChild;return!!b&&T.type===r});if(s){var l=a.node(s.depth-1).type===r,f=l?zje(n,s,r):Vje(n,s);return t(f),!0}return!1}}function $je(r){return function(e,t){var n=e.tr,i=e.selection,a=i.$from,o=i.$to;if(a.depth<2||!a.sameParent(o))return!1;var s=a.node(-1);if(s.type!==r)return!1;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==r||a.index(-2)!==a.node(-2).childCount-1)return!1;for(var l=a.index(-1)>0,f=De.empty,p=a.depth-(l?1:2);p>=a.depth-3;p-=1)f=De.from(a.node(p).copy(f));return f=f.append(De.from(r.createAndFill())),n.replace(l?a.before():a.before(-1),a.after(-3),new $e(f,l?3:2,2)),n.setSelection(Tt.near(n.doc.resolve(a.pos+(l?3:2)))),t(n),!0}var b=o.pos===a.end()?s.contentMatchAt(0).defaultType:null,T=b&&[null,{type:b}];return n.delete(a.pos,o.pos),Ro(n.doc,a.pos,2,T)?(n.split(a.pos,2,T),t(n),!0):!1}}function Wje(){return function(){return function(r,e){var t=r.selection,n=r.schema,i=t.$from,a=t.$to,o=i.blockRange(a);return o&&Go(i)?_je(n.nodes.listItem)(r,e):!1}}}function jje(){return function(){return function(r,e){var t=r.selection,n=r.schema,i=t.$from,a=t.$to,o=i.blockRange(a);return o&&Go(i)?Uje(n.nodes.listItem)(r,e):!1}}}function Jh(){return{indent:Wje(),outdent:jje()}}var Rg=new Map,Lr=(function(){function r(e,t,n,i){this.table=e,this.tableRows=t,this.tableStartPos=n,this.rowInfo=i}return r.create=function(e){var t=Ri(e,function(E){var P=E.type;return P.name==="table"});if(t){var n=t.node,i=t.depth,a=t.offset,o=Rg.get(n);if((o==null?void 0:o.tableStartPos)===a+1)return o;var s=[],l=e.start(i),f=n.child(0),p=n.child(1),b=Zd(f,l),T=Zd(p,l+f.nodeSize);f.forEach(function(E){return s.push(E)}),p.forEach(function(E){return s.push(E)});var x=new r(n,s,l,b.concat(T));return Rg.set(n,x),x}return null},Object.defineProperty(r.prototype,"totalRowCount",{get:function(){return this.rowInfo.length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"totalColumnCount",{get:function(){return this.rowInfo[0].length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"tableStartOffset",{get:function(){return this.tableStartPos},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"tableEndOffset",{get:function(){return this.tableStartPos+this.table.nodeSize-1},enumerable:!1,configurable:!0}),r.prototype.getCellInfo=function(e,t){return this.rowInfo[e][t]},r.prototype.posAt=function(e,t){for(var n=0,i=this.tableStartPos;;n+=1){var a=i+this.tableRows[n].nodeSize;if(n===e){for(var o=t;o<this.totalColumnCount&&this.rowInfo[n][o].offset<i;)o+=1;return o===this.totalColumnCount?a:this.rowInfo[n][o].offset}i=a}},r.prototype.getNodeAndPos=function(e,t){var n=this.rowInfo[e][t];return{node:this.table.nodeAt(n.offset-this.tableStartOffset),pos:n.offset}},r.prototype.extendedRowspan=function(e,t){return!1},r.prototype.extendedColspan=function(e,t){return!1},r.prototype.getRowspanCount=function(e,t){return 0},r.prototype.getColspanCount=function(e,t){return 0},r.prototype.decreaseColspanCount=function(e,t){return 0},r.prototype.decreaseRowspanCount=function(e,t){return 0},r.prototype.getColspanStartInfo=function(e,t){return null},r.prototype.getRowspanStartInfo=function(e,t){return null},r.prototype.getCellStartOffset=function(e,t){var n=this.rowInfo[e][t].offset;return this.extendedRowspan(e,t)?this.posAt(e,t):n},r.prototype.getCellEndOffset=function(e,t){var n=this.rowInfo[e][t],i=n.offset,a=n.nodeSize;return this.extendedRowspan(e,t)?this.posAt(e,t):i+a},r.prototype.getCellIndex=function(e){for(var t=0;t<this.totalRowCount;t+=1)for(var n=this.rowInfo[t],i=0;i<this.totalColumnCount;i+=1)if(n[i].offset+1>e.pos)return[t,i];return[0,0]},r.prototype.getRectOffsets=function(e,t){var n,i,a;t===void 0&&(t=e),e.pos>t.pos&&(n=[t,e],e=n[0],t=n[1]);var o=this.getCellIndex(e),s=o[0],l=o[1],f=this.getCellIndex(t),p=f[0],b=f[1];return i=Im(s,p),s=i[0],p=i[1],a=Im(l,b),l=a[0],b=a[1],this.getSpannedOffsets({startRowIdx:s,startColIdx:l,endRowIdx:p,endColIdx:b})},r.prototype.getSpannedOffsets=function(e){return e},r})(),Zd=function(r,e){var t=[];return r.forEach(function(n,i){var a={rowspanMap:{},colspanMap:{},length:0};n.forEach(function(o,s){for(var l=o.nodeSize,f=0;a[f];)f+=1;a[f]={offset:e+i+s+2,nodeSize:l},a.length+=1}),t.push(a)}),t};function Gje(r,e){return Oh(Lr.prototype,r),Zd=e,Lr}function Kje(r,e,t){for(var n=t.startRowIdx,i=t.startColIdx,a=t.endRowIdx,o=t.endColIdx,s=[],l=n;l<=a;l+=1)for(var f=i;f<=o;f+=1){var p=e.getCellInfo(l,f),b=p.offset,T=p.nodeSize;s.push(new Mb(r.resolve(b+1),r.resolve(b+T-1)))}return s}function Jje(r,e){var t=[];return r.childCount&&t.push(r),e.childCount&&t.push(e),De.from(t)}var Yh=(function(r){Ge(e,r);function e(t,n){n===void 0&&(n=t);var i=this,a=t.node(0),o=Lr.create(t),s=o.getRectOffsets(t,n),l=Kje(a,o,s);return i=r.call(this,l[0].$from,l[0].$to,l)||this,i.startCell=t,i.endCell=n,i.offsetMap=o,i.isCellSelection=!0,i.visible=!1,i}return e.prototype.map=function(t,n){var i=this.startCell.pos,a=this.endCell.pos,o=t.resolve(n.map(i)),s=t.resolve(n.map(a)),l=Lr.create(o);if(this.offsetMap.totalColumnCount>l.totalColumnCount||this.offsetMap.totalRowCount>l.totalRowCount){var f={tableBody:1,tableRow:2,tableCell:3,paragraph:4},p=f[s.parent.type.name],b=s.end(s.depth-p),T=Math.min(b-4,s.pos);return xt.create(t,T)}return new e(o,s)},e.prototype.eq=function(t){return t instanceof e&&t.startCell.pos===this.startCell.pos&&t.endCell.pos===this.endCell.pos},e.prototype.content=function(){for(var t=this.startCell.node(-2),n=this.startCell.start(-2),i=t.child(1).firstChild,a=t.child(0).type.create(),o=t.child(1).type.create(),s=Lr.create(this.startCell),l=s.getRectOffsets(this.startCell,this.endCell),f=l.startRowIdx,p=l.startColIdx,b=l.endRowIdx,T=l.endColIdx,x=!1,E=f;E<=b;E+=1){for(var P=[],F=p;F<=T;F+=1){var z=s.getCellInfo(E,F).offset,Y=t.nodeAt(z-n);Y&&(x=Y.type.name==="tableHeadCell",s.extendedRowspan(E,F)||s.extendedColspan(E,F)?P.push(Y.type.create({extended:!0})):P.push(Y.copy(Y.content)))}var ee=i.copy(De.from(P)),se=x?a:o;se.content=se.content.append(De.from(ee))}return new $e(Jje(a,o),1,1)},e.prototype.toJSON=function(){return JSON.stringify(this)},e})(Tt);function Yje(r,e,t){for(var n=e.nodes,i=n.tableRow,a=n.tableHeadCell,o=n.paragraph,s=[],l=0;l<r;l+=1){var f=t&&t[l],p=o.create(null,f?e.text(f):[]);s.push(a.create(null,p))}return[i.create(null,s)]}function Ww(r,e,t,n){for(var i=t.nodes,a=i.tableRow,o=i.tableBodyCell,s=i.paragraph,l=[],f=0;f<r;f+=1){for(var p=[],b=0;b<e;b+=1){var T=n&&n[f*e+b],x=s.create(null,T?t.text(T):[]);p.push(o.create(null,x))}l.push(a.create(null,p))}return l}function Ql(r,e,t,n){n===void 0&&(n=null);for(var i=t.nodes,a=i.tableHeadCell,o=i.tableBodyCell,s=i.paragraph,l=e===0?a:o,f=[],p=0;p<r;p+=1)f.push(l.create(n,s.create()));return f}function jw(r,e){for(;r&&r!==e;){if(r.nodeName==="TD"||r.nodeName==="TH")return r;r=r.parentNode}return null}function Gw(r){return Ri(r,function(e){var t=e.type;return t.name==="tableHeadCell"||t.name==="tableBodyCell"})}function ai(r){if(r instanceof xt){var e=r.$anchor,t=Gw(e);if(t){var n=e.node(0).resolve(e.before(t.depth));return{anchor:n,head:n}}}var i=r,a=i.startCell,o=i.endCell;return{anchor:a,head:o}}function Kw(r){var e;if(r.size){var t=r.content,n=r.openStart,i=r.openEnd;if(t.childCount!==1)return null;for(;t.childCount===1&&(n>0&&i>0||((e=t.firstChild)===null||e===void 0?void 0:e.type.name)==="table");)n-=1,i-=1,t=t.firstChild.content;if(t.firstChild.type.name==="tableHead"||t.firstChild.type.name==="tableBody")return t}return null}function Do(r){var e=r.startRowIdx,t=r.startColIdx,n=r.endRowIdx,i=r.endColIdx,a=n-e+1,o=i-t+1;return{rowCount:a,columnCount:o}}function Xje(r,e){return we(we({},r.attrs),e)}var Qi=new Hs("cellSelection"),Zje=2,Qje=(function(){function r(e){this.view=e,this.handlers={mousedown:this.handleMousedown.bind(this),mousemove:this.handleMousemove.bind(this),mouseup:this.handleMouseup.bind(this)},this.startCellPos=null,this.init()}return r.prototype.init=function(){this.view.dom.addEventListener("mousedown",this.handlers.mousedown)},r.prototype.handleMousedown=function(e){var t=jw(e.target,this.view.dom);if(e.button===Zje){e.preventDefault();return}if(t){var n=this.getCellPos(e);n&&(this.startCellPos=n),this.bindEvent()}},r.prototype.handleMousemove=function(e){var t=Qi.getState(this.view.state),n=this.getCellPos(e),i=this.startCellPos,a;t?a=this.view.state.doc.resolve(t):i!==n&&(a=i),a&&i&&n&&this.setCellSelection(i,n)},r.prototype.handleMouseup=function(){this.startCellPos=null,this.unbindEvent(),Qi.getState(this.view.state)!==null&&this.view.dispatch(this.view.state.tr.setMeta(Qi,-1))},r.prototype.bindEvent=function(){var e=this.view.dom;e.addEventListener("mousemove",this.handlers.mousemove),e.addEventListener("mouseup",this.handlers.mouseup)},r.prototype.unbindEvent=function(){var e=this.view.dom;e.removeEventListener("mousemove",this.handlers.mousemove),e.removeEventListener("mouseup",this.handlers.mouseup)},r.prototype.getCellPos=function(e){var t=e.clientX,n=e.clientY,i=this.view.posAtCoords({left:t,top:n});if(i){var a=this.view.state.doc,o=a.resolve(i.pos),s=Gw(o);if(s){var l=o.before(s.depth);return a.resolve(l)}}return null},r.prototype.setCellSelection=function(e,t){var n=this.view.state,i=n.selection,a=n.tr,o=Qi.getState(this.view.state)===null,s=new Yh(e,t);if(o||!i.eq(s)){var l=a.setSelection(s);o&&l.setMeta(Qi,t.pos),this.view.dispatch(l)}},r.prototype.destroy=function(){this.view.dom.removeEventListener("mousedown",this.handlers.mousedown)},r})(),eGe=Je("cell-selected");function tGe(r){var e=r.selection,t=r.doc;if(e instanceof Yh){var n=[],i=e.ranges;return i.forEach(function(a){var o=a.$from,s=a.$to;n.push(cn.node(o.pos-1,s.pos+1,{class:eGe}))}),dr.create(t,n)}return null}function rGe(){return new hn({key:Qi,state:{init:function(){return null},apply:function(r,e){var t=r.getMeta(Qi);if(t)return t===-1?null:t;if(pu(e)||!r.docChanged)return e;var n=r.mapping.mapResult(e),i=n.deleted,a=n.pos;return i?null:a}},props:{decorations:tGe,createSelectionBetween:function(r){var e=r.state;return pu(Qi.getState(e))?null:e.selection}},view:function(r){return new Qje(r)}})}var Jw=(function(){function r(){this.keys=[],this.values=[]}return r.prototype.getKeyIndex=function(e){return Ja(e,this.keys)},r.prototype.get=function(e){return this.values[this.getKeyIndex(e)]},r.prototype.set=function(e,t){var n=this.getKeyIndex(e);return n>-1?this.values[n]=t:(this.keys.push(e),this.values.push(t)),this},r.prototype.has=function(e){return this.getKeyIndex(e)>-1},r.prototype.delete=function(e){var t=this.getKeyIndex(e);return t>-1?(this.keys.splice(t,1),this.values.splice(t,1),!0):!1},r.prototype.forEach=function(e,t){var n=this;t===void 0&&(t=this),this.values.forEach(function(i,a){i&&n.keys[a]&&e.call(t,i,n.keys[a],n)})},r.prototype.clear=function(){this.keys=[],this.values=[]},r})(),cd="en-US",nGe=(function(){function r(){this.code=cd,this.langs=new Jw}return r.prototype.setCode=function(e){this.code=e||cd},r.prototype.setLanguage=function(e,t){var n=this;e=[].concat(e),e.forEach(function(i){if(!n.langs.has(i))n.langs.set(i,t);else{var a=n.langs.get(i);n.langs.set(i,Th(a,t))}})},r.prototype.get=function(e,t){t||(t=this.code);var n=this.langs.get(t);n||(n=this.langs.get(cd));var i=n[e];if(!i)throw new Error('There is no text key "'+e+'" in '+t);return i},r})(),pt=new nGe,iGe=[[{action:"Add row to up",command:"addRowToUp",disableInThead:!0,className:"add-row-up"},{action:"Add row to down",command:"addRowToDown",disableInThead:!0,className:"add-row-down"},{action:"Remove row",command:"removeRow",disableInThead:!0,className:"remove-row"}],[{action:"Add column to left",command:"addColumnToLeft",className:"add-column-left"},{action:"Add column to right",command:"addColumnToRight",className:"add-column-right"},{action:"Remove column",command:"removeColumn",className:"remove-column"}],[{action:"Align column to left",command:"alignColumn",payload:{align:"left"},className:"align-column-left"},{action:"Align column to center",command:"alignColumn",payload:{align:"center"},className:"align-column-center"},{action:"Align column to right",command:"alignColumn",payload:{align:"right"},className:"align-column-right"}],[{action:"Remove table",command:"removeTable",className:"remove-table"}]];function aGe(r,e){return iGe.map(function(t){return t.map(function(n){var i=n.action,a=n.command,o=n.payload,s=n.disableInThead,l=n.className;return{label:pt.get(i),onClick:function(){r.emit("command",a,o)},disabled:e&&!!s,className:l}})}).concat()}function oGe(r){return new hn({props:{handleDOMEvents:{contextmenu:function(e,t){var n=jw(t.target,e.dom);if(n){t.preventDefault();var i=t,a=i.clientX,o=i.clientY,s=e.dom.parentNode.getBoundingClientRect(),l=s.left,f=s.top,p=n.nodeName==="TH";return r.emit("contextmenu",{pos:{left:a-l+10+"px",top:o-f+30+"px"},menuGroups:aGe(r,p),tableCell:n}),!0}return!1}}}})}function sGe(){return new hn({props:{handleDOMEvents:{mousedown:function(r,e){var t=e,n=t.clientX,i=t.clientY,a=r.posAtCoords({left:n,top:i});if(a){var o=r.state,s=o.doc,l=o.tr,f=s.resolve(a.pos),p=Ko(f),b=e.target,T=getComputedStyle(b,":before"),x=e,E=x.offsetX,P=x.offsetY;if(!p||!Lh(T,E,P))return!1;e.preventDefault();var F=f.before(p.depth),z=p.node.attrs;return l.setNodeMarkup(F,null,we(we({},z),{checked:!z.checked})),r.dispatch(l),!0}return!1}}}})}var lGe=["image","link","customBlock","frontMatter"],uGe=["strong","strike","emph","code"],Yw=["bulletList","orderedList","taskList"];function cGe(r,e){var t=r.type.name;return t==="listItem"?r.attrs.task?"taskList":e.type.name:t.indexOf("table")!==-1?"table":t}function fGe(r,e){e[r]={active:!0},Yw.filter(function(t){return t!==r}).forEach(function(t){e[t]&&delete e[t]})}function dGe(r,e,t,n){uGe.forEach(function(i){var a=t.marks[i],o=r.marksAcross(e)||[],s=!!a.isInSet(o);s&&(n[i]={active:!0})})}function hGe(r,e,t){var n=r.$from,i=r.$to,a=r.from,o=r.to,s={indent:{active:!1,disabled:!0},outdent:{active:!1,disabled:!0}};return e.nodesBetween(a,o,function(l,f,p){var b=cGe(l,p);Fr(lGe,b)||(Fr(Yw,b)?(fGe(b,s),s.indent.disabled=!1,s.outdent.disabled=!1):b==="paragraph"||b==="text"?dGe(n,i,t,s):s[b]={active:!0})}),s}function pGe(r){return new hn({view:function(){return{update:function(e){var t=e.state,n=t.selection,i=t.doc,a=t.schema;r.emit("changeToolbarState",{toolbarState:hGe(n,i,a)})}}}})}var vGe=(function(){function r(e,t,n,i){var a=this;this.openEditor=function(){if(a.innerEditorView)throw new Error("The editor is already opened.");a.dom.draggable=!1,a.wrapper.style.display="none",a.innerViewContainer.style.display="block",a.innerEditorView=new qu(a.innerViewContainer,{state:Ba.create({doc:a.node,plugins:[Bs({"Mod-z":function(){return Ms(a.innerEditorView.state,a.innerEditorView.dispatch)},"Shift-Mod-z":function(){return Ch(a.innerEditorView.state,a.innerEditorView.dispatch)},Tab:function(o,s){return s(o.tr.insertText(" ")),!0},Enter:hk,Escape:function(){return a.cancelEditing(),!0},"Ctrl-Enter":function(){return a.saveAndFinishEditing(),!0}}),kk()]}),dispatchTransaction:function(o){return a.dispatchInner(o)},handleDOMEvents:{mousedown:function(){return a.editorView.hasFocus()&&a.innerEditorView.focus(),!0},blur:function(){return a.saveAndFinishEditing(),!0}}}),a.innerEditorView.focus()},this.node=e,this.editorView=t,this.getPos=n,this.toDOMAdaptor=i,this.innerEditorView=null,this.canceled=!1,this.dom=document.createElement("div"),this.dom.className=Je("custom-block"),this.wrapper=document.createElement("div"),this.wrapper.className=Je("custom-block-view"),this.createInnerViewContainer(),this.renderCustomBlock(),this.dom.appendChild(this.innerViewContainer),this.dom.appendChild(this.wrapper)}return r.prototype.renderToolArea=function(){var e=this,t=document.createElement("div"),n=document.createElement("span"),i=document.createElement("button");t.className="tool",n.textContent=this.node.attrs.info,n.className="info",i.type="button",i.addEventListener("click",function(){return e.openEditor()}),t.appendChild(n),t.appendChild(i),this.wrapper.appendChild(t)},r.prototype.renderCustomBlock=function(){var e=this.toDOMAdaptor.getToDOMNode(this.node.attrs.info);if(e){for(var t=e(this.node);this.wrapper.hasChildNodes();)this.wrapper.removeChild(this.wrapper.lastChild);t&&this.wrapper.appendChild(t),this.renderToolArea()}},r.prototype.createInnerViewContainer=function(){this.innerViewContainer=document.createElement("div"),this.innerViewContainer.className=Je("custom-block-editor"),this.innerViewContainer.style.display="none"},r.prototype.closeEditor=function(){this.innerEditorView&&(this.innerEditorView.destroy(),this.innerEditorView=null,this.innerViewContainer.style.display="none"),this.wrapper.style.display="block"},r.prototype.saveAndFinishEditing=function(){var e=this.editorView.state.selection.to,t=this.editorView.state;this.editorView.dispatch(t.tr.setSelection(Yt(t.tr,e))),this.editorView.focus(),this.renderCustomBlock(),this.closeEditor()},r.prototype.cancelEditing=function(){var e=fre(this.innerEditorView.state);for(this.canceled=!0;e--;)Ms(this.innerEditorView.state,this.innerEditorView.dispatch),Ms(this.editorView.state,this.editorView.dispatch);this.canceled=!1;var t=this.editorView.state.selection.to,n=this.editorView.state;this.editorView.dispatch(n.tr.setSelection(xt.create(n.doc,t))),this.editorView.focus(),this.closeEditor()},r.prototype.dispatchInner=function(e){var t=this.innerEditorView.state.applyTransaction(e),n=t.state,i=t.transactions;if(this.innerEditorView.updateState(n),!this.canceled&&Hn(this.getPos)){for(var a=this.editorView.state.tr,o=un.offset(this.getPos()+1),s=0;s<i.length;s+=1)for(var l=i[s].steps,f=0;f<l.length;f+=1)a.step(l[f].map(o));a.docChanged&&this.editorView.dispatch(a)}},r.prototype.update=function(e){return e.sameMarkup(this.node)?(this.node=e,this.innerEditorView||this.renderCustomBlock(),!0):!1},r.prototype.stopEvent=function(e){return!!this.innerEditorView&&!!e.target&&this.innerEditorView.dom.contains(e.target)},r.prototype.ignoreMutation=function(){return!0},r.prototype.destroy=function(){this.dom.removeEventListener("dblclick",this.openEditor),this.closeEditor()},r})(),Ig="image-link",mGe=(function(){function r(e,t,n,i){var a=this,o;this.handleMousedown=function(s){s.preventDefault();var l=s.target,f=s.offsetX,p=s.offsetY;if(a.imageLink&&Hn(a.getPos)&&Nk(l,Ig)){var b=getComputedStyle(l,":before");if(s.stopPropagation(),Lh(b,f,p)){var T=a.view.state.tr,x=a.getPos();T.setSelection(Yt(T,x,x+1)),a.view.dispatch(T),a.eventEmitter.emit("openPopup","link",a.imageLink.attrs)}}},this.node=e,this.view=t,this.getPos=n,this.eventEmitter=i,this.imageLink=(o=e.marks.filter(function(s){var l=s.type;return l.name==="link"})[0])!==null&&o!==void 0?o:null,this.dom=this.createElement(),this.bindEvent()}return r.prototype.createElement=function(){var e=this.createImageElement(this.node);if(this.imageLink){var t=document.createElement("span");return t.className=Ig,t.appendChild(e),t}return e},r.prototype.createImageElement=function(e){var t=document.createElement("img"),n=e.attrs,i=n.imageUrl,a=n.altText,o=mr(e.attrs);return t.src=i,a&&(t.alt=a),Ph(o,t),t},r.prototype.bindEvent=function(){this.imageLink&&this.dom.addEventListener("mousedown",this.handleMousedown)},r.prototype.stopEvent=function(){return!0},r.prototype.destroy=function(){this.imageLink&&this.dom.removeEventListener("mousedown",this.handleMousedown)},r})(),gGe="toastui-editor-ww-code-block",yGe="toastui-editor-ww-code-block-language",bGe=(function(){function r(e,t,n,i){var a=this;this.contentDOM=null,this.input=null,this.timer=null,this.handleMousedown=function(o){var s=o.target,l=getComputedStyle(s,":after");if(l.backgroundImage!=="none"&&Hn(a.getPos)){var f=a.view.coordsAtPos(a.getPos()),p=f.top,b=f.right;a.createLanguageEditor({top:p,right:b})}},this.handleKeydown=function(o){o.key==="Enter"&&a.input&&(o.preventDefault(),a.changeLanguage())},this.node=e,this.view=t,this.getPos=n,this.eventEmitter=i,this.createElement(),this.bindDOMEvent(),this.bindEvent()}return r.prototype.createElement=function(){var e=this.node.attrs.language,t=document.createElement("div");t.setAttribute("data-language",e||"text"),t.className=gGe;var n=this.createCodeBlockElement(),i=n.firstChild;t.appendChild(n),this.dom=t,this.contentDOM=i},r.prototype.createCodeBlockElement=function(){var e=document.createElement("pre"),t=document.createElement("code"),n=this.node.attrs.language,i=mr(this.node.attrs);return n&&t.setAttribute("data-language",n),Ph(i,e),e.appendChild(t),e},r.prototype.createLanguageEditor=function(e){var t=this,n=e.top,i=e.right,a=document.createElement("span");a.className=yGe;var o=document.createElement("input");o.type="text",o.value=this.node.attrs.language,a.appendChild(o),this.view.dom.parentElement.appendChild(a);var s=a.clientWidth;di(a,{top:n+10+"px",left:i-s-10+"px",width:s+"px"}),this.input=o,this.input.addEventListener("blur",function(){return t.changeLanguage()}),this.input.addEventListener("keydown",this.handleKeydown),this.clearTimer(),this.timer=setTimeout(function(){t.input.focus()})},r.prototype.bindDOMEvent=function(){this.dom&&this.dom.addEventListener("click",this.handleMousedown)},r.prototype.bindEvent=function(){var e=this;this.eventEmitter.listen("scroll",function(){e.input&&e.reset()})},r.prototype.changeLanguage=function(){if(this.input&&Hn(this.getPos)){var e=this.input.value;this.reset();var t=this.getPos(),n=this.view.state.tr;n.setNodeMarkup(t,null,{language:e}),this.view.dispatch(n)}},r.prototype.reset=function(){var e;if(!((e=this.input)===null||e===void 0)&&e.parentElement){var t=this.input.parentElement;this.input=null,Xa(t)}},r.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},r.prototype.stopEvent=function(){return!0},r.prototype.update=function(e){return e.sameMarkup(this.node)?(this.node=e,!0):!1},r.prototype.destroy=function(){this.reset(),this.clearTimer(),this.dom&&this.dom.removeEventListener("click",this.handleMousedown)},r})(),kGe=/MsoListParagraph/,Xw=/style=(.|\n)*mso-/,Zw=/mso-list:(.*)/,wGe=/O:P/,CGe=/^(n|u|l)/,TGe="p.MsoListParagraph";function SGe(r){return Xw.test(r)}function xGe(r){for(var e=[],t=document.createTreeWalker(r,1,null,!1);t.nextNode();){var n=t.currentNode;if($u(n)){var i=n,a=i.outerHTML,o=i.textContent,s=Xw.test(a),l=Zw.test(a);s&&!l&&o?e.push([n,!0]):(wGe.test(n.nodeName)||s&&!o||l)&&e.push([n,!1])}}return e.forEach(function(f){var p=f[0],b=f[1];b?$ne(p):Xa(p)}),r.innerHTML.trim()}function EGe(r,e){var t=r.getAttribute("style");if(t){var n=t.match(Zw),i=n[1],a=i.trim().split(" "),o=a[1],s=parseInt(o.replace("level",""),10),l=CGe.test(r.textContent||"");return{id:e,level:s,prev:null,parent:null,children:[],unordered:l,contents:xGe(r)}}return null}function MGe(r,e){if(e.level<r.level)e.children.push(r),r.parent=e;else{for(;e&&e.level!==r.level;)e=e.parent;e&&(r.prev=e,r.parent=e.parent,r.parent&&r.parent.children.push(r))}}function AGe(r){var e=[];return r.forEach(function(t,n){var i=e[n-1],a=EGe(t,n);a&&(i&&MGe(a,i),e.push(a))}),e}function Qw(r){var e=r[0].unordered?"ul":"ol",t=document.createElement(e);return r.forEach(function(n){var i=n.children,a=n.contents,o=document.createElement("li");o.innerHTML=a,t.appendChild(o),i.length&&t.appendChild(Qw(i))}),t}function OGe(r){var e=AGe(r),t=e.filter(function(n){var i=n.parent;return!i});return Qw(t)}function NGe(r){for(;r&&!$u(r);)r=r.nextSibling;return r?!kGe.test(r.className):!0}function DGe(r){var e=document.createElement("div");e.innerHTML=r;var t=[],n=zne(e,TGe);n.forEach(function(a){var o=NGe(a.nextSibling);if(t.push(a),o){var s=OGe(t),l=a.nextSibling;l?Une(s,l):Vne(e,s),t=[]}Xa(a)});var i=n.length?"<p></p>":"";return""+i+e.innerHTML}var Pg="<!--StartFragment-->",LGe="<!--EndFragment-->";function RGe(r){var e=r.indexOf(Pg),t=r.lastIndexOf(LGe);return e>-1&&t>-1&&(r=r.slice(e+Pg.length,t)),r.replace(/<br[^>]*>/g,Pk)}function IGe(r){return/<\/td>((?!<\/tr>)[\s\S])*$/i.test(r)&&(r="<tr>"+r+"</tr>"),/<\/tr>((?!<\/table>)[\s\S])*$/i.test(r)&&(r="<table>"+r+"</table>"),r}function PGe(r){return r=RGe(r),r=IGe(r),SGe(r)&&(r=DGe(r)),r}function BGe(r){var e=r.reduce(function(t,n){return t.childCount>n.childCount?t:n});return e.childCount}function e0(r,e,t){for(var n=[],i=r.childCount,a=0;a<i;a+=1)if(!r.child(a).attrs.extended){var o=a<i?t.create(r.child(a).attrs,r.child(a).content):t.createAndFill();n.push(o)}return n}function t0(r,e,t){var n=t.nodes,i=n.tableRow,a=n.tableHeadCell,o=e0(r,e,a);return i.create(null,o)}function r0(r,e,t){var n=t.nodes,i=n.tableRow,a=n.tableBodyCell,o=e0(r,e,a);return i.create(null,o)}function FGe(r,e){for(var t=e.nodes,n=t.tableRow,i=t.tableBodyCell,a=[],o=0;o<r;o+=1){var s=i.createAndFill();a.push(s)}return n.create({dummyRowForPasting:!0},a)}function n0(r){var e=[],t=[];if(r.firstChild.type.name==="tableHead"){var n=r.firstChild;n.forEach(function(a){return e.push(a)})}if(r.lastChild.type.name==="tableBody"){var i=r.lastChild;i.forEach(function(a){return t.push(a)})}return dn(dn([],e),t)}function qGe(r,e,t){var n=t0(r,e,t);return t.nodes.tableHead.create(null,n)}function Bg(r,e,t){var n=r.map(function(a){return r0(a,e,t)});if(!r.length){var i=FGe(e,t);n.push(i)}return t.nodes.tableBody.create(null,n)}function HGe(r,e,t,n){var i=BGe(r);if(t&&n)return e.nodes.table.create(null,[Bg(r,i,e)]);var a=r[0],o=r.slice(1),s=[qGe(a,i,e)];return o.length&&s.push(Bg(o,i,e)),e.nodes.table.create(null,s)}function _Ge(r,e,t){var n=[],i=r.content,a=r.openStart,o=r.openEnd;return i.forEach(function(s){if(s.type.name==="table"){var l=Kw(new $e(De.from(s),0,0));if(l){var f=n0(l),p=l.firstChild.type.name==="tableBody",b=HGe(f,e,p,t);n.push(b)}}else n.push(s)}),new $e(De.from(n),a,o)}var zGe=4,VGe=2;function eu(r){return r*zGe}function UGe(r,e,t){var n=[],i=n0(r),a=i[0].childCount,o=i.length,s=e.startRowIdx===0,l=i.slice(0,o);if(s){var f=l.shift();if(f){var p=t0(f,a,t).content;n.push(p)}}return l.forEach(function(b){if(!b.attrs.dummyRowForPasting){var T=r0(b,a,t).content;n.push(T)}}),n}function $Ge(r,e,t){for(var n=e.startRowIdx,i=e.startColIdx,a=t.length,o=0,s=function(x){var E=t[x].childCount;t[x].forEach(function(P){var F=P.attrs,z=F.colspan;z>1&&(E+=z-1)}),o=Math.max(o,E)},l=0;l<a;l+=1)s(l);var f=n+a-1,p=i+o-1,b=Math.max(f+1-r.totalRowCount,0),T=Math.max(p+1-r.totalColumnCount,0);return{startRowIdx:n,startColIdx:i,endRowIdx:f,endColIdx:p,addedRowCount:b,addedColumnCount:T}}function WGe(r,e){for(var t=r.startRowIdx,n=r.startColIdx,i=r.endRowIdx,a=r.endColIdx,o=r.addedRowCount,s=r.addedColumnCount,l=t;l<=i-o;l+=1)e.push({rowIdx:l,startColIdx:n,endColIdx:a-s})}function jGe(r,e,t,n,i){for(var a=n.startRowIdx,o=n.startColIdx,s=n.endRowIdx,l=n.endColIdx,f=n.addedRowCount,p=n.addedColumnCount,b=t.totalRowCount,T=0,x=0;x<b;x+=1){var E=t.getCellInfo(x,l-p),P=E.offset,F=E.nodeSize,z=r.mapping.map(P+F),Y=Ql(p,x,e);if(r.insert(z,Y),x>=a&&x<=s-f){var ee=t.getCellInfo(x,l-p),se=r.mapping.map(ee.offset),de=z+eu(p);i[T]={rowIdx:x,startColIdx:o,endColIdx:l,dummyOffsets:[se,de]},T+=1}}}function GGe(r,e,t,n,i){var a=n.addedRowCount,o=n.addedColumnCount,s=n.startColIdx,l=n.endColIdx,f=r.mapping.maps.length,p=t.tableEndOffset-2,b=Ww(a,t.totalColumnCount+o,e),T=p;r.insert(r.mapping.slice(f).map(T),b);for(var x=0;x<a;x+=1){var E=T+eu(s)+1,P=T+eu(l+1)+1,F=T+eu(t.totalColumnCount+o)+VGe;i.push({rowIdx:x+t.totalRowCount,startColIdx:s,endColIdx:l,dummyOffsets:[E,P]}),T=F}}function KGe(r,e,t,n){var i=r.mapping.maps.length;t.forEach(function(a,o){var s=a.rowIdx,l=a.startColIdx,f=a.endColIdx,p=a.dummyOffsets,b=r.mapping.slice(i),T=new $e(e[o],0,0),x=p?p[0]:n.getCellStartOffset(s,l),E=p?p[1]:n.getCellEndOffset(s,f);r.replace(b.map(x),b.map(E),T)})}function JGe(r,e){var t=r.state,n=t.selection,i=t.schema,a=t.tr,o=ai(n),s=o.anchor,l=o.head;if(s&&l){var f=Kw(e);if(!f)return!1;var p=Lr.create(s),b=p.getRectOffsets(s,l),T=UGe(f,b,i),x=$Ge(p,b,T),E=[];return XGe(p,x)&&(WGe(x,E),x.addedColumnCount&&jGe(a,i,p,x,E),x.addedRowCount&&GGe(a,i,p,x,E),KGe(a,T,E,p),r.dispatch(a),YGe(r,E,p.getCellInfo(0,0).offset)),!0}return!1}function YGe(r,e,t){var n=r.state,i=n.tr,a=n.doc,o=Lr.create(a.resolve(t)),s=e[0],l=s.rowIdx,f=s.startColIdx,p=Ur(e),b=p.rowIdx,T=p.endColIdx,x=o.getCellInfo(l,f).offset,E=o.getCellInfo(b,T).offset;r.dispatch(i.setSelection(new Yh(a.resolve(x),a.resolve(E))))}function XGe(r,e){var t=r.getSpannedOffsets(e),n=Do(t),i=n.rowCount,a=n.columnCount,o=Do(e),s=o.rowCount,l=o.columnCount;return i===s&&a===l}var ZGe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"doc"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"block+"}},enumerable:!1,configurable:!0}),e})(Gt),QGe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"paragraph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"inline*",group:"block",attrs:we({},Mr()),parseDOM:[{tag:"p"}],toDOM:function(t){var n=t.attrs;return["p",mr(n),0]}}},enumerable:!1,configurable:!0}),e})(Gt),eKe=/\s{1,4}$/,tKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"text"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{group:"inline"}},enumerable:!1,configurable:!0}),e.prototype.addSpaces=function(){return function(t,n){var i=t.selection,a=t.tr,o=i.$from,s=i.$to,l=o.blockRange(s);return l&&!Go(o)&&!Au(o)?(n(a.insertText(" ",o.pos,s.pos)),!0):!1}},e.prototype.removeSpaces=function(){return function(t,n){var i=t.selection,a=t.tr,o=i.$from,s=i.$to,l=i.from,f=o.blockRange(s);if(f&&!Go(o)&&!Au(o)){var p=o.nodeBefore;if(p&&p.isText){var b=p.text,T=b.replace(eKe,""),x=b.length-T.length;return n(a.delete(l-x,l)),!0}}return!1}},e.prototype.keymaps=function(){return{Tab:this.addSpaces(),"Shift-Tab":this.removeSpaces()}},e})(Gt),rKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"heading"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"levels",{get:function(){return[1,2,3,4,5,6]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=this.levels.map(function(n){return{tag:"h"+n,getAttrs:function(i){var a=i.getAttribute("data-raw-html");return we({level:n},a&&{rawHTML:a})}}});return{attrs:we({level:{default:1},headingType:{default:"atx"},rawHTML:{default:null}},Mr()),content:"inline*",group:"block",defining:!0,parseDOM:t,toDOM:function(n){var i=n.attrs;return["h"+i.level,mr(i),0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(t){return function(n,i){var a=n.schema.nodes[t.level?"heading":"paragraph"];return wh(a,t)(n,i)}}},e})(Gt),nKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"codeBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",attrs:we({language:{default:null},rawHTML:{default:null}},Mr()),code:!0,defining:!0,marks:"",parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:function(t){var n=t.getAttribute("data-raw-html"),i=t.firstElementChild;return we({language:(i==null?void 0:i.getAttribute("data-language"))||null},n&&{rawHTML:n})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"pre",["code",we({"data-language":n.language},mr(n)),0]]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return wh(t.schema.nodes.codeBlock)(t,n)}}},e.prototype.moveCursor=function(t){var n=this;return function(i,a){var o=i.tr,s=i.doc,l=i.schema,f=i.selection.$from,p=n.context.view;if(p.endOfTextblock(t)&&f.node().type.name==="codeBlock"){var b=f.parent.textContent.split(`
|
|
66
|
-
`),T=t==="up"?f.start():f.end(),x=t==="up"?[T,b[0].length+T]:[T-Ur(b).length,T],E=s.resolve(t==="up"?f.before():f.after()),P=t==="up"?E.nodeBefore:E.nodeAfter;if(une(f.pos,x[0],x[1])&&!P){var F=Nh(o,E,l);if(F)return a(F),!0}}return!1}},e.prototype.keymaps=function(){var t=this.commands()();return{"Shift-Mod-p":t,"Shift-Mod-P":t,ArrowUp:this.moveCursor("up"),ArrowDown:this.moveCursor("down")}},e})(Gt),iKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"bulletList"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"listItem+",group:"block",attrs:we({rawHTML:{default:null}},Mr()),parseDOM:[Xu("ul")],toDOM:function(t){var n=t.attrs;return["ul",mr(n),0]}}},enumerable:!1,configurable:!0}),e.prototype.changeList=function(){return function(t,n){return $w(t.schema.nodes.bulletList)(t,n)}},e.prototype.commands=function(){return{bulletList:this.changeList,taskList:Hje}},e.prototype.keymaps=function(){var t=this.changeList(),n=Jh(),i=n.indent,a=n.outdent;return{"Mod-u":t,"Mod-U":t,Tab:i(),"Shift-Tab":a()}},e})(Gt),aKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"orderedList"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"listItem+",group:"block",attrs:we({order:{default:1},rawHTML:{default:null}},Mr()),parseDOM:[{tag:"ol",getAttrs:function(t){var n=t.getAttribute("start"),i=t.getAttribute("data-raw-html");return we({order:t.hasAttribute("start")?Number(n):1},i&&{rawHTML:i})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"ol",we({start:n.order===1?null:n.order},mr(n)),0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return $w(t.schema.nodes.orderedList)(t,n)}}},e.prototype.keymaps=function(){var t=this.commands()(),n=Jh(),i=n.indent,a=n.outdent;return{"Mod-o":t,"Mod-O":t,Tab:i(),"Shift-Tab":a()}},e})(Gt),oKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"listItem"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"paragraph block*",selectable:!1,attrs:{task:{default:!1},checked:{default:!1},rawHTML:{default:null}},defining:!0,parseDOM:[{tag:"li",getAttrs:function(t){var n=t.getAttribute("data-raw-html");return we({task:t.hasAttribute("data-task"),checked:t.hasAttribute("data-task-checked")},n&&{rawHTML:n})}}],toDOM:function(t){var n=t.attrs,i=n.task,a=n.checked;if(!i)return[n.rawHTML||"li",0];var o=["task-list-item"];return a&&o.push("checked"),[n.rawHTML||"li",we({class:o.join(" "),"data-task":i},a&&{"data-task-checked":a}),0]}}},enumerable:!1,configurable:!0}),e.prototype.liftToPrevListItem=function(){return function(t,n){var i=t.selection,a=t.tr,o=t.schema,s=i.$from,l=i.empty,f=o.nodes.listItem,p=s.parent,b=s.node(-1);if(l&&!p.childCount&&b.type===f){if(s.index(-2)>=1)return a.delete(s.start(-1)-1,s.end(-1)),n(a),!0;var T=s.node(-3);if(T.type===f)return a.delete(s.start(-2)-1,s.end(-1)),n(a),!0}return!1}},e.prototype.keymaps=function(){var t=function(n,i){return $je(n.schema.nodes.listItem)(n,i)};return{Backspace:this.liftToPrevListItem(),Enter:t}},e})(Gt),sKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:we({rawHTML:{default:null}},Mr()),content:"block+",group:"block",parseDOM:[Xu("blockquote")],toDOM:function(t){var n=t.attrs;return["blockquote",mr(n),0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return Xte(t.schema.nodes.blockQuote)(t,n)}}},e.prototype.keymaps=function(){var t=this.commands()();return{"Alt-q":t,"Alt-Q":t}},e})(Gt),lKe={left:mKe,right:vKe,up:gKe,down:yKe};function uKe(r,e,t){var n=t[0],i=t[1],a=e.resolve(r.before(n-1));return i===n&&!a.nodeBefore}function cKe(r){for(var e,t=r.depth,n;t&&(n=r.node(t),n.type.name!=="tableBodyCell");){if(n.type.name==="listItem"){var i=r.node(t-1),a=i.lastChild===n,o=((e=n.lastChild)===null||e===void 0?void 0:e.type.name)!=="paragraph";return a?!o:!1}t-=1}return!1}function fKe(r,e,t,n,i){var a=e[0],o=e[1],s=e[2];if(r==="left"||r==="up"){if(i&&!uKe(t,n,[a,o]))return!1;var l=t.before(s),f=n.resolve(l).nodeBefore;if(f)return!1}return!0}function dKe(r,e,t,n,i){if(r==="right"||r==="down"){if(i&&!cKe(t))return!1;var a=t.after(e),o=n.resolve(a).nodeAfter;if(o)return!1}return!0}function hKe(r,e,t,n){var i=e[0],a=e[1],o=i+3,s=a>=o,l=s?i+1:a,f=fKe(r,[a,o,l],t,n,s),p=dKe(r,l,t,n,s);return f&&p}function Fg(r,e,t){var n=t[0],i=t[1],a=e.getRowspanStartInfo(n,i),o=r==="up"&&n===0,s=r==="down"&&((a==null?void 0:a.count)>1?n+a.count-1:n)===e.totalRowCount-1;return o||s}function pKe(r,e,t){var n=r.doc.resolve(e.tableStartOffset-1);return n.nodeBefore?r.setSelection(Tt.near(n,-1)):Nh(r,n,t)}function fd(r,e,t,n){n===void 0&&(n=!1);var i=r.doc.resolve(e.tableEndOffset);return n||!i.nodeAfter?Nh(r,i,t):r.setSelection(Tt.near(i,1))}function vKe(r,e){var t=r[0],n=r[1],i=e.totalRowCount,a=e.totalColumnCount,o=n===a-1,s=t===i-1&&o;if(!s){var l=n+1,f=e.getColspanStartInfo(t,n);(f==null?void 0:f.count)>1&&(l+=f.count-1),(o||l===a)&&(t+=1,l=0);var p=e.getCellInfo(t,l).offset;return p+2}return null}function mKe(r,e){var t=r[0],n=r[1],i=e.totalColumnCount,a=n===0,o=t===0&&a;if(!o){n-=1,a&&(t-=1,n=i-1);var s=e.getCellInfo(t,n),l=s.offset,f=s.nodeSize;return l+f-2}return null}function gKe(r,e){var t=r[0],n=r[1];if(t>0){var i=e.getCellInfo(t-1,n),a=i.offset,o=i.nodeSize;return a+o-2}return null}function yKe(r,e){var t=r[0],n=r[1],i=e.totalRowCount;if(t<i-1){var a=t+1,o=e.getRowspanStartInfo(t,n);(o==null?void 0:o.count)>1&&(a+=o.count-1);var s=e.getCellInfo(a,n).offset;return s+2}return null}function qg(r,e,t,n){var i=lKe[r],a=i(t,n);if(a){var o=r==="right"||r==="down"?1:-1;return e.setSelection(Tt.near(e.doc.resolve(a),o))}return null}function bKe(r,e,t){var n=t[0],i=t[1];if(r==="up"||r==="down")return!1;var a=e.tableStartOffset,o=e.tableEndOffset,s=e.getCellInfo(n,i),l=s.offset,f=s.nodeSize,p=r==="left"?a:o,b=r==="left"?l-2:l+f+3;return p===b}function kKe(r,e,t){var n=r.doc.resolve(e.before(t-3));return r.setSelection(new ft(n))}function wKe(r,e,t){var n,i,a;return r==="up"?(n=t.startRowIdx,i=0,a=-1):(n=t.endRowIdx,i=e.totalColumnCount-1,a=e.getCellInfo(n,i).nodeSize+1),{targetRowIdx:n,insertColIdx:i,nodeSize:a}}function CKe(r,e,t){var n=r.getCellInfo(e,0).offset,i=r.getCellInfo(e,t-1),a=i.offset,o=i.nodeSize;return{from:n,to:a+o}}var TKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"table"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"tableHead{1} tableBody{1}",group:"block",attrs:we({rawHTML:{default:null}},Mr()),parseDOM:[Xu("table")],toDOM:function(t){var n=t.attrs;return["table",mr(n),0]}}},enumerable:!1,configurable:!0}),e.prototype.addTable=function(){return function(t){return t===void 0&&(t={rowCount:2,columnCount:1,data:[]}),function(n,i){var a=t.rowCount,o=t.columnCount,s=t.data,l=n.schema,f=n.selection,p=n.tr,b=f.from,T=f.to,x=f.$from,E=b===T;if(E&&!Au(x)){var P=l.nodes,F=P.tableHead,z=P.tableBody,Y=s==null?void 0:s.slice(0,o),ee=s==null?void 0:s.slice(o,s.length),se=Yje(o,l,Y),de=Ww(a-1,o,l,ee),oe=l.nodes.table.create(null,[F.create(null,se),z.create(null,de)]);return i(p.replaceSelectionWith(oe)),!0}return!1}}},e.prototype.removeTable=function(){return function(){return function(t,n){var i=t.selection,a=t.tr,o=Lr.create(i.$anchor);if(o){var s=o.tableStartOffset,l=o.tableEndOffset,f=s-1,p=Yt(a.delete(f,l),f);return n(a.setSelection(p)),!0}return!1}}},e.prototype.addColumn=function(t){return function(){return function(n,i){var a=n.selection,o=n.tr,s=n.schema,l=ai(a),f=l.anchor,p=l.head;if(f&&p){for(var b=Lr.create(f),T=b.getRectOffsets(f,p),x=t==="left"?T.startColIdx:T.endColIdx+1,E=Do(T).columnCount,P=b.totalRowCount,F=0;F<P;F+=1){var z=Ql(E,F,s);o.insert(o.mapping.map(b.posAt(F,x)),z)}return i(o),!0}return!1}}},e.prototype.removeColumn=function(){return function(){return function(t,n){var i=t.selection,a=t.tr,o=ai(i),s=o.anchor,l=o.head;if(s&&l){var f=Lr.create(s),p=f.getRectOffsets(s,l),b=f.totalColumnCount,T=f.totalRowCount,x=Do(p).columnCount,E=x===b;if(E)return!1;for(var P=p.startColIdx,F=p.endColIdx,z=a.mapping.maps.length,Y=0;Y<T;Y+=1)for(var ee=F;ee>=P;ee-=1){var se=f.getCellInfo(Y,ee),de=se.offset,oe=se.nodeSize,le=a.mapping.slice(z).map(de),ge=le+oe;a.delete(le,ge)}return n(a),!0}return!1}}},e.prototype.addRow=function(t){return function(){return function(n,i){var a=n.selection,o=n.schema,s=n.tr,l=ai(a),f=l.anchor,p=l.head;if(f&&p){var b=Lr.create(f),T=b.totalColumnCount,x=b.getRectOffsets(f,p),E=Do(x).rowCount,P=wKe(t,b,x),F=P.targetRowIdx,z=P.insertColIdx,Y=P.nodeSize,ee=F===0;if(!ee){for(var se=[],de=s.mapping.map(b.posAt(F,z))+Y,oe=[],le=0;le<T;le+=1)oe=oe.concat(Ql(1,F,o));for(var ge=0;ge<E;ge+=1)se.push(o.nodes.tableRow.create(null,oe));return i(s.insert(de,se)),!0}}return!1}}},e.prototype.removeRow=function(){return function(){return function(t,n){var i=t.selection,a=t.tr,o=ai(i),s=o.anchor,l=o.head;if(s&&l){var f=Lr.create(s),p=f.totalRowCount,b=f.totalColumnCount,T=f.getRectOffsets(s,l),x=Do(T).rowCount,E=T.startRowIdx,P=T.endRowIdx,F=E===0,z=x===p-1;if(z||F)return!1;for(var Y=P;Y>=E;Y-=1){var ee=CKe(f,Y,b),se=ee.from,de=ee.to;a.delete(se-1,de+1)}return n(a),!0}return!1}}},e.prototype.alignColumn=function(){return function(t){return t===void 0&&(t={align:"center"}),function(n,i){var a=t.align,o=n.selection,s=n.tr,l=ai(o),f=l.anchor,p=l.head;if(f&&p){for(var b=Lr.create(f),T=b.totalRowCount,x=b.getRectOffsets(f,p),E=x.startColIdx,P=x.endColIdx,F=0;F<T;F+=1)for(var z=E;z<=P;z+=1)if(!b.extendedRowspan(F,z)&&!b.extendedColspan(F,z)){var Y=b.getNodeAndPos(F,z),ee=Y.node,se=Y.pos,de=Xje(ee,{align:a});s.setNodeMarkup(se,null,de)}return i(s),!0}return!1}}},e.prototype.moveToCell=function(t){return function(n,i){var a=n.selection,o=n.tr,s=n.schema,l=ai(a),f=l.anchor,p=l.head;if(f&&p){var b=Lr.create(f),T=b.getCellIndex(f),x=void 0;if(Fg(t,b,T)?x=fd(o,b,s):x=qg(t,o,T,b),x)return i(x),!0}return!1}},e.prototype.moveInCell=function(t){var n=this;return function(i,a){var o=i.selection,s=i.tr,l=i.doc,f=i.schema,p=o.$from,b=n.context.view;if(!b.endOfTextblock(t))return!1;var T=Ri(p,function(ee){var se=ee.type;return se.name==="tableHeadCell"||se.name==="tableBodyCell"});if(T){var x=Ri(p,function(ee){var se=ee.type;return se.name==="paragraph"}),E=T.depth;if(x&&hKe(t,[E,x.depth],p,l)){var P=ai(o).anchor,F=Lr.create(P),z=F.getCellIndex(P),Y=void 0;if(bKe(t,F,z)?Y=kKe(s,p,E):Fg(t,F,z)?t==="up"?Y=pKe(s,F,f):t==="down"&&(Y=fd(s,F,f)):Y=qg(t,s,z,F),Y)return a(Y),!0}}return!1}},e.prototype.deleteCells=function(){return function(t,n){var i=t.schema,a=t.selection,o=t.tr,s=ai(a),l=s.anchor,f=s.head,p=a instanceof xt;if(l&&f&&!p){for(var b=Lr.create(l),T=b.getRectOffsets(l,f),x=T.startRowIdx,E=T.startColIdx,P=T.endRowIdx,F=T.endColIdx,z=x;z<=P;z+=1)for(var Y=E;Y<=F;Y+=1)if(!b.extendedRowspan(z,Y)&&!b.extendedColspan(z,Y)){var ee=b.getNodeAndPos(z,Y),se=ee.node,de=ee.pos,oe=Ql(1,z,i,se.attrs);o.replaceWith(o.mapping.map(de),o.mapping.map(de+se.nodeSize),oe)}return n(o),!0}return!1}},e.prototype.exitTable=function(){return function(t,n){var i=t.selection,a=t.tr,o=t.schema,s=i.$from,l=Ri(s,function(T){var x=T.type;return x.name==="tableHeadCell"||x.name==="tableBodyCell"});if(l){var f=Ri(s,function(T){var x=T.type;return x.name==="paragraph"});if(f){var p=ai(i).anchor,b=Lr.create(p);return n(fd(a,b,o,!0)),!0}}return!1}},e.prototype.commands=function(){return{addTable:this.addTable(),removeTable:this.removeTable(),addColumnToLeft:this.addColumn("left"),addColumnToRight:this.addColumn("right"),removeColumn:this.removeColumn(),addRowToUp:this.addRow("up"),addRowToDown:this.addRow("down"),removeRow:this.removeRow(),alignColumn:this.alignColumn()}},e.prototype.keymaps=function(){var t=this.deleteCells();return{Tab:this.moveToCell("right"),"Shift-Tab":this.moveToCell("left"),ArrowUp:this.moveInCell("up"),ArrowDown:this.moveInCell("down"),ArrowLeft:this.moveInCell("left"),ArrowRight:this.moveInCell("right"),Backspace:t,"Mod-Backspace":t,Delete:t,"Mod-Delete":t,"Mod-Enter":this.exitTable()}},e})(Gt),SKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableHead"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"tableRow{1}",attrs:we({rawHTML:{default:null}},Mr()),parseDOM:[Xu("thead")],toDOM:function(t){var n=t.attrs;return["thead",mr(n),0]}}},enumerable:!1,configurable:!0}),e})(Gt),xKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableBody"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"tableRow+",attrs:we({rawHTML:{default:null}},Mr()),parseDOM:[{tag:"tbody",getAttrs:function(t){var n=t.querySelectorAll("tr"),i=n[0].children.length,a=t.getAttribute("data-raw-html");return i?we({},a&&{rawHTML:a}):!1}}],toDOM:function(t){var n=t.attrs;return["tbody",mr(n),0]}}},enumerable:!1,configurable:!0}),e})(Gt),EKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableRow"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"(tableHeadCell | tableBodyCell)*",attrs:we({rawHTML:{default:null}},Mr()),parseDOM:[{tag:"tr",getAttrs:function(t){var n=t.children.length,i=t.getAttribute("data-raw-html");return n?we({},i&&{rawHTML:i}):!1}}],toDOM:function(t){var n=t.attrs;return["tr",mr(n),0]}}},enumerable:!1,configurable:!0}),e})(Gt),MKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableHeadCell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"paragraph+",attrs:we({align:{default:null},className:{default:null},rawHTML:{default:null},colspan:{default:null},extended:{default:null}},Mr()),isolating:!0,parseDOM:[zw("th")],toDOM:function(t){var n=t.attrs,i=_w(n);return["th",we(we({},i),mr(n)),0]}}},enumerable:!1,configurable:!0}),e})(Gt),AKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableBodyCell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"(paragraph | bulletList | orderedList)+",attrs:{align:{default:null},className:{default:null},rawHTML:{default:null},colspan:{default:null},rowspan:{default:null},extended:{default:null}},isolating:!0,parseDOM:[zw("td")],toDOM:function(t){var n=t.attrs,i=_w(n);return["td",i,0]}}},enumerable:!1,configurable:!0}),e})(Gt),OKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"image"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{inline:!0,attrs:we({imageUrl:{default:""},altText:{default:null},rawHTML:{default:null}},Mr()),group:"inline",selectable:!1,parseDOM:[{tag:"img[src]",getAttrs:function(t){var n=eo(t,{RETURN_DOM_FRAGMENT:!0}).firstChild,i=n.getAttribute("src")||"",a=n.getAttribute("data-raw-html"),o=n.getAttribute("alt");return we({imageUrl:i,altText:o},a&&{rawHTML:a})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"img",we(we({src:No(n.imageUrl)},n.altText&&{alt:n.altText}),mr(n))]}}},enumerable:!1,configurable:!0}),e.prototype.addImage=function(){return function(t){return function(n,i){var a=n.schema,o=n.tr,s=t,l=s.imageUrl,f=s.altText;if(!l)return!1;var p=a.nodes.image.createAndFill(we({imageUrl:l},f&&{altText:f}));return i(o.replaceSelectionWith(p).scrollIntoView()),!0}}},e.prototype.commands=function(){return{addImage:this.addImage()}},e})(Gt),Hg=1,NKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"thematicBreak"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:we({rawHTML:{default:null}},Mr()),group:"block",parseDOM:[{tag:"hr"}],selectable:!1,toDOM:function(t){var n=t.attrs;return["div",mr(n),[n.rawHTML||"hr"]]}}},enumerable:!1,configurable:!0}),e.prototype.hr=function(){var t=this;return function(){return function(n,i){var a,o=n.selection,s=o.$from,l=o.$to;if(s===l){var f=n.doc,p=n.schema.nodes,b=p.thematicBreak,T=p.paragraph,x=[b.create()],E=s.node(Hg),P=f.child(f.childCount-1)===E,F=f.resolve(s.after(Hg)),z=((a=s.nodeAfter)===null||a===void 0?void 0:a.type.name)===t.name;return(P||z)&&x.push(T.create()),i(n.tr.insert(F.pos,x).scrollIntoView()),!0}return!1}}},e.prototype.commands=function(){return{hr:this.hr()}},e.prototype.keymaps=function(){var t=this.hr()();return{"Mod-l":t,"Mod-L":t}},e})(Gt),DKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strong"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=["b","strong"].map(function(n){return{tag:n,getAttrs:function(i){var a=i.getAttribute("data-raw-html");return we({},a&&{rawHTML:a})}}});return{attrs:we({rawHTML:{default:null}},Mr()),parseDOM:t,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"strong",mr(i)]}}},enumerable:!1,configurable:!0}),e.prototype.bold=function(){return function(){return function(t,n){return Us(t.schema.marks.strong)(t,n)}}},e.prototype.commands=function(){return{bold:this.bold()}},e.prototype.keymaps=function(){var t=this.bold()();return{"Mod-b":t,"Mod-B":t}},e})(Xt),LKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"emph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=["i","em"].map(function(n){return{tag:n,getAttrs:function(i){var a=i.getAttribute("data-raw-html");return we({},a&&{rawHTML:a})}}});return{attrs:we({rawHTML:{default:null}},Mr()),parseDOM:t,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"em",mr(i)]}}},enumerable:!1,configurable:!0}),e.prototype.italic=function(){return function(){return function(t,n){return Us(t.schema.marks.emph)(t,n)}}},e.prototype.commands=function(){return{italic:this.italic()}},e.prototype.keymaps=function(){var t=this.italic()();return{"Mod-i":t,"Mod-I":t}},e})(Xt),RKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strike"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=["s","del"].map(function(n){return{tag:n,getAttrs:function(i){var a=i.getAttribute("data-raw-html");return we({},a&&{rawHTML:a})}}});return{attrs:we({rawHTML:{default:null}},Mr()),parseDOM:t,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"del",mr(i)]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return Us(t.schema.marks.strike)(t,n)}}},e.prototype.keymaps=function(){var t=this.commands()();return{"Mod-s":t,"Mod-S":t}},e})(Xt),IKe=(function(r){Ge(e,r);function e(t){var n=r.call(this)||this;return n.linkAttributes=t,n}return Object.defineProperty(e.prototype,"name",{get:function(){return"link"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=this;return{attrs:we({linkUrl:{default:""},title:{default:null},rawHTML:{default:null}},Mr()),inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(n){var i=eo(n,{RETURN_DOM_FRAGMENT:!0}).firstChild,a=i.getAttribute("href")||"",o=i.getAttribute("title")||"",s=i.getAttribute("data-raw-html");return we({linkUrl:a,title:o},s&&{rawHTML:s})}}],toDOM:function(n){var i=n.attrs;return[i.rawHTML||"a",we(we({href:No(i.linkUrl)},t.linkAttributes),mr(i))]}}},enumerable:!1,configurable:!0}),e.prototype.addLink=function(){return function(t){return function(n,i){var a=t,o=a.linkUrl,s=a.linkText,l=s===void 0?"":s,f=n.schema,p=n.tr,b=n.selection,T=b.empty,x=b.from,E=b.to;if(x&&E&&o){var P={linkUrl:o},F=f.mark("link",P);if(T&&l){var z=Br(f,l,F);p.replaceRangeWith(x,E,z)}else p.addMark(x,E,F);return i(p.scrollIntoView()),!0}return!1}}},e.prototype.toggleLink=function(){return function(t){return function(n,i){return Us(n.schema.marks.link,t)(n,i)}}},e.prototype.commands=function(){return{addLink:this.addLink(),toggleLink:this.toggleLink()}},e})(Xt),PKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"code"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:we({rawHTML:{default:null}},Mr()),parseDOM:[{tag:"code",getAttrs:function(t){var n=t.getAttribute("data-raw-html");return we({},n&&{rawHTML:n})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"code",mr(n)]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return Us(t.schema.marks.code)(t,n)}}},e.prototype.keymaps=function(){var t=this.commands()();return{"Shift-Mod-c":t,"Shift-Mod-C":t}},e})(Xt),BKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"customBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",attrs:{info:{default:null}},atom:!0,code:!0,defining:!0,parseDOM:[{tag:"div[data-custom-info]",getAttrs:function(t){var n=t.getAttribute("data-custom-info");return{info:n}}}],toDOM:function(t){var n=t.attrs;return["div",{"data-custom-info":n.info||null},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(t){return function(n,i){return t!=null&&t.info?wh(n.schema.nodes.customBlock,t)(n,i):!1}}},e})(Gt),FKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"frontMatter"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",code:!0,defining:!0,parseDOM:[{preserveWhitespace:"full",tag:"div[data-front-matter]"}],toDOM:function(){return["div",{"data-front-matter":"true"},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n,i){var a=t.selection.$from;return i.endOfTextblock("down")&&a.node().type.name==="frontMatter"?kh(t,n):!1}}},e.prototype.keymaps=function(){return{Enter:this.commands()()}},e})(Gt),qKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"htmlComment"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",code:!0,defining:!0,parseDOM:[{preserveWhitespace:"full",tag:"div[data-html-comment]"}],toDOM:function(){return["div",{"data-html-comment":"true"},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n,i){var a=t.selection.$from;return i.endOfTextblock("down")&&a.node().type.name==="htmlComment"?kh(t,n):!1}}},e.prototype.keymaps=function(){return{Enter:this.commands()()}},e})(Gt);function HKe(r){return new $k([new ZGe,new QGe,new tKe,new rKe,new nKe,new iKe,new aKe,new oKe,new sKe,new TKe,new SKe,new xKe,new EKe,new MKe,new AKe,new OKe,new NKe,new DKe,new LKe,new RKe,new IKe(r),new PKe,new BKe,new FKe,new Vk,new qKe])}var _Ke=Je("contents"),zKe=(function(r){Ge(e,r);function e(t,n){var i=r.call(this,t)||this,a=n.toDOMAdaptor,o=n.htmlSchemaMap,s=o===void 0?{}:o,l=n.linkAttributes,f=l===void 0?{}:l,p=n.useCommandShortcut,b=p===void 0?!0:p,T=n.wwPlugins,x=T===void 0?[]:T,E=n.wwNodeViews,P=E===void 0?{}:E;return i.editorType="wysiwyg",i.el.classList.add("ww-mode"),i.toDOMAdaptor=a,i.linkAttributes=f,i.extraPlugins=x,i.pluginNodeViews=P,i.specs=i.createSpecs(),i.schema=i.createSchema(s),i.context=i.createContext(),i.keymaps=i.createKeymaps(b),i.view=i.createView(),i.commands=i.createCommands(),i.specs.setContext(we(we({},i.context),{view:i.view})),i.initEvent(),i}return e.prototype.createSpecs=function(){return HKe(this.linkAttributes)},e.prototype.createContext=function(){return{schema:this.schema,eventEmitter:this.eventEmitter}},e.prototype.createSchema=function(t){return new db({nodes:we(we({},this.specs.nodes),t.nodes),marks:we(we({},this.specs.marks),t.marks)})},e.prototype.createPlugins=function(){return dn([rGe(),oGe(this.eventEmitter),sGe(),pGe(this.eventEmitter)],this.createPluginProps()).concat(this.defaultPlugins)},e.prototype.createPluginNodeViews=function(){var t=this,n=t.eventEmitter,i=t.pluginNodeViews,a={};return i&&Object.keys(i).forEach(function(o){a[o]=function(s,l,f){return i[o](s,l,f,n)}}),a},e.prototype.createView=function(){var t=this,n=this,i=n.toDOMAdaptor,a=n.eventEmitter;return new qu(this.el,{state:this.createState(),attributes:{class:_Ke},nodeViews:we({customBlock:function(o,s,l){return new vGe(o,s,l,i)},image:function(o,s,l){return new mGe(o,s,l,a)},codeBlock:function(o,s,l){return new bGe(o,s,l,a)},widget:zk},this.createPluginNodeViews()),dispatchTransaction:function(o){var s=t.view.state.applyTransaction(o).state;t.view.updateState(s),t.emitChangeEvent(o.scrollIntoView()),t.eventEmitter.emit("setFocusedNode",s.selection.$from.node(1))},transformPastedHTML:PGe,transformPasted:function(o){return _Ge(o,t.schema,Au(t.view.state.selection.$from))},handlePaste:function(o,s,l){return JGe(o,l)},handleKeyDown:function(o,s){return t.eventEmitter.emit("keydown",t.editorType,s),!1},handleDOMEvents:{paste:function(o,s){var l=s.clipboardData||window.clipboardData,f=l==null?void 0:l.items;if(f){var p=hi(f).some(function(T){return T.kind==="string"&&T.type==="text/rtf"});if(!p){var b=_k(f);b&&(s.preventDefault(),Fh(t.eventEmitter,b,s.type))}}return!1},keyup:function(o,s){return t.eventEmitter.emit("keyup",t.editorType,s),!1},scroll:function(){return t.eventEmitter.emit("scroll","editor"),!0}}})},e.prototype.createCommands=function(){return this.specs.commands(this.view,Jh())},e.prototype.getHTML=function(){return Bh(this.view.dom.innerHTML)},e.prototype.getModel=function(){return this.view.state.doc},e.prototype.getSelection=function(){var t=this.view.state.selection,n=t.from,i=t.to;return[n,i]},e.prototype.getSchema=function(){return this.view.state.schema},e.prototype.replaceSelection=function(t,n,i){var a=this.view.state,o=a.schema,s=a.tr,l=t.split(`
|
|
67
|
-
`),f=l.map(function(T){return yu(o,Ua(T,o))}),p=new $e(De.from(f),1,1),b=Di(n)&&Di(i)?s.replaceRange(n,i,p):s.replaceSelection(p);this.view.dispatch(b),this.focus()},e.prototype.deleteSelection=function(t,n){var i=this.view.state.tr,a=Di(t)&&Di(n)?i.deleteRange(t,n):i.deleteSelection();this.view.dispatch(a.scrollIntoView())},e.prototype.getSelectedText=function(t,n){var i=this.view.state,a=i.doc,o=i.selection,s=o.from,l=o.to;return Di(t)&&Di(n)&&(s=t,l=n),a.textBetween(s,l,`
|
|
68
|
-
`)},e.prototype.setModel=function(t,n){n===void 0&&(n=!1);var i=this.view.state,a=i.tr,o=i.doc;this.view.dispatch(a.replaceWith(0,o.content.size,t)),n&&this.moveCursorToEnd(!0)},e.prototype.setSelection=function(t,n){n===void 0&&(n=t);var i=this.view.state.tr,a=Yt(i,t,n);this.view.dispatch(i.setSelection(a).scrollIntoView())},e.prototype.addWidget=function(t,n,i){var a=this.view,o=a.dispatch,s=a.state;o(s.tr.setMeta("widget",{pos:i??s.selection.to,node:t,style:n}))},e.prototype.replaceWithWidget=function(t,n,i){var a=this.view.state,o=a.tr,s=a.schema,l=Ua(i,s);this.view.dispatch(o.replaceWith(t,n,l))},e.prototype.getRangeInfoOfNode=function(t){var n=this.view.state,i=n.doc,a=n.selection,o=t?i.resolve(t):a.$from,s=o.marks(),l=o.node(),f=o.start(),p=o.end(),b=l.type.name;if(s.length||b==="paragraph"){var T=s[s.length-1],x=function(E){return E.length?Fr(E,T):!0};b=T?T.type.name:"text",l.forEach(function(E,P){var F=E.isText,z=E.nodeSize,Y=E.marks,ee=o.pos-f;F&&P<=ee&&P+z>=ee&&x(Y)&&(f=f+P,p=f+z)})}return{range:[f,p],type:b}},e})(Uk),VKe=Yn,UKe=pu;function $Ke(r){return!VKe(r)&&!UKe(r)}var WKe=$Ke,jKe=WKe;function GKe(r){return jKe(r)&&r!==!1}var KKe=GKe,JKe=KKe;function YKe(r){return!JKe(r)}var XKe=YKe,_g=["afterPreviewRender","updatePreview","changeMode","needChangeMode","command","changePreviewStyle","changePreviewTabPreview","changePreviewTabWrite","scroll","contextmenu","show","hide","changeLanguage","changeToolbarState","toggleScrollSync","mixinTableOffsetMapPrototype","setFocusedNode","removePopupWidget","query","openPopup","closePopup","addImageBlobHook","beforePreviewRender","beforeConvertWysiwygToMarkdown","load","loadUI","change","caretChange","destroy","focus","blur","keydown","keyup"],i0=(function(){function r(){var e=this;this.events=new Jw,this.eventTypes=_g.reduce(function(t,n){return we(we({},t),{type:n})},{}),this.hold=!1,_g.forEach(function(t){e.addEventType(t)})}return r.prototype.listen=function(e,t){var n=this.getTypeInfo(e),i=this.events.get(n.type)||[];if(!this.hasEventType(n.type))throw new Error("There is no event type "+n.type);n.namespace&&(t.namespace=n.namespace),i.push(t),this.events.set(n.type,i)},r.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=this.getTypeInfo(e),a=this.events.get(i.type),o=[];return!this.hold&&a&&a.forEach(function(s){var l=s.apply(void 0,t);Yn(l)||o.push(l)}),o},r.prototype.emitReduce=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var a=this.events.get(e);return!this.hold&&a&&a.forEach(function(o){var s=o.apply(void 0,dn([t],n));XKe(s)||(t=s)}),t},r.prototype.getTypeInfo=function(e){var t=e.split(".");return{type:t[0],namespace:t[1]}},r.prototype.hasEventType=function(e){return!Yn(this.eventTypes[this.getTypeInfo(e).type])},r.prototype.addEventType=function(e){if(this.hasEventType(e))throw new Error("There is already have event type "+e);this.eventTypes[e]=e},r.prototype.removeEventHandler=function(e,t){var n=this,i=this.getTypeInfo(e),a=i.type,o=i.namespace;a&&t?this.removeEventHandlerWithHandler(a,t):a&&!o?this.events.delete(a):!a&&o?this.events.forEach(function(s,l){n.removeEventHandlerWithTypeInfo(l,o)}):a&&o&&this.removeEventHandlerWithTypeInfo(a,o)},r.prototype.removeEventHandlerWithHandler=function(e,t){var n=this.events.get(e);if(n){var i=n.indexOf(t);n.indexOf(t)>=0&&n.splice(i,1)}},r.prototype.removeEventHandlerWithTypeInfo=function(e,t){var n=[],i=this.events.get(e);i&&(i.map(function(a){return a.namespace!==t&&n.push(a),null}),this.events.set(e,n))},r.prototype.getEvents=function(){return this.events},r.prototype.holdEventInvoke=function(e){this.hold=!0,e(),this.hold=!1},r})(),ZKe=(function(){function r(e,t,n,i){this.eventEmitter=e,this.mdCommands=t,this.wwCommands=n,this.getEditorType=i,this.initEvent()}return r.prototype.initEvent=function(){var e=this;this.eventEmitter.listen("command",function(t,n){e.exec(t,n)})},r.prototype.addCommand=function(e,t,n){e==="markdown"?this.mdCommands[t]=n:this.wwCommands[t]=n},r.prototype.deleteCommand=function(e,t){e==="markdown"?delete this.mdCommands[t]:delete this.wwCommands[t]},r.prototype.exec=function(e,t){var n=this.getEditorType();n==="markdown"?this.mdCommands[e](t):this.wwCommands[e](t)},r})();function tu(r){return r[r.length-1]===`
|
|
69
|
-
`?r.slice(0,r.length-1):r}function Qd(r,e){var t=r.schema,n=e.literal,i=n.match(Uo);if(i){var a=i[1],o=i[3],s=(a||o).toLowerCase();return e.type==="htmlInline"&&!!(t.marks[s]||t.nodes[s])}return!1}function eh(r){var e=r.type;return Fr(["text","strong","emph","strike","image","link","code"],e)}function zg(r){return(r==null?void 0:r.type)==="softbreak"}function ps(r){var e=r.type,t=r.literal,n=e==="htmlInline"&&t.match(Uo);if(n){var i=n[1],a=n[3],o=i||a;if(o)return Fr(["ul","ol","li"],o.toLowerCase())}return!1}function QKe(r){var e=r.literal,t=/data-task/.test(e),n=/data-task-checked/.test(e);return{task:t,checked:n}}function Vg(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var n=document.createElement("div");n.innerHTML=eo(r);var i=n.firstChild;return e.map(function(a){return i.getAttribute(a)||""})}function e4e(r){var e={};return Object.keys(r).forEach(function(t){var n=t.split(", ");n.forEach(function(i){var a=i.toLowerCase();e[a]=r[t]})}),e}var t4e={"b, strong":function(r,e,t){var n=r.schema.marks.strong;t?r.openMark(n.create({rawHTML:t})):r.closeMark(n)},"i, em":function(r,e,t){var n=r.schema.marks.emph;t?r.openMark(n.create({rawHTML:t})):r.closeMark(n)},"s, del":function(r,e,t){var n=r.schema.marks.strike;t?r.openMark(n.create({rawHTML:t})):r.closeMark(n)},code:function(r,e,t){var n=r.schema.marks.code;t?r.openMark(n.create({rawHTML:t})):r.closeMark(n)},a:function(r,e,t){var n=e.literal,i=r.schema.marks.link;if(t){var a=Vg(n,"href")[0];r.openMark(i.create({linkUrl:a,rawHTML:t}))}else r.closeMark(i)},img:function(r,e,t){var n=e.literal;if(t){var i=Vg(n,"src","alt"),a=i[0],o=i[1],s=r.schema.nodes.image;r.addNode(s,we({rawHTML:t,imageUrl:a},o&&{altText:o}))}},hr:function(r,e,t){r.addNode(r.schema.nodes.thematicBreak,{rawHTML:t})},br:function(r,e){var t=r.schema.nodes.paragraph,n=e.parent,i=e.prev,a=e.next;(n==null?void 0:n.type)==="paragraph"?(zg(i)&&r.openNode(t),zg(a)?r.closeNode():a&&(r.closeNode(),r.openNode(t))):(n==null?void 0:n.type)==="tableCell"&&(i&&(eh(i)||Qd(r,i))&&r.closeNode(),a&&(eh(a)||Qd(r,a))&&r.openNode(t))},pre:function(r,e,t){var n,i,a=document.createElement("div");a.innerHTML=e.literal;var o=(i=(n=a.firstChild)===null||n===void 0?void 0:n.firstChild)===null||i===void 0?void 0:i.textContent;r.openNode(r.schema.nodes.codeBlock,{rawHTML:t}),r.addText(tu(o)),r.closeNode()},"ul, ol":function(r,e,t){if(e.parent.type==="tableCell"){var n=r.schema.nodes,i=n.bulletList,a=n.orderedList,o=n.paragraph,s=t==="ul"?i:a;t?(e.prev&&!ps(e.prev)&&r.closeNode(),r.openNode(s,{rawHTML:t})):(r.closeNode(),e.next&&!ps(e.next)&&r.openNode(o))}},li:function(r,e,t){var n;if(((n=e.parent)===null||n===void 0?void 0:n.type)==="tableCell"){var i=r.schema.nodes,a=i.listItem,o=i.paragraph;if(t){var s=QKe(e);e.prev&&!ps(e.prev)&&r.closeNode(),r.openNode(a,we({rawHTML:t},s)),e.next&&!ps(e.next)&&r.openNode(o)}else e.prev&&!ps(e.prev)&&r.closeNode(),r.closeNode()}}},r4e=e4e(t4e);function Ug(r){return r.type==="htmlInline"&&Id.test(r.literal)}function a0(r){hi(r.childNodes).forEach(function(e){if($u(e)){var t=e.nodeName.toLowerCase();e.setAttribute("data-raw-html",t),e.childNodes&&a0(e)}})}var $g={text:function(r,e){r.addText(e.literal||"")},paragraph:function(r,e,t,n){var i,a=t.entering;if(a){var o=r.schema.nodes.paragraph;((i=e.prev)===null||i===void 0?void 0:i.type)==="paragraph"&&(r.openNode(o,n),r.closeNode()),r.openNode(o,n)}else r.closeNode()},heading:function(r,e,t,n){var i=t.entering;if(i){var a=e,o=a.level,s=a.headingType;r.openNode(r.schema.nodes.heading,we({level:o,headingType:s},n))}else r.closeNode()},codeBlock:function(r,e,t){var n=r.schema.nodes.codeBlock,i=e,a=i.info,o=i.literal;r.openNode(n,we({language:a},t)),r.addText(tu(o||"")),r.closeNode()},list:function(r,e,t,n){var i=t.entering;if(i){var a=r.schema.nodes,o=a.bulletList,s=a.orderedList,l=e.listData,f=l.type,p=l.start;f==="bullet"?r.openNode(o,n):r.openNode(s,we({order:p},n))}else r.closeNode()},item:function(r,e,t,n){var i=t.entering,a=r.schema.nodes.listItem,o=e.listData,s=o.task,l=o.checked;if(i){var f=we(we(we({},s&&{task:s}),l&&{checked:l}),n);r.openNode(a,f)}else r.closeNode()},blockQuote:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.blockQuote,n):r.closeNode()},image:function(r,e,t,n){var i=t.entering,a=t.skipChildren,o=r.schema.nodes.image,s=e,l=s.destination,f=s.firstChild;i&&a&&a(),r.addNode(o,we(we({imageUrl:l},f&&{altText:f.literal}),n))},thematicBreak:function(r,e,t,n){r.addNode(r.schema.nodes.thematicBreak,n)},strong:function(r,e,t,n){var i=t.entering,a=r.schema.marks.strong;i?r.openMark(a.create(n)):r.closeMark(a)},emph:function(r,e,t,n){var i=t.entering,a=r.schema.marks.emph;i?r.openMark(a.create(n)):r.closeMark(a)},link:function(r,e,t,n){var i=t.entering,a=r.schema.marks.link,o=e,s=o.destination,l=o.title;if(i){var f=we({linkUrl:s,title:l},n);r.openMark(a.create(f))}else r.closeMark(a)},softbreak:function(r,e){if(e.parent.type==="paragraph"){var t=e.prev,n=e.next;t&&!Ug(t)&&r.closeNode(),n&&!Ug(n)&&r.openNode(r.schema.nodes.paragraph)}},table:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.table,n):r.closeNode()},tableHead:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.tableHead,n):r.closeNode()},tableBody:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.tableBody,n):r.closeNode()},tableRow:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.tableRow,n):r.closeNode()},tableCell:function(r,e,t){var n=t.entering;if(!e.ignored){var i=function(E){return E&&(eh(E)||Qd(r,E))};if(n){var a=r.schema.nodes,o=a.tableHeadCell,s=a.tableBodyCell,l=a.paragraph,f=e.parent.parent,p=f.type==="tableHead"?o:s,b=f.parent,T=(b.columns[e.startIdx]||{}).align,x=we({},e.attrs);T&&(x.align=T),r.openNode(p,x),i(e.firstChild)&&r.openNode(l)}else i(e.lastChild)&&r.closeNode(),r.closeNode()}},strike:function(r,e,t,n){var i=t.entering,a=r.schema.marks.strike;i?r.openMark(a.create(n)):r.closeMark(a)},code:function(r,e,t,n){var i=r.schema.marks.code;r.openMark(i.create(n)),r.addText(tu(e.literal||"")),r.closeMark(i)},customBlock:function(r,e){var t=r.schema.nodes,n=t.customBlock,i=t.paragraph,a=e,o=a.info,s=a.literal;r.openNode(n,{info:o}),r.addText(tu(s||"")),r.closeNode(),e.next||(r.openNode(i),r.closeNode())},frontMatter:function(r,e){r.openNode(r.schema.nodes.frontMatter),r.addText(e.literal),r.closeNode()},htmlInline:function(r,e){var t=e.literal,n=t.match(Uo),i=n[1],a=n[3],o=(i||a).toLowerCase(),s=r.schema.marks[o],l=eo(t);if(s!=null&&s.spec.attrs.htmlInline)if(i){var f=Jd(l);r.openMark(s.create({htmlAttrs:f}))}else r.closeMark(s);else{var p=r4e[o];p&&p(r,e,i)}},htmlBlock:function(r,e){var t=e.literal,n=document.createElement("div"),i=Hne.test(t);if(i)r.openNode(r.schema.nodes.htmlComment),r.addText(e.literal),r.closeNode();else{var a=t.match(Uo),o=a[1],s=a[3],l=(o||s).toLowerCase(),f=r.schema.nodes[l],p=eo(t);if(f!=null&&f.spec.attrs.htmlBlock){var b=Jd(p),T=Fw(e,l);r.addNode(f,{htmlAttrs:b,childrenHTML:T})}else n.innerHTML=p,a0(n),r.convertByDOMParser(n)}},customInline:function(r,e,t){var n=t.entering,i=t.skipChildren,a=e,o=a.info,s=a.firstChild,l=r.schema;if(o.indexOf("widget")!==-1&&n){var f=Ak(e);i(),r.addNode(l.nodes.widget,{info:o},[l.text(Ek(o,f))])}else{var p="$$";n&&(p+=s?o+" ":o),r.addText(p)}}};function n4e(r){var e=Object.keys(r),t=we({},$g),n=new Gh({gfm:!0,nodeId:!0,convertors:r}),i=n.getConvertors();return e.forEach(function(a){var o=$g[a];o&&!Fr(["htmlBlock","htmlInline"],a)&&(t[a]=function(s,l,f){f.origin=function(){return i[a](l,f,i)};var p=r[a](l,f),b;if(p){var T=Array.isArray(p)?p[0]:p,x=T.attributes,E=T.classNames;b={htmlAttrs:x,classNames:E}}o(s,l,f,b)})}),t}function i4e(r,e){return r.isText&&e.isText&&Bt.sameSet(r.marks,e.marks)?r.withText(r.text+e.text):!1}var a4e=(function(){function r(e,t){this.schema=e,this.convertors=t,this.stack=[{type:this.schema.topNodeType,attrs:null,content:[]}],this.marks=Bt.none}return r.prototype.top=function(){return Ur(this.stack)},r.prototype.push=function(e){this.stack.length&&this.top().content.push(e)},r.prototype.addText=function(e){if(e){var t=this.top().content,n=Ur(t),i=this.schema.text(e,this.marks),a=n&&i4e(n,i);a?t[t.length-1]=a:t.push(i)}},r.prototype.openMark=function(e){this.marks=e.addToSet(this.marks)},r.prototype.closeMark=function(e){this.marks=e.removeFromSet(this.marks)},r.prototype.addNode=function(e,t,n){var i=e.createAndFill(t,n,this.marks);return i?(this.push(i),i):null},r.prototype.openNode=function(e,t){this.stack.push({type:e,attrs:t,content:[]})},r.prototype.closeNode=function(){this.marks.length&&(this.marks=Bt.none);var e=this.stack.pop(),t=e.type,n=e.attrs,i=e.content;return this.addNode(t,n,i)},r.prototype.convertByDOMParser=function(e){var t=this,n=Wa.fromSchema(this.schema).parse(e);n.content.forEach(function(i){return t.push(i)})},r.prototype.closeUnmatchedHTMLInline=function(e,t){var n;if(!t&&e.type!=="htmlInline")for(var i=this.stack.length-1,a=i;a>=0;a-=1){var o=this.stack[a];if(!((n=o.attrs)===null||n===void 0)&&n.rawHTML)o.content.length?this.closeNode():this.stack.pop();else break}},r.prototype.convert=function(e,t){for(var n=e.walker(),i=n.next(),a=function(){var s=i.node,l=i.entering,f=o.convertors[s.type],p=!1;if(f){var b={entering:l,leaf:!bne(s),getChildrenText:kne,options:{gfm:!0,nodeId:!1,tagFilter:!1,softbreak:`
|
|
70
|
-
`},skipChildren:function(){p=!0}};if(o.closeUnmatchedHTMLInline(s,l),f(o,s,b),(t==null?void 0:t.node)===s){var T=o.stack.reduce(function(x,E){return x+E.content.reduce(function(P,F){return P+F.nodeSize},0)},0)+1;t.setMappedPos(T)}}p&&(n.resumeAt(s,!1),n.next()),i=n.next()},o=this;i;)a()},r.prototype.convertNode=function(e,t){return this.convert(e,t),this.stack.length?this.closeNode():null},r})();function o4e(r,e,t){var n=t[0],i=t[1];r.write(n),r.convertInline(e),r.write(i)}function s4e(r,e,t){var n=e.node,i=e.parent,a=t[0],o=t[1];r.stopNewline=!0,r.write(a),r.convertNode(n),r.write(o),(i==null?void 0:i.type.name)==="doc"&&(r.closeBlock(n),r.stopNewline=!1)}function l4e(r,e){var t=r.length,n="",i="";return e==="left"?(n=":",t-=1):e==="right"?(i=":",t-=1):e==="center"&&(n=":",i=":",t-=2),""+n+vu("-",Math.max(t,3))+i}var th={text:function(r,e){var t,n=e.node,i=(t=n.text)!==null&&t!==void 0?t:"";(n.marks||[]).some(function(a){return a.type.name==="link"})?r.text(mu(i),!1):r.text(i)},paragraph:function(r,e){var t=e.node,n=e.parent,i=e.index,a=i===void 0?0:i;if(r.stopNewline)r.convertInline(t);else{var o=a===0,s=!o&&n.child(a-1),l=s&&s.childCount===0,f=a<n.childCount-1&&n.child(a+1),p=f&&f.type.name==="paragraph",b=t.childCount===0;if(b&&l)r.write(`<br>
|
|
71
|
-
`);else if(b&&!l&&!o){if((n==null?void 0:n.type.name)==="listItem"){var T=r.getDelim();r.setDelim(""),r.write("<br>"),r.setDelim(T)}r.write(`
|
|
72
|
-
`)}else r.convertInline(t),p?r.write(`
|
|
73
|
-
`):r.closeBlock(t)}},heading:function(r,e,t){var n=e.node,i=t.delim,a=n.attrs.headingType;a==="atx"?(r.write(i+" "),r.convertInline(n),r.closeBlock(n)):(r.convertInline(n),r.ensureNewLine(),r.write(i),r.closeBlock(n))},codeBlock:function(r,e,t){var n=e.node,i=t.delim,a=t.text,o=i,s=o[0],l=o[1];r.write(s),r.ensureNewLine(),r.text(a,!1),r.ensureNewLine(),r.write(l),r.closeBlock(n)},blockQuote:function(r,e,t){var n=e.node,i=e.parent,a=t.delim;(i==null?void 0:i.type.name)===n.type.name&&r.flushClose(1),r.wrapBlock(a,null,n,function(){return r.convertNode(n)})},bulletList:function(r,e,t){var n=e.node,i=t.delim;r.convertList(n,vu(" ",4),function(){return i+" "})},orderedList:function(r,e){var t=e.node,n=t.attrs.order||1;r.convertList(t,vu(" ",4),function(i){var a=String(n+i);return a+". "})},listItem:function(r,e){var t=e.node,n=t.attrs,i=n.task,a=n.checked;i&&r.write("["+(a?"x":" ")+"] "),r.convertNode(t)},image:function(r,e,t){var n=t.attrs;r.write("+")")},thematicBreak:function(r,e,t){var n=e.node,i=t.delim;r.write(i),r.closeBlock(n)},table:function(r,e){var t=e.node;r.convertNode(t),r.closeBlock(t)},tableHead:function(r,e,t){var n=e.node,i=t.delim,a=n.firstChild;r.convertNode(n);var o=i??"";!i&&a&&a.forEach(function(s){var l=s.textContent,f=s.attrs,p=l4e(l,f.align);o+="| "+p+" "}),r.write(o+"|"),r.ensureNewLine()},tableBody:function(r,e){var t=e.node;r.convertNode(t)},tableRow:function(r,e){var t=e.node;r.convertNode(t),r.write("|"),r.ensureNewLine()},tableHeadCell:function(r,e,t){var n=e.node,i=t.delim,a=i===void 0?"| ":i;r.write(a),r.convertTableCell(n),r.write(" ")},tableBodyCell:function(r,e,t){var n=e.node,i=t.delim,a=i===void 0?"| ":i;r.write(a),r.convertTableCell(n),r.write(" ")},customBlock:function(r,e,t){var n=e.node,i=t.delim,a=t.text,o=i,s=o[0],l=o[1];r.write(s),r.ensureNewLine(),r.text(a,!1),r.ensureNewLine(),r.write(l),r.closeBlock(n)},frontMatter:function(r,e,t){var n=e.node,i=t.text;r.text(i,!1),r.closeBlock(n)},widget:function(r,e,t){var n=t.text;r.write(n)},html:function(r,e,t){var n=e.node,i=t.text;r.write(i),n.attrs.htmlBlock&&r.closeBlock(n)},htmlComment:function(r,e,t){var n=e.node,i=t.text;r.write(i),r.closeBlock(n)}};function u4e(r,e){var t=e.state,n=e.nodeInfo,i=e.params,a=i.rawHTML;a?Ja(r,["heading","codeBlock"])>-1?o4e(t,n.node,a):Ja(r,["image","thematicBreak"])>-1?t.write(a):s4e(t,n,a):th[r](t,n,i)}function Wg(r,e){var t=r.text,n=/`+/g,i=0;if(r.isText&&t)for(var a=n.exec(t);a;)i=Math.max(i,a[0].length),a=n.exec(t);for(var o=i>0&&e>0?" `":"`",s=0;s<i;s+=1)o+="`";return i>0&&e<0&&(o+=" "),o}function $n(r){return r?["<"+r+">","</"+r+">"]:null}function vs(r){return r?"<"+r+">":null}function ms(r){return r?"</"+r+">":null}var gs={heading:function(r){var e=r.node,t=e.attrs,n=t.level,i=vu("#",n);return t.headingType==="setext"&&(i=n===1?"===":"---"),{delim:i,rawHTML:$n(t.rawHTML)}},codeBlock:function(r){var e=r.node,t=e,n=t.attrs,i=t.textContent;return{delim:["```"+(n.language||""),"```"],rawHTML:$n(n.rawHTML),text:i}},blockQuote:function(r){var e=r.node;return{delim:"> ",rawHTML:$n(e.attrs.rawHTML)}},bulletList:function(r,e){var t=r.node,n=e.inTable,i=t.attrs.rawHTML;return n&&(i=i||"ul"),{delim:"*",rawHTML:$n(i)}},orderedList:function(r,e){var t=r.node,n=e.inTable,i=t.attrs.rawHTML;return n&&(i=i||"ol"),{rawHTML:$n(i)}},listItem:function(r,e){var t=r.node,n=e.inTable,i=t.attrs,a=i.task,o=i.checked,s=t.attrs.rawHTML;n&&(s=s||"li");var l=a?' class="task-list-item'+(o?" checked":"")+'"':"",f=a?" data-task"+(o?" data-task-checked":""):"";return{rawHTML:s?["<"+s+l+f+">","</"+s+">"]:null}},table:function(r){var e=r.node;return{rawHTML:$n(e.attrs.rawHTML)}},tableHead:function(r){var e=r.node;return{rawHTML:$n(e.attrs.rawHTML)}},tableBody:function(r){var e=r.node;return{rawHTML:$n(e.attrs.rawHTML)}},tableRow:function(r){var e=r.node;return{rawHTML:$n(e.attrs.rawHTML)}},tableHeadCell:function(r){var e=r.node;return{rawHTML:$n(e.attrs.rawHTML)}},tableBodyCell:function(r){var e=r.node;return{rawHTML:$n(e.attrs.rawHTML)}},image:function(r){var e=r.node,t=e.attrs,n=t.rawHTML,i=t.altText,a=t.imageUrl.replace(/&/g,"&"),o=i?' alt="'+No(i)+'"':"";return{rawHTML:n?"<"+n+' src="'+No(a)+'"'+o+">":null,attrs:{altText:mu(i||""),imageUrl:a}}},thematicBreak:function(r){var e=r.node;return{delim:"***",rawHTML:vs(e.attrs.rawHTML)}},customBlock:function(r){var e=r.node,t=e,n=t.attrs,i=t.textContent;return{delim:["$$"+n.info,"$$"],text:i}},frontMatter:function(r){var e=r.node;return{text:e.textContent}},widget:function(r){var e=r.node;return{text:e.textContent}},strong:function(r,e){var t=r.node,n=e.entering,i=t.attrs.rawHTML;return{delim:"**",rawHTML:n?vs(i):ms(i)}},emph:function(r,e){var t=r.node,n=e.entering,i=t.attrs.rawHTML;return{delim:"*",rawHTML:n?vs(i):ms(i)}},strike:function(r,e){var t=r.node,n=e.entering,i=t.attrs.rawHTML;return{delim:"~~",rawHTML:n?vs(i):ms(i)}},link:function(r,e){var t=r.node,n=e.entering,i=t.attrs,a=i.title,o=i.rawHTML,s=i.linkUrl.replace(/&/g,"&"),l=a?' title="'+No(a)+'"':"";return n?{delim:"[",rawHTML:o?"<"+o+' href="'+No(s)+'"'+l+">":null}:{delim:"]("+s+(a?" "+lne(mu(a)):"")+")",rawHTML:ms(o)}},code:function(r,e){var t=r.node,n=r.parent,i=r.index,a=i===void 0?0:i,o=e.entering,s=o?Wg(n.child(a),-1):Wg(n.child(a-1),1),l=o?vs(t.attrs.rawHTML):ms(t.attrs.rawHTML);return{delim:s,rawHTML:l}},htmlComment:function(r){var e=r.node;return{text:e.textContent}},html:function(r,e){var t=r.node,n=e.entering,i=t.type.name,a=t.attrs.htmlAttrs,o="<"+i,s="</"+i+">";return Object.keys(a).forEach(function(l){o+=" "+l+'="'+a[l].replace(/"/g,"'")+'"'}),o+=">",t.attrs.htmlInline?{rawHTML:n?o:s}:{text:""+o+t.attrs.childrenHTML+s}}},jg={strong:{mixable:!0,removedEnclosingWhitespace:!0},emph:{mixable:!0,removedEnclosingWhitespace:!0},strike:{mixable:!0,removedEnclosingWhitespace:!0},code:{escape:!1},link:null,html:null};function c4e(r){var e={},t=Object.keys(th);return t.forEach(function(n){e[n]=function(i,a){var o=th[n];if(o){var s=r[n],l=s?s(a,{inTable:i.inTable}):{};u4e(n,{state:i,nodeInfo:a,params:l})}}}),e}function f4e(r){var e={},t=Object.keys(jg);return t.forEach(function(n){e[n]=function(i,a){var o=jg[n],s=r[n],l=s&&i&&!Yn(a),f=l?s(i,{entering:a}):{};return we(we({},f),o)}}),e}function d4e(r){var e=Object.keys(r);e.forEach(function(i){var a=gs[i],o=r[i];a?gs[i]=function(s,l){return l.origin=function(){return a(s,l)},o(s,l)}:gs[i]=o,delete r[i]});var t=c4e(gs),n=f4e(gs);return{nodeTypeConvertors:t,markTypeConvertors:n}}var h4e=(function(){function r(e){var t=e.nodeTypeConvertors,n=e.markTypeConvertors;this.nodeTypeConvertors=t,this.markTypeConvertors=n,this.delim="",this.result="",this.closed=!1,this.tightList=!1,this.stopNewline=!1,this.inTable=!1}return r.prototype.getMarkConvertor=function(e){var t=e.attrs.htmlInline?"html":e.type.name;return this.markTypeConvertors[t]},r.prototype.isInBlank=function(){return/(^|\n)$/.test(this.result)},r.prototype.markText=function(e,t,n,i){var a=this.getMarkConvertor(e);if(a){var o=a({node:e,parent:n,index:i},t),s=o.delim,l=o.rawHTML;return l||s}return""},r.prototype.setDelim=function(e){this.delim=e},r.prototype.getDelim=function(){return this.delim},r.prototype.flushClose=function(e){if(!this.stopNewline&&this.closed){if(this.isInBlank()||(this.result+=`
|
|
74
|
-
`),e||(e=2),e>1){var t=this.delim,n=/\s+$/.exec(t);n&&(t=t.slice(0,t.length-n[0].length));for(var i=1;i<e;i+=1)this.result+=t+`
|
|
75
|
-
`}this.closed=!1}},r.prototype.wrapBlock=function(e,t,n,i){var a=this.getDelim();this.write(t||e),this.setDelim(this.getDelim()+e),i(),this.setDelim(a),this.closeBlock(n)},r.prototype.ensureNewLine=function(){this.isInBlank()||(this.result+=`
|
|
76
|
-
`)},r.prototype.write=function(e){e===void 0&&(e=""),this.flushClose(),this.delim&&this.isInBlank()&&(this.result+=this.delim),e&&(this.result+=e)},r.prototype.closeBlock=function(e){this.closed=e},r.prototype.text=function(e,t){t===void 0&&(t=!0);for(var n=e.split(`
|
|
77
|
-
`),i=0;i<n.length;i+=1)this.write(),this.result+=t?sne(n[i]):n[i],i!==n.length-1&&(this.result+=`
|
|
78
|
-
`)},r.prototype.convertBlock=function(e,t,n){var i=e.type.name,a=this.nodeTypeConvertors[i],o={node:e,parent:t,index:n};e.attrs.htmlBlock?this.nodeTypeConvertors.html(this,o):a&&a(this,o)},r.prototype.convertInline=function(e){var t=this,n=[],i="",a=function(o,s,l){var f=o?o.marks:[],p=i;i="";var b=o&&o.isText&&f.some(function(Ie){var ot=t.getMarkConvertor(Ie),Fe=ot&&ot();return Fe&&Fe.removedEnclosingWhitespace});if(b&&o&&o.text){var T=/^(\s*)(.*?)(\s*)$/m.exec(o.text),x=T[1],E=T[2],P=T[3];p+=x,i=P,(x||P)&&(o=E?o.withText(E):null,o||(f=n))}for(var F=f.length&&Ur(f),z=F&&t.getMarkConvertor(F),Y=z&&z(),ee=Y&&Y.escape===!1,se=f.length-(ee?1:0),de=0;de<se;de+=1){var E=f[de];if(Y&&!Y.mixable)break;for(var oe=0;oe<n.length;oe+=1){var le=n[oe];if(Y&&!Y.mixable)break;if(E.eq(le)){de>oe?f=f.slice(0,oe).concat(E).concat(f.slice(oe,de)).concat(f.slice(de+1,se)):oe>de&&(f=f.slice(0,de).concat(f.slice(de+1,oe)).concat(E).concat(f.slice(oe,se)));break}}}for(var ge=0;ge<Math.min(n.length,se)&&f[ge].eq(n[ge]);)ge+=1;for(;ge<n.length;){var xe=n.pop();xe&&t.text(t.markText(xe,!1,e,l),!1)}if(p&&t.text(p),o){for(;n.length<se;){var E=f[n.length];n.push(E),t.text(t.markText(E,!0,e,l),!1)}ee&&o.isText?t.text(t.markText(F,!0,e,l)+o.text+t.markText(F,!1,e,l+1),!1):t.convertBlock(o,e,l)}};e.forEach(a),a(null,null,e.childCount)},r.prototype.convertList=function(e,t,n){var i=this,a;this.closed&&this.closed.type===e.type?this.flushClose(3):this.tightList&&this.flushClose(1);var o=(a=e.attrs.tight)!==null&&a!==void 0?a:!0,s=this.tightList;this.tightList=o,e.forEach(function(l,f,p){p&&o&&i.flushClose(1),i.wrapBlock(t,n(p),e,function(){return i.convertBlock(l,e,p)})}),this.tightList=s},r.prototype.convertTableCell=function(e){var t=this;this.stopNewline=!0,this.inTable=!0,e.forEach(function(n,i,a){if(Fr(["bulletList","orderedList"],n.type.name))t.convertBlock(n,e,a),t.closed=!1;else if(t.convertInline(n),a<e.childCount-1){var o=e.child(a+1);o.type.name==="paragraph"&&t.write("<br>")}}),this.stopNewline=!1,this.inTable=!1},r.prototype.convertNode=function(e,t){var n=this;return e.forEach(function(i,a,o){if(n.convertBlock(i,e,o),(t==null?void 0:t.node)===i){var s=n.result.split(`
|
|
79
|
-
`);t.setMappedPos([s.length,Ur(s).length+1])}}),this.result},r})(),p4e=(function(){function r(e,t,n,i){var a=this;this.setMappedPos=function(o){a.mappedPosWhenConverting=o},this.schema=e,this.eventEmitter=i,this.focusedNode=null,this.mappedPosWhenConverting=null,this.toWwConvertors=n4e(n),this.toMdConvertors=d4e(t||{}),this.eventEmitter.listen("setFocusedNode",function(o){return a.focusedNode=o})}return r.prototype.getMappedPos=function(){return this.mappedPosWhenConverting},r.prototype.getInfoForPosSync=function(){return{node:this.focusedNode,setMappedPos:this.setMappedPos}},r.prototype.toWysiwygModel=function(e){var t=new a4e(this.schema,this.toWwConvertors);return t.convertNode(e,this.getInfoForPosSync())},r.prototype.toMarkdownText=function(e){var t=new h4e(this.toMdConvertors),n=t.convertNode(e,this.getInfoForPosSync());return n=this.eventEmitter.emitReduce("beforeConvertWysiwygToMarkdown",n),n},r})();function v4e(r){var e=r.plugin,t=r.eventEmitter,n=r.usageStatistics,i=r.instance,a={Plugin:hn,PluginKey:Hs,Selection:Tt,TextSelection:xt},o={Decoration:cn,DecorationSet:dr},s={Fragment:De},l={InputRule:da,inputRules:yk,undoInputRule:rre},f={keymap:Bs},p={eventEmitter:t,usageStatistics:n,instance:i,pmState:a,pmView:o,pmModel:s,pmRules:l,pmKeymap:f,i18n:pt};if(Zo(e)){var b=e[0],T=e[1],x=T===void 0?{}:T;return b(p,x)}return e(p)}function o0(r){var e=r.plugins,t=r.eventEmitter,n=r.usageStatistics,i=r.instance;return t.listen("mixinTableOffsetMapPrototype",Gje),(e??[]).reduce(function(a,o){var s=v4e({plugin:o,eventEmitter:t,usageStatistics:n,instance:i});if(!s)throw new Error("The return value of the executed plugin is empty.");var l=s.markdownParsers,f=s.toHTMLRenderers,p=s.toMarkdownRenderers,b=s.markdownPlugins,T=s.wysiwygPlugins,x=s.wysiwygNodeViews,E=s.markdownCommands,P=s.wysiwygCommands,F=s.toolbarItems;return f&&(a.toHTMLRenderers=gu(a.toHTMLRenderers,f)),p&&(a.toMarkdownRenderers=gu(a.toMarkdownRenderers,p)),b&&(a.mdPlugins=a.mdPlugins.concat(b)),T&&(a.wwPlugins=a.wwPlugins.concat(T)),x&&(a.wwNodeViews=we(we({},a.wwNodeViews),x)),E&&(a.mdCommands=we(we({},a.mdCommands),E)),P&&(a.wwCommands=we(we({},a.wwCommands),P)),F&&(a.toolbarItems=a.toolbarItems.concat(F)),l&&(a.markdownParsers=we(we({},a.markdownParsers),l)),a},{toHTMLRenderers:{},toMarkdownRenderers:{},mdPlugins:[],wwPlugins:[],wwNodeViews:{},mdCommands:{},wwCommands:{},toolbarItems:[],markdownParsers:{}})}var m4e="data-task",g4e="data-task-disabled",y4e="checked";function b4e(r){["htmlBlock","htmlInline"].forEach(function(e){r[e]&&Object.keys(r[e]).forEach(function(t){return Bw(t)})})}var s0=(function(){function r(e){var t=this;this.options=Th({linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,usageStatistics:!0,theme:"light"},e),this.eventEmitter=new i0;var n=Tk(this.options.linkAttributes),i=o0({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this})||{},a=i.toHTMLRenderers,o=i.markdownParsers,s=this.options,l=s.customHTMLRenderer,f=s.extendedAutolinks,p=s.referenceDefinition,b=s.frontMatter,T=s.customHTMLSanitizer,x={linkAttributes:n,customHTMLRenderer:we(we({},a),l),extendedAutolinks:f,referenceDefinition:p,frontMatter:b,sanitizer:T||eo};b4e(x.customHTMLRenderer),this.options.events&&_o(this.options.events,function(ee,se){t.on(se,ee)});var E=this.options,P=E.el,F=E.initialValue,z=E.theme,Y=P.innerHTML;z!=="light"&&P.classList.add(Je(z)),P.innerHTML="",this.toastMark=new Lw("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:f,referenceDefinition:p,disallowDeepHeading:!0,frontMatter:b,customParser:o}),this.preview=new Hw(this.eventEmitter,we(we({},x),{isViewer:!0})),ew(this.preview.previewContent,"mousedown",this.toggleTask.bind(this)),F?this.setMarkdown(F):Y&&this.preview.setHTML(Y),P.appendChild(this.preview.previewContent),this.eventEmitter.emit("load",this)}return r.prototype.toggleTask=function(e){var t=e.target,n=getComputedStyle(t,":before");!t.hasAttribute(g4e)&&t.hasAttribute(m4e)&&Lh(n,e.offsetX,e.offsetY)&&(Rh(t,y4e),this.eventEmitter.emit("change",{source:"viewer",date:e}))},r.prototype.setMarkdown=function(e){var t=this.toastMark.getLineTexts(),n=t.length,i=Ur(t),a=[n,i.length+1],o=this.toastMark.editMarkdown([1,1],a,e||"");this.eventEmitter.emit("updatePreview",o)},r.prototype.on=function(e,t){this.eventEmitter.listen(e,t)},r.prototype.off=function(e){this.eventEmitter.removeEventHandler(e)},r.prototype.addHook=function(e,t){this.eventEmitter.removeEventHandler(e),this.eventEmitter.listen(e,t)},r.prototype.destroy=function(){Qk(this.preview.el,"mousedown",this.toggleTask.bind(this)),this.preview.destroy(),this.eventEmitter.emit("destroy")},r.prototype.isViewer=function(){return!0},r.prototype.isMarkdownMode=function(){return!1},r.prototype.isWysiwygMode=function(){return!1},r})();function ru(r){return r instanceof na}function l0(r){var e=["document","blockQuote","bulletList","orderedList","listItem","paragraph","heading","emph","strong","strike","link","image","table","tableHead","tableBody","tableRow","tableHeadCell","tableBodyCell"];return Fr(e,r)}function k4e(r){var e=r.attrs,t=r.type,n=t.name,i={type:n,wysiwygNode:!0,literal:!l0(n)&&ru(r)?r.textContent:null},a={heading:{level:e.level},link:{destination:e.linkUrl,title:e.title},image:{destination:e.imageUrl},codeBlock:{info:e.language},bulletList:{type:"list",listData:{type:"bullet"}},orderedList:{type:"list",listData:{type:"ordered",start:e.order}},listItem:{type:"item",listData:{task:e.task,checked:e.checked}},tableHeadCell:{type:"tableCell",cellType:"head",align:e.align},tableBodyCell:{type:"tableCell",cellType:"body",align:e.align},customBlock:{info:e.info}},o=a[n],s=we(we({},i),o),l=r.attrs,f=l.htmlAttrs,p=l.childrenHTML;return f?we(we({},s),{attrs:f,childrenHTML:p}):s}var w4e={openTag:function(r,e){var t=r,n=t.tagName,i=t.classNames,a=t.attributes,o=document.createElement(n),s={};i&&(o.className=i.join(" ")),a&&(s=we(we({},s),a)),Ph(s,o),e.push(o)},closeTag:function(r,e){if(e.length>1){var t=e.pop();Ur(e).appendChild(t)}},html:function(r,e){Ur(e).insertAdjacentHTML("beforeend",r.content)},text:function(r,e){var t=document.createTextNode(r.content);Ur(e).appendChild(t)}},C4e=(function(){function r(e,t){var n=Kh(e,t),i=we(we({},t.htmlBlock),t.htmlInline);this.customConvertorKeys=Object.keys(t).concat(Object.keys(i)),this.renderer=new Gh({gfm:!0,convertors:we(we({},n),i)}),this.convertors=this.renderer.getConvertors()}return r.prototype.generateTokens=function(e){var t=k4e(e),n={entering:!0,leaf:ru(e)?e.isLeaf:!1,options:this.renderer.getOptions(),getChildrenText:function(){return ru(e)?e.textContent:""},skipChildren:function(){return!1}},i=this.convertors[e.type.name],a=i(t,n,this.convertors),o=Zo(a)?a:[a];return(l0(e.type.name)||e.attrs.htmlInline)&&(n.entering=!1,o.push({type:"text",content:ru(e)?e.textContent:""}),o=o.concat(i(t,n,this.convertors))),o},r.prototype.toDOMNode=function(e){var t=this.generateTokens(e),n=[];return t.forEach(function(i){return w4e[i.type](i,n)}),n[0]},r.prototype.getToDOMNode=function(e){return Fr(this.customConvertorKeys,e)?this.toDOMNode.bind(this):null},r})(),T4e=100,S4e=15,Wl=null,dd=null;function Gg(r,e){var t=e.syncScrollTop,n=e.releaseEventBlock;dd&&clearTimeout(dd),t(r),dd=setTimeout(function(){n()},S4e)}function x4e(r,e,t){var n=e-r,i=Date.now(),a=function(){var o=Date.now(),s=(o-i)/T4e,l;Wl&&clearTimeout(Wl),s<1?(l=r+n*Math.cos((1-s)*Math.PI/2),Gg(Math.ceil(l),t),Wl=setTimeout(a,1)):(Gg(e,t),Wl=null)};a()}var E4e=18,M4e=(function(){function r(e,t,n){this.latestEditorScrollTop=null,this.latestPreviewScrollTop=null,this.blockedScroll=null,this.active=!0,this.timer=null;var i=t.previewContent,a=t.el;this.previewRoot=i,this.previewEl=a,this.mdEditor=e,this.editorView=e.view,this.toastMark=e.getToastMark(),this.eventEmitter=n,this.addScrollSyncEvent()}return r.prototype.addScrollSyncEvent=function(){var e=this;this.eventEmitter.listen("afterPreviewRender",function(){e.clearTimer(),e.timer=setTimeout(function(){e.syncPreviewScrollTop(!0)},200)}),this.eventEmitter.listen("scroll",function(t,n){e.active&&(t==="editor"&&e.blockedScroll!=="editor"?e.syncPreviewScrollTop():t==="preview"&&e.blockedScroll!=="preview"&&e.syncEditorScrollTop(n))}),this.eventEmitter.listen("toggleScrollSync",function(t){e.active=t})},r.prototype.getMdNodeAtPos=function(e,t){var n=e.content.findIndex(t.pos),i=n.index;return this.toastMark.findFirstNodeAtLine(i+1)},r.prototype.getScrollTopByCaretPos=function(){var e=this.mdEditor.getSelection(),t=this.toastMark.findFirstNodeAtLine(e[0][0]),n=this.previewEl.clientHeight,i=ld(this.previewRoot,t).el,a=Mu(i,this.previewRoot)||i.offsetTop,o=i.clientHeight,s=a+o-n*.5;this.latestEditorScrollTop=null;var l=i.getBoundingClientRect().top-this.previewEl.getBoundingClientRect().top;return l<n?null:s},r.prototype.syncPreviewScrollTop=function(e){e===void 0&&(e=!1);var t=this,n=t.editorView,i=t.previewEl,a=t.previewRoot,o=n.dom.getBoundingClientRect(),s=o.left,l=o.top,f=n.posAtCoords({left:s,top:l}),p=n.state.doc,b=this.getMdNodeAtPos(p,f);if(!(!b||dne(b))){var T=i.scrollTop,x=n.dom,E=x.scrollTop,P=x.scrollHeight,F=x.clientHeight,z=x.children,Y=P-E<=F+E4e,ee=Y?i.scrollHeight:0;if(E&&!Y){if(e){var se=this.getScrollTopByCaretPos();if(!se)return;ee=se}else{var de=ld(this.previewRoot,b),oe=de.el,le=de.mdNode,ge=Lg(p,le,z),xe=ge.height,Ie=ge.rect,ot=Mu(oe,a)||oe.offsetTop,Fe=oe.clientHeight,bt=l>Ie.top?Math.min((l-Ie.top)/xe,1):0;ee=ot+Fe*bt}ee=this.getResolvedScrollTop("editor",E,ee,T),this.latestEditorScrollTop=E}ee!==T&&this.run("editor",ee,T)}},r.prototype.syncEditorScrollTop=function(e){var t=this,n=t.toastMark,i=t.editorView,a=t.previewRoot,o=t.previewEl,s=i.dom,l=i.state,f=o.scrollTop,p=o.clientHeight,b=o.scrollHeight,T=b-f<=p,x=s.scrollTop,E=T?s.scrollHeight:0;if(f&&e&&!T){if(e=Tje(e,a),!e.getAttribute("data-nodeid"))return;var P=s.children,F=Number(e.getAttribute("data-nodeid")),z=ld(this.previewRoot,n.findNodeById(F)),Y=z.mdNode,ee=z.el,se=$s(Y);E=P[se-1].offsetTop;var de=Lg(l.doc,Y,P).height,oe=Dje(ee,a,F),le=oe.nodeHeight,ge=oe.offsetTop;E+=xje(f,ge,le,de),E=this.getResolvedScrollTop("preview",f,E,x),this.latestPreviewScrollTop=f}E!==x&&this.run("preview",E,x)},r.prototype.getResolvedScrollTop=function(e,t,n,i){var a=e==="editor"?this.latestEditorScrollTop:this.latestPreviewScrollTop;return a===null?n:a<t?Math.max(n,i):Math.min(n,i)},r.prototype.run=function(e,t,n){var i=this,a;e==="editor"?(a=this.previewEl,this.blockedScroll="preview"):(a=this.editorView.dom,this.blockedScroll="editor");var o={syncScrollTop:function(s){return a.scrollTop=s},releaseEventBlock:function(){return i.blockedScroll=null}};x4e(n,t,o)},r.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},r.prototype.destroy=function(){this.clearTimer(),this.eventEmitter.removeEventHandler("scroll"),this.eventEmitter.removeEventHandler("afterPreviewRender")},r})(),A4e={getPopupInitialValues:function(r,e){var t=e.popupName;return t==="link"?{linkText:r.getSelectedText()}:{}}};function O4e(r){r.eventEmitter.listen("query",function(e,t){return A4e[e](r,t)})}var u0=(function(){function r(e){var t=this;this.initialHTML=e.el.innerHTML,e.el.innerHTML="",this.options=Th({previewStyle:"tab",previewHighlight:!0,initialEditType:"markdown",height:"300px",minHeight:"200px",language:"en-US",useCommandShortcut:!0,usageStatistics:!0,toolbarItems:[["heading","bold","italic","strike"],["hr","quote"],["ul","ol","task","indent","outdent"],["table","image","link"],["code","codeblock"],["scrollSync"]],hideModeSwitch:!1,linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,customMarkdownRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,widgetRules:[],theme:"light",autofocus:!0},e);var n=this.options,i=n.customHTMLRenderer,a=n.extendedAutolinks,o=n.referenceDefinition,s=n.frontMatter,l=n.customMarkdownRenderer,f=n.useCommandShortcut,p=n.initialEditType,b=n.widgetRules,T=n.customHTMLSanitizer;this.mode=p||"markdown",this.mdPreviewStyle=this.options.previewStyle,this.i18n=pt,this.i18n.setCode(this.options.language),this.eventEmitter=new i0,Cne(b);var x=Tk(this.options.linkAttributes);this.pluginInfo=o0({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this});var E=this.pluginInfo,P=E.toHTMLRenderers,F=E.toMarkdownRenderers,z=E.mdPlugins,Y=E.wwPlugins,ee=E.wwNodeViews,se=E.mdCommands,de=E.wwCommands,oe=E.markdownParsers,le={linkAttributes:x,customHTMLRenderer:gu(P,i),extendedAutolinks:a,referenceDefinition:o,frontMatter:s,sanitizer:T||eo},ge=new C4e(x,le.customHTMLRenderer),xe=mje(le.customHTMLRenderer,le.sanitizer,ge);this.toastMark=new Lw("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:a,referenceDefinition:o,disallowDeepHeading:!0,frontMatter:s,customParser:oe}),this.mdEditor=new Sae(this.eventEmitter,{toastMark:this.toastMark,useCommandShortcut:f,mdPlugins:z}),this.preview=new Hw(this.eventEmitter,we(we({},le),{isViewer:!1,highlight:this.options.previewHighlight})),this.wwEditor=new zKe(this.eventEmitter,{toDOMAdaptor:ge,useCommandShortcut:f,htmlSchemaMap:xe,linkAttributes:x,wwPlugins:Y,wwNodeViews:ee}),this.convertor=new p4e(this.wwEditor.getSchema(),we(we({},F),l),Kh(x,le.customHTMLRenderer),this.eventEmitter),this.setMinHeight(this.options.minHeight),this.setHeight(this.options.height),this.setMarkdown(this.options.initialValue,!1),this.options.placeholder&&this.setPlaceholder(this.options.placeholder),this.options.initialValue||this.setHTML(this.initialHTML,!1),this.commandManager=new ZKe(this.eventEmitter,this.mdEditor.commands,this.wwEditor.commands,function(){return t.mode}),this.options.usageStatistics&&nne(),this.scrollSync=new M4e(this.mdEditor,this.preview,this.eventEmitter),this.addInitEvent(),this.addInitCommand(se,de),O4e(this),this.options.hooks&&_o(this.options.hooks,function(Ie,ot){return t.addHook(ot,Ie)}),this.options.events&&_o(this.options.events,function(Ie,ot){return t.on(ot,Ie)}),this.eventEmitter.emit("load",this),this.moveCursorToStart(this.options.autofocus)}return r.prototype.addInitEvent=function(){var e=this;this.on("needChangeMode",this.changeMode.bind(this)),this.on("loadUI",function(){if(e.height!=="auto"){var t=Math.min(parseInt(e.minHeight,10),parseInt(e.height,10)-75)+"px";e.setMinHeight(t)}}),Kne(this.eventEmitter)},r.prototype.addInitCommand=function(e,t){var n=this,i=function(a,o){Object.keys(o).forEach(function(s){n.addCommand(a,s,o[s])})};this.addCommand("markdown","toggleScrollSync",function(a){return n.eventEmitter.emit("toggleScrollSync",a.active),!0}),i("markdown",e),i("wysiwyg",t)},r.prototype.getCurrentModeEditor=function(){return this.isMarkdownMode()?this.mdEditor:this.wwEditor},r.factory=function(e){return e.viewer?new s0(e):new r(e)},r.setLanguage=function(e,t){pt.setLanguage(e,t)},r.prototype.changePreviewStyle=function(e){this.mdPreviewStyle!==e&&(this.mdPreviewStyle=e,this.eventEmitter.emit("changePreviewStyle",e))},r.prototype.exec=function(e,t){this.commandManager.exec(e,t)},r.prototype.addCommand=function(e,t,n){var i=this,a=function(o){o===void 0&&(o={});var s=(e==="markdown"?i.mdEditor:i.wwEditor).view;n(o,s.state,s.dispatch,s)};this.commandManager.addCommand(e,t,a)},r.prototype.on=function(e,t){this.eventEmitter.listen(e,t)},r.prototype.off=function(e){this.eventEmitter.removeEventHandler(e)},r.prototype.addHook=function(e,t){this.eventEmitter.removeEventHandler(e),this.eventEmitter.listen(e,t)},r.prototype.removeHook=function(e){this.eventEmitter.removeEventHandler(e)},r.prototype.focus=function(){this.getCurrentModeEditor().focus()},r.prototype.blur=function(){this.getCurrentModeEditor().blur()},r.prototype.moveCursorToEnd=function(e){e===void 0&&(e=!0),this.getCurrentModeEditor().moveCursorToEnd(e)},r.prototype.moveCursorToStart=function(e){e===void 0&&(e=!0),this.getCurrentModeEditor().moveCursorToStart(e)},r.prototype.setMarkdown=function(e,t){if(e===void 0&&(e=""),t===void 0&&(t=!0),this.mdEditor.setMarkdown(e,t),this.isWysiwygMode()){var n=this.toastMark.getRootNode(),i=this.convertor.toWysiwygModel(n);this.wwEditor.setModel(i,t)}},r.prototype.setHTML=function(e,t){e===void 0&&(e=""),t===void 0&&(t=!0);var n=document.createElement("div");n.innerHTML=Wne(e);var i=Wa.fromSchema(this.wwEditor.schema).parse(n);this.isMarkdownMode()?this.mdEditor.setMarkdown(this.convertor.toMarkdownText(i),t):this.wwEditor.setModel(i,t)},r.prototype.getMarkdown=function(){return this.isMarkdownMode()?this.mdEditor.getMarkdown():this.convertor.toMarkdownText(this.wwEditor.getModel())},r.prototype.getHTML=function(){var e=this;this.eventEmitter.holdEventInvoke(function(){if(e.isMarkdownMode()){var i=e.toastMark.getRootNode(),a=e.convertor.toWysiwygModel(i);e.wwEditor.setModel(a)}});var t=Bh(this.wwEditor.view.dom.innerHTML);if(this.placeholder){var n=new RegExp('<span class="placeholder[^>]+>'+this.placeholder+"</span>","i");return t.replace(n,"")}return t},r.prototype.insertText=function(e){this.getCurrentModeEditor().replaceSelection(e)},r.prototype.setSelection=function(e,t){this.getCurrentModeEditor().setSelection(e,t)},r.prototype.replaceSelection=function(e,t,n){this.getCurrentModeEditor().replaceSelection(e,t,n)},r.prototype.deleteSelection=function(e,t){this.getCurrentModeEditor().deleteSelection(e,t)},r.prototype.getSelectedText=function(e,t){return this.getCurrentModeEditor().getSelectedText(e,t)},r.prototype.getRangeInfoOfNode=function(e){return this.getCurrentModeEditor().getRangeInfoOfNode(e)},r.prototype.addWidget=function(e,t,n){this.getCurrentModeEditor().addWidget(e,t,n)},r.prototype.replaceWithWidget=function(e,t,n){this.getCurrentModeEditor().replaceWithWidget(e,t,n)},r.prototype.setHeight=function(e){var t=this.options.el;qi(e)&&(e==="auto"?li(t,"auto-height"):Gn(t,"auto-height"),this.setMinHeight(this.getMinHeight())),di(t,{height:e}),this.height=e},r.prototype.getHeight=function(){return this.height},r.prototype.setMinHeight=function(e){if(e!==this.minHeight){var t=this.height||this.options.height;t!=="auto"&&this.options.el.querySelector("."+Je("main"))&&(e=Math.min(parseInt(e,10),parseInt(t,10)-75)+"px");var n=parseInt(e,10);this.minHeight=e,this.wwEditor.setMinHeight(n),this.mdEditor.setMinHeight(n),this.preview.setMinHeight(n)}},r.prototype.getMinHeight=function(){return this.minHeight},r.prototype.isMarkdownMode=function(){return this.mode==="markdown"},r.prototype.isWysiwygMode=function(){return this.mode==="wysiwyg"},r.prototype.isViewer=function(){return!1},r.prototype.getCurrentPreviewStyle=function(){return this.mdPreviewStyle},r.prototype.changeMode=function(e,t){if(this.mode!==e){if(this.mode=e,this.isWysiwygMode()){var n=this.toastMark.getRootNode(),i=this.convertor.toWysiwygModel(n);this.wwEditor.setModel(i)}else{var i=this.wwEditor.getModel();this.mdEditor.setMarkdown(this.convertor.toMarkdownText(i),!t)}if(this.eventEmitter.emit("removePopupWidget"),this.eventEmitter.emit("changeMode",e),!t){var a=this.convertor.getMappedPos();this.focus(),this.isWysiwygMode()&&Di(a)?this.wwEditor.setSelection(a):Array.isArray(a)&&this.mdEditor.setSelection(a)}}},r.prototype.destroy=function(){var e=this;this.wwEditor.destroy(),this.mdEditor.destroy(),this.preview.destroy(),this.scrollSync.destroy(),this.eventEmitter.emit("destroy"),this.eventEmitter.getEvents().forEach(function(t,n){return e.off(n)})},r.prototype.hide=function(){this.eventEmitter.emit("hide")},r.prototype.show=function(){this.eventEmitter.emit("show")},r.prototype.setScrollTop=function(e){this.getCurrentModeEditor().setScrollTop(e)},r.prototype.getScrollTop=function(){return this.getCurrentModeEditor().getScrollTop()},r.prototype.reset=function(){this.wwEditor.setModel([]),this.mdEditor.setMarkdown("")},r.prototype.getSelection=function(){return this.getCurrentModeEditor().getSelection()},r.prototype.setPlaceholder=function(e){this.placeholder=e,this.mdEditor.setPlaceholder(e),this.wwEditor.setPlaceholder(e)},r.prototype.getEditorElements=function(){return{mdEditor:this.mdEditor.getElement(),mdPreview:this.preview.getElement(),wwEditor:this.wwEditor.getElement()}},r.prototype.convertPosToMatchEditorMode=function(e,t,n){var i,a;t===void 0&&(t=e),n===void 0&&(n=this.mode);var o=this.mdEditor.view.state.doc,s=Array.isArray(e),l=Array.isArray(t),f=e,p=t;if(s!==l)throw new Error("Types of arguments must be same");return n==="markdown"&&!s&&!l?(i=Yl(o,e,t),f=i[0],p=i[1]):n==="wysiwyg"&&s&&l&&(a=Ia(o,e,t),f=a[0],p=a[1]),[f,p]},r})();function N4e(r){for(var e,t,n=arguments,i=1,a="",o="",s=[0],l=function(p){i===1&&(p||(a=a.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(p?n[p]:a):i===3&&(p||a)?(s[1]=p?n[p]:a,i=2):i===2&&a==="..."&&p?s[2]=Oh(s[2]||{},n[p]):i===2&&a&&!p?(s[2]=s[2]||{})[a]=!0:i>=5&&(i===5?((s[2]=s[2]||{})[t]=p?a?a+n[p]:n[p]:a,i=6):(p||a)&&(s[2][t]+=p?a+n[p]:a)),a=""},f=0;f<r.length;f++){f&&(i===1&&l(),l(f));for(let p=0;p<r[f].length;p++)e=r[f][p],i===1?e==="<"?(l(),s=[s,"",null],i=3):a+=e:i===4?a==="--"&&e===">"?(i=1,a=""):a=e+a[0]:o?e===o?o="":a+=e:e==='"'||e==="'"?o=e:e===">"?(l(),i=1):i&&(e==="="?(i=5,t=a,a=""):e==="/"&&(i<5||r[f][p+1]===">")?(l(),i===3&&(s=s[0]),i=s,(s=s[0]).push(this.apply(null,i.slice(1))),i=0):e===" "||e===" "||e===`
|
|
80
|
-
`||e==="\r"?(l(),i=2):a+=e),i===3&&a==="!--"&&(i=4,s=s[0])}return l(),s.length>2?s.slice(1):s[1]}function D4e(r){return typeof r=="boolean"||r instanceof Boolean}var L4e=D4e,R4e=(function(){function r(e){this.current=e,this.root=e,this.entering=!0}return r.prototype.walk=function(){var e=this,t=e.entering,n=e.current;return n?(t?n.firstChild?(this.current=n.firstChild,this.entering=!0):this.entering=!1:n===this.root?this.current=null:n.next?(this.current=n.next,this.entering=!0):(this.current=n.parent,this.entering=!1),{vnode:n,entering:t}):null},r})(),Jn=(function(){function r(e,t,n){this.parent=null,this.old=null,this.firstChild=null,this.next=null,this.skip=!1,this.type=e,this.props=t,this.children=n,this.props.children=n,t.ref&&(this.ref=t.ref,delete t.ref),t.key&&(this.key=t.key,delete t.key)}return r.prototype.walker=function(){return new R4e(this)},r.removalNodes=[],r})();function I4e(r){return new Jn("TEXT_NODE",{nodeValue:r},[])}function Kg(r,e){var t=r;L4e(r)||r==null?t=null:(qi(r)||Di(r))&&(t=I4e(String(r))),t&&e.push(t)}function P4e(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var i=[];return t.forEach(function(a){Array.isArray(a)?a.forEach(function(o){Kg(o,i)}):Kg(a,i)}),new Jn(r,e||{},i)}var Lt=N4e.bind(P4e);function B4e(r){return r===Object(r)}var F4e=B4e;function q4e(r){var e;return r.type==="TEXT_NODE"?e=document.createTextNode(r.props.nodeValue):(e=document.createElement(r.type),f0(e,{},r.props)),e}function c0(r,e){r.node?e.removeChild(r.node):c0(r.firstChild,e)}function H4e(r,e,t){Object.keys(e).forEach(function(n){if(/^on/.test(n)){if(!t[n]||e[n]!==t[n]){var i=n.slice(2).toLowerCase();r.removeEventListener(i,e[n])}}else n!=="children"&&!t[n]&&!_ne(r)&&r.removeAttribute(n)}),f0(r,e,t,function(n){return!xh(e[n],t[n])})}var _4e=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function f0(r,e,t,n){Object.keys(t).forEach(function(i){if(!n||n(i))if(/^on/.test(i)){var a=i.slice(2).toLowerCase();r.addEventListener(a,t[i])}else i==="nodeValue"?r[i]=t[i]:i==="style"&&F4e(t[i])?z4e(r,e[i],t[i]):i!=="children"&&(t[i]===!1?r.removeAttribute(i):r.setAttribute(i,t[i]))})}function z4e(r,e,t){e&&Object.keys(e).forEach(function(n){r.style[n]=""}),Object.keys(t).forEach(function(n){var i=t[n];r.style[n]=Di(i)&&!_4e.test(n)?i+"px":i})}function Xh(r){if(Jn.removalNodes.forEach(function(a){return Yg(a)}),r){for(var e=void 0,t=r.walker();e=t.walk();)if(r=e.vnode,e.entering)Yg(r);else if(Hn(r.type)){var n=r.component;if(!r.old&&n.mounted&&n.mounted(),r.old&&n.updated){var i=n.prevProps||{};n.updated(i)}}}}function Jg(r){for(var e=r.parent;!e.node;)e=e.parent;return e.node}function Yg(r){if(!(!r||!r.parent)){if(r.node){var e=Jg(r);r.effect==="A"?e.appendChild(r.node):r.effect==="U"&&H4e(r.node,r.old.props,r.props)}if(r.effect==="D"){for(var t=void 0,n=r.walker();t=n.walk();)if(r=t.vnode,!t.entering)if(Hn(r.type)){var i=r.component;i.beforeDestroy&&i.beforeDestroy()}else{var e=Jg(r);c0(r,e)}}r.ref&&(r.component?r.ref(r.component):r.node&&r.ref(r.node))}}function V4e(r,e){var t=e.props,n=e.component;return n?(n.prevProps=n.props,n.props=e.props,n):new r(t)}function d0(r){for(var e=r;r&&!r.skip;){if(Hn(r.type)){var t=V4e(r.type,r);t.vnode=r,r.component=t,r.props.children=r.children=[t.render()],Xg(r)}else r.node||(r.node=q4e(r)),Xg(r);if(r.firstChild)r=r.firstChild;else{for(;r&&r.parent&&!r.next&&(r=r.parent,r!==e););r=r.next}}}function U4e(r,e){return r&&e&&e.type===r.type&&(!e.key||e.key===r.key)}function Xg(r){var e=r.children,t=r.old?r.old.firstChild:null,n=null;e.forEach(function(a,o){var s=U4e(t,a);s&&(a.old=t,a.parent=r,a.node=t.node,a.component=t.component,a.effect="U"),a&&!s&&(a.old=null,a.parent=r,a.node=null,a.effect="A"),t&&!s&&(Jn.removalNodes.push(t),t.effect="D"),t&&(t=t.next),o===0?r.firstChild=a:a&&(n.next=a),n=a});var i=Ur(e);if(!e.length)for(;t;)Jn.removalNodes.push(t),t.effect="D",t=t.next;for(;t&&i;)t&&i.old!==t&&(Jn.removalNodes.push(t),t.effect="D",t=t.next)}function $4e(r){r.effect="D",Jn.removalNodes=[r],Xh(),Jn.removalNodes=[]}function W4e(r){var e=r.vnode;e.effect="U",e.old=e,e.next&&(e.next.skip=!0),Jn.removalNodes=[],d0(e),Xh(e),e.next&&(e.next.skip=!1)}function j4e(r,e){var t=new Jn(r.tagName.toLowerCase(),{},[e]);return t.node=r,Jn.removalNodes=[],d0(t),Xh(t),function(){return $4e(t.firstChild)}}var jr=(function(){function r(e){this.props=e,this.state={},this.refs={}}return r.prototype.setState=function(e){var t=we(we({},this.state),e);xh(this.state,t)||(this.state=t,W4e(this))},r})(),G4e=(function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;return n.state={hide:!1},n}return e.prototype.show=function(){this.setState({hide:!1})},e.prototype.hide=function(){this.setState({hide:!0})},e.prototype.render=function(){var t=this.props,n=t.editorType,i=t.eventEmitter;return Lt(Zg||(Zg=Dt([`
|
|
81
|
-
<div class="`,'" style="display: ',`">
|
|
82
|
-
<div
|
|
83
|
-
class="tab-item`,`"
|
|
84
|
-
onClick=`,`
|
|
85
|
-
>
|
|
86
|
-
`,`
|
|
87
|
-
</div>
|
|
88
|
-
<div
|
|
89
|
-
class="tab-item`,`"
|
|
90
|
-
onClick=`,`
|
|
91
|
-
>
|
|
92
|
-
`,`
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
`],[`
|
|
96
|
-
<div class="`,'" style="display: ',`">
|
|
97
|
-
<div
|
|
98
|
-
class="tab-item`,`"
|
|
99
|
-
onClick=`,`
|
|
100
|
-
>
|
|
101
|
-
`,`
|
|
102
|
-
</div>
|
|
103
|
-
<div
|
|
104
|
-
class="tab-item`,`"
|
|
105
|
-
onClick=`,`
|
|
106
|
-
>
|
|
107
|
-
`,`
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
`])),Je("mode-switch"),this.state.hide?"none":"block",n==="markdown"?" active":"",function(){i.emit("needChangeMode","markdown")},pt.get("Markdown"),n==="wysiwyg"?" active":"",function(){i.emit("needChangeMode","wysiwyg")},pt.get("WYSIWYG"))},e})(jr),Zg;function K4e(r,e){var t,n;e=e||0;function i(){n=Array.prototype.slice.call(arguments),window.clearTimeout(t),t=window.setTimeout(function(){r.apply(null,n)},e)}return i}var J4e=K4e,Y4e=J4e;function X4e(r,e){var t,n=!0,i=function(p){r.apply(null,p),t=null},a,o,s;e=e||0,a=Y4e(i,e);function l(){if(s=Array.prototype.slice.call(arguments),n){i(s),n=!1;return}o=Number(new Date),t=t||o,a(s),o-t>=e&&i(s)}function f(){n=!0,t=null}return l.reset=f,l}var Z4e=X4e,h0=(function(){if(typeof Map<"u")return Map;function r(e,t){var n=-1;return e.some(function(i,a){return i[0]===t?(n=a,!0):!1}),n}return(function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(t){var n=r(this.__entries__,t),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(t,n){var i=r(this.__entries__,t);~i?this.__entries__[i][1]=n:this.__entries__.push([t,n])},e.prototype.delete=function(t){var n=this.__entries__,i=r(n,t);~i&&n.splice(i,1)},e.prototype.has=function(t){return!!~r(this.__entries__,t)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,n){n===void 0&&(n=null);for(var i=0,a=this.__entries__;i<a.length;i++){var o=a[i];t.call(n,o[1],o[0])}},e})()})(),rh=typeof window<"u"&&typeof document<"u"&&window.document===document,Ou=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),Q4e=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Ou):function(r){return setTimeout(function(){return r(Date.now())},1e3/60)}})(),e8e=2;function t8e(r,e){var t=!1,n=!1,i=0;function a(){t&&(t=!1,r()),n&&s()}function o(){Q4e(a)}function s(){var l=Date.now();if(t){if(l-i<e8e)return;n=!0}else t=!0,n=!1,setTimeout(o,e);i=l}return s}var r8e=20,n8e=["top","right","bottom","left","width","height","size","weight"],i8e=typeof MutationObserver<"u",a8e=(function(){function r(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=t8e(this.refresh.bind(this),r8e)}return r.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},r.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},r.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},r.prototype.updateObservers_=function(){var e=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return e.forEach(function(t){return t.broadcastActive()}),e.length>0},r.prototype.connect_=function(){!rh||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),i8e?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},r.prototype.disconnect_=function(){!rh||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},r.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=t===void 0?"":t,i=n8e.some(function(a){return!!~n.indexOf(a)});i&&this.refresh()},r.getInstance=function(){return this.instance_||(this.instance_=new r),this.instance_},r.instance_=null,r})(),p0=(function(r,e){for(var t=0,n=Object.keys(e);t<n.length;t++){var i=n[t];Object.defineProperty(r,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return r}),Jo=(function(r){var e=r&&r.ownerDocument&&r.ownerDocument.defaultView;return e||Ou}),v0=Zu(0,0,0,0);function Nu(r){return parseFloat(r)||0}function Qg(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return e.reduce(function(n,i){var a=r["border-"+i+"-width"];return n+Nu(a)},0)}function o8e(r){for(var e=["top","right","bottom","left"],t={},n=0,i=e;n<i.length;n++){var a=i[n],o=r["padding-"+a];t[a]=Nu(o)}return t}function s8e(r){var e=r.getBBox();return Zu(0,0,e.width,e.height)}function l8e(r){var e=r.clientWidth,t=r.clientHeight;if(!e&&!t)return v0;var n=Jo(r).getComputedStyle(r),i=o8e(n),a=i.left+i.right,o=i.top+i.bottom,s=Nu(n.width),l=Nu(n.height);if(n.boxSizing==="border-box"&&(Math.round(s+a)!==e&&(s-=Qg(n,"left","right")+a),Math.round(l+o)!==t&&(l-=Qg(n,"top","bottom")+o)),!c8e(r)){var f=Math.round(s+a)-e,p=Math.round(l+o)-t;Math.abs(f)!==1&&(s-=f),Math.abs(p)!==1&&(l-=p)}return Zu(i.left,i.top,s,l)}var u8e=(function(){return typeof SVGGraphicsElement<"u"?function(r){return r instanceof Jo(r).SVGGraphicsElement}:function(r){return r instanceof Jo(r).SVGElement&&typeof r.getBBox=="function"}})();function c8e(r){return r===Jo(r).document.documentElement}function f8e(r){return rh?u8e(r)?s8e(r):l8e(r):v0}function d8e(r){var e=r.x,t=r.y,n=r.width,i=r.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(a.prototype);return p0(o,{x:e,y:t,width:n,height:i,top:t,right:e+n,bottom:i+t,left:e}),o}function Zu(r,e,t,n){return{x:r,y:e,width:t,height:n}}var h8e=(function(){function r(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Zu(0,0,0,0),this.target=e}return r.prototype.isActive=function(){var e=f8e(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},r.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},r})(),p8e=(function(){function r(e,t){var n=d8e(t);p0(this,{target:e,contentRect:n})}return r})(),v8e=(function(){function r(e,t,n){if(this.activeObservations_=[],this.observations_=new h0,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return r.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Jo(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new h8e(e)),this.controller_.addObserver(this),this.controller_.refresh())}},r.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Jo(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},r.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},r.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},r.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(n){return new p8e(n.target,n.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},r.prototype.clearActive=function(){this.activeObservations_.splice(0)},r.prototype.hasActive=function(){return this.activeObservations_.length>0},r})(),m0=typeof WeakMap<"u"?new WeakMap:new h0,g0=(function(){function r(e){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=a8e.getInstance(),n=new v8e(e,t,this);m0.set(this,n)}return r})();["observe","unobserve","disconnect"].forEach(function(r){g0.prototype[r]=function(){var e;return(e=m0.get(this))[r].apply(e,arguments)}});var m8e=(function(){return typeof Ou.ResizeObserver<"u"?Ou.ResizeObserver:g0})(),g8e=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.execCommand=function(t){var n=ui(t.target,"li");this.props.execCommand("heading",{level:Number(n.getAttribute("data-level"))})},e.prototype.render=function(){var t=this;return Lt(ty||(ty=Dt([`
|
|
111
|
-
<ul
|
|
112
|
-
onClick=`,`
|
|
113
|
-
aria-role="menu"
|
|
114
|
-
aria-label="`,`"
|
|
115
|
-
>
|
|
116
|
-
`,`
|
|
117
|
-
<li data-type="Paragraph" aria-role="menuitem">
|
|
118
|
-
<div>`,`</div>
|
|
119
|
-
</li>
|
|
120
|
-
</ul>
|
|
121
|
-
`],[`
|
|
122
|
-
<ul
|
|
123
|
-
onClick=`,`
|
|
124
|
-
aria-role="menu"
|
|
125
|
-
aria-label="`,`"
|
|
126
|
-
>
|
|
127
|
-
`,`
|
|
128
|
-
<li data-type="Paragraph" aria-role="menuitem">
|
|
129
|
-
<div>`,`</div>
|
|
130
|
-
</li>
|
|
131
|
-
</ul>
|
|
132
|
-
`])),function(n){return t.execCommand(n)},pt.get("Headings"),[1,2,3,4,5,6].map(function(n){return Lt(ey||(ey=Dt([`
|
|
133
|
-
<li data-level="`,`" data-type="Heading" aria-role="menuitem">
|
|
134
|
-
<`,">"," ",`</$>
|
|
135
|
-
</li>
|
|
136
|
-
`],[`
|
|
137
|
-
<li data-level="`,`" data-type="Heading" aria-role="menuitem">
|
|
138
|
-
<`,">"," ",`</$>
|
|
139
|
-
</li>
|
|
140
|
-
`])),n,"h"+n,pt.get("Heading"),n)}),pt.get("Paragraph"))},e})(jr),ey,ty,y0=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.toggleTab=function(t,n){this.props.onClick(t,n)},e.prototype.render=function(){var t=this;return Lt(ny||(ny=Dt([`
|
|
141
|
-
<div class="`,`" aria-role="tabpanel">
|
|
142
|
-
`,`
|
|
143
|
-
</div>
|
|
144
|
-
`],[`
|
|
145
|
-
<div class="`,`" aria-role="tabpanel">
|
|
146
|
-
`,`
|
|
147
|
-
</div>
|
|
148
|
-
`])),Je("tabs"),this.props.tabs.map(function(n){var i=n.name,a=n.text,o=t.props.activeTab===i;return Lt(ry||(ry=Dt([`
|
|
149
|
-
<div
|
|
150
|
-
class="tab-item`,`"
|
|
151
|
-
onClick=`,`
|
|
152
|
-
aria-role="tab"
|
|
153
|
-
aria-label="`,`"
|
|
154
|
-
aria-selected="`,`"
|
|
155
|
-
tabindex="`,`"
|
|
156
|
-
>
|
|
157
|
-
`,`
|
|
158
|
-
</div>
|
|
159
|
-
`],[`
|
|
160
|
-
<div
|
|
161
|
-
class="tab-item`,`"
|
|
162
|
-
onClick=`,`
|
|
163
|
-
aria-role="tab"
|
|
164
|
-
aria-label="`,`"
|
|
165
|
-
aria-selected="`,`"
|
|
166
|
-
tabindex="`,`"
|
|
167
|
-
>
|
|
168
|
-
`,`
|
|
169
|
-
</div>
|
|
170
|
-
`])),o?" active":"",function(s){return t.toggleTab(s,i)},pt.get(a),o?"true":"false",o?"0":"-1",pt.get(a))}))},e})(jr),ry,ny,y8e="ui",b8e=(function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;return n.initialize=function(i){i===void 0&&(i="file");var a=n.refs.url;a.value="",n.refs.altText.value="",n.refs.file.value="",Gn(a,"wrong"),n.setState({activeTab:i,file:null,fileNameElClassName:""})},n.execCommand=function(){n.state.activeTab==="file"?n.emitAddImageBlob():n.emitAddImage()},n.toggleTab=function(i,a){a!==n.state.activeTab&&n.initialize(a)},n.showFileSelectBox=function(){n.refs.file.click()},n.changeFile=function(i){var a=i.target.files;a!=null&&a.length&&n.setState({file:a[0]})},n.state={activeTab:"file",file:null,fileNameElClassName:""},n.tabs=[{name:"file",text:"File"},{name:"url",text:"URL"}],n}return e.prototype.emitAddImageBlob=function(){var t=this,n=this.refs.file.files,i=this.refs.altText,a=" wrong";if(n!=null&&n.length){a="";var o=n.item(0),s=function(l,f){return t.props.execCommand("addImage",{imageUrl:l,altText:f||i.value})};this.props.eventEmitter.emit("addImageBlobHook",o,s,y8e)}this.setState({fileNameElClassName:a})},e.prototype.emitAddImage=function(){var t=this.refs.url,n=this.refs.altText,i=t.value,a=n.value||"image";if(Gn(t,"wrong"),!i.length){li(t,"wrong");return}i&&this.props.execCommand("addImage",{imageUrl:i,altText:a})},e.prototype.preventSelectStart=function(t){t.preventDefault()},e.prototype.updated=function(){this.props.show||this.initialize()},e.prototype.render=function(){var t=this,n=this.state,i=n.activeTab,a=n.file,o=n.fileNameElClassName;return Lt(iy||(iy=Dt([`
|
|
171
|
-
<div aria-label="`,`">
|
|
172
|
-
<`," tabs="," activeTab="," onClick=",` />
|
|
173
|
-
<div style="display:`,`">
|
|
174
|
-
<label for="toastuiImageUrlInput">`,`</label>
|
|
175
|
-
<input
|
|
176
|
-
id="toastuiImageUrlInput"
|
|
177
|
-
type="text"
|
|
178
|
-
ref=`,`
|
|
179
|
-
/>
|
|
180
|
-
</div>
|
|
181
|
-
<div style="display:`,`;position: relative;">
|
|
182
|
-
<label for="toastuiImageFileInput">`,`</label>
|
|
183
|
-
<span
|
|
184
|
-
class="`,"",`"
|
|
185
|
-
onClick=`,`
|
|
186
|
-
onSelectstart=`,`
|
|
187
|
-
>
|
|
188
|
-
`,`
|
|
189
|
-
</span>
|
|
190
|
-
<button
|
|
191
|
-
type="button"
|
|
192
|
-
class="`,`"
|
|
193
|
-
onClick=`,`
|
|
194
|
-
>
|
|
195
|
-
`,`
|
|
196
|
-
</button>
|
|
197
|
-
<input
|
|
198
|
-
id="toastuiImageFileInput"
|
|
199
|
-
type="file"
|
|
200
|
-
accept="image/*"
|
|
201
|
-
onChange=`,`
|
|
202
|
-
ref=`,`
|
|
203
|
-
/>
|
|
204
|
-
</div>
|
|
205
|
-
<label for="toastuiAltTextInput">`,`</label>
|
|
206
|
-
<input
|
|
207
|
-
id="toastuiAltTextInput"
|
|
208
|
-
type="text"
|
|
209
|
-
ref=`,`
|
|
210
|
-
/>
|
|
211
|
-
<div class="`,`">
|
|
212
|
-
<button type="button" class="`,'" onClick=',`>
|
|
213
|
-
`,`
|
|
214
|
-
</button>
|
|
215
|
-
<button type="button" class="`,'" onClick=',`>
|
|
216
|
-
`,`
|
|
217
|
-
</button>
|
|
218
|
-
</div>
|
|
219
|
-
</div>
|
|
220
|
-
`],[`
|
|
221
|
-
<div aria-label="`,`">
|
|
222
|
-
<`," tabs="," activeTab="," onClick=",` />
|
|
223
|
-
<div style="display:`,`">
|
|
224
|
-
<label for="toastuiImageUrlInput">`,`</label>
|
|
225
|
-
<input
|
|
226
|
-
id="toastuiImageUrlInput"
|
|
227
|
-
type="text"
|
|
228
|
-
ref=`,`
|
|
229
|
-
/>
|
|
230
|
-
</div>
|
|
231
|
-
<div style="display:`,`;position: relative;">
|
|
232
|
-
<label for="toastuiImageFileInput">`,`</label>
|
|
233
|
-
<span
|
|
234
|
-
class="`,"",`"
|
|
235
|
-
onClick=`,`
|
|
236
|
-
onSelectstart=`,`
|
|
237
|
-
>
|
|
238
|
-
`,`
|
|
239
|
-
</span>
|
|
240
|
-
<button
|
|
241
|
-
type="button"
|
|
242
|
-
class="`,`"
|
|
243
|
-
onClick=`,`
|
|
244
|
-
>
|
|
245
|
-
`,`
|
|
246
|
-
</button>
|
|
247
|
-
<input
|
|
248
|
-
id="toastuiImageFileInput"
|
|
249
|
-
type="file"
|
|
250
|
-
accept="image/*"
|
|
251
|
-
onChange=`,`
|
|
252
|
-
ref=`,`
|
|
253
|
-
/>
|
|
254
|
-
</div>
|
|
255
|
-
<label for="toastuiAltTextInput">`,`</label>
|
|
256
|
-
<input
|
|
257
|
-
id="toastuiAltTextInput"
|
|
258
|
-
type="text"
|
|
259
|
-
ref=`,`
|
|
260
|
-
/>
|
|
261
|
-
<div class="`,`">
|
|
262
|
-
<button type="button" class="`,'" onClick=',`>
|
|
263
|
-
`,`
|
|
264
|
-
</button>
|
|
265
|
-
<button type="button" class="`,'" onClick=',`>
|
|
266
|
-
`,`
|
|
267
|
-
</button>
|
|
268
|
-
</div>
|
|
269
|
-
</div>
|
|
270
|
-
`])),pt.get("Insert image"),y0,this.tabs,i,this.toggleTab,i==="url"?"block":"none",pt.get("Image URL"),function(s){return t.refs.url=s},i==="file"?"block":"none",pt.get("Select image file"),Je("file-name"),a?" has-file":o,this.showFileSelectBox,this.preventSelectStart,a?a.name:pt.get("No file"),Je("file-select-button"),this.showFileSelectBox,pt.get("Choose a file"),this.changeFile,function(s){return t.refs.file=s},pt.get("Description"),function(s){return t.refs.altText=s},Je("button-container"),Je("close-button"),this.props.hidePopup,pt.get("Cancel"),Je("ok-button"),this.execCommand,pt.get("OK"))},e})(jr),iy,k8e=(function(r){Ge(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.execCommand=function(){var n=t.refs.url,i=t.refs.text;if(Gn(n,"wrong"),Gn(i,"wrong"),n.value.length<1){li(n,"wrong");return}var a=Yn(t.props.initialValues.linkUrl);if(a&&i.value.length<1){li(i,"wrong");return}t.props.execCommand("addLink",{linkUrl:n.value,linkText:i.value})},t}return e.prototype.initialize=function(){var t=this.props.initialValues,n=t.linkUrl,i=t.linkText,a=this.refs.url,o=this.refs.text;Gn(a,"wrong"),Gn(o,"wrong","disabled"),o.removeAttribute("disabled"),n&&(li(o,"disabled"),o.setAttribute("disabled","disabled")),a.value=n||"",o.value=i||""},e.prototype.mounted=function(){this.initialize()},e.prototype.updated=function(t){!t.show&&this.props.show&&this.initialize()},e.prototype.render=function(){var t=this;return Lt(ay||(ay=Dt([`
|
|
271
|
-
<div aria-label="`,`">
|
|
272
|
-
<label for="toastuiLinkUrlInput">`,`</label>
|
|
273
|
-
<input
|
|
274
|
-
id="toastuiLinkUrlInput"
|
|
275
|
-
type="text"
|
|
276
|
-
ref=`,`
|
|
277
|
-
/>
|
|
278
|
-
<label for="toastuiLinkTextInput">`,`</label>
|
|
279
|
-
<input
|
|
280
|
-
id="toastuiLinkTextInput"
|
|
281
|
-
type="text"
|
|
282
|
-
ref=`,`
|
|
283
|
-
/>
|
|
284
|
-
<div class="`,`">
|
|
285
|
-
<button type="button" class="`,'" onClick=',`>
|
|
286
|
-
`,`
|
|
287
|
-
</button>
|
|
288
|
-
<button type="button" class="`,'" onClick=',`>
|
|
289
|
-
`,`
|
|
290
|
-
</button>
|
|
291
|
-
</div>
|
|
292
|
-
</div>
|
|
293
|
-
`],[`
|
|
294
|
-
<div aria-label="`,`">
|
|
295
|
-
<label for="toastuiLinkUrlInput">`,`</label>
|
|
296
|
-
<input
|
|
297
|
-
id="toastuiLinkUrlInput"
|
|
298
|
-
type="text"
|
|
299
|
-
ref=`,`
|
|
300
|
-
/>
|
|
301
|
-
<label for="toastuiLinkTextInput">`,`</label>
|
|
302
|
-
<input
|
|
303
|
-
id="toastuiLinkTextInput"
|
|
304
|
-
type="text"
|
|
305
|
-
ref=`,`
|
|
306
|
-
/>
|
|
307
|
-
<div class="`,`">
|
|
308
|
-
<button type="button" class="`,'" onClick=',`>
|
|
309
|
-
`,`
|
|
310
|
-
</button>
|
|
311
|
-
<button type="button" class="`,'" onClick=',`>
|
|
312
|
-
`,`
|
|
313
|
-
</button>
|
|
314
|
-
</div>
|
|
315
|
-
</div>
|
|
316
|
-
`])),pt.get("Insert link"),pt.get("URL"),function(n){return t.refs.url=n},pt.get("Link text"),function(n){return t.refs.text=n},Je("button-container"),Je("close-button"),this.props.hidePopup,pt.get("Cancel"),Je("ok-button"),this.execCommand,pt.get("OK"))},e})(jr),ay,oy=20,sy=20,ly=5,uy=14,cy=5,fy=9,w8e=1,C8e=1,dy=1,T8e=(function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;return n.extendSelectionRange=function(i){var a=i.pageX,o=i.pageY,s=a-n.offsetRect.left,l=o-n.offsetRect.top,f=n.getSelectionRangeByOffset(s,l);n.setState(we({},f))},n.execCommand=function(){n.props.execCommand("addTable",{rowCount:n.state.rowIdx+1,columnCount:n.state.colIdx+1})},n.state={rowIdx:-1,colIdx:-1},n}return e.prototype.getDescription=function(){return this.state.colIdx===-1?"":this.state.colIdx+1+" x "+(this.state.rowIdx+1)},e.prototype.getBoundByRange=function(t,n){return{width:(t+1)*oy,height:(n+1)*sy}},e.prototype.getRangeByOffset=function(t,n){return{colIdx:Math.floor(t/oy),rowIdx:Math.floor(n/sy)}},e.prototype.getTableRange=function(){var t=this.state,n=t.colIdx,i=t.rowIdx,a=Math.max(n,cy),o=Math.max(i,ly);return n>=cy&&a<fy&&(a+=1),i>=ly&&o<uy&&(o+=1),{colIdx:a+1,rowIdx:o+1}},e.prototype.getSelectionAreaBound=function(){var t=this.getBoundByRange(this.state.colIdx,this.state.rowIdx),n=t.width,i=t.height;return!n&&!i?{display:"none"}:{width:n-dy,height:i-dy,display:"block"}},e.prototype.getSelectionRangeByOffset=function(t,n){var i=this.getRangeByOffset(t,n);return i.rowIdx=Math.min(Math.max(i.rowIdx,w8e),uy),i.colIdx=Math.min(Math.max(i.colIdx,C8e),fy),i},e.prototype.updated=function(){if(!this.props.show)this.setState({colIdx:-1,rowIdx:-1});else if(this.state.colIdx===-1&&this.state.rowIdx===-1){var t=this.refs.tableEl.getBoundingClientRect(),n=t.left,i=t.top;this.offsetRect={left:window.pageXOffset+n,top:window.pageYOffset+i}}},e.prototype.createTableArea=function(t){for(var n=t.colIdx,i=t.rowIdx,a=[],o=0;o<i;o+=1){for(var s=[],l=0;l<n;l+=1){var f=""+Je("table-cell")+(o>0?"":" header");s.push(Lt(hy||(hy=Dt(['<div class="','"></div>'],['<div class="','"></div>'])),f))}a.push(Lt(py||(py=Dt(['<div class="','">',"</div>"],['<div class="','">',"</div>"])),Je("table-row"),s))}return Lt(vy||(vy=Dt(['<div class="','">',"</div>"],['<div class="','">',"</div>"])),Je("table"),a)},e.prototype.render=function(){var t=this,n=this.getTableRange(),i=this.getSelectionAreaBound();return Lt(my||(my=Dt([`
|
|
317
|
-
<div aria-label="`,`">
|
|
318
|
-
<div
|
|
319
|
-
class="`,`"
|
|
320
|
-
ref=`,`
|
|
321
|
-
onMousemove=`,`
|
|
322
|
-
onClick=`,`
|
|
323
|
-
>
|
|
324
|
-
`,`
|
|
325
|
-
<div class="`,'" style=',`></div>
|
|
326
|
-
</div>
|
|
327
|
-
<p class="`,'">',`</p>
|
|
328
|
-
</div>
|
|
329
|
-
`],[`
|
|
330
|
-
<div aria-label="`,`">
|
|
331
|
-
<div
|
|
332
|
-
class="`,`"
|
|
333
|
-
ref=`,`
|
|
334
|
-
onMousemove=`,`
|
|
335
|
-
onClick=`,`
|
|
336
|
-
>
|
|
337
|
-
`,`
|
|
338
|
-
<div class="`,'" style=',`></div>
|
|
339
|
-
</div>
|
|
340
|
-
<p class="`,'">',`</p>
|
|
341
|
-
</div>
|
|
342
|
-
`])),pt.get("Insert table"),Je("table-selection"),function(a){return t.refs.tableEl=a},this.extendSelectionRange,this.execCommand,this.createTableArea(n),Je("table-selection-layer"),i,Je("table-description"),this.getDescription())},e})(jr),hy,py,vy,my,S8e=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.mounted=function(){this.refs.el.appendChild(this.props.body)},e.prototype.updated=function(t){this.refs.el.replaceChild(this.props.body,t.body)},e.prototype.render=function(){var t=this;return Lt(gy||(gy=Dt(["<div ref=","></div>"],["<div ref=","></div>"])),function(n){return t.refs.el=n})},e})(jr),gy;function nh(r){return qi(r)?E8e(r):r}function x8e(){var r=document.createElement("label"),e=document.createElement("input"),t=document.createElement("span");r.className="scroll-sync active",e.type="checkbox",e.checked=!0,t.className="switch";var n=function(i){return e.addEventListener("change",function(a){var o=a.target.checked;o?li(r,"active"):Gn(r,"active"),i("toggleScrollSync",{active:o})})};return r.appendChild(e),r.appendChild(t),{name:"scrollSync",el:r,onMounted:n}}function E8e(r){var e;switch(r){case"heading":e={name:"heading",className:"heading",tooltip:pt.get("Headings"),state:"heading"};break;case"bold":e={name:"bold",className:"bold",command:"bold",tooltip:pt.get("Bold"),state:"strong"};break;case"italic":e={name:"italic",className:"italic",command:"italic",tooltip:pt.get("Italic"),state:"emph"};break;case"strike":e={name:"strike",className:"strike",command:"strike",tooltip:pt.get("Strike"),state:"strike"};break;case"hr":e={name:"hr",className:"hrline",command:"hr",tooltip:pt.get("Line"),state:"thematicBreak"};break;case"quote":e={name:"quote",className:"quote",command:"blockQuote",tooltip:pt.get("Blockquote"),state:"blockQuote"};break;case"ul":e={name:"ul",className:"bullet-list",command:"bulletList",tooltip:pt.get("Unordered list"),state:"bulletList"};break;case"ol":e={name:"ol",className:"ordered-list",command:"orderedList",tooltip:pt.get("Ordered list"),state:"orderedList"};break;case"task":e={name:"task",className:"task-list",command:"taskList",tooltip:pt.get("Task"),state:"taskList"};break;case"table":e={name:"table",className:"table",tooltip:pt.get("Insert table"),state:"table"};break;case"image":e={name:"image",className:"image",tooltip:pt.get("Insert image")};break;case"link":e={name:"link",className:"link",tooltip:pt.get("Insert link")};break;case"code":e={name:"code",className:"code",command:"code",tooltip:pt.get("Code"),state:"code"};break;case"codeblock":e={name:"codeblock",className:"codeblock",command:"codeBlock",tooltip:pt.get("Insert CodeBlock"),state:"codeBlock"};break;case"indent":e={name:"indent",className:"indent",command:"indent",tooltip:pt.get("Indent"),state:"indent"};break;case"outdent":e={name:"outdent",className:"outdent",command:"outdent",tooltip:pt.get("Outdent"),state:"outdent"};break;case"scrollSync":e=x8e();break;case"more":e={name:"more",className:"more",tooltip:pt.get("More")};break}return e.name!=="scrollSync"&&(e.className+=" "+Je("toolbar-icons")),e}function Zh(r,e){var t=e.el,n=e.pos,i=e.popup,a=e.initialValues;switch(r){case"heading":return{render:function(o){return Lt(yy||(yy=Dt(["<"," ..."," />"],["<"," ..."," />"])),g8e,o)},className:Je("popup-add-heading"),fromEl:t,pos:n};case"link":return{render:function(o){return Lt(by||(by=Dt(["<"," ..."," />"],["<"," ..."," />"])),k8e,o)},className:Je("popup-add-link"),fromEl:t,pos:n,initialValues:a};case"image":return{render:function(o){return Lt(ky||(ky=Dt(["<"," ..."," />"],["<"," ..."," />"])),b8e,o)},className:Je("popup-add-image"),fromEl:t,pos:n};case"table":return{render:function(o){return Lt(wy||(wy=Dt(["<"," ..."," />"],["<"," ..."," />"])),T8e,o)},className:Je("popup-add-table"),fromEl:t,pos:n};case"customPopupBody":return i?we({render:function(o){return Lt(Cy||(Cy=Dt(["<"," ..."," body="," />"],["<"," ..."," body="," />"])),S8e,o,i.body)},fromEl:t,pos:n},i):null;default:return null}}function Du(r){r.hidden=r.length===r.filter(function(e){return e.hidden}).length}function M8e(r,e){var t=function(n){return n.hidden=n.name==="scrollSync"&&e,n};return r.reduce(function(n,i){n.push(i.map(function(o){return t(nh(o))}));var a=n[(n.length||1)-1];return a&&Du(a),n},[])}function A8e(r,e){r.forEach(function(t){t.forEach(function(n){return n.hidden=n.name==="scrollSync"&&e}),Du(t)})}var yy,by,ky,wy,Cy,O8e=20,N8e=(function(r){Ge(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handleMousedown=function(n){!ui(n.target,"."+Je("popup"))&&!ui(n.target,t.props.info.fromEl)&&t.props.hidePopup()},t}return e.prototype.mounted=function(){document.addEventListener("mousedown",this.handleMousedown),this.props.eventEmitter.listen("closePopup",this.props.hidePopup)},e.prototype.beforeDestroy=function(){document.removeEventListener("mousedown",this.handleMousedown)},e.prototype.updated=function(t){var n=this.props,i=n.show,a=n.info;if(i&&a.pos&&t.show!==i){var o=we({},a.pos),s=this.refs.el.offsetWidth,l=ui(this.refs.el,"."+Je("toolbar")),f=l.offsetWidth;o.left+s>=f&&(o.left=f-s-O8e),xh(this.state.popupPos,o)||this.setState({popupPos:o})}},e.prototype.render=function(){var t=this,n=this.props,i=n.info,a=n.show,o=n.hidePopup,s=n.eventEmitter,l=n.execCommand,f=i||{},p=f.className,b=p===void 0?"":p,T=f.style,x=f.render,E=f.initialValues,P=E===void 0?{}:E,F=we(we({display:a?"block":"none"},T),this.state.popupPos);return Lt(Ty||(Ty=Dt([`
|
|
343
|
-
<div
|
|
344
|
-
class="`," ",`"
|
|
345
|
-
style=`,`
|
|
346
|
-
ref=`,`
|
|
347
|
-
aria-role="dialog"
|
|
348
|
-
>
|
|
349
|
-
<div class="`,`">
|
|
350
|
-
`,`
|
|
351
|
-
</div>
|
|
352
|
-
</div>
|
|
353
|
-
`],[`
|
|
354
|
-
<div
|
|
355
|
-
class="`," ",`"
|
|
356
|
-
style=`,`
|
|
357
|
-
ref=`,`
|
|
358
|
-
aria-role="dialog"
|
|
359
|
-
>
|
|
360
|
-
<div class="`,`">
|
|
361
|
-
`,`
|
|
362
|
-
</div>
|
|
363
|
-
</div>
|
|
364
|
-
`])),Je("popup"),b,F,function(z){return t.refs.el=z},Je("popup-body"),x&&x({eventEmitter:s,show:a,hidePopup:o,execCommand:l,initialValues:P}))},e})(jr),Ty,Sy=6;function Qh(r){return(function(e){Ge(t,e);function t(n){var i=e.call(this,n)||this;return i.showTooltip=function(a){var o=i.props.item.tooltip;if(!i.props.disabled&&o){var s=i.getBound(a),l=s.left+Sy+"px",f=s.top+Sy+"px";di(i.props.tooltipRef.current,{display:"block",left:l,top:f}),i.props.tooltipRef.current.querySelector(".text").textContent=o}},i.hideTooltip=function(){di(i.props.tooltipRef.current,"display","none")},i.state={active:!1,disabled:n.disabled},i.addEvent(),i}return t.prototype.addEvent=function(){var n=this,i=this.props,a=i.item,o=i.eventEmitter;a.state&&o.listen("changeToolbarState",function(s){var l,f=s.toolbarState,p=(l=f[a.state])!==null&&l!==void 0?l:{},b=p.active,T=p.disabled;n.setState({active:!!b,disabled:T??n.props.disabled})})},t.prototype.getBound=function(n){var i=qk(n,ui(n,"."+Je("toolbar"))),a=i.offsetLeft,o=i.offsetTop;return{left:a,top:n.offsetHeight+o}},t.prototype.render=function(){return Lt(xy||(xy=Dt([`
|
|
365
|
-
<`,`
|
|
366
|
-
...`,`
|
|
367
|
-
active=`,`
|
|
368
|
-
showTooltip=`,`
|
|
369
|
-
hideTooltip=`,`
|
|
370
|
-
getBound=`,`
|
|
371
|
-
disabled=`,`
|
|
372
|
-
/>
|
|
373
|
-
`],[`
|
|
374
|
-
<`,`
|
|
375
|
-
...`,`
|
|
376
|
-
active=`,`
|
|
377
|
-
showTooltip=`,`
|
|
378
|
-
hideTooltip=`,`
|
|
379
|
-
getBound=`,`
|
|
380
|
-
disabled=`,`
|
|
381
|
-
/>
|
|
382
|
-
`])),r,this.props,this.state.active,this.showTooltip,this.hideTooltip,this.getBound,this.state.disabled||this.props.disabled)},t})(jr)}var xy,D8e=80,L8e=(function(r){Ge(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.showTooltip=function(){t.props.showTooltip(t.refs.el)},t.execCommand=function(){var n=t.props,i=n.item,a=n.execCommand,o=n.setPopupInfo,s=n.getBound,l=n.eventEmitter,f=i.command,p=i.name,b=i.popup;if(f)a(f);else{var T=b?"customPopupBody":p,x=l.emit("query","getPopupInitialValues",{popupName:T})[0],E=Zh(T,{el:t.refs.el,pos:s(t.refs.el),popup:b,initialValues:x});E&&o(E)}},t}return e.prototype.mounted=function(){this.setItemWidth()},e.prototype.updated=function(t){t.item.name!==this.props.item.name&&this.setItemWidth()},e.prototype.setItemWidth=function(){var t=this.props,n=t.setItemWidth,i=t.item;n&&n(i.name,Ih(this.refs.el)+(i.hidden?D8e:0))},e.prototype.render=function(){var t=this,n=this.props,i=n.hideTooltip,a=n.disabled,o=n.item,s=n.active,l=we({display:o.hidden?"none":null},o.style),f=""+(o.className||"")+(s?" active":"");return Lt(Ey||(Ey=Dt([`
|
|
383
|
-
<button
|
|
384
|
-
ref=`,`
|
|
385
|
-
type="button"
|
|
386
|
-
style=`,`
|
|
387
|
-
class=`,`
|
|
388
|
-
onClick=`,`
|
|
389
|
-
onMouseover=`,`
|
|
390
|
-
onMouseout=`,`
|
|
391
|
-
disabled=`,`
|
|
392
|
-
aria-label=`,`
|
|
393
|
-
>
|
|
394
|
-
`,`
|
|
395
|
-
</button>
|
|
396
|
-
`],[`
|
|
397
|
-
<button
|
|
398
|
-
ref=`,`
|
|
399
|
-
type="button"
|
|
400
|
-
style=`,`
|
|
401
|
-
class=`,`
|
|
402
|
-
onClick=`,`
|
|
403
|
-
onMouseover=`,`
|
|
404
|
-
onMouseout=`,`
|
|
405
|
-
disabled=`,`
|
|
406
|
-
aria-label=`,`
|
|
407
|
-
>
|
|
408
|
-
`,`
|
|
409
|
-
</button>
|
|
410
|
-
`])),function(p){return t.refs.el=p},l,f,this.execCommand,this.showTooltip,i,!!a,o.text||o.tooltip||"",o.text||"")},e})(jr),R8e=Qh(L8e),Ey,I8e=(function(r){Ge(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.showTooltip=function(){t.props.showTooltip(t.refs.el)},t.showPopup=function(){var n=Zh("customPopupBody",{el:t.refs.el,pos:t.props.getBound(t.refs.el),popup:t.props.item.popup});n&&t.props.setPopupInfo(n)},t}return e.prototype.mounted=function(){var t=this.props,n=t.setItemWidth,i=t.item;this.refs.el.appendChild(i.el),n&&n(i.name,Ih(this.refs.el)),i.onMounted&&i.onMounted(this.props.execCommand)},e.prototype.updated=function(t){var n,i=this.props,a=i.item,o=i.active,s=i.disabled;(t.active!==o||t.disabled!==s)&&((n=a.onUpdated)===null||n===void 0||n.call(a,{active:o,disabled:s}))},e.prototype.render=function(){var t=this,n=this.props,i=n.disabled,a=n.item,o={display:a.hidden?"none":"inline-block"},s=function(l){return i?null:l};return Lt(My||(My=Dt([`
|
|
411
|
-
<div
|
|
412
|
-
ref=`,`
|
|
413
|
-
style=`,`
|
|
414
|
-
class=`,`
|
|
415
|
-
onClick=`,`
|
|
416
|
-
onMouseover=`,`
|
|
417
|
-
onMouseout=`,`
|
|
418
|
-
></div>
|
|
419
|
-
`],[`
|
|
420
|
-
<div
|
|
421
|
-
ref=`,`
|
|
422
|
-
style=`,`
|
|
423
|
-
class=`,`
|
|
424
|
-
onClick=`,`
|
|
425
|
-
onMouseover=`,`
|
|
426
|
-
onMouseout=`,`
|
|
427
|
-
></div>
|
|
428
|
-
`])),function(l){return t.refs.el=l},o,Je("toolbar-item-wrapper"),s(this.showPopup),s(this.showTooltip),s(this.props.hideTooltip))},e})(jr),P8e=Qh(I8e),My,b0=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(){var t=this,n=this.props,i=n.group,a=n.hiddenDivider,o=i.hidden?{display:"none"}:null,s=a?{display:"none"}:null;return Lt(Oy||(Oy=Dt([`
|
|
429
|
-
<div class="`,'" style=',`>
|
|
430
|
-
`,`
|
|
431
|
-
<div class="`,'" style=',`></div>
|
|
432
|
-
</div>
|
|
433
|
-
`],[`
|
|
434
|
-
<div class="`,'" style=',`>
|
|
435
|
-
`,`
|
|
436
|
-
<div class="`,'" style=',`></div>
|
|
437
|
-
</div>
|
|
438
|
-
`])),Je("toolbar-group"),o,i.map(function(l){var f=l.el?P8e:R8e;return Lt(Ay||(Ay=Dt(["<"," key="," ..."," item="," />"],["<"," key="," ..."," item="," />"])),f,l.name,t.props,l)}),Je("toolbar-divider"),s)},e})(jr),Ay,Oy,B8e=4,F8e=(function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;return n.handleClickDocument=function(i){var a=i.target;!ui(a,"."+Je("dropdown-toolbar"))&&!ui(a,".more")&&n.setState({showDropdown:!1,dropdownPos:null})},n.showTooltip=function(){n.props.showTooltip(n.refs.el)},n.state={showDropdown:!1,dropdownPos:null},n}return e.prototype.getBound=function(){var t=this.props.getBound(this.refs.el);return t.top+=B8e,we(we({},t),{left:null,right:10})},e.prototype.mounted=function(){document.addEventListener("click",this.handleClickDocument)},e.prototype.updated=function(){this.state.showDropdown&&!this.state.dropdownPos&&this.setState({dropdownPos:this.getBound()})},e.prototype.beforeDestroy=function(){document.removeEventListener("click",this.handleClickDocument)},e.prototype.render=function(){var t=this,n=this.state,i=n.showDropdown,a=n.dropdownPos,o=this.props,s=o.disabled,l=o.item,f=o.items,p=o.hideTooltip,b=f.filter(function(E){return!E.hidden}),T=b.length?null:{display:"none"},x=i?null:{display:"none"};return Lt(Dy||(Dy=Dt([`
|
|
439
|
-
<div class="`,'" style=',`>
|
|
440
|
-
<button
|
|
441
|
-
ref=`,`
|
|
442
|
-
type="button"
|
|
443
|
-
class=`,`
|
|
444
|
-
onClick=`,`
|
|
445
|
-
onMouseover=`,`
|
|
446
|
-
onMouseout=`,`
|
|
447
|
-
disabled=`,`
|
|
448
|
-
></button>
|
|
449
|
-
<div
|
|
450
|
-
class="`,`"
|
|
451
|
-
style=`,`
|
|
452
|
-
ref=`,`
|
|
453
|
-
>
|
|
454
|
-
`,`
|
|
455
|
-
</div>
|
|
456
|
-
</div>
|
|
457
|
-
`],[`
|
|
458
|
-
<div class="`,'" style=',`>
|
|
459
|
-
<button
|
|
460
|
-
ref=`,`
|
|
461
|
-
type="button"
|
|
462
|
-
class=`,`
|
|
463
|
-
onClick=`,`
|
|
464
|
-
onMouseover=`,`
|
|
465
|
-
onMouseout=`,`
|
|
466
|
-
disabled=`,`
|
|
467
|
-
></button>
|
|
468
|
-
<div
|
|
469
|
-
class="`,`"
|
|
470
|
-
style=`,`
|
|
471
|
-
ref=`,`
|
|
472
|
-
>
|
|
473
|
-
`,`
|
|
474
|
-
</div>
|
|
475
|
-
</div>
|
|
476
|
-
`])),Je("toolbar-group"),T,function(E){return t.refs.el=E},l.className,function(){return t.setState({showDropdown:!0})},this.showTooltip,p,s,Je("dropdown-toolbar"),we(we({},x),a),function(E){return t.refs.dropdownEl=E},b.length?b.map(function(E,P){var F;return Lt(Ny||(Ny=Dt([`
|
|
477
|
-
<`,`
|
|
478
|
-
group=`,`
|
|
479
|
-
hiddenDivider=`,`
|
|
480
|
-
...`,`
|
|
481
|
-
/>
|
|
482
|
-
`],[`
|
|
483
|
-
<`,`
|
|
484
|
-
group=`,`
|
|
485
|
-
hiddenDivider=`,`
|
|
486
|
-
...`,`
|
|
487
|
-
/>
|
|
488
|
-
`])),b0,E,P===b.length-1||((F=b[P+1])===null||F===void 0?void 0:F.hidden),t.props)}):null)},e})(jr),q8e=Qh(F8e),Ny,Dy,H8e=50,_8e=(function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;return n.toggleTab=function(i,a){var o=n.props.eventEmitter;if(n.state.activeTab!==a){var s=a==="write"?"changePreviewTabWrite":"changePreviewTabPreview";o.emit(s),n.setState({activeTab:a})}},n.setItemWidth=function(i,a){n.itemWidthMap[i]=a},n.setPopupInfo=function(i){n.setState({showPopup:!0,popupInfo:i})},n.openPopup=function(i,a){a===void 0&&(a={});var o=n.refs.el.querySelector("."+Je("toolbar-group")+" ."+i);if(o){var s=qk(o,ui(o,"."+Je("toolbar"))),l=s.offsetLeft,f=s.offsetTop,p=Zh(i,{el:o,pos:{left:l,top:o.offsetHeight+f},initialValues:a});p&&n.setPopupInfo(p)}},n.hidePopup=function(){n.state.showPopup&&n.setState({showPopup:!1})},n.execCommand=function(i,a){var o=n.props.eventEmitter;o.emit("command",i,a),n.hidePopup()},n.tabs=[{name:"write",text:"Write"},{name:"preview",text:"Preview"}],n.itemWidthMap={},n.initialItems=M8e(t.toolbarItems||[],n.hiddenScrollSync()),n.state={items:n.initialItems,dropdownItems:[],showPopup:!1,popupInfo:{},activeTab:"write"},n.tooltipRef={current:null},n.resizeObserver=new m8e(function(){return n.handleResize()}),n.addEvent(),n}return e.prototype.insertToolbarItem=function(t,n){var i=t.groupIndex,a=t.itemIndex,o=this.initialItems[i];n=nh(n),o?o.splice(a,0,n):this.initialItems.push([n]),this.setState(this.classifyToolbarItems())},e.prototype.removeToolbarItem=function(t){var n=this;zo(this.initialItems,function(i){var a=!1;return zo(i,function(o,s){return o.name===t?(a=!0,i.splice(s,1),n.setState(n.classifyToolbarItems()),!1):!0}),!a})},e.prototype.addEvent=function(){var t=this,n=this.props.eventEmitter;this.handleResize=Z4e(function(){t.setState({items:t.initialItems,dropdownItems:[]}),t.setState(t.classifyToolbarItems())},200),n.listen("openPopup",this.openPopup)},e.prototype.appendTooltipToRoot=function(){var t='<div class="'+Je("tooltip")+`" style="display:none">
|
|
489
|
-
<div class="arrow"></div>
|
|
490
|
-
<span class="text"></span>
|
|
491
|
-
</div>`;this.tooltipRef.current=Fk(t,this.refs.el)},e.prototype.hiddenScrollSync=function(){return this.props.editorType==="wysiwyg"||this.props.previewStyle==="tab"},e.prototype.movePrevItemToDropdownToolbar=function(t,n,i,a){var o=function(l){var f=l.pop();f&&a.push(f)};if(t>1)o(i);else{var s=Ur(n);s&&o(s)}},e.prototype.classifyToolbarItems=function(){var t=this,n=0,i=this.refs.el.clientWidth,a=this.refs.el.querySelector("."+Je("toolbar-divider")),o=a?Ih(a):0,s=[],l=[],f=!1;return this.initialItems.forEach(function(p,b){var T=[],x=[];p.forEach(function(E,P){E.hidden||(n+=t.itemWidthMap[E.name],n>i-H8e?(f||(t.movePrevItemToDropdownToolbar(P,s,T,x),f=!0),x.push(E)):T.push(E))}),T.length&&(Du(T),s.push(T)),x.length&&(Du(x),l.push(x)),b<t.state.items.length-1&&(n+=o)}),{items:s,dropdownItems:l}},e.prototype.mounted=function(){this.props.previewStyle==="tab"&&this.props.eventEmitter.emit("changePreviewTabWrite",!0),this.setState(this.classifyToolbarItems()),this.appendTooltipToRoot(),this.resizeObserver.observe(this.refs.el)},e.prototype.updated=function(t){var n=this.props,i=n.editorType,a=n.previewStyle,o=n.eventEmitter,s=a!==t.previewStyle,l=i!==t.editorType;if(s||l){A8e(this.initialItems,this.hiddenScrollSync());var f=this.classifyToolbarItems();(s||a==="tab"&&i==="markdown")&&(o.emit("changePreviewTabWrite"),f.activeTab="write"),this.setState(f)}},e.prototype.beforeDestroy=function(){window.removeEventListener("resize",this.handleResize),this.resizeObserver.disconnect(),Xa(this.tooltipRef.current)},e.prototype.render=function(){var t=this,n=this.props,i=n.previewStyle,a=n.eventEmitter,o=n.editorType,s=this.state,l=s.popupInfo,f=s.showPopup,p=s.activeTab,b=s.items,T=s.dropdownItems,x={eventEmitter:a,tooltipRef:this.tooltipRef,disabled:o==="markdown"&&i==="tab"&&p==="preview",execCommand:this.execCommand,setPopupInfo:this.setPopupInfo},E=i==="tab"?{borderTopLeftRadius:0}:null;return Lt(Ry||(Ry=Dt([`
|
|
492
|
-
<div class="`,`">
|
|
493
|
-
<div
|
|
494
|
-
class="`,`"
|
|
495
|
-
style="display: `,`"
|
|
496
|
-
>
|
|
497
|
-
<`," tabs="," activeTab="," onClick=",` />
|
|
498
|
-
</div>
|
|
499
|
-
<div
|
|
500
|
-
class="`,`"
|
|
501
|
-
ref=`,`
|
|
502
|
-
style=`,`
|
|
503
|
-
>
|
|
504
|
-
`,`
|
|
505
|
-
<`,`
|
|
506
|
-
item=`,`
|
|
507
|
-
items=`,`
|
|
508
|
-
...`,`
|
|
509
|
-
/>
|
|
510
|
-
</div>
|
|
511
|
-
<`,`
|
|
512
|
-
info=`,`
|
|
513
|
-
show=`,`
|
|
514
|
-
eventEmitter=`,`
|
|
515
|
-
hidePopup=`,`
|
|
516
|
-
execCommand=`,`
|
|
517
|
-
/>
|
|
518
|
-
</div>
|
|
519
|
-
`],[`
|
|
520
|
-
<div class="`,`">
|
|
521
|
-
<div
|
|
522
|
-
class="`,`"
|
|
523
|
-
style="display: `,`"
|
|
524
|
-
>
|
|
525
|
-
<`," tabs="," activeTab="," onClick=",` />
|
|
526
|
-
</div>
|
|
527
|
-
<div
|
|
528
|
-
class="`,`"
|
|
529
|
-
ref=`,`
|
|
530
|
-
style=`,`
|
|
531
|
-
>
|
|
532
|
-
`,`
|
|
533
|
-
<`,`
|
|
534
|
-
item=`,`
|
|
535
|
-
items=`,`
|
|
536
|
-
...`,`
|
|
537
|
-
/>
|
|
538
|
-
</div>
|
|
539
|
-
<`,`
|
|
540
|
-
info=`,`
|
|
541
|
-
show=`,`
|
|
542
|
-
eventEmitter=`,`
|
|
543
|
-
hidePopup=`,`
|
|
544
|
-
execCommand=`,`
|
|
545
|
-
/>
|
|
546
|
-
</div>
|
|
547
|
-
`])),Je("toolbar"),Je("md-tab-container"),o==="wysiwyg"||i==="vertical"?"none":"block",y0,this.tabs,p,this.toggleTab,Je("defaultUI-toolbar"),function(P){return t.refs.el=P},E,b.map(function(P,F){var z;return Lt(Ly||(Ly=Dt([`
|
|
548
|
-
<`,`
|
|
549
|
-
group=`,`
|
|
550
|
-
hiddenDivider=`,`
|
|
551
|
-
setItemWidth=`,`
|
|
552
|
-
...`,`
|
|
553
|
-
/>
|
|
554
|
-
`],[`
|
|
555
|
-
<`,`
|
|
556
|
-
group=`,`
|
|
557
|
-
hiddenDivider=`,`
|
|
558
|
-
setItemWidth=`,`
|
|
559
|
-
...`,`
|
|
560
|
-
/>
|
|
561
|
-
`])),b0,P,F===b.length-1||((z=b[F+1])===null||z===void 0?void 0:z.hidden),t.setItemWidth,x)}),q8e,nh("more"),T,x,N8e,l,f,a,this.hidePopup,this.execCommand)},e})(jr),Ly,Ry,z8e=(function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;return n.handleClickDocument=function(i){ui(i.target,"."+Je("context-menu"))||n.setState({pos:null})},n.state={pos:null,menuGroups:[]},n.addEvent(),n}return e.prototype.addEvent=function(){var t=this;this.props.eventEmitter.listen("contextmenu",function(n){var i=n.pos,a=n.menuGroups;t.setState({pos:i,menuGroups:a})})},e.prototype.mounted=function(){document.addEventListener("click",this.handleClickDocument)},e.prototype.beforeDestroy=function(){document.removeEventListener("click",this.handleClickDocument)},e.prototype.getMenuGroupElements=function(){var t=this,n=this.state,i=n.pos,a=n.menuGroups;return i?a.reduce(function(o,s){var l=[];return s.forEach(function(f){var p=f.label,b=f.className,T=b===void 0?!1:b,x=f.disabled,E=f.onClick,P=function(){x||(E(),t.setState({pos:null}))};l.push(Lt(Iy||(Iy=Dt([`
|
|
562
|
-
<li
|
|
563
|
-
onClick=`,`
|
|
564
|
-
class="menu-item`,`"
|
|
565
|
-
aria-role="menuitem"
|
|
566
|
-
>
|
|
567
|
-
<span class="`,'">',`</span>
|
|
568
|
-
</li>
|
|
569
|
-
`],[`
|
|
570
|
-
<li
|
|
571
|
-
onClick=`,`
|
|
572
|
-
class="menu-item`,`"
|
|
573
|
-
aria-role="menuitem"
|
|
574
|
-
>
|
|
575
|
-
<span class="`,'">',`</span>
|
|
576
|
-
</li>
|
|
577
|
-
`])),P,x?" disabled":"",T,p))}),o.push(Lt(Py||(Py=Dt([`<ul class="menu-group">
|
|
578
|
-
`,`
|
|
579
|
-
</ul>`],[`<ul class="menu-group">
|
|
580
|
-
`,`
|
|
581
|
-
</ul>`])),l)),o},[]):[]},e.prototype.render=function(){var t=we({display:this.state.pos?"block":"none"},this.state.pos);return Lt(By||(By=Dt(['<div class="','" style=',` aria-role="menu">
|
|
582
|
-
`,`
|
|
583
|
-
</div>`],['<div class="','" style=',` aria-role="menu">
|
|
584
|
-
`,`
|
|
585
|
-
</div>`])),Je("context-menu"),t,this.getMenuGroupElements())},e})(jr),Iy,Py,By,V8e=(function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;n.changeMode=function(o){o!==n.state.editorType&&n.setState({editorType:o})},n.changePreviewStyle=function(o){o!==n.state.previewStyle&&n.setState({previewStyle:o})},n.hide=function(){n.setState({hide:!0})},n.show=function(){n.setState({hide:!1})};var i=t.editorType,a=t.previewStyle;return n.state={editorType:i,previewStyle:a,hide:!1},n.addEvent(),n}return e.prototype.mounted=function(){var t=this.props.slots,n=t.wwEditor,i=t.mdEditor,a=t.mdPreview;this.refs.wwContainer.appendChild(n),this.refs.mdContainer.insertAdjacentElement("afterbegin",i),this.refs.mdContainer.appendChild(a)},e.prototype.insertToolbarItem=function(t,n){this.toolbar.insertToolbarItem(t,n)},e.prototype.removeToolbarItem=function(t){this.toolbar.removeToolbarItem(t)},e.prototype.render=function(){var t=this,n=this.props,i=n.eventEmitter,a=n.hideModeSwitch,o=n.toolbarItems,s=n.theme,l=this.state,f=l.hide,p=l.previewStyle,b=l.editorType,T=f?" hidden":"",x=Je(b==="markdown"?"md-mode":"ww-mode"),E=Je("md")+"-"+p+"-style",P=Je([s!=="light",s+" "]);return Lt(qy||(qy=Dt([`
|
|
586
|
-
<div
|
|
587
|
-
class="`,"","",`"
|
|
588
|
-
ref=`,`
|
|
589
|
-
>
|
|
590
|
-
<`,`
|
|
591
|
-
ref=`,`
|
|
592
|
-
eventEmitter=`,`
|
|
593
|
-
previewStyle=`,`
|
|
594
|
-
toolbarItems=`,`
|
|
595
|
-
editorType=`,`
|
|
596
|
-
/>
|
|
597
|
-
<div
|
|
598
|
-
class="`," ",`"
|
|
599
|
-
ref=`,`
|
|
600
|
-
>
|
|
601
|
-
<div class="`,`">
|
|
602
|
-
<div
|
|
603
|
-
class="`," ",`"
|
|
604
|
-
ref=`,`
|
|
605
|
-
>
|
|
606
|
-
<div class="`,`"></div>
|
|
607
|
-
</div>
|
|
608
|
-
<div
|
|
609
|
-
class="`,`"
|
|
610
|
-
ref=`,`
|
|
611
|
-
/>
|
|
612
|
-
</div>
|
|
613
|
-
</div>
|
|
614
|
-
`,`
|
|
615
|
-
<`," eventEmitter=",` />
|
|
616
|
-
</div>
|
|
617
|
-
`],[`
|
|
618
|
-
<div
|
|
619
|
-
class="`,"","",`"
|
|
620
|
-
ref=`,`
|
|
621
|
-
>
|
|
622
|
-
<`,`
|
|
623
|
-
ref=`,`
|
|
624
|
-
eventEmitter=`,`
|
|
625
|
-
previewStyle=`,`
|
|
626
|
-
toolbarItems=`,`
|
|
627
|
-
editorType=`,`
|
|
628
|
-
/>
|
|
629
|
-
<div
|
|
630
|
-
class="`," ",`"
|
|
631
|
-
ref=`,`
|
|
632
|
-
>
|
|
633
|
-
<div class="`,`">
|
|
634
|
-
<div
|
|
635
|
-
class="`," ",`"
|
|
636
|
-
ref=`,`
|
|
637
|
-
>
|
|
638
|
-
<div class="`,`"></div>
|
|
639
|
-
</div>
|
|
640
|
-
<div
|
|
641
|
-
class="`,`"
|
|
642
|
-
ref=`,`
|
|
643
|
-
/>
|
|
644
|
-
</div>
|
|
645
|
-
</div>
|
|
646
|
-
`,`
|
|
647
|
-
<`," eventEmitter=",` />
|
|
648
|
-
</div>
|
|
649
|
-
`])),P,Je("defaultUI"),T,function(F){return t.refs.el=F},_8e,function(F){return t.toolbar=F},i,p,o,b,Je("main"),x,function(F){return t.refs.editorSection=F},Je("main-container"),Je("md-container"),E,function(F){return t.refs.mdContainer=F},Je("md-splitter"),Je("ww-container"),function(F){return t.refs.wwContainer=F},!a&&Lt(Fy||(Fy=Dt(["<"," eventEmitter="," editorType="," />"],["<"," eventEmitter="," editorType="," />"])),G4e,i,b),z8e,i)},e.prototype.addEvent=function(){var t=this.props.eventEmitter;t.listen("hide",this.hide),t.listen("show",this.show),t.listen("changeMode",this.changeMode),t.listen("changePreviewStyle",this.changePreviewStyle)},e})(jr),Fy,qy,Zt=(function(r){Ge(e,r);function e(t){var n,i=r.call(this,t)||this,a,o=j4e(i.options.el,Lt(Hy||(Hy=Dt([`
|
|
650
|
-
<`,`
|
|
651
|
-
ref=`,`
|
|
652
|
-
eventEmitter=`,`
|
|
653
|
-
slots=`,`
|
|
654
|
-
hideModeSwitch=`,`
|
|
655
|
-
toolbarItems=`,`
|
|
656
|
-
previewStyle=`,`
|
|
657
|
-
editorType=`,`
|
|
658
|
-
theme=`,`
|
|
659
|
-
/>
|
|
660
|
-
`],[`
|
|
661
|
-
<`,`
|
|
662
|
-
ref=`,`
|
|
663
|
-
eventEmitter=`,`
|
|
664
|
-
slots=`,`
|
|
665
|
-
hideModeSwitch=`,`
|
|
666
|
-
toolbarItems=`,`
|
|
667
|
-
previewStyle=`,`
|
|
668
|
-
editorType=`,`
|
|
669
|
-
theme=`,`
|
|
670
|
-
/>
|
|
671
|
-
`])),V8e,function(s){return a=s},i.eventEmitter,i.getEditorElements(),i.options.hideModeSwitch,i.options.toolbarItems,i.options.previewStyle,i.options.initialEditType,i.options.theme));return i.setMinHeight(i.options.minHeight),i.setHeight(i.options.height),i.defaultUI={insertToolbarItem:a.insertToolbarItem.bind(a),removeToolbarItem:a.removeToolbarItem.bind(a),destroy:o},(n=i.pluginInfo.toolbarItems)===null||n===void 0||n.forEach(function(s){var l=s.groupIndex,f=s.itemIndex,p=s.item;i.defaultUI.insertToolbarItem({groupIndex:l,itemIndex:f},p)}),i.eventEmitter.emit("loadUI",i),i}return e.factory=function(t){return t.viewer?new s0(t):new e(t)},e.prototype.insertToolbarItem=function(t,n){this.defaultUI.insertToolbarItem(t,n)},e.prototype.removeToolbarItem=function(t){this.defaultUI.removeToolbarItem(t)},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.defaultUI.destroy()},e})(u0),Hy;u0.setLanguage(["en","en-US"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Write",Preview:"Preview",Headings:"Headings",Paragraph:"Paragraph",Bold:"Bold",Italic:"Italic",Strike:"Strike",Code:"Inline code",Line:"Line",Blockquote:"Blockquote","Unordered list":"Unordered list","Ordered list":"Ordered list",Task:"Task",Indent:"Indent",Outdent:"Outdent","Insert link":"Insert link","Insert CodeBlock":"Insert codeBlock","Insert table":"Insert table","Insert image":"Insert image",Heading:"Heading","Image URL":"Image URL","Select image file":"Select image file","Choose a file":"Choose a file","No file":"No file",Description:"Description",OK:"OK",More:"More",Cancel:"Cancel",File:"File",URL:"URL","Link text":"Link text","Add row to up":"Add row to up","Add row to down":"Add row to down","Add column to left":"Add column to left","Add column to right":"Add column to right","Remove row":"Remove row","Remove column":"Remove column","Align column to left":"Align column to left","Align column to center":"Align column to center","Align column to right":"Align column to right","Remove table":"Remove table","Would you like to paste as table?":"Would you like to paste as table?","Text color":"Text color","Auto scroll enabled":"Auto scroll enabled","Auto scroll disabled":"Auto scroll disabled","Choose language":"Choose language"});var hd={exports:{}},ln={},Wn={},Kr={},pd,_y;function U8e(){if(_y)return pd;_y=1;function r(e){this.content=e}return r.prototype={constructor:r,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 i=n&&n!=e?this.remove(n):this,a=i.find(e),o=i.content.slice();return a==-1?o.push(n||e,t):(o[a+1]=t,n&&(o[a]=n)),new r(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var i=this.remove(t),a=i.content.slice(),o=i.find(e);return a.splice(o==-1?a.length:o,0,t,n),new r(a)},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=r.from(e),e.size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=r.from(e),e.size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.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}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)},pd=r,pd}var zy;function Qu(){if(zy)return Kr;zy=1;function r(I,M){var g=typeof Symbol<"u"&&I[Symbol.iterator]||I["@@iterator"];if(!g){if(Array.isArray(I)||(g=e(I))||M){g&&(I=g);var w=0,N=function(){};return{s:N,n:function(){return w>=I.length?{done:!0}:{done:!1,value:I[w++]}},e:function(pe){throw pe},f:N}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
672
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var _=!0,j=!1,X;return{s:function(){g=g.call(I)},n:function(){var pe=g.next();return _=pe.done,pe},e:function(pe){j=!0,X=pe},f:function(){try{!_&&g.return!=null&&g.return()}finally{if(j)throw X}}}}function e(I,M){if(I){if(typeof I=="string")return t(I,M);var g=Object.prototype.toString.call(I).slice(8,-1);if(g==="Object"&&I.constructor&&(g=I.constructor.name),g==="Map"||g==="Set")return Array.from(I);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return t(I,M)}}function t(I,M){(M==null||M>I.length)&&(M=I.length);for(var g=0,w=new Array(M);g<M;g++)w[g]=I[g];return w}function n(){return typeof Reflect<"u"&&Reflect.get?n=Reflect.get.bind():n=function(M,g,w){var N=i(M,g);if(N){var _=Object.getOwnPropertyDescriptor(N,g);return _.get?_.get.call(arguments.length<3?M:w):_.value}},n.apply(this,arguments)}function i(I,M){for(;!Object.prototype.hasOwnProperty.call(I,M)&&(I=E(I),I!==null););return I}function a(I,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(M&&M.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),Object.defineProperty(I,"prototype",{writable:!1}),M&&x(I,M)}function o(I){var M=b();return function(){var w=E(I),N;if(M){var _=E(this).constructor;N=Reflect.construct(w,arguments,_)}else N=w.apply(this,arguments);return s(this,N)}}function s(I,M){if(M&&(P(M)==="object"||typeof M=="function"))return M;if(M!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l(I)}function l(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}function f(I){var M=typeof Map=="function"?new Map:void 0;return f=function(w){if(w===null||!T(w))return w;if(typeof w!="function")throw new TypeError("Super expression must either be null or a function");if(typeof M<"u"){if(M.has(w))return M.get(w);M.set(w,N)}function N(){return p(w,arguments,E(this).constructor)}return N.prototype=Object.create(w.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),x(N,w)},f(I)}function p(I,M,g){return b()?p=Reflect.construct.bind():p=function(N,_,j){var X=[null];X.push.apply(X,_);var ce=Function.bind.apply(N,X),pe=new ce;return j&&x(pe,j.prototype),pe},p.apply(null,arguments)}function b(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function T(I){try{return Function.toString.call(I).indexOf("[native code]")!==-1}catch{return typeof I=="function"}}function x(I,M){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,N){return w.__proto__=N,w},x(I,M)}function E(I){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(g){return g.__proto__||Object.getPrototypeOf(g)},E(I)}function P(I){"@babel/helpers - typeof";return P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},P(I)}function F(I,M){if(!(I instanceof M))throw new TypeError("Cannot call a class as a function")}function z(I,M){for(var g=0;g<M.length;g++){var w=M[g];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(I,ee(w.key),w)}}function Y(I,M,g){return M&&z(I.prototype,M),g&&z(I,g),Object.defineProperty(I,"prototype",{writable:!1}),I}function ee(I){var M=se(I,"string");return P(M)==="symbol"?M:String(M)}function se(I,M){if(P(I)!=="object"||I===null)return I;var g=I[Symbol.toPrimitive];if(g!==void 0){var w=g.call(I,M);if(P(w)!=="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(I)}var de=U8e();function oe(I,M,g){for(var w=0;;w++){if(w==I.childCount||w==M.childCount)return I.childCount==M.childCount?null:g;var N=I.child(w),_=M.child(w);if(N==_){g+=N.nodeSize;continue}if(!N.sameMarkup(_))return g;if(N.isText&&N.text!=_.text){for(var j=0;N.text[j]==_.text[j];j++)g++;return g}if(N.content.size||_.content.size){var X=oe(N.content,_.content,g+1);if(X!=null)return X}g+=N.nodeSize}}function le(I,M,g,w){for(var N=I.childCount,_=M.childCount;;){if(N==0||_==0)return N==_?null:{a:g,b:w};var j=I.child(--N),X=M.child(--_),ce=j.nodeSize;if(j==X){g-=ce,w-=ce;continue}if(!j.sameMarkup(X))return{a:g,b:w};if(j.isText&&j.text!=X.text){for(var pe=0,Ne=Math.min(j.text.length,X.text.length);pe<Ne&&j.text[j.text.length-pe-1]==X.text[X.text.length-pe-1];)pe++,g--,w--;return{a:g,b:w}}if(j.content.size||X.content.size){var Oe=le(j.content,X.content,g-1,w-1);if(Oe)return Oe}g-=ce,w-=ce}}var ge=(function(){function I(M,g){if(F(this,I),this.content=M,this.size=g||0,g==null)for(var w=0;w<M.length;w++)this.size+=M[w].nodeSize}return Y(I,[{key:"nodesBetween",value:function(g,w,N){for(var _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,j=arguments.length>4?arguments[4]:void 0,X=0,ce=0;ce<w;X++){var pe=this.content[X],Ne=ce+pe.nodeSize;if(Ne>g&&N(pe,_+ce,j||null,X)!==!1&&pe.content.size){var Oe=ce+1;pe.nodesBetween(Math.max(0,g-Oe),Math.min(pe.content.size,w-Oe),N,_+Oe)}ce=Ne}}},{key:"descendants",value:function(g){this.nodesBetween(0,this.size,g)}},{key:"textBetween",value:function(g,w,N,_){var j="",X=!0;return this.nodesBetween(g,w,function(ce,pe){var Ne=ce.isText?ce.text.slice(Math.max(g,pe)-pe,w-pe):ce.isLeaf?_?typeof _=="function"?_(ce):_:ce.type.spec.leafText?ce.type.spec.leafText(ce):"":"";ce.isBlock&&(ce.isLeaf&&Ne||ce.isTextblock)&&N&&(X?X=!1:j+=N),j+=Ne},0),j}},{key:"append",value:function(g){if(!g.size)return this;if(!this.size)return g;var w=this.lastChild,N=g.firstChild,_=this.content.slice(),j=0;for(w.isText&&w.sameMarkup(N)&&(_[_.length-1]=w.withText(w.text+N.text),j=1);j<g.content.length;j++)_.push(g.content[j]);return new I(_,this.size+g.size)}},{key:"cut",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.size;if(g==0&&w==this.size)return this;var N=[],_=0;if(w>g)for(var j=0,X=0;X<w;j++){var ce=this.content[j],pe=X+ce.nodeSize;pe>g&&((X<g||pe>w)&&(ce.isText?ce=ce.cut(Math.max(0,g-X),Math.min(ce.text.length,w-X)):ce=ce.cut(Math.max(0,g-X-1),Math.min(ce.content.size,w-X-1))),N.push(ce),_+=ce.nodeSize),X=pe}return new I(N,_)}},{key:"cutByIndex",value:function(g,w){return g==w?I.empty:g==0&&w==this.content.length?this:new I(this.content.slice(g,w))}},{key:"replaceChild",value:function(g,w){var N=this.content[g];if(N==w)return this;var _=this.content.slice(),j=this.size+w.nodeSize-N.nodeSize;return _[g]=w,new I(_,j)}},{key:"addToStart",value:function(g){return new I([g].concat(this.content),this.size+g.nodeSize)}},{key:"addToEnd",value:function(g){return new I(this.content.concat(g),this.size+g.nodeSize)}},{key:"eq",value:function(g){if(this.content.length!=g.content.length)return!1;for(var w=0;w<this.content.length;w++)if(!this.content[w].eq(g.content[w]))return!1;return!0}},{key:"firstChild",get:function(){return this.content.length?this.content[0]:null}},{key:"lastChild",get:function(){return this.content.length?this.content[this.content.length-1]:null}},{key:"childCount",get:function(){return this.content.length}},{key:"child",value:function(g){var w=this.content[g];if(!w)throw new RangeError("Index "+g+" out of range for "+this);return w}},{key:"maybeChild",value:function(g){return this.content[g]||null}},{key:"forEach",value:function(g){for(var w=0,N=0;w<this.content.length;w++){var _=this.content[w];g(_,N,w),N+=_.nodeSize}}},{key:"findDiffStart",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return oe(this,g,w)}},{key:"findDiffEnd",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.size,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.size;return le(this,g,w,N)}},{key:"findIndex",value:function(g){if(g==0)return Ie(0,g);if(g==this.size)return Ie(this.content.length,g);if(g>this.size||g<0)throw new RangeError("Position ".concat(g," outside of fragment (").concat(this,")"));for(var w=0,N=0;;w++){var _=this.child(w),j=N+_.nodeSize;if(j>=g)return j==g?Ie(w+1,j):Ie(w,N);N=j}}},{key:"toString",value:function(){return"<"+this.toStringInner()+">"}},{key:"toStringInner",value:function(){return this.content.join(", ")}},{key:"toJSON",value:function(){return this.content.length?this.content.map(function(g){return g.toJSON()}):null}}],[{key:"fromJSON",value:function(g,w){if(!w)return I.empty;if(!Array.isArray(w))throw new RangeError("Invalid input for Fragment.fromJSON");return new I(w.map(g.nodeFromJSON))}},{key:"fromArray",value:function(g){if(!g.length)return I.empty;for(var w,N=0,_=0;_<g.length;_++){var j=g[_];N+=j.nodeSize,_&&j.isText&&g[_-1].sameMarkup(j)?(w||(w=g.slice(0,_)),w[w.length-1]=j.withText(w[w.length-1].text+j.text)):w&&w.push(j)}return new I(w||g,N)}},{key:"from",value:function(g){if(!g)return I.empty;if(g instanceof I)return g;if(Array.isArray(g))return this.fromArray(g);if(g.attrs)return new I([g],g.nodeSize);throw new RangeError("Can not convert "+g+" to a Fragment"+(g.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}]),I})();ge.empty=new ge([],0);var xe={index:0,offset:0};function Ie(I,M){return xe.index=I,xe.offset=M,xe}function ot(I,M){if(I===M)return!0;if(!(I&&P(I)=="object")||!(M&&P(M)=="object"))return!1;var g=Array.isArray(I);if(Array.isArray(M)!=g)return!1;if(g){if(I.length!=M.length)return!1;for(var w=0;w<I.length;w++)if(!ot(I[w],M[w]))return!1}else{for(var N in I)if(!(N in M)||!ot(I[N],M[N]))return!1;for(var _ in M)if(!(_ in I))return!1}return!0}var Fe=(function(){function I(M,g){F(this,I),this.type=M,this.attrs=g}return Y(I,[{key:"addToSet",value:function(g){for(var w,N=!1,_=0;_<g.length;_++){var j=g[_];if(this.eq(j))return g;if(this.type.excludes(j.type))w||(w=g.slice(0,_));else{if(j.type.excludes(this.type))return g;!N&&j.type.rank>this.type.rank&&(w||(w=g.slice(0,_)),w.push(this),N=!0),w&&w.push(j)}}return w||(w=g.slice()),N||w.push(this),w}},{key:"removeFromSet",value:function(g){for(var w=0;w<g.length;w++)if(this.eq(g[w]))return g.slice(0,w).concat(g.slice(w+1));return g}},{key:"isInSet",value:function(g){for(var w=0;w<g.length;w++)if(this.eq(g[w]))return!0;return!1}},{key:"eq",value:function(g){return this==g||this.type==g.type&&ot(this.attrs,g.attrs)}},{key:"toJSON",value:function(){var g={type:this.type.name};for(var w in this.attrs){g.attrs=this.attrs;break}return g}}],[{key:"fromJSON",value:function(g,w){if(!w)throw new RangeError("Invalid input for Mark.fromJSON");var N=g.marks[w.type];if(!N)throw new RangeError("There is no mark type ".concat(w.type," in this schema"));var _=N.create(w.attrs);return N.checkAttrs(_.attrs),_}},{key:"sameSet",value:function(g,w){if(g==w)return!0;if(g.length!=w.length)return!1;for(var N=0;N<g.length;N++)if(!g[N].eq(w[N]))return!1;return!0}},{key:"setFrom",value:function(g){if(!g||Array.isArray(g)&&g.length==0)return I.none;if(g instanceof I)return[g];var w=g.slice();return w.sort(function(N,_){return N.type.rank-_.type.rank}),w}}]),I})();Fe.none=[];var bt=(function(I){a(g,I);var M=o(g);function g(){return F(this,g),M.apply(this,arguments)}return Y(g)})(f(Error)),ct=(function(){function I(M,g,w){F(this,I),this.content=M,this.openStart=g,this.openEnd=w}return Y(I,[{key:"size",get:function(){return this.content.size-this.openStart-this.openEnd}},{key:"insertAt",value:function(g,w){var N=nt(this.content,g+this.openStart,w);return N&&new I(N,this.openStart,this.openEnd)}},{key:"removeBetween",value:function(g,w){return new I(mt(this.content,g+this.openStart,w+this.openStart),this.openStart,this.openEnd)}},{key:"eq",value:function(g){return this.content.eq(g.content)&&this.openStart==g.openStart&&this.openEnd==g.openEnd}},{key:"toString",value:function(){return this.content+"("+this.openStart+","+this.openEnd+")"}},{key:"toJSON",value:function(){if(!this.content.size)return null;var g={content:this.content.toJSON()};return this.openStart>0&&(g.openStart=this.openStart),this.openEnd>0&&(g.openEnd=this.openEnd),g}}],[{key:"fromJSON",value:function(g,w){if(!w)return I.empty;var N=w.openStart||0,_=w.openEnd||0;if(typeof N!="number"||typeof _!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new I(ge.fromJSON(g,w.content),N,_)}},{key:"maxOpen",value:function(g){for(var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,N=0,_=0,j=g.firstChild;j&&!j.isLeaf&&(w||!j.type.spec.isolating);j=j.firstChild)N++;for(var X=g.lastChild;X&&!X.isLeaf&&(w||!X.type.spec.isolating);X=X.lastChild)_++;return new I(g,N,_)}}]),I})();ct.empty=new ct(ge.empty,0,0);function mt(I,M,g){var w=I.findIndex(M),N=w.index,_=w.offset,j=I.maybeChild(N),X=I.findIndex(g),ce=X.index,pe=X.offset;if(_==M||j.isText){if(pe!=g&&!I.child(ce).isText)throw new RangeError("Removing non-flat range");return I.cut(0,M).append(I.cut(g))}if(N!=ce)throw new RangeError("Removing non-flat range");return I.replaceChild(N,j.copy(mt(j.content,M-_-1,g-_-1)))}function nt(I,M,g,w){var N=I.findIndex(M),_=N.index,j=N.offset,X=I.maybeChild(_);if(j==M||X.isText)return w&&!w.canReplace(_,_,g)?null:I.cut(0,M).append(g).append(I.cut(M));var ce=nt(X.content,M-j-1,g,X);return ce&&I.replaceChild(_,X.copy(ce))}function Et(I,M,g){if(g.openStart>I.depth)throw new bt("Inserted content deeper than insertion position");if(I.depth-g.openStart!=M.depth-g.openEnd)throw new bt("Inconsistent open depths");return It(I,M,g,0)}function It(I,M,g,w){var N=I.index(w),_=I.node(w);if(N==M.index(w)&&w<I.depth-g.openStart){var j=It(I,M,g,w+1);return _.copy(_.content.replaceChild(N,j))}else if(g.content.size)if(!g.openStart&&!g.openEnd&&I.depth==w&&M.depth==w){var X=I.parent,ce=X.content;return St(X,ce.cut(0,I.parentOffset).append(g.content).append(ce.cut(M.parentOffset)))}else{var pe=$t(g,I),Ne=pe.start,Oe=pe.end;return St(_,Mt(I,Ne,Oe,M,w))}else return St(_,nr(I,M,w))}function Ut(I,M){if(!M.type.compatibleContent(I.type))throw new bt("Cannot join "+M.type.name+" onto "+I.type.name)}function Ye(I,M,g){var w=I.node(g);return Ut(w,M.node(g)),w}function dt(I,M){var g=M.length-1;g>=0&&I.isText&&I.sameMarkup(M[g])?M[g]=I.withText(M[g].text+I.text):M.push(I)}function st(I,M,g,w){var N=(M||I).node(g),_=0,j=M?M.index(g):N.childCount;I&&(_=I.index(g),I.depth>g?_++:I.textOffset&&(dt(I.nodeAfter,w),_++));for(var X=_;X<j;X++)dt(N.child(X),w);M&&M.depth==g&&M.textOffset&&dt(M.nodeBefore,w)}function St(I,M){return I.type.checkContent(M),I.copy(M)}function Mt(I,M,g,w,N){var _=I.depth>N&&Ye(I,M,N+1),j=w.depth>N&&Ye(g,w,N+1),X=[];return st(null,I,N,X),_&&j&&M.index(N)==g.index(N)?(Ut(_,j),dt(St(_,Mt(I,M,g,w,N+1)),X)):(_&&dt(St(_,nr(I,M,N+1)),X),st(M,g,N,X),j&&dt(St(j,nr(g,w,N+1)),X)),st(w,null,N,X),new ge(X)}function nr(I,M,g){var w=[];if(st(null,I,g,w),I.depth>g){var N=Ye(I,M,g+1);dt(St(N,nr(I,M,g+1)),w)}return st(M,null,g,w),new ge(w)}function $t(I,M){for(var g=M.depth-I.openStart,w=M.node(g),N=w.copy(I.content),_=g-1;_>=0;_--)N=M.node(_).copy(ge.from(N));return{start:N.resolveNoCache(I.openStart+g),end:N.resolveNoCache(N.content.size-I.openEnd-g)}}var Qt=(function(){function I(M,g,w){F(this,I),this.pos=M,this.path=g,this.parentOffset=w,this.depth=g.length/3-1}return Y(I,[{key:"resolveDepth",value:function(g){return g==null?this.depth:g<0?this.depth+g:g}},{key:"parent",get:function(){return this.node(this.depth)}},{key:"doc",get:function(){return this.node(0)}},{key:"node",value:function(g){return this.path[this.resolveDepth(g)*3]}},{key:"index",value:function(g){return this.path[this.resolveDepth(g)*3+1]}},{key:"indexAfter",value:function(g){return g=this.resolveDepth(g),this.index(g)+(g==this.depth&&!this.textOffset?0:1)}},{key:"start",value:function(g){return g=this.resolveDepth(g),g==0?0:this.path[g*3-1]+1}},{key:"end",value:function(g){return g=this.resolveDepth(g),this.start(g)+this.node(g).content.size}},{key:"before",value:function(g){if(g=this.resolveDepth(g),!g)throw new RangeError("There is no position before the top-level node");return g==this.depth+1?this.pos:this.path[g*3-1]}},{key:"after",value:function(g){if(g=this.resolveDepth(g),!g)throw new RangeError("There is no position after the top-level node");return g==this.depth+1?this.pos:this.path[g*3-1]+this.path[g*3].nodeSize}},{key:"textOffset",get:function(){return this.pos-this.path[this.path.length-1]}},{key:"nodeAfter",get:function(){var g=this.parent,w=this.index(this.depth);if(w==g.childCount)return null;var N=this.pos-this.path[this.path.length-1],_=g.child(w);return N?g.child(w).cut(N):_}},{key:"nodeBefore",get:function(){var g=this.index(this.depth),w=this.pos-this.path[this.path.length-1];return w?this.parent.child(g).cut(0,w):g==0?null:this.parent.child(g-1)}},{key:"posAtIndex",value:function(g,w){w=this.resolveDepth(w);for(var N=this.path[w*3],_=w==0?0:this.path[w*3-1]+1,j=0;j<g;j++)_+=N.child(j).nodeSize;return _}},{key:"marks",value:function(){var g=this.parent,w=this.index();if(g.content.size==0)return Fe.none;if(this.textOffset)return g.child(w).marks;var N=g.maybeChild(w-1),_=g.maybeChild(w);if(!N){var j=N;N=_,_=j}for(var X=N.marks,ce=0;ce<X.length;ce++)X[ce].type.spec.inclusive===!1&&(!_||!X[ce].isInSet(_.marks))&&(X=X[ce--].removeFromSet(X));return X}},{key:"marksAcross",value:function(g){var w=this.parent.maybeChild(this.index());if(!w||!w.isInline)return null;for(var N=w.marks,_=g.parent.maybeChild(g.index()),j=0;j<N.length;j++)N[j].type.spec.inclusive===!1&&(!_||!N[j].isInSet(_.marks))&&(N=N[j--].removeFromSet(N));return N}},{key:"sharedDepth",value:function(g){for(var w=this.depth;w>0;w--)if(this.start(w)<=g&&this.end(w)>=g)return w;return 0}},{key:"blockRange",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this,w=arguments.length>1?arguments[1]:void 0;if(g.pos<this.pos)return g.blockRange(this);for(var N=this.depth-(this.parent.inlineContent||this.pos==g.pos?1:0);N>=0;N--)if(g.pos<=this.end(N)&&(!w||w(this.node(N))))return new ae(this,g,N);return null}},{key:"sameParent",value:function(g){return this.pos-this.parentOffset==g.pos-g.parentOffset}},{key:"max",value:function(g){return g.pos>this.pos?g:this}},{key:"min",value:function(g){return g.pos<this.pos?g:this}},{key:"toString",value:function(){for(var g="",w=1;w<=this.depth;w++)g+=(g?"/":"")+this.node(w).type.name+"_"+this.index(w-1);return g+":"+this.parentOffset}}],[{key:"resolve",value:function(g,w){if(!(w>=0&&w<=g.content.size))throw new RangeError("Position "+w+" out of range");for(var N=[],_=0,j=w,X=g;;){var ce=X.content.findIndex(j),pe=ce.index,Ne=ce.offset,Oe=j-Ne;if(N.push(X,pe,_+Ne),!Oe||(X=X.child(pe),X.isText))break;j=Oe-1,_+=Ne+1}return new I(w,N,j)}},{key:"resolveCached",value:function(g,w){var N=ie.get(g);if(N)for(var _=0;_<N.elts.length;_++){var j=N.elts[_];if(j.pos==w)return j}else ie.set(g,N=new be);var X=N.elts[N.i]=I.resolve(g,w);return N.i=(N.i+1)%ve,X}}]),I})(),be=Y(function I(){F(this,I),this.elts=[],this.i=0}),ve=12,ie=new WeakMap,ae=(function(){function I(M,g,w){F(this,I),this.$from=M,this.$to=g,this.depth=w}return Y(I,[{key:"start",get:function(){return this.$from.before(this.depth+1)}},{key:"end",get:function(){return this.$to.after(this.depth+1)}},{key:"parent",get:function(){return this.$from.node(this.depth)}},{key:"startIndex",get:function(){return this.$from.index(this.depth)}},{key:"endIndex",get:function(){return this.$to.indexAfter(this.depth)}}]),I})(),Z=Object.create(null),ke=(function(){function I(M,g,w){var N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Fe.none;F(this,I),this.type=M,this.attrs=g,this.marks=N,this.content=w||ge.empty}return Y(I,[{key:"children",get:function(){return this.content.content}},{key:"nodeSize",get:function(){return this.isLeaf?1:2+this.content.size}},{key:"childCount",get:function(){return this.content.childCount}},{key:"child",value:function(g){return this.content.child(g)}},{key:"maybeChild",value:function(g){return this.content.maybeChild(g)}},{key:"forEach",value:function(g){this.content.forEach(g)}},{key:"nodesBetween",value:function(g,w,N){var _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;this.content.nodesBetween(g,w,N,_,this)}},{key:"descendants",value:function(g){this.nodesBetween(0,this.content.size,g)}},{key:"textContent",get:function(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}},{key:"textBetween",value:function(g,w,N,_){return this.content.textBetween(g,w,N,_)}},{key:"firstChild",get:function(){return this.content.firstChild}},{key:"lastChild",get:function(){return this.content.lastChild}},{key:"eq",value:function(g){return this==g||this.sameMarkup(g)&&this.content.eq(g.content)}},{key:"sameMarkup",value:function(g){return this.hasMarkup(g.type,g.attrs,g.marks)}},{key:"hasMarkup",value:function(g,w,N){return this.type==g&&ot(this.attrs,w||g.defaultAttrs||Z)&&Fe.sameSet(this.marks,N||Fe.none)}},{key:"copy",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return g==this.content?this:new I(this.type,this.attrs,g,this.marks)}},{key:"mark",value:function(g){return g==this.marks?this:new I(this.type,this.attrs,this.content,g)}},{key:"cut",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.content.size;return g==0&&w==this.content.size?this:this.copy(this.content.cut(g,w))}},{key:"slice",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.content.size,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(g==w)return ct.empty;var _=this.resolve(g),j=this.resolve(w),X=N?0:_.sharedDepth(w),ce=_.start(X),pe=_.node(X),Ne=pe.content.cut(_.pos-ce,j.pos-ce);return new ct(Ne,_.depth-X,j.depth-X)}},{key:"replace",value:function(g,w,N){return Et(this.resolve(g),this.resolve(w),N)}},{key:"nodeAt",value:function(g){for(var w=this;;){var N=w.content.findIndex(g),_=N.index,j=N.offset;if(w=w.maybeChild(_),!w)return null;if(j==g||w.isText)return w;g-=j+1}}},{key:"childAfter",value:function(g){var w=this.content.findIndex(g),N=w.index,_=w.offset;return{node:this.content.maybeChild(N),index:N,offset:_}}},{key:"childBefore",value:function(g){if(g==0)return{node:null,index:0,offset:0};var w=this.content.findIndex(g),N=w.index,_=w.offset;if(_<g)return{node:this.content.child(N),index:N,offset:_};var j=this.content.child(N-1);return{node:j,index:N-1,offset:_-j.nodeSize}}},{key:"resolve",value:function(g){return Qt.resolveCached(this,g)}},{key:"resolveNoCache",value:function(g){return Qt.resolve(this,g)}},{key:"rangeHasMark",value:function(g,w,N){var _=!1;return w>g&&this.nodesBetween(g,w,function(j){return N.isInSet(j.marks)&&(_=!0),!_}),_}},{key:"isBlock",get:function(){return this.type.isBlock}},{key:"isTextblock",get:function(){return this.type.isTextblock}},{key:"inlineContent",get:function(){return this.type.inlineContent}},{key:"isInline",get:function(){return this.type.isInline}},{key:"isText",get:function(){return this.type.isText}},{key:"isLeaf",get:function(){return this.type.isLeaf}},{key:"isAtom",get:function(){return this.type.isAtom}},{key:"toString",value:function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var g=this.type.name;return this.content.size&&(g+="("+this.content.toStringInner()+")"),ze(this.marks,g)}},{key:"contentMatchAt",value:function(g){var w=this.type.contentMatch.matchFragment(this.content,0,g);if(!w)throw new Error("Called contentMatchAt on a node with invalid content");return w}},{key:"canReplace",value:function(g,w){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ge.empty,_=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,j=arguments.length>4&&arguments[4]!==void 0?arguments[4]:N.childCount,X=this.contentMatchAt(g).matchFragment(N,_,j),ce=X&&X.matchFragment(this.content,w);if(!ce||!ce.validEnd)return!1;for(var pe=_;pe<j;pe++)if(!this.type.allowsMarks(N.child(pe).marks))return!1;return!0}},{key:"canReplaceWith",value:function(g,w,N,_){if(_&&!this.type.allowsMarks(_))return!1;var j=this.contentMatchAt(g).matchType(N),X=j&&j.matchFragment(this.content,w);return X?X.validEnd:!1}},{key:"canAppend",value:function(g){return g.content.size?this.canReplace(this.childCount,this.childCount,g.content):this.type.compatibleContent(g.type)}},{key:"check",value:function(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);for(var g=Fe.none,w=0;w<this.marks.length;w++){var N=this.marks[w];N.type.checkAttrs(N.attrs),g=N.addToSet(g)}if(!Fe.sameSet(g,this.marks))throw new RangeError("Invalid collection of marks for node ".concat(this.type.name,": ").concat(this.marks.map(function(_){return _.type.name})));this.content.forEach(function(_){return _.check()})}},{key:"toJSON",value:function(){var g={type:this.type.name};for(var w in this.attrs){g.attrs=this.attrs;break}return this.content.size&&(g.content=this.content.toJSON()),this.marks.length&&(g.marks=this.marks.map(function(N){return N.toJSON()})),g}}],[{key:"fromJSON",value:function(g,w){if(!w)throw new RangeError("Invalid input for Node.fromJSON");var N=void 0;if(w.marks){if(!Array.isArray(w.marks))throw new RangeError("Invalid mark data for Node.fromJSON");N=w.marks.map(g.markFromJSON)}if(w.type=="text"){if(typeof w.text!="string")throw new RangeError("Invalid text node in JSON");return g.text(w.text,N)}var _=ge.fromJSON(g,w.content),j=g.nodeType(w.type).create(w.attrs,_,N);return j.type.checkAttrs(j.attrs),j}}]),I})();ke.prototype.text=void 0;var Ee=(function(I){a(g,I);var M=o(g);function g(w,N,_,j){var X;if(F(this,g),X=M.call(this,w,N,null,j),!_)throw new RangeError("Empty text nodes are not allowed");return X.text=_,X}return Y(g,[{key:"toString",value:function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ze(this.marks,JSON.stringify(this.text))}},{key:"textContent",get:function(){return this.text}},{key:"textBetween",value:function(N,_){return this.text.slice(N,_)}},{key:"nodeSize",get:function(){return this.text.length}},{key:"mark",value:function(N){return N==this.marks?this:new g(this.type,this.attrs,this.text,N)}},{key:"withText",value:function(N){return N==this.text?this:new g(this.type,this.attrs,N,this.marks)}},{key:"cut",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.text.length;return N==0&&_==this.text.length?this:this.withText(this.text.slice(N,_))}},{key:"eq",value:function(N){return this.sameMarkup(N)&&this.text==N.text}},{key:"toJSON",value:function(){var N=n(E(g.prototype),"toJSON",this).call(this);return N.text=this.text,N}}]),g})(ke);function ze(I,M){for(var g=I.length-1;g>=0;g--)M=I[g].type.name+"("+M+")";return M}var Xe=(function(){function I(M){F(this,I),this.validEnd=M,this.next=[],this.wrapCache=[]}return Y(I,[{key:"matchType",value:function(g){for(var w=0;w<this.next.length;w++)if(this.next[w].type==g)return this.next[w].next;return null}},{key:"matchFragment",value:function(g){for(var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.childCount,_=this,j=w;_&&j<N;j++)_=_.matchType(g.child(j).type);return _}},{key:"inlineContent",get:function(){return this.next.length!=0&&this.next[0].type.isInline}},{key:"defaultType",get:function(){for(var g=0;g<this.next.length;g++){var w=this.next[g].type;if(!(w.isText||w.hasRequiredAttrs()))return w}return null}},{key:"compatible",value:function(g){for(var w=0;w<this.next.length;w++)for(var N=0;N<g.next.length;N++)if(this.next[w].type==g.next[N].type)return!0;return!1}},{key:"fillBefore",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=[this];function j(X,ce){var pe=X.matchFragment(g,N);if(pe&&(!w||pe.validEnd))return ge.from(ce.map(function(Vt){return Vt.createAndFill()}));for(var Ne=0;Ne<X.next.length;Ne++){var Oe=X.next[Ne],Be=Oe.type,et=Oe.next;if(!(Be.isText||Be.hasRequiredAttrs())&&_.indexOf(et)==-1){_.push(et);var wt=j(et,ce.concat(Be));if(wt)return wt}}return null}return j(this,[])}},{key:"findWrapping",value:function(g){for(var w=0;w<this.wrapCache.length;w+=2)if(this.wrapCache[w]==g)return this.wrapCache[w+1];var N=this.computeWrapping(g);return this.wrapCache.push(g,N),N}},{key:"computeWrapping",value:function(g){for(var w=Object.create(null),N=[{match:this,type:null,via:null}];N.length;){var _=N.shift(),j=_.match;if(j.matchType(g)){for(var X=[],ce=_;ce.type;ce=ce.via)X.push(ce.type);return X.reverse()}for(var pe=0;pe<j.next.length;pe++){var Ne=j.next[pe],Oe=Ne.type,Be=Ne.next;!Oe.isLeaf&&!Oe.hasRequiredAttrs()&&!(Oe.name in w)&&(!_.type||Be.validEnd)&&(N.push({match:Oe.contentMatch,type:Oe,via:_}),w[Oe.name]=!0)}}return null}},{key:"edgeCount",get:function(){return this.next.length}},{key:"edge",value:function(g){if(g>=this.next.length)throw new RangeError("There's no ".concat(g,"th edge in this content match"));return this.next[g]}},{key:"toString",value:function(){var g=[];function w(N){g.push(N);for(var _=0;_<N.next.length;_++)g.indexOf(N.next[_].next)==-1&&w(N.next[_].next)}return w(this),g.map(function(N,_){for(var j=_+(N.validEnd?"*":" ")+" ",X=0;X<N.next.length;X++)j+=(X?", ":"")+N.next[X].type.name+"->"+g.indexOf(N.next[X].next);return j}).join(`
|
|
673
|
-
`)}}],[{key:"parse",value:function(g,w){var N=new kt(g,w);if(N.next==null)return I.empty;var _=lt(N);N.next&&N.err("Unexpected trailing text");var j=Ue(Qr(_));return at(j,N),j}}]),I})();Xe.empty=new Xe(!0);var kt=(function(){function I(M,g){F(this,I),this.string=M,this.nodeTypes=g,this.inline=null,this.pos=0,this.tokens=M.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}return Y(I,[{key:"next",get:function(){return this.tokens[this.pos]}},{key:"eat",value:function(g){return this.next==g&&(this.pos++||!0)}},{key:"err",value:function(g){throw new SyntaxError(g+" (in content expression '"+this.string+"')")}}]),I})();function lt(I){var M=[];do M.push(Ht(I));while(I.eat("|"));return M.length==1?M[0]:{type:"choice",exprs:M}}function Ht(I){var M=[];do M.push(At(I));while(I.next&&I.next!=")"&&I.next!="|");return M.length==1?M[0]:{type:"seq",exprs:M}}function At(I){for(var M=Sn(I);;)if(I.eat("+"))M={type:"plus",expr:M};else if(I.eat("*"))M={type:"star",expr:M};else if(I.eat("?"))M={type:"opt",expr:M};else if(I.eat("{"))M=Ot(I,M);else break;return M}function jt(I){/\D/.test(I.next)&&I.err("Expected number, got '"+I.next+"'");var M=Number(I.next);return I.pos++,M}function Ot(I,M){var g=jt(I),w=g;return I.eat(",")&&(I.next!="}"?w=jt(I):w=-1),I.eat("}")||I.err("Unclosed braced range"),{type:"range",min:g,max:w,expr:M}}function hr(I,M){var g=I.nodeTypes,w=g[M];if(w)return[w];var N=[];for(var _ in g){var j=g[_];j.isInGroup(M)&&N.push(j)}return N.length==0&&I.err("No node type or group '"+M+"' found"),N}function Sn(I){if(I.eat("(")){var M=lt(I);return I.eat(")")||I.err("Missing closing paren"),M}else if(/\W/.test(I.next))I.err("Unexpected token '"+I.next+"'");else{var g=hr(I,I.next).map(function(w){return I.inline==null?I.inline=w.isInline:I.inline!=w.isInline&&I.err("Mixing inline and block content"),{type:"name",value:w}});return I.pos++,g.length==1?g[0]:{type:"choice",exprs:g}}}function Qr(I){var M=[[]];return N(_(I,0),g()),M;function g(){return M.push([])-1}function w(j,X,ce){var pe={term:ce,to:X};return M[j].push(pe),pe}function N(j,X){j.forEach(function(ce){return ce.to=X})}function _(j,X){if(j.type=="choice")return j.exprs.reduce(function(zn,Zn){return zn.concat(_(Zn,X))},[]);if(j.type=="seq")for(var ce=0;;ce++){var pe=_(j.exprs[ce],X);if(ce==j.exprs.length-1)return pe;N(pe,X=g())}else if(j.type=="star"){var Ne=g();return w(X,Ne),N(_(j.expr,Ne),Ne),[w(Ne)]}else if(j.type=="plus"){var Oe=g();return N(_(j.expr,X),Oe),N(_(j.expr,Oe),Oe),[w(Oe)]}else{if(j.type=="opt")return[w(X)].concat(_(j.expr,X));if(j.type=="range"){for(var Be=X,et=0;et<j.min;et++){var wt=g();N(_(j.expr,Be),wt),Be=wt}if(j.max==-1)N(_(j.expr,Be),Be);else for(var Vt=j.min;Vt<j.max;Vt++){var rn=g();w(Be,rn),N(_(j.expr,Be),rn),Be=rn}return[w(Be)]}else{if(j.type=="name")return[w(X,void 0,j.value)];throw new Error("Unknown expr type")}}}}function ir(I,M){return M-I}function _e(I,M){var g=[];return w(M),g.sort(ir);function w(N){var _=I[N];if(_.length==1&&!_[0].term)return w(_[0].to);g.push(N);for(var j=0;j<_.length;j++){var X=_[j],ce=X.term,pe=X.to;!ce&&g.indexOf(pe)==-1&&w(pe)}}}function Ue(I){var M=Object.create(null);return g(_e(I,0));function g(w){var N=[];w.forEach(function(ce){I[ce].forEach(function(pe){var Ne=pe.term,Oe=pe.to;if(Ne){for(var Be,et=0;et<N.length;et++)N[et][0]==Ne&&(Be=N[et][1]);_e(I,Oe).forEach(function(wt){Be||N.push([Ne,Be=[]]),Be.indexOf(wt)==-1&&Be.push(wt)})}})});for(var _=M[w.join(",")]=new Xe(w.indexOf(I.length-1)>-1),j=0;j<N.length;j++){var X=N[j][1].sort(ir);_.next.push({type:N[j][0],next:M[X.join(",")]||g(X)})}return _}}function at(I,M){for(var g=0,w=[I];g<w.length;g++){for(var N=w[g],_=!N.validEnd,j=[],X=0;X<N.next.length;X++){var ce=N.next[X],pe=ce.type,Ne=ce.next;j.push(pe.name),_&&!(pe.isText||pe.hasRequiredAttrs())&&(_=!1),w.indexOf(Ne)==-1&&w.push(Ne)}_&&M.err("Only non-generatable nodes ("+j.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ut(I){var M=Object.create(null);for(var g in I){var w=I[g];if(!w.hasDefault)return null;M[g]=w.default}return M}function Ct(I,M){var g=Object.create(null);for(var w in I){var N=M&&M[w];if(N===void 0){var _=I[w];if(_.hasDefault)N=_.default;else throw new RangeError("No value supplied for attribute "+w)}g[w]=N}return g}function gr(I,M,g,w){for(var N in M)if(!(N in I))throw new RangeError("Unsupported attribute ".concat(N," for ").concat(g," of type ").concat(N));for(var _ in I){var j=I[_];j.validate&&j.validate(M[_])}}function _t(I,M){var g=Object.create(null);if(M)for(var w in M)g[w]=new pn(I,w,M[w]);return g}var Wt=(function(){function I(M,g,w){F(this,I),this.name=M,this.schema=g,this.spec=w,this.markSet=null,this.groups=w.group?w.group.split(" "):[],this.attrs=_t(M,w.attrs),this.defaultAttrs=ut(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(w.inline||M=="text"),this.isText=M=="text"}return Y(I,[{key:"isInline",get:function(){return!this.isBlock}},{key:"isTextblock",get:function(){return this.isBlock&&this.inlineContent}},{key:"isLeaf",get:function(){return this.contentMatch==Xe.empty}},{key:"isAtom",get:function(){return this.isLeaf||!!this.spec.atom}},{key:"isInGroup",value:function(g){return this.groups.indexOf(g)>-1}},{key:"whitespace",get:function(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}},{key:"hasRequiredAttrs",value:function(){for(var g in this.attrs)if(this.attrs[g].isRequired)return!0;return!1}},{key:"compatibleContent",value:function(g){return this==g||this.contentMatch.compatible(g.contentMatch)}},{key:"computeAttrs",value:function(g){return!g&&this.defaultAttrs?this.defaultAttrs:Ct(this.attrs,g)}},{key:"create",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,w=arguments.length>1?arguments[1]:void 0,N=arguments.length>2?arguments[2]:void 0;if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ke(this,this.computeAttrs(g),ge.from(w),Fe.setFrom(N))}},{key:"createChecked",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,w=arguments.length>1?arguments[1]:void 0,N=arguments.length>2?arguments[2]:void 0;return w=ge.from(w),this.checkContent(w),new ke(this,this.computeAttrs(g),w,Fe.setFrom(N))}},{key:"createAndFill",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,w=arguments.length>1?arguments[1]:void 0,N=arguments.length>2?arguments[2]:void 0;if(g=this.computeAttrs(g),w=ge.from(w),w.size){var _=this.contentMatch.fillBefore(w);if(!_)return null;w=_.append(w)}var j=this.contentMatch.matchFragment(w),X=j&&j.fillBefore(ge.empty,!0);return X?new ke(this,g,w.append(X),Fe.setFrom(N)):null}},{key:"validContent",value:function(g){var w=this.contentMatch.matchFragment(g);if(!w||!w.validEnd)return!1;for(var N=0;N<g.childCount;N++)if(!this.allowsMarks(g.child(N).marks))return!1;return!0}},{key:"checkContent",value:function(g){if(!this.validContent(g))throw new RangeError("Invalid content for node ".concat(this.name,": ").concat(g.toString().slice(0,50)))}},{key:"checkAttrs",value:function(g){gr(this.attrs,g,"node",this.name)}},{key:"allowsMarkType",value:function(g){return this.markSet==null||this.markSet.indexOf(g)>-1}},{key:"allowsMarks",value:function(g){if(this.markSet==null)return!0;for(var w=0;w<g.length;w++)if(!this.allowsMarkType(g[w].type))return!1;return!0}},{key:"allowedMarks",value:function(g){if(this.markSet==null)return g;for(var w,N=0;N<g.length;N++)this.allowsMarkType(g[N].type)?w&&w.push(g[N]):w||(w=g.slice(0,N));return w?w.length?w:Fe.none:g}}],[{key:"compile",value:function(g,w){var N=Object.create(null);g.forEach(function(X,ce){return N[X]=new I(X,w,ce)});var _=w.spec.topNode||"doc";if(!N[_])throw new RangeError("Schema is missing its top node type ('"+_+"')");if(!N.text)throw new RangeError("Every schema needs a 'text' type");for(var j in N.text.attrs)throw new RangeError("The text node type should not have attributes");return N}}]),I})();function qr(I,M,g){var w=g.split("|");return function(N){var _=N===null?"null":P(N);if(w.indexOf(_)<0)throw new RangeError("Expected value of type ".concat(w," for attribute ").concat(M," on type ").concat(I,", got ").concat(_))}}var pn=(function(){function I(M,g,w){F(this,I),this.hasDefault=Object.prototype.hasOwnProperty.call(w,"default"),this.default=w.default,this.validate=typeof w.validate=="string"?qr(M,g,w.validate):w.validate}return Y(I,[{key:"isRequired",get:function(){return!this.hasDefault}}]),I})(),ar=(function(){function I(M,g,w,N){F(this,I),this.name=M,this.rank=g,this.schema=w,this.spec=N,this.attrs=_t(M,N.attrs),this.excluded=null;var _=ut(this.attrs);this.instance=_?new Fe(this,_):null}return Y(I,[{key:"create",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return!g&&this.instance?this.instance:new Fe(this,Ct(this.attrs,g))}},{key:"removeFromSet",value:function(g){for(var w=0;w<g.length;w++)g[w].type==this&&(g=g.slice(0,w).concat(g.slice(w+1)),w--);return g}},{key:"isInSet",value:function(g){for(var w=0;w<g.length;w++)if(g[w].type==this)return g[w]}},{key:"checkAttrs",value:function(g){gr(this.attrs,g,"mark",this.name)}},{key:"excludes",value:function(g){return this.excluded.indexOf(g)>-1}}],[{key:"compile",value:function(g,w){var N=Object.create(null),_=0;return g.forEach(function(j,X){return N[j]=new I(j,_++,w,X)}),N}}]),I})(),Hr=(function(){function I(M){var g=this;F(this,I),this.linebreakReplacement=null,this.cached=Object.create(null);var w=this.spec={};for(var N in M)w[N]=M[N];w.nodes=de.from(M.nodes),w.marks=de.from(M.marks||{}),this.nodes=Wt.compile(this.spec.nodes,this),this.marks=ar.compile(this.spec.marks,this);var _=Object.create(null);for(var j in this.nodes){if(j in this.marks)throw new RangeError(j+" can not be both a node and a mark");var X=this.nodes[j],ce=X.spec.content||"",pe=X.spec.marks;if(X.contentMatch=_[ce]||(_[ce]=Xe.parse(ce,this.nodes)),X.inlineContent=X.contentMatch.inlineContent,X.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!X.isInline||!X.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=X}X.markSet=pe=="_"?null:pe?xn(this,pe.split(" ")):pe==""||!X.inlineContent?[]:null}for(var Ne in this.marks){var Oe=this.marks[Ne],Be=Oe.spec.excludes;Oe.excluded=Be==null?[Oe]:Be==""?[]:xn(this,Be.split(" "))}this.nodeFromJSON=function(et){return ke.fromJSON(g,et)},this.markFromJSON=function(et){return Fe.fromJSON(g,et)},this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}return Y(I,[{key:"node",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,N=arguments.length>2?arguments[2]:void 0,_=arguments.length>3?arguments[3]:void 0;if(typeof g=="string")g=this.nodeType(g);else if(g instanceof Wt){if(g.schema!=this)throw new RangeError("Node type from different schema used ("+g.name+")")}else throw new RangeError("Invalid node type: "+g);return g.createChecked(w,N,_)}},{key:"text",value:function(g,w){var N=this.nodes.text;return new Ee(N,N.defaultAttrs,g,Fe.setFrom(w))}},{key:"mark",value:function(g,w){return typeof g=="string"&&(g=this.marks[g]),g.create(w)}},{key:"nodeType",value:function(g){var w=this.nodes[g];if(!w)throw new RangeError("Unknown node type: "+g);return w}}]),I})();function xn(I,M){for(var g=[],w=0;w<M.length;w++){var N=M[w],_=I.marks[N],j=_;if(_)g.push(_);else for(var X in I.marks){var ce=I.marks[X];(N=="_"||ce.spec.group&&ce.spec.group.split(" ").indexOf(N)>-1)&&g.push(j=ce)}if(!j)throw new SyntaxError("Unknown mark type: '"+M[w]+"'")}return g}function vn(I){return I.tag!=null}function en(I){return I.style!=null}var Gr=(function(){function I(M,g){var w=this;F(this,I),this.schema=M,this.rules=g,this.tags=[],this.styles=[];var N=this.matchedStyles=[];g.forEach(function(_){if(vn(_))w.tags.push(_);else if(en(_)){var j=/[^=]*/.exec(_.style)[0];N.indexOf(j)<0&&N.push(j),w.styles.push(_)}}),this.normalizeLists=!this.tags.some(function(_){if(!/^(ul|ol)\b/.test(_.tag)||!_.node)return!1;var j=M.nodes[_.node];return j.contentMatch.matchType(j)})}return Y(I,[{key:"parse",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=new D(this,w,!1);return N.addAll(g,Fe.none,w.from,w.to),N.finish()}},{key:"parseSlice",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=new D(this,w,!0);return N.addAll(g,Fe.none,w.from,w.to),ct.maxOpen(N.finish())}},{key:"matchTag",value:function(g,w,N){for(var _=N?this.tags.indexOf(N)+1:0;_<this.tags.length;_++){var j=this.tags[_];if(H(g,j.tag)&&(j.namespace===void 0||g.namespaceURI==j.namespace)&&(!j.context||w.matchesContext(j.context))){if(j.getAttrs){var X=j.getAttrs(g);if(X===!1)continue;j.attrs=X||void 0}return j}}}},{key:"matchStyle",value:function(g,w,N,_){for(var j=_?this.styles.indexOf(_)+1:0;j<this.styles.length;j++){var X=this.styles[j],ce=X.style;if(!(ce.indexOf(g)!=0||X.context&&!N.matchesContext(X.context)||ce.length>g.length&&(ce.charCodeAt(g.length)!=61||ce.slice(g.length+1)!=w))){if(X.getAttrs){var pe=X.getAttrs(w);if(pe===!1)continue;X.attrs=pe||void 0}return X}}}}],[{key:"schemaRules",value:function(g){var w=[];function N(pe){for(var Ne=pe.priority==null?50:pe.priority,Oe=0;Oe<w.length;Oe++){var Be=w[Oe],et=Be.priority==null?50:Be.priority;if(et<Ne)break}w.splice(Oe,0,pe)}var _=function(Ne){var Oe=g.marks[Ne].spec.parseDOM;Oe&&Oe.forEach(function(Be){N(Be=K(Be)),Be.mark||Be.ignore||Be.clearMark||(Be.mark=Ne)})};for(var j in g.marks)_(j);var X=function(Ne){var Oe=g.nodes[Ne].spec.parseDOM;Oe&&Oe.forEach(function(Be){N(Be=K(Be)),Be.node||Be.ignore||Be.mark||(Be.node=Ne)})};for(var ce in g.nodes)X(ce);return w}},{key:"fromSchema",value:function(g){return g.cached.domParser||(g.cached.domParser=new I(g,I.schemaRules(g)))}}]),I})(),_r={address:!0,article:!0,aside:!0,blockquote:!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},or={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},tn={ol:!0,ul:!0},zt=1,pr=2,W=4;function $(I,M,g){return M!=null?(M?zt:0)|(M==="full"?pr:0):I&&I.whitespace=="pre"?zt|pr:g&~W}var R=(function(){function I(M,g,w,N,_,j){F(this,I),this.type=M,this.attrs=g,this.marks=w,this.solid=N,this.options=j,this.content=[],this.activeMarks=Fe.none,this.match=_||(j&W?null:M.contentMatch)}return Y(I,[{key:"findWrapping",value:function(g){if(!this.match){if(!this.type)return[];var w=this.type.contentMatch.fillBefore(ge.from(g));if(w)this.match=this.type.contentMatch.matchFragment(w);else{var N=this.type.contentMatch,_;return(_=N.findWrapping(g.type))?(this.match=N,_):null}}return this.match.findWrapping(g.type)}},{key:"finish",value:function(g){if(!(this.options&zt)){var w=this.content[this.content.length-1],N;if(w&&w.isText&&(N=/[ \t\r\n\u000c]+$/.exec(w.text))){var _=w;w.text.length==N[0].length?this.content.pop():this.content[this.content.length-1]=_.withText(_.text.slice(0,_.text.length-N[0].length))}}var j=ge.from(this.content);return!g&&this.match&&(j=j.append(this.match.fillBefore(ge.empty,!0))),this.type?this.type.create(this.attrs,j,this.marks):j}},{key:"inlineContext",value:function(g){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:g.parentNode&&!_r.hasOwnProperty(g.parentNode.nodeName.toLowerCase())}}]),I})(),D=(function(){function I(M,g,w){F(this,I),this.parser=M,this.options=g,this.isOpen=w,this.open=0,this.localPreserveWS=!1;var N=g.topNode,_,j=$(null,g.preserveWhitespace,0)|(w?W:0);N?_=new R(N.type,N.attrs,Fe.none,!0,g.topMatch||N.type.contentMatch,j):w?_=new R(null,null,Fe.none,!0,null,j):_=new R(M.schema.topNodeType,null,Fe.none,!0,null,j),this.nodes=[_],this.find=g.findPositions,this.needsBlock=!1}return Y(I,[{key:"top",get:function(){return this.nodes[this.open]}},{key:"addDOM",value:function(g,w){g.nodeType==3?this.addTextNode(g,w):g.nodeType==1&&this.addElement(g,w)}},{key:"addTextNode",value:function(g,w){var N=g.nodeValue,_=this.top,j=_.options&pr?"full":this.localPreserveWS||(_.options&zt)>0,X=this.parser.schema;if(j==="full"||_.inlineContext(g)||/[^ \t\r\n\u000c]/.test(N)){if(j)if(j==="full")N=N.replace(/\r\n?/g,`
|
|
674
|
-
`);else if(X.linebreakReplacement&&/[\r\n]/.test(N)&&this.top.findWrapping(X.linebreakReplacement.create())){for(var Ne=N.split(/\r?\n|\r/),Oe=0;Oe<Ne.length;Oe++)Oe&&this.insertNode(X.linebreakReplacement.create(),w,!0),Ne[Oe]&&this.insertNode(X.text(Ne[Oe]),w,!/\S/.test(Ne[Oe]));N=""}else N=N.replace(/\r?\n|\r/g," ");else if(N=N.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(N)&&this.open==this.nodes.length-1){var ce=_.content[_.content.length-1],pe=g.previousSibling;(!ce||pe&&pe.nodeName=="BR"||ce.isText&&/[ \t\r\n\u000c]$/.test(ce.text))&&(N=N.slice(1))}N&&this.insertNode(X.text(N),w,!/\S/.test(N)),this.findInText(g)}else this.findInside(g)}},{key:"addElement",value:function(g,w,N){var _=this.localPreserveWS,j=this.top;(g.tagName=="PRE"||/pre/.test(g.style&&g.style.whiteSpace))&&(this.localPreserveWS=!0);var X=g.nodeName.toLowerCase(),ce;tn.hasOwnProperty(X)&&this.parser.normalizeLists&&B(g);var pe=this.options.ruleFromNode&&this.options.ruleFromNode(g)||(ce=this.parser.matchTag(g,this,N));e:if(pe?pe.ignore:or.hasOwnProperty(X))this.findInside(g),this.ignoreFallback(g,w);else if(!pe||pe.skip||pe.closeParent){pe&&pe.closeParent?this.open=Math.max(0,this.open-1):pe&&pe.skip.nodeType&&(g=pe.skip);var Ne,Oe=this.needsBlock;if(_r.hasOwnProperty(X))j.content.length&&j.content[0].isInline&&this.open&&(this.open--,j=this.top),Ne=!0,j.type||(this.needsBlock=!0);else if(!g.firstChild){this.leafFallback(g,w);break e}var Be=pe&&pe.skip?w:this.readStyles(g,w);Be&&this.addAll(g,Be),Ne&&this.sync(j),this.needsBlock=Oe}else{var et=this.readStyles(g,w);et&&this.addElementByRule(g,pe,et,pe.consuming===!1?ce:void 0)}this.localPreserveWS=_}},{key:"leafFallback",value:function(g,w){g.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(g.ownerDocument.createTextNode(`
|
|
675
|
-
`),w)}},{key:"ignoreFallback",value:function(g,w){g.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),w,!0)}},{key:"readStyles",value:function(g,w){var N=this,_=g.style;if(_&&_.length)for(var j=0;j<this.parser.matchedStyles.length;j++){var X=this.parser.matchedStyles[j],ce=_.getPropertyValue(X);if(ce){for(var pe=function(et){var wt=N.parser.matchStyle(X,ce,N,et);if(!wt)return Oe=et,0;if(wt.ignore)return{v:null};if(wt.clearMark?w=w.filter(function(Vt){return!wt.clearMark(Vt)}):w=w.concat(N.parser.schema.marks[wt.mark].create(wt.attrs)),wt.consuming===!1)et=wt;else return Oe=et,0;Oe=et},Ne,Oe=void 0;Ne=pe(Oe),Ne!==0;)if(Ne)return Ne.v}}return w}},{key:"addElementByRule",value:function(g,w,N,_){var j=this,X,ce;if(w.node)if(ce=this.parser.schema.nodes[w.node],ce.isLeaf)this.insertNode(ce.create(w.attrs),N,g.nodeName=="BR")||this.leafFallback(g,N);else{var pe=this.enter(ce,w.attrs||null,N,w.preserveWhitespace);pe&&(X=!0,N=pe)}else{var Ne=this.parser.schema.marks[w.mark];N=N.concat(Ne.create(w.attrs))}var Oe=this.top;if(ce&&ce.isLeaf)this.findInside(g);else if(_)this.addElement(g,N,_);else if(w.getContent)this.findInside(g),w.getContent(g,this.parser.schema).forEach(function(et){return j.insertNode(et,N,!1)});else{var Be=g;typeof w.contentElement=="string"?Be=g.querySelector(w.contentElement):typeof w.contentElement=="function"?Be=w.contentElement(g):w.contentElement&&(Be=w.contentElement),this.findAround(g,Be,!0),this.addAll(Be,N),this.findAround(g,Be,!1)}X&&this.sync(Oe)&&this.open--}},{key:"addAll",value:function(g,w,N,_){for(var j=N||0,X=N?g.childNodes[N]:g.firstChild,ce=_==null?null:g.childNodes[_];X!=ce;X=X.nextSibling,++j)this.findAtPoint(g,j),this.addDOM(X,w);this.findAtPoint(g,j)}},{key:"findPlace",value:function(g,w,N){for(var _,j,X=this.open,ce=0;X>=0;X--){var pe=this.nodes[X],Ne=pe.findWrapping(g);if(Ne&&(!_||_.length>Ne.length+ce)&&(_=Ne,j=pe,!Ne.length))break;if(pe.solid){if(N)break;ce+=2}}if(!_)return null;this.sync(j);for(var Oe=0;Oe<_.length;Oe++)w=this.enterInner(_[Oe],null,w,!1);return w}},{key:"insertNode",value:function(g,w,N){if(g.isInline&&this.needsBlock&&!this.top.type){var _=this.textblockFromContext();_&&(w=this.enterInner(_,null,w))}var j=this.findPlace(g,w,N);if(j){this.closeExtra();var X=this.top;X.match&&(X.match=X.match.matchType(g.type));var ce=Fe.none,pe=r(j.concat(g.marks)),Ne;try{for(pe.s();!(Ne=pe.n()).done;){var Oe=Ne.value;(X.type?X.type.allowsMarkType(Oe.type):he(Oe.type,g.type))&&(ce=Oe.addToSet(ce))}}catch(Be){pe.e(Be)}finally{pe.f()}return X.content.push(g.mark(ce)),!0}return!1}},{key:"enter",value:function(g,w,N,_){var j=this.findPlace(g.create(w),N,!1);return j&&(j=this.enterInner(g,w,N,!0,_)),j}},{key:"enterInner",value:function(g,w,N){var _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,j=arguments.length>4?arguments[4]:void 0;this.closeExtra();var X=this.top;X.match=X.match&&X.match.matchType(g);var ce=$(g,j,X.options);X.options&W&&X.content.length==0&&(ce|=W);var pe=Fe.none;return N=N.filter(function(Ne){return(X.type?X.type.allowsMarkType(Ne.type):he(Ne.type,g))?(pe=Ne.addToSet(pe),!1):!0}),this.nodes.push(new R(g,w,pe,_,null,ce)),this.open++,N}},{key:"closeExtra",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,w=this.nodes.length-1;if(w>this.open){for(;w>this.open;w--)this.nodes[w-1].content.push(this.nodes[w].finish(g));this.nodes.length=this.open+1}}},{key:"finish",value:function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}},{key:"sync",value:function(g){for(var w=this.open;w>=0;w--){if(this.nodes[w]==g)return this.open=w,!0;this.localPreserveWS&&(this.nodes[w].options|=zt)}return!1}},{key:"currentPos",get:function(){this.closeExtra();for(var g=0,w=this.open;w>=0;w--){for(var N=this.nodes[w].content,_=N.length-1;_>=0;_--)g+=N[_].nodeSize;w&&g++}return g}},{key:"findAtPoint",value:function(g,w){if(this.find)for(var N=0;N<this.find.length;N++)this.find[N].node==g&&this.find[N].offset==w&&(this.find[N].pos=this.currentPos)}},{key:"findInside",value:function(g){if(this.find)for(var w=0;w<this.find.length;w++)this.find[w].pos==null&&g.nodeType==1&&g.contains(this.find[w].node)&&(this.find[w].pos=this.currentPos)}},{key:"findAround",value:function(g,w,N){if(g!=w&&this.find){for(var _=0;_<this.find.length;_++)if(this.find[_].pos==null&&g.nodeType==1&&g.contains(this.find[_].node)){var j=w.compareDocumentPosition(this.find[_].node);j&(N?2:4)&&(this.find[_].pos=this.currentPos)}}}},{key:"findInText",value:function(g){if(this.find)for(var w=0;w<this.find.length;w++)this.find[w].node==g&&(this.find[w].pos=this.currentPos-(g.nodeValue.length-this.find[w].offset))}},{key:"matchesContext",value:function(g){var w=this;if(g.indexOf("|")>-1)return g.split(/\s*\|\s*/).some(this.matchesContext,this);var N=g.split("/"),_=this.options.context,j=!this.isOpen&&(!_||_.parent.type==this.nodes[0].type),X=-(_?_.depth+1:0)+(j?0:1),ce=function pe(Ne,Oe){for(;Ne>=0;Ne--){var Be=N[Ne];if(Be==""){if(Ne==N.length-1||Ne==0)continue;for(;Oe>=X;Oe--)if(pe(Ne-1,Oe))return!0;return!1}else{var et=Oe>0||Oe==0&&j?w.nodes[Oe].type:_&&Oe>=X?_.node(Oe-X).type:null;if(!et||et.name!=Be&&!et.isInGroup(Be))return!1;Oe--}}return!0};return ce(N.length-1,this.open)}},{key:"textblockFromContext",value:function(){var g=this.options.context;if(g)for(var w=g.depth;w>=0;w--){var N=g.node(w).contentMatchAt(g.indexAfter(w)).defaultType;if(N&&N.isTextblock&&N.defaultAttrs)return N}for(var _ in this.parser.schema.nodes){var j=this.parser.schema.nodes[_];if(j.isTextblock&&j.defaultAttrs)return j}}}]),I})();function B(I){for(var M=I.firstChild,g=null;M;M=M.nextSibling){var w=M.nodeType==1?M.nodeName.toLowerCase():null;w&&tn.hasOwnProperty(w)&&g?(g.appendChild(M),M=g):w=="li"?g=M:w&&(g=null)}}function H(I,M){return(I.matches||I.msMatchesSelector||I.webkitMatchesSelector||I.mozMatchesSelector).call(I,M)}function K(I){var M={};for(var g in I)M[g]=I[g];return M}function he(I,M){var g=M.schema.nodes,w=function(){var X=g[_];if(!X.allowsMarkType(I))return 0;var ce=[],pe=function Ne(Oe){ce.push(Oe);for(var Be=0;Be<Oe.edgeCount;Be++){var et=Oe.edge(Be),wt=et.type,Vt=et.next;if(wt==M||ce.indexOf(Vt)<0&&Ne(Vt))return!0}};if(pe(X.contentMatch))return{v:!0}},N;for(var _ in g)if(N=w(),N!==0&&N)return N.v}var Ce=(function(){function I(M,g){F(this,I),this.nodes=M,this.marks=g}return Y(I,[{key:"serializeFragment",value:function(g){var w=this,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=arguments.length>2?arguments[2]:void 0;_||(_=J(N).createDocumentFragment());var j=_,X=[];return g.forEach(function(ce){if(X.length||ce.marks.length){for(var pe=0,Ne=0;pe<X.length&&Ne<ce.marks.length;){var Oe=ce.marks[Ne];if(!w.marks[Oe.type.name]){Ne++;continue}if(!Oe.eq(X[pe][0])||Oe.type.spec.spanning===!1)break;pe++,Ne++}for(;pe<X.length;)j=X.pop()[1];for(;Ne<ce.marks.length;){var Be=ce.marks[Ne++],et=w.serializeMark(Be,ce.isInline,N);et&&(X.push([Be,j]),j.appendChild(et.dom),j=et.contentDOM||et.dom)}}j.appendChild(w.serializeNodeInner(ce,N))}),_}},{key:"serializeNodeInner",value:function(g,w){var N=Ze(J(w),this.nodes[g.type.name](g),null,g.attrs),_=N.dom,j=N.contentDOM;if(j){if(g.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(g.content,w,j)}return _}},{key:"serializeNode",value:function(g){for(var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=this.serializeNodeInner(g,w),_=g.marks.length-1;_>=0;_--){var j=this.serializeMark(g.marks[_],g.isInline,w);j&&((j.contentDOM||j.dom).appendChild(N),N=j.dom)}return N}},{key:"serializeMark",value:function(g,w){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},_=this.marks[g.type.name];return _&&Ze(J(N),_(g,w),null,g.attrs)}}],[{key:"renderSpec",value:function(g,w){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,_=arguments.length>3?arguments[3]:void 0;return Ze(g,w,N,_)}},{key:"fromSchema",value:function(g){return g.cached.domSerializer||(g.cached.domSerializer=new I(this.nodesFromSchema(g),this.marksFromSchema(g)))}},{key:"nodesFromSchema",value:function(g){var w=re(g.nodes);return w.text||(w.text=function(N){return N.text}),w}},{key:"marksFromSchema",value:function(g){return re(g.marks)}}]),I})();function re(I){var M={};for(var g in I){var w=I[g].spec.toDOM;w&&(M[g]=w)}return M}function J(I){return I.document||window.document}var me=new WeakMap;function Te(I){var M=me.get(I);return M===void 0&&me.set(I,M=He(I)),M}function He(I){var M=null;function g(w){if(w&&P(w)=="object")if(Array.isArray(w))if(typeof w[0]=="string")M||(M=[]),M.push(w);else for(var N=0;N<w.length;N++)g(w[N]);else for(var _ in w)g(w[_])}return g(I),M}function Ze(I,M,g,w){if(typeof M=="string")return{dom:I.createTextNode(M)};if(M.nodeType!=null)return{dom:M};if(M.dom&&M.dom.nodeType!=null)return M;var N=M[0],_;if(typeof N!="string")throw new RangeError("Invalid array passed to renderSpec");if(w&&(_=Te(w))&&_.indexOf(M)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");var j=N.indexOf(" ");j>0&&(g=N.slice(0,j),N=N.slice(j+1));var X,ce=g?I.createElementNS(g,N):I.createElement(N),pe=M[1],Ne=1;if(pe&&P(pe)=="object"&&pe.nodeType==null&&!Array.isArray(pe)){Ne=2;for(var Oe in pe)if(pe[Oe]!=null){var Be=Oe.indexOf(" ");Be>0?ce.setAttributeNS(Oe.slice(0,Be),Oe.slice(Be+1),pe[Oe]):Oe=="style"&&ce.style?ce.style.cssText=pe[Oe]:ce.setAttribute(Oe,pe[Oe])}}for(var et=Ne;et<M.length;et++){var wt=M[et];if(wt===0){if(et<M.length-1||et>Ne)throw new RangeError("Content hole must be the only child of its parent node");return{dom:ce,contentDOM:ce}}else{var Vt=Ze(I,wt,g,w),rn=Vt.dom,zn=Vt.contentDOM;if(ce.appendChild(rn),zn){if(X)throw new RangeError("Multiple content holes");X=zn}}}return{dom:ce,contentDOM:X}}return Kr.ContentMatch=Xe,Kr.DOMParser=Gr,Kr.DOMSerializer=Ce,Kr.Fragment=ge,Kr.Mark=Fe,Kr.MarkType=ar,Kr.Node=ke,Kr.NodeRange=ae,Kr.NodeType=Wt,Kr.ReplaceError=bt,Kr.ResolvedPos=Qt,Kr.Schema=Hr,Kr.Slice=ct,Kr}var vd={},Vy;function ep(){return Vy||(Vy=1,(function(r){function e(W){var $=typeof Map=="function"?new Map:void 0;return e=function(D){if(D===null||!n(D))return D;if(typeof D!="function")throw new TypeError("Super expression must either be null or a function");if(typeof $<"u"){if($.has(D))return $.get(D);$.set(D,B)}function B(){return t(D,arguments,p(this).constructor)}return B.prototype=Object.create(D.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),a(B,D)},e(W)}function t(W,$,R){return f()?t=Reflect.construct.bind():t=function(B,H,K){var he=[null];he.push.apply(he,H);var Ce=Function.bind.apply(B,he),re=new Ce;return K&&a(re,K.prototype),re},t.apply(null,arguments)}function n(W){try{return Function.toString.call(W).indexOf("[native code]")!==-1}catch{return typeof W=="function"}}function i(W,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function");W.prototype=Object.create($&&$.prototype,{constructor:{value:W,writable:!0,configurable:!0}}),Object.defineProperty(W,"prototype",{writable:!1}),$&&a(W,$)}function a(W,$){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(D,B){return D.__proto__=B,D},a(W,$)}function o(W){var $=f();return function(){var D=p(W),B;if($){var H=p(this).constructor;B=Reflect.construct(D,arguments,H)}else B=D.apply(this,arguments);return s(this,B)}}function s(W,$){if($&&(b($)==="object"||typeof $=="function"))return $;if($!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l(W)}function l(W){if(W===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W}function f(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function p(W){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},p(W)}function b(W){"@babel/helpers - typeof";return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},b(W)}function T(W,$){if(!(W instanceof $))throw new TypeError("Cannot call a class as a function")}function x(W,$){for(var R=0;R<$.length;R++){var D=$[R];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(W,P(D.key),D)}}function E(W,$,R){return $&&x(W.prototype,$),R&&x(W,R),Object.defineProperty(W,"prototype",{writable:!1}),W}function P(W){var $=F(W,"string");return b($)==="symbol"?$:String($)}function F(W,$){if(b(W)!=="object"||W===null)return W;var R=W[Symbol.toPrimitive];if(R!==void 0){var D=R.call(W,$);if(b(D)!=="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(W)}var z=Qu(),Y=65535,ee=Math.pow(2,16);function se(W,$){return W+$*ee}function de(W){return W&Y}function oe(W){return(W-(W&Y))/ee}var le=1,ge=2,xe=4,Ie=8,ot=(function(){function W($,R,D){T(this,W),this.pos=$,this.delInfo=R,this.recover=D}return E(W,[{key:"deleted",get:function(){return(this.delInfo&Ie)>0}},{key:"deletedBefore",get:function(){return(this.delInfo&(le|xe))>0}},{key:"deletedAfter",get:function(){return(this.delInfo&(ge|xe))>0}},{key:"deletedAcross",get:function(){return(this.delInfo&xe)>0}}]),W})(),Fe=(function(){function W($){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(T(this,W),this.ranges=$,this.inverted=R,!$.length&&W.empty)return W.empty}return E(W,[{key:"recover",value:function(R){var D=0,B=de(R);if(!this.inverted)for(var H=0;H<B;H++)D+=this.ranges[H*3+2]-this.ranges[H*3+1];return this.ranges[B*3]+D+oe(R)}},{key:"mapResult",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return this._map(R,D,!1)}},{key:"map",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return this._map(R,D,!0)}},{key:"_map",value:function(R,D,B){for(var H=0,K=this.inverted?2:1,he=this.inverted?1:2,Ce=0;Ce<this.ranges.length;Ce+=3){var re=this.ranges[Ce]-(this.inverted?H:0);if(re>R)break;var J=this.ranges[Ce+K],me=this.ranges[Ce+he],Te=re+J;if(R<=Te){var He=J?R==re?-1:R==Te?1:D:D,Ze=re+H+(He<0?0:me);if(B)return Ze;var I=R==(D<0?re:Te)?null:se(Ce/3,R-re),M=R==re?ge:R==Te?le:xe;return(D<0?R!=re:R!=Te)&&(M|=Ie),new ot(Ze,M,I)}H+=me-J}return B?R+H:new ot(R+H,0,null)}},{key:"touches",value:function(R,D){for(var B=0,H=de(D),K=this.inverted?2:1,he=this.inverted?1:2,Ce=0;Ce<this.ranges.length;Ce+=3){var re=this.ranges[Ce]-(this.inverted?B:0);if(re>R)break;var J=this.ranges[Ce+K],me=re+J;if(R<=me&&Ce==H*3)return!0;B+=this.ranges[Ce+he]-J}return!1}},{key:"forEach",value:function(R){for(var D=this.inverted?2:1,B=this.inverted?1:2,H=0,K=0;H<this.ranges.length;H+=3){var he=this.ranges[H],Ce=he-(this.inverted?K:0),re=he+(this.inverted?0:K),J=this.ranges[H+D],me=this.ranges[H+B];R(Ce,Ce+J,re,re+me),K+=me-J}}},{key:"invert",value:function(){return new W(this.ranges,!this.inverted)}},{key:"toString",value:function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}}],[{key:"offset",value:function(R){return R==0?W.empty:new W(R<0?[0,-R,0]:[0,0,R])}}]),W})();Fe.empty=new Fe([]);var bt=(function(){function W($,R){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,B=arguments.length>3&&arguments[3]!==void 0?arguments[3]:$?$.length:0;T(this,W),this.mirror=R,this.from=D,this.to=B,this._maps=$||[],this.ownData=!($||R)}return E(W,[{key:"maps",get:function(){return this._maps}},{key:"slice",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.maps.length;return new W(this._maps,this.mirror,R,D)}},{key:"appendMap",value:function(R,D){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(R),D!=null&&this.setMirror(this._maps.length-1,D)}},{key:"appendMapping",value:function(R){for(var D=0,B=this._maps.length;D<R._maps.length;D++){var H=R.getMirror(D);this.appendMap(R._maps[D],H!=null&&H<D?B+H:void 0)}}},{key:"getMirror",value:function(R){if(this.mirror){for(var D=0;D<this.mirror.length;D++)if(this.mirror[D]==R)return this.mirror[D+(D%2?-1:1)]}}},{key:"setMirror",value:function(R,D){this.mirror||(this.mirror=[]),this.mirror.push(R,D)}},{key:"appendMappingInverted",value:function(R){for(var D=R.maps.length-1,B=this._maps.length+R._maps.length;D>=0;D--){var H=R.getMirror(D);this.appendMap(R._maps[D].invert(),H!=null&&H>D?B-H-1:void 0)}}},{key:"invert",value:function(){var R=new W;return R.appendMappingInverted(this),R}},{key:"map",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;if(this.mirror)return this._map(R,D,!0);for(var B=this.from;B<this.to;B++)R=this._maps[B].map(R,D);return R}},{key:"mapResult",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return this._map(R,D,!1)}},{key:"_map",value:function(R,D,B){for(var H=0,K=this.from;K<this.to;K++){var he=this._maps[K],Ce=he.mapResult(R,D);if(Ce.recover!=null){var re=this.getMirror(K);if(re!=null&&re>K&&re<this.to){K=re,R=this._maps[re].recover(Ce.recover);continue}}H|=Ce.delInfo,R=Ce.pos}return B?R:new ot(R,H,null)}}]),W})(),ct=Object.create(null),mt=(function(){function W(){T(this,W)}return E(W,[{key:"getMap",value:function(){return Fe.empty}},{key:"merge",value:function(R){return null}}],[{key:"fromJSON",value:function(R,D){if(!D||!D.stepType)throw new RangeError("Invalid input for Step.fromJSON");var B=ct[D.stepType];if(!B)throw new RangeError("No step type ".concat(D.stepType," defined"));return B.fromJSON(R,D)}},{key:"jsonID",value:function(R,D){if(R in ct)throw new RangeError("Duplicate use of step JSON ID "+R);return ct[R]=D,D.prototype.jsonID=R,D}}]),W})(),nt=(function(){function W($,R){T(this,W),this.doc=$,this.failed=R}return E(W,null,[{key:"ok",value:function(R){return new W(R,null)}},{key:"fail",value:function(R){return new W(null,R)}},{key:"fromReplace",value:function(R,D,B,H){try{return W.ok(R.replace(D,B,H))}catch(K){if(K instanceof z.ReplaceError)return W.fail(K.message);throw K}}}]),W})();function Et(W,$,R){for(var D=[],B=0;B<W.childCount;B++){var H=W.child(B);H.content.size&&(H=H.copy(Et(H.content,$,H))),H.isInline&&(H=$(H,R,B)),D.push(H)}return z.Fragment.fromArray(D)}var It=(function(W){i(R,W);var $=o(R);function R(D,B,H){var K;return T(this,R),K=$.call(this),K.from=D,K.to=B,K.mark=H,K}return E(R,[{key:"apply",value:function(B){var H=this,K=B.slice(this.from,this.to),he=B.resolve(this.from),Ce=he.node(he.sharedDepth(this.to)),re=new z.Slice(Et(K.content,function(J,me){return!J.isAtom||!me.type.allowsMarkType(H.mark.type)?J:J.mark(H.mark.addToSet(J.marks))},Ce),K.openStart,K.openEnd);return nt.fromReplace(B,this.from,this.to,re)}},{key:"invert",value:function(){return new Ut(this.from,this.to,this.mark)}},{key:"map",value:function(B){var H=B.mapResult(this.from,1),K=B.mapResult(this.to,-1);return H.deleted&&K.deleted||H.pos>=K.pos?null:new R(H.pos,K.pos,this.mark)}},{key:"merge",value:function(B){return B instanceof R&&B.mark.eq(this.mark)&&this.from<=B.to&&this.to>=B.from?new R(Math.min(this.from,B.from),Math.max(this.to,B.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(B,H){if(typeof H.from!="number"||typeof H.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new R(H.from,H.to,B.markFromJSON(H.mark))}}]),R})(mt);mt.jsonID("addMark",It);var Ut=(function(W){i(R,W);var $=o(R);function R(D,B,H){var K;return T(this,R),K=$.call(this),K.from=D,K.to=B,K.mark=H,K}return E(R,[{key:"apply",value:function(B){var H=this,K=B.slice(this.from,this.to),he=new z.Slice(Et(K.content,function(Ce){return Ce.mark(H.mark.removeFromSet(Ce.marks))},B),K.openStart,K.openEnd);return nt.fromReplace(B,this.from,this.to,he)}},{key:"invert",value:function(){return new It(this.from,this.to,this.mark)}},{key:"map",value:function(B){var H=B.mapResult(this.from,1),K=B.mapResult(this.to,-1);return H.deleted&&K.deleted||H.pos>=K.pos?null:new R(H.pos,K.pos,this.mark)}},{key:"merge",value:function(B){return B instanceof R&&B.mark.eq(this.mark)&&this.from<=B.to&&this.to>=B.from?new R(Math.min(this.from,B.from),Math.max(this.to,B.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(B,H){if(typeof H.from!="number"||typeof H.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new R(H.from,H.to,B.markFromJSON(H.mark))}}]),R})(mt);mt.jsonID("removeMark",Ut);var Ye=(function(W){i(R,W);var $=o(R);function R(D,B){var H;return T(this,R),H=$.call(this),H.pos=D,H.mark=B,H}return E(R,[{key:"apply",value:function(B){var H=B.nodeAt(this.pos);if(!H)return nt.fail("No node at mark step's position");var K=H.type.create(H.attrs,null,this.mark.addToSet(H.marks));return nt.fromReplace(B,this.pos,this.pos+1,new z.Slice(z.Fragment.from(K),0,H.isLeaf?0:1))}},{key:"invert",value:function(B){var H=B.nodeAt(this.pos);if(H){var K=this.mark.addToSet(H.marks);if(K.length==H.marks.length){for(var he=0;he<H.marks.length;he++)if(!H.marks[he].isInSet(K))return new R(this.pos,H.marks[he]);return new R(this.pos,this.mark)}}return new dt(this.pos,this.mark)}},{key:"map",value:function(B){var H=B.mapResult(this.pos,1);return H.deletedAfter?null:new R(H.pos,this.mark)}},{key:"toJSON",value:function(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}}],[{key:"fromJSON",value:function(B,H){if(typeof H.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new R(H.pos,B.markFromJSON(H.mark))}}]),R})(mt);mt.jsonID("addNodeMark",Ye);var dt=(function(W){i(R,W);var $=o(R);function R(D,B){var H;return T(this,R),H=$.call(this),H.pos=D,H.mark=B,H}return E(R,[{key:"apply",value:function(B){var H=B.nodeAt(this.pos);if(!H)return nt.fail("No node at mark step's position");var K=H.type.create(H.attrs,null,this.mark.removeFromSet(H.marks));return nt.fromReplace(B,this.pos,this.pos+1,new z.Slice(z.Fragment.from(K),0,H.isLeaf?0:1))}},{key:"invert",value:function(B){var H=B.nodeAt(this.pos);return!H||!this.mark.isInSet(H.marks)?this:new Ye(this.pos,this.mark)}},{key:"map",value:function(B){var H=B.mapResult(this.pos,1);return H.deletedAfter?null:new R(H.pos,this.mark)}},{key:"toJSON",value:function(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}}],[{key:"fromJSON",value:function(B,H){if(typeof H.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new R(H.pos,B.markFromJSON(H.mark))}}]),R})(mt);mt.jsonID("removeNodeMark",dt);var st=(function(W){i(R,W);var $=o(R);function R(D,B,H){var K,he=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return T(this,R),K=$.call(this),K.from=D,K.to=B,K.slice=H,K.structure=he,K}return E(R,[{key:"apply",value:function(B){return this.structure&&Mt(B,this.from,this.to)?nt.fail("Structure replace would overwrite content"):nt.fromReplace(B,this.from,this.to,this.slice)}},{key:"getMap",value:function(){return new Fe([this.from,this.to-this.from,this.slice.size])}},{key:"invert",value:function(B){return new R(this.from,this.from+this.slice.size,B.slice(this.from,this.to))}},{key:"map",value:function(B){var H=B.mapResult(this.from,1),K=B.mapResult(this.to,-1);return H.deletedAcross&&K.deletedAcross?null:new R(H.pos,Math.max(H.pos,K.pos),this.slice,this.structure)}},{key:"merge",value:function(B){if(!(B instanceof R)||B.structure||this.structure)return null;if(this.from+this.slice.size==B.from&&!this.slice.openEnd&&!B.slice.openStart){var H=this.slice.size+B.slice.size==0?z.Slice.empty:new z.Slice(this.slice.content.append(B.slice.content),this.slice.openStart,B.slice.openEnd);return new R(this.from,this.to+(B.to-B.from),H,this.structure)}else if(B.to==this.from&&!this.slice.openStart&&!B.slice.openEnd){var K=this.slice.size+B.slice.size==0?z.Slice.empty:new z.Slice(B.slice.content.append(this.slice.content),B.slice.openStart,this.slice.openEnd);return new R(B.from,this.to,K,this.structure)}else return null}},{key:"toJSON",value:function(){var B={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(B.slice=this.slice.toJSON()),this.structure&&(B.structure=!0),B}}],[{key:"fromJSON",value:function(B,H){if(typeof H.from!="number"||typeof H.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new R(H.from,H.to,z.Slice.fromJSON(B,H.slice),!!H.structure)}}]),R})(mt);mt.jsonID("replace",st);var St=(function(W){i(R,W);var $=o(R);function R(D,B,H,K,he,Ce){var re,J=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1;return T(this,R),re=$.call(this),re.from=D,re.to=B,re.gapFrom=H,re.gapTo=K,re.slice=he,re.insert=Ce,re.structure=J,re}return E(R,[{key:"apply",value:function(B){if(this.structure&&(Mt(B,this.from,this.gapFrom)||Mt(B,this.gapTo,this.to)))return nt.fail("Structure gap-replace would overwrite content");var H=B.slice(this.gapFrom,this.gapTo);if(H.openStart||H.openEnd)return nt.fail("Gap is not a flat range");var K=this.slice.insertAt(this.insert,H.content);return K?nt.fromReplace(B,this.from,this.to,K):nt.fail("Content does not fit in gap")}},{key:"getMap",value:function(){return new Fe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}},{key:"invert",value:function(B){var H=this.gapTo-this.gapFrom;return new R(this.from,this.from+this.slice.size+H,this.from+this.insert,this.from+this.insert+H,B.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}},{key:"map",value:function(B){var H=B.mapResult(this.from,1),K=B.mapResult(this.to,-1),he=this.from==this.gapFrom?H.pos:B.map(this.gapFrom,-1),Ce=this.to==this.gapTo?K.pos:B.map(this.gapTo,1);return H.deletedAcross&&K.deletedAcross||he<H.pos||Ce>K.pos?null:new R(H.pos,K.pos,he,Ce,this.slice,this.insert,this.structure)}},{key:"toJSON",value:function(){var B={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(B.slice=this.slice.toJSON()),this.structure&&(B.structure=!0),B}}],[{key:"fromJSON",value:function(B,H){if(typeof H.from!="number"||typeof H.to!="number"||typeof H.gapFrom!="number"||typeof H.gapTo!="number"||typeof H.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new R(H.from,H.to,H.gapFrom,H.gapTo,z.Slice.fromJSON(B,H.slice),H.insert,!!H.structure)}}]),R})(mt);mt.jsonID("replaceAround",St);function Mt(W,$,R){for(var D=W.resolve($),B=R-$,H=D.depth;B>0&&H>0&&D.indexAfter(H)==D.node(H).childCount;)H--,B--;if(B>0)for(var K=D.node(H).maybeChild(D.indexAfter(H));B>0;){if(!K||K.isLeaf)return!0;K=K.firstChild,B--}return!1}function nr(W,$,R,D){var B=[],H=[],K,he;W.doc.nodesBetween($,R,function(Ce,re,J){if(Ce.isInline){var me=Ce.marks;if(!D.isInSet(me)&&J.type.allowsMarkType(D.type)){for(var Te=Math.max(re,$),He=Math.min(re+Ce.nodeSize,R),Ze=D.addToSet(me),I=0;I<me.length;I++)me[I].isInSet(Ze)||(K&&K.to==Te&&K.mark.eq(me[I])?K.to=He:B.push(K=new Ut(Te,He,me[I])));he&&he.to==Te?he.to=He:H.push(he=new It(Te,He,D))}}}),B.forEach(function(Ce){return W.step(Ce)}),H.forEach(function(Ce){return W.step(Ce)})}function $t(W,$,R,D){var B=[],H=0;W.doc.nodesBetween($,R,function(K,he){if(K.isInline){H++;var Ce=null;if(D instanceof z.MarkType)for(var re=K.marks,J;J=D.isInSet(re);)(Ce||(Ce=[])).push(J),re=J.removeFromSet(re);else D?D.isInSet(K.marks)&&(Ce=[D]):Ce=K.marks;if(Ce&&Ce.length)for(var me=Math.min(he+K.nodeSize,R),Te=0;Te<Ce.length;Te++){for(var He=Ce[Te],Ze=void 0,I=0;I<B.length;I++){var M=B[I];M.step==H-1&&He.eq(B[I].style)&&(Ze=M)}Ze?(Ze.to=me,Ze.step=H):B.push({style:He,from:Math.max(he,$),to:me,step:H})}}}),B.forEach(function(K){return W.step(new Ut(K.from,K.to,K.style))})}function Qt(W,$,R){for(var D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:R.contentMatch,B=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,H=W.doc.nodeAt($),K=[],he=$+1,Ce=0;Ce<H.childCount;Ce++){var re=H.child(Ce),J=he+re.nodeSize,me=D.matchType(re.type);if(!me)K.push(new st(he,J,z.Slice.empty));else{D=me;for(var Te=0;Te<re.marks.length;Te++)R.allowsMarkType(re.marks[Te].type)||W.step(new Ut(he,J,re.marks[Te]));if(B&&re.isText&&R.whitespace!="pre")for(var He=void 0,Ze=/\r?\n|\r/g,I=void 0;He=Ze.exec(re.text);)I||(I=new z.Slice(z.Fragment.from(R.schema.text(" ",R.allowedMarks(re.marks))),0,0)),K.push(new st(he+He.index,he+He.index+He[0].length,I))}he=J}if(!D.validEnd){var M=D.fillBefore(z.Fragment.empty,!0);W.replace(he,he,new z.Slice(M,0,0))}for(var g=K.length-1;g>=0;g--)W.step(K[g])}function be(W,$,R){return($==0||W.canReplace($,W.childCount))&&(R==W.childCount||W.canReplace(0,R))}function ve(W){for(var $=W.parent,R=$.content.cutByIndex(W.startIndex,W.endIndex),D=W.depth,B=0,H=0;;--D){var K=W.$from.node(D),he=W.$from.index(D)+B,Ce=W.$to.indexAfter(D)-H;if(D<W.depth&&K.canReplace(he,Ce,R))return D;if(D==0||K.type.spec.isolating||!be(K,he,Ce))break;he&&(B=1),Ce<K.childCount&&(H=1)}return null}function ie(W,$,R){for(var D=$.$from,B=$.$to,H=$.depth,K=D.before(H+1),he=B.after(H+1),Ce=K,re=he,J=z.Fragment.empty,me=0,Te=H,He=!1;Te>R;Te--)He||D.index(Te)>0?(He=!0,J=z.Fragment.from(D.node(Te).copy(J)),me++):Ce--;for(var Ze=z.Fragment.empty,I=0,M=H,g=!1;M>R;M--)g||B.after(M+1)<B.end(M)?(g=!0,Ze=z.Fragment.from(B.node(M).copy(Ze)),I++):re++;W.step(new St(Ce,re,K,he,new z.Slice(J.append(Ze),me,I),J.size-me,!0))}function ae(W,$){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:W,B=ke(W,$),H=B&&Ee(D,$);return H?B.map(Z).concat({type:$,attrs:R}).concat(H.map(Z)):null}function Z(W){return{type:W,attrs:null}}function ke(W,$){var R=W.parent,D=W.startIndex,B=W.endIndex,H=R.contentMatchAt(D).findWrapping($);if(!H)return null;var K=H.length?H[0]:$;return R.canReplaceWith(D,B,K)?H:null}function Ee(W,$){var R=W.parent,D=W.startIndex,B=W.endIndex,H=R.child(D),K=$.contentMatch.findWrapping(H.type);if(!K)return null;for(var he=K.length?K[K.length-1]:$,Ce=he.contentMatch,re=D;Ce&&re<B;re++)Ce=Ce.matchType(R.child(re).type);return!Ce||!Ce.validEnd?null:K}function ze(W,$,R){for(var D=z.Fragment.empty,B=R.length-1;B>=0;B--){if(D.size){var H=R[B].type.contentMatch.matchFragment(D);if(!H||!H.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}D=z.Fragment.from(R[B].type.create(R[B].attrs,D))}var K=$.start,he=$.end;W.step(new St(K,he,K,he,new z.Slice(D,0,0),R.length,!0))}function Xe(W,$,R,D,B){if(!D.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var H=W.steps.length;W.doc.nodesBetween($,R,function(K,he){var Ce=typeof B=="function"?B(K):B;if(K.isTextblock&&!K.hasMarkup(D,Ce)&&Ht(W.doc,W.mapping.slice(H).map(he),D)){var re=null;if(D.schema.linebreakReplacement){var J=D.whitespace=="pre",me=!!D.contentMatch.matchType(D.schema.linebreakReplacement);J&&!me?re=!1:!J&&me&&(re=!0)}re===!1&<(W,K,he,H),Qt(W,W.mapping.slice(H).map(he,1),D,void 0,re===null);var Te=W.mapping.slice(H),He=Te.map(he,1),Ze=Te.map(he+K.nodeSize,1);return W.step(new St(He,Ze,He+1,Ze-1,new z.Slice(z.Fragment.from(D.create(Ce,null,K.marks)),0,0),1,!0)),re===!0&&kt(W,K,he,H),!1}})}function kt(W,$,R,D){$.forEach(function(B,H){if(B.isText)for(var K,he=/\r?\n|\r/g;K=he.exec(B.text);){var Ce=W.mapping.slice(D).map(R+1+H+K.index);W.replaceWith(Ce,Ce+1,$.type.schema.linebreakReplacement.create())}})}function lt(W,$,R,D){$.forEach(function(B,H){if(B.type==B.type.schema.linebreakReplacement){var K=W.mapping.slice(D).map(R+1+H);W.replaceWith(K,K+1,$.type.schema.text(`
|
|
676
|
-
`))}})}function Ht(W,$,R){var D=W.resolve($),B=D.index();return D.parent.canReplaceWith(B,B+1,R)}function At(W,$,R,D,B){var H=W.doc.nodeAt($);if(!H)throw new RangeError("No node at given position");R||(R=H.type);var K=R.create(D,null,B||H.marks);if(H.isLeaf)return W.replaceWith($,$+H.nodeSize,K);if(!R.validContent(H.content))throw new RangeError("Invalid content for node type "+R.name);W.step(new St($,$+H.nodeSize,$+1,$+H.nodeSize-1,new z.Slice(z.Fragment.from(K),0,0),1,!0))}function jt(W,$){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,D=arguments.length>3?arguments[3]:void 0,B=W.resolve($),H=B.depth-R,K=D&&D[D.length-1]||B.parent;if(H<0||B.parent.type.spec.isolating||!B.parent.canReplace(B.index(),B.parent.childCount)||!K.type.validContent(B.parent.content.cutByIndex(B.index(),B.parent.childCount)))return!1;for(var he=B.depth-1,Ce=R-2;he>H;he--,Ce--){var re=B.node(he),J=B.index(he);if(re.type.spec.isolating)return!1;var me=re.content.cutByIndex(J,re.childCount),Te=D&&D[Ce+1];Te&&(me=me.replaceChild(0,Te.type.create(Te.attrs)));var He=D&&D[Ce]||re;if(!re.canReplace(J+1,re.childCount)||!He.type.validContent(me))return!1}var Ze=B.indexAfter(H),I=D&&D[0];return B.node(H).canReplaceWith(Ze,Ze,I?I.type:B.node(H+1).type)}function Ot(W,$){for(var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,D=arguments.length>3?arguments[3]:void 0,B=W.doc.resolve($),H=z.Fragment.empty,K=z.Fragment.empty,he=B.depth,Ce=B.depth-R,re=R-1;he>Ce;he--,re--){H=z.Fragment.from(B.node(he).copy(H));var J=D&&D[re];K=z.Fragment.from(J?J.type.create(J.attrs,K):B.node(he).copy(K))}W.step(new st($,$,new z.Slice(H.append(K),R,R),!0))}function hr(W,$){var R=W.resolve($),D=R.index();return Qr(R.nodeBefore,R.nodeAfter)&&R.parent.canReplace(D,D+1)}function Sn(W,$){$.content.size||W.type.compatibleContent($.type);for(var R=W.contentMatchAt(W.childCount),D=W.type.schema.linebreakReplacement,B=0;B<$.childCount;B++){var H=$.child(B),K=H.type==D?W.type.schema.nodes.text:H.type;if(R=R.matchType(K),!R||!W.type.allowsMarks(H.marks))return!1}return R.validEnd}function Qr(W,$){return!!(W&&$&&!W.isLeaf&&Sn(W,$))}function ir(W,$){for(var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1,D=W.resolve($),B=D.depth;;B--){var H=void 0,K=void 0,he=D.index(B);if(B==D.depth?(H=D.nodeBefore,K=D.nodeAfter):R>0?(H=D.node(B+1),he++,K=D.node(B).maybeChild(he)):(H=D.node(B).maybeChild(he-1),K=D.node(B+1)),H&&!H.isTextblock&&Qr(H,K)&&D.node(B).canReplace(he,he+1))return $;if(B==0)break;$=R<0?D.before(B):D.after(B)}}function _e(W,$,R){var D=null,B=W.doc.type.schema.linebreakReplacement,H=W.doc.resolve($-R),K=H.node().type;if(B&&K.inlineContent){var he=K.whitespace=="pre",Ce=!!K.contentMatch.matchType(B);he&&!Ce?D=!1:!he&&Ce&&(D=!0)}var re=W.steps.length;if(D===!1){var J=W.doc.resolve($+R);lt(W,J.node(),J.before(),re)}K.inlineContent&&Qt(W,$+R-1,K,H.node().contentMatchAt(H.index()),D==null);var me=W.mapping.slice(re),Te=me.map($-R);if(W.step(new st(Te,me.map($+R,-1),z.Slice.empty,!0)),D===!0){var He=W.doc.resolve(Te);kt(W,He.node(),He.before(),W.steps.length)}return W}function Ue(W,$,R){var D=W.resolve($);if(D.parent.canReplaceWith(D.index(),D.index(),R))return $;if(D.parentOffset==0)for(var B=D.depth-1;B>=0;B--){var H=D.index(B);if(D.node(B).canReplaceWith(H,H,R))return D.before(B+1);if(H>0)return null}if(D.parentOffset==D.parent.content.size)for(var K=D.depth-1;K>=0;K--){var he=D.indexAfter(K);if(D.node(K).canReplaceWith(he,he,R))return D.after(K+1);if(he<D.node(K).childCount)return null}return null}function at(W,$,R){var D=W.resolve($);if(!R.content.size)return $;for(var B=R.content,H=0;H<R.openStart;H++)B=B.firstChild.content;for(var K=1;K<=(R.openStart==0&&R.size?2:1);K++)for(var he=D.depth;he>=0;he--){var Ce=he==D.depth?0:D.pos<=(D.start(he+1)+D.end(he+1))/2?-1:1,re=D.index(he)+(Ce>0?1:0),J=D.node(he),me=!1;if(K==1)me=J.canReplace(re,re,B);else{var Te=J.contentMatchAt(re).findWrapping(B.firstChild.type);me=Te&&J.canReplaceWith(re,re,Te[0])}if(me)return Ce==0?D.pos:Ce<0?D.before(he+1):D.after(he+1)}return null}function ut(W,$){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:z.Slice.empty;if($==R&&!D.size)return null;var B=W.resolve($),H=W.resolve(R);return Ct(B,H,D)?new st($,R,D):new gr(B,H,D).fit()}function Ct(W,$,R){return!R.openStart&&!R.openEnd&&W.start()==$.start()&&W.parent.canReplace(W.index(),$.index(),R.content)}var gr=(function(){function W($,R,D){T(this,W),this.$from=$,this.$to=R,this.unplaced=D,this.frontier=[],this.placed=z.Fragment.empty;for(var B=0;B<=$.depth;B++){var H=$.node(B);this.frontier.push({type:H.type,match:H.contentMatchAt($.indexAfter(B))})}for(var K=$.depth;K>0;K--)this.placed=z.Fragment.from($.node(K).copy(this.placed))}return E(W,[{key:"depth",get:function(){return this.frontier.length-1}},{key:"fit",value:function(){for(;this.unplaced.size;){var R=this.findFittable();R?this.placeNodes(R):this.openMore()||this.dropNode()}var D=this.mustMoveInline(),B=this.placed.size-this.depth-this.$from.depth,H=this.$from,K=this.close(D<0?this.$to:H.doc.resolve(D));if(!K)return null;for(var he=this.placed,Ce=H.depth,re=K.depth;Ce&&re&&he.childCount==1;)he=he.firstChild.content,Ce--,re--;var J=new z.Slice(he,Ce,re);return D>-1?new St(H.pos,D,this.$to.pos,this.$to.end(),J,B):J.size||H.pos!=this.$to.pos?new st(H.pos,K.pos,J):null}},{key:"findFittable",value:function(){for(var R=this.unplaced.openStart,D=this.unplaced.content,B=0,H=this.unplaced.openEnd;B<R;B++){var K=D.firstChild;if(D.childCount>1&&(H=0),K.type.spec.isolating&&H<=B){R=B;break}D=K.content}for(var he=1;he<=2;he++)for(var Ce=he==1?R:this.unplaced.openStart;Ce>=0;Ce--){var re=void 0,J=null;Ce?(J=qr(this.unplaced.content,Ce-1).firstChild,re=J.content):re=this.unplaced.content;for(var me=re.firstChild,Te=this.depth;Te>=0;Te--){var He=this.frontier[Te],Ze=He.type,I=He.match,M=void 0,g=null;if(he==1&&(me?I.matchType(me.type)||(g=I.fillBefore(z.Fragment.from(me),!1)):J&&Ze.compatibleContent(J.type)))return{sliceDepth:Ce,frontierDepth:Te,parent:J,inject:g};if(he==2&&me&&(M=I.findWrapping(me.type)))return{sliceDepth:Ce,frontierDepth:Te,parent:J,wrap:M};if(J&&I.matchType(J.type))break}}}},{key:"openMore",value:function(){var R=this.unplaced,D=R.content,B=R.openStart,H=R.openEnd,K=qr(D,B);return!K.childCount||K.firstChild.isLeaf?!1:(this.unplaced=new z.Slice(D,B+1,Math.max(H,K.size+B>=D.size-H?B+1:0)),!0)}},{key:"dropNode",value:function(){var R=this.unplaced,D=R.content,B=R.openStart,H=R.openEnd,K=qr(D,B);if(K.childCount<=1&&B>0){var he=D.size-B<=B+K.size;this.unplaced=new z.Slice(_t(D,B-1,1),B-1,he?B-1:H)}else this.unplaced=new z.Slice(_t(D,B,1),B,H)}},{key:"placeNodes",value:function(R){for(var D=R.sliceDepth,B=R.frontierDepth,H=R.parent,K=R.inject,he=R.wrap;this.depth>B;)this.closeFrontierNode();if(he)for(var Ce=0;Ce<he.length;Ce++)this.openFrontierNode(he[Ce]);var re=this.unplaced,J=H?H.content:re.content,me=re.openStart-D,Te=0,He=[],Ze=this.frontier[B],I=Ze.match,M=Ze.type;if(K){for(var g=0;g<K.childCount;g++)He.push(K.child(g));I=I.matchFragment(K)}for(var w=J.size+D-(re.content.size-re.openEnd);Te<J.childCount;){var N=J.child(Te),_=I.matchType(N.type);if(!_)break;Te++,(Te>1||me==0||N.content.size)&&(I=_,He.push(pn(N.mark(M.allowedMarks(N.marks)),Te==1?me:0,Te==J.childCount?w:-1)))}var j=Te==J.childCount;j||(w=-1),this.placed=Wt(this.placed,B,z.Fragment.from(He)),this.frontier[B].match=I,j&&w<0&&H&&H.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var X=0,ce=J;X<w;X++){var pe=ce.lastChild;this.frontier.push({type:pe.type,match:pe.contentMatchAt(pe.childCount)}),ce=pe.content}this.unplaced=j?D==0?z.Slice.empty:new z.Slice(_t(re.content,D-1,1),D-1,w<0?re.openEnd:D-1):new z.Slice(_t(re.content,D,Te),re.openStart,re.openEnd)}},{key:"mustMoveInline",value:function(){if(!this.$to.parent.isTextblock)return-1;var R=this.frontier[this.depth],D;if(!R.type.isTextblock||!ar(this.$to,this.$to.depth,R.type,R.match,!1)||this.$to.depth==this.depth&&(D=this.findCloseLevel(this.$to))&&D.depth==this.depth)return-1;for(var B=this.$to.depth,H=this.$to.after(B);B>1&&H==this.$to.end(--B);)++H;return H}},{key:"findCloseLevel",value:function(R){e:for(var D=Math.min(this.depth,R.depth);D>=0;D--){var B=this.frontier[D],H=B.match,K=B.type,he=D<R.depth&&R.end(D+1)==R.pos+(R.depth-(D+1)),Ce=ar(R,D,K,H,he);if(Ce){for(var re=D-1;re>=0;re--){var J=this.frontier[re],me=J.match,Te=J.type,He=ar(R,re,Te,me,!0);if(!He||He.childCount)continue e}return{depth:D,fit:Ce,move:he?R.doc.resolve(R.after(D+1)):R}}}}},{key:"close",value:function(R){var D=this.findCloseLevel(R);if(!D)return null;for(;this.depth>D.depth;)this.closeFrontierNode();D.fit.childCount&&(this.placed=Wt(this.placed,D.depth,D.fit)),R=D.move;for(var B=D.depth+1;B<=R.depth;B++){var H=R.node(B),K=H.type.contentMatch.fillBefore(H.content,!0,R.index(B));this.openFrontierNode(H.type,H.attrs,K)}return R}},{key:"openFrontierNode",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,B=arguments.length>2?arguments[2]:void 0,H=this.frontier[this.depth];H.match=H.match.matchType(R),this.placed=Wt(this.placed,this.depth,z.Fragment.from(R.create(D,B))),this.frontier.push({type:R,match:R.contentMatch})}},{key:"closeFrontierNode",value:function(){var R=this.frontier.pop(),D=R.match.fillBefore(z.Fragment.empty,!0);D.childCount&&(this.placed=Wt(this.placed,this.frontier.length,D))}}]),W})();function _t(W,$,R){return $==0?W.cutByIndex(R,W.childCount):W.replaceChild(0,W.firstChild.copy(_t(W.firstChild.content,$-1,R)))}function Wt(W,$,R){return $==0?W.append(R):W.replaceChild(W.childCount-1,W.lastChild.copy(Wt(W.lastChild.content,$-1,R)))}function qr(W,$){for(var R=0;R<$;R++)W=W.firstChild.content;return W}function pn(W,$,R){if($<=0)return W;var D=W.content;return $>1&&(D=D.replaceChild(0,pn(D.firstChild,$-1,D.childCount==1?R-1:0))),$>0&&(D=W.type.contentMatch.fillBefore(D).append(D),R<=0&&(D=D.append(W.type.contentMatch.matchFragment(D).fillBefore(z.Fragment.empty,!0)))),W.copy(D)}function ar(W,$,R,D,B){var H=W.node($),K=B?W.indexAfter($):W.index($);if(K==H.childCount&&!R.compatibleContent(H.type))return null;var he=D.fillBefore(H.content,!0,K);return he&&!Hr(R,H.content,K)?he:null}function Hr(W,$,R){for(var D=R;D<$.childCount;D++)if(!W.allowsMarks($.child(D).marks))return!0;return!1}function xn(W){return W.spec.defining||W.spec.definingForContent}function vn(W,$,R,D){if(!D.size)return W.deleteRange($,R);var B=W.doc.resolve($),H=W.doc.resolve(R);if(Ct(B,H,D))return W.step(new st($,R,D));var K=or(B,H);K[K.length-1]==0&&K.pop();var he=-(B.depth+1);K.unshift(he);for(var Ce=B.depth,re=B.pos-1;Ce>0;Ce--,re--){var J=B.node(Ce).type.spec;if(J.defining||J.definingAsContext||J.isolating)break;K.indexOf(Ce)>-1?he=Ce:B.before(Ce)==re&&K.splice(1,0,-Ce)}for(var me=K.indexOf(he),Te=[],He=D.openStart,Ze=D.content,I=0;;I++){var M=Ze.firstChild;if(Te.push(M),I==D.openStart)break;Ze=M.content}for(var g=He-1;g>=0;g--){var w=Te[g],N=xn(w.type);if(N&&!w.sameMarkup(B.node(Math.abs(he)-1)))He=g;else if(N||!w.type.isTextblock)break}for(var _=D.openStart;_>=0;_--){var j=(_+He+1)%(D.openStart+1),X=Te[j];if(X)for(var ce=0;ce<K.length;ce++){var pe=K[(ce+me)%K.length],Ne=!0;pe<0&&(Ne=!1,pe=-pe);var Oe=B.node(pe-1),Be=B.index(pe-1);if(Oe.canReplaceWith(Be,Be,X.type,X.marks))return W.replace(B.before(pe),Ne?H.after(pe):R,new z.Slice(en(D.content,0,D.openStart,j),j,D.openEnd))}}for(var et=W.steps.length,wt=K.length-1;wt>=0&&(W.replace($,R,D),!(W.steps.length>et));wt--){var Vt=K[wt];Vt<0||($=B.before(Vt),R=H.after(Vt))}}function en(W,$,R,D,B){if($<R){var H=W.firstChild;W=W.replaceChild(0,H.copy(en(H.content,$+1,R,D,H)))}if($>D){var K=B.contentMatchAt(0),he=K.fillBefore(W).append(W);W=he.append(K.matchFragment(he).fillBefore(z.Fragment.empty,!0))}return W}function Gr(W,$,R,D){if(!D.isInline&&$==R&&W.doc.resolve($).parent.content.size){var B=Ue(W.doc,$,D.type);B!=null&&($=R=B)}W.replaceRange($,R,new z.Slice(z.Fragment.from(D),0,0))}function _r(W,$,R){for(var D=W.doc.resolve($),B=W.doc.resolve(R),H=or(D,B),K=0;K<H.length;K++){var he=H[K],Ce=K==H.length-1;if(Ce&&he==0||D.node(he).type.contentMatch.validEnd)return W.delete(D.start(he),B.end(he));if(he>0&&(Ce||D.node(he-1).canReplace(D.index(he-1),B.indexAfter(he-1))))return W.delete(D.before(he),B.after(he))}for(var re=1;re<=D.depth&&re<=B.depth;re++)if($-D.start(re)==D.depth-re&&R>D.end(re)&&B.end(re)-R!=B.depth-re&&D.start(re-1)==B.start(re-1)&&D.node(re-1).canReplace(D.index(re-1),B.index(re-1)))return W.delete(D.before(re),R);W.delete($,R)}function or(W,$){for(var R=[],D=Math.min(W.depth,$.depth),B=D;B>=0;B--){var H=W.start(B);if(H<W.pos-(W.depth-B)||$.end(B)>$.pos+($.depth-B)||W.node(B).type.spec.isolating||$.node(B).type.spec.isolating)break;(H==$.start(B)||B==W.depth&&B==$.depth&&W.parent.inlineContent&&$.parent.inlineContent&&B&&$.start(B-1)==H-1)&&R.push(B)}return R}var tn=(function(W){i(R,W);var $=o(R);function R(D,B,H){var K;return T(this,R),K=$.call(this),K.pos=D,K.attr=B,K.value=H,K}return E(R,[{key:"apply",value:function(B){var H=B.nodeAt(this.pos);if(!H)return nt.fail("No node at attribute step's position");var K=Object.create(null);for(var he in H.attrs)K[he]=H.attrs[he];K[this.attr]=this.value;var Ce=H.type.create(K,null,H.marks);return nt.fromReplace(B,this.pos,this.pos+1,new z.Slice(z.Fragment.from(Ce),0,H.isLeaf?0:1))}},{key:"getMap",value:function(){return Fe.empty}},{key:"invert",value:function(B){return new R(this.pos,this.attr,B.nodeAt(this.pos).attrs[this.attr])}},{key:"map",value:function(B){var H=B.mapResult(this.pos,1);return H.deletedAfter?null:new R(H.pos,this.attr,this.value)}},{key:"toJSON",value:function(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}}],[{key:"fromJSON",value:function(B,H){if(typeof H.pos!="number"||typeof H.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new R(H.pos,H.attr,H.value)}}]),R})(mt);mt.jsonID("attr",tn);var zt=(function(W){i(R,W);var $=o(R);function R(D,B){var H;return T(this,R),H=$.call(this),H.attr=D,H.value=B,H}return E(R,[{key:"apply",value:function(B){var H=Object.create(null);for(var K in B.attrs)H[K]=B.attrs[K];H[this.attr]=this.value;var he=B.type.create(H,B.content,B.marks);return nt.ok(he)}},{key:"getMap",value:function(){return Fe.empty}},{key:"invert",value:function(B){return new R(this.attr,B.attrs[this.attr])}},{key:"map",value:function(B){return this}},{key:"toJSON",value:function(){return{stepType:"docAttr",attr:this.attr,value:this.value}}}],[{key:"fromJSON",value:function(B,H){if(typeof H.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new R(H.attr,H.value)}}]),R})(mt);mt.jsonID("docAttr",zt),r.TransformError=(function(W){i(R,W);var $=o(R);function R(){return T(this,R),$.apply(this,arguments)}return E(R)})(e(Error)),r.TransformError=function W($){var R=Error.call(this,$);return R.__proto__=W.prototype,R},r.TransformError.prototype=Object.create(Error.prototype),r.TransformError.prototype.constructor=r.TransformError,r.TransformError.prototype.name="TransformError";var pr=(function(){function W($){T(this,W),this.doc=$,this.steps=[],this.docs=[],this.mapping=new bt}return E(W,[{key:"before",get:function(){return this.docs.length?this.docs[0]:this.doc}},{key:"step",value:function(R){var D=this.maybeStep(R);if(D.failed)throw new r.TransformError(D.failed);return this}},{key:"maybeStep",value:function(R){var D=R.apply(this.doc);return D.failed||this.addStep(R,D.doc),D}},{key:"docChanged",get:function(){return this.steps.length>0}},{key:"changedRange",value:function(){for(var R=1e9,D=-1e9,B=0;B<this.mapping.maps.length;B++){var H=this.mapping.maps[B];B&&(R=H.map(R,1),D=H.map(D,-1)),H.forEach(function(K,he,Ce,re){R=Math.min(R,Ce),D=Math.max(D,re)})}return R==1e9?null:{from:R,to:D}}},{key:"addStep",value:function(R,D){this.docs.push(this.doc),this.steps.push(R),this.mapping.appendMap(R.getMap()),this.doc=D}},{key:"replace",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:z.Slice.empty,H=ut(this.doc,R,D,B);return H&&this.step(H),this}},{key:"replaceWith",value:function(R,D,B){return this.replace(R,D,new z.Slice(z.Fragment.from(B),0,0))}},{key:"delete",value:function(R,D){return this.replace(R,D,z.Slice.empty)}},{key:"insert",value:function(R,D){return this.replaceWith(R,R,D)}},{key:"replaceRange",value:function(R,D,B){return vn(this,R,D,B),this}},{key:"replaceRangeWith",value:function(R,D,B){return Gr(this,R,D,B),this}},{key:"deleteRange",value:function(R,D){return _r(this,R,D),this}},{key:"lift",value:function(R,D){return ie(this,R,D),this}},{key:"join",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return _e(this,R,D),this}},{key:"wrap",value:function(R,D){return ze(this,R,D),this}},{key:"setBlockType",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,B=arguments.length>2?arguments[2]:void 0,H=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return Xe(this,R,D,B,H),this}},{key:"setNodeMarkup",value:function(R,D){var B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,H=arguments.length>3?arguments[3]:void 0;return At(this,R,D,B,H),this}},{key:"setNodeAttribute",value:function(R,D,B){return this.step(new tn(R,D,B)),this}},{key:"setDocAttribute",value:function(R,D){return this.step(new zt(R,D)),this}},{key:"addNodeMark",value:function(R,D){return this.step(new Ye(R,D)),this}},{key:"removeNodeMark",value:function(R,D){var B=this.doc.nodeAt(R);if(!B)throw new RangeError("No node at position "+R);if(D instanceof z.Mark)D.isInSet(B.marks)&&this.step(new dt(R,D));else{for(var H=B.marks,K,he=[];K=D.isInSet(H);)he.push(new dt(R,K)),H=K.removeFromSet(H);for(var Ce=he.length-1;Ce>=0;Ce--)this.step(he[Ce])}return this}},{key:"split",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,B=arguments.length>2?arguments[2]:void 0;return Ot(this,R,D,B),this}},{key:"addMark",value:function(R,D,B){return nr(this,R,D,B),this}},{key:"removeMark",value:function(R,D,B){return $t(this,R,D,B),this}},{key:"clearIncompatible",value:function(R,D,B){return Qt(this,R,D,B),this}}]),W})();r.AddMarkStep=It,r.AddNodeMarkStep=Ye,r.AttrStep=tn,r.DocAttrStep=zt,r.MapResult=ot,r.Mapping=bt,r.RemoveMarkStep=Ut,r.RemoveNodeMarkStep=dt,r.ReplaceAroundStep=St,r.ReplaceStep=st,r.Step=mt,r.StepMap=Fe,r.StepResult=nt,r.Transform=pr,r.canJoin=hr,r.canSplit=jt,r.dropPoint=at,r.findWrapping=ae,r.insertPoint=Ue,r.joinPoint=ir,r.liftTarget=ve,r.replaceStep=ut})(vd)),vd}var Uy;function ec(){if(Uy)return Wn;Uy=1;function r(){return typeof Reflect<"u"&&Reflect.get?r=Reflect.get.bind():r=function(ve,ie,ae){var Z=e(ve,ie);if(Z){var ke=Object.getOwnPropertyDescriptor(Z,ie);return ke.get?ke.get.call(arguments.length<3?ve:ae):ke.value}},r.apply(this,arguments)}function e(be,ve){for(;!Object.prototype.hasOwnProperty.call(be,ve)&&(be=l(be),be!==null););return be}function t(be,ve){if(typeof ve!="function"&&ve!==null)throw new TypeError("Super expression must either be null or a function");be.prototype=Object.create(ve&&ve.prototype,{constructor:{value:be,writable:!0,configurable:!0}}),Object.defineProperty(be,"prototype",{writable:!1}),ve&&n(be,ve)}function n(be,ve){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ae,Z){return ae.__proto__=Z,ae},n(be,ve)}function i(be){var ve=s();return function(){var ae=l(be),Z;if(ve){var ke=l(this).constructor;Z=Reflect.construct(ae,arguments,ke)}else Z=ae.apply(this,arguments);return a(this,Z)}}function a(be,ve){if(ve&&(f(ve)==="object"||typeof ve=="function"))return ve;if(ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o(be)}function o(be){if(be===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return be}function s(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function l(be){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ie){return ie.__proto__||Object.getPrototypeOf(ie)},l(be)}function f(be){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ve){return typeof ve}:function(ve){return ve&&typeof Symbol=="function"&&ve.constructor===Symbol&&ve!==Symbol.prototype?"symbol":typeof ve},f(be)}function p(be,ve){if(!(be instanceof ve))throw new TypeError("Cannot call a class as a function")}function b(be,ve){for(var ie=0;ie<ve.length;ie++){var ae=ve[ie];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(be,x(ae.key),ae)}}function T(be,ve,ie){return ve&&b(be.prototype,ve),ie&&b(be,ie),Object.defineProperty(be,"prototype",{writable:!1}),be}function x(be){var ve=E(be,"string");return f(ve)==="symbol"?ve:String(ve)}function E(be,ve){if(f(be)!=="object"||be===null)return be;var ie=be[Symbol.toPrimitive];if(ie!==void 0){var ae=ie.call(be,ve);if(f(ae)!=="object")return ae;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(be)}var P=Qu(),F=ep(),z=Object.create(null),Y=(function(){function be(ve,ie,ae){p(this,be),this.$anchor=ve,this.$head=ie,this.ranges=ae||[new ee(ve.min(ie),ve.max(ie))]}return T(be,[{key:"anchor",get:function(){return this.$anchor.pos}},{key:"head",get:function(){return this.$head.pos}},{key:"from",get:function(){return this.$from.pos}},{key:"to",get:function(){return this.$to.pos}},{key:"$from",get:function(){return this.ranges[0].$from}},{key:"$to",get:function(){return this.ranges[0].$to}},{key:"empty",get:function(){for(var ie=this.ranges,ae=0;ae<ie.length;ae++)if(ie[ae].$from.pos!=ie[ae].$to.pos)return!1;return!0}},{key:"content",value:function(){return this.$from.doc.slice(this.from,this.to,!0)}},{key:"replace",value:function(ie){for(var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:P.Slice.empty,Z=ae.content.lastChild,ke=null,Ee=0;Ee<ae.openEnd;Ee++)ke=Z,Z=Z.lastChild;for(var ze=ie.steps.length,Xe=this.ranges,kt=0;kt<Xe.length;kt++){var lt=Xe[kt],Ht=lt.$from,At=lt.$to,jt=ie.mapping.slice(ze);ie.replaceRange(jt.map(Ht.pos),jt.map(At.pos),kt?P.Slice.empty:ae),kt==0&&bt(ie,ze,(Z?Z.isInline:ke&&ke.isTextblock)?-1:1)}}},{key:"replaceWith",value:function(ie,ae){for(var Z=ie.steps.length,ke=this.ranges,Ee=0;Ee<ke.length;Ee++){var ze=ke[Ee],Xe=ze.$from,kt=ze.$to,lt=ie.mapping.slice(Z),Ht=lt.map(Xe.pos),At=lt.map(kt.pos);Ee?ie.deleteRange(Ht,At):(ie.replaceRangeWith(Ht,At,ae),bt(ie,Z,ae.isInline?-1:1))}}},{key:"getBookmark",value:function(){return oe.between(this.$anchor,this.$head).getBookmark()}}],[{key:"findFrom",value:function(ie,ae){var Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ke=ie.parent.inlineContent?new oe(ie):Fe(ie.node(0),ie.parent,ie.pos,ie.index(),ae,Z);if(ke)return ke;for(var Ee=ie.depth-1;Ee>=0;Ee--){var ze=ae<0?Fe(ie.node(0),ie.node(Ee),ie.before(Ee+1),ie.index(Ee),ae,Z):Fe(ie.node(0),ie.node(Ee),ie.after(Ee+1),ie.index(Ee)+1,ae,Z);if(ze)return ze}return null}},{key:"near",value:function(ie){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return this.findFrom(ie,ae)||this.findFrom(ie,-ae)||new Ie(ie.node(0))}},{key:"atStart",value:function(ie){return Fe(ie,ie,0,0,1)||new Ie(ie)}},{key:"atEnd",value:function(ie){return Fe(ie,ie,ie.content.size,ie.childCount,-1)||new Ie(ie)}},{key:"fromJSON",value:function(ie,ae){if(!ae||!ae.type)throw new RangeError("Invalid input for Selection.fromJSON");var Z=z[ae.type];if(!Z)throw new RangeError("No selection type ".concat(ae.type," defined"));return Z.fromJSON(ie,ae)}},{key:"jsonID",value:function(ie,ae){if(ie in z)throw new RangeError("Duplicate use of selection JSON ID "+ie);return z[ie]=ae,ae.prototype.jsonID=ie,ae}}]),be})();Y.prototype.visible=!0;var ee=T(function be(ve,ie){p(this,be),this.$from=ve,this.$to=ie}),se=!1;function de(be){!se&&!be.parent.inlineContent&&(se=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+be.parent.type.name+")"))}var oe=(function(be){t(ie,be);var ve=i(ie);function ie(ae){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ae;return p(this,ie),de(ae),de(Z),ve.call(this,ae,Z)}return T(ie,[{key:"$cursor",get:function(){return this.$anchor.pos==this.$head.pos?this.$head:null}},{key:"map",value:function(Z,ke){var Ee=Z.resolve(ke.map(this.head));if(!Ee.parent.inlineContent)return Y.near(Ee);var ze=Z.resolve(ke.map(this.anchor));return new ie(ze.parent.inlineContent?ze:Ee,Ee)}},{key:"replace",value:function(Z){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:P.Slice.empty;if(r(l(ie.prototype),"replace",this).call(this,Z,ke),ke==P.Slice.empty){var Ee=this.$from.marksAcross(this.$to);Ee&&Z.ensureMarks(Ee)}}},{key:"eq",value:function(Z){return Z instanceof ie&&Z.anchor==this.anchor&&Z.head==this.head}},{key:"getBookmark",value:function(){return new le(this.anchor,this.head)}},{key:"toJSON",value:function(){return{type:"text",anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(Z,ke){if(typeof ke.anchor!="number"||typeof ke.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ie(Z.resolve(ke.anchor),Z.resolve(ke.head))}},{key:"create",value:function(Z,ke){var Ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ke,ze=Z.resolve(ke);return new this(ze,Ee==ke?ze:Z.resolve(Ee))}},{key:"between",value:function(Z,ke,Ee){var ze=Z.pos-ke.pos;if((!Ee||ze)&&(Ee=ze>=0?1:-1),!ke.parent.inlineContent){var Xe=Y.findFrom(ke,Ee,!0)||Y.findFrom(ke,-Ee,!0);if(Xe)ke=Xe.$head;else return Y.near(ke,Ee)}return Z.parent.inlineContent||(ze==0?Z=ke:(Z=(Y.findFrom(Z,-Ee,!0)||Y.findFrom(Z,Ee,!0)).$anchor,Z.pos<ke.pos!=ze<0&&(Z=ke))),new ie(Z,ke)}}]),ie})(Y);Y.jsonID("text",oe);var le=(function(){function be(ve,ie){p(this,be),this.anchor=ve,this.head=ie}return T(be,[{key:"map",value:function(ie){return new be(ie.map(this.anchor),ie.map(this.head))}},{key:"resolve",value:function(ie){return oe.between(ie.resolve(this.anchor),ie.resolve(this.head))}}]),be})(),ge=(function(be){t(ie,be);var ve=i(ie);function ie(ae){var Z;p(this,ie);var ke=ae.nodeAfter,Ee=ae.node(0).resolve(ae.pos+ke.nodeSize);return Z=ve.call(this,ae,Ee),Z.node=ke,Z}return T(ie,[{key:"map",value:function(Z,ke){var Ee=ke.mapResult(this.anchor),ze=Ee.deleted,Xe=Ee.pos,kt=Z.resolve(Xe);return ze?Y.near(kt):new ie(kt)}},{key:"content",value:function(){return new P.Slice(P.Fragment.from(this.node),0,0)}},{key:"eq",value:function(Z){return Z instanceof ie&&Z.anchor==this.anchor}},{key:"toJSON",value:function(){return{type:"node",anchor:this.anchor}}},{key:"getBookmark",value:function(){return new xe(this.anchor)}}],[{key:"fromJSON",value:function(Z,ke){if(typeof ke.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ie(Z.resolve(ke.anchor))}},{key:"create",value:function(Z,ke){return new ie(Z.resolve(ke))}},{key:"isSelectable",value:function(Z){return!Z.isText&&Z.type.spec.selectable!==!1}}]),ie})(Y);ge.prototype.visible=!1,Y.jsonID("node",ge);var xe=(function(){function be(ve){p(this,be),this.anchor=ve}return T(be,[{key:"map",value:function(ie){var ae=ie.mapResult(this.anchor),Z=ae.deleted,ke=ae.pos;return Z?new le(ke,ke):new be(ke)}},{key:"resolve",value:function(ie){var ae=ie.resolve(this.anchor),Z=ae.nodeAfter;return Z&&ge.isSelectable(Z)?new ge(ae):Y.near(ae)}}]),be})(),Ie=(function(be){t(ie,be);var ve=i(ie);function ie(ae){return p(this,ie),ve.call(this,ae.resolve(0),ae.resolve(ae.content.size))}return T(ie,[{key:"replace",value:function(Z){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:P.Slice.empty;if(ke==P.Slice.empty){Z.delete(0,Z.doc.content.size);var Ee=Y.atStart(Z.doc);Ee.eq(Z.selection)||Z.setSelection(Ee)}else r(l(ie.prototype),"replace",this).call(this,Z,ke)}},{key:"toJSON",value:function(){return{type:"all"}}},{key:"map",value:function(Z){return new ie(Z)}},{key:"eq",value:function(Z){return Z instanceof ie}},{key:"getBookmark",value:function(){return ot}}],[{key:"fromJSON",value:function(Z){return new ie(Z)}}]),ie})(Y);Y.jsonID("all",Ie);var ot={map:function(){return this},resolve:function(ve){return new Ie(ve)}};function Fe(be,ve,ie,ae,Z){var ke=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1;if(ve.inlineContent)return oe.create(be,ie);for(var Ee=ae-(Z>0?0:1);Z>0?Ee<ve.childCount:Ee>=0;Ee+=Z){var ze=ve.child(Ee);if(ze.isAtom){if(!ke&&ge.isSelectable(ze))return ge.create(be,ie-(Z<0?ze.nodeSize:0))}else{var Xe=Fe(be,ze,ie+Z,Z<0?ze.childCount:0,Z,ke);if(Xe)return Xe}ie+=ze.nodeSize*Z}return null}function bt(be,ve,ie){var ae=be.steps.length-1;if(!(ae<ve)){var Z=be.steps[ae];if(Z instanceof F.ReplaceStep||Z instanceof F.ReplaceAroundStep){var ke=be.mapping.maps[ae],Ee;ke.forEach(function(ze,Xe,kt,lt){Ee==null&&(Ee=lt)}),be.setSelection(Y.near(be.doc.resolve(Ee),ie))}}}var ct=1,mt=2,nt=4,Et=(function(be){t(ie,be);var ve=i(ie);function ie(ae){var Z;return p(this,ie),Z=ve.call(this,ae.doc),Z.curSelectionFor=0,Z.updated=0,Z.meta=Object.create(null),Z.time=Date.now(),Z.curSelection=ae.selection,Z.storedMarks=ae.storedMarks,Z}return T(ie,[{key:"selection",get:function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}},{key:"setSelection",value:function(Z){if(Z.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=Z,this.curSelectionFor=this.steps.length,this.updated=(this.updated|ct)&~mt,this.storedMarks=null,this}},{key:"selectionSet",get:function(){return(this.updated&ct)>0}},{key:"setStoredMarks",value:function(Z){return this.storedMarks=Z,this.updated|=mt,this}},{key:"ensureMarks",value:function(Z){return P.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),Z)||this.setStoredMarks(Z),this}},{key:"addStoredMark",value:function(Z){return this.ensureMarks(Z.addToSet(this.storedMarks||this.selection.$head.marks()))}},{key:"removeStoredMark",value:function(Z){return this.ensureMarks(Z.removeFromSet(this.storedMarks||this.selection.$head.marks()))}},{key:"storedMarksSet",get:function(){return(this.updated&mt)>0}},{key:"addStep",value:function(Z,ke){r(l(ie.prototype),"addStep",this).call(this,Z,ke),this.updated=this.updated&~mt,this.storedMarks=null}},{key:"setTime",value:function(Z){return this.time=Z,this}},{key:"replaceSelection",value:function(Z){return this.selection.replace(this,Z),this}},{key:"replaceSelectionWith",value:function(Z){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Ee=this.selection;return ke&&(Z=Z.mark(this.storedMarks||(Ee.empty?Ee.$from.marks():Ee.$from.marksAcross(Ee.$to)||P.Mark.none))),Ee.replaceWith(this,Z),this}},{key:"deleteSelection",value:function(){return this.selection.replace(this),this}},{key:"insertText",value:function(Z,ke,Ee){var ze=this.doc.type.schema;if(ke==null)return Z?this.replaceSelectionWith(ze.text(Z),!0):this.deleteSelection();if(Ee==null&&(Ee=ke),!Z)return this.deleteRange(ke,Ee);var Xe=this.storedMarks;if(!Xe){var kt=this.doc.resolve(ke);Xe=Ee==ke?kt.marks():kt.marksAcross(this.doc.resolve(Ee))}return this.replaceRangeWith(ke,Ee,ze.text(Z,Xe)),!this.selection.empty&&this.selection.to==ke+Z.length&&this.setSelection(Y.near(this.selection.$to)),this}},{key:"setMeta",value:function(Z,ke){return this.meta[typeof Z=="string"?Z:Z.key]=ke,this}},{key:"getMeta",value:function(Z){return this.meta[typeof Z=="string"?Z:Z.key]}},{key:"isGeneric",get:function(){for(var Z in this.meta)return!1;return!0}},{key:"scrollIntoView",value:function(){return this.updated|=nt,this}},{key:"scrolledIntoView",get:function(){return(this.updated&nt)>0}}]),ie})(F.Transform);function It(be,ve){return!ve||!be?be:be.bind(ve)}var Ut=T(function be(ve,ie,ae){p(this,be),this.name=ve,this.init=It(ie.init,ae),this.apply=It(ie.apply,ae)}),Ye=[new Ut("doc",{init:function(ve){return ve.doc||ve.schema.topNodeType.createAndFill()},apply:function(ve){return ve.doc}}),new Ut("selection",{init:function(ve,ie){return ve.selection||Y.atStart(ie.doc)},apply:function(ve){return ve.selection}}),new Ut("storedMarks",{init:function(ve){return ve.storedMarks||null},apply:function(ve,ie,ae,Z){return Z.selection.$cursor?ve.storedMarks:null}}),new Ut("scrollToSelection",{init:function(){return 0},apply:function(ve,ie){return ve.scrolledIntoView?ie+1:ie}})],dt=T(function be(ve,ie){var ae=this;p(this,be),this.schema=ve,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Ye.slice(),ie&&ie.forEach(function(Z){if(ae.pluginsByKey[Z.key])throw new RangeError("Adding different instances of a keyed plugin ("+Z.key+")");ae.plugins.push(Z),ae.pluginsByKey[Z.key]=Z,Z.spec.state&&ae.fields.push(new Ut(Z.key,Z.spec.state,Z))})}),st=(function(){function be(ve){p(this,be),this.config=ve}return T(be,[{key:"schema",get:function(){return this.config.schema}},{key:"plugins",get:function(){return this.config.plugins}},{key:"apply",value:function(ie){return this.applyTransaction(ie).state}},{key:"filterTransaction",value:function(ie){for(var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,Z=0;Z<this.config.plugins.length;Z++)if(Z!=ae){var ke=this.config.plugins[Z];if(ke.spec.filterTransaction&&!ke.spec.filterTransaction.call(ke,ie,this))return!1}return!0}},{key:"applyTransaction",value:function(ie){if(!this.filterTransaction(ie))return{state:this,transactions:[]};for(var ae=[ie],Z=this.applyInner(ie),ke=null;;){for(var Ee=!1,ze=0;ze<this.config.plugins.length;ze++){var Xe=this.config.plugins[ze];if(Xe.spec.appendTransaction){var kt=ke?ke[ze].n:0,lt=ke?ke[ze].state:this,Ht=kt<ae.length&&Xe.spec.appendTransaction.call(Xe,kt?ae.slice(kt):ae,lt,Z);if(Ht&&Z.filterTransaction(Ht,ze)){if(Ht.setMeta("appendedTransaction",ie),!ke){ke=[];for(var At=0;At<this.config.plugins.length;At++)ke.push(At<ze?{state:Z,n:ae.length}:{state:this,n:0})}ae.push(Ht),Z=Z.applyInner(Ht),Ee=!0}ke&&(ke[ze]={state:Z,n:ae.length})}}if(!Ee)return{state:Z,transactions:ae}}}},{key:"applyInner",value:function(ie){if(!ie.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var ae=new be(this.config),Z=this.config.fields,ke=0;ke<Z.length;ke++){var Ee=Z[ke];ae[Ee.name]=Ee.apply(ie,this[Ee.name],this,ae)}return ae}},{key:"tr",get:function(){return new Et(this)}},{key:"reconfigure",value:function(ie){for(var ae=new dt(this.schema,ie.plugins),Z=ae.fields,ke=new be(ae),Ee=0;Ee<Z.length;Ee++){var ze=Z[Ee].name;ke[ze]=this.hasOwnProperty(ze)?this[ze]:Z[Ee].init(ie,ke)}return ke}},{key:"toJSON",value:function(ie){var ae={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(ae.storedMarks=this.storedMarks.map(function(ze){return ze.toJSON()})),ie&&f(ie)=="object")for(var Z in ie){if(Z=="doc"||Z=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");var ke=ie[Z],Ee=ke.spec.state;Ee&&Ee.toJSON&&(ae[Z]=Ee.toJSON.call(ke,this[ke.key]))}return ae}}],[{key:"create",value:function(ie){for(var ae=new dt(ie.doc?ie.doc.type.schema:ie.schema,ie.plugins),Z=new be(ae),ke=0;ke<ae.fields.length;ke++)Z[ae.fields[ke].name]=ae.fields[ke].init(ie,Z);return Z}},{key:"fromJSON",value:function(ie,ae,Z){if(!ae)throw new RangeError("Invalid input for EditorState.fromJSON");if(!ie.schema)throw new RangeError("Required config field 'schema' missing");var ke=new dt(ie.schema,ie.plugins),Ee=new be(ke);return ke.fields.forEach(function(ze){if(ze.name=="doc")Ee.doc=P.Node.fromJSON(ie.schema,ae.doc);else if(ze.name=="selection")Ee.selection=Y.fromJSON(Ee.doc,ae.selection);else if(ze.name=="storedMarks")ae.storedMarks&&(Ee.storedMarks=ae.storedMarks.map(ie.schema.markFromJSON));else{if(Z)for(var Xe in Z){var kt=Z[Xe],lt=kt.spec.state;if(kt.key==ze.name&<&<.fromJSON&&Object.prototype.hasOwnProperty.call(ae,Xe)){Ee[ze.name]=lt.fromJSON.call(kt,ie,ae[Xe],Ee);return}}Ee[ze.name]=ze.init(ie,Ee)}}),Ee}}]),be})();function St(be,ve,ie){for(var ae in be){var Z=be[ae];Z instanceof Function?Z=Z.bind(ve):ae=="handleDOMEvents"&&(Z=St(Z,ve,{})),ie[ae]=Z}return ie}var Mt=(function(){function be(ve){p(this,be),this.spec=ve,this.props={},ve.props&&St(ve.props,this,this.props),this.key=ve.key?ve.key.key:$t("plugin")}return T(be,[{key:"getState",value:function(ie){return ie[this.key]}}]),be})(),nr=Object.create(null);function $t(be){return be in nr?be+"$"+ ++nr[be]:(nr[be]=0,be+"$")}var Qt=(function(){function be(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"key";p(this,be),this.key=$t(ve)}return T(be,[{key:"get",value:function(ie){return ie.config.pluginsByKey[this.key]}},{key:"getState",value:function(ie){return ie[this.key]}}]),be})();return Wn.AllSelection=Ie,Wn.EditorState=st,Wn.NodeSelection=ge,Wn.Plugin=Mt,Wn.PluginKey=Qt,Wn.Selection=Y,Wn.SelectionRange=ee,Wn.TextSelection=oe,Wn.Transaction=Et,Wn}var $y;function $8e(){if($y)return ln;$y=1;function r(ee,se,de){return Object.defineProperty(ee,"prototype",{writable:!1}),ee}function e(ee,se){if(!(ee instanceof se))throw new TypeError("Cannot call a class as a function")}var t=ec(),n=ep(),i=r(function ee(se,de){var oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};e(this,ee),this.match=se,this.match=se,this.handler=typeof de=="string"?a(de):de,this.undoable=oe.undoable!==!1,this.inCode=oe.inCode||!1,this.inCodeMark=oe.inCodeMark!==!1});function a(ee){return function(se,de,oe,le){var ge=ee;if(de[1]){var xe=de[0].lastIndexOf(de[1]);ge+=de[0].slice(xe+de[1].length),oe+=xe;var Ie=oe-le;Ie>0&&(ge=de[0].slice(xe-Ie,xe)+ge,oe=le)}return se.tr.insertText(ge,oe,le)}}var o=500;function s(ee){var se=ee.rules,de=new t.Plugin({state:{init:function(){return null},apply:function(le,ge){var xe=le.getMeta(this);return xe||(le.selectionSet||le.docChanged?null:ge)}},props:{handleTextInput:function(le,ge,xe,Ie){return l(le,ge,xe,Ie,se,de)},handleDOMEvents:{compositionend:function(le){setTimeout(function(){var ge=le.state.selection.$cursor;ge&&l(le,ge.pos,ge.pos,"",se,de)})}}},isInputRules:!0});return de}function l(ee,se,de,oe,le,ge){if(ee.composing)return!1;for(var xe=ee.state,Ie=xe.doc.resolve(se),ot=Ie.parent.textBetween(Math.max(0,Ie.parentOffset-o),Ie.parentOffset,null,"")+oe,Fe=function(){var nt=le[ct];if(!nt.inCodeMark&&Ie.marks().some(function(dt){return dt.type.spec.code}))return 0;if(Ie.parent.type.spec.code){if(!nt.inCode)return 0}else if(nt.inCode==="only")return 0;var Et=nt.match.exec(ot);if(!Et||Et[0].length<oe.length)return 0;var It=se-(Et[0].length-oe.length);if(!nt.inCodeMark){var Ut=!1;if(xe.doc.nodesBetween(It,Ie.pos,function(dt){dt.isInline&&dt.marks.some(function(st){return st.type.spec.code})&&(Ut=!0)}),Ut)return 0}var Ye=nt.handler(xe,Et,It,de);return Ye?(nt.undoable&&Ye.setMeta(ge,{transform:Ye,from:se,to:de,text:oe}),ee.dispatch(Ye),{v:!0}):0},bt,ct=0;ct<le.length;ct++)if(bt=Fe(),bt!==0&&bt)return bt.v;return!1}var f=function(se,de){for(var oe=se.plugins,le=0;le<oe.length;le++){var ge=oe[le],xe=void 0;if(ge.spec.isInputRules&&(xe=ge.getState(se))){if(de){for(var Ie=se.tr,ot=xe.transform,Fe=ot.steps.length-1;Fe>=0;Fe--)Ie.step(ot.steps[Fe].invert(ot.docs[Fe]));if(xe.text){var bt=Ie.doc.resolve(xe.from).marks();Ie.replaceWith(xe.from,xe.to,se.schema.text(xe.text,bt))}else Ie.delete(xe.from,xe.to);de(Ie)}return!0}}return!1},p=new i(/--$/,"—",{inCodeMark:!1}),b=new i(/\.\.\.$/,"…",{inCodeMark:!1}),T=new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“",{inCodeMark:!1}),x=new i(/"$/,"”",{inCodeMark:!1}),E=new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘",{inCodeMark:!1}),P=new i(/'$/,"’",{inCodeMark:!1}),F=[T,x,E,P];function z(ee,se){var de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,oe=arguments.length>3?arguments[3]:void 0;return new i(ee,function(le,ge,xe,Ie){var ot=de instanceof Function?de(ge):de,Fe=le.tr.delete(xe,Ie),bt=Fe.doc.resolve(xe),ct=bt.blockRange(),mt=ct&&n.findWrapping(ct,se,ot);if(!mt)return null;Fe.wrap(ct,mt);var nt=Fe.doc.resolve(xe-1).nodeBefore;return nt&&nt.type==se&&n.canJoin(Fe.doc,xe-1)&&(!oe||oe(ge,nt))&&Fe.join(xe-1),Fe})}function Y(ee,se){var de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;return new i(ee,function(oe,le,ge,xe){var Ie=oe.doc.resolve(ge),ot=de instanceof Function?de(le):de;return Ie.node(-1).canReplaceWith(Ie.index(-1),Ie.indexAfter(-1),se)?oe.tr.delete(ge,xe).setBlockType(ge,ge,se,ot):null})}return ln.InputRule=i,ln.closeDoubleQuote=x,ln.closeSingleQuote=P,ln.ellipsis=b,ln.emDash=p,ln.inputRules=s,ln.openDoubleQuote=T,ln.openSingleQuote=E,ln.smartQuotes=F,ln.textblockTypeInputRule=Y,ln.undoInputRule=f,ln.wrappingInputRule=z,ln}var jl={},Eo={},Wy;function W8e(){if(Wy)return Eo;Wy=1,Object.defineProperty(Eo,"__esModule",{value:!0});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},e={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},t=typeof navigator<"u"&&/Mac/.test(navigator.platform),n=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),i=0;i<10;i++)r[48+i]=r[96+i]=String(i);for(var i=1;i<=24;i++)r[i+111]="F"+i;for(var i=65;i<=90;i++)r[i]=String.fromCharCode(i+32),e[i]=String.fromCharCode(i);for(var a in r)e.hasOwnProperty(a)||(e[a]=r[a]);function o(s){var l=t&&s.metaKey&&s.shiftKey&&!s.ctrlKey&&!s.altKey||n&&s.shiftKey&&s.key&&s.key.length==1||s.key=="Unidentified",f=!l&&s.key||(s.shiftKey?e:r)[s.keyCode]||s.key||"Unidentified";return f=="Esc"&&(f="Escape"),f=="Del"&&(f="Delete"),f=="Left"&&(f="ArrowLeft"),f=="Up"&&(f="ArrowUp"),f=="Right"&&(f="ArrowRight"),f=="Down"&&(f="ArrowDown"),f}return Eo.base=r,Eo.keyName=o,Eo.shift=e,Eo}var jy;function j8e(){if(jy)return jl;jy=1;var r=W8e(),e=ec(),t=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),n=typeof navigator<"u"&&/Win/.test(navigator.platform);function i(f){var p=f.split(/-(?!$)/),b=p[p.length-1];b=="Space"&&(b=" ");for(var T,x,E,P,F=0;F<p.length-1;F++){var z=p[F];if(/^(cmd|meta|m)$/i.test(z))P=!0;else if(/^a(lt)?$/i.test(z))T=!0;else if(/^(c|ctrl|control)$/i.test(z))x=!0;else if(/^s(hift)?$/i.test(z))E=!0;else if(/^mod$/i.test(z))t?P=!0:x=!0;else throw new Error("Unrecognized modifier name: "+z)}return T&&(b="Alt-"+b),x&&(b="Ctrl-"+b),P&&(b="Meta-"+b),E&&(b="Shift-"+b),b}function a(f){var p=Object.create(null);for(var b in f)p[i(b)]=f[b];return p}function o(f,p){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return p.altKey&&(f="Alt-"+f),p.ctrlKey&&(f="Ctrl-"+f),p.metaKey&&(f="Meta-"+f),b&&p.shiftKey&&(f="Shift-"+f),f}function s(f){return new e.Plugin({props:{handleKeyDown:l(f)}})}function l(f){var p=a(f);return function(b,T){var x=r.keyName(T),E,P=p[o(x,T)];if(P&&P(b.state,b.dispatch,b))return!0;if(x.length==1&&x!=" "){if(T.shiftKey){var F=p[o(x,T,!1)];if(F&&F(b.state,b.dispatch,b))return!0}if((T.altKey||T.metaKey||T.ctrlKey)&&!(n&&T.ctrlKey&&T.altKey)&&(E=r.base[T.keyCode])&&E!=x){var z=p[o(E,T)];if(z&&z(b.state,b.dispatch,b))return!0}}return!1}}return jl.keydownHandler=l,jl.keymap=s,jl}var Ra={},Gy;function G8e(){if(Gy)return Ra;Gy=1;function r(u,v){return n(u)||t(u,v)||a(u,v)||e()}function e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
677
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t(u,v){var c=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(c!=null){var m,k,C,A,O=[],q=!0,U=!1;try{if(C=(c=c.call(u)).next,v!==0)for(;!(q=(m=C.call(c)).done)&&(O.push(m.value),O.length!==v);q=!0);}catch(Q){U=!0,k=Q}finally{try{if(!q&&c.return!=null&&(A=c.return(),Object(A)!==A))return}finally{if(U)throw k}}return O}}function n(u){if(Array.isArray(u))return u}function i(u,v){var c=typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(!c){if(Array.isArray(u)||(c=a(u))||v){c&&(u=c);var m=0,k=function(){};return{s:k,n:function(){return m>=u.length?{done:!0}:{done:!1,value:u[m++]}},e:function(U){throw U},f:k}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
678
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var C=!0,A=!1,O;return{s:function(){c=c.call(u)},n:function(){var U=c.next();return C=U.done,U},e:function(U){A=!0,O=U},f:function(){try{!C&&c.return!=null&&c.return()}finally{if(A)throw O}}}}function a(u,v){if(u){if(typeof u=="string")return o(u,v);var c=Object.prototype.toString.call(u).slice(8,-1);if(c==="Object"&&u.constructor&&(c=u.constructor.name),c==="Map"||c==="Set")return Array.from(u);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return o(u,v)}}function o(u,v){(v==null||v>u.length)&&(v=u.length);for(var c=0,m=new Array(v);c<v;c++)m[c]=u[c];return m}function s(){return typeof Reflect<"u"&&Reflect.get?s=Reflect.get.bind():s=function(v,c,m){var k=l(v,c);if(k){var C=Object.getOwnPropertyDescriptor(k,c);return C.get?C.get.call(arguments.length<3?v:m):C.value}},s.apply(this,arguments)}function l(u,v){for(;!Object.prototype.hasOwnProperty.call(u,v)&&(u=P(u),u!==null););return u}function f(u,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(v&&v.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),v&&p(u,v)}function p(u,v){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,k){return m.__proto__=k,m},p(u,v)}function b(u){var v=E();return function(){var m=P(u),k;if(v){var C=P(this).constructor;k=Reflect.construct(m,arguments,C)}else k=m.apply(this,arguments);return T(this,k)}}function T(u,v){if(v&&(F(v)==="object"||typeof v=="function"))return v;if(v!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x(u)}function x(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function E(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function P(u){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c)},P(u)}function F(u){"@babel/helpers - typeof";return F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},F(u)}function z(u,v){if(!(u instanceof v))throw new TypeError("Cannot call a class as a function")}function Y(u,v){for(var c=0;c<v.length;c++){var m=v[c];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(u,se(m.key),m)}}function ee(u,v,c){return v&&Y(u.prototype,v),c&&Y(u,c),Object.defineProperty(u,"prototype",{writable:!1}),u}function se(u){var v=de(u,"string");return F(v)==="symbol"?v:String(v)}function de(u,v){if(F(u)!=="object"||u===null)return u;var c=u[Symbol.toPrimitive];if(c!==void 0){var m=c.call(u,v);if(F(m)!=="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(u)}var oe=ec(),le=Qu(),ge=ep(),xe=function(v){for(var c=0;;c++)if(v=v.previousSibling,!v)return c},Ie=function(v){var c=v.assignedSlot||v.parentNode;return c&&c.nodeType==11?c.host:c},ot=null,Fe=function(v,c,m){var k=ot||(ot=document.createRange());return k.setEnd(v,m??v.nodeValue.length),k.setStart(v,c||0),k},bt=function(){ot=null},ct=function(v,c,m,k){return m&&(nt(v,c,m,k,-1)||nt(v,c,m,k,1))},mt=/^(img|br|input|textarea|hr)$/i;function nt(u,v,c,m,k){for(var C;;){if(u==c&&v==m)return!0;if(v==(k<0?0:Et(u))){var A=u.parentNode;if(!A||A.nodeType!=1||dt(u)||mt.test(u.nodeName)||u.contentEditable=="false")return!1;v=xe(u)+(k<0?0:1),u=A}else if(u.nodeType==1){var O=u.childNodes[v+(k<0?-1:0)];if(O.nodeType==1&&O.contentEditable=="false")if(!((C=O.pmViewDesc)===null||C===void 0)&&C.ignoreForSelection)v+=k;else return!1;else u=O,v=k<0?Et(u):0}else return!1}}function Et(u){return u.nodeType==3?u.nodeValue.length:u.childNodes.length}function It(u,v){for(;;){if(u.nodeType==3&&v)return u;if(u.nodeType==1&&v>0){if(u.contentEditable=="false")return null;u=u.childNodes[v-1],v=Et(u)}else if(u.parentNode&&!dt(u))v=xe(u),u=u.parentNode;else return null}}function Ut(u,v){for(;;){if(u.nodeType==3&&v<u.nodeValue.length)return u;if(u.nodeType==1&&v<u.childNodes.length){if(u.contentEditable=="false")return null;u=u.childNodes[v],v=0}else if(u.parentNode&&!dt(u))v=xe(u)+1,u=u.parentNode;else return null}}function Ye(u,v,c){for(var m=v==0,k=v==Et(u);m||k;){if(u==c)return!0;var C=xe(u);if(u=u.parentNode,!u)return!1;m=m&&C==0,k=k&&C==Et(u)}}function dt(u){for(var v,c=u;c&&!(v=c.pmViewDesc);c=c.parentNode);return v&&v.node&&v.node.isBlock&&(v.dom==u||v.contentDOM==u)}var st=function(v){return v.focusNode&&ct(v.focusNode,v.focusOffset,v.anchorNode,v.anchorOffset)};function St(u,v){var c=document.createEvent("Event");return c.initEvent("keydown",!0,!0),c.keyCode=u,c.key=c.code=v,c}function Mt(u){for(var v=u.activeElement;v&&v.shadowRoot;)v=v.shadowRoot.activeElement;return v}function nr(u,v,c){if(u.caretPositionFromPoint)try{var m=u.caretPositionFromPoint(v,c);if(m)return{node:m.offsetNode,offset:Math.min(Et(m.offsetNode),m.offset)}}catch{}if(u.caretRangeFromPoint){var k=u.caretRangeFromPoint(v,c);if(k)return{node:k.startContainer,offset:Math.min(Et(k.startContainer),k.startOffset)}}}var $t=typeof navigator<"u"?navigator:null,Qt=typeof document<"u"?document:null,be=$t&&$t.userAgent||"",ve=/Edge\/(\d+)/.exec(be),ie=/MSIE \d/.exec(be),ae=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(be),Z=!!(ie||ae||ve),ke=ie?document.documentMode:ae?+ae[1]:ve?+ve[1]:0,Ee=!Z&&/gecko\/(\d+)/i.test(be);Ee&&+(/Firefox\/(\d+)/.exec(be)||[0,0])[1];var ze=!Z&&/Chrome\/(\d+)/.exec(be),Xe=!!ze,kt=ze?+ze[1]:0,lt=!Z&&!!$t&&/Apple Computer/.test($t.vendor),Ht=lt&&(/Mobile\/\w+/.test(be)||!!$t&&$t.maxTouchPoints>2),At=Ht||($t?/Mac/.test($t.platform):!1),jt=$t?/Win/.test($t.platform):!1,Ot=/Android \d/.test(be),hr=!!Qt&&"webkitFontSmoothing"in Qt.documentElement.style,Sn=hr?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Qr(u){var v=u.defaultView&&u.defaultView.visualViewport;return v?{left:0,right:v.width,top:0,bottom:v.height}:{left:0,right:u.documentElement.clientWidth,top:0,bottom:u.documentElement.clientHeight}}function ir(u,v){return typeof u=="number"?u:u[v]}function _e(u){var v=u.getBoundingClientRect(),c=v.width/u.offsetWidth||1,m=v.height/u.offsetHeight||1;return{left:v.left,right:v.left+u.clientWidth*c,top:v.top,bottom:v.top+u.clientHeight*m}}function Ue(u,v,c){for(var m=u.someProp("scrollThreshold")||0,k=u.someProp("scrollMargin")||5,C=u.dom.ownerDocument,A=c||u.dom;A;){if(A.nodeType!=1){A=Ie(A);continue}var O=A,q=O==C.body,U=q?Qr(C):_e(O),Q=0,ue=0;if(v.top<U.top+ir(m,"top")?ue=-(U.top-v.top+ir(k,"top")):v.bottom>U.bottom-ir(m,"bottom")&&(ue=v.bottom-v.top>U.bottom-U.top?v.top+ir(k,"top")-U.top:v.bottom-U.bottom+ir(k,"bottom")),v.left<U.left+ir(m,"left")?Q=-(U.left-v.left+ir(k,"left")):v.right>U.right-ir(m,"right")&&(Q=v.right-U.right+ir(k,"right")),Q||ue)if(q)C.defaultView.scrollBy(Q,ue);else{var ne=O.scrollLeft,ye=O.scrollTop;ue&&(O.scrollTop+=ue),Q&&(O.scrollLeft+=Q);var Me=O.scrollLeft-ne,Pe=O.scrollTop-ye;v={left:v.left-Me,top:v.top-Pe,right:v.right-Me,bottom:v.bottom-Pe}}var je=q?"fixed":getComputedStyle(A).position;if(/^(fixed|sticky)$/.test(je))break;A=je=="absolute"?A.offsetParent:Ie(A)}}function at(u){for(var v=u.dom.getBoundingClientRect(),c=Math.max(0,v.top),m,k,C=(v.left+v.right)/2,A=c+1;A<Math.min(innerHeight,v.bottom);A+=5){var O=u.root.elementFromPoint(C,A);if(!(!O||O==u.dom||!u.dom.contains(O))){var q=O.getBoundingClientRect();if(q.top>=c-20){m=O,k=q.top;break}}}return{refDOM:m,refTop:k,stack:ut(u.dom)}}function ut(u){for(var v=[],c=u.ownerDocument,m=u;m&&(v.push({dom:m,top:m.scrollTop,left:m.scrollLeft}),u!=c);m=Ie(m));return v}function Ct(u){var v=u.refDOM,c=u.refTop,m=u.stack,k=v?v.getBoundingClientRect().top:0;gr(m,k==0?0:k-c)}function gr(u,v){for(var c=0;c<u.length;c++){var m=u[c],k=m.dom,C=m.top,A=m.left;k.scrollTop!=C+v&&(k.scrollTop=C+v),k.scrollLeft!=A&&(k.scrollLeft=A)}}var _t=null;function Wt(u){if(u.setActive)return u.setActive();if(_t)return u.focus(_t);var v=ut(u);u.focus(_t==null?{get preventScroll(){return _t={preventScroll:!0},!0}}:void 0),_t||(_t=!1,gr(v,0))}function qr(u,v){for(var c,m=2e8,k,C=0,A=v.top,O=v.top,q,U,Q=u.firstChild,ue=0;Q;Q=Q.nextSibling,ue++){var ne=void 0;if(Q.nodeType==1)ne=Q.getClientRects();else if(Q.nodeType==3)ne=Fe(Q).getClientRects();else continue;for(var ye=0;ye<ne.length;ye++){var Me=ne[ye];if(Me.top<=A&&Me.bottom>=O){A=Math.max(Me.bottom,A),O=Math.min(Me.top,O);var Pe=Me.left>v.left?Me.left-v.left:Me.right<v.left?v.left-Me.right:0;if(Pe<m){c=Q,m=Pe,k=Pe&&c.nodeType==3?{left:Me.right<v.left?Me.right:Me.left,top:v.top}:v,Q.nodeType==1&&Pe&&(C=ue+(v.left>=(Me.left+Me.right)/2?1:0));continue}}else Me.top>v.top&&!q&&Me.left<=v.left&&Me.right>=v.left&&(q=Q,U={left:Math.max(Me.left,Math.min(Me.right,v.left)),top:Me.top});!c&&(v.left>=Me.right&&v.top>=Me.top||v.left>=Me.left&&v.top>=Me.bottom)&&(C=ue+1)}}return!c&&q&&(c=q,k=U,m=0),c&&c.nodeType==3?pn(c,k):!c||m&&c.nodeType==1?{node:u,offset:C}:qr(c,k)}function pn(u,v){for(var c=u.nodeValue.length,m=document.createRange(),k,C=0;C<c;C++){m.setEnd(u,C+1),m.setStart(u,C);var A=or(m,1);if(A.top!=A.bottom&&ar(v,A)){k={node:u,offset:C+(v.left>=(A.left+A.right)/2?1:0)};break}}return m.detach(),k||{node:u,offset:0}}function ar(u,v){return u.left>=v.left-1&&u.left<=v.right+1&&u.top>=v.top-1&&u.top<=v.bottom+1}function Hr(u,v){var c=u.parentNode;return c&&/^li$/i.test(c.nodeName)&&v.left<u.getBoundingClientRect().left?c:u}function xn(u,v,c){var m=qr(v,c),k=m.node,C=m.offset,A=-1;if(k.nodeType==1&&!k.firstChild){var O=k.getBoundingClientRect();A=O.left!=O.right&&c.left>(O.left+O.right)/2?1:-1}return u.docView.posFromDOM(k,C,A)}function vn(u,v,c,m){for(var k=-1,C=v,A=!1;C!=u.dom;){var O=u.docView.nearestDesc(C,!0),q=void 0;if(!O)return null;if(O.dom.nodeType==1&&(O.node.isBlock&&O.parent||!O.contentDOM)&&((q=O.dom.getBoundingClientRect()).width||q.height)&&(O.node.isBlock&&O.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(O.dom.nodeName)&&(!A&&q.left>m.left||q.top>m.top?k=O.posBefore:(!A&&q.right<m.left||q.bottom<m.top)&&(k=O.posAfter),A=!0),!O.contentDOM&&k<0&&!O.node.isText)){var U=O.node.isBlock?m.top<(q.top+q.bottom)/2:m.left<(q.left+q.right)/2;return U?O.posBefore:O.posAfter}C=O.dom.parentNode}return k>-1?k:u.docView.posFromDOM(v,c,-1)}function en(u,v,c){var m=u.childNodes.length;if(m&&c.top<c.bottom)for(var k=Math.max(0,Math.min(m-1,Math.floor(m*(v.top-c.top)/(c.bottom-c.top))-2)),C=k;;){var A=u.childNodes[C];if(A.nodeType==1)for(var O=A.getClientRects(),q=0;q<O.length;q++){var U=O[q];if(ar(v,U))return en(A,v,U)}if((C=(C+1)%m)==k)break}return u}function Gr(u,v){var c=u.dom.ownerDocument,m,k=0,C=nr(c,v.left,v.top);C&&(m=C.node,k=C.offset);var A=(u.root.elementFromPoint?u.root:c).elementFromPoint(v.left,v.top),O;if(!A||!u.dom.contains(A.nodeType!=1?A.parentNode:A)){var q=u.dom.getBoundingClientRect();if(!ar(v,q)||(A=en(u.dom,v,q),!A))return null}if(lt)for(var U=A;m&&U;U=Ie(U))U.draggable&&(m=void 0);if(A=Hr(A,v),m){if(Ee&&m.nodeType==1&&(k=Math.min(k,m.childNodes.length),k<m.childNodes.length)){var Q=m.childNodes[k],ue;Q.nodeName=="IMG"&&(ue=Q.getBoundingClientRect()).right<=v.left&&ue.bottom>v.top&&k++}var ne;hr&&k&&m.nodeType==1&&(ne=m.childNodes[k-1]).nodeType==1&&ne.contentEditable=="false"&&ne.getBoundingClientRect().top>=v.top&&k--,m==u.dom&&k==m.childNodes.length-1&&m.lastChild.nodeType==1&&v.top>m.lastChild.getBoundingClientRect().bottom?O=u.state.doc.content.size:(k==0||m.nodeType!=1||m.childNodes[k-1].nodeName!="BR")&&(O=vn(u,m,k,v))}O==null&&(O=xn(u,A,v));var ye=u.docView.nearestDesc(A,!0);return{pos:O,inside:ye?ye.posAtStart-ye.border:-1}}function _r(u){return u.top<u.bottom||u.left<u.right}function or(u,v){var c=u.getClientRects();if(c.length){var m=c[v<0?0:c.length-1];if(_r(m))return m}return Array.prototype.find.call(c,_r)||u.getBoundingClientRect()}var tn=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function zt(u,v,c){var m=u.docView.domFromPos(v,c<0?-1:1),k=m.node,C=m.offset,A=m.atom,O=hr||Ee;if(k.nodeType==3)if(O&&(tn.test(k.nodeValue)||(c<0?!C:C==k.nodeValue.length))){var q=or(Fe(k,C,C),c);if(Ee&&C&&/\s/.test(k.nodeValue[C-1])&&C<k.nodeValue.length){var U=or(Fe(k,C-1,C-1),-1);if(U.top==q.top){var Q=or(Fe(k,C,C+1),-1);if(Q.top!=q.top)return pr(Q,Q.left<U.left)}}return q}else{var ue=C,ne=C,ye=c<0?1:-1;return c<0&&!C?(ne++,ye=-1):c>=0&&C==k.nodeValue.length?(ue--,ye=1):c<0?ue--:ne++,pr(or(Fe(k,ue,ne),ye),ye<0)}var Me=u.state.doc.resolve(v-(A||0));if(!Me.parent.inlineContent){if(A==null&&C&&(c<0||C==Et(k))){var Pe=k.childNodes[C-1];if(Pe.nodeType==1)return W(Pe.getBoundingClientRect(),!1)}if(A==null&&C<Et(k)){var je=k.childNodes[C];if(je.nodeType==1)return W(je.getBoundingClientRect(),!0)}return W(k.getBoundingClientRect(),c>=0)}if(A==null&&C&&(c<0||C==Et(k))){var Le=k.childNodes[C-1],gt=Le.nodeType==3?Fe(Le,Et(Le)-(O?0:1)):Le.nodeType==1&&(Le.nodeName!="BR"||!Le.nextSibling)?Le:null;if(gt)return pr(or(gt,1),!1)}if(A==null&&C<Et(k)){for(var vt=k.childNodes[C];vt.pmViewDesc&&vt.pmViewDesc.ignoreForCoords;)vt=vt.nextSibling;var it=vt?vt.nodeType==3?Fe(vt,0,O?0:1):vt.nodeType==1?vt:null:null;if(it)return pr(or(it,-1),!0)}return pr(or(k.nodeType==3?Fe(k):k,-c),c>=0)}function pr(u,v){if(u.width==0)return u;var c=v?u.left:u.right;return{top:u.top,bottom:u.bottom,left:c,right:c}}function W(u,v){if(u.height==0)return u;var c=v?u.top:u.bottom;return{top:c,bottom:c,left:u.left,right:u.right}}function $(u,v,c){var m=u.state,k=u.root.activeElement;m!=v&&u.updateState(v),k!=u.dom&&u.focus();try{return c()}finally{m!=v&&u.updateState(m),k!=u.dom&&k&&k.focus()}}function R(u,v,c){var m=v.selection,k=c=="up"?m.$from:m.$to;return $(u,v,function(){for(var C=u.docView.domFromPos(k.pos,c=="up"?-1:1),A=C.node;;){var O=u.docView.nearestDesc(A,!0);if(!O)break;if(O.node.isBlock){A=O.contentDOM||O.dom;break}A=O.dom.parentNode}for(var q=zt(u,k.pos,1),U=A.firstChild;U;U=U.nextSibling){var Q=void 0;if(U.nodeType==1)Q=U.getClientRects();else if(U.nodeType==3)Q=Fe(U,0,U.nodeValue.length).getClientRects();else continue;for(var ue=0;ue<Q.length;ue++){var ne=Q[ue];if(ne.bottom>ne.top+1&&(c=="up"?q.top-ne.top>(ne.bottom-q.top)*2:ne.bottom-q.bottom>(q.bottom-ne.top)*2))return!1}}return!0})}var D=/[\u0590-\u08ac]/;function B(u,v,c){var m=v.selection.$head;if(!m.parent.isTextblock)return!1;var k=m.parentOffset,C=!k,A=k==m.parent.content.size,O=u.domSelection();return O?!D.test(m.parent.textContent)||!O.modify?c=="left"||c=="backward"?C:A:$(u,v,function(){var q=u.domSelectionRange(),U=q.focusNode,Q=q.focusOffset,ue=q.anchorNode,ne=q.anchorOffset,ye=O.caretBidiLevel;O.modify("move",c,"character");var Me=m.depth?u.docView.domAfterPos(m.before()):u.dom,Pe=u.domSelectionRange(),je=Pe.focusNode,Le=Pe.focusOffset,gt=je&&!Me.contains(je.nodeType==1?je:je.parentNode)||U==je&&Q==Le;try{O.collapse(ue,ne),U&&(U!=ue||Q!=ne)&&O.extend&&O.extend(U,Q)}catch{}return ye!=null&&(O.caretBidiLevel=ye),gt}):m.pos==m.start()||m.pos==m.end()}var H=null,K=null,he=!1;function Ce(u,v,c){return H==v&&K==c?he:(H=v,K=c,he=c=="up"||c=="down"?R(u,v,c):B(u,v,c))}var re=0,J=1,me=2,Te=3,He=(function(){function u(v,c,m,k){z(this,u),this.parent=v,this.children=c,this.dom=m,this.contentDOM=k,this.dirty=re,m.pmViewDesc=this}return ee(u,[{key:"matchesWidget",value:function(c){return!1}},{key:"matchesMark",value:function(c){return!1}},{key:"matchesNode",value:function(c,m,k){return!1}},{key:"matchesHack",value:function(c){return!1}},{key:"parseRule",value:function(){return null}},{key:"stopEvent",value:function(c){return!1}},{key:"size",get:function(){for(var c=0,m=0;m<this.children.length;m++)c+=this.children[m].size;return c}},{key:"border",get:function(){return 0}},{key:"destroy",value:function(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(var c=0;c<this.children.length;c++)this.children[c].destroy()}},{key:"posBeforeChild",value:function(c){for(var m=0,k=this.posAtStart;;m++){var C=this.children[m];if(C==c)return k;k+=C.size}}},{key:"posBefore",get:function(){return this.parent.posBeforeChild(this)}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}},{key:"posAfter",get:function(){return this.posBefore+this.size}},{key:"posAtEnd",get:function(){return this.posAtStart+this.size-2*this.border}},{key:"localPosFromDOM",value:function(c,m,k){if(this.contentDOM&&this.contentDOM.contains(c.nodeType==1?c:c.parentNode))if(k<0){var C,A;if(c==this.contentDOM)C=c.childNodes[m-1];else{for(;c.parentNode!=this.contentDOM;)c=c.parentNode;C=c.previousSibling}for(;C&&!((A=C.pmViewDesc)&&A.parent==this);)C=C.previousSibling;return C?this.posBeforeChild(A)+A.size:this.posAtStart}else{var O,q;if(c==this.contentDOM)O=c.childNodes[m];else{for(;c.parentNode!=this.contentDOM;)c=c.parentNode;O=c.nextSibling}for(;O&&!((q=O.pmViewDesc)&&q.parent==this);)O=O.nextSibling;return O?this.posBeforeChild(q):this.posAtEnd}var U;if(c==this.dom&&this.contentDOM)U=m>xe(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))U=c.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(m==0)for(var Q=c;;Q=Q.parentNode){if(Q==this.dom){U=!1;break}if(Q.previousSibling)break}if(U==null&&m==c.childNodes.length)for(var ue=c;;ue=ue.parentNode){if(ue==this.dom){U=!0;break}if(ue.nextSibling)break}}return U??k>0?this.posAtEnd:this.posAtStart}},{key:"nearestDesc",value:function(c){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,k=!0,C=c;C;C=C.parentNode){var A=this.getDesc(C),O=void 0;if(A&&(!m||A.node))if(k&&(O=A.nodeDOM)&&!(O.nodeType==1?O.contains(c.nodeType==1?c:c.parentNode):O==c))k=!1;else return A}}},{key:"getDesc",value:function(c){for(var m=c.pmViewDesc,k=m;k;k=k.parent)if(k==this)return m}},{key:"posFromDOM",value:function(c,m,k){for(var C=c;C;C=C.parentNode){var A=this.getDesc(C);if(A)return A.localPosFromDOM(c,m,k)}return-1}},{key:"descAt",value:function(c){for(var m=0,k=0;m<this.children.length;m++){var C=this.children[m],A=k+C.size;if(k==c&&A!=k){for(;!C.border&&C.children.length;)for(var O=0;O<C.children.length;O++){var q=C.children[O];if(q.size){C=q;break}}return C}if(c<A)return C.descAt(c-k-C.border);k=A}}},{key:"domFromPos",value:function(c,m){if(!this.contentDOM)return{node:this.dom,offset:0,atom:c+1};for(var k=0,C=0,A=0;k<this.children.length;k++){var O=this.children[k],q=A+O.size;if(q>c||O instanceof _){C=c-A;break}A=q}if(C)return this.children[k].domFromPos(C-this.children[k].border,m);for(var U;k&&!(U=this.children[k-1]).size&&U instanceof Ze&&U.side>=0;k--);if(m<=0){for(var Q,ue=!0;Q=k?this.children[k-1]:null,!(!Q||Q.dom.parentNode==this.contentDOM);k--,ue=!1);return Q&&m&&ue&&!Q.border&&!Q.domAtom?Q.domFromPos(Q.size,m):{node:this.contentDOM,offset:Q?xe(Q.dom)+1:0}}else{for(var ne,ye=!0;ne=k<this.children.length?this.children[k]:null,!(!ne||ne.dom.parentNode==this.contentDOM);k++,ye=!1);return ne&&ye&&!ne.border&&!ne.domAtom?ne.domFromPos(0,m):{node:this.contentDOM,offset:ne?xe(ne.dom):this.contentDOM.childNodes.length}}}},{key:"parseRange",value:function(c,m){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.children.length==0)return{node:this.contentDOM,from:c,to:m,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var C=-1,A=-1,O=k,q=0;;q++){var U=this.children[q],Q=O+U.size;if(C==-1&&c<=Q){var ue=O+U.border;if(c>=ue&&m<=Q-U.border&&U.node&&U.contentDOM&&this.contentDOM.contains(U.contentDOM))return U.parseRange(c,m,ue);c=O;for(var ne=q;ne>0;ne--){var ye=this.children[ne-1];if(ye.size&&ye.dom.parentNode==this.contentDOM&&!ye.emptyChildAt(1)){C=xe(ye.dom)+1;break}c-=ye.size}C==-1&&(C=0)}if(C>-1&&(Q>m||q==this.children.length-1)){m=Q;for(var Me=q+1;Me<this.children.length;Me++){var Pe=this.children[Me];if(Pe.size&&Pe.dom.parentNode==this.contentDOM&&!Pe.emptyChildAt(-1)){A=xe(Pe.dom);break}m+=Pe.size}A==-1&&(A=this.contentDOM.childNodes.length);break}O=Q}return{node:this.contentDOM,from:c,to:m,fromOffset:C,toOffset:A}}},{key:"emptyChildAt",value:function(c){if(this.border||!this.contentDOM||!this.children.length)return!1;var m=this.children[c<0?0:this.children.length-1];return m.size==0||m.emptyChildAt(c)}},{key:"domAfterPos",value:function(c){var m=this.domFromPos(c,0),k=m.node,C=m.offset;if(k.nodeType!=1||C==k.childNodes.length)throw new RangeError("No node after pos "+c);return k.childNodes[C]}},{key:"setSelection",value:function(c,m,k){for(var C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,A=Math.min(c,m),O=Math.max(c,m),q=0,U=0;q<this.children.length;q++){var Q=this.children[q],ue=U+Q.size;if(A>U&&O<ue)return Q.setSelection(c-U-Q.border,m-U-Q.border,k,C);U=ue}var ne=this.domFromPos(c,c?-1:1),ye=m==c?ne:this.domFromPos(m,m?-1:1),Me=k.root.getSelection(),Pe=k.domSelectionRange(),je=!1;if((Ee||lt)&&c==m){var Le=ne,gt=Le.node,vt=Le.offset;if(gt.nodeType==3){if(je=!!(vt&>.nodeValue[vt-1]==`
|
|
679
|
-
`),je&&vt==gt.nodeValue.length)for(var it=gt,ht;it;it=it.parentNode){if(ht=it.nextSibling){ht.nodeName=="BR"&&(ne=ye={node:ht.parentNode,offset:xe(ht)+1});break}var Pt=it.pmViewDesc;if(Pt&&Pt.node&&Pt.node.isBlock)break}}else{var qt=gt.childNodes[vt-1];je=qt&&(qt.nodeName=="BR"||qt.contentEditable=="false")}}if(Ee&&Pe.focusNode&&Pe.focusNode!=ye.node&&Pe.focusNode.nodeType==1){var Kt=Pe.focusNode.childNodes[Pe.focusOffset];Kt&&Kt.contentEditable=="false"&&(C=!0)}if(!(!(C||je&<)&&ct(ne.node,ne.offset,Pe.anchorNode,Pe.anchorOffset)&&ct(ye.node,ye.offset,Pe.focusNode,Pe.focusOffset))){var tr=!1;if((Me.extend||c==m)&&!(je&&Ee)){Me.collapse(ne.node,ne.offset);try{c!=m&&Me.extend(ye.node,ye.offset),tr=!0}catch{}}if(!tr){if(c>m){var rr=ne;ne=ye,ye=rr}var Ln=document.createRange();Ln.setEnd(ye.node,ye.offset),Ln.setStart(ne.node,ne.offset),Me.removeAllRanges(),Me.addRange(Ln)}}}},{key:"ignoreMutation",value:function(c){return!this.contentDOM&&c.type!="selection"}},{key:"contentLost",get:function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}},{key:"markDirty",value:function(c,m){for(var k=0,C=0;C<this.children.length;C++){var A=this.children[C],O=k+A.size;if(k==O?c<=O&&m>=k:c<O&&m>k){var q=k+A.border,U=O-A.border;if(c>=q&&m<=U){this.dirty=c==k||m==O?me:J,c==q&&m==U&&(A.contentLost||A.dom.parentNode!=this.contentDOM)?A.dirty=Te:A.markDirty(c-q,m-q);return}else A.dirty=A.dom==A.contentDOM&&A.dom.parentNode==this.contentDOM&&!A.children.length?me:Te}k=O}this.dirty=me}},{key:"markParentsDirty",value:function(){for(var c=1,m=this.parent;m;m=m.parent,c++){var k=c==1?me:J;m.dirty<k&&(m.dirty=k)}}},{key:"domAtom",get:function(){return!1}},{key:"ignoreForCoords",get:function(){return!1}},{key:"ignoreForSelection",get:function(){return!1}},{key:"isText",value:function(c){return!1}}]),u})(),Ze=(function(u){f(c,u);var v=b(c);function c(m,k,C,A){var O;z(this,c);var q,U=k.type.toDOM;if(typeof U=="function"&&(U=U(C,function(){if(!q)return A;if(q.parent)return q.parent.posBeforeChild(q)})),!k.type.spec.raw){if(U.nodeType!=1){var Q=document.createElement("span");Q.appendChild(U),U=Q}U.contentEditable="false",U.classList.add("ProseMirror-widget")}return O=v.call(this,m,[],U,null),O.widget=k,O.widget=k,q=x(O),O}return ee(c,[{key:"matchesWidget",value:function(k){return this.dirty==re&&k.type.eq(this.widget.type)}},{key:"parseRule",value:function(){return{ignore:!0}}},{key:"stopEvent",value:function(k){var C=this.widget.spec.stopEvent;return C?C(k):!1}},{key:"ignoreMutation",value:function(k){return k.type!="selection"||this.widget.spec.ignoreSelection}},{key:"destroy",value:function(){this.widget.type.destroy(this.dom),s(P(c.prototype),"destroy",this).call(this)}},{key:"domAtom",get:function(){return!0}},{key:"ignoreForSelection",get:function(){return!!this.widget.type.spec.relaxedSide}},{key:"side",get:function(){return this.widget.type.side}}]),c})(He),I=(function(u){f(c,u);var v=b(c);function c(m,k,C,A){var O;return z(this,c),O=v.call(this,m,[],k,null),O.textDOM=C,O.text=A,O}return ee(c,[{key:"size",get:function(){return this.text.length}},{key:"localPosFromDOM",value:function(k,C){return k!=this.textDOM?this.posAtStart+(C?this.size:0):this.posAtStart+C}},{key:"domFromPos",value:function(k){return{node:this.textDOM,offset:k}}},{key:"ignoreMutation",value:function(k){return k.type==="characterData"&&k.target.nodeValue==k.oldValue}}]),c})(He),M=(function(u){f(c,u);var v=b(c);function c(m,k,C,A,O){var q;return z(this,c),q=v.call(this,m,[],C,A),q.mark=k,q.spec=O,q}return ee(c,[{key:"parseRule",value:function(){return this.dirty&Te||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}},{key:"matchesMark",value:function(k){return this.dirty!=Te&&this.mark.eq(k)}},{key:"markDirty",value:function(k,C){if(s(P(c.prototype),"markDirty",this).call(this,k,C),this.dirty!=re){for(var A=this.parent;!A.node;)A=A.parent;A.dirty<this.dirty&&(A.dirty=this.dirty),this.dirty=re}}},{key:"slice",value:function(k,C,A){var O=c.create(this.parent,this.mark,!0,A),q=this.children,U=this.size;C<U&&(q=En(q,C,U,A)),k>0&&(q=En(q,0,k,A));for(var Q=0;Q<q.length;Q++)q[Q].parent=O;return O.children=q,O}},{key:"ignoreMutation",value:function(k){return this.spec.ignoreMutation?this.spec.ignoreMutation(k):s(P(c.prototype),"ignoreMutation",this).call(this,k)}},{key:"destroy",value:function(){this.spec.destroy&&this.spec.destroy(),s(P(c.prototype),"destroy",this).call(this)}}],[{key:"create",value:function(k,C,A,O){var q=O.nodeViews[C.type.name],U=q&&q(C,O,A);return(!U||!U.dom)&&(U=le.DOMSerializer.renderSpec(document,C.type.spec.toDOM(C,A),null,C.attrs)),new c(k,C,U.dom,U.contentDOM||U.dom,U)}}]),c})(He),g=(function(u){f(c,u);var v=b(c);function c(m,k,C,A,O,q,U,Q,ue){var ne;return z(this,c),ne=v.call(this,m,[],O,q),ne.node=k,ne.outerDeco=C,ne.innerDeco=A,ne.nodeDOM=U,ne}return ee(c,[{key:"parseRule",value:function(){var k=this;if(this.node.type.spec.reparseInView)return null;var C={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(C.preserveWhitespace="full"),!this.contentDOM)C.getContent=function(){return k.node.content};else if(!this.contentLost)C.contentElement=this.contentDOM;else{for(var A=this.children.length-1;A>=0;A--){var O=this.children[A];if(this.dom.contains(O.dom.parentNode)){C.contentElement=O.dom.parentNode;break}}C.contentElement||(C.getContent=function(){return le.Fragment.empty})}return C}},{key:"matchesNode",value:function(k,C,A){return this.dirty==re&&k.eq(this.node)&&wt(C,this.outerDeco)&&A.eq(this.innerDeco)}},{key:"size",get:function(){return this.node.nodeSize}},{key:"border",get:function(){return this.node.isLeaf?0:1}},{key:"updateChildren",value:function(k,C){var A=this,O=this.node.inlineContent,q=C,U=k.composing?this.localCompositionInfo(k,C):null,Q=U&&U.pos>-1?U:null,ue=U&&U.pos<0,ne=new rn(this,Q&&Q.node,k);to(this.node,this.innerDeco,function(ye,Me,Pe){ye.spec.marks?ne.syncToMarks(ye.spec.marks,O,k,Me):ye.type.side>=0&&!Pe&&ne.syncToMarks(Me==A.node.childCount?le.Mark.none:A.node.child(Me).marks,O,k,Me),ne.placeWidget(ye,k,q)},function(ye,Me,Pe,je){ne.syncToMarks(ye.marks,O,k,je);var Le;ne.findNodeMatch(ye,Me,Pe,je)||ue&&k.state.selection.from>q&&k.state.selection.to<q+ye.nodeSize&&(Le=ne.findIndexWithChild(U.node))>-1&&ne.updateNodeAt(ye,Me,Pe,Le,k)||ne.updateNextNode(ye,Me,Pe,k,je,q)||ne.addNode(ye,Me,Pe,k,q),q+=ye.nodeSize}),ne.syncToMarks([],O,k,0),this.node.isTextblock&&ne.addTextblockHacks(),ne.destroyRest(),(ne.changed||this.dirty==me)&&(Q&&this.protectLocalComposition(k,Q),X(this.contentDOM,this.children,k),Ht&&ha(this.dom))}},{key:"localCompositionInfo",value:function(k,C){var A=k.state.selection,O=A.from,q=A.to;if(!(k.state.selection instanceof oe.TextSelection)||O<C||q>C+this.node.content.size)return null;var U=k.input.compositionNode;if(!U||!this.dom.contains(U.parentNode))return null;if(this.node.inlineContent){var Q=U.nodeValue,ue=pi(this.node.content,Q,O-C,q-C);return ue<0?null:{node:U,pos:ue,text:Q}}else return{node:U,pos:-1,text:""}}},{key:"protectLocalComposition",value:function(k,C){var A=C.node,O=C.pos,q=C.text;if(!this.getDesc(A)){for(var U=A;U.parentNode!=this.contentDOM;U=U.parentNode){for(;U.previousSibling;)U.parentNode.removeChild(U.previousSibling);for(;U.nextSibling;)U.parentNode.removeChild(U.nextSibling);U.pmViewDesc&&(U.pmViewDesc=void 0)}var Q=new I(this,U,A,q);k.input.compositionNodes.push(Q),this.children=En(this.children,O,O+q.length,k,Q)}}},{key:"update",value:function(k,C,A,O){return this.dirty==Te||!k.sameMarkup(this.node)?!1:(this.updateInner(k,C,A,O),!0)}},{key:"updateInner",value:function(k,C,A,O){this.updateOuterDeco(C),this.node=k,this.innerDeco=A,this.contentDOM&&this.updateChildren(O,this.posAtStart),this.dirty=re}},{key:"updateOuterDeco",value:function(k){if(!wt(k,this.outerDeco)){var C=this.nodeDOM.nodeType!=1,A=this.dom;this.dom=Oe(this.dom,this.nodeDOM,Ne(this.outerDeco,this.node,C),Ne(k,this.node,C)),this.dom!=A&&(A.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=k}}},{key:"selectNode",value:function(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}},{key:"deselectNode",value:function(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}},{key:"domAtom",get:function(){return this.node.isAtom}}],[{key:"create",value:function(k,C,A,O,q,U){var Q=q.nodeViews[C.type.name],ue,ne=Q&&Q(C,q,function(){if(!ue)return U;if(ue.parent)return ue.parent.posBeforeChild(ue)},A,O),ye=ne&&ne.dom,Me=ne&&ne.contentDOM;if(C.isText){if(!ye)ye=document.createTextNode(C.text);else if(ye.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else if(!ye){var Pe=le.DOMSerializer.renderSpec(document,C.type.spec.toDOM(C),null,C.attrs);ye=Pe.dom,Me=Pe.contentDOM}!Me&&!C.isText&&ye.nodeName!="BR"&&(ye.hasAttribute("contenteditable")||(ye.contentEditable="false"),C.type.spec.draggable&&(ye.draggable=!0));var je=ye;return ye=et(ye,A,C),ne?ue=new j(k,C,A,O,ye,Me||null,je,ne,q,U+1):C.isText?new N(k,C,A,O,ye,je,q):new c(k,C,A,O,ye,Me||null,je)}}]),c})(He);function w(u,v,c,m,k){et(m,v,u);var C=new g(void 0,u,v,c,m,m,m,k,0);return C.contentDOM&&C.updateChildren(k,0),C}var N=(function(u){f(c,u);var v=b(c);function c(m,k,C,A,O,q,U){return z(this,c),v.call(this,m,k,C,A,O,null,q,U,0)}return ee(c,[{key:"parseRule",value:function(){for(var k=this.nodeDOM.parentNode;k&&k!=this.dom&&!k.pmIsDeco;)k=k.parentNode;return{skip:k||!0}}},{key:"update",value:function(k,C,A,O){return this.dirty==Te||this.dirty!=re&&!this.inParent()||!k.sameMarkup(this.node)?!1:(this.updateOuterDeco(C),(this.dirty!=re||k.text!=this.node.text)&&k.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=k.text,O.trackWrites==this.nodeDOM&&(O.trackWrites=null)),this.node=k,this.dirty=re,!0)}},{key:"inParent",value:function(){for(var k=this.parent.contentDOM,C=this.nodeDOM;C;C=C.parentNode)if(C==k)return!0;return!1}},{key:"domFromPos",value:function(k){return{node:this.nodeDOM,offset:k}}},{key:"localPosFromDOM",value:function(k,C,A){return k==this.nodeDOM?this.posAtStart+Math.min(C,this.node.text.length):s(P(c.prototype),"localPosFromDOM",this).call(this,k,C,A)}},{key:"ignoreMutation",value:function(k){return k.type!="characterData"&&k.type!="selection"}},{key:"slice",value:function(k,C,A){var O=this.node.cut(k,C),q=document.createTextNode(O.text);return new c(this.parent,O,this.outerDeco,this.innerDeco,q,q,A)}},{key:"markDirty",value:function(k,C){s(P(c.prototype),"markDirty",this).call(this,k,C),this.dom!=this.nodeDOM&&(k==0||C==this.nodeDOM.nodeValue.length)&&(this.dirty=Te)}},{key:"domAtom",get:function(){return!1}},{key:"isText",value:function(k){return this.node.text==k}}]),c})(g),_=(function(u){f(c,u);var v=b(c);function c(){return z(this,c),v.apply(this,arguments)}return ee(c,[{key:"parseRule",value:function(){return{ignore:!0}}},{key:"matchesHack",value:function(k){return this.dirty==re&&this.dom.nodeName==k}},{key:"domAtom",get:function(){return!0}},{key:"ignoreForCoords",get:function(){return this.dom.nodeName=="IMG"}}]),c})(He),j=(function(u){f(c,u);var v=b(c);function c(m,k,C,A,O,q,U,Q,ue,ne){var ye;return z(this,c),ye=v.call(this,m,k,C,A,O,q,U,ue,ne),ye.spec=Q,ye}return ee(c,[{key:"update",value:function(k,C,A,O){if(this.dirty==Te)return!1;if(this.spec.update&&(this.node.type==k.type||this.spec.multiType)){var q=this.spec.update(k,C,A);return q&&this.updateInner(k,C,A,O),q}else return!this.contentDOM&&!k.isLeaf?!1:s(P(c.prototype),"update",this).call(this,k,C,A,O)}},{key:"selectNode",value:function(){this.spec.selectNode?this.spec.selectNode():s(P(c.prototype),"selectNode",this).call(this)}},{key:"deselectNode",value:function(){this.spec.deselectNode?this.spec.deselectNode():s(P(c.prototype),"deselectNode",this).call(this)}},{key:"setSelection",value:function(k,C,A,O){this.spec.setSelection?this.spec.setSelection(k,C,A.root):s(P(c.prototype),"setSelection",this).call(this,k,C,A,O)}},{key:"destroy",value:function(){this.spec.destroy&&this.spec.destroy(),s(P(c.prototype),"destroy",this).call(this)}},{key:"stopEvent",value:function(k){return this.spec.stopEvent?this.spec.stopEvent(k):!1}},{key:"ignoreMutation",value:function(k){return this.spec.ignoreMutation?this.spec.ignoreMutation(k):s(P(c.prototype),"ignoreMutation",this).call(this,k)}}]),c})(g);function X(u,v,c){for(var m=u.firstChild,k=!1,C=0;C<v.length;C++){var A=v[C],O=A.dom;if(O.parentNode==u){for(;O!=m;)m=Vt(m),k=!0;m=m.nextSibling}else k=!0,u.insertBefore(O,m);if(A instanceof M){var q=m?m.previousSibling:u.lastChild;X(A.contentDOM,A.children,c),m=q?q.nextSibling:u.firstChild}}for(;m;)m=Vt(m),k=!0;k&&c.trackWrites==u&&(c.trackWrites=null)}var ce=function(v){v&&(this.nodeName=v)};ce.prototype=Object.create(null);var pe=[new ce];function Ne(u,v,c){if(u.length==0)return pe;for(var m=c?pe[0]:new ce,k=[m],C=0;C<u.length;C++){var A=u[C].type.attrs;if(A){A.nodeName&&k.push(m=new ce(A.nodeName));for(var O in A){var q=A[O];q!=null&&(c&&k.length==1&&k.push(m=new ce(v.isInline?"span":"div")),O=="class"?m.class=(m.class?m.class+" ":"")+q:O=="style"?m.style=(m.style?m.style+";":"")+q:O!="nodeName"&&(m[O]=q))}}}return k}function Oe(u,v,c,m){if(c==pe&&m==pe)return v;for(var k=v,C=0;C<m.length;C++){var A=m[C],O=c[C];if(C){var q=void 0;O&&O.nodeName==A.nodeName&&k!=u&&(q=k.parentNode)&&q.nodeName.toLowerCase()==A.nodeName||(q=document.createElement(A.nodeName),q.pmIsDeco=!0,q.appendChild(k),O=pe[0]),k=q}Be(k,O||pe[0],A)}return k}function Be(u,v,c){for(var m in v)m!="class"&&m!="style"&&m!="nodeName"&&!(m in c)&&u.removeAttribute(m);for(var k in c)k!="class"&&k!="style"&&k!="nodeName"&&c[k]!=v[k]&&u.setAttribute(k,c[k]);if(v.class!=c.class){for(var C=v.class?v.class.split(" ").filter(Boolean):[],A=c.class?c.class.split(" ").filter(Boolean):[],O=0;O<C.length;O++)A.indexOf(C[O])==-1&&u.classList.remove(C[O]);for(var q=0;q<A.length;q++)C.indexOf(A[q])==-1&&u.classList.add(A[q]);u.classList.length==0&&u.removeAttribute("class")}if(v.style!=c.style){if(v.style)for(var U=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,Q;Q=U.exec(v.style);)u.style.removeProperty(Q[1]);c.style&&(u.style.cssText+=c.style)}}function et(u,v,c){return Oe(u,u,pe,Ne(v,c,u.nodeType!=1))}function wt(u,v){if(u.length!=v.length)return!1;for(var c=0;c<u.length;c++)if(!u[c].type.eq(v[c].type))return!1;return!0}function Vt(u){var v=u.nextSibling;return u.parentNode.removeChild(u),v}var rn=(function(){function u(v,c,m){z(this,u),this.lock=c,this.view=m,this.index=0,this.stack=[],this.changed=!1,this.top=v,this.preMatch=zn(v.node.content,v)}return ee(u,[{key:"destroyBetween",value:function(c,m){if(c!=m){for(var k=c;k<m;k++)this.top.children[k].destroy();this.top.children.splice(c,m-c),this.changed=!0}}},{key:"destroyRest",value:function(){this.destroyBetween(this.index,this.top.children.length)}},{key:"syncToMarks",value:function(c,m,k,C){for(var A=0,O=this.stack.length>>1,q=Math.min(O,c.length);A<q&&(A==O-1?this.top:this.stack[A+1<<1]).matchesMark(c[A])&&c[A].type.spec.spanning!==!1;)A++;for(;A<O;)this.destroyRest(),this.top.dirty=re,this.index=this.stack.pop(),this.top=this.stack.pop(),O--;for(;O<c.length;){this.stack.push(this.top,this.index+1);var U=-1,Q=this.top.children.length;C<this.preMatch.index&&(Q=Math.min(this.index+3,Q));for(var ue=this.index;ue<Q;ue++){var ne=this.top.children[ue];if(ne.matchesMark(c[O])&&!this.isLocked(ne.dom)){U=ue;break}}if(U>-1)U>this.index&&(this.changed=!0,this.destroyBetween(this.index,U)),this.top=this.top.children[this.index];else{var ye=M.create(this.top,c[O],m,k);this.top.children.splice(this.index,0,ye),this.top=ye,this.changed=!0}this.index=0,O++}}},{key:"findNodeMatch",value:function(c,m,k,C){var A=-1,O;if(C>=this.preMatch.index&&(O=this.preMatch.matches[C-this.preMatch.index]).parent==this.top&&O.matchesNode(c,m,k))A=this.top.children.indexOf(O,this.index);else for(var q=this.index,U=Math.min(this.top.children.length,q+5);q<U;q++){var Q=this.top.children[q];if(Q.matchesNode(c,m,k)&&!this.preMatch.matched.has(Q)){A=q;break}}return A<0?!1:(this.destroyBetween(this.index,A),this.index++,!0)}},{key:"updateNodeAt",value:function(c,m,k,C,A){var O=this.top.children[C];return O.dirty==Te&&O.dom==O.contentDOM&&(O.dirty=me),O.update(c,m,k,A)?(this.destroyBetween(this.index,C),this.index++,!0):!1}},{key:"findIndexWithChild",value:function(c){for(;;){var m=c.parentNode;if(!m)return-1;if(m==this.top.contentDOM){var k=c.pmViewDesc;if(k){for(var C=this.index;C<this.top.children.length;C++)if(this.top.children[C]==k)return C}return-1}c=m}}},{key:"updateNextNode",value:function(c,m,k,C,A,O){for(var q=this.index;q<this.top.children.length;q++){var U=this.top.children[q];if(U instanceof g){var Q=this.preMatch.matched.get(U);if(Q!=null&&Q!=A)return!1;var ue=U.dom,ne=void 0,ye=this.isLocked(ue)&&!(c.isText&&U.node&&U.node.isText&&U.nodeDOM.nodeValue==c.text&&U.dirty!=Te&&wt(m,U.outerDeco));if(!ye&&U.update(c,m,k,C))return this.destroyBetween(this.index,q),U.dom!=ue&&(this.changed=!0),this.index++,!0;if(!ye&&(ne=this.recreateWrapper(U,c,m,k,C,O)))return this.destroyBetween(this.index,q),this.top.children[this.index]=ne,ne.contentDOM&&(ne.dirty=me,ne.updateChildren(C,O+1),ne.dirty=re),this.changed=!0,this.index++,!0;break}}return!1}},{key:"recreateWrapper",value:function(c,m,k,C,A,O){if(c.dirty||m.isAtom||!c.children.length||!c.node.content.eq(m.content)||!wt(k,c.outerDeco)||!C.eq(c.innerDeco))return null;var q=g.create(this.top,m,k,C,A,O);if(q.contentDOM){q.children=c.children,c.children=[];var U=i(q.children),Q;try{for(U.s();!(Q=U.n()).done;){var ue=Q.value;ue.parent=q}}catch(ne){U.e(ne)}finally{U.f()}}return c.destroy(),q}},{key:"addNode",value:function(c,m,k,C,A){var O=g.create(this.top,c,m,k,C,A);O.contentDOM&&O.updateChildren(C,A+1),this.top.children.splice(this.index++,0,O),this.changed=!0}},{key:"placeWidget",value:function(c,m,k){var C=this.index<this.top.children.length?this.top.children[this.index]:null;if(C&&C.matchesWidget(c)&&(c==C.widget||!C.widget.type.toDOM.parentNode))this.index++;else{var A=new Ze(this.top,c,m,k);this.top.children.splice(this.index++,0,A),this.changed=!0}}},{key:"addTextblockHacks",value:function(){for(var c=this.top.children[this.index-1],m=this.top;c instanceof M;)m=c,c=m.children[m.children.length-1];(!c||!(c instanceof N)||/\n$/.test(c.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(c.node.text))&&((lt||Xe)&&c&&c.dom.contentEditable=="false"&&this.addHackNode("IMG",m),this.addHackNode("BR",this.top))}},{key:"addHackNode",value:function(c,m){if(m==this.top&&this.index<m.children.length&&m.children[this.index].matchesHack(c))this.index++;else{var k=document.createElement(c);c=="IMG"&&(k.className="ProseMirror-separator",k.alt=""),c=="BR"&&(k.className="ProseMirror-trailingBreak");var C=new _(this.top,[],k,null);m!=this.top?m.children.push(C):m.children.splice(this.index++,0,C),this.changed=!0}}},{key:"isLocked",value:function(c){return this.lock&&(c==this.lock||c.nodeType==1&&c.contains(this.lock.parentNode))}}]),u})();function zn(u,v){var c=v,m=c.children.length,k=u.childCount,C=new Map,A=[];e:for(;k>0;){for(var O=void 0;;)if(m){var q=c.children[m-1];if(q instanceof M)c=q,m=q.children.length;else{O=q,m--;break}}else{if(c==v)break e;m=c.parent.children.indexOf(c),c=c.parent}var U=O.node;if(U){if(U!=u.child(k-1))break;--k,C.set(O,k),A.push(O)}}return{index:k,matched:C,matches:A.reverse()}}function Zn(u,v){return u.type.side-v.type.side}function to(u,v,c,m){var k=v.locals(u),C=0;if(k.length==0){for(var A=0;A<u.childCount;A++){var O=u.child(A);m(O,k,v.forChild(C,O),A),C+=O.nodeSize}return}for(var q=0,U=[],Q=null,ue=0;;){for(var ne=void 0,ye=void 0;q<k.length&&k[q].to==C;){var Me=k[q++];Me.widget&&(ne?(ye||(ye=[ne])).push(Me):ne=Me)}if(ne)if(ye){ye.sort(Zn);for(var Pe=0;Pe<ye.length;Pe++)c(ye[Pe],ue,!!Q)}else c(ne,ue,!!Q);var je=void 0,Le=void 0;if(Q)Le=-1,je=Q,Q=null;else if(ue<u.childCount)Le=ue,je=u.child(ue++);else break;for(var gt=0;gt<U.length;gt++)U[gt].to<=C&&U.splice(gt--,1);for(;q<k.length&&k[q].from<=C&&k[q].to>C;)U.push(k[q++]);var vt=C+je.nodeSize;if(je.isText){var it=vt;q<k.length&&k[q].from<it&&(it=k[q].from);for(var ht=0;ht<U.length;ht++)U[ht].to<it&&(it=U[ht].to);it<vt&&(Q=je.cut(it-C),je=je.cut(0,it-C),vt=it,Le=-1)}else for(;q<k.length&&k[q].to<vt;)q++;var Pt=je.isInline&&!je.isLeaf?U.filter(function(qt){return!qt.inline}):U.slice();m(je,Pt,v.forChild(C,je),Le),C=vt}}function ha(u){if(u.nodeName=="UL"||u.nodeName=="OL"){var v=u.style.cssText;u.style.cssText=v+"; list-style: square !important",window.getComputedStyle(u).listStyle,u.style.cssText=v}}function pi(u,v,c,m){for(var k=0,C=0;k<u.childCount&&C<=m;){var A=u.child(k++),O=C;if(C+=A.nodeSize,!!A.isText){for(var q=A.text;k<u.childCount;){var U=u.child(k++);if(C+=U.nodeSize,!U.isText)break;q+=U.text}if(C>=c){if(C>=m&&q.slice(m-v.length-O,m-O)==v)return m-v.length;var Q=O<m?q.lastIndexOf(v,m-O-1):-1;if(Q>=0&&Q+v.length+O>=c)return O+Q;if(c==m&&q.length>=m+v.length-O&&q.slice(m-O,m-O+v.length)==v)return m}}}return-1}function En(u,v,c,m,k){for(var C=[],A=0,O=0;A<u.length;A++){var q=u[A],U=O,Q=O+=q.size;U>=c||Q<=v?C.push(q):(U<v&&C.push(q.slice(0,v-U,m)),k&&(C.push(k),k=void 0),Q>c&&C.push(q.slice(c-U,q.size,m)))}return C}function Mn(u){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,c=u.domSelectionRange(),m=u.state.doc;if(!c.focusNode)return null;var k=u.docView.nearestDesc(c.focusNode),C=k&&k.size==0,A=u.docView.posFromDOM(c.focusNode,c.focusOffset,1);if(A<0)return null;var O=m.resolve(A),q,U;if(st(c)){for(q=A;k&&!k.node;)k=k.parent;var Q=k.node;if(k&&Q.isAtom&&oe.NodeSelection.isSelectable(Q)&&k.parent&&!(Q.isInline&&Ye(c.focusNode,c.focusOffset,k.dom))){var ue=k.posBefore;U=new oe.NodeSelection(A==ue?O:m.resolve(ue))}}else{if(c instanceof u.dom.ownerDocument.defaultView.Selection&&c.rangeCount>1){for(var ne=A,ye=A,Me=0;Me<c.rangeCount;Me++){var Pe=c.getRangeAt(Me);ne=Math.min(ne,u.docView.posFromDOM(Pe.startContainer,Pe.startOffset,1)),ye=Math.max(ye,u.docView.posFromDOM(Pe.endContainer,Pe.endOffset,-1))}if(ne<0)return null;var je=ye==u.state.selection.anchor?[ye,ne]:[ne,ye],Le=r(je,2);q=Le[0],A=Le[1],O=m.resolve(A)}else q=u.docView.posFromDOM(c.anchorNode,c.anchorOffset,1);if(q<0)return null}var gt=m.resolve(q);if(!U){var vt=v=="pointer"||u.state.selection.head<O.pos&&!C?1:-1;U=On(u,gt,O,vt)}return U}function pa(u){return u.editable?u.hasFocus():no(u)&&document.activeElement&&document.activeElement.contains(u.dom)}function nn(u){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=u.state.selection;if(vi(u,c),!!pa(u)){if(!v&&u.input.mouseDown&&u.input.mouseDown.allowDefault&&Xe){var m=u.domSelectionRange(),k=u.domObserver.currentSelection;if(m.anchorNode&&k.anchorNode&&ct(m.anchorNode,m.anchorOffset,k.anchorNode,k.anchorOffset)){u.input.mouseDown.delayedSelectionSync=!0,u.domObserver.setCurSelection();return}}if(u.domObserver.disconnectSelection(),u.cursorWrapper)An(u);else{var C=c.anchor,A=c.head,O,q;va&&!(c instanceof oe.TextSelection)&&(c.$from.parent.inlineContent||(O=_i(u,c.from)),!c.empty&&!c.$from.parent.inlineContent&&(q=_i(u,c.to))),u.docView.setSelection(C,A,u,v),va&&(O&&Vi(O),q&&Vi(q)),c.visible?u.dom.classList.remove("ProseMirror-hideselection"):(u.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&ma(u))}u.domObserver.setCurSelection(),u.domObserver.connectSelection()}}var va=lt||Xe&&kt<63;function _i(u,v){var c=u.docView.domFromPos(v,0),m=c.node,k=c.offset,C=k<m.childNodes.length?m.childNodes[k]:null,A=k?m.childNodes[k-1]:null;if(lt&&C&&C.contentEditable=="false")return zi(C);if((!C||C.contentEditable=="false")&&(!A||A.contentEditable=="false")){if(C)return zi(C);if(A)return zi(A)}}function zi(u){return u.contentEditable="true",lt&&u.draggable&&(u.draggable=!1,u.wasDraggable=!0),u}function Vi(u){u.contentEditable="false",u.wasDraggable&&(u.draggable=!0,u.wasDraggable=null)}function ma(u){var v=u.dom.ownerDocument;v.removeEventListener("selectionchange",u.input.hideSelectionGuard);var c=u.domSelectionRange(),m=c.anchorNode,k=c.anchorOffset;v.addEventListener("selectionchange",u.input.hideSelectionGuard=function(){(c.anchorNode!=m||c.anchorOffset!=k)&&(v.removeEventListener("selectionchange",u.input.hideSelectionGuard),setTimeout(function(){(!pa(u)||u.state.selection.visible)&&u.dom.classList.remove("ProseMirror-hideselection")},20))})}function An(u){var v=u.domSelection();if(v){var c=u.cursorWrapper.dom,m=c.nodeName=="IMG";m?v.collapse(c.parentNode,xe(c)+1):v.collapse(c,0),!m&&!u.state.selection.visible&&Z&&ke<=11&&(c.disabled=!0,c.disabled=!1)}}function vi(u,v){if(v instanceof oe.NodeSelection){var c=u.docView.descAt(v.from);c!=u.lastSelectedViewDesc&&(Ui(u),c&&c.selectNode(),u.lastSelectedViewDesc=c)}else Ui(u)}function Ui(u){u.lastSelectedViewDesc&&(u.lastSelectedViewDesc.parent&&u.lastSelectedViewDesc.deselectNode(),u.lastSelectedViewDesc=void 0)}function On(u,v,c,m){return u.someProp("createSelectionBetween",function(k){return k(u,v,c)})||oe.TextSelection.between(v,c,m)}function ro(u){return u.editable&&!u.hasFocus()?!1:no(u)}function no(u){var v=u.domSelectionRange();if(!v.anchorNode)return!1;try{return u.dom.contains(v.anchorNode.nodeType==3?v.anchorNode.parentNode:v.anchorNode)&&(u.editable||u.dom.contains(v.focusNode.nodeType==3?v.focusNode.parentNode:v.focusNode))}catch{return!1}}function Qn(u){var v=u.docView.domFromPos(u.state.selection.anchor,0),c=u.domSelectionRange();return ct(v.node,v.offset,c.anchorNode,c.anchorOffset)}function Nn(u,v){var c=u.selection,m=c.$anchor,k=c.$head,C=v>0?m.max(k):m.min(k),A=C.parent.inlineContent?C.depth?u.doc.resolve(v>0?C.after():C.before()):null:C;return A&&oe.Selection.findFrom(A,v)}function Dn(u,v){return u.dispatch(u.state.tr.setSelection(v).scrollIntoView()),!0}function $i(u,v,c){var m=u.state.selection;if(m instanceof oe.TextSelection)if(c.indexOf("s")>-1){var k=m.$head,C=k.textOffset?null:v<0?k.nodeBefore:k.nodeAfter;if(!C||C.isText||!C.isLeaf)return!1;var A=u.state.doc.resolve(k.pos+C.nodeSize*(v<0?-1:1));return Dn(u,new oe.TextSelection(m.$anchor,A))}else if(m.empty){if(u.endOfTextblock(v>0?"forward":"backward")){var O=Nn(u.state,v);return O&&O instanceof oe.NodeSelection?Dn(u,O):!1}else if(!(At&&c.indexOf("m")>-1)){var q=m.$head,U=q.textOffset?null:v<0?q.nodeBefore:q.nodeAfter,Q;if(!U||U.isText)return!1;var ue=v<0?q.pos-U.nodeSize:q.pos;return U.isAtom||(Q=u.docView.descAt(ue))&&!Q.contentDOM?oe.NodeSelection.isSelectable(U)?Dn(u,new oe.NodeSelection(v<0?u.state.doc.resolve(q.pos-U.nodeSize):q)):hr?Dn(u,new oe.TextSelection(u.state.doc.resolve(v<0?ue:ue+U.nodeSize))):!1:!1}}else return!1;else{if(m instanceof oe.NodeSelection&&m.node.isInline)return Dn(u,new oe.TextSelection(v>0?m.$to:m.$from));var ne=Nn(u.state,v);return ne?Dn(u,ne):!1}}function mi(u){return u.nodeType==3?u.nodeValue.length:u.childNodes.length}function ei(u,v){var c=u.pmViewDesc;return c&&c.size==0&&(v<0||u.nextSibling||u.nodeName!="BR")}function mn(u,v){return v<0?ga(u):Qo(u)}function ga(u){var v=u.domSelectionRange(),c=v.focusNode,m=v.focusOffset;if(c){var k,C,A=!1;for(Ee&&c.nodeType==1&&m<mi(c)&&ei(c.childNodes[m],-1)&&(A=!0);;)if(m>0){if(c.nodeType!=1)break;var O=c.childNodes[m-1];if(ei(O,-1))k=c,C=--m;else if(O.nodeType==3)c=O,m=c.nodeValue.length;else break}else{if(an(c))break;for(var q=c.previousSibling;q&&ei(q,-1);)k=c.parentNode,C=xe(q),q=q.previousSibling;if(q)c=q,m=mi(c);else{if(c=c.parentNode,c==u.dom)break;m=0}}A?Wi(u,c,m):k&&Wi(u,k,C)}}function Qo(u){var v=u.domSelectionRange(),c=v.focusNode,m=v.focusOffset;if(c){for(var k=mi(c),C,A;;)if(m<k){if(c.nodeType!=1)break;var O=c.childNodes[m];if(ei(O,1))C=c,A=++m;else break}else{if(an(c))break;for(var q=c.nextSibling;q&&ei(q,1);)C=q.parentNode,A=xe(q)+1,q=q.nextSibling;if(q)c=q,m=0,k=mi(c);else{if(c=c.parentNode,c==u.dom)break;m=k=0}}C&&Wi(u,C,A)}}function an(u){var v=u.pmViewDesc;return v&&v.node&&v.node.isBlock}function io(u,v){for(;u&&v==u.childNodes.length&&!dt(u);)v=xe(u)+1,u=u.parentNode;for(;u&&v<u.childNodes.length;){var c=u.childNodes[v];if(c.nodeType==3)return c;if(c.nodeType==1&&c.contentEditable=="false")break;u=c,v=0}}function ao(u,v){for(;u&&!v&&!dt(u);)v=xe(u),u=u.parentNode;for(;u&&v;){var c=u.childNodes[v-1];if(c.nodeType==3)return c;if(c.nodeType==1&&c.contentEditable=="false")break;u=c,v=u.childNodes.length}}function Wi(u,v,c){if(v.nodeType!=3){var m,k;(k=io(v,c))?(v=k,c=0):(m=ao(v,c))&&(v=m,c=m.nodeValue.length)}var C=u.domSelection();if(C){if(st(C)){var A=document.createRange();A.setEnd(v,c),A.setStart(v,c),C.removeAllRanges(),C.addRange(A)}else C.extend&&C.extend(v,c);u.domObserver.setCurSelection();var O=u.state;setTimeout(function(){u.state==O&&nn(u)},50)}}function oo(u,v){var c=u.state.doc.resolve(v);if(!(Xe||jt)&&c.parent.inlineContent){var m=u.coordsAtPos(v);if(v>c.start()){var k=u.coordsAtPos(v-1),C=(k.top+k.bottom)/2;if(C>m.top&&C<m.bottom&&Math.abs(k.left-m.left)>1)return k.left<m.left?"ltr":"rtl"}if(v<c.end()){var A=u.coordsAtPos(v+1),O=(A.top+A.bottom)/2;if(O>m.top&&O<m.bottom&&Math.abs(A.left-m.left)>1)return A.left>m.left?"ltr":"rtl"}}var q=getComputedStyle(u.dom).direction;return q=="rtl"?"rtl":"ltr"}function ti(u,v,c){var m=u.state.selection;if(m instanceof oe.TextSelection&&!m.empty||c.indexOf("s")>-1||At&&c.indexOf("m")>-1)return!1;var k=m.$from,C=m.$to;if(!k.parent.inlineContent||u.endOfTextblock(v<0?"up":"down")){var A=Nn(u.state,v);if(A&&A instanceof oe.NodeSelection)return Dn(u,A)}if(!k.parent.inlineContent){var O=v<0?k:C,q=m instanceof oe.AllSelection?oe.Selection.near(O,v):oe.Selection.findFrom(O,v);return q?Dn(u,q):!1}return!1}function on(u,v){if(!(u.state.selection instanceof oe.TextSelection))return!0;var c=u.state.selection,m=c.$head,k=c.$anchor,C=c.empty;if(!m.sameParent(k))return!0;if(!C)return!1;if(u.endOfTextblock(v>0?"forward":"backward"))return!0;var A=!m.textOffset&&(v<0?m.nodeBefore:m.nodeAfter);if(A&&!A.isText){var O=u.state.tr;return v<0?O.delete(m.pos-A.nodeSize,m.pos):O.delete(m.pos,m.pos+A.nodeSize),u.dispatch(O),!0}return!1}function ya(u,v,c){u.domObserver.stop(),v.contentEditable=c,u.domObserver.start()}function so(u){if(!lt||u.state.selection.$head.parentOffset>0)return!1;var v=u.domSelectionRange(),c=v.focusNode,m=v.focusOffset;if(c&&c.nodeType==1&&m==0&&c.firstChild&&c.firstChild.contentEditable=="false"){var k=c.firstChild;ya(u,k,"true"),setTimeout(function(){return ya(u,k,"false")},20)}return!1}function lo(u){var v="";return u.ctrlKey&&(v+="c"),u.metaKey&&(v+="m"),u.altKey&&(v+="a"),u.shiftKey&&(v+="s"),v}function es(u,v){var c=v.keyCode,m=lo(v);if(c==8||At&&c==72&&m=="c")return on(u,-1)||mn(u,-1);if(c==46&&!v.shiftKey||At&&c==68&&m=="c")return on(u,1)||mn(u,1);if(c==13||c==27)return!0;if(c==37||At&&c==66&&m=="c"){var k=c==37?oo(u,u.state.selection.from)=="ltr"?-1:1:-1;return $i(u,k,m)||mn(u,k)}else if(c==39||At&&c==70&&m=="c"){var C=c==39?oo(u,u.state.selection.from)=="ltr"?1:-1:1;return $i(u,C,m)||mn(u,C)}else{if(c==38||At&&c==80&&m=="c")return ti(u,-1,m)||mn(u,-1);if(c==40||At&&c==78&&m=="c")return so(u)||ti(u,1,m)||mn(u,1);if(m==(At?"m":"c")&&(c==66||c==73||c==89||c==90))return!0}return!1}function Qe(u,v){u.someProp("transformCopied",function(Le){v=Le(v,u)});for(var c=[],m=v,k=m.content,C=m.openStart,A=m.openEnd;C>1&&A>1&&k.childCount==1&&k.firstChild.childCount==1;){C--,A--;var O=k.firstChild;c.push(O.type.name,O.attrs!=O.type.defaultAttrs?O.attrs:null),k=O.content}var q=u.someProp("clipboardSerializer")||le.DOMSerializer.fromSchema(u.state.schema),U=uo(),Q=U.createElement("div");Q.appendChild(q.serializeFragment(k,{document:U}));for(var ue=Q.firstChild,ne,ye=0;ue&&ue.nodeType==1&&(ne=ri[ue.nodeName.toLowerCase()]);){for(var Me=ne.length-1;Me>=0;Me--){for(var Pe=U.createElement(ne[Me]);Q.firstChild;)Pe.appendChild(Q.firstChild);Q.appendChild(Pe),ye++}ue=Q.firstChild}ue&&ue.nodeType==1&&ue.setAttribute("data-pm-slice","".concat(C," ").concat(A).concat(ye?" -".concat(ye):""," ").concat(JSON.stringify(c)));var je=u.someProp("clipboardTextSerializer",function(Le){return Le(v,u)})||v.content.textBetween(0,v.content.size,`
|
|
680
|
-
|
|
681
|
-
`);return{dom:Q,text:je,slice:v}}function fe(u,v,c,m,k){var C=k.parent.type.spec.code,A,O;if(!c&&!v)return null;var q=!!v&&(m||C||!c);if(q){if(u.someProp("transformPastedText",function(Pt){v=Pt(v,C||m,u)}),C)return O=new le.Slice(le.Fragment.from(u.state.schema.text(v.replace(/\r\n?/g,`
|
|
682
|
-
`))),0,0),u.someProp("transformPasted",function(Pt){O=Pt(O,u,!0)}),O;var U=u.someProp("clipboardTextParser",function(Pt){return Pt(v,k,m,u)});if(U)O=U;else{var Q=k.marks(),ue=u.state.schema,ne=le.DOMSerializer.fromSchema(ue);A=document.createElement("div"),v.split(/(?:\r\n?|\n)+/).forEach(function(Pt){var qt=A.appendChild(document.createElement("p"));Pt&&qt.appendChild(ne.serializeNode(ue.text(Pt,Q)))})}}else u.someProp("transformPastedHTML",function(Pt){c=Pt(c,u)}),A=rc(c),hr&&nc(A);var ye=A&&A.querySelector("[data-pm-slice]"),Me=ye&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(ye.getAttribute("data-pm-slice")||"");if(Me&&Me[3])for(var Pe=+Me[3];Pe>0;Pe--){for(var je=A.firstChild;je&&je.nodeType!=1;)je=je.nextSibling;if(!je)break;A=je}if(!O){var Le=u.someProp("clipboardParser")||u.someProp("domParser")||le.DOMParser.fromSchema(u.state.schema);O=Le.parseSlice(A,{preserveWhitespace:!!(q||Me),context:k,ruleFromNode:function(qt){return qt.nodeName=="BR"&&!qt.nextSibling&&qt.parentNode&&!Re.test(qt.parentNode.nodeName)?{ignore:!0}:null}})}if(Me)O=ic(sn(O,+Me[1],+Me[2]),Me[4]);else if(O=le.Slice.maxOpen(Ke(O.content,k),!0),O.openStart||O.openEnd){for(var gt=0,vt=0,it=O.content.firstChild;gt<O.openStart&&!it.type.spec.isolating;gt++,it=it.firstChild);for(var ht=O.content.lastChild;vt<O.openEnd&&!ht.type.spec.isolating;vt++,ht=ht.lastChild);O=sn(O,gt,vt)}return u.someProp("transformPasted",function(Pt){O=Pt(O,u,q)}),O}var Re=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Ke(u,v){if(u.childCount<2)return u;for(var c=function(){var A=v.node(k),O=A.contentMatchAt(v.index(k)),q,U=[];if(u.forEach(function(Q){if(U){var ue=O.findWrapping(Q.type),ne;if(!ue)return U=null;if(ne=U.length&&q.length&&sr(ue,q,Q,U[U.length-1],0))U[U.length-1]=ne;else{U.length&&(U[U.length-1]=lr(U[U.length-1],q.length));var ye=Nt(Q,ue);U.push(ye),O=O.matchType(ye.type),q=ue}}}),U)return{v:le.Fragment.from(U)}},m,k=v.depth;k>=0;k--)if(m=c(),m)return m.v;return u}function Nt(u,v){for(var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,m=v.length-1;m>=c;m--)u=v[m].create(null,le.Fragment.from(u));return u}function sr(u,v,c,m,k){if(k<u.length&&k<v.length&&u[k]==v[k]){var C=sr(u,v,c,m.lastChild,k+1);if(C)return m.copy(m.content.replaceChild(m.childCount-1,C));var A=m.contentMatchAt(m.childCount);if(A.matchType(k==u.length-1?c.type:u[k+1]))return m.copy(m.content.append(le.Fragment.from(Nt(c,u,k+1))))}}function lr(u,v){if(v==0)return u;var c=u.content.replaceChild(u.childCount-1,lr(u.lastChild,v-1)),m=u.contentMatchAt(u.childCount).fillBefore(le.Fragment.empty,!0);return u.copy(c.append(m))}function er(u,v,c,m,k,C){var A=v<0?u.firstChild:u.lastChild,O=A.content;return u.childCount>1&&(C=0),k<m-1&&(O=er(O,v,c,m,k+1,C)),k>=c&&(O=v<0?A.contentMatchAt(0).fillBefore(O,C<=k).append(O):O.append(A.contentMatchAt(A.childCount).fillBefore(le.Fragment.empty,!0))),u.replaceChild(v<0?0:u.childCount-1,A.copy(O))}function sn(u,v,c){return v<u.openStart&&(u=new le.Slice(er(u.content,-1,v,u.openStart,0,u.openEnd),v,u.openEnd)),c<u.openEnd&&(u=new le.Slice(er(u.content,1,c,u.openEnd,0,0),u.openStart,c)),u}var ri={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},ba=null;function uo(){return ba||(ba=document.implementation.createHTMLDocument("title"))}var co=null;function tc(u){var v=window.trustedTypes;return v?(co||(co=v.defaultPolicy||v.createPolicy("ProseMirrorClipboard",{createHTML:function(m){return m}})),co.createHTML(u)):u}function rc(u){var v=/^(\s*<meta [^>]*>)*/.exec(u);v&&(u=u.slice(v[0].length));var c=uo().createElement("div"),m=/<([a-z][^>\s]+)/i.exec(u),k;if((k=m&&ri[m[1].toLowerCase()])&&(u=k.map(function(A){return"<"+A+">"}).join("")+u+k.map(function(A){return"</"+A+">"}).reverse().join("")),c.innerHTML=tc(u),k)for(var C=0;C<k.length;C++)c=c.querySelector(k[C])||c;return c}function nc(u){for(var v=u.querySelectorAll(Xe?"span:not([class]):not([style])":"span.Apple-converted-space"),c=0;c<v.length;c++){var m=v[c];m.childNodes.length==1&&m.textContent==" "&&m.parentNode&&m.parentNode.replaceChild(u.ownerDocument.createTextNode(" "),m)}}function ic(u,v){if(!u.size)return u;var c=u.content.firstChild.type.schema,m;try{m=JSON.parse(v)}catch{return u}for(var k=u.content,C=u.openStart,A=u.openEnd,O=m.length-2;O>=0;O-=2){var q=c.nodes[m[O]];if(!q||q.hasRequiredAttrs())break;k=le.Fragment.from(q.create(m[O+1],k)),C++,A++}return new le.Slice(k,C,A)}var Ar={},Or={},ac={touchstart:!0,touchmove:!0},oc=ee(function u(){z(this,u),this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null});function sc(u){var v=function(){var k=Ar[c];u.dom.addEventListener(c,u.input.eventHandlers[c]=function(C){uc(u,C)&&!rs(u,C)&&(u.editable||!(C.type in Or))&&k(u,C)},ac[c]?{passive:!0}:void 0)};for(var c in Ar)v();lt&&u.dom.addEventListener("input",function(){return null}),ts(u)}function ni(u,v){u.input.lastSelectionOrigin=v,u.input.lastSelectionTime=Date.now()}function lc(u){u.domObserver.stop();for(var v in u.input.eventHandlers)u.dom.removeEventListener(v,u.input.eventHandlers[v]);clearTimeout(u.input.composingTimeout),clearTimeout(u.input.lastIOSEnterFallbackTimeout)}function ts(u){u.someProp("handleDOMEvents",function(v){for(var c in v)u.input.eventHandlers[c]||u.dom.addEventListener(c,u.input.eventHandlers[c]=function(m){return rs(u,m)})})}function rs(u,v){return u.someProp("handleDOMEvents",function(c){var m=c[v.type];return m?m(u,v)||v.defaultPrevented:!1})}function uc(u,v){if(!v.bubbles)return!0;if(v.defaultPrevented)return!1;for(var c=v.target;c!=u.dom;c=c.parentNode)if(!c||c.nodeType==11||c.pmViewDesc&&c.pmViewDesc.stopEvent(v))return!1;return!0}function cc(u,v){!rs(u,v)&&Ar[v.type]&&(u.editable||!(v.type in Or))&&Ar[v.type](u,v)}Or.keydown=function(u,v){var c=v;if(u.input.shiftKey=c.keyCode==16||c.shiftKey,!Gs(u,c)&&(u.input.lastKeyCode=c.keyCode,u.input.lastKeyCodeTime=Date.now(),!(Ot&&Xe&&c.keyCode==13)))if(c.keyCode!=229&&u.domObserver.forceFlush(),Ht&&c.keyCode==13&&!c.ctrlKey&&!c.altKey&&!c.metaKey){var m=Date.now();u.input.lastIOSEnter=m,u.input.lastIOSEnterFallbackTimeout=setTimeout(function(){u.input.lastIOSEnter==m&&(u.someProp("handleKeyDown",function(k){return k(u,St(13,"Enter"))}),u.input.lastIOSEnter=0)},200)}else u.someProp("handleKeyDown",function(k){return k(u,c)})||es(u,c)?c.preventDefault():ni(u,"key")},Or.keyup=function(u,v){v.keyCode==16&&(u.input.shiftKey=!1)},Or.keypress=function(u,v){var c=v;if(!(Gs(u,c)||!c.charCode||c.ctrlKey&&!c.altKey||At&&c.metaKey)){if(u.someProp("handleKeyPress",function(A){return A(u,c)})){c.preventDefault();return}var m=u.state.selection;if(!(m instanceof oe.TextSelection)||!m.$from.sameParent(m.$to)){var k=String.fromCharCode(c.charCode),C=function(){return u.state.tr.insertText(k).scrollIntoView()};!/[\r\n]/.test(k)&&!u.someProp("handleTextInput",function(A){return A(u,m.$from.pos,m.$to.pos,k,C)})&&u.dispatch(C()),c.preventDefault()}}};function fo(u){return{left:u.clientX,top:u.clientY}}function fc(u,v){var c=v.x-u.clientX,m=v.y-u.clientY;return c*c+m*m<100}function ns(u,v,c,m,k){if(m==-1)return!1;for(var C=u.state.doc.resolve(m),A=function(Q){if(u.someProp(v,function(ue){return Q>C.depth?ue(u,c,C.nodeAfter,C.before(Q),k,!0):ue(u,c,C.node(Q),C.before(Q),k,!1)}))return{v:!0}},O,q=C.depth+1;q>0;q--)if(O=A(q),O)return O.v;return!1}function ji(u,v,c){if(u.focused||u.focus(),!u.state.selection.eq(v)){var m=u.state.tr.setSelection(v);m.setMeta("pointer",!0),u.dispatch(m)}}function dc(u,v){if(v==-1)return!1;var c=u.state.doc.resolve(v),m=c.nodeAfter;return m&&m.isAtom&&oe.NodeSelection.isSelectable(m)?(ji(u,new oe.NodeSelection(c)),!0):!1}function hc(u,v){if(v==-1)return!1;var c=u.state.selection,m,k;c instanceof oe.NodeSelection&&(m=c.node);for(var C=u.state.doc.resolve(v),A=C.depth+1;A>0;A--){var O=A>C.depth?C.nodeAfter:C.node(A);if(oe.NodeSelection.isSelectable(O)){m&&c.$from.depth>0&&A>=c.$from.depth&&C.before(c.$from.depth+1)==c.$from.pos?k=C.before(c.$from.depth):k=C.before(A);break}}return k!=null?(ji(u,oe.NodeSelection.create(u.state.doc,k)),!0):!1}function pc(u,v,c,m,k){return ns(u,"handleClickOn",v,c,m)||u.someProp("handleClick",function(C){return C(u,v,m)})||(k?hc(u,c):dc(u,c))}function vc(u,v,c,m){return ns(u,"handleDoubleClickOn",v,c,m)||u.someProp("handleDoubleClick",function(k){return k(u,v,m)})}function mc(u,v,c,m){return ns(u,"handleTripleClickOn",v,c,m)||u.someProp("handleTripleClick",function(k){return k(u,v,m)})||gc(u,c,m)}function gc(u,v,c){if(c.button!=0)return!1;var m=u.state.doc;if(v==-1)return m.inlineContent?(ji(u,oe.TextSelection.create(m,0,m.content.size)),!0):!1;for(var k=m.resolve(v),C=k.depth+1;C>0;C--){var A=C>k.depth?k.nodeAfter:k.node(C),O=k.before(C);if(A.inlineContent)ji(u,oe.TextSelection.create(m,O+1,O+1+A.content.size));else if(oe.NodeSelection.isSelectable(A))ji(u,oe.NodeSelection.create(m,O));else continue;return!0}}function is(u){return ka(u)}var js=At?"metaKey":"ctrlKey";Ar.mousedown=function(u,v){var c=v;u.input.shiftKey=c.shiftKey;var m=is(u),k=Date.now(),C="singleClick";k-u.input.lastClick.time<500&&fc(c,u.input.lastClick)&&!c[js]&&u.input.lastClick.button==c.button&&(u.input.lastClick.type=="singleClick"?C="doubleClick":u.input.lastClick.type=="doubleClick"&&(C="tripleClick")),u.input.lastClick={time:k,x:c.clientX,y:c.clientY,type:C,button:c.button};var A=u.posAtCoords(fo(c));A&&(C=="singleClick"?(u.input.mouseDown&&u.input.mouseDown.done(),u.input.mouseDown=new yc(u,A,c,!!m)):(C=="doubleClick"?vc:mc)(u,A.pos,A.inside,c)?c.preventDefault():ni(u,"pointer"))};var yc=(function(){function u(v,c,m,k){var C=this;z(this,u),this.view=v,this.pos=c,this.event=m,this.flushed=k,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=v.state.doc,this.selectNode=!!m[js],this.allowDefault=m.shiftKey;var A,O;if(c.inside>-1)A=v.state.doc.nodeAt(c.inside),O=c.inside;else{var q=v.state.doc.resolve(c.pos);A=q.parent,O=q.depth?q.before():0}var U=k?null:m.target,Q=U?v.docView.nearestDesc(U,!0):null;this.target=Q&&Q.nodeDOM.nodeType==1?Q.nodeDOM:null;var ue=v.state.selection;(m.button==0&&A.type.spec.draggable&&A.type.spec.selectable!==!1||ue instanceof oe.NodeSelection&&ue.from<=O&&ue.to>O)&&(this.mightDrag={node:A,pos:O,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ee&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(function(){C.view.input.mouseDown==C&&C.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),v.root.addEventListener("mouseup",this.up=this.up.bind(this)),v.root.addEventListener("mousemove",this.move=this.move.bind(this)),ni(v,"pointer")}return ee(u,[{key:"done",value:function(){var c=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(function(){return nn(c.view)}),this.view.input.mouseDown=null}},{key:"up",value:function(c){if(this.done(),!!this.view.dom.contains(c.target)){var m=this.pos;this.view.state.doc!=this.startDoc&&(m=this.view.posAtCoords(fo(c))),this.updateAllowDefault(c),this.allowDefault||!m?ni(this.view,"pointer"):pc(this.view,m.pos,m.inside,c,this.selectNode)?c.preventDefault():c.button==0&&(this.flushed||lt&&this.mightDrag&&!this.mightDrag.node.isAtom||Xe&&!this.view.state.selection.visible&&Math.min(Math.abs(m.pos-this.view.state.selection.from),Math.abs(m.pos-this.view.state.selection.to))<=2)?(ji(this.view,oe.Selection.near(this.view.state.doc.resolve(m.pos))),c.preventDefault()):ni(this.view,"pointer")}}},{key:"move",value:function(c){this.updateAllowDefault(c),ni(this.view,"pointer"),c.buttons==0&&this.done()}},{key:"updateAllowDefault",value:function(c){!this.allowDefault&&(Math.abs(this.event.x-c.clientX)>4||Math.abs(this.event.y-c.clientY)>4)&&(this.allowDefault=!0)}}]),u})();Ar.touchstart=function(u){u.input.lastTouch=Date.now(),is(u),ni(u,"pointer")},Ar.touchmove=function(u){u.input.lastTouch=Date.now(),ni(u,"pointer")},Ar.contextmenu=function(u){return is(u)};function Gs(u,v){return u.composing?!0:lt&&Math.abs(v.timeStamp-u.input.compositionEndedAt)<500?(u.input.compositionEndedAt=-2e8,!0):!1}var bc=Ot?5e3:-1;Or.compositionstart=Or.compositionupdate=function(u){if(!u.composing){u.domObserver.flush();var v=u.state,c=v.selection.$to;if(v.selection instanceof oe.TextSelection&&(v.storedMarks||!c.textOffset&&c.parentOffset&&c.nodeBefore.marks.some(function(q){return q.type.spec.inclusive===!1})||Xe&&jt&&kc(u)))u.markCursor=u.state.storedMarks||c.marks(),ka(u,!0),u.markCursor=null;else if(ka(u,!v.selection.empty),Ee&&v.selection.empty&&c.parentOffset&&!c.textOffset&&c.nodeBefore.marks.length)for(var m=u.domSelectionRange(),k=m.focusNode,C=m.focusOffset;k&&k.nodeType==1&&C!=0;){var A=C<0?k.lastChild:k.childNodes[C-1];if(!A)break;if(A.nodeType==3){var O=u.domSelection();O&&O.collapse(A,A.nodeValue.length);break}else k=A,C=-1}u.input.composing=!0}Ks(u,bc)};function kc(u){var v=u.domSelectionRange(),c=v.focusNode,m=v.focusOffset;if(!c||c.nodeType!=1||m>=c.childNodes.length)return!1;var k=c.childNodes[m];return k.nodeType==1&&k.contentEditable=="false"}Or.compositionend=function(u,v){u.composing&&(u.input.composing=!1,u.input.compositionEndedAt=v.timeStamp,u.input.compositionPendingChanges=u.domObserver.pendingRecords().length?u.input.compositionID:0,u.input.compositionNode=null,u.input.badSafariComposition?u.domObserver.forceFlush():u.input.compositionPendingChanges&&Promise.resolve().then(function(){return u.domObserver.flush()}),u.input.compositionID++,Ks(u,20))};function Ks(u,v){clearTimeout(u.input.composingTimeout),v>-1&&(u.input.composingTimeout=setTimeout(function(){return ka(u)},v))}function Js(u){for(u.composing&&(u.input.composing=!1,u.input.compositionEndedAt=Cc());u.input.compositionNodes.length>0;)u.input.compositionNodes.pop().markParentsDirty()}function wc(u){var v=u.domSelectionRange();if(!v.focusNode)return null;var c=It(v.focusNode,v.focusOffset),m=Ut(v.focusNode,v.focusOffset);if(c&&m&&c!=m){var k=m.pmViewDesc,C=u.domObserver.lastChangedTextNode;if(c==C||m==C)return C;if(!k||!k.isText(m.nodeValue))return m;if(u.input.compositionNode==m){var A=c.pmViewDesc;if(!(!A||!A.isText(c.nodeValue)))return m}}return c||m}function Cc(){var u=document.createEvent("Event");return u.initEvent("event",!0,!0),u.timeStamp}function ka(u){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!(Ot&&u.domObserver.flushingSoon>=0)){if(u.domObserver.forceFlush(),Js(u),v||u.docView&&u.docView.dirty){var c=Mn(u),m=u.state.selection;return c&&!c.eq(m)?u.dispatch(u.state.tr.setSelection(c)):(u.markCursor||v)&&!m.$from.node(m.$from.sharedDepth(m.to)).inlineContent?u.dispatch(u.state.tr.deleteSelection()):u.updateState(u.state),!0}return!1}}function Tc(u,v){if(u.dom.parentNode){var c=u.dom.parentNode.appendChild(document.createElement("div"));c.appendChild(v),c.style.cssText="position: fixed; left: -10000px; top: 10px";var m=getSelection(),k=document.createRange();k.selectNodeContents(v),u.dom.blur(),m.removeAllRanges(),m.addRange(k),setTimeout(function(){c.parentNode&&c.parentNode.removeChild(c),u.focus()},50)}}var wa=Z&&ke<15||Ht&&Sn<604;Ar.copy=Or.cut=function(u,v){var c=v,m=u.state.selection,k=c.type=="cut";if(!m.empty){var C=wa?null:c.clipboardData,A=m.content(),O=Qe(u,A),q=O.dom,U=O.text;C?(c.preventDefault(),C.clearData(),C.setData("text/html",q.innerHTML),C.setData("text/plain",U)):Tc(u,q),k&&u.dispatch(u.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}};function Sc(u){return u.openStart==0&&u.openEnd==0&&u.content.childCount==1?u.content.firstChild:null}function xc(u,v){if(u.dom.parentNode){var c=u.input.shiftKey||u.state.selection.$from.parent.type.spec.code,m=u.dom.parentNode.appendChild(document.createElement(c?"textarea":"div"));c||(m.contentEditable="true"),m.style.cssText="position: fixed; left: -10000px; top: 10px",m.focus();var k=u.input.shiftKey&&u.input.lastKeyCode!=45;setTimeout(function(){u.focus(),m.parentNode&&m.parentNode.removeChild(m),c?Ca(u,m.value,null,k,v):Ca(u,m.textContent,m.innerHTML,k,v)},50)}}function Ca(u,v,c,m,k){var C=fe(u,v,c,m,u.state.selection.$from);if(u.someProp("handlePaste",function(q){return q(u,k,C||le.Slice.empty)}))return!0;if(!C)return!1;var A=Sc(C),O=A?u.state.tr.replaceSelectionWith(A,m):u.state.tr.replaceSelection(C);return u.dispatch(O.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Ys(u){var v=u.getData("text/plain")||u.getData("Text");if(v)return v;var c=u.getData("text/uri-list");return c?c.replace(/\r?\n/g," "):""}Or.paste=function(u,v){var c=v;if(!(u.composing&&!Ot)){var m=wa?null:c.clipboardData,k=u.input.shiftKey&&u.input.lastKeyCode!=45;m&&Ca(u,Ys(m),m.getData("text/html"),k,c)?c.preventDefault():xc(u,c)}};var Xs=ee(function u(v,c,m){z(this,u),this.slice=v,this.move=c,this.node=m}),Ec=At?"altKey":"ctrlKey";function Zs(u,v){var c=u.someProp("dragCopies",function(m){return!m(v)});return c??!v[Ec]}Ar.dragstart=function(u,v){var c=v,m=u.input.mouseDown;if(m&&m.done(),!!c.dataTransfer){var k=u.state.selection,C=k.empty?null:u.posAtCoords(fo(c)),A;if(!(C&&C.pos>=k.from&&C.pos<=(k instanceof oe.NodeSelection?k.to-1:k.to))){if(m&&m.mightDrag)A=oe.NodeSelection.create(u.state.doc,m.mightDrag.pos);else if(c.target&&c.target.nodeType==1){var O=u.docView.nearestDesc(c.target,!0);O&&O.node.type.spec.draggable&&O!=u.docView&&(A=oe.NodeSelection.create(u.state.doc,O.posBefore))}}var q=(A||u.state.selection).content(),U=Qe(u,q),Q=U.dom,ue=U.text,ne=U.slice;(!c.dataTransfer.files.length||!Xe||kt>120)&&c.dataTransfer.clearData(),c.dataTransfer.setData(wa?"Text":"text/html",Q.innerHTML),c.dataTransfer.effectAllowed="copyMove",wa||c.dataTransfer.setData("text/plain",ue),u.dragging=new Xs(ne,Zs(u,c),A)}},Ar.dragend=function(u){var v=u.dragging;window.setTimeout(function(){u.dragging==v&&(u.dragging=null)},50)},Or.dragover=Or.dragenter=function(u,v){return v.preventDefault()},Or.drop=function(u,v){try{Mc(u,v,u.dragging)}finally{u.dragging=null}};function Mc(u,v,c){if(v.dataTransfer){var m=u.posAtCoords(fo(v));if(m){var k=u.state.doc.resolve(m.pos),C=c&&c.slice;C?u.someProp("transformPasted",function(Pe){C=Pe(C,u,!1)}):C=fe(u,Ys(v.dataTransfer),wa?null:v.dataTransfer.getData("text/html"),!1,k);var A=!!(c&&Zs(u,v));if(u.someProp("handleDrop",function(Pe){return Pe(u,v,C||le.Slice.empty,A)})){v.preventDefault();return}if(C){v.preventDefault();var O=C?ge.dropPoint(u.state.doc,k.pos,C):k.pos;O==null&&(O=k.pos);var q=u.state.tr;if(A){var U=c.node;U?U.replace(q):q.deleteSelection()}var Q=q.mapping.map(O),ue=C.openStart==0&&C.openEnd==0&&C.content.childCount==1,ne=q.doc;if(ue?q.replaceRangeWith(Q,Q,C.content.firstChild):q.replaceRange(Q,Q,C),!q.doc.eq(ne)){var ye=q.doc.resolve(Q);if(ue&&oe.NodeSelection.isSelectable(C.content.firstChild)&&ye.nodeAfter&&ye.nodeAfter.sameMarkup(C.content.firstChild))q.setSelection(new oe.NodeSelection(ye));else{var Me=q.mapping.map(O);q.mapping.maps[q.mapping.maps.length-1].forEach(function(Pe,je,Le,gt){return Me=gt}),q.setSelection(On(u,ye,q.doc.resolve(Me)))}u.focus(),u.dispatch(q.setMeta("uiEvent","drop"))}}}}}Ar.focus=function(u){u.input.lastFocus=Date.now(),u.focused||(u.domObserver.stop(),u.dom.classList.add("ProseMirror-focused"),u.domObserver.start(),u.focused=!0,setTimeout(function(){u.docView&&u.hasFocus()&&!u.domObserver.currentSelection.eq(u.domSelectionRange())&&nn(u)},20))},Ar.blur=function(u,v){var c=v;u.focused&&(u.domObserver.stop(),u.dom.classList.remove("ProseMirror-focused"),u.domObserver.start(),c.relatedTarget&&u.dom.contains(c.relatedTarget)&&u.domObserver.currentSelection.clear(),u.focused=!1)},Ar.beforeinput=function(u,v){var c=v;if(Xe&&Ot&&c.inputType=="deleteContentBackward"){u.domObserver.flushSoon();var m=u.input.domChangeCount;setTimeout(function(){if(u.input.domChangeCount==m&&(u.dom.blur(),u.focus(),!u.someProp("handleKeyDown",function(C){return C(u,St(8,"Backspace"))}))){var k=u.state.selection.$cursor;k&&k.pos>0&&u.dispatch(u.state.tr.delete(k.pos-1,k.pos).scrollIntoView())}},50)}};for(var Qs in Or)Ar[Qs]=Or[Qs];function Ta(u,v){if(u==v)return!0;for(var c in u)if(u[c]!==v[c])return!1;for(var m in v)if(!(m in u))return!1;return!0}var el=(function(){function u(v,c){z(this,u),this.toDOM=v,this.spec=c||yi,this.side=this.spec.side||0}return ee(u,[{key:"map",value:function(c,m,k,C){var A=c.mapResult(m.from+C,this.side<0?-1:1),O=A.pos,q=A.deleted;return q?null:new gi(O-k,O-k,this)}},{key:"valid",value:function(){return!0}},{key:"eq",value:function(c){return this==c||c instanceof u&&(this.spec.key&&this.spec.key==c.spec.key||this.toDOM==c.toDOM&&Ta(this.spec,c.spec))}},{key:"destroy",value:function(c){this.spec.destroy&&this.spec.destroy(c)}}]),u})(),Sa=(function(){function u(v,c){z(this,u),this.attrs=v,this.spec=c||yi}return ee(u,[{key:"map",value:function(c,m,k,C){var A=c.map(m.from+C,this.spec.inclusiveStart?-1:1)-k,O=c.map(m.to+C,this.spec.inclusiveEnd?1:-1)-k;return A>=O?null:new gi(A,O,this)}},{key:"valid",value:function(c,m){return m.from<m.to}},{key:"eq",value:function(c){return this==c||c instanceof u&&Ta(this.attrs,c.attrs)&&Ta(this.spec,c.spec)}},{key:"destroy",value:function(){}}],[{key:"is",value:function(c){return c.type instanceof u}}]),u})(),Ac=(function(){function u(v,c){z(this,u),this.attrs=v,this.spec=c||yi}return ee(u,[{key:"map",value:function(c,m,k,C){var A=c.mapResult(m.from+C,1);if(A.deleted)return null;var O=c.mapResult(m.to+C,-1);return O.deleted||O.pos<=A.pos?null:new gi(A.pos-k,O.pos-k,this)}},{key:"valid",value:function(c,m){var k=c.content.findIndex(m.from),C=k.index,A=k.offset,O;return A==m.from&&!(O=c.child(C)).isText&&A+O.nodeSize==m.to}},{key:"eq",value:function(c){return this==c||c instanceof u&&Ta(this.attrs,c.attrs)&&Ta(this.spec,c.spec)}},{key:"destroy",value:function(){}}]),u})(),gi=(function(){function u(v,c,m){z(this,u),this.from=v,this.to=c,this.type=m}return ee(u,[{key:"copy",value:function(c,m){return new u(c,m,this.type)}},{key:"eq",value:function(c){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this.type.eq(c.type)&&this.from+m==c.from&&this.to+m==c.to}},{key:"map",value:function(c,m,k){return this.type.map(c,this,m,k)}},{key:"spec",get:function(){return this.type.spec}},{key:"inline",get:function(){return this.type instanceof Sa}},{key:"widget",get:function(){return this.type instanceof el}}],[{key:"widget",value:function(c,m,k){return new u(c,c,new el(m,k))}},{key:"inline",value:function(c,m,k,C){return new u(c,m,new Sa(k,C))}},{key:"node",value:function(c,m,k,C){return new u(c,m,new Ac(k,C))}}]),u})(),Gi=[],yi={},gn=(function(){function u(v,c){z(this,u),this.local=v.length?v:Gi,this.children=c.length?c:Gi}return ee(u,[{key:"find",value:function(c,m,k){var C=[];return this.findInner(c??0,m??1e9,C,0,k),C}},{key:"findInner",value:function(c,m,k,C,A){for(var O=0;O<this.local.length;O++){var q=this.local[O];q.from<=m&&q.to>=c&&(!A||A(q.spec))&&k.push(q.copy(q.from+C,q.to+C))}for(var U=0;U<this.children.length;U+=3)if(this.children[U]<m&&this.children[U+1]>c){var Q=this.children[U]+1;this.children[U+2].findInner(c-Q,m-Q,k,C+Q,A)}}},{key:"map",value:function(c,m,k){return this==Cr||c.maps.length==0?this:this.mapInner(c,m,0,0,k||yi)}},{key:"mapInner",value:function(c,m,k,C,A){for(var O,q=0;q<this.local.length;q++){var U=this.local[q].map(c,k,C);U&&U.type.valid(m,U)?(O||(O=[])).push(U):A.onRemove&&A.onRemove(this.local[q].spec)}return this.children.length?Oc(this.children,O||[],c,m,k,C,A):O?new u(O.sort(bi),Gi):Cr}},{key:"add",value:function(c,m){return m.length?this==Cr?u.create(c,m):this.addInner(c,m,0):this}},{key:"addInner",value:function(c,m,k){var C=this,A,O=0;c.forEach(function(Q,ue){var ne=ue+k,ye;if(ye=nl(m,Q,ne)){for(A||(A=C.children.slice());O<A.length&&A[O]<ue;)O+=3;A[O]==ue?A[O+2]=A[O+2].addInner(Q,ye,ne+1):A.splice(O,0,ue,ue+Q.nodeSize,ho(ye,Q,ne+1,yi)),O+=3}});for(var q=rl(O?il(m):m,-k),U=0;U<q.length;U++)q[U].type.valid(c,q[U])||q.splice(U--,1);return new u(q.length?this.local.concat(q).sort(bi):this.local,A||this.children)}},{key:"remove",value:function(c){return c.length==0||this==Cr?this:this.removeInner(c,0)}},{key:"removeInner",value:function(c,m){for(var k=this.children,C=this.local,A=0;A<k.length;A+=3){for(var O=void 0,q=k[A]+m,U=k[A+1]+m,Q=0,ue;Q<c.length;Q++)(ue=c[Q])&&ue.from>q&&ue.to<U&&(c[Q]=null,(O||(O=[])).push(ue));if(O){k==this.children&&(k=this.children.slice());var ne=k[A+2].removeInner(O,q+1);ne!=Cr?k[A+2]=ne:(k.splice(A,3),A-=3)}}if(C.length){for(var ye=0,Me;ye<c.length;ye++)if(Me=c[ye])for(var Pe=0;Pe<C.length;Pe++)C[Pe].eq(Me,m)&&(C==this.local&&(C=this.local.slice()),C.splice(Pe--,1))}return k==this.children&&C==this.local?this:C.length||k.length?new u(C,k):Cr}},{key:"forChild",value:function(c,m){if(this==Cr)return this;if(m.isLeaf)return u.empty;for(var k,C,A=0;A<this.children.length;A+=3)if(this.children[A]>=c){this.children[A]==c&&(k=this.children[A+2]);break}for(var O=c+1,q=O+m.content.size,U=0;U<this.local.length;U++){var Q=this.local[U];if(Q.from<q&&Q.to>O&&Q.type instanceof Sa){var ue=Math.max(O,Q.from)-O,ne=Math.min(q,Q.to)-O;ue<ne&&(C||(C=[])).push(Q.copy(ue,ne))}}if(C){var ye=new u(C.sort(bi),Gi);return k?new tl([ye,k]):ye}return k||Cr}},{key:"eq",value:function(c){if(this==c)return!0;if(!(c instanceof u)||this.local.length!=c.local.length||this.children.length!=c.children.length)return!1;for(var m=0;m<this.local.length;m++)if(!this.local[m].eq(c.local[m]))return!1;for(var k=0;k<this.children.length;k+=3)if(this.children[k]!=c.children[k]||this.children[k+1]!=c.children[k+1]||!this.children[k+2].eq(c.children[k+2]))return!1;return!0}},{key:"locals",value:function(c){return as(this.localsInner(c))}},{key:"localsInner",value:function(c){if(this==Cr)return Gi;if(c.inlineContent||!this.local.some(Sa.is))return this.local;for(var m=[],k=0;k<this.local.length;k++)this.local[k].type instanceof Sa||m.push(this.local[k]);return m}},{key:"forEachSet",value:function(c){c(this)}}],[{key:"create",value:function(c,m){return m.length?ho(m,c,0,yi):Cr}}]),u})();gn.empty=new gn([],[]),gn.removeOverlap=as;var Cr=gn.empty,tl=(function(){function u(v){z(this,u),this.members=v}return ee(u,[{key:"map",value:function(c,m){var k=this.members.map(function(C){return C.map(c,m,yi)});return u.from(k)}},{key:"forChild",value:function(c,m){if(m.isLeaf)return gn.empty;for(var k=[],C=0;C<this.members.length;C++){var A=this.members[C].forChild(c,m);A!=Cr&&(A instanceof u?k=k.concat(A.members):k.push(A))}return u.from(k)}},{key:"eq",value:function(c){if(!(c instanceof u)||c.members.length!=this.members.length)return!1;for(var m=0;m<this.members.length;m++)if(!this.members[m].eq(c.members[m]))return!1;return!0}},{key:"locals",value:function(c){for(var m,k=!0,C=0;C<this.members.length;C++){var A=this.members[C].localsInner(c);if(A.length)if(!m)m=A;else{k&&(m=m.slice(),k=!1);for(var O=0;O<A.length;O++)m.push(A[O])}}return m?as(k?m:m.sort(bi)):Gi}},{key:"forEachSet",value:function(c){for(var m=0;m<this.members.length;m++)this.members[m].forEachSet(c)}}],[{key:"from",value:function(c){switch(c.length){case 0:return Cr;case 1:return c[0];default:return new u(c.every(function(m){return m instanceof gn})?c:c.reduce(function(m,k){return m.concat(k instanceof gn?k:k.members)},[]))}}}]),u})();function Oc(u,v,c,m,k,C,A){for(var O=u.slice(),q=function(Vn){var ki=0;c.maps[U].forEach(function(wi,xa,Jt,us){for(var Rn=us-Jt-(xa-wi),Nr=0;Nr<O.length;Nr+=3){var gl=O[Nr+1];if(!(gl<0||wi>gl+Vn-ki)){var yl=O[Nr]+Vn-ki;xa>=yl?O[Nr+1]=wi<=yl?-2:-1:wi>=Vn&&Rn&&(O[Nr]+=Rn,O[Nr+1]+=Rn)}}ki+=Rn}),Vn=c.maps[U].map(Vn,-1),Q=Vn},U=0,Q=C;U<c.maps.length;U++)q(Q);for(var ue=!1,ne=0;ne<O.length;ne+=3)if(O[ne+1]<0){if(O[ne+1]==-2){ue=!0,O[ne+1]=-1;continue}var ye=c.map(u[ne]+C),Me=ye-k;if(Me<0||Me>=m.content.size){ue=!0;continue}var Pe=c.map(u[ne+1]+C,-1),je=Pe-k,Le=m.content.findIndex(Me),gt=Le.index,vt=Le.offset,it=m.maybeChild(gt);if(it&&vt==Me&&vt+it.nodeSize==je){var ht=O[ne+2].mapInner(c,it,ye+1,u[ne]+C+1,A);ht!=Cr?(O[ne]=Me,O[ne+1]=je,O[ne+2]=ht):(O[ne+1]=-2,ue=!0)}else ue=!0}if(ue){var Pt=Nc(O,u,v,c,k,C,A),qt=ho(Pt,m,0,A);v=qt.local;for(var Kt=0;Kt<O.length;Kt+=3)O[Kt+1]<0&&(O.splice(Kt,3),Kt-=3);for(var tr=0,rr=0;tr<qt.children.length;tr+=3){for(var Ln=qt.children[tr];rr<O.length&&O[rr]<Ln;)rr+=3;O.splice(rr,0,qt.children[tr],qt.children[tr+1],qt.children[tr+2])}}return new gn(v.sort(bi),O)}function rl(u,v){if(!v||!u.length)return u;for(var c=[],m=0;m<u.length;m++){var k=u[m];c.push(new gi(k.from+v,k.to+v,k.type))}return c}function Nc(u,v,c,m,k,C,A){function O(U,Q){for(var ue=0;ue<U.local.length;ue++){var ne=U.local[ue].map(m,k,Q);ne?c.push(ne):A.onRemove&&A.onRemove(U.local[ue].spec)}for(var ye=0;ye<U.children.length;ye+=3)O(U.children[ye+2],U.children[ye]+Q+1)}for(var q=0;q<u.length;q+=3)u[q+1]==-1&&O(u[q+2],v[q]+C+1);return c}function nl(u,v,c){if(v.isLeaf)return null;for(var m=c+v.nodeSize,k=null,C=0,A;C<u.length;C++)(A=u[C])&&A.from>c&&A.to<m&&((k||(k=[])).push(A),u[C]=null);return k}function il(u){for(var v=[],c=0;c<u.length;c++)u[c]!=null&&v.push(u[c]);return v}function ho(u,v,c,m){var k=[],C=!1;v.forEach(function(q,U){var Q=nl(u,q,U+c);if(Q){C=!0;var ue=ho(Q,q,c+U+1,m);ue!=Cr&&k.push(U,U+q.nodeSize,ue)}});for(var A=rl(C?il(u):u,-c).sort(bi),O=0;O<A.length;O++)A[O].type.valid(v,A[O])||(m.onRemove&&m.onRemove(A[O].spec),A.splice(O--,1));return A.length||k.length?new gn(A,k):Cr}function bi(u,v){return u.from-v.from||u.to-v.to}function as(u){for(var v=u,c=0;c<v.length-1;c++){var m=v[c];if(m.from!=m.to)for(var k=c+1;k<v.length;k++){var C=v[k];if(C.from==m.from){C.to!=m.to&&(v==u&&(v=u.slice()),v[k]=C.copy(C.from,m.to),al(v,k+1,C.copy(m.to,C.to)));continue}else{C.from<m.to&&(v==u&&(v=u.slice()),v[c]=m.copy(m.from,C.from),al(v,k,m.copy(C.from,m.to)));break}}}return v}function al(u,v,c){for(;v<u.length&&bi(c,u[v])>0;)v++;u.splice(v,0,c)}function ss(u){var v=[];return u.someProp("decorations",function(c){var m=c(u.state);m&&m!=Cr&&v.push(m)}),u.cursorWrapper&&v.push(gn.create(u.state.doc,[u.cursorWrapper.deco])),tl.from(v)}var Dc={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Lc=Z&&ke<=11,Rc=(function(){function u(){z(this,u),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return ee(u,[{key:"set",value:function(c){this.anchorNode=c.anchorNode,this.anchorOffset=c.anchorOffset,this.focusNode=c.focusNode,this.focusOffset=c.focusOffset}},{key:"clear",value:function(){this.anchorNode=this.focusNode=null}},{key:"eq",value:function(c){return c.anchorNode==this.anchorNode&&c.anchorOffset==this.anchorOffset&&c.focusNode==this.focusNode&&c.focusOffset==this.focusOffset}}]),u})(),Ic=(function(){function u(v,c){var m=this;z(this,u),this.view=v,this.handleDOMChange=c,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Rc,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(function(k){for(var C=0;C<k.length;C++)m.queue.push(k[C]);Z&&ke<=11&&k.some(function(A){return A.type=="childList"&&A.removedNodes.length||A.type=="characterData"&&A.oldValue.length>A.target.nodeValue.length})?m.flushSoon():lt&&v.composing&&k.some(function(A){return A.type=="childList"&&A.target.nodeName=="TR"})?(v.input.badSafariComposition=!0,m.flushSoon()):m.flush()}),Lc&&(this.onCharData=function(k){m.queue.push({target:k.target,type:"characterData",oldValue:k.prevValue}),m.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}return ee(u,[{key:"flushSoon",value:function(){var c=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(function(){c.flushingSoon=-1,c.flush()},20))}},{key:"forceFlush",value:function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}},{key:"start",value:function(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Dc)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}},{key:"stop",value:function(){var c=this;if(this.observer){var m=this.observer.takeRecords();if(m.length){for(var k=0;k<m.length;k++)this.queue.push(m[k]);window.setTimeout(function(){return c.flush()},20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}},{key:"connectSelection",value:function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}},{key:"disconnectSelection",value:function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"suppressSelectionUpdates",value:function(){var c=this;this.suppressingSelectionUpdates=!0,setTimeout(function(){return c.suppressingSelectionUpdates=!1},50)}},{key:"onSelectionChange",value:function(){if(ro(this.view)){if(this.suppressingSelectionUpdates)return nn(this.view);if(Z&&ke<=11&&!this.view.state.selection.empty){var c=this.view.domSelectionRange();if(c.focusNode&&ct(c.focusNode,c.focusOffset,c.anchorNode,c.anchorOffset))return this.flushSoon()}this.flush()}}},{key:"setCurSelection",value:function(){this.currentSelection.set(this.view.domSelectionRange())}},{key:"ignoreSelectionChange",value:function(c){if(!c.focusNode)return!0;for(var m=new Set,k,C=c.focusNode;C;C=Ie(C))m.add(C);for(var A=c.anchorNode;A;A=Ie(A))if(m.has(A)){k=A;break}var O=k&&this.view.docView.nearestDesc(k);if(O&&O.ignoreMutation({type:"selection",target:k.nodeType==3?k.parentNode:k}))return this.setCurSelection(),!0}},{key:"pendingRecords",value:function(){if(this.observer){var c=i(this.observer.takeRecords()),m;try{for(c.s();!(m=c.n()).done;){var k=m.value;this.queue.push(k)}}catch(C){c.e(C)}finally{c.f()}}return this.queue}},{key:"flush",value:function(){var c=this.view;if(!(!c.docView||this.flushingSoon>-1)){var m=this.pendingRecords();m.length&&(this.queue=[]);var k=c.domSelectionRange(),C=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(k)&&ro(c)&&!this.ignoreSelectionChange(k),A=-1,O=-1,q=!1,U=[];if(c.editable)for(var Q=0;Q<m.length;Q++){var ue=this.registerMutation(m[Q],U);ue&&(A=A<0?ue.from:Math.min(ue.from,A),O=O<0?ue.to:Math.max(ue.to,O),ue.typeOver&&(q=!0))}if(U.some(function(rr){return rr.nodeName=="BR"})&&(c.input.lastKeyCode==8||c.input.lastKeyCode==46)){var ne=i(U),ye;try{for(ne.s();!(ye=ne.n()).done;){var Me=ye.value;if(Me.nodeName=="BR"&&Me.parentNode){var Pe=Me.nextSibling;Pe&&Pe.nodeType==1&&Pe.contentEditable=="false"&&Me.parentNode.removeChild(Me)}}}catch(rr){ne.e(rr)}finally{ne.f()}}else if(Ee&&U.length){var je=U.filter(function(rr){return rr.nodeName=="BR"});if(je.length==2){var Le=r(je,2),gt=Le[0],vt=Le[1];gt.parentNode&>.parentNode.parentNode==vt.parentNode?vt.remove():gt.remove()}else{var it=this.currentSelection.focusNode,ht=i(je),Pt;try{for(ht.s();!(Pt=ht.n()).done;){var qt=Pt.value,Kt=qt.parentNode;Kt&&Kt.nodeName=="LI"&&(!it||Fc(c,it)!=Kt)&&qt.remove()}}catch(rr){ht.e(rr)}finally{ht.f()}}}var tr=null;A<0&&C&&c.input.lastFocus>Date.now()-200&&Math.max(c.input.lastTouch,c.input.lastClick.time)<Date.now()-300&&st(k)&&(tr=Mn(c))&&tr.eq(oe.Selection.near(c.state.doc.resolve(0),1))?(c.input.lastFocus=0,nn(c),this.currentSelection.set(k),c.scrollToSelection()):(A>-1||C)&&(A>-1&&(c.docView.markDirty(A,O),Pc(c)),c.input.badSafariComposition&&(c.input.badSafariComposition=!1,qc(c,U)),this.handleDOMChange(A,O,q,U),c.docView&&c.docView.dirty?c.updateState(c.state):this.currentSelection.eq(k)||nn(c),this.currentSelection.set(k))}}},{key:"registerMutation",value:function(c,m){if(m.indexOf(c.target)>-1)return null;var k=this.view.docView.nearestDesc(c.target);if(c.type=="attributes"&&(k==this.view.docView||c.attributeName=="contenteditable"||c.attributeName=="style"&&!c.oldValue&&!c.target.getAttribute("style"))||!k||k.ignoreMutation(c))return null;if(c.type=="childList"){for(var C=0;C<c.addedNodes.length;C++){var A=c.addedNodes[C];m.push(A),A.nodeType==3&&(this.lastChangedTextNode=A)}if(k.contentDOM&&k.contentDOM!=k.dom&&!k.contentDOM.contains(c.target))return{from:k.posBefore,to:k.posAfter};var O=c.previousSibling,q=c.nextSibling;if(Z&&ke<=11&&c.addedNodes.length)for(var U=0;U<c.addedNodes.length;U++){var Q=c.addedNodes[U],ue=Q.previousSibling,ne=Q.nextSibling;(!ue||Array.prototype.indexOf.call(c.addedNodes,ue)<0)&&(O=ue),(!ne||Array.prototype.indexOf.call(c.addedNodes,ne)<0)&&(q=ne)}var ye=O&&O.parentNode==c.target?xe(O)+1:0,Me=k.localPosFromDOM(c.target,ye,-1),Pe=q&&q.parentNode==c.target?xe(q):c.target.childNodes.length,je=k.localPosFromDOM(c.target,Pe,1);return{from:Me,to:je}}else return c.type=="attributes"?{from:k.posAtStart-k.border,to:k.posAtEnd+k.border}:(this.lastChangedTextNode=c.target,{from:k.posAtStart,to:k.posAtEnd,typeOver:c.target.nodeValue==c.oldValue})}}]),u})(),ol=new WeakMap,sl=!1;function Pc(u){if(!ol.has(u)&&(ol.set(u,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(u.dom).whiteSpace)!==-1)){if(u.requiresGeckoHackNode=Ee,sl)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),sl=!0}}function ll(u,v){var c=v.startContainer,m=v.startOffset,k=v.endContainer,C=v.endOffset,A=u.domAtPos(u.state.selection.anchor);if(ct(A.node,A.offset,k,C)){var O=[k,C,c,m];c=O[0],m=O[1],k=O[2],C=O[3]}return{anchorNode:c,anchorOffset:m,focusNode:k,focusOffset:C}}function Bc(u,v){if(v.getComposedRanges){var c=v.getComposedRanges(u.root)[0];if(c)return ll(u,c)}var m;function k(C){C.preventDefault(),C.stopImmediatePropagation(),m=C.getTargetRanges()[0]}return u.dom.addEventListener("beforeinput",k,!0),document.execCommand("indent"),u.dom.removeEventListener("beforeinput",k,!0),m?ll(u,m):null}function Fc(u,v){for(var c=v.parentNode;c&&c!=u.dom;c=c.parentNode){var m=u.docView.nearestDesc(c,!0);if(m&&m.node.isBlock)return c}return null}function qc(u,v){var c,m=u.domSelectionRange(),k=m.focusNode,C=m.focusOffset,A=i(v),O;try{for(A.s();!(O=A.n()).done;){var q=O.value;if(((c=q.parentNode)===null||c===void 0?void 0:c.nodeName)=="TR"){for(var U=q.nextSibling;U&&U.nodeName!="TD"&&U.nodeName!="TH";)U=U.nextSibling;if(U){for(var Q=U;;){var ue=Q.firstChild;if(!ue||ue.nodeType!=1||ue.contentEditable=="false"||/^(BR|IMG)$/.test(ue.nodeName))break;Q=ue}Q.insertBefore(q,Q.firstChild),k==q&&u.domSelection().collapse(q,C)}else q.parentNode.removeChild(q)}}}catch(ne){A.e(ne)}finally{A.f()}}function Hc(u,v,c){var m=u.docView.parseRange(v,c),k=m.node,C=m.fromOffset,A=m.toOffset,O=m.from,q=m.to,U=u.domSelectionRange(),Q,ue=U.anchorNode;if(ue&&u.dom.contains(ue.nodeType==1?ue:ue.parentNode)&&(Q=[{node:ue,offset:U.anchorOffset}],st(U)||Q.push({node:U.focusNode,offset:U.focusOffset})),Xe&&u.input.lastKeyCode===8)for(var ne=A;ne>C;ne--){var ye=k.childNodes[ne-1],Me=ye.pmViewDesc;if(ye.nodeName=="BR"&&!Me){A=ne;break}if(!Me||Me.size)break}var Pe=u.state.doc,je=u.someProp("domParser")||le.DOMParser.fromSchema(u.state.schema),Le=Pe.resolve(O),gt=null,vt=je.parse(k,{topNode:Le.parent,topMatch:Le.parent.contentMatchAt(Le.index()),topOpen:!0,from:C,to:A,preserveWhitespace:Le.parent.type.whitespace=="pre"?"full":!0,findPositions:Q,ruleFromNode:_c,context:Le});if(Q&&Q[0].pos!=null){var it=Q[0].pos,ht=Q[1]&&Q[1].pos;ht==null&&(ht=it),gt={anchor:it+O,head:ht+O}}return{doc:vt,sel:gt,from:O,to:q}}function _c(u){var v=u.pmViewDesc;if(v)return v.parseRule();if(u.nodeName=="BR"&&u.parentNode){if(lt&&/^(ul|ol)$/i.test(u.parentNode.nodeName)){var c=document.createElement("div");return c.appendChild(document.createElement("li")),{skip:c}}else if(u.parentNode.lastChild==u||lt&&/^(tr|table)$/i.test(u.parentNode.nodeName))return{ignore:!0}}else if(u.nodeName=="IMG"&&u.getAttribute("mark-placeholder"))return{ignore:!0};return null}var zc=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Vc(u,v,c,m,k){var C=u.input.compositionPendingChanges||(u.composing?u.input.compositionID:0);if(u.input.compositionPendingChanges=0,v<0){var A=u.input.lastSelectionTime>Date.now()-50?u.input.lastSelectionOrigin:null,O=Mn(u,A);if(O&&!u.state.selection.eq(O)){if(Xe&&Ot&&u.input.lastKeyCode===13&&Date.now()-100<u.input.lastKeyCodeTime&&u.someProp("handleKeyDown",function(Jt){return Jt(u,St(13,"Enter"))}))return;var q=u.state.tr.setSelection(O);A=="pointer"?q.setMeta("pointer",!0):A=="key"&&q.scrollIntoView(),C&&q.setMeta("composition",C),u.dispatch(q)}return}var U=u.state.doc.resolve(v),Q=U.sharedDepth(c);v=U.before(Q+1),c=u.state.doc.resolve(c).after(Q+1);var ue=u.state.selection,ne=Hc(u,v,c),ye=u.state.doc,Me=ye.slice(ne.from,ne.to),Pe,je;u.input.lastKeyCode===8&&Date.now()-100<u.input.lastKeyCodeTime?(Pe=u.state.selection.to,je="end"):(Pe=u.state.selection.from,je="start"),u.input.lastKeyCode=null;var Le=Wc(Me.content,ne.doc.content,ne.from,Pe,je);if(Le&&u.input.domChangeCount++,(Ht&&u.input.lastIOSEnter>Date.now()-225||Ot)&&k.some(function(Jt){return Jt.nodeType==1&&!zc.test(Jt.nodeName)})&&(!Le||Le.endA>=Le.endB)&&u.someProp("handleKeyDown",function(Jt){return Jt(u,St(13,"Enter"))})){u.input.lastIOSEnter=0;return}if(!Le)if(m&&ue instanceof oe.TextSelection&&!ue.empty&&ue.$head.sameParent(ue.$anchor)&&!u.composing&&!(ne.sel&&ne.sel.anchor!=ne.sel.head))Le={start:ue.from,endA:ue.to,endB:ue.to};else{if(ne.sel){var gt=ul(u,u.state.doc,ne.sel);if(gt&&!gt.eq(u.state.selection)){var vt=u.state.tr.setSelection(gt);C&&vt.setMeta("composition",C),u.dispatch(vt)}}return}u.state.selection.from<u.state.selection.to&&Le.start==Le.endB&&u.state.selection instanceof oe.TextSelection&&(Le.start>u.state.selection.from&&Le.start<=u.state.selection.from+2&&u.state.selection.from>=ne.from?Le.start=u.state.selection.from:Le.endA<u.state.selection.to&&Le.endA>=u.state.selection.to-2&&u.state.selection.to<=ne.to&&(Le.endB+=u.state.selection.to-Le.endA,Le.endA=u.state.selection.to)),Z&&ke<=11&&Le.endB==Le.start+1&&Le.endA==Le.start&&Le.start>ne.from&&ne.doc.textBetween(Le.start-ne.from-1,Le.start-ne.from+1)==" "&&(Le.start--,Le.endA--,Le.endB--);var it=ne.doc.resolveNoCache(Le.start-ne.from),ht=ne.doc.resolveNoCache(Le.endB-ne.from),Pt=ye.resolve(Le.start),qt=it.sameParent(ht)&&it.parent.inlineContent&&Pt.end()>=Le.endA;if((Ht&&u.input.lastIOSEnter>Date.now()-225&&(!qt||k.some(function(Jt){return Jt.nodeName=="DIV"||Jt.nodeName=="P"}))||!qt&&it.pos<ne.doc.content.size&&(!it.sameParent(ht)||!it.parent.inlineContent)&&it.pos<ht.pos&&!/\S/.test(ne.doc.textBetween(it.pos,ht.pos,"","")))&&u.someProp("handleKeyDown",function(Jt){return Jt(u,St(13,"Enter"))})){u.input.lastIOSEnter=0;return}if(u.state.selection.anchor>Le.start&&$c(ye,Le.start,Le.endA,it,ht)&&u.someProp("handleKeyDown",function(Jt){return Jt(u,St(8,"Backspace"))})){Ot&&Xe&&u.domObserver.suppressSelectionUpdates();return}Xe&&Le.endB==Le.start&&(u.input.lastChromeDelete=Date.now()),Ot&&!qt&&it.start()!=ht.start()&&ht.parentOffset==0&&it.depth==ht.depth&&ne.sel&&ne.sel.anchor==ne.sel.head&&ne.sel.head==Le.endA&&(Le.endB-=2,ht=ne.doc.resolveNoCache(Le.endB-ne.from),setTimeout(function(){u.someProp("handleKeyDown",function(Jt){return Jt(u,St(13,"Enter"))})},20));var Kt=Le.start,tr=Le.endA,rr=function(us){var Rn=us||u.state.tr.replace(Kt,tr,ne.doc.slice(Le.start-ne.from,Le.endB-ne.from));if(ne.sel){var Nr=ul(u,Rn.doc,ne.sel);Nr&&!(Xe&&u.composing&&Nr.empty&&(Le.start!=Le.endB||u.input.lastChromeDelete<Date.now()-100)&&(Nr.head==Kt||Nr.head==Rn.mapping.map(tr)-1)||Z&&Nr.empty&&Nr.head==Kt)&&Rn.setSelection(Nr)}return C&&Rn.setMeta("composition",C),Rn.scrollIntoView()},Ln;if(qt)if(it.pos==ht.pos){Z&&ke<=11&&it.parentOffset==0&&(u.domObserver.suppressSelectionUpdates(),setTimeout(function(){return nn(u)},20));var po=rr(u.state.tr.delete(Kt,tr)),Vn=ye.resolve(Le.start).marksAcross(ye.resolve(Le.endA));Vn&&po.ensureMarks(Vn),u.dispatch(po)}else if(Le.endA==Le.endB&&(Ln=Uc(it.parent.content.cut(it.parentOffset,ht.parentOffset),Pt.parent.content.cut(Pt.parentOffset,Le.endA-Pt.start())))){var ki=rr(u.state.tr);Ln.type=="add"?ki.addMark(Kt,tr,Ln.mark):ki.removeMark(Kt,tr,Ln.mark),u.dispatch(ki)}else if(it.parent.child(it.index()).isText&&it.index()==ht.index()-(ht.textOffset?0:1)){var wi=it.parent.textBetween(it.parentOffset,ht.parentOffset),xa=function(){return rr(u.state.tr.insertText(wi,Kt,tr))};u.someProp("handleTextInput",function(Jt){return Jt(u,Kt,tr,wi,xa)})||u.dispatch(xa())}else u.dispatch(rr());else u.dispatch(rr())}function ul(u,v,c){return Math.max(c.anchor,c.head)>v.content.size?null:On(u,v.resolve(c.anchor),v.resolve(c.head))}function Uc(u,v){for(var c=u.firstChild.marks,m=v.firstChild.marks,k=c,C=m,A,O,q,U=0;U<m.length;U++)k=m[U].removeFromSet(k);for(var Q=0;Q<c.length;Q++)C=c[Q].removeFromSet(C);if(k.length==1&&C.length==0)O=k[0],A="add",q=function(Me){return Me.mark(O.addToSet(Me.marks))};else if(k.length==0&&C.length==1)O=C[0],A="remove",q=function(Me){return Me.mark(O.removeFromSet(Me.marks))};else return null;for(var ue=[],ne=0;ne<v.childCount;ne++)ue.push(q(v.child(ne)));if(le.Fragment.from(ue).eq(u))return{mark:O,type:A}}function $c(u,v,c,m,k){if(c-v<=k.pos-m.pos||ls(m,!0,!1)<k.pos)return!1;var C=u.resolve(v);if(!m.parent.isTextblock){var A=C.nodeAfter;return A!=null&&c==v+A.nodeSize}if(C.parentOffset<C.parent.content.size||!C.parent.isTextblock)return!1;var O=u.resolve(ls(C,!0,!0));return!O.parent.isTextblock||O.pos>c||ls(O,!0,!1)<c?!1:m.parent.content.cut(m.parentOffset).eq(O.parent.content)}function ls(u,v,c){for(var m=u.depth,k=v?u.end():u.pos;m>0&&(v||u.indexAfter(m)==u.node(m).childCount);)m--,k++,v=!1;if(c)for(var C=u.node(m).maybeChild(u.indexAfter(m));C&&!C.isLeaf;)C=C.firstChild,k++;return k}function Wc(u,v,c,m,k){var C=u.findDiffStart(v,c);if(C==null)return null;var A=u.findDiffEnd(v,c+u.size,c+v.size),O=A.a,q=A.b;if(k=="end"){var U=Math.max(0,C-Math.min(O,q));m-=O+U-C}if(O<C&&u.size<v.size){var Q=m<=C&&m>=O?C-m:0;C-=Q,C&&C<v.size&&cl(v.textBetween(C-1,C+1))&&(C+=Q?1:-1),q=C+(q-O),O=C}else if(q<C){var ue=m<=C&&m>=q?C-m:0;C-=ue,C&&C<u.size&&cl(u.textBetween(C-1,C+1))&&(C+=ue?1:-1),O=C+(O-q),q=C}return{start:C,endA:O,endB:q}}function cl(u){if(u.length!=2)return!1;var v=u.charCodeAt(0),c=u.charCodeAt(1);return v>=56320&&v<=57343&&c>=55296&&c<=56319}var jc=fe,Gc=ka,fl=(function(){function u(v,c){var m=this;z(this,u),this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new oc,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=c,this.state=c.state,this.directPlugins=c.plugins||[],this.directPlugins.forEach(ml),this.dispatch=this.dispatch.bind(this),this.dom=v&&v.mount||document.createElement("div"),v&&(v.appendChild?v.appendChild(this.dom):typeof v=="function"?v(this.dom):v.mount&&(this.mounted=!0)),this.editable=pl(this),hl(this),this.nodeViews=vl(this),this.docView=w(this.state.doc,dl(this),ss(this),this.dom,this),this.domObserver=new Ic(this,function(k,C,A,O){return Vc(m,k,C,A,O)}),this.domObserver.start(),sc(this),this.updatePluginViews()}return ee(u,[{key:"composing",get:function(){return this.input.composing}},{key:"props",get:function(){if(this._props.state!=this.state){var c=this._props;this._props={};for(var m in c)this._props[m]=c[m];this._props.state=this.state}return this._props}},{key:"update",value:function(c){c.handleDOMEvents!=this._props.handleDOMEvents&&ts(this);var m=this._props;this._props=c,c.plugins&&(c.plugins.forEach(ml),this.directPlugins=c.plugins),this.updateStateInner(c.state,m)}},{key:"setProps",value:function(c){var m={};for(var k in this._props)m[k]=this._props[k];m.state=this.state;for(var C in c)m[C]=c[C];this.update(m)}},{key:"updateState",value:function(c){this.updateStateInner(c,this._props)}},{key:"updateStateInner",value:function(c,m){var k,C=this.state,A=!1,O=!1;c.storedMarks&&this.composing&&(Js(this),O=!0),this.state=c;var q=C.plugins!=c.plugins||this._props.plugins!=m.plugins;if(q||this._props.plugins!=m.plugins||this._props.nodeViews!=m.nodeViews){var U=vl(this);Jc(U,this.nodeViews)&&(this.nodeViews=U,A=!0)}(q||m.handleDOMEvents!=this._props.handleDOMEvents)&&ts(this),this.editable=pl(this),hl(this);var Q=ss(this),ue=dl(this),ne=C.plugins!=c.plugins&&!C.doc.eq(c.doc)?"reset":c.scrollToSelection>C.scrollToSelection?"to selection":"preserve",ye=A||!this.docView.matchesNode(c.doc,ue,Q);(ye||!c.selection.eq(C.selection))&&(O=!0);var Me=ne=="preserve"&&O&&this.dom.style.overflowAnchor==null&&at(this);if(O){this.domObserver.stop();var Pe=ye&&(Z||Xe)&&!this.composing&&!C.selection.empty&&!c.selection.empty&&Kc(C.selection,c.selection);if(ye){var je=Xe?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=wc(this)),(A||!this.docView.update(c.doc,ue,Q,this))&&(this.docView.updateOuterDeco(ue),this.docView.destroy(),this.docView=w(c.doc,ue,Q,this.dom,this)),je&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(Pe=!0)}Pe||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Qn(this))?nn(this,Pe):(vi(this,c.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(C),!((k=this.dragging)===null||k===void 0)&&k.node&&!C.doc.eq(c.doc)&&this.updateDraggedNode(this.dragging,C),ne=="reset"?this.dom.scrollTop=0:ne=="to selection"?this.scrollToSelection():Me&&Ct(Me)}},{key:"scrollToSelection",value:function(){var c=this,m=this.domSelectionRange().focusNode;if(!(!m||!this.dom.contains(m.nodeType==1?m:m.parentNode))){if(!this.someProp("handleScrollToSelection",function(C){return C(c)}))if(this.state.selection instanceof oe.NodeSelection){var k=this.docView.domAfterPos(this.state.selection.from);k.nodeType==1&&Ue(this,k.getBoundingClientRect(),m)}else Ue(this,this.coordsAtPos(this.state.selection.head,1),m)}}},{key:"destroyPluginViews",value:function(){for(var c;c=this.pluginViews.pop();)c.destroy&&c.destroy()}},{key:"updatePluginViews",value:function(c){if(!c||c.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var m=0;m<this.directPlugins.length;m++){var k=this.directPlugins[m];k.spec.view&&this.pluginViews.push(k.spec.view(this))}for(var C=0;C<this.state.plugins.length;C++){var A=this.state.plugins[C];A.spec.view&&this.pluginViews.push(A.spec.view(this))}}else for(var O=0;O<this.pluginViews.length;O++){var q=this.pluginViews[O];q.update&&q.update(this,c)}}},{key:"updateDraggedNode",value:function(c,m){var k=c.node,C=-1;if(this.state.doc.nodeAt(k.from)==k.node)C=k.from;else{var A=k.from+(this.state.doc.content.size-m.doc.content.size),O=A>0&&this.state.doc.nodeAt(A);O==k.node&&(C=A)}this.dragging=new Xs(c.slice,c.move,C<0?void 0:oe.NodeSelection.create(this.state.doc,C))}},{key:"someProp",value:function(c,m){var k=this._props&&this._props[c],C;if(k!=null&&(C=m?m(k):k))return C;for(var A=0;A<this.directPlugins.length;A++){var O=this.directPlugins[A].props[c];if(O!=null&&(C=m?m(O):O))return C}var q=this.state.plugins;if(q)for(var U=0;U<q.length;U++){var Q=q[U].props[c];if(Q!=null&&(C=m?m(Q):Q))return C}}},{key:"hasFocus",value:function(){if(Z){var c=this.root.activeElement;if(c==this.dom)return!0;if(!c||!this.dom.contains(c))return!1;for(;c&&this.dom!=c&&this.dom.contains(c);){if(c.contentEditable=="false")return!1;c=c.parentElement}return!0}return this.root.activeElement==this.dom}},{key:"focus",value:function(){this.domObserver.stop(),this.editable&&Wt(this.dom),nn(this),this.domObserver.start()}},{key:"root",get:function(){var c=this,m=this._root;if(m==null){for(var k=function(q){if(q.nodeType==9||q.nodeType==11&&q.host)return q.getSelection||(Object.getPrototypeOf(q).getSelection=function(){return q.ownerDocument.getSelection()}),{v:c._root=q}},C,A=this.dom.parentNode;A;A=A.parentNode)if(C=k(A),C)return C.v}return m||document}},{key:"updateRoot",value:function(){this._root=null}},{key:"posAtCoords",value:function(c){return Gr(this,c)}},{key:"coordsAtPos",value:function(c){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return zt(this,c,m)}},{key:"domAtPos",value:function(c){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this.docView.domFromPos(c,m)}},{key:"nodeDOM",value:function(c){var m=this.docView.descAt(c);return m?m.nodeDOM:null}},{key:"posAtDOM",value:function(c,m){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1,C=this.docView.posFromDOM(c,m,k);if(C==null)throw new RangeError("DOM position not inside the editor");return C}},{key:"endOfTextblock",value:function(c,m){return Ce(this,m||this.state,c)}},{key:"pasteHTML",value:function(c,m){return Ca(this,"",c,!1,m||new ClipboardEvent("paste"))}},{key:"pasteText",value:function(c,m){return Ca(this,c,null,!0,m||new ClipboardEvent("paste"))}},{key:"serializeForClipboard",value:function(c){return Qe(this,c)}},{key:"destroy",value:function(){this.docView&&(lc(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ss(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,bt())}},{key:"isDestroyed",get:function(){return this.docView==null}},{key:"dispatchEvent",value:function(c){return cc(this,c)}},{key:"domSelectionRange",value:function(){var c=this.domSelection();return c?lt&&this.root.nodeType===11&&Mt(this.dom.ownerDocument)==this.dom&&Bc(this,c)||c:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}},{key:"domSelection",value:function(){return this.root.getSelection()}}]),u})();fl.prototype.dispatch=function(u){var v=this._props.dispatchTransaction;v?v.call(this,u):this.updateState(this.state.apply(u))};function dl(u){var v=Object.create(null);return v.class="ProseMirror",v.contenteditable=String(u.editable),u.someProp("attributes",function(c){if(typeof c=="function"&&(c=c(u.state)),c)for(var m in c)m=="class"?v.class+=" "+c[m]:m=="style"?v.style=(v.style?v.style+";":"")+c[m]:!v[m]&&m!="contenteditable"&&m!="nodeName"&&(v[m]=String(c[m]))}),v.translate||(v.translate="no"),[gi.node(0,u.state.doc.content.size,v)]}function hl(u){if(u.markCursor){var v=document.createElement("img");v.className="ProseMirror-separator",v.setAttribute("mark-placeholder","true"),v.setAttribute("alt",""),u.cursorWrapper={dom:v,deco:gi.widget(u.state.selection.from,v,{raw:!0,marks:u.markCursor})}}else u.cursorWrapper=null}function pl(u){return!u.someProp("editable",function(v){return v(u.state)===!1})}function Kc(u,v){var c=Math.min(u.$anchor.sharedDepth(u.head),v.$anchor.sharedDepth(v.head));return u.$anchor.start(c)!=v.$anchor.start(c)}function vl(u){var v=Object.create(null);function c(m){for(var k in m)Object.prototype.hasOwnProperty.call(v,k)||(v[k]=m[k])}return u.someProp("nodeViews",c),u.someProp("markViews",c),v}function Jc(u,v){var c=0,m=0;for(var k in u){if(u[k]!=v[k])return!0;c++}for(var C in v)m++;return c!=m}function ml(u){if(u.spec.state||u.spec.filterTransaction||u.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}return Ra.Decoration=gi,Ra.DecorationSet=gn,Ra.EditorView=fl,Ra.__endComposition=Gc,Ra.__parseFromClipboard=jc,Ra}/*!
|
|
683
|
-
* @toast-ui/editor
|
|
684
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
685
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
686
|
-
* @license MIT
|
|
687
|
-
*/var Ky;function K8e(){return Ky||(Ky=1,(function(r,e){(function(n,i){r.exports=i($8e(),j8e(),Qu(),ec(),G8e())})(self,function(t,n,i,a,o){return(function(){var s={368:(function(b){/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */(function(T,x){b.exports=x()})(this,function(){function T(_e){if(Array.isArray(_e)){for(var Ue=0,at=Array(_e.length);Ue<_e.length;Ue++)at[Ue]=_e[Ue];return at}else return Array.from(_e)}var x=Object.hasOwnProperty,E=Object.setPrototypeOf,P=Object.isFrozen,F=Object.getPrototypeOf,z=Object.getOwnPropertyDescriptor,Y=Object.freeze,ee=Object.seal,se=Object.create,de=typeof Reflect<"u"&&Reflect,oe=de.apply,le=de.construct;oe||(oe=function(Ue,at,ut){return Ue.apply(at,ut)}),Y||(Y=function(Ue){return Ue}),ee||(ee=function(Ue){return Ue}),le||(le=function(Ue,at){return new(Function.prototype.bind.apply(Ue,[null].concat(T(at))))});var ge=It(Array.prototype.forEach),xe=It(Array.prototype.pop),Ie=It(Array.prototype.push),ot=It(String.prototype.toLowerCase),Fe=It(String.prototype.match),bt=It(String.prototype.replace),ct=It(String.prototype.indexOf),mt=It(String.prototype.trim),nt=It(RegExp.prototype.test),Et=Ut(TypeError);function It(_e){return function(Ue){for(var at=arguments.length,ut=Array(at>1?at-1:0),Ct=1;Ct<at;Ct++)ut[Ct-1]=arguments[Ct];return oe(_e,Ue,ut)}}function Ut(_e){return function(){for(var Ue=arguments.length,at=Array(Ue),ut=0;ut<Ue;ut++)at[ut]=arguments[ut];return le(_e,at)}}function Ye(_e,Ue){E&&E(_e,null);for(var at=Ue.length;at--;){var ut=Ue[at];if(typeof ut=="string"){var Ct=ot(ut);Ct!==ut&&(P(Ue)||(Ue[at]=Ct),ut=Ct)}_e[ut]=!0}return _e}function dt(_e){var Ue=se(null),at=void 0;for(at in _e)oe(x,_e,[at])&&(Ue[at]=_e[at]);return Ue}function st(_e,Ue){for(;_e!==null;){var at=z(_e,Ue);if(at){if(at.get)return It(at.get);if(typeof at.value=="function")return It(at.value)}_e=F(_e)}function ut(Ct){return console.warn("fallback value for",Ct),null}return ut}var St=Y(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Mt=Y(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),nr=Y(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$t=Y(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Qt=Y(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),be=Y(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ve=Y(["#text"]),ie=Y(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),ae=Y(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Z=Y(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ke=Y(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ee=ee(/\{\{[\s\S]*|[\s\S]*\}\}/gm),ze=ee(/<%[\s\S]*|[\s\S]*%>/gm),Xe=ee(/^data-[\-\w.\u00B7-\uFFFF]/),kt=ee(/^aria-[\-\w]+$/),lt=ee(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ht=ee(/^(?:\w+script|data):/i),At=ee(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_e){return typeof _e}:function(_e){return _e&&typeof Symbol=="function"&&_e.constructor===Symbol&&_e!==Symbol.prototype?"symbol":typeof _e};function Ot(_e){if(Array.isArray(_e)){for(var Ue=0,at=Array(_e.length);Ue<_e.length;Ue++)at[Ue]=_e[Ue];return at}else return Array.from(_e)}var hr=function(){return typeof window>"u"?null:window},Sn=function(Ue,at){if((typeof Ue>"u"?"undefined":jt(Ue))!=="object"||typeof Ue.createPolicy!="function")return null;var ut=null,Ct="data-tt-policy-suffix";at.currentScript&&at.currentScript.hasAttribute(Ct)&&(ut=at.currentScript.getAttribute(Ct));var gr="dompurify"+(ut?"#"+ut:"");try{return Ue.createPolicy(gr,{createHTML:function(Wt){return Wt}})}catch{return console.warn("TrustedTypes policy "+gr+" could not be created."),null}};function Qr(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hr(),Ue=function(fe){return Qr(fe)};if(Ue.version="2.3.3",Ue.removed=[],!_e||!_e.document||_e.document.nodeType!==9)return Ue.isSupported=!1,Ue;var at=_e.document,ut=_e.document,Ct=_e.DocumentFragment,gr=_e.HTMLTemplateElement,_t=_e.Node,Wt=_e.Element,qr=_e.NodeFilter,pn=_e.NamedNodeMap,ar=pn===void 0?_e.NamedNodeMap||_e.MozNamedAttrMap:pn,Hr=_e.Text,xn=_e.Comment,vn=_e.DOMParser,en=_e.trustedTypes,Gr=Wt.prototype,_r=st(Gr,"cloneNode"),or=st(Gr,"nextSibling"),tn=st(Gr,"childNodes"),zt=st(Gr,"parentNode");if(typeof gr=="function"){var pr=ut.createElement("template");pr.content&&pr.content.ownerDocument&&(ut=pr.content.ownerDocument)}var W=Sn(en,at),$=W&&Zn?W.createHTML(""):"",R=ut,D=R.implementation,B=R.createNodeIterator,H=R.createDocumentFragment,K=R.getElementsByTagName,he=at.importNode,Ce={};try{Ce=dt(ut).documentMode?ut.documentMode:{}}catch{}var re={};Ue.isSupported=typeof zt=="function"&&D&&typeof D.createHTMLDocument<"u"&&Ce!==9;var J=Ee,me=ze,Te=Xe,He=kt,Ze=Ht,I=At,M=lt,g=null,w=Ye({},[].concat(Ot(St),Ot(Mt),Ot(nr),Ot(Qt),Ot(ve))),N=null,_=Ye({},[].concat(Ot(ie),Ot(ae),Ot(Z),Ot(ke))),j=null,X=null,ce=!0,pe=!0,Ne=!1,Oe=!1,Be=!1,et=!1,wt=!1,Vt=!1,rn=!1,zn=!0,Zn=!1,to=!0,ha=!0,pi=!1,En={},Mn=null,pa=Ye({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),nn=null,va=Ye({},["audio","video","img","source","image","track"]),_i=null,zi=Ye({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vi="http://www.w3.org/1998/Math/MathML",ma="http://www.w3.org/2000/svg",An="http://www.w3.org/1999/xhtml",vi=An,Ui=!1,On=void 0,ro=["application/xhtml+xml","text/html"],no="text/html",Qn=void 0,Nn=null,Dn=ut.createElement("form"),$i=function(fe){Nn&&Nn===fe||((!fe||(typeof fe>"u"?"undefined":jt(fe))!=="object")&&(fe={}),fe=dt(fe),g="ALLOWED_TAGS"in fe?Ye({},fe.ALLOWED_TAGS):w,N="ALLOWED_ATTR"in fe?Ye({},fe.ALLOWED_ATTR):_,_i="ADD_URI_SAFE_ATTR"in fe?Ye(dt(zi),fe.ADD_URI_SAFE_ATTR):zi,nn="ADD_DATA_URI_TAGS"in fe?Ye(dt(va),fe.ADD_DATA_URI_TAGS):va,Mn="FORBID_CONTENTS"in fe?Ye({},fe.FORBID_CONTENTS):pa,j="FORBID_TAGS"in fe?Ye({},fe.FORBID_TAGS):{},X="FORBID_ATTR"in fe?Ye({},fe.FORBID_ATTR):{},En="USE_PROFILES"in fe?fe.USE_PROFILES:!1,ce=fe.ALLOW_ARIA_ATTR!==!1,pe=fe.ALLOW_DATA_ATTR!==!1,Ne=fe.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=fe.SAFE_FOR_TEMPLATES||!1,Be=fe.WHOLE_DOCUMENT||!1,Vt=fe.RETURN_DOM||!1,rn=fe.RETURN_DOM_FRAGMENT||!1,zn=fe.RETURN_DOM_IMPORT!==!1,Zn=fe.RETURN_TRUSTED_TYPE||!1,wt=fe.FORCE_BODY||!1,to=fe.SANITIZE_DOM!==!1,ha=fe.KEEP_CONTENT!==!1,pi=fe.IN_PLACE||!1,M=fe.ALLOWED_URI_REGEXP||M,vi=fe.NAMESPACE||An,On=ro.indexOf(fe.PARSER_MEDIA_TYPE)===-1?On=no:On=fe.PARSER_MEDIA_TYPE,Qn=On==="application/xhtml+xml"?function(Re){return Re}:ot,Oe&&(pe=!1),rn&&(Vt=!0),En&&(g=Ye({},[].concat(Ot(ve))),N=[],En.html===!0&&(Ye(g,St),Ye(N,ie)),En.svg===!0&&(Ye(g,Mt),Ye(N,ae),Ye(N,ke)),En.svgFilters===!0&&(Ye(g,nr),Ye(N,ae),Ye(N,ke)),En.mathMl===!0&&(Ye(g,Qt),Ye(N,Z),Ye(N,ke))),fe.ADD_TAGS&&(g===w&&(g=dt(g)),Ye(g,fe.ADD_TAGS)),fe.ADD_ATTR&&(N===_&&(N=dt(N)),Ye(N,fe.ADD_ATTR)),fe.ADD_URI_SAFE_ATTR&&Ye(_i,fe.ADD_URI_SAFE_ATTR),fe.FORBID_CONTENTS&&(Mn===pa&&(Mn=dt(Mn)),Ye(Mn,fe.FORBID_CONTENTS)),ha&&(g["#text"]=!0),Be&&Ye(g,["html","head","body"]),g.table&&(Ye(g,["tbody"]),delete j.tbody),Y&&Y(fe),Nn=fe)},mi=Ye({},["mi","mo","mn","ms","mtext"]),ei=Ye({},["foreignobject","desc","title","annotation-xml"]),mn=Ye({},Mt);Ye(mn,nr),Ye(mn,$t);var ga=Ye({},Qt);Ye(ga,be);var Qo=function(fe){var Re=zt(fe);(!Re||!Re.tagName)&&(Re={namespaceURI:An,tagName:"template"});var Ke=ot(fe.tagName),Nt=ot(Re.tagName);if(fe.namespaceURI===ma)return Re.namespaceURI===An?Ke==="svg":Re.namespaceURI===Vi?Ke==="svg"&&(Nt==="annotation-xml"||mi[Nt]):!!mn[Ke];if(fe.namespaceURI===Vi)return Re.namespaceURI===An?Ke==="math":Re.namespaceURI===ma?Ke==="math"&&ei[Nt]:!!ga[Ke];if(fe.namespaceURI===An){if(Re.namespaceURI===ma&&!ei[Nt]||Re.namespaceURI===Vi&&!mi[Nt])return!1;var sr=Ye({},["title","style","font","a","script"]);return!ga[Ke]&&(sr[Ke]||!mn[Ke])}return!1},an=function(fe){Ie(Ue.removed,{element:fe});try{fe.parentNode.removeChild(fe)}catch{try{fe.outerHTML=$}catch{fe.remove()}}},io=function(fe,Re){try{Ie(Ue.removed,{attribute:Re.getAttributeNode(fe),from:Re})}catch{Ie(Ue.removed,{attribute:null,from:Re})}if(Re.removeAttribute(fe),fe==="is"&&!N[fe])if(Vt||rn)try{an(Re)}catch{}else try{Re.setAttribute(fe,"")}catch{}},ao=function(fe){var Re=void 0,Ke=void 0;if(wt)fe="<remove></remove>"+fe;else{var Nt=Fe(fe,/^[\r\n\t ]+/);Ke=Nt&&Nt[0]}On==="application/xhtml+xml"&&(fe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+fe+"</body></html>");var sr=W?W.createHTML(fe):fe;if(vi===An)try{Re=new vn().parseFromString(sr,On)}catch{}if(!Re||!Re.documentElement){Re=D.createDocument(vi,"template",null);try{Re.documentElement.innerHTML=Ui?"":sr}catch{}}var lr=Re.body||Re.documentElement;return fe&&Ke&&lr.insertBefore(ut.createTextNode(Ke),lr.childNodes[0]||null),vi===An?K.call(Re,Be?"html":"body")[0]:Be?Re.documentElement:lr},Wi=function(fe){return B.call(fe.ownerDocument||fe,fe,qr.SHOW_ELEMENT|qr.SHOW_COMMENT|qr.SHOW_TEXT,null,!1)},oo=function(fe){return fe instanceof Hr||fe instanceof xn?!1:typeof fe.nodeName!="string"||typeof fe.textContent!="string"||typeof fe.removeChild!="function"||!(fe.attributes instanceof ar)||typeof fe.removeAttribute!="function"||typeof fe.setAttribute!="function"||typeof fe.namespaceURI!="string"||typeof fe.insertBefore!="function"},ti=function(fe){return(typeof _t>"u"?"undefined":jt(_t))==="object"?fe instanceof _t:fe&&(typeof fe>"u"?"undefined":jt(fe))==="object"&&typeof fe.nodeType=="number"&&typeof fe.nodeName=="string"},on=function(fe,Re,Ke){re[fe]&&ge(re[fe],function(Nt){Nt.call(Ue,Re,Ke,Nn)})},ya=function(fe){var Re=void 0;if(on("beforeSanitizeElements",fe,null),oo(fe)||Fe(fe.nodeName,/[\u0080-\uFFFF]/))return an(fe),!0;var Ke=Qn(fe.nodeName);if(on("uponSanitizeElement",fe,{tagName:Ke,allowedTags:g}),!ti(fe.firstElementChild)&&(!ti(fe.content)||!ti(fe.content.firstElementChild))&&nt(/<[/\w]/g,fe.innerHTML)&&nt(/<[/\w]/g,fe.textContent)||Ke==="select"&&nt(/<template/i,fe.innerHTML))return an(fe),!0;if(!g[Ke]||j[Ke]){if(ha&&!Mn[Ke]){var Nt=zt(fe)||fe.parentNode,sr=tn(fe)||fe.childNodes;if(sr&&Nt)for(var lr=sr.length,er=lr-1;er>=0;--er)Nt.insertBefore(_r(sr[er],!0),or(fe))}return an(fe),!0}return fe instanceof Wt&&!Qo(fe)||(Ke==="noscript"||Ke==="noembed")&&nt(/<\/no(script|embed)/i,fe.innerHTML)?(an(fe),!0):(Oe&&fe.nodeType===3&&(Re=fe.textContent,Re=bt(Re,J," "),Re=bt(Re,me," "),fe.textContent!==Re&&(Ie(Ue.removed,{element:fe.cloneNode()}),fe.textContent=Re)),on("afterSanitizeElements",fe,null),!1)},so=function(fe,Re,Ke){if(to&&(Re==="id"||Re==="name")&&(Ke in ut||Ke in Dn))return!1;if(!(pe&&!X[Re]&&nt(Te,Re))){if(!(ce&&nt(He,Re))){if(!N[Re]||X[Re])return!1;if(!_i[Re]){if(!nt(M,bt(Ke,I,""))){if(!((Re==="src"||Re==="xlink:href"||Re==="href")&&fe!=="script"&&ct(Ke,"data:")===0&&nn[fe])){if(!(Ne&&!nt(Ze,bt(Ke,I,"")))){if(Ke)return!1}}}}}}return!0},lo=function(fe){var Re=void 0,Ke=void 0,Nt=void 0,sr=void 0;on("beforeSanitizeAttributes",fe,null);var lr=fe.attributes;if(lr){var er={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N};for(sr=lr.length;sr--;){Re=lr[sr];var sn=Re,ri=sn.name,ba=sn.namespaceURI;if(Ke=mt(Re.value),Nt=Qn(ri),er.attrName=Nt,er.attrValue=Ke,er.keepAttr=!0,er.forceKeepAttr=void 0,on("uponSanitizeAttribute",fe,er),Ke=er.attrValue,!er.forceKeepAttr&&(io(ri,fe),!!er.keepAttr)){if(nt(/\/>/i,Ke)){io(ri,fe);continue}Oe&&(Ke=bt(Ke,J," "),Ke=bt(Ke,me," "));var uo=Qn(fe.nodeName);if(so(uo,Nt,Ke))try{ba?fe.setAttributeNS(ba,ri,Ke):fe.setAttribute(ri,Ke),xe(Ue.removed)}catch{}}}on("afterSanitizeAttributes",fe,null)}},es=function Qe(fe){var Re=void 0,Ke=Wi(fe);for(on("beforeSanitizeShadowDOM",fe,null);Re=Ke.nextNode();)on("uponSanitizeShadowNode",Re,null),!ya(Re)&&(Re.content instanceof Ct&&Qe(Re.content),lo(Re));on("afterSanitizeShadowDOM",fe,null)};return Ue.sanitize=function(Qe,fe){var Re=void 0,Ke=void 0,Nt=void 0,sr=void 0,lr=void 0;if(Ui=!Qe,Ui&&(Qe="<!-->"),typeof Qe!="string"&&!ti(Qe)){if(typeof Qe.toString!="function")throw Et("toString is not a function");if(Qe=Qe.toString(),typeof Qe!="string")throw Et("dirty is not a string, aborting")}if(!Ue.isSupported){if(jt(_e.toStaticHTML)==="object"||typeof _e.toStaticHTML=="function"){if(typeof Qe=="string")return _e.toStaticHTML(Qe);if(ti(Qe))return _e.toStaticHTML(Qe.outerHTML)}return Qe}if(et||$i(fe),Ue.removed=[],typeof Qe=="string"&&(pi=!1),!pi)if(Qe instanceof _t)Re=ao("<!---->"),Ke=Re.ownerDocument.importNode(Qe,!0),Ke.nodeType===1&&Ke.nodeName==="BODY"||Ke.nodeName==="HTML"?Re=Ke:Re.appendChild(Ke);else{if(!Vt&&!Oe&&!Be&&Qe.indexOf("<")===-1)return W&&Zn?W.createHTML(Qe):Qe;if(Re=ao(Qe),!Re)return Vt?null:$}Re&&wt&&an(Re.firstChild);for(var er=Wi(pi?Qe:Re);Nt=er.nextNode();)Nt.nodeType===3&&Nt===sr||ya(Nt)||(Nt.content instanceof Ct&&es(Nt.content),lo(Nt),sr=Nt);if(sr=null,pi)return Qe;if(Vt){if(rn)for(lr=H.call(Re.ownerDocument);Re.firstChild;)lr.appendChild(Re.firstChild);else lr=Re;return zn&&(lr=he.call(at,lr,!0)),lr}var sn=Be?Re.outerHTML:Re.innerHTML;return Oe&&(sn=bt(sn,J," "),sn=bt(sn,me," ")),W&&Zn?W.createHTML(sn):sn},Ue.setConfig=function(Qe){$i(Qe),et=!0},Ue.clearConfig=function(){Nn=null,et=!1},Ue.isValidAttribute=function(Qe,fe,Re){Nn||$i({});var Ke=Qn(Qe),Nt=Qn(fe);return so(Ke,Nt,Re)},Ue.addHook=function(Qe,fe){typeof fe=="function"&&(re[Qe]=re[Qe]||[],Ie(re[Qe],fe))},Ue.removeHook=function(Qe){re[Qe]&&xe(re[Qe])},Ue.removeHooks=function(Qe){re[Qe]&&(re[Qe]=[])},Ue.removeAllHooks=function(){re={}},Ue}var ir=Qr();return ir})}),928:(function(b,T,x){var E=x(322);function P(F,z,Y){var ee,se;if(Y=Y||0,!E(z))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(z,F,Y);for(se=z.length,ee=Y;Y>=0&&ee<se;ee+=1)if(z[ee]===F)return ee;return-1}b.exports=P}),690:(function(b,T,x){var E=x(322),P=x(893),F=x(956);function z(Y,ee,se){E(Y)?P(Y,ee,se):F(Y,ee,se)}b.exports=z}),893:(function(b){function T(x,E,P){var F=0,z=x.length;for(P=P||null;F<z&&E.call(P,x[F],F,x)!==!1;F+=1);}b.exports=T}),956:(function(b){function T(x,E,P){var F;P=P||null;for(F in x)if(x.hasOwnProperty(F)&&E.call(P,x[F],F,x)===!1)break}b.exports=T}),990:(function(b,T,x){var E=x(893);function P(F){var z;try{z=Array.prototype.slice.call(F)}catch{z=[],E(F,function(ee){z.push(ee)})}return z}b.exports=P}),755:(function(b){var T="_feEventKey";function x(E,P){var F=E[T],z;return F||(F=E[T]={}),z=F[P],z||(z=F[P]=[]),z}b.exports=x}),349:(function(b,T,x){var E=x(758),P=x(690),F=x(755);function z(se,de,oe){if(E(de)){P(de.split(/\s+/g),function(le){Y(se,le,oe)});return}P(de,function(le,ge){Y(se,ge,le)})}function Y(se,de,oe){var le=F(se,de),ge;oe?(P(le,function(xe,Ie){return oe===xe.handler?(ee(se,de,xe.wrappedHandler),ge=Ie,!1):!0}),le.splice(ge,1)):(P(le,function(xe){ee(se,de,xe.wrappedHandler)}),le.splice(0,le.length))}function ee(se,de,oe){"removeEventListener"in se?se.removeEventListener(de,oe):"detachEvent"in se&&se.detachEvent("on"+de,oe)}b.exports=z}),348:(function(b,T,x){var E=x(758),P=x(690),F=x(755);function z(se,de,oe,le){if(E(de)){P(de.split(/\s+/g),function(ge){Y(se,ge,oe,le)});return}P(de,function(ge,xe){Y(se,xe,ge,oe)})}function Y(se,de,oe,le){function ge(xe){oe.call(le||se,xe||window.event)}"addEventListener"in se?se.addEventListener(de,ge):"attachEvent"in se&&se.attachEvent("on"+de,ge),ee(se,de,oe,ge)}function ee(se,de,oe,le){var ge=F(se,de),xe=!1;P(ge,function(Ie){return Ie.handler===oe?(xe=!0,!1):!0}),xe||ge.push({handler:oe,wrappedHandler:le})}b.exports=z}),24:(function(b,T,x){var E=x(322),P=x(929);function F(z,Y){if(Y=E(Y)?Y.join(" "):Y,Y=Y.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),P(z.className.baseVal)){z.className=Y;return}z.className.baseVal=Y}b.exports=F}),204:(function(b,T,x){var E=x(690),P=x(928),F=x(902),z=x(24);function Y(ee){var se=Array.prototype.slice.call(arguments,1),de=ee.classList,oe=[],le;if(de){E(se,function(ge){ee.classList.add(ge)});return}le=F(ee),le&&(se=[].concat(le.split(/\s+/),se)),E(se,function(ge){P(ge,oe)<0&&oe.push(ge)}),z(ee,oe)}b.exports=Y}),522:(function(b,T,x){var E=x(758),P=x(690);function F(z,Y,ee){var se=z.style;if(E(Y)){se[Y]=ee;return}P(Y,function(de,oe){se[oe]=de})}b.exports=F}),902:(function(b,T,x){var E=x(929);function P(F){return!F||!F.className?"":E(F.className.baseVal)?F.className:F.className.baseVal}b.exports=P}),714:(function(b,T,x){var E=x(928),P=x(902);function F(z,Y){var ee;return z.classList?z.classList.contains(Y):(ee=P(z).split(/\s+/),E(Y,ee)>-1)}b.exports=F}),471:(function(b,T,x){var E=x(928),P=x(990),F=Element.prototype,z=F.matches||F.webkitMatchesSelector||F.mozMatchesSelector||F.msMatchesSelector||function(ee){var se=this.document||this.ownerDocument;return E(this,P(se.querySelectorAll(ee)))>-1};function Y(ee,se){return z.call(ee,se)}b.exports=Y}),462:(function(b,T,x){var E=x(893),P=x(928),F=x(902),z=x(24);function Y(ee){var se=Array.prototype.slice.call(arguments,1),de=ee.classList,oe,le;if(de){E(se,function(ge){de.remove(ge)});return}oe=F(ee).split(/\s+/),le=[],E(oe,function(ge){P(ge,se)<0&&le.push(ge)}),z(ee,le)}b.exports=Y}),969:(function(b){function T(x,E){var P=Object.prototype.hasOwnProperty,F,z,Y,ee;for(Y=1,ee=arguments.length;Y<ee;Y+=1){F=arguments[Y];for(z in F)P.call(F,z)&&(x[z]=F[z])}return x}b.exports=T}),254:(function(b,T,x){var E=x(956);function P(F,z){var Y=document.createElement("img"),ee="";return E(z,function(se,de){ee+="&"+de+"="+se}),ee=ee.substring(1),Y.src=F+"?"+ee,Y.style.display="none",document.body.appendChild(Y),document.body.removeChild(Y),Y}b.exports=P}),391:(function(b,T,x){var E=x(929),P=x(254),F=10080*60*1e3;function z(ee){var se=new Date().getTime();return se-ee>F}function Y(ee,se){var de="https://www.google-analytics.com/collect",oe=location.hostname,le="event",ge="use",xe="TOAST UI "+ee+" for "+oe+": Statistics",Ie=window.localStorage.getItem(xe);!E(window.tui)&&window.tui.usageStatistics===!1||Ie&&!z(Ie)||(window.localStorage.setItem(xe,new Date().getTime()),setTimeout(function(){(document.readyState==="interactive"||document.readyState==="complete")&&P(de,{v:1,t:le,tid:se,cid:oe,dp:oe,dh:ee,el:ee,ec:ge})},1e3))}b.exports=Y}),322:(function(b){function T(x){return x instanceof Array}b.exports=T}),65:(function(b,T,x){var E=x(929),P=x(934);function F(z){return!E(z)&&!P(z)}b.exports=F}),404:(function(b,T,x){var E=x(790);function P(F){return!E(F)}b.exports=P}),294:(function(b){function T(x){return x instanceof Function}b.exports=T}),934:(function(b){function T(x){return x===null}b.exports=T}),758:(function(b){function T(x){return typeof x=="string"||x instanceof String}b.exports=T}),790:(function(b,T,x){var E=x(65);function P(F){return E(F)&&F!==!1}b.exports=P}),929:(function(b){function T(x){return x===void 0}b.exports=T}),479:(function(b){b.exports=t}),481:(function(b){b.exports=n}),43:(function(b){b.exports=i}),814:(function(b){b.exports=a}),311:(function(b){b.exports=o})},l={};function f(b){var T=l[b];if(T!==void 0)return T.exports;var x=l[b]={exports:{}};return s[b].call(x.exports,x,x.exports,f),x.exports}(function(){f.n=function(b){var T=b&&b.__esModule?function(){return b.default}:function(){return b};return f.d(T,{a:T}),T}})(),(function(){f.d=function(b,T){for(var x in T)f.o(T,x)&&!f.o(b,x)&&Object.defineProperty(b,x,{enumerable:!0,get:T[x]})}})(),(function(){f.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})()})(),(function(){f.o=function(b,T){return Object.prototype.hasOwnProperty.call(b,T)}})();var p={};return(function(){f.d(p,{default:function(){return GZ}});var b=function(){return b=Object.assign||function(d){for(var y,S=1,L=arguments.length;S<L;S++){y=arguments[S];for(var V in y)Object.prototype.hasOwnProperty.call(y,V)&&(d[V]=y[V])}return d},b.apply(this,arguments)};function T(h,d,y){if(arguments.length===2)for(var S=0,L=d.length,V;S<L;S++)(V||!(S in d))&&(V||(V=Array.prototype.slice.call(d,0,S)),V[S]=d[S]);return h.concat(V||Array.prototype.slice.call(d))}/*! *****************************************************************************
|
|
688
|
-
Copyright (c) Microsoft Corporation.
|
|
689
|
-
|
|
690
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
691
|
-
purpose with or without fee is hereby granted.
|
|
692
|
-
|
|
693
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
694
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
695
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
696
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
697
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
698
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
699
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
700
|
-
***************************************************************************** */var x=function(h,d){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,S){y.__proto__=S}||function(y,S){for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(y[L]=S[L])},x(h,d)};function E(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");x(h,d);function y(){this.constructor=h}h.prototype=d===null?Object.create(d):(y.prototype=d.prototype,new y)}var P=function(){return P=Object.assign||function(d){for(var y,S=1,L=arguments.length;S<L;S++){y=arguments[S];for(var V in y)Object.prototype.hasOwnProperty.call(y,V)&&(d[V]=y[V])}return d},P.apply(this,arguments)};function F(h,d,y){if(arguments.length===2)for(var S=0,L=d.length,V;S<L;S++)(V||!(S in d))&&(V||(V=Array.prototype.slice.call(d,0,S)),V[S]=d[S]);return h.concat(V||Array.prototype.slice.call(d))}var z=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof f.g<"u"?f.g:typeof self<"u"?self:{},Y={};function ee(h){var d,y,S=Y[h];if(S)return S;for(S=Y[h]=[],d=0;d<128;d++)y=String.fromCharCode(d),/^[0-9a-z]$/i.test(y)?S.push(y):S.push("%"+("0"+d.toString(16).toUpperCase()).slice(-2));for(d=0;d<h.length;d++)S[h.charCodeAt(d)]=h[d];return S}function se(h,d,y){var S,L,V,G,te,Se="";for(typeof d!="string"&&(y=d,d=se.defaultChars),typeof y>"u"&&(y=!0),te=ee(d),S=0,L=h.length;S<L;S++){if(V=h.charCodeAt(S),y&&V===37&&S+2<L&&/^[0-9a-f]{2}$/i.test(h.slice(S+1,S+3))){Se+=h.slice(S,S+3),S+=2;continue}if(V<128){Se+=te[V];continue}if(V>=55296&&V<=57343){if(V>=55296&&V<=56319&&S+1<L&&(G=h.charCodeAt(S+1),G>=56320&&G<=57343)){Se+=encodeURIComponent(h[S]+h[S+1]),S++;continue}Se+="%EF%BF%BD";continue}Se+=encodeURIComponent(h[S])}return Se}se.defaultChars=";/?:@&=+$,-_.!~*'()#",se.componentChars="-_.!~*'()";var de=se,oe={},le={},ge="Á",xe="á",Ie="Ă",ot="ă",Fe="∾",bt="∿",ct="∾̳",mt="Â",nt="â",Et="´",It="А",Ut="а",Ye="Æ",dt="æ",st="",St="𝔄",Mt="𝔞",nr="À",$t="à",Qt="ℵ",be="ℵ",ve="Α",ie="α",ae="Ā",Z="ā",ke="⨿",Ee="&",ze="&",Xe="⩕",kt="⩓",lt="∧",Ht="⩜",At="⩘",jt="⩚",Ot="∠",hr="⦤",Sn="∠",Qr="⦨",ir="⦩",_e="⦪",Ue="⦫",at="⦬",ut="⦭",Ct="⦮",gr="⦯",_t="∡",Wt="∟",qr="⊾",pn="⦝",ar="∢",Hr="Å",xn="⍼",vn="Ą",en="ą",Gr="𝔸",_r="𝕒",or="⩯",tn="≈",zt="⩰",pr="≊",W="≋",$="'",R="",D="≈",B="≊",H="Å",K="å",he="𝒜",Ce="𝒶",re="≔",J="*",me="≈",Te="≍",He="Ã",Ze="ã",I="Ä",M="ä",g="∳",w="⨑",N="≌",_="϶",j="‵",X="∽",ce="⋍",pe="∖",Ne="⫧",Oe="⊽",Be="⌅",et="⌆",wt="⌅",Vt="⎵",rn="⎶",zn="≌",Zn="Б",to="б",ha="„",pi="∵",En="∵",Mn="∵",pa="⦰",nn="϶",va="ℬ",_i="ℬ",zi="Β",Vi="β",ma="ℶ",An="≬",vi="𝔅",Ui="𝔟",On="⋂",ro="◯",no="⋃",Qn="⨀",Nn="⨁",Dn="⨂",$i="⨆",mi="★",ei="▽",mn="△",ga="⨄",Qo="⋁",an="⋀",io="⤍",ao="⧫",Wi="▪",oo="▴",ti="▾",on="◂",ya="▸",so="␣",lo="▒",es="░",Qe="▓",fe="█",Re="=⃥",Ke="≡⃥",Nt="⫭",sr="⌐",lr="𝔹",er="𝕓",sn="⊥",ri="⊥",ba="⋈",uo="⧉",co="┐",tc="╕",rc="╖",nc="╗",ic="┌",Ar="╒",Or="╓",ac="╔",oc="─",sc="═",ni="┬",lc="╤",ts="╥",rs="╦",uc="┴",cc="╧",fo="╨",fc="╩",ns="⊟",ji="⊞",dc="⊠",hc="┘",pc="╛",vc="╜",mc="╝",gc="└",is="╘",js="╙",yc="╚",Gs="│",bc="║",kc="┼",Ks="╪",Js="╫",wc="╬",Cc="┤",ka="╡",Tc="╢",wa="╣",Sc="├",xc="╞",Ca="╟",Ys="╠",Xs="‵",Ec="˘",Zs="˘",Mc="¦",Qs="𝒷",Ta="ℬ",el="⁏",Sa="∽",Ac="⋍",gi="⧅",Gi="\\",yi="⟈",gn="•",Cr="•",tl="≎",Oc="⪮",rl="≏",Nc="≎",nl="≏",il="Ć",ho="ć",bi="⩄",as="⩉",al="⩋",ss="∩",Dc="⋒",Lc="⩇",Rc="⩀",Ic="ⅅ",ol="∩︀",sl="⁁",Pc="ˇ",ll="ℭ",Bc="⩍",Fc="Č",qc="č",Hc="Ç",_c="ç",zc="Ĉ",Vc="ĉ",ul="∰",Uc="⩌",$c="⩐",ls="Ċ",Wc="ċ",cl="¸",jc="¸",Gc="⦲",fl="¢",dl="·",hl="·",pl="𝔠",Kc="ℭ",vl="Ч",Jc="ч",ml="✓",u="✓",v="Χ",c="χ",m="ˆ",k="≗",C="↺",A="↻",O="⊛",q="⊚",U="⊝",Q="⊙",ue="®",ne="Ⓢ",ye="⊖",Me="⊕",Pe="⊗",je="○",Le="⧃",gt="≗",vt="⨐",it="⫯",ht="⧂",Pt="∲",qt="”",Kt="’",tr="♣",rr="♣",Ln=":",po="∷",Vn="⩴",ki="≔",wi="≔",xa=",",Jt="@",us="∁",Rn="∘",Nr="∁",gl="ℂ",yl="≅",w0="⩭",C0="≡",T0="∮",S0="∯",x0="∮",E0="𝕔",M0="ℂ",A0="∐",O0="∐",N0="©",D0="©",L0="℗",R0="∳",I0="↵",P0="✗",B0="⨯",F0="𝒞",q0="𝒸",H0="⫏",_0="⫑",z0="⫐",V0="⫒",U0="⋯",$0="⤸",W0="⤵",j0="⋞",G0="⋟",K0="↶",J0="⤽",Y0="⩈",X0="⩆",Z0="≍",Q0="∪",eC="⋓",tC="⩊",rC="⊍",nC="⩅",iC="∪︀",aC="↷",oC="⤼",sC="⋞",lC="⋟",uC="⋎",cC="⋏",fC="¤",dC="↶",hC="↷",pC="⋎",vC="⋏",mC="∲",gC="∱",yC="⌭",bC="†",kC="‡",wC="ℸ",CC="↓",TC="↡",SC="⇓",xC="‐",EC="⫤",MC="⊣",AC="⤏",OC="˝",NC="Ď",DC="ď",LC="Д",RC="д",IC="‡",PC="⇊",BC="ⅅ",FC="ⅆ",qC="⤑",HC="⩷",_C="°",zC="∇",VC="Δ",UC="δ",$C="⦱",WC="⥿",jC="𝔇",GC="𝔡",KC="⥥",JC="⇃",YC="⇂",XC="´",ZC="˙",QC="˝",eT="`",tT="˜",rT="⋄",nT="⋄",iT="⋄",aT="♦",oT="♦",sT="¨",lT="ⅆ",uT="ϝ",cT="⋲",fT="÷",dT="÷",hT="⋇",pT="⋇",vT="Ђ",mT="ђ",gT="⌞",yT="⌍",bT="$",kT="𝔻",wT="𝕕",CT="¨",TT="˙",ST="⃜",xT="≐",ET="≑",MT="≐",AT="∸",OT="∔",NT="⊡",DT="⌆",LT="∯",RT="¨",IT="⇓",PT="⇐",BT="⇔",FT="⫤",qT="⟸",HT="⟺",_T="⟹",zT="⇒",VT="⊨",UT="⇑",$T="⇕",WT="∥",jT="⤓",GT="↓",KT="↓",JT="⇓",YT="⇵",XT="̑",ZT="⇊",QT="⇃",e1="⇂",t1="⥐",r1="⥞",n1="⥖",i1="↽",a1="⥟",o1="⥗",s1="⇁",l1="↧",u1="⊤",c1="⤐",f1="⌟",d1="⌌",h1="𝒟",p1="𝒹",v1="Ѕ",m1="ѕ",g1="⧶",y1="Đ",b1="đ",k1="⋱",w1="▿",C1="▾",T1="⇵",S1="⥯",x1="⦦",E1="Џ",M1="џ",A1="⟿",O1="É",N1="é",D1="⩮",L1="Ě",R1="ě",I1="Ê",P1="ê",B1="≖",F1="≕",q1="Э",H1="э",_1="⩷",z1="Ė",V1="ė",U1="≑",$1="ⅇ",W1="≒",j1="𝔈",G1="𝔢",K1="⪚",J1="È",Y1="è",X1="⪖",Z1="⪘",Q1="⪙",eS="∈",tS="⏧",rS="ℓ",nS="⪕",iS="⪗",aS="Ē",oS="ē",sS="∅",lS="∅",uS="◻",cS="∅",fS="▫",dS=" ",hS=" ",pS=" ",vS="Ŋ",mS="ŋ",gS=" ",yS="Ę",bS="ę",kS="𝔼",wS="𝕖",CS="⋕",TS="⧣",SS="⩱",xS="ε",ES="Ε",MS="ε",AS="ϵ",OS="≖",NS="≕",DS="≂",LS="⪖",RS="⪕",IS="⩵",PS="=",BS="≂",FS="≟",qS="⇌",HS="≡",_S="⩸",zS="⧥",VS="⥱",US="≓",$S="ℯ",WS="ℰ",jS="≐",GS="⩳",KS="≂",JS="Η",YS="η",XS="Ð",ZS="ð",QS="Ë",ex="ë",tx="€",rx="!",nx="∃",ix="∃",ax="ℰ",ox="ⅇ",sx="ⅇ",lx="≒",ux="Ф",cx="ф",fx="♀",dx="ffi",hx="ff",px="ffl",vx="𝔉",mx="𝔣",gx="fi",yx="◼",bx="▪",kx="fj",wx="♭",Cx="fl",Tx="▱",Sx="ƒ",xx="𝔽",Ex="𝕗",Mx="∀",Ax="∀",Ox="⋔",Nx="⫙",Dx="ℱ",Lx="⨍",Rx="½",Ix="⅓",Px="¼",Bx="⅕",Fx="⅙",qx="⅛",Hx="⅔",_x="⅖",zx="¾",Vx="⅗",Ux="⅜",$x="⅘",Wx="⅚",jx="⅝",Gx="⅞",Kx="⁄",Jx="⌢",Yx="𝒻",Xx="ℱ",Zx="ǵ",Qx="Γ",eE="γ",tE="Ϝ",rE="ϝ",nE="⪆",iE="Ğ",aE="ğ",oE="Ģ",sE="Ĝ",lE="ĝ",uE="Г",cE="г",fE="Ġ",dE="ġ",hE="≥",pE="≧",vE="⪌",mE="⋛",gE="≥",yE="≧",bE="⩾",kE="⪩",wE="⩾",CE="⪀",TE="⪂",SE="⪄",xE="⋛︀",EE="⪔",ME="𝔊",AE="𝔤",OE="≫",NE="⋙",DE="⋙",LE="ℷ",RE="Ѓ",IE="ѓ",PE="⪥",BE="≷",FE="⪒",qE="⪤",HE="⪊",_E="⪊",zE="⪈",VE="≩",UE="⪈",$E="≩",WE="⋧",jE="𝔾",GE="𝕘",KE="`",JE="≥",YE="⋛",XE="≧",ZE="⪢",QE="≷",eM="⩾",tM="≳",rM="𝒢",nM="ℊ",iM="≳",aM="⪎",oM="⪐",sM="⪧",lM="⩺",uM=">",cM=">",fM="≫",dM="⋗",hM="⦕",pM="⩼",vM="⪆",mM="⥸",gM="⋗",yM="⋛",bM="⪌",kM="≷",wM="≳",CM="≩︀",TM="≩︀",SM="ˇ",xM=" ",EM="½",MM="ℋ",AM="Ъ",OM="ъ",NM="⥈",DM="↔",LM="⇔",RM="↭",IM="^",PM="ℏ",BM="Ĥ",FM="ĥ",qM="♥",HM="♥",_M="…",zM="⊹",VM="𝔥",UM="ℌ",$M="ℋ",WM="⤥",jM="⤦",GM="⇿",KM="∻",JM="↩",YM="↪",XM="𝕙",ZM="ℍ",QM="―",eA="─",tA="𝒽",rA="ℋ",nA="ℏ",iA="Ħ",aA="ħ",oA="≎",sA="≏",lA="⁃",uA="‐",cA="Í",fA="í",dA="",hA="Î",pA="î",vA="И",mA="и",gA="İ",yA="Е",bA="е",kA="¡",wA="⇔",CA="𝔦",TA="ℑ",SA="Ì",xA="ì",EA="ⅈ",MA="⨌",AA="∭",OA="⧜",NA="℩",DA="IJ",LA="ij",RA="Ī",IA="ī",PA="ℑ",BA="ⅈ",FA="ℐ",qA="ℑ",HA="ı",_A="ℑ",zA="⊷",VA="Ƶ",UA="⇒",$A="℅",WA="∞",jA="⧝",GA="ı",KA="⊺",JA="∫",YA="∬",XA="ℤ",ZA="∫",QA="⊺",eO="⋂",tO="⨗",rO="⨼",nO="",iO="",aO="Ё",oO="ё",sO="Į",lO="į",uO="𝕀",cO="𝕚",fO="Ι",dO="ι",hO="⨼",pO="¿",vO="𝒾",mO="ℐ",gO="∈",yO="⋵",bO="⋹",kO="⋴",wO="⋳",CO="∈",TO="",SO="Ĩ",xO="ĩ",EO="І",MO="і",AO="Ï",OO="ï",NO="Ĵ",DO="ĵ",LO="Й",RO="й",IO="𝔍",PO="𝔧",BO="ȷ",FO="𝕁",qO="𝕛",HO="𝒥",_O="𝒿",zO="Ј",VO="ј",UO="Є",$O="є",WO="Κ",jO="κ",GO="ϰ",KO="Ķ",JO="ķ",YO="К",XO="к",ZO="𝔎",QO="𝔨",eN="ĸ",tN="Х",rN="х",nN="Ќ",iN="ќ",aN="𝕂",oN="𝕜",sN="𝒦",lN="𝓀",uN="⇚",cN="Ĺ",fN="ĺ",dN="⦴",hN="ℒ",pN="Λ",vN="λ",mN="⟨",gN="⟪",yN="⦑",bN="⟨",kN="⪅",wN="ℒ",CN="«",TN="⇤",SN="⤟",xN="←",EN="↞",MN="⇐",AN="⤝",ON="↩",NN="↫",DN="⤹",LN="⥳",RN="↢",IN="⤙",PN="⤛",BN="⪫",FN="⪭",qN="⪭︀",HN="⤌",_N="⤎",zN="❲",VN="{",UN="[",$N="⦋",WN="⦏",jN="⦍",GN="Ľ",KN="ľ",JN="Ļ",YN="ļ",XN="⌈",ZN="{",QN="Л",eD="л",tD="⤶",rD="“",nD="„",iD="⥧",aD="⥋",oD="↲",sD="≤",lD="≦",uD="⟨",cD="⇤",fD="←",dD="←",hD="⇐",pD="⇆",vD="↢",mD="⌈",gD="⟦",yD="⥡",bD="⥙",kD="⇃",wD="⌊",CD="↽",TD="↼",SD="⇇",xD="↔",ED="↔",MD="⇔",AD="⇆",OD="⇋",ND="↭",DD="⥎",LD="↤",RD="⊣",ID="⥚",PD="⋋",BD="⧏",FD="⊲",qD="⊴",HD="⥑",_D="⥠",zD="⥘",VD="↿",UD="⥒",$D="↼",WD="⪋",jD="⋚",GD="≤",KD="≦",JD="⩽",YD="⪨",XD="⩽",ZD="⩿",QD="⪁",eL="⪃",tL="⋚︀",rL="⪓",nL="⪅",iL="⋖",aL="⋚",oL="⪋",sL="⋚",lL="≦",uL="≶",cL="≶",fL="⪡",dL="≲",hL="⩽",pL="≲",vL="⥼",mL="⌊",gL="𝔏",yL="𝔩",bL="≶",kL="⪑",wL="⥢",CL="↽",TL="↼",SL="⥪",xL="▄",EL="Љ",ML="љ",AL="⇇",OL="≪",NL="⋘",DL="⌞",LL="⇚",RL="⥫",IL="◺",PL="Ŀ",BL="ŀ",FL="⎰",qL="⎰",HL="⪉",_L="⪉",zL="⪇",VL="≨",UL="⪇",$L="≨",WL="⋦",jL="⟬",GL="⇽",KL="⟦",JL="⟵",YL="⟵",XL="⟸",ZL="⟷",QL="⟷",eR="⟺",tR="⟼",rR="⟶",nR="⟶",iR="⟹",aR="↫",oR="↬",sR="⦅",lR="𝕃",uR="𝕝",cR="⨭",fR="⨴",dR="∗",hR="_",pR="↙",vR="↘",mR="◊",gR="◊",yR="⧫",bR="(",kR="⦓",wR="⇆",CR="⌟",TR="⇋",SR="⥭",xR="",ER="⊿",MR="‹",AR="𝓁",OR="ℒ",NR="↰",DR="↰",LR="≲",RR="⪍",IR="⪏",PR="[",BR="‘",FR="‚",qR="Ł",HR="ł",_R="⪦",zR="⩹",VR="<",UR="<",$R="≪",WR="⋖",jR="⋋",GR="⋉",KR="⥶",JR="⩻",YR="◃",XR="⊴",ZR="◂",QR="⦖",eI="⥊",tI="⥦",rI="≨︀",nI="≨︀",iI="¯",aI="♂",oI="✠",sI="✠",lI="↦",uI="↦",cI="↧",fI="↤",dI="↥",hI="▮",pI="⨩",vI="М",mI="м",gI="—",yI="∺",bI="∡",kI=" ",wI="ℳ",CI="𝔐",TI="𝔪",SI="℧",xI="µ",EI="*",MI="⫰",AI="∣",OI="·",NI="⊟",DI="−",LI="∸",RI="⨪",II="∓",PI="⫛",BI="…",FI="∓",qI="⊧",HI="𝕄",_I="𝕞",zI="∓",VI="𝓂",UI="ℳ",$I="∾",WI="Μ",jI="μ",GI="⊸",KI="⊸",JI="∇",YI="Ń",XI="ń",ZI="∠⃒",QI="≉",eP="⩰̸",tP="≋̸",rP="ʼn",nP="≉",iP="♮",aP="ℕ",oP="♮",sP=" ",lP="≎̸",uP="≏̸",cP="⩃",fP="Ň",dP="ň",hP="Ņ",pP="ņ",vP="≇",mP="⩭̸",gP="⩂",yP="Н",bP="н",kP="–",wP="⤤",CP="↗",TP="⇗",SP="↗",xP="≠",EP="≐̸",MP="",AP="",OP="",NP="",DP="≢",LP="⤨",RP="≂̸",IP="≫",PP="≪",BP=`
|
|
701
|
-
`,FP="∄",qP="∄",HP="𝔑",_P="𝔫",zP="≧̸",VP="≱",UP="≱",$P="≧̸",WP="⩾̸",jP="⩾̸",GP="⋙̸",KP="≵",JP="≫⃒",YP="≯",XP="≯",ZP="≫̸",QP="↮",eB="⇎",tB="⫲",rB="∋",nB="⋼",iB="⋺",aB="∋",oB="Њ",sB="њ",lB="↚",uB="⇍",cB="‥",fB="≦̸",dB="≰",hB="↚",pB="⇍",vB="↮",mB="⇎",gB="≰",yB="≦̸",bB="⩽̸",kB="⩽̸",wB="≮",CB="⋘̸",TB="≴",SB="≪⃒",xB="≮",EB="⋪",MB="⋬",AB="≪̸",OB="∤",NB="",DB=" ",LB="𝕟",RB="ℕ",IB="⫬",PB="¬",BB="≢",FB="≭",qB="∦",HB="∉",_B="≠",zB="≂̸",VB="∄",UB="≯",$B="≱",WB="≧̸",jB="≫̸",GB="≹",KB="⩾̸",JB="≵",YB="≎̸",XB="≏̸",ZB="∉",QB="⋵̸",eF="⋹̸",tF="∉",rF="⋷",nF="⋶",iF="⧏̸",aF="⋪",oF="⋬",sF="≮",lF="≰",uF="≸",cF="≪̸",fF="⩽̸",dF="≴",hF="⪢̸",pF="⪡̸",vF="∌",mF="∌",gF="⋾",yF="⋽",bF="⊀",kF="⪯̸",wF="⋠",CF="∌",TF="⧐̸",SF="⋫",xF="⋭",EF="⊏̸",MF="⋢",AF="⊐̸",OF="⋣",NF="⊂⃒",DF="⊈",LF="⊁",RF="⪰̸",IF="⋡",PF="≿̸",BF="⊃⃒",FF="⊉",qF="≁",HF="≄",_F="≇",zF="≉",VF="∤",UF="∦",$F="∦",WF="⫽⃥",jF="∂̸",GF="⨔",KF="⊀",JF="⋠",YF="⊀",XF="⪯̸",ZF="⪯̸",QF="⤳̸",eq="↛",tq="⇏",rq="↝̸",nq="↛",iq="⇏",aq="⋫",oq="⋭",sq="⊁",lq="⋡",uq="⪰̸",cq="𝒩",fq="𝓃",dq="∤",hq="∦",pq="≁",vq="≄",mq="≄",gq="∤",yq="∦",bq="⋢",kq="⋣",wq="⊄",Cq="⫅̸",Tq="⊈",Sq="⊂⃒",xq="⊈",Eq="⫅̸",Mq="⊁",Aq="⪰̸",Oq="⊅",Nq="⫆̸",Dq="⊉",Lq="⊃⃒",Rq="⊉",Iq="⫆̸",Pq="≹",Bq="Ñ",Fq="ñ",qq="≸",Hq="⋪",_q="⋬",zq="⋫",Vq="⋭",Uq="Ν",$q="ν",Wq="#",jq="№",Gq=" ",Kq="≍⃒",Jq="⊬",Yq="⊭",Xq="⊮",Zq="⊯",Qq="≥⃒",eH=">⃒",tH="⤄",rH="⧞",nH="⤂",iH="≤⃒",aH="<⃒",oH="⊴⃒",sH="⤃",lH="⊵⃒",uH="∼⃒",cH="⤣",fH="↖",dH="⇖",hH="↖",pH="⤧",vH="Ó",mH="ó",gH="⊛",yH="Ô",bH="ô",kH="⊚",wH="О",CH="о",TH="⊝",SH="Ő",xH="ő",EH="⨸",MH="⊙",AH="⦼",OH="Œ",NH="œ",DH="⦿",LH="𝔒",RH="𝔬",IH="˛",PH="Ò",BH="ò",FH="⧁",qH="⦵",HH="Ω",_H="∮",zH="↺",VH="⦾",UH="⦻",$H="‾",WH="⧀",jH="Ō",GH="ō",KH="Ω",JH="ω",YH="Ο",XH="ο",ZH="⦶",QH="⊖",e_="𝕆",t_="𝕠",r_="⦷",n_="“",i_="‘",a_="⦹",o_="⊕",s_="↻",l_="⩔",u_="∨",c_="⩝",f_="ℴ",d_="ℴ",h_="ª",p_="º",v_="⊶",m_="⩖",g_="⩗",y_="⩛",b_="Ⓢ",k_="𝒪",w_="ℴ",C_="Ø",T_="ø",S_="⊘",x_="Õ",E_="õ",M_="⨶",A_="⨷",O_="⊗",N_="Ö",D_="ö",L_="⌽",R_="‾",I_="⏞",P_="⎴",B_="⏜",F_="¶",q_="∥",H_="∥",__="⫳",z_="⫽",V_="∂",U_="∂",$_="П",W_="п",j_="%",G_=".",K_="‰",J_="⊥",Y_="‱",X_="𝔓",Z_="𝔭",Q_="Φ",ez="φ",tz="ϕ",rz="ℳ",nz="☎",iz="Π",az="π",oz="⋔",sz="ϖ",lz="ℏ",uz="ℎ",cz="ℏ",fz="⨣",dz="⊞",hz="⨢",pz="+",vz="∔",mz="⨥",gz="⩲",yz="±",bz="±",kz="⨦",wz="⨧",Cz="±",Tz="ℌ",Sz="⨕",xz="𝕡",Ez="ℙ",Mz="£",Az="⪷",Oz="⪻",Nz="≺",Dz="≼",Lz="⪷",Rz="≺",Iz="≼",Pz="≺",Bz="⪯",Fz="≼",qz="≾",Hz="⪯",_z="⪹",zz="⪵",Vz="⋨",Uz="⪯",$z="⪳",Wz="≾",jz="′",Gz="″",Kz="ℙ",Jz="⪹",Yz="⪵",Xz="⋨",Zz="∏",Qz="∏",eV="⌮",tV="⌒",rV="⌓",nV="∝",iV="∝",aV="∷",oV="∝",sV="≾",lV="⊰",uV="𝒫",cV="𝓅",fV="Ψ",dV="ψ",hV=" ",pV="𝔔",vV="𝔮",mV="⨌",gV="𝕢",yV="ℚ",bV="⁗",kV="𝒬",wV="𝓆",CV="ℍ",TV="⨖",SV="?",xV="≟",EV='"',MV='"',AV="⇛",OV="∽̱",NV="Ŕ",DV="ŕ",LV="√",RV="⦳",IV="⟩",PV="⟫",BV="⦒",FV="⦥",qV="⟩",HV="»",_V="⥵",zV="⇥",VV="⤠",UV="⤳",$V="→",WV="↠",jV="⇒",GV="⤞",KV="↪",JV="↬",YV="⥅",XV="⥴",ZV="⤖",QV="↣",eU="↝",tU="⤚",rU="⤜",nU="∶",iU="ℚ",aU="⤍",oU="⤏",sU="⤐",lU="❳",uU="}",cU="]",fU="⦌",dU="⦎",hU="⦐",pU="Ř",vU="ř",mU="Ŗ",gU="ŗ",yU="⌉",bU="}",kU="Р",wU="р",CU="⤷",TU="⥩",SU="”",xU="”",EU="↳",MU="ℜ",AU="ℛ",OU="ℜ",NU="ℝ",DU="ℜ",LU="▭",RU="®",IU="®",PU="∋",BU="⇋",FU="⥯",qU="⥽",HU="⌋",_U="𝔯",zU="ℜ",VU="⥤",UU="⇁",$U="⇀",WU="⥬",jU="Ρ",GU="ρ",KU="ϱ",JU="⟩",YU="⇥",XU="→",ZU="→",QU="⇒",e2="⇄",t2="↣",r2="⌉",n2="⟧",i2="⥝",a2="⥕",o2="⇂",s2="⌋",l2="⇁",u2="⇀",c2="⇄",f2="⇌",d2="⇉",h2="↝",p2="↦",v2="⊢",m2="⥛",g2="⋌",y2="⧐",b2="⊳",k2="⊵",w2="⥏",C2="⥜",T2="⥔",S2="↾",x2="⥓",E2="⇀",M2="˚",A2="≓",O2="⇄",N2="⇌",D2="",L2="⎱",R2="⎱",I2="⫮",P2="⟭",B2="⇾",F2="⟧",q2="⦆",H2="𝕣",_2="ℝ",z2="⨮",V2="⨵",U2="⥰",$2=")",W2="⦔",j2="⨒",G2="⇉",K2="⇛",J2="›",Y2="𝓇",X2="ℛ",Z2="↱",Q2="↱",e$="]",t$="’",r$="’",n$="⋌",i$="⋊",a$="▹",o$="⊵",s$="▸",l$="⧎",u$="⧴",c$="⥨",f$="℞",d$="Ś",h$="ś",p$="‚",v$="⪸",m$="Š",g$="š",y$="⪼",b$="≻",k$="≽",w$="⪰",C$="⪴",T$="Ş",S$="ş",x$="Ŝ",E$="ŝ",M$="⪺",A$="⪶",O$="⋩",N$="⨓",D$="≿",L$="С",R$="с",I$="⊡",P$="⋅",B$="⩦",F$="⤥",q$="↘",H$="⇘",_$="↘",z$="§",V$=";",U$="⤩",$$="∖",W$="∖",j$="✶",G$="𝔖",K$="𝔰",J$="⌢",Y$="♯",X$="Щ",Z$="щ",Q$="Ш",eW="ш",tW="↓",rW="←",nW="∣",iW="∥",aW="→",oW="↑",sW="",lW="Σ",uW="σ",cW="ς",fW="ς",dW="∼",hW="⩪",pW="≃",vW="≃",mW="⪞",gW="⪠",yW="⪝",bW="⪟",kW="≆",wW="⨤",CW="⥲",TW="←",SW="∘",xW="∖",EW="⨳",MW="⧤",AW="∣",OW="⌣",NW="⪪",DW="⪬",LW="⪬︀",RW="Ь",IW="ь",PW="⌿",BW="⧄",FW="/",qW="𝕊",HW="𝕤",_W="♠",zW="♠",VW="∥",UW="⊓",$W="⊓︀",WW="⊔",jW="⊔︀",GW="√",KW="⊏",JW="⊑",YW="⊏",XW="⊑",ZW="⊐",QW="⊒",e3="⊐",t3="⊒",r3="□",n3="□",i3="⊓",a3="⊏",o3="⊑",s3="⊐",l3="⊒",u3="⊔",c3="▪",f3="□",d3="▪",h3="→",p3="𝒮",v3="𝓈",m3="∖",g3="⌣",y3="⋆",b3="⋆",k3="☆",w3="★",C3="ϵ",T3="ϕ",S3="¯",x3="⊂",E3="⋐",M3="⪽",A3="⫅",O3="⊆",N3="⫃",D3="⫁",L3="⫋",R3="⊊",I3="⪿",P3="⥹",B3="⊂",F3="⋐",q3="⊆",H3="⫅",_3="⊆",z3="⊊",V3="⫋",U3="⫇",$3="⫕",W3="⫓",j3="⪸",G3="≻",K3="≽",J3="≻",Y3="⪰",X3="≽",Z3="≿",Q3="⪰",ej="⪺",tj="⪶",rj="⋩",nj="≿",ij="∋",aj="∑",oj="∑",sj="♪",lj="¹",uj="²",cj="³",fj="⊃",dj="⋑",hj="⪾",pj="⫘",vj="⫆",mj="⊇",gj="⫄",yj="⊃",bj="⊇",kj="⟉",wj="⫗",Cj="⥻",Tj="⫂",Sj="⫌",xj="⊋",Ej="⫀",Mj="⊃",Aj="⋑",Oj="⊇",Nj="⫆",Dj="⊋",Lj="⫌",Rj="⫈",Ij="⫔",Pj="⫖",Bj="⤦",Fj="↙",qj="⇙",Hj="↙",_j="⤪",zj="ß",Vj=" ",Uj="⌖",$j="Τ",Wj="τ",jj="⎴",Gj="Ť",Kj="ť",Jj="Ţ",Yj="ţ",Xj="Т",Zj="т",Qj="⃛",eG="⌕",tG="𝔗",rG="𝔱",nG="∴",iG="∴",aG="∴",oG="Θ",sG="θ",lG="ϑ",uG="ϑ",cG="≈",fG="∼",dG=" ",hG=" ",pG=" ",vG="≈",mG="∼",gG="Þ",yG="þ",bG="˜",kG="∼",wG="≃",CG="≅",TG="≈",SG="⨱",xG="⊠",EG="×",MG="⨰",AG="∭",OG="⤨",NG="⌶",DG="⫱",LG="⊤",RG="𝕋",IG="𝕥",PG="⫚",BG="⤩",FG="‴",qG="™",HG="™",_G="▵",zG="▿",VG="◃",UG="⊴",$G="≜",WG="▹",jG="⊵",GG="◬",KG="≜",JG="⨺",YG="⃛",XG="⨹",ZG="⧍",QG="⨻",eK="⏢",tK="𝒯",rK="𝓉",nK="Ц",iK="ц",aK="Ћ",oK="ћ",sK="Ŧ",lK="ŧ",uK="≬",cK="↞",fK="↠",dK="Ú",hK="ú",pK="↑",vK="↟",mK="⇑",gK="⥉",yK="Ў",bK="ў",kK="Ŭ",wK="ŭ",CK="Û",TK="û",SK="У",xK="у",EK="⇅",MK="Ű",AK="ű",OK="⥮",NK="⥾",DK="𝔘",LK="𝔲",RK="Ù",IK="ù",PK="⥣",BK="↿",FK="↾",qK="▀",HK="⌜",_K="⌜",zK="⌏",VK="◸",UK="Ū",$K="ū",WK="¨",jK="_",GK="⏟",KK="⎵",JK="⏝",YK="⋃",XK="⊎",ZK="Ų",QK="ų",e4="𝕌",t4="𝕦",r4="⤒",n4="↑",i4="↑",a4="⇑",o4="⇅",s4="↕",l4="↕",u4="⇕",c4="⥮",f4="↿",d4="↾",h4="⊎",p4="↖",v4="↗",m4="υ",g4="ϒ",y4="ϒ",b4="Υ",k4="υ",w4="↥",C4="⊥",T4="⇈",S4="⌝",x4="⌝",E4="⌎",M4="Ů",A4="ů",O4="◹",N4="𝒰",D4="𝓊",L4="⋰",R4="Ũ",I4="ũ",P4="▵",B4="▴",F4="⇈",q4="Ü",H4="ü",_4="⦧",z4="⦜",V4="ϵ",U4="ϰ",$4="∅",W4="ϕ",j4="ϖ",G4="∝",K4="↕",J4="⇕",Y4="ϱ",X4="ς",Z4="⊊︀",Q4="⫋︀",e8="⊋︀",t8="⫌︀",r8="ϑ",n8="⊲",i8="⊳",a8="⫨",o8="⫫",s8="⫩",l8="В",u8="в",c8="⊢",f8="⊨",d8="⊩",h8="⊫",p8="⫦",v8="⊻",m8="∨",g8="⋁",y8="≚",b8="⋮",k8="|",w8="‖",C8="|",T8="‖",S8="∣",x8="|",E8="❘",M8="≀",A8=" ",O8="𝔙",N8="𝔳",D8="⊲",L8="⊂⃒",R8="⊃⃒",I8="𝕍",P8="𝕧",B8="∝",F8="⊳",q8="𝒱",H8="𝓋",_8="⫋︀",z8="⊊︀",V8="⫌︀",U8="⊋︀",$8="⊪",W8="⦚",j8="Ŵ",G8="ŵ",K8="⩟",J8="∧",Y8="⋀",X8="≙",Z8="℘",Q8="𝔚",e5="𝔴",t5="𝕎",r5="𝕨",n5="℘",i5="≀",a5="≀",o5="𝒲",s5="𝓌",l5="⋂",u5="◯",c5="⋃",f5="▽",d5="𝔛",h5="𝔵",p5="⟷",v5="⟺",m5="Ξ",g5="ξ",y5="⟵",b5="⟸",k5="⟼",w5="⋻",C5="⨀",T5="𝕏",S5="𝕩",x5="⨁",E5="⨂",M5="⟶",A5="⟹",O5="𝒳",N5="𝓍",D5="⨆",L5="⨄",R5="△",I5="⋁",P5="⋀",B5="Ý",F5="ý",q5="Я",H5="я",_5="Ŷ",z5="ŷ",V5="Ы",U5="ы",$5="¥",W5="𝔜",j5="𝔶",G5="Ї",K5="ї",J5="𝕐",Y5="𝕪",X5="𝒴",Z5="𝓎",Q5="Ю",eJ="ю",tJ="ÿ",rJ="Ÿ",nJ="Ź",iJ="ź",aJ="Ž",oJ="ž",sJ="З",lJ="з",uJ="Ż",cJ="ż",fJ="ℨ",dJ="",hJ="Ζ",pJ="ζ",vJ="𝔷",mJ="ℨ",gJ="Ж",yJ="ж",bJ="⇝",kJ="𝕫",wJ="ℤ",CJ="𝒵",TJ="𝓏",SJ="",xJ="",tp={Aacute:ge,aacute:xe,Abreve:Ie,abreve:ot,ac:Fe,acd:bt,acE:ct,Acirc:mt,acirc:nt,acute:Et,Acy:It,acy:Ut,AElig:Ye,aelig:dt,af:st,Afr:St,afr:Mt,Agrave:nr,agrave:$t,alefsym:Qt,aleph:be,Alpha:ve,alpha:ie,Amacr:ae,amacr:Z,amalg:ke,amp:Ee,AMP:ze,andand:Xe,And:kt,and:lt,andd:Ht,andslope:At,andv:jt,ang:Ot,ange:hr,angle:Sn,angmsdaa:Qr,angmsdab:ir,angmsdac:_e,angmsdad:Ue,angmsdae:at,angmsdaf:ut,angmsdag:Ct,angmsdah:gr,angmsd:_t,angrt:Wt,angrtvb:qr,angrtvbd:pn,angsph:ar,angst:Hr,angzarr:xn,Aogon:vn,aogon:en,Aopf:Gr,aopf:_r,apacir:or,ap:tn,apE:zt,ape:pr,apid:W,apos:$,ApplyFunction:R,approx:D,approxeq:B,Aring:H,aring:K,Ascr:he,ascr:Ce,Assign:re,ast:J,asymp:me,asympeq:Te,Atilde:He,atilde:Ze,Auml:I,auml:M,awconint:g,awint:w,backcong:N,backepsilon:_,backprime:j,backsim:X,backsimeq:ce,Backslash:pe,Barv:Ne,barvee:Oe,barwed:Be,Barwed:et,barwedge:wt,bbrk:Vt,bbrktbrk:rn,bcong:zn,Bcy:Zn,bcy:to,bdquo:ha,becaus:pi,because:En,Because:Mn,bemptyv:pa,bepsi:nn,bernou:va,Bernoullis:_i,Beta:zi,beta:Vi,beth:ma,between:An,Bfr:vi,bfr:Ui,bigcap:On,bigcirc:ro,bigcup:no,bigodot:Qn,bigoplus:Nn,bigotimes:Dn,bigsqcup:$i,bigstar:mi,bigtriangledown:ei,bigtriangleup:mn,biguplus:ga,bigvee:Qo,bigwedge:an,bkarow:io,blacklozenge:ao,blacksquare:Wi,blacktriangle:oo,blacktriangledown:ti,blacktriangleleft:on,blacktriangleright:ya,blank:so,blk12:lo,blk14:es,blk34:Qe,block:fe,bne:Re,bnequiv:Ke,bNot:Nt,bnot:sr,Bopf:lr,bopf:er,bot:sn,bottom:ri,bowtie:ba,boxbox:uo,boxdl:co,boxdL:tc,boxDl:rc,boxDL:nc,boxdr:ic,boxdR:Ar,boxDr:Or,boxDR:ac,boxh:oc,boxH:sc,boxhd:ni,boxHd:lc,boxhD:ts,boxHD:rs,boxhu:uc,boxHu:cc,boxhU:fo,boxHU:fc,boxminus:ns,boxplus:ji,boxtimes:dc,boxul:hc,boxuL:pc,boxUl:vc,boxUL:mc,boxur:gc,boxuR:is,boxUr:js,boxUR:yc,boxv:Gs,boxV:bc,boxvh:kc,boxvH:Ks,boxVh:Js,boxVH:wc,boxvl:Cc,boxvL:ka,boxVl:Tc,boxVL:wa,boxvr:Sc,boxvR:xc,boxVr:Ca,boxVR:Ys,bprime:Xs,breve:Ec,Breve:Zs,brvbar:Mc,bscr:Qs,Bscr:Ta,bsemi:el,bsim:Sa,bsime:Ac,bsolb:gi,bsol:Gi,bsolhsub:yi,bull:gn,bullet:Cr,bump:tl,bumpE:Oc,bumpe:rl,Bumpeq:Nc,bumpeq:nl,Cacute:il,cacute:ho,capand:bi,capbrcup:as,capcap:al,cap:ss,Cap:Dc,capcup:Lc,capdot:Rc,CapitalDifferentialD:Ic,caps:ol,caret:sl,caron:Pc,Cayleys:ll,ccaps:Bc,Ccaron:Fc,ccaron:qc,Ccedil:Hc,ccedil:_c,Ccirc:zc,ccirc:Vc,Cconint:ul,ccups:Uc,ccupssm:$c,Cdot:ls,cdot:Wc,cedil:cl,Cedilla:jc,cemptyv:Gc,cent:fl,centerdot:dl,CenterDot:hl,cfr:pl,Cfr:Kc,CHcy:vl,chcy:Jc,check:ml,checkmark:u,Chi:v,chi:c,circ:m,circeq:k,circlearrowleft:C,circlearrowright:A,circledast:O,circledcirc:q,circleddash:U,CircleDot:Q,circledR:ue,circledS:ne,CircleMinus:ye,CirclePlus:Me,CircleTimes:Pe,cir:je,cirE:Le,cire:gt,cirfnint:vt,cirmid:it,cirscir:ht,ClockwiseContourIntegral:Pt,CloseCurlyDoubleQuote:qt,CloseCurlyQuote:Kt,clubs:tr,clubsuit:rr,colon:Ln,Colon:po,Colone:Vn,colone:ki,coloneq:wi,comma:xa,commat:Jt,comp:us,compfn:Rn,complement:Nr,complexes:gl,cong:yl,congdot:w0,Congruent:C0,conint:T0,Conint:S0,ContourIntegral:x0,copf:E0,Copf:M0,coprod:A0,Coproduct:O0,copy:N0,COPY:D0,copysr:L0,CounterClockwiseContourIntegral:R0,crarr:I0,cross:P0,Cross:B0,Cscr:F0,cscr:q0,csub:H0,csube:_0,csup:z0,csupe:V0,ctdot:U0,cudarrl:$0,cudarrr:W0,cuepr:j0,cuesc:G0,cularr:K0,cularrp:J0,cupbrcap:Y0,cupcap:X0,CupCap:Z0,cup:Q0,Cup:eC,cupcup:tC,cupdot:rC,cupor:nC,cups:iC,curarr:aC,curarrm:oC,curlyeqprec:sC,curlyeqsucc:lC,curlyvee:uC,curlywedge:cC,curren:fC,curvearrowleft:dC,curvearrowright:hC,cuvee:pC,cuwed:vC,cwconint:mC,cwint:gC,cylcty:yC,dagger:bC,Dagger:kC,daleth:wC,darr:CC,Darr:TC,dArr:SC,dash:xC,Dashv:EC,dashv:MC,dbkarow:AC,dblac:OC,Dcaron:NC,dcaron:DC,Dcy:LC,dcy:RC,ddagger:IC,ddarr:PC,DD:BC,dd:FC,DDotrahd:qC,ddotseq:HC,deg:_C,Del:zC,Delta:VC,delta:UC,demptyv:$C,dfisht:WC,Dfr:jC,dfr:GC,dHar:KC,dharl:JC,dharr:YC,DiacriticalAcute:XC,DiacriticalDot:ZC,DiacriticalDoubleAcute:QC,DiacriticalGrave:eT,DiacriticalTilde:tT,diam:rT,diamond:nT,Diamond:iT,diamondsuit:aT,diams:oT,die:sT,DifferentialD:lT,digamma:uT,disin:cT,div:fT,divide:dT,divideontimes:hT,divonx:pT,DJcy:vT,djcy:mT,dlcorn:gT,dlcrop:yT,dollar:bT,Dopf:kT,dopf:wT,Dot:CT,dot:TT,DotDot:ST,doteq:xT,doteqdot:ET,DotEqual:MT,dotminus:AT,dotplus:OT,dotsquare:NT,doublebarwedge:DT,DoubleContourIntegral:LT,DoubleDot:RT,DoubleDownArrow:IT,DoubleLeftArrow:PT,DoubleLeftRightArrow:BT,DoubleLeftTee:FT,DoubleLongLeftArrow:qT,DoubleLongLeftRightArrow:HT,DoubleLongRightArrow:_T,DoubleRightArrow:zT,DoubleRightTee:VT,DoubleUpArrow:UT,DoubleUpDownArrow:$T,DoubleVerticalBar:WT,DownArrowBar:jT,downarrow:GT,DownArrow:KT,Downarrow:JT,DownArrowUpArrow:YT,DownBreve:XT,downdownarrows:ZT,downharpoonleft:QT,downharpoonright:e1,DownLeftRightVector:t1,DownLeftTeeVector:r1,DownLeftVectorBar:n1,DownLeftVector:i1,DownRightTeeVector:a1,DownRightVectorBar:o1,DownRightVector:s1,DownTeeArrow:l1,DownTee:u1,drbkarow:c1,drcorn:f1,drcrop:d1,Dscr:h1,dscr:p1,DScy:v1,dscy:m1,dsol:g1,Dstrok:y1,dstrok:b1,dtdot:k1,dtri:w1,dtrif:C1,duarr:T1,duhar:S1,dwangle:x1,DZcy:E1,dzcy:M1,dzigrarr:A1,Eacute:O1,eacute:N1,easter:D1,Ecaron:L1,ecaron:R1,Ecirc:I1,ecirc:P1,ecir:B1,ecolon:F1,Ecy:q1,ecy:H1,eDDot:_1,Edot:z1,edot:V1,eDot:U1,ee:$1,efDot:W1,Efr:j1,efr:G1,eg:K1,Egrave:J1,egrave:Y1,egs:X1,egsdot:Z1,el:Q1,Element:eS,elinters:tS,ell:rS,els:nS,elsdot:iS,Emacr:aS,emacr:oS,empty:sS,emptyset:lS,EmptySmallSquare:uS,emptyv:cS,EmptyVerySmallSquare:fS,emsp13:dS,emsp14:hS,emsp:pS,ENG:vS,eng:mS,ensp:gS,Eogon:yS,eogon:bS,Eopf:kS,eopf:wS,epar:CS,eparsl:TS,eplus:SS,epsi:xS,Epsilon:ES,epsilon:MS,epsiv:AS,eqcirc:OS,eqcolon:NS,eqsim:DS,eqslantgtr:LS,eqslantless:RS,Equal:IS,equals:PS,EqualTilde:BS,equest:FS,Equilibrium:qS,equiv:HS,equivDD:_S,eqvparsl:zS,erarr:VS,erDot:US,escr:$S,Escr:WS,esdot:jS,Esim:GS,esim:KS,Eta:JS,eta:YS,ETH:XS,eth:ZS,Euml:QS,euml:ex,euro:tx,excl:rx,exist:nx,Exists:ix,expectation:ax,exponentiale:ox,ExponentialE:sx,fallingdotseq:lx,Fcy:ux,fcy:cx,female:fx,ffilig:dx,fflig:hx,ffllig:px,Ffr:vx,ffr:mx,filig:gx,FilledSmallSquare:yx,FilledVerySmallSquare:bx,fjlig:kx,flat:wx,fllig:Cx,fltns:Tx,fnof:Sx,Fopf:xx,fopf:Ex,forall:Mx,ForAll:Ax,fork:Ox,forkv:Nx,Fouriertrf:Dx,fpartint:Lx,frac12:Rx,frac13:Ix,frac14:Px,frac15:Bx,frac16:Fx,frac18:qx,frac23:Hx,frac25:_x,frac34:zx,frac35:Vx,frac38:Ux,frac45:$x,frac56:Wx,frac58:jx,frac78:Gx,frasl:Kx,frown:Jx,fscr:Yx,Fscr:Xx,gacute:Zx,Gamma:Qx,gamma:eE,Gammad:tE,gammad:rE,gap:nE,Gbreve:iE,gbreve:aE,Gcedil:oE,Gcirc:sE,gcirc:lE,Gcy:uE,gcy:cE,Gdot:fE,gdot:dE,ge:hE,gE:pE,gEl:vE,gel:mE,geq:gE,geqq:yE,geqslant:bE,gescc:kE,ges:wE,gesdot:CE,gesdoto:TE,gesdotol:SE,gesl:xE,gesles:EE,Gfr:ME,gfr:AE,gg:OE,Gg:NE,ggg:DE,gimel:LE,GJcy:RE,gjcy:IE,gla:PE,gl:BE,glE:FE,glj:qE,gnap:HE,gnapprox:_E,gne:zE,gnE:VE,gneq:UE,gneqq:$E,gnsim:WE,Gopf:jE,gopf:GE,grave:KE,GreaterEqual:JE,GreaterEqualLess:YE,GreaterFullEqual:XE,GreaterGreater:ZE,GreaterLess:QE,GreaterSlantEqual:eM,GreaterTilde:tM,Gscr:rM,gscr:nM,gsim:iM,gsime:aM,gsiml:oM,gtcc:sM,gtcir:lM,gt:uM,GT:cM,Gt:fM,gtdot:dM,gtlPar:hM,gtquest:pM,gtrapprox:vM,gtrarr:mM,gtrdot:gM,gtreqless:yM,gtreqqless:bM,gtrless:kM,gtrsim:wM,gvertneqq:CM,gvnE:TM,Hacek:SM,hairsp:xM,half:EM,hamilt:MM,HARDcy:AM,hardcy:OM,harrcir:NM,harr:DM,hArr:LM,harrw:RM,Hat:IM,hbar:PM,Hcirc:BM,hcirc:FM,hearts:qM,heartsuit:HM,hellip:_M,hercon:zM,hfr:VM,Hfr:UM,HilbertSpace:$M,hksearow:WM,hkswarow:jM,hoarr:GM,homtht:KM,hookleftarrow:JM,hookrightarrow:YM,hopf:XM,Hopf:ZM,horbar:QM,HorizontalLine:eA,hscr:tA,Hscr:rA,hslash:nA,Hstrok:iA,hstrok:aA,HumpDownHump:oA,HumpEqual:sA,hybull:lA,hyphen:uA,Iacute:cA,iacute:fA,ic:dA,Icirc:hA,icirc:pA,Icy:vA,icy:mA,Idot:gA,IEcy:yA,iecy:bA,iexcl:kA,iff:wA,ifr:CA,Ifr:TA,Igrave:SA,igrave:xA,ii:EA,iiiint:MA,iiint:AA,iinfin:OA,iiota:NA,IJlig:DA,ijlig:LA,Imacr:RA,imacr:IA,image:PA,ImaginaryI:BA,imagline:FA,imagpart:qA,imath:HA,Im:_A,imof:zA,imped:VA,Implies:UA,incare:$A,in:"∈",infin:WA,infintie:jA,inodot:GA,intcal:KA,int:JA,Int:YA,integers:XA,Integral:ZA,intercal:QA,Intersection:eO,intlarhk:tO,intprod:rO,InvisibleComma:nO,InvisibleTimes:iO,IOcy:aO,iocy:oO,Iogon:sO,iogon:lO,Iopf:uO,iopf:cO,Iota:fO,iota:dO,iprod:hO,iquest:pO,iscr:vO,Iscr:mO,isin:gO,isindot:yO,isinE:bO,isins:kO,isinsv:wO,isinv:CO,it:TO,Itilde:SO,itilde:xO,Iukcy:EO,iukcy:MO,Iuml:AO,iuml:OO,Jcirc:NO,jcirc:DO,Jcy:LO,jcy:RO,Jfr:IO,jfr:PO,jmath:BO,Jopf:FO,jopf:qO,Jscr:HO,jscr:_O,Jsercy:zO,jsercy:VO,Jukcy:UO,jukcy:$O,Kappa:WO,kappa:jO,kappav:GO,Kcedil:KO,kcedil:JO,Kcy:YO,kcy:XO,Kfr:ZO,kfr:QO,kgreen:eN,KHcy:tN,khcy:rN,KJcy:nN,kjcy:iN,Kopf:aN,kopf:oN,Kscr:sN,kscr:lN,lAarr:uN,Lacute:cN,lacute:fN,laemptyv:dN,lagran:hN,Lambda:pN,lambda:vN,lang:mN,Lang:gN,langd:yN,langle:bN,lap:kN,Laplacetrf:wN,laquo:CN,larrb:TN,larrbfs:SN,larr:xN,Larr:EN,lArr:MN,larrfs:AN,larrhk:ON,larrlp:NN,larrpl:DN,larrsim:LN,larrtl:RN,latail:IN,lAtail:PN,lat:BN,late:FN,lates:qN,lbarr:HN,lBarr:_N,lbbrk:zN,lbrace:VN,lbrack:UN,lbrke:$N,lbrksld:WN,lbrkslu:jN,Lcaron:GN,lcaron:KN,Lcedil:JN,lcedil:YN,lceil:XN,lcub:ZN,Lcy:QN,lcy:eD,ldca:tD,ldquo:rD,ldquor:nD,ldrdhar:iD,ldrushar:aD,ldsh:oD,le:sD,lE:lD,LeftAngleBracket:uD,LeftArrowBar:cD,leftarrow:fD,LeftArrow:dD,Leftarrow:hD,LeftArrowRightArrow:pD,leftarrowtail:vD,LeftCeiling:mD,LeftDoubleBracket:gD,LeftDownTeeVector:yD,LeftDownVectorBar:bD,LeftDownVector:kD,LeftFloor:wD,leftharpoondown:CD,leftharpoonup:TD,leftleftarrows:SD,leftrightarrow:xD,LeftRightArrow:ED,Leftrightarrow:MD,leftrightarrows:AD,leftrightharpoons:OD,leftrightsquigarrow:ND,LeftRightVector:DD,LeftTeeArrow:LD,LeftTee:RD,LeftTeeVector:ID,leftthreetimes:PD,LeftTriangleBar:BD,LeftTriangle:FD,LeftTriangleEqual:qD,LeftUpDownVector:HD,LeftUpTeeVector:_D,LeftUpVectorBar:zD,LeftUpVector:VD,LeftVectorBar:UD,LeftVector:$D,lEg:WD,leg:jD,leq:GD,leqq:KD,leqslant:JD,lescc:YD,les:XD,lesdot:ZD,lesdoto:QD,lesdotor:eL,lesg:tL,lesges:rL,lessapprox:nL,lessdot:iL,lesseqgtr:aL,lesseqqgtr:oL,LessEqualGreater:sL,LessFullEqual:lL,LessGreater:uL,lessgtr:cL,LessLess:fL,lesssim:dL,LessSlantEqual:hL,LessTilde:pL,lfisht:vL,lfloor:mL,Lfr:gL,lfr:yL,lg:bL,lgE:kL,lHar:wL,lhard:CL,lharu:TL,lharul:SL,lhblk:xL,LJcy:EL,ljcy:ML,llarr:AL,ll:OL,Ll:NL,llcorner:DL,Lleftarrow:LL,llhard:RL,lltri:IL,Lmidot:PL,lmidot:BL,lmoustache:FL,lmoust:qL,lnap:HL,lnapprox:_L,lne:zL,lnE:VL,lneq:UL,lneqq:$L,lnsim:WL,loang:jL,loarr:GL,lobrk:KL,longleftarrow:JL,LongLeftArrow:YL,Longleftarrow:XL,longleftrightarrow:ZL,LongLeftRightArrow:QL,Longleftrightarrow:eR,longmapsto:tR,longrightarrow:rR,LongRightArrow:nR,Longrightarrow:iR,looparrowleft:aR,looparrowright:oR,lopar:sR,Lopf:lR,lopf:uR,loplus:cR,lotimes:fR,lowast:dR,lowbar:hR,LowerLeftArrow:pR,LowerRightArrow:vR,loz:mR,lozenge:gR,lozf:yR,lpar:bR,lparlt:kR,lrarr:wR,lrcorner:CR,lrhar:TR,lrhard:SR,lrm:xR,lrtri:ER,lsaquo:MR,lscr:AR,Lscr:OR,lsh:NR,Lsh:DR,lsim:LR,lsime:RR,lsimg:IR,lsqb:PR,lsquo:BR,lsquor:FR,Lstrok:qR,lstrok:HR,ltcc:_R,ltcir:zR,lt:VR,LT:UR,Lt:$R,ltdot:WR,lthree:jR,ltimes:GR,ltlarr:KR,ltquest:JR,ltri:YR,ltrie:XR,ltrif:ZR,ltrPar:QR,lurdshar:eI,luruhar:tI,lvertneqq:rI,lvnE:nI,macr:iI,male:aI,malt:oI,maltese:sI,Map:"⤅",map:lI,mapsto:uI,mapstodown:cI,mapstoleft:fI,mapstoup:dI,marker:hI,mcomma:pI,Mcy:vI,mcy:mI,mdash:gI,mDDot:yI,measuredangle:bI,MediumSpace:kI,Mellintrf:wI,Mfr:CI,mfr:TI,mho:SI,micro:xI,midast:EI,midcir:MI,mid:AI,middot:OI,minusb:NI,minus:DI,minusd:LI,minusdu:RI,MinusPlus:II,mlcp:PI,mldr:BI,mnplus:FI,models:qI,Mopf:HI,mopf:_I,mp:zI,mscr:VI,Mscr:UI,mstpos:$I,Mu:WI,mu:jI,multimap:GI,mumap:KI,nabla:JI,Nacute:YI,nacute:XI,nang:ZI,nap:QI,napE:eP,napid:tP,napos:rP,napprox:nP,natural:iP,naturals:aP,natur:oP,nbsp:sP,nbump:lP,nbumpe:uP,ncap:cP,Ncaron:fP,ncaron:dP,Ncedil:hP,ncedil:pP,ncong:vP,ncongdot:mP,ncup:gP,Ncy:yP,ncy:bP,ndash:kP,nearhk:wP,nearr:CP,neArr:TP,nearrow:SP,ne:xP,nedot:EP,NegativeMediumSpace:MP,NegativeThickSpace:AP,NegativeThinSpace:OP,NegativeVeryThinSpace:NP,nequiv:DP,nesear:LP,nesim:RP,NestedGreaterGreater:IP,NestedLessLess:PP,NewLine:BP,nexist:FP,nexists:qP,Nfr:HP,nfr:_P,ngE:zP,nge:VP,ngeq:UP,ngeqq:$P,ngeqslant:WP,nges:jP,nGg:GP,ngsim:KP,nGt:JP,ngt:YP,ngtr:XP,nGtv:ZP,nharr:QP,nhArr:eB,nhpar:tB,ni:rB,nis:nB,nisd:iB,niv:aB,NJcy:oB,njcy:sB,nlarr:lB,nlArr:uB,nldr:cB,nlE:fB,nle:dB,nleftarrow:hB,nLeftarrow:pB,nleftrightarrow:vB,nLeftrightarrow:mB,nleq:gB,nleqq:yB,nleqslant:bB,nles:kB,nless:wB,nLl:CB,nlsim:TB,nLt:SB,nlt:xB,nltri:EB,nltrie:MB,nLtv:AB,nmid:OB,NoBreak:NB,NonBreakingSpace:DB,nopf:LB,Nopf:RB,Not:IB,not:PB,NotCongruent:BB,NotCupCap:FB,NotDoubleVerticalBar:qB,NotElement:HB,NotEqual:_B,NotEqualTilde:zB,NotExists:VB,NotGreater:UB,NotGreaterEqual:$B,NotGreaterFullEqual:WB,NotGreaterGreater:jB,NotGreaterLess:GB,NotGreaterSlantEqual:KB,NotGreaterTilde:JB,NotHumpDownHump:YB,NotHumpEqual:XB,notin:ZB,notindot:QB,notinE:eF,notinva:tF,notinvb:rF,notinvc:nF,NotLeftTriangleBar:iF,NotLeftTriangle:aF,NotLeftTriangleEqual:oF,NotLess:sF,NotLessEqual:lF,NotLessGreater:uF,NotLessLess:cF,NotLessSlantEqual:fF,NotLessTilde:dF,NotNestedGreaterGreater:hF,NotNestedLessLess:pF,notni:vF,notniva:mF,notnivb:gF,notnivc:yF,NotPrecedes:bF,NotPrecedesEqual:kF,NotPrecedesSlantEqual:wF,NotReverseElement:CF,NotRightTriangleBar:TF,NotRightTriangle:SF,NotRightTriangleEqual:xF,NotSquareSubset:EF,NotSquareSubsetEqual:MF,NotSquareSuperset:AF,NotSquareSupersetEqual:OF,NotSubset:NF,NotSubsetEqual:DF,NotSucceeds:LF,NotSucceedsEqual:RF,NotSucceedsSlantEqual:IF,NotSucceedsTilde:PF,NotSuperset:BF,NotSupersetEqual:FF,NotTilde:qF,NotTildeEqual:HF,NotTildeFullEqual:_F,NotTildeTilde:zF,NotVerticalBar:VF,nparallel:UF,npar:$F,nparsl:WF,npart:jF,npolint:GF,npr:KF,nprcue:JF,nprec:YF,npreceq:XF,npre:ZF,nrarrc:QF,nrarr:eq,nrArr:tq,nrarrw:rq,nrightarrow:nq,nRightarrow:iq,nrtri:aq,nrtrie:oq,nsc:sq,nsccue:lq,nsce:uq,Nscr:cq,nscr:fq,nshortmid:dq,nshortparallel:hq,nsim:pq,nsime:vq,nsimeq:mq,nsmid:gq,nspar:yq,nsqsube:bq,nsqsupe:kq,nsub:wq,nsubE:Cq,nsube:Tq,nsubset:Sq,nsubseteq:xq,nsubseteqq:Eq,nsucc:Mq,nsucceq:Aq,nsup:Oq,nsupE:Nq,nsupe:Dq,nsupset:Lq,nsupseteq:Rq,nsupseteqq:Iq,ntgl:Pq,Ntilde:Bq,ntilde:Fq,ntlg:qq,ntriangleleft:Hq,ntrianglelefteq:_q,ntriangleright:zq,ntrianglerighteq:Vq,Nu:Uq,nu:$q,num:Wq,numero:jq,numsp:Gq,nvap:Kq,nvdash:Jq,nvDash:Yq,nVdash:Xq,nVDash:Zq,nvge:Qq,nvgt:eH,nvHarr:tH,nvinfin:rH,nvlArr:nH,nvle:iH,nvlt:aH,nvltrie:oH,nvrArr:sH,nvrtrie:lH,nvsim:uH,nwarhk:cH,nwarr:fH,nwArr:dH,nwarrow:hH,nwnear:pH,Oacute:vH,oacute:mH,oast:gH,Ocirc:yH,ocirc:bH,ocir:kH,Ocy:wH,ocy:CH,odash:TH,Odblac:SH,odblac:xH,odiv:EH,odot:MH,odsold:AH,OElig:OH,oelig:NH,ofcir:DH,Ofr:LH,ofr:RH,ogon:IH,Ograve:PH,ograve:BH,ogt:FH,ohbar:qH,ohm:HH,oint:_H,olarr:zH,olcir:VH,olcross:UH,oline:$H,olt:WH,Omacr:jH,omacr:GH,Omega:KH,omega:JH,Omicron:YH,omicron:XH,omid:ZH,ominus:QH,Oopf:e_,oopf:t_,opar:r_,OpenCurlyDoubleQuote:n_,OpenCurlyQuote:i_,operp:a_,oplus:o_,orarr:s_,Or:l_,or:u_,ord:c_,order:f_,orderof:d_,ordf:h_,ordm:p_,origof:v_,oror:m_,orslope:g_,orv:y_,oS:b_,Oscr:k_,oscr:w_,Oslash:C_,oslash:T_,osol:S_,Otilde:x_,otilde:E_,otimesas:M_,Otimes:A_,otimes:O_,Ouml:N_,ouml:D_,ovbar:L_,OverBar:R_,OverBrace:I_,OverBracket:P_,OverParenthesis:B_,para:F_,parallel:q_,par:H_,parsim:__,parsl:z_,part:V_,PartialD:U_,Pcy:$_,pcy:W_,percnt:j_,period:G_,permil:K_,perp:J_,pertenk:Y_,Pfr:X_,pfr:Z_,Phi:Q_,phi:ez,phiv:tz,phmmat:rz,phone:nz,Pi:iz,pi:az,pitchfork:oz,piv:sz,planck:lz,planckh:uz,plankv:cz,plusacir:fz,plusb:dz,pluscir:hz,plus:pz,plusdo:vz,plusdu:mz,pluse:gz,PlusMinus:yz,plusmn:bz,plussim:kz,plustwo:wz,pm:Cz,Poincareplane:Tz,pointint:Sz,popf:xz,Popf:Ez,pound:Mz,prap:Az,Pr:Oz,pr:Nz,prcue:Dz,precapprox:Lz,prec:Rz,preccurlyeq:Iz,Precedes:Pz,PrecedesEqual:Bz,PrecedesSlantEqual:Fz,PrecedesTilde:qz,preceq:Hz,precnapprox:_z,precneqq:zz,precnsim:Vz,pre:Uz,prE:$z,precsim:Wz,prime:jz,Prime:Gz,primes:Kz,prnap:Jz,prnE:Yz,prnsim:Xz,prod:Zz,Product:Qz,profalar:eV,profline:tV,profsurf:rV,prop:nV,Proportional:iV,Proportion:aV,propto:oV,prsim:sV,prurel:lV,Pscr:uV,pscr:cV,Psi:fV,psi:dV,puncsp:hV,Qfr:pV,qfr:vV,qint:mV,qopf:gV,Qopf:yV,qprime:bV,Qscr:kV,qscr:wV,quaternions:CV,quatint:TV,quest:SV,questeq:xV,quot:EV,QUOT:MV,rAarr:AV,race:OV,Racute:NV,racute:DV,radic:LV,raemptyv:RV,rang:IV,Rang:PV,rangd:BV,range:FV,rangle:qV,raquo:HV,rarrap:_V,rarrb:zV,rarrbfs:VV,rarrc:UV,rarr:$V,Rarr:WV,rArr:jV,rarrfs:GV,rarrhk:KV,rarrlp:JV,rarrpl:YV,rarrsim:XV,Rarrtl:ZV,rarrtl:QV,rarrw:eU,ratail:tU,rAtail:rU,ratio:nU,rationals:iU,rbarr:aU,rBarr:oU,RBarr:sU,rbbrk:lU,rbrace:uU,rbrack:cU,rbrke:fU,rbrksld:dU,rbrkslu:hU,Rcaron:pU,rcaron:vU,Rcedil:mU,rcedil:gU,rceil:yU,rcub:bU,Rcy:kU,rcy:wU,rdca:CU,rdldhar:TU,rdquo:SU,rdquor:xU,rdsh:EU,real:MU,realine:AU,realpart:OU,reals:NU,Re:DU,rect:LU,reg:RU,REG:IU,ReverseElement:PU,ReverseEquilibrium:BU,ReverseUpEquilibrium:FU,rfisht:qU,rfloor:HU,rfr:_U,Rfr:zU,rHar:VU,rhard:UU,rharu:$U,rharul:WU,Rho:jU,rho:GU,rhov:KU,RightAngleBracket:JU,RightArrowBar:YU,rightarrow:XU,RightArrow:ZU,Rightarrow:QU,RightArrowLeftArrow:e2,rightarrowtail:t2,RightCeiling:r2,RightDoubleBracket:n2,RightDownTeeVector:i2,RightDownVectorBar:a2,RightDownVector:o2,RightFloor:s2,rightharpoondown:l2,rightharpoonup:u2,rightleftarrows:c2,rightleftharpoons:f2,rightrightarrows:d2,rightsquigarrow:h2,RightTeeArrow:p2,RightTee:v2,RightTeeVector:m2,rightthreetimes:g2,RightTriangleBar:y2,RightTriangle:b2,RightTriangleEqual:k2,RightUpDownVector:w2,RightUpTeeVector:C2,RightUpVectorBar:T2,RightUpVector:S2,RightVectorBar:x2,RightVector:E2,ring:M2,risingdotseq:A2,rlarr:O2,rlhar:N2,rlm:D2,rmoustache:L2,rmoust:R2,rnmid:I2,roang:P2,roarr:B2,robrk:F2,ropar:q2,ropf:H2,Ropf:_2,roplus:z2,rotimes:V2,RoundImplies:U2,rpar:$2,rpargt:W2,rppolint:j2,rrarr:G2,Rrightarrow:K2,rsaquo:J2,rscr:Y2,Rscr:X2,rsh:Z2,Rsh:Q2,rsqb:e$,rsquo:t$,rsquor:r$,rthree:n$,rtimes:i$,rtri:a$,rtrie:o$,rtrif:s$,rtriltri:l$,RuleDelayed:u$,ruluhar:c$,rx:f$,Sacute:d$,sacute:h$,sbquo:p$,scap:v$,Scaron:m$,scaron:g$,Sc:y$,sc:b$,sccue:k$,sce:w$,scE:C$,Scedil:T$,scedil:S$,Scirc:x$,scirc:E$,scnap:M$,scnE:A$,scnsim:O$,scpolint:N$,scsim:D$,Scy:L$,scy:R$,sdotb:I$,sdot:P$,sdote:B$,searhk:F$,searr:q$,seArr:H$,searrow:_$,sect:z$,semi:V$,seswar:U$,setminus:$$,setmn:W$,sext:j$,Sfr:G$,sfr:K$,sfrown:J$,sharp:Y$,SHCHcy:X$,shchcy:Z$,SHcy:Q$,shcy:eW,ShortDownArrow:tW,ShortLeftArrow:rW,shortmid:nW,shortparallel:iW,ShortRightArrow:aW,ShortUpArrow:oW,shy:sW,Sigma:lW,sigma:uW,sigmaf:cW,sigmav:fW,sim:dW,simdot:hW,sime:pW,simeq:vW,simg:mW,simgE:gW,siml:yW,simlE:bW,simne:kW,simplus:wW,simrarr:CW,slarr:TW,SmallCircle:SW,smallsetminus:xW,smashp:EW,smeparsl:MW,smid:AW,smile:OW,smt:NW,smte:DW,smtes:LW,SOFTcy:RW,softcy:IW,solbar:PW,solb:BW,sol:FW,Sopf:qW,sopf:HW,spades:_W,spadesuit:zW,spar:VW,sqcap:UW,sqcaps:$W,sqcup:WW,sqcups:jW,Sqrt:GW,sqsub:KW,sqsube:JW,sqsubset:YW,sqsubseteq:XW,sqsup:ZW,sqsupe:QW,sqsupset:e3,sqsupseteq:t3,square:r3,Square:n3,SquareIntersection:i3,SquareSubset:a3,SquareSubsetEqual:o3,SquareSuperset:s3,SquareSupersetEqual:l3,SquareUnion:u3,squarf:c3,squ:f3,squf:d3,srarr:h3,Sscr:p3,sscr:v3,ssetmn:m3,ssmile:g3,sstarf:y3,Star:b3,star:k3,starf:w3,straightepsilon:C3,straightphi:T3,strns:S3,sub:x3,Sub:E3,subdot:M3,subE:A3,sube:O3,subedot:N3,submult:D3,subnE:L3,subne:R3,subplus:I3,subrarr:P3,subset:B3,Subset:F3,subseteq:q3,subseteqq:H3,SubsetEqual:_3,subsetneq:z3,subsetneqq:V3,subsim:U3,subsub:$3,subsup:W3,succapprox:j3,succ:G3,succcurlyeq:K3,Succeeds:J3,SucceedsEqual:Y3,SucceedsSlantEqual:X3,SucceedsTilde:Z3,succeq:Q3,succnapprox:ej,succneqq:tj,succnsim:rj,succsim:nj,SuchThat:ij,sum:aj,Sum:oj,sung:sj,sup1:lj,sup2:uj,sup3:cj,sup:fj,Sup:dj,supdot:hj,supdsub:pj,supE:vj,supe:mj,supedot:gj,Superset:yj,SupersetEqual:bj,suphsol:kj,suphsub:wj,suplarr:Cj,supmult:Tj,supnE:Sj,supne:xj,supplus:Ej,supset:Mj,Supset:Aj,supseteq:Oj,supseteqq:Nj,supsetneq:Dj,supsetneqq:Lj,supsim:Rj,supsub:Ij,supsup:Pj,swarhk:Bj,swarr:Fj,swArr:qj,swarrow:Hj,swnwar:_j,szlig:zj,Tab:Vj,target:Uj,Tau:$j,tau:Wj,tbrk:jj,Tcaron:Gj,tcaron:Kj,Tcedil:Jj,tcedil:Yj,Tcy:Xj,tcy:Zj,tdot:Qj,telrec:eG,Tfr:tG,tfr:rG,there4:nG,therefore:iG,Therefore:aG,Theta:oG,theta:sG,thetasym:lG,thetav:uG,thickapprox:cG,thicksim:fG,ThickSpace:dG,ThinSpace:hG,thinsp:pG,thkap:vG,thksim:mG,THORN:gG,thorn:yG,tilde:bG,Tilde:kG,TildeEqual:wG,TildeFullEqual:CG,TildeTilde:TG,timesbar:SG,timesb:xG,times:EG,timesd:MG,tint:AG,toea:OG,topbot:NG,topcir:DG,top:LG,Topf:RG,topf:IG,topfork:PG,tosa:BG,tprime:FG,trade:qG,TRADE:HG,triangle:_G,triangledown:zG,triangleleft:VG,trianglelefteq:UG,triangleq:$G,triangleright:WG,trianglerighteq:jG,tridot:GG,trie:KG,triminus:JG,TripleDot:YG,triplus:XG,trisb:ZG,tritime:QG,trpezium:eK,Tscr:tK,tscr:rK,TScy:nK,tscy:iK,TSHcy:aK,tshcy:oK,Tstrok:sK,tstrok:lK,twixt:uK,twoheadleftarrow:cK,twoheadrightarrow:fK,Uacute:dK,uacute:hK,uarr:pK,Uarr:vK,uArr:mK,Uarrocir:gK,Ubrcy:yK,ubrcy:bK,Ubreve:kK,ubreve:wK,Ucirc:CK,ucirc:TK,Ucy:SK,ucy:xK,udarr:EK,Udblac:MK,udblac:AK,udhar:OK,ufisht:NK,Ufr:DK,ufr:LK,Ugrave:RK,ugrave:IK,uHar:PK,uharl:BK,uharr:FK,uhblk:qK,ulcorn:HK,ulcorner:_K,ulcrop:zK,ultri:VK,Umacr:UK,umacr:$K,uml:WK,UnderBar:jK,UnderBrace:GK,UnderBracket:KK,UnderParenthesis:JK,Union:YK,UnionPlus:XK,Uogon:ZK,uogon:QK,Uopf:e4,uopf:t4,UpArrowBar:r4,uparrow:n4,UpArrow:i4,Uparrow:a4,UpArrowDownArrow:o4,updownarrow:s4,UpDownArrow:l4,Updownarrow:u4,UpEquilibrium:c4,upharpoonleft:f4,upharpoonright:d4,uplus:h4,UpperLeftArrow:p4,UpperRightArrow:v4,upsi:m4,Upsi:g4,upsih:y4,Upsilon:b4,upsilon:k4,UpTeeArrow:w4,UpTee:C4,upuparrows:T4,urcorn:S4,urcorner:x4,urcrop:E4,Uring:M4,uring:A4,urtri:O4,Uscr:N4,uscr:D4,utdot:L4,Utilde:R4,utilde:I4,utri:P4,utrif:B4,uuarr:F4,Uuml:q4,uuml:H4,uwangle:_4,vangrt:z4,varepsilon:V4,varkappa:U4,varnothing:$4,varphi:W4,varpi:j4,varpropto:G4,varr:K4,vArr:J4,varrho:Y4,varsigma:X4,varsubsetneq:Z4,varsubsetneqq:Q4,varsupsetneq:e8,varsupsetneqq:t8,vartheta:r8,vartriangleleft:n8,vartriangleright:i8,vBar:a8,Vbar:o8,vBarv:s8,Vcy:l8,vcy:u8,vdash:c8,vDash:f8,Vdash:d8,VDash:h8,Vdashl:p8,veebar:v8,vee:m8,Vee:g8,veeeq:y8,vellip:b8,verbar:k8,Verbar:w8,vert:C8,Vert:T8,VerticalBar:S8,VerticalLine:x8,VerticalSeparator:E8,VerticalTilde:M8,VeryThinSpace:A8,Vfr:O8,vfr:N8,vltri:D8,vnsub:L8,vnsup:R8,Vopf:I8,vopf:P8,vprop:B8,vrtri:F8,Vscr:q8,vscr:H8,vsubnE:_8,vsubne:z8,vsupnE:V8,vsupne:U8,Vvdash:$8,vzigzag:W8,Wcirc:j8,wcirc:G8,wedbar:K8,wedge:J8,Wedge:Y8,wedgeq:X8,weierp:Z8,Wfr:Q8,wfr:e5,Wopf:t5,wopf:r5,wp:n5,wr:i5,wreath:a5,Wscr:o5,wscr:s5,xcap:l5,xcirc:u5,xcup:c5,xdtri:f5,Xfr:d5,xfr:h5,xharr:p5,xhArr:v5,Xi:m5,xi:g5,xlarr:y5,xlArr:b5,xmap:k5,xnis:w5,xodot:C5,Xopf:T5,xopf:S5,xoplus:x5,xotime:E5,xrarr:M5,xrArr:A5,Xscr:O5,xscr:N5,xsqcup:D5,xuplus:L5,xutri:R5,xvee:I5,xwedge:P5,Yacute:B5,yacute:F5,YAcy:q5,yacy:H5,Ycirc:_5,ycirc:z5,Ycy:V5,ycy:U5,yen:$5,Yfr:W5,yfr:j5,YIcy:G5,yicy:K5,Yopf:J5,yopf:Y5,Yscr:X5,yscr:Z5,YUcy:Q5,yucy:eJ,yuml:tJ,Yuml:rJ,Zacute:nJ,zacute:iJ,Zcaron:aJ,zcaron:oJ,Zcy:sJ,zcy:lJ,Zdot:uJ,zdot:cJ,zeetrf:fJ,ZeroWidthSpace:dJ,Zeta:hJ,zeta:pJ,zfr:vJ,Zfr:mJ,ZHcy:gJ,zhcy:yJ,zigrarr:bJ,zopf:kJ,Zopf:wJ,Zscr:CJ,zscr:TJ,zwj:SJ,zwnj:xJ},EJ="Á",MJ="á",AJ="Â",OJ="â",NJ="´",DJ="Æ",LJ="æ",RJ="À",IJ="à",PJ="&",BJ="&",FJ="Å",qJ="å",HJ="Ã",_J="ã",zJ="Ä",VJ="ä",UJ="¦",$J="Ç",WJ="ç",jJ="¸",GJ="¢",KJ="©",JJ="©",YJ="¤",XJ="°",ZJ="÷",QJ="É",e9="é",t9="Ê",r9="ê",n9="È",i9="è",a9="Ð",o9="ð",s9="Ë",l9="ë",u9="½",c9="¼",f9="¾",d9=">",h9=">",p9="Í",v9="í",m9="Î",g9="î",y9="¡",b9="Ì",k9="ì",w9="¿",C9="Ï",T9="ï",S9="«",x9="<",E9="<",M9="¯",A9="µ",O9="·",N9=" ",D9="¬",L9="Ñ",R9="ñ",I9="Ó",P9="ó",B9="Ô",F9="ô",q9="Ò",H9="ò",_9="ª",z9="º",V9="Ø",U9="ø",$9="Õ",W9="õ",j9="Ö",G9="ö",K9="¶",J9="±",Y9="£",X9='"',Z9='"',Q9="»",e6="®",t6="®",r6="§",n6="",i6="¹",a6="²",o6="³",s6="ß",l6="Þ",u6="þ",c6="×",f6="Ú",d6="ú",h6="Û",p6="û",v6="Ù",m6="ù",g6="¨",y6="Ü",b6="ü",k6="Ý",w6="ý",C6="¥",T6="ÿ",S6={Aacute:EJ,aacute:MJ,Acirc:AJ,acirc:OJ,acute:NJ,AElig:DJ,aelig:LJ,Agrave:RJ,agrave:IJ,amp:PJ,AMP:BJ,Aring:FJ,aring:qJ,Atilde:HJ,atilde:_J,Auml:zJ,auml:VJ,brvbar:UJ,Ccedil:$J,ccedil:WJ,cedil:jJ,cent:GJ,copy:KJ,COPY:JJ,curren:YJ,deg:XJ,divide:ZJ,Eacute:QJ,eacute:e9,Ecirc:t9,ecirc:r9,Egrave:n9,egrave:i9,ETH:a9,eth:o9,Euml:s9,euml:l9,frac12:u9,frac14:c9,frac34:f9,gt:d9,GT:h9,Iacute:p9,iacute:v9,Icirc:m9,icirc:g9,iexcl:y9,Igrave:b9,igrave:k9,iquest:w9,Iuml:C9,iuml:T9,laquo:S9,lt:x9,LT:E9,macr:M9,micro:A9,middot:O9,nbsp:N9,not:D9,Ntilde:L9,ntilde:R9,Oacute:I9,oacute:P9,Ocirc:B9,ocirc:F9,Ograve:q9,ograve:H9,ordf:_9,ordm:z9,Oslash:V9,oslash:U9,Otilde:$9,otilde:W9,Ouml:j9,ouml:G9,para:K9,plusmn:J9,pound:Y9,quot:X9,QUOT:Z9,raquo:Q9,reg:e6,REG:t6,sect:r6,shy:n6,sup1:i6,sup2:a6,sup3:o6,szlig:s6,THORN:l6,thorn:u6,times:c6,Uacute:f6,uacute:d6,Ucirc:h6,ucirc:p6,Ugrave:v6,ugrave:m6,uml:g6,Uuml:y6,uuml:b6,Yacute:k6,yacute:w6,yen:C6,yuml:T6},x6="&",E6="'",M6=">",A6="<",O6='"',rp={amp:x6,apos:E6,gt:M6,lt:A6,quot:O6},Yc={},N6={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},D6=z&&z.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(Yc,"__esModule",{value:!0});var np=D6(N6),L6=String.fromCodePoint||function(h){var d="";return h>65535&&(h-=65536,d+=String.fromCharCode(h>>>10&1023|55296),h=56320|h&1023),d+=String.fromCharCode(h),d};function R6(h){return h>=55296&&h<=57343||h>1114111?"�":(h in np.default&&(h=np.default[h]),L6(h))}Yc.default=R6;var bl=z&&z.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(le,"__esModule",{value:!0}),le.decodeHTML=le.decodeHTMLStrict=le.decodeXML=void 0;var Xc=bl(tp),I6=bl(S6),P6=bl(rp),ip=bl(Yc),B6=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;le.decodeXML=ap(P6.default),le.decodeHTMLStrict=ap(Xc.default);function ap(h){var d=sp(h);return function(y){return String(y).replace(B6,d)}}var op=function(h,d){return h<d?1:-1};le.decodeHTML=(function(){for(var h=Object.keys(I6.default).sort(op),d=Object.keys(Xc.default).sort(op),y=0,S=0;y<d.length;y++)h[S]===d[y]?(d[y]+=";?",S++):d[y]+=";";var L=new RegExp("&(?:"+d.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),V=sp(Xc.default);function G(te){return te.substr(-1)!==";"&&(te+=";"),V(te)}return function(te){return String(te).replace(L,G)}})();function sp(h){return function(y){if(y.charAt(1)==="#"){var S=y.charAt(2);return S==="X"||S==="x"?ip.default(parseInt(y.substr(3),16)):ip.default(parseInt(y.substr(2),10))}return h[y.slice(1,-1)]||y}}var yn={},lp=z&&z.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(yn,"__esModule",{value:!0}),yn.escapeUTF8=yn.escape=yn.encodeNonAsciiHTML=yn.encodeHTML=yn.encodeXML=void 0;var F6=lp(rp),up=fp(F6.default),cp=dp(up);yn.encodeXML=vp(up);var q6=lp(tp),Zc=fp(q6.default),H6=dp(Zc);yn.encodeHTML=z6(Zc,H6),yn.encodeNonAsciiHTML=vp(Zc);function fp(h){return Object.keys(h).sort().reduce(function(d,y){return d[h[y]]="&"+y+";",d},{})}function dp(h){for(var d=[],y=[],S=0,L=Object.keys(h);S<L.length;S++){var V=L[S];V.length===1?d.push("\\"+V):y.push(V)}d.sort();for(var G=0;G<d.length-1;G++){for(var te=G;te<d.length-1&&d[te].charCodeAt(1)+1===d[te+1].charCodeAt(1);)te+=1;var Se=1+te-G;Se<3||d.splice(G,Se,d[G]+"-"+d[te])}return y.unshift("["+d.join("")+"]"),new RegExp(y.join("|"),"g")}var hp=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,_6=String.prototype.codePointAt!=null?function(h){return h.codePointAt(0)}:function(h){return(h.charCodeAt(0)-55296)*1024+h.charCodeAt(1)-56320+65536};function kl(h){return"&#x"+(h.length>1?_6(h):h.charCodeAt(0)).toString(16).toUpperCase()+";"}function z6(h,d){return function(y){return y.replace(d,function(S){return h[S]}).replace(hp,kl)}}var pp=new RegExp(cp.source+"|"+hp.source,"g");function V6(h){return h.replace(pp,kl)}yn.escape=V6;function U6(h){return h.replace(cp,kl)}yn.escapeUTF8=U6;function vp(h){return function(d){return d.replace(pp,function(y){return h[y]||kl(y)})}}(function(h){Object.defineProperty(h,"__esModule",{value:!0}),h.decodeXMLStrict=h.decodeHTML5Strict=h.decodeHTML4Strict=h.decodeHTML5=h.decodeHTML4=h.decodeHTMLStrict=h.decodeHTML=h.decodeXML=h.encodeHTML5=h.encodeHTML4=h.escapeUTF8=h.escape=h.encodeNonAsciiHTML=h.encodeHTML=h.encodeXML=h.encode=h.decodeStrict=h.decode=void 0;var d=le,y=yn;function S(Se,Ae){return(!Ae||Ae<=0?d.decodeXML:d.decodeHTML)(Se)}h.decode=S;function L(Se,Ae){return(!Ae||Ae<=0?d.decodeXML:d.decodeHTMLStrict)(Se)}h.decodeStrict=L;function V(Se,Ae){return(!Ae||Ae<=0?y.encodeXML:y.encodeHTML)(Se)}h.encode=V;var G=yn;Object.defineProperty(h,"encodeXML",{enumerable:!0,get:function(){return G.encodeXML}}),Object.defineProperty(h,"encodeHTML",{enumerable:!0,get:function(){return G.encodeHTML}}),Object.defineProperty(h,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return G.encodeNonAsciiHTML}}),Object.defineProperty(h,"escape",{enumerable:!0,get:function(){return G.escape}}),Object.defineProperty(h,"escapeUTF8",{enumerable:!0,get:function(){return G.escapeUTF8}}),Object.defineProperty(h,"encodeHTML4",{enumerable:!0,get:function(){return G.encodeHTML}}),Object.defineProperty(h,"encodeHTML5",{enumerable:!0,get:function(){return G.encodeHTML}});var te=le;Object.defineProperty(h,"decodeXML",{enumerable:!0,get:function(){return te.decodeXML}}),Object.defineProperty(h,"decodeHTML",{enumerable:!0,get:function(){return te.decodeHTML}}),Object.defineProperty(h,"decodeHTMLStrict",{enumerable:!0,get:function(){return te.decodeHTMLStrict}}),Object.defineProperty(h,"decodeHTML4",{enumerable:!0,get:function(){return te.decodeHTML}}),Object.defineProperty(h,"decodeHTML5",{enumerable:!0,get:function(){return te.decodeHTML}}),Object.defineProperty(h,"decodeHTML4Strict",{enumerable:!0,get:function(){return te.decodeHTMLStrict}}),Object.defineProperty(h,"decodeHTML5Strict",{enumerable:!0,get:function(){return te.decodeHTMLStrict}}),Object.defineProperty(h,"decodeXMLStrict",{enumerable:!0,get:function(){return te.decodeXML}})})(oe);var mp="&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});",$6=92,W6=/[\\&]/,Qc="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",j6=new RegExp("\\\\"+Qc+"|"+mp,"gi"),G6='[&<>"]',gp=new RegExp(G6,"g"),K6=function(h){return h.charCodeAt(0)===$6?h.charAt(1):oe.decodeHTML(h)};function cs(h){return W6.test(h)?h.replace(j6,K6):h}function wl(h){try{return de(h)}catch{return h}}function J6(h){switch(h){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return h}}function vo(h){return gp.test(h)?h.replace(gp,J6):h}function ef(h,d){for(var y=[],S=0;S<d;S++)y.push(h);return y.join("")}function yp(h){return h?!/[^ \t]+/.test(h):!0}var Y6=(function(){function h(d){this.current=d,this.root=d,this.entering=!0}return h.prototype.next=function(){var d=this.current,y=this.entering;if(d===null)return null;var S=tf(d);return y&&S?d.firstChild?(this.current=d.firstChild,this.entering=!0):this.entering=!1:d===this.root?this.current=null:d.next===null?(this.current=d.parent,this.entering=!1):(this.current=d.next,this.entering=!0),{entering:y,node:d}},h.prototype.resumeAt=function(d,y){this.current=d,this.entering=y===!0},h})();function tf(h){switch(h.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}var X6=1,Cl={};function Z6(h){return Cl[h]}function rf(h){delete Cl[h]}function Q6(){Cl={}}var fs=(function(){function h(d,y){this.parent=null,this.prev=null,this.next=null,this.firstChild=null,this.lastChild=null,this.literal=null,d==="document"?this.id=-1:this.id=X6++,this.type=d,this.sourcepos=y,Cl[this.id]=this}return h.prototype.isContainer=function(){return tf(this)},h.prototype.unlink=function(){this.prev?this.prev.next=this.next:this.parent&&(this.parent.firstChild=this.next),this.next?this.next.prev=this.prev:this.parent&&(this.parent.lastChild=this.prev),this.parent=null,this.next=null,this.prev=null},h.prototype.replaceWith=function(d){this.insertBefore(d),this.unlink()},h.prototype.insertAfter=function(d){d.unlink(),d.next=this.next,d.next&&(d.next.prev=d),d.prev=this,this.next=d,this.parent&&(d.parent=this.parent,d.next||(d.parent.lastChild=d))},h.prototype.insertBefore=function(d){d.unlink(),d.prev=this.prev,d.prev&&(d.prev.next=d),d.next=this,this.prev=d,d.parent=this.parent,d.prev||(d.parent.firstChild=d)},h.prototype.appendChild=function(d){d.unlink(),d.parent=this,this.lastChild?(this.lastChild.next=d,d.prev=this.lastChild,this.lastChild=d):(this.firstChild=d,this.lastChild=d)},h.prototype.prependChild=function(d){d.unlink(),d.parent=this,this.firstChild?(this.firstChild.prev=d,d.next=this.firstChild,this.firstChild=d):(this.firstChild=d,this.lastChild=d)},h.prototype.walker=function(){return new Y6(this)},h})(),Ci=(function(h){E(d,h);function d(y,S){var L=h.call(this,y,S)||this;return L.open=!0,L.lineOffsets=null,L.stringContent=null,L.lastLineBlank=!1,L.lastLineChecked=!1,L.type=y,L}return d})(fs),eY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.listData=null,y}return d})(Ci),tY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.level=0,y.headingType="atx",y}return d})(Ci),rY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.isFenced=!1,y.fenceChar=null,y.fenceLength=0,y.fenceOffset=-1,y.info=null,y.infoPadding=0,y}return d})(Ci),nY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.columns=[],y}return d})(Ci),iY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.startIdx=0,y.endIdx=0,y.paddingLeft=0,y.paddingRight=0,y.ignored=!1,y}return d})(Ci),aY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.title="",y.dest="",y.label="",y}return d})(Ci),oY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.syntaxLength=0,y.offset=-1,y.info="",y}return d})(Ci),sY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.htmlBlockType=-1,y}return d})(Ci),lY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.destination=null,y.title=null,y.extendedAutolink=!1,y}return d})(fs),uY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.tickCount=0,y}return d})(fs),cY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.info="",y}return d})(fs);function ur(h,d){switch(h){case"heading":return new tY(h,d);case"list":case"item":return new eY(h,d);case"link":case"image":return new lY(h,d);case"codeBlock":return new rY(h,d);case"htmlBlock":return new sY(h,d);case"table":return new nY(h,d);case"tableCell":return new iY(h,d);case"document":case"paragraph":case"blockQuote":case"thematicBreak":case"tableRow":case"tableBody":case"tableHead":case"frontMatter":return new Ci(h,d);case"code":return new uY(h,d);case"refDef":return new aY(h,d);case"customBlock":return new oY(h,d);case"customInline":return new cY(h,d);default:return new fs(h,d)}}function bp(h){return h.type==="codeBlock"}function fY(h){return h.type==="htmlBlock"}function dY(h){return h.type==="heading"}function kp(h){return h.type==="list"}function hY(h){return h.type==="table"}function mo(h){return h.type==="refDef"}function wp(h){return h.type==="customBlock"}function pY(h){return h.type==="customInline"}function yr(h,d){var y=ur("text",d);return y.literal=h,y}var Cp="[A-Za-z][A-Za-z0-9-]*",vY="[a-zA-Z_:][a-zA-Z0-9:._-]*",mY="[^\"'=<>`\\x00-\\x20]+",gY="'[^']*'",yY='"[^"]*"',bY="(?:"+mY+"|"+gY+"|"+yY+")",kY="(?:\\s*=\\s*"+bY+")",wY="(?:\\s+"+vY+kY+"?)",Tp="<"+Cp+wY+"*\\s*/?>",Sp="</"+Cp+"\\s*[>]",CY="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",TY="[<][?].*?[?][>]",SY="<![A-Z]+\\s+[^>]*>",xY="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",EY="(?:"+Tp+"|"+Sp+"|"+CY+"|"+TY+"|"+SY+"|"+xY+")",MY=new RegExp("^"+EY,"i");/*! http://mths.be/fromcodepoint v0.2.1 by @mathias */var nf;if(String.fromCodePoint)nf=function(h){try{return String.fromCodePoint(h)}catch(d){if(d instanceof RangeError)return"�";throw d}};else{var AY=String.fromCharCode,OY=Math.floor;nf=function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];var y=16384,S=[],L,V,G=-1,te=h.length;if(!te)return"";for(var Se="";++G<te;){var Ae=Number(h[G]);if(!isFinite(Ae)||Ae<0||Ae>1114111||OY(Ae)!==Ae)return"�";Ae<=65535?S.push(Ae):(Ae-=65536,L=(Ae>>10)+55296,V=Ae%1024+56320,S.push(L,V)),(G+1===te||S.length>y)&&(Se+=AY.apply(void 0,S),S.length=0)}return Se}}var af=nf,NY="(?:[w-]+.)*[A-Za-z0-9-]+.[A-Za-z0-9-]+",DY="[^<\\s]*[^<?!.,:*_?~\\s]",LY="[\\w.+-]+@(?:[\\w-]+\\.)+[\\w-]+";function RY(h){var d=/\)+$/.exec(h);if(d){for(var y=0,S=0,L=h;S<L.length;S++){var V=L[S];V==="("?y<0?y=1:y+=1:V===")"&&(y-=1)}if(y<0){var G=Math.min(-y,d[0].length);return h.substring(0,h.length-G)}}return h}function IY(h){return h.replace(/&[A-Za-z0-9]+;$/,"")}function PY(h){for(var d=new RegExp(LY,"g"),y=[],S;S=d.exec(h);){var L=S[0];/[_-]+$/.test(L)||y.push({text:L,range:[S.index,S.index+L.length-1],url:"mailto:"+L})}return y}function BY(h){for(var d=new RegExp("(www|https?://)."+NY+DY,"g"),y=[],S;S=d.exec(h);){var L=IY(RY(S[0])),V=S[1]==="www"?"http://":"";y.push({text:L,range:[S.index,S.index+L.length-1],url:""+V+L})}return y}function FY(h){return F(F([],BY(h)),PY(h)).sort(function(d,y){return d.range[0]-y.range[0]})}function qY(h,d){typeof d=="boolean"&&(d=FY);for(var y,S=function(){var L=y.entering,V=y.node;if(L&&V.type==="text"&&V.parent.type!=="link"){var G=V.literal,te=d(G);if(!te||!te.length)return"continue";for(var Se=0,Ae=V.sourcepos[0],Ve=Ae[0],We=Ae[1],qe=function(Ei,KZ){return[[Ve,We+Ei],[Ve,We+KZ]]},rt=[],tt=0,Rt=te;tt<Rt.length;tt++){var cr=Rt[tt],Tr=cr.range,Ti=cr.url,In=cr.text;Tr[0]>Se&&rt.push(yr(G.substring(Se,Tr[0]),qe(Se,Tr[0]-1)));var kn=ur("link",qe.apply(void 0,Tr));kn.appendChild(yr(In,qe.apply(void 0,Tr))),kn.destination=Ti,kn.extendedAutolink=!0,rt.push(kn),Se=Tr[1]+1}Se<G.length&&rt.push(yr(G.substring(Se),qe(Se,G.length-1)));for(var Un=0,Si=rt;Un<Si.length;Un++){var xi=Si[Un];V.insertBefore(xi)}V.unlink()}};y=h.next();)S()}function Tl(h){return h[h.length-1]}function xp(h){return h.slice(1,h.length-1).trim().replace(/[ \t\r\n]+/," ").toLowerCase().toUpperCase()}function Sl(h,d){Object.keys(h).forEach(function(y){d(y,h[y])})}function HY(h){for(var d=[],y=1;y<arguments.length;y++)d[y-1]=arguments[y];var S=P({},h);return d.forEach(function(L){delete S[L]}),S}function go(h){return!Object.keys(h).length}function _Y(h){Object.keys(h).forEach(function(d){delete h[d]})}var of=10,sf=42,xl=95,zY=96,Ep=91,VY=93,El=126,Mp=60,UY=33,Ap=92,$Y=38,Op=40,lf=41,WY=58,Ea=39,Ma=34,Aa=36,uf="\\\\"+Qc,Np=new RegExp(/[!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/),jY=new RegExp('^(?:"('+uf+'|[^"\\x00])*"|'+("'("+uf+"|[^'\\x00])*'")+"|"+("\\(("+uf+"|[^()\\x00])*\\))")),GY=/^(?:<(?:[^<>\n\\\x00]|\\.)*>)/,Dp=new RegExp("^"+Qc),KY=new RegExp("^"+mp,"i"),JY=/`+/,YY=/^`+/,XY=/\.\.\./g,ZY=/--+/g,QY=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,e7=/^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*>/i,t7=/^ *(?:\n *)?/,cf=/^[ \t\n\x0b\x0c\x0d]/,Lp=/^\s/,r7=/ *$/,n7=/^ */,Rp=/^ *(?:\n|$)/,i7=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/,a7=/^[^\n`\[\]\\!<&*_'"~$]+/m,o7=(function(){function h(d){this.subject="",this.delimiters=null,this.brackets=null,this.pos=0,this.lineStartNum=0,this.lineIdx=0,this.lineOffsets=[0],this.linePosOffset=0,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.options=d}return h.prototype.sourcepos=function(d,y){var S=this.linePosOffset+this.lineOffsets[this.lineIdx],L=this.lineStartNum+this.lineIdx,V=[L,d+S];return typeof y=="number"?[V,[L,y+S]]:V},h.prototype.nextLine=function(){this.lineIdx+=1,this.linePosOffset=-this.pos},h.prototype.match=function(d){var y=d.exec(this.subject.slice(this.pos));return y===null?null:(this.pos+=y.index+y[0].length,y[0])},h.prototype.peek=function(){return this.pos<this.subject.length?this.subject.charCodeAt(this.pos):-1},h.prototype.spnl=function(){return this.match(t7),!0},h.prototype.parseBackticks=function(d){var y=this.pos+1,S=this.match(YY);if(S===null)return!1;for(var L=this.pos,V;(V=this.match(JY))!==null;)if(V===S){var G=this.subject.slice(L,this.pos-S.length),te=this.sourcepos(y,this.pos),Se=G.split(`
|
|
702
|
-
`);if(Se.length>1){var Ae=Tl(Se);this.lineIdx+=Se.length-1,this.linePosOffset=-(this.pos-Ae.length-S.length),te[1]=this.sourcepos(this.pos),G=Se.join(" ")}var Ve=ur("code",te);return G.length>0&&G.match(/[^ ]/)!==null&&G[0]==" "&&G[G.length-1]==" "?Ve.literal=G.slice(1,G.length-1):Ve.literal=G,Ve.tickCount=S.length,d.appendChild(Ve),!0}return this.pos=L,d.appendChild(yr(S,this.sourcepos(y,this.pos-1))),!0},h.prototype.parseBackslash=function(d){var y=this.subject,S;this.pos+=1;var L=this.pos;return this.peek()===of?(this.pos+=1,S=ur("linebreak",this.sourcepos(this.pos-1,this.pos)),d.appendChild(S),this.nextLine()):Dp.test(y.charAt(this.pos))?(d.appendChild(yr(y.charAt(this.pos),this.sourcepos(L,this.pos))),this.pos+=1):d.appendChild(yr("\\",this.sourcepos(L,L))),!0},h.prototype.parseAutolink=function(d){var y,S,L,V=this.pos+1;return(y=this.match(QY))?(S=y.slice(1,y.length-1),L=ur("link",this.sourcepos(V,this.pos)),L.destination=wl("mailto:"+S),L.title="",L.appendChild(yr(S,this.sourcepos(V+1,this.pos-1))),d.appendChild(L),!0):(y=this.match(e7))?(S=y.slice(1,y.length-1),L=ur("link",this.sourcepos(V,this.pos)),L.destination=wl(S),L.title="",L.appendChild(yr(S,this.sourcepos(V+1,this.pos-1))),d.appendChild(L),!0):!1},h.prototype.parseHtmlTag=function(d){var y=this.pos+1,S=this.match(MY);if(S===null)return!1;var L=ur("htmlInline",this.sourcepos(y,this.pos));return L.literal=S,d.appendChild(L),!0},h.prototype.scanDelims=function(d){var y=0,S=this.pos;if(d===Ea||d===Ma)y++,this.pos++;else for(;this.peek()===d;)y++,this.pos++;if(y===0||y<2&&(d===El||d===Aa))return this.pos=S,null;var L=S===0?`
|
|
703
|
-
`:this.subject.charAt(S-1),V=this.peek(),G;V===-1?G=`
|
|
704
|
-
`:G=af(V);var te=Lp.test(G),Se=Np.test(G),Ae=Lp.test(L),Ve=Np.test(L),We=!te&&(!Se||Ae||Ve),qe=!Ae&&(!Ve||te||Se),rt,tt;return d===xl?(rt=We&&(!qe||Ve),tt=qe&&(!We||Se)):d===Ea||d===Ma?(rt=We&&!qe,tt=qe):d===Aa?(rt=!te,tt=!Ae):(rt=We,tt=qe),this.pos=S,{numdelims:y,canOpen:rt,canClose:tt}},h.prototype.handleDelim=function(d,y){var S=this.scanDelims(d);if(!S)return!1;var L=S.numdelims,V=this.pos+1,G;this.pos+=L,d===Ea?G="’":d===Ma?G="“":G=this.subject.slice(V-1,this.pos);var te=yr(G,this.sourcepos(V,this.pos));return y.appendChild(te),(S.canOpen||S.canClose)&&(this.options.smart||d!==Ea&&d!==Ma)&&(this.delimiters={cc:d,numdelims:L,origdelims:L,node:te,previous:this.delimiters,next:null,canOpen:S.canOpen,canClose:S.canClose},this.delimiters.previous&&(this.delimiters.previous.next=this.delimiters)),!0},h.prototype.removeDelimiter=function(d){d.previous!==null&&(d.previous.next=d.next),d.next===null?this.delimiters=d.previous:d.next.previous=d.previous},h.prototype.removeDelimitersBetween=function(d,y){d.next!==y&&(d.next=y,y.previous=d)},h.prototype.processEmphasis=function(d){var y,S,L,V,G,te,Se,Ae=!1,Ve=(y={},y[xl]=[d,d,d],y[sf]=[d,d,d],y[Ea]=[d],y[Ma]=[d],y[El]=[d],y[Aa]=[d],y);for(L=this.delimiters;L!==null&&L.previous!==d;)L=L.previous;for(;L!==null;){var We=L.cc,qe=We===xl||We===sf;if(!L.canClose)L=L.next;else{for(S=L.previous,Se=!1;S!==null&&S!==d&&S!==Ve[We][qe?L.origdelims%3:0];){if(Ae=qe&&(L.canOpen||S.canClose)&&L.origdelims%3!==0&&(S.origdelims+L.origdelims)%3===0,S.cc===L.cc&&S.canOpen&&!Ae){Se=!0;break}S=S.previous}if(V=L,qe||We===El||We===Aa){if(!Se)L=L.next;else if(S){var rt=L.numdelims>=2&&S.numdelims>=2?2:1,tt=qe?0:1;G=S.node,te=L.node;var Rt=qe?rt===1?"emph":"strong":"strike";We===Aa&&(Rt="customInline");var cr=ur(Rt),Tr=G.sourcepos[1],Ti=te.sourcepos[0];cr.sourcepos=[[Tr[0],Tr[1]-rt+1],[Ti[0],Ti[1]+rt-1]],G.sourcepos[1][1]-=rt,te.sourcepos[0][1]+=rt,G.literal=G.literal.slice(rt),te.literal=te.literal.slice(rt),S.numdelims-=rt,L.numdelims-=rt;for(var In=G.next,kn=void 0;In&&In!==te;)kn=In.next,In.unlink(),cr.appendChild(In),In=kn;if(We===Aa){var Un=cr.firstChild,Si=Un.literal||"",xi=Si.split(/\s/)[0];cr.info=xi,Si.length<=xi.length?Un.unlink():(Un.sourcepos[0][1]+=xi.length,Un.literal=Si.replace(xi+" ",""))}if(G.insertAfter(cr),this.removeDelimitersBetween(S,L),S.numdelims<=tt&&(S.numdelims===0&&G.unlink(),this.removeDelimiter(S)),L.numdelims<=tt){L.numdelims===0&&te.unlink();var Ei=L.next;this.removeDelimiter(L),L=Ei}}}else We===Ea?(L.node.literal="’",Se&&(S.node.literal="‘"),L=L.next):We===Ma&&(L.node.literal="”",Se&&(S.node.literal="“"),L=L.next);Se||(Ve[We][qe?V.origdelims%3:0]=V.previous,V.canOpen||this.removeDelimiter(V))}}for(;this.delimiters!==null&&this.delimiters!==d;)this.removeDelimiter(this.delimiters)},h.prototype.parseLinkTitle=function(){var d=this.match(jY);return d===null?null:cs(d.substr(1,d.length-2))},h.prototype.parseLinkDestination=function(){var d=this.match(GY);if(d===null){if(this.peek()===Mp)return null;for(var y=this.pos,S=0,L=void 0;(L=this.peek())!==-1;)if(L===Ap&&Dp.test(this.subject.charAt(this.pos+1)))this.pos+=1,this.peek()!==-1&&(this.pos+=1);else if(L===Op)this.pos+=1,S+=1;else if(L===lf){if(S<1)break;this.pos+=1,S-=1}else{if(cf.exec(af(L))!==null)break;this.pos+=1}return this.pos===y&&L!==lf||S!==0?null:(d=this.subject.substr(y,this.pos-y),wl(cs(d)))}return wl(cs(d.substr(1,d.length-2)))},h.prototype.parseLinkLabel=function(){var d=this.match(i7);return d===null||d.length>1001?0:d.length},h.prototype.parseOpenBracket=function(d){var y=this.pos;this.pos+=1;var S=yr("[",this.sourcepos(this.pos,this.pos));return d.appendChild(S),this.addBracket(S,y,!1),!0},h.prototype.parseBang=function(d){var y=this.pos;if(this.pos+=1,this.peek()===Ep){this.pos+=1;var S=yr("![",this.sourcepos(this.pos-1,this.pos));d.appendChild(S),this.addBracket(S,y+1,!0)}else{var S=yr("!",this.sourcepos(this.pos,this.pos));d.appendChild(S)}return!0},h.prototype.parseCloseBracket=function(d){var y=null,S=null,L=!1;this.pos+=1;var V=this.pos,G=this.brackets;if(G===null)return d.appendChild(yr("]",this.sourcepos(V,V))),!0;if(!G.active)return d.appendChild(yr("]",this.sourcepos(V,V))),this.removeBracket(),!0;var te=G.image,Se=this.pos;this.peek()===Op&&(this.pos++,this.spnl()&&(y=this.parseLinkDestination())!==null&&this.spnl()&&(cf.test(this.subject.charAt(this.pos-1))&&(S=this.parseLinkTitle())||!0)&&this.spnl()&&this.peek()===lf?(this.pos+=1,L=!0):this.pos=Se);var Ae="";if(!L){var Ve=this.pos,We=this.parseLinkLabel();if(We>2?Ae=this.subject.slice(Ve,Ve+We):G.bracketAfter||(Ae=this.subject.slice(G.index,V)),We===0&&(this.pos=Se),Ae){Ae=xp(Ae);var qe=this.refMap[Ae];qe&&(y=qe.destination,S=qe.title,L=!0)}}if(L){var rt=ur(te?"image":"link");rt.destination=y,rt.title=S||"",rt.sourcepos=[G.startpos,this.sourcepos(this.pos)];for(var tt=G.node.next,Rt=void 0;tt;)Rt=tt.next,tt.unlink(),rt.appendChild(tt),tt=Rt;if(d.appendChild(rt),this.processEmphasis(G.previousDelimiter),this.removeBracket(),G.node.unlink(),!te)for(G=this.brackets;G!==null;)G.image||(G.active=!1),G=G.previous;return this.options.referenceDefinition&&(this.refLinkCandidateMap[d.id]={node:d,refLabel:Ae}),!0}return this.removeBracket(),this.pos=V,d.appendChild(yr("]",this.sourcepos(V,V))),this.options.referenceDefinition&&(this.refLinkCandidateMap[d.id]={node:d,refLabel:Ae}),!0},h.prototype.addBracket=function(d,y,S){this.brackets!==null&&(this.brackets.bracketAfter=!0),this.brackets={node:d,startpos:this.sourcepos(y+(S?0:1)),previous:this.brackets,previousDelimiter:this.delimiters,index:y,image:S,active:!0}},h.prototype.removeBracket=function(){this.brackets&&(this.brackets=this.brackets.previous)},h.prototype.parseEntity=function(d){var y,S=this.pos+1;return(y=this.match(KY))?(d.appendChild(yr(oe.decodeHTML(y),this.sourcepos(S,this.pos))),!0):!1},h.prototype.parseString=function(d){var y,S=this.pos+1;if(y=this.match(a7)){if(this.options.smart){var L=y.replace(XY,"…").replace(ZY,function(G){var te=0,Se=0;return G.length%3===0?Se=G.length/3:G.length%2===0?te=G.length/2:G.length%3===2?(te=1,Se=(G.length-2)/3):(te=2,Se=(G.length-4)/3),ef("—",Se)+ef("–",te)});d.appendChild(yr(L,this.sourcepos(S,this.pos)))}else{var V=yr(y,this.sourcepos(S,this.pos));d.appendChild(V)}return!0}return!1},h.prototype.parseNewline=function(d){this.pos+=1;var y=d.lastChild;if(y&&y.type==="text"&&y.literal[y.literal.length-1]===" "){var S=y.literal[y.literal.length-2]===" ",L=y.literal.length;y.literal=y.literal.replace(r7,"");var V=L-y.literal.length;y.sourcepos[1][1]-=V,d.appendChild(ur(S?"linebreak":"softbreak",this.sourcepos(this.pos-V,this.pos)))}else d.appendChild(ur("softbreak",this.sourcepos(this.pos,this.pos)));return this.nextLine(),this.match(n7),!0},h.prototype.parseReference=function(d,y){if(!this.options.referenceDefinition)return 0;this.subject=d.stringContent,this.pos=0;var S=null,L=this.pos,V=this.parseLinkLabel();if(V===0)return 0;var G=this.subject.substr(0,V);if(this.peek()===WY)this.pos++;else return this.pos=L,0;this.spnl();var te=this.parseLinkDestination();if(te===null)return this.pos=L,0;var Se=this.pos;this.spnl(),this.pos!==Se&&(S=this.parseLinkTitle()),S===null&&(S="",this.pos=Se);var Ae=!0;if(this.match(Rp)===null&&(S===""?Ae=!1:(S="",this.pos=Se,Ae=this.match(Rp)!==null)),!Ae)return this.pos=L,0;var Ve=xp(G);if(Ve==="")return this.pos=L,0;var We=this.getReferenceDefSourcepos(d);d.sourcepos[0][0]=We[1][0]+1;var qe=ur("refDef",We);return qe.title=S,qe.dest=te,qe.label=Ve,d.insertBefore(qe),y[Ve]?this.refDefCandidateMap[qe.id]=qe:y[Ve]=mf(qe),this.pos-L},h.prototype.mergeTextNodes=function(d){for(var y,S=[];y=d.next();){var L=y.entering,V=y.node;if(L&&V.type==="text")S.push(V);else if(S.length===1)S=[];else if(S.length>1){var G=S[0],te=S[S.length-1];G.sourcepos&&te.sourcepos&&(G.sourcepos[1]=te.sourcepos[1]),G.next=te.next,G.next&&(G.next.prev=G);for(var Se=1;Se<S.length;Se+=1)G.literal+=S[Se].literal,S[Se].unlink();S=[]}}},h.prototype.getReferenceDefSourcepos=function(d){for(var y=d.stringContent.split(/\n|\r\n/),S=!1,L=0,V={line:0,ch:0},G=0;G<y.length;G+=1){var te=y[G];if(cf.test(te))break;if(/\:/.test(te)&&L===0){if(S)break;var Se=te.indexOf(":")===te.length-1?G+1:G;V={line:Se,ch:y[Se].length},S=!0}var Ae=te.match(/'|"/g);if(Ae&&(L+=Ae.length),L===2){V={line:G,ch:te.length};break}}return[[d.sourcepos[0][0],d.sourcepos[0][1]],[d.sourcepos[0][0]+V.line,V.ch]]},h.prototype.parseInline=function(d){var y,S=!1,L=this.peek();if(L===-1)return!1;switch(L){case of:S=this.parseNewline(d);break;case Ap:S=this.parseBackslash(d);break;case zY:S=this.parseBackticks(d);break;case sf:case xl:case El:case Aa:S=this.handleDelim(L,d);break;case Ea:case Ma:S=!!(!((y=this.options)===null||y===void 0)&&y.smart)&&this.handleDelim(L,d);break;case Ep:S=this.parseOpenBracket(d);break;case UY:S=this.parseBang(d);break;case VY:S=this.parseCloseBracket(d);break;case Mp:S=this.parseAutolink(d)||this.parseHtmlTag(d);break;case $Y:d.disabledEntityParse||(S=this.parseEntity(d));break;default:S=this.parseString(d);break}return S||(this.pos+=1,d.appendChild(yr(af(L),this.sourcepos(this.pos,this.pos+1)))),!0},h.prototype.parse=function(d){for(this.subject=d.stringContent.trim(),this.pos=0,this.delimiters=null,this.brackets=null,this.lineOffsets=d.lineOffsets||[0],this.lineIdx=0,this.linePosOffset=0,this.lineStartNum=d.sourcepos[0][0],dY(d)&&(this.lineOffsets[0]+=d.level+1);this.parseInline(d););d.stringContent=null,this.processEmphasis(null),this.mergeTextNodes(d.walker());var y=this.options,S=y.extendedAutolinks,L=y.customParser;if(S&&qY(d.walker(),S),L&&d.firstChild)for(var V,G=d.firstChild.walker();V=G.next();){var te=V.node,Se=V.entering;L[te.type]&&L[te.type](te,{entering:Se,options:this.options})}},h})(),s7=/^\[([ \txX])\][ \t]+/;function l7(h,d){if(d.firstChild&&d.firstChild.type==="paragraph"){var y=d.firstChild,S=y.stringContent.match(s7);if(S){var L=S[0].length;y.stringContent=y.stringContent.substring(L-1),y.sourcepos[0][1]+=L,y.lineOffsets[0]+=L,d.listData.task=!0,d.listData.checked=/[xX]/.test(S[1])}}}var u7={continue:function(){return 0},finalize:function(){},canContain:function(h){return h==="tableHead"||h==="tableBody"},acceptsLines:!1},c7={continue:function(){return 0},finalize:function(){},canContain:function(h){return h==="tableRow"},acceptsLines:!1},f7={continue:function(){return 1},finalize:function(){},canContain:function(h){return h==="tableRow"||h==="tableDelimRow"},acceptsLines:!1},d7={continue:function(){return 1},finalize:function(){},canContain:function(h){return h==="tableDelimCell"},acceptsLines:!1},h7={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},p7={continue:function(){return 1},finalize:function(){},canContain:function(h){return h==="tableCell"},acceptsLines:!1},v7={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},Ml=4,Ip=9,Pp=62,m7=60,Bp=32,Fp=91,qp=/[^ \t\f\v\r\n]/,g7=/^(?:`{3,}|~{3,})(?= *$)/;function Hp(h){for(var d=h;d;){if(d.lastLineBlank)return!0;var y=d.type;if(!d.lastLineChecked&&(y==="list"||y==="item"))d.lastLineChecked=!0,d=d.lastChild;else{d.lastLineChecked=!0;break}}return!1}function bn(h,d){return d<h.length?h.charCodeAt(d):-1}function _p(h){return!qp.test(h)}function yo(h){return h===Bp||h===Ip}var y7=/^\$\$$/,b7={continue:function(h,d){var y=h.currentLine,S=y.match(y7);if(S)return h.lastLineLength=S[0].length,h.finalize(d,h.lineNumber),2;for(var L=d.offset;L>0&&yo(bn(y,h.offset));)h.advanceOffset(1,!0),L--;return 0},finalize:function(h,d){if(d.stringContent!==null){var y=d.stringContent,S=y.indexOf(`
|
|
705
|
-
`),L=y.slice(0,S),V=y.slice(S+1),G=L.match(/^(\s*)(.*)/);d.info=cs(G[2].trim()),d.literal=V,d.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},zp={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!0},k7={continue:function(){return 0},finalize:function(){},canContain:function(h){return h!=="item"},acceptsLines:!1},w7={continue:function(){return 0},finalize:function(h,d){for(var y=d.firstChild;y;){if(Hp(y)&&y.next){d.listData.tight=!1;break}for(var S=y.firstChild;S;){if(Hp(S)&&(y.next||S.next)){d.listData.tight=!1;break}S=S.next}y=y.next}},canContain:function(h){return h==="item"},acceptsLines:!1},C7={continue:function(h){var d=h.currentLine;if(!h.indented&&bn(d,h.nextNonspace)===Pp)h.advanceNextNonspace(),h.advanceOffset(1,!1),yo(bn(d,h.offset))&&h.advanceOffset(1,!0);else return 1;return 0},finalize:function(){},canContain:function(h){return h!=="item"},acceptsLines:!1},T7={continue:function(h,d){if(h.blank){if(d.firstChild===null)return 1;h.advanceNextNonspace()}else if(h.indent>=d.listData.markerOffset+d.listData.padding)h.advanceOffset(d.listData.markerOffset+d.listData.padding,!0);else return 1;return 0},finalize:l7,canContain:function(h){return h!=="item"},acceptsLines:!1},S7={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},x7={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},E7={continue:function(h,d){var y=h.currentLine,S=h.indent;if(d.isFenced){var L=S<=3&&y.charAt(h.nextNonspace)===d.fenceChar&&y.slice(h.nextNonspace).match(g7);if(L&&L[0].length>=d.fenceLength)return h.lastLineLength=h.offset+S+L[0].length,h.finalize(d,h.lineNumber),2;for(var V=d.fenceOffset;V>0&&yo(bn(y,h.offset));)h.advanceOffset(1,!0),V--}else if(S>=Ml)h.advanceOffset(Ml,!0);else if(h.blank)h.advanceNextNonspace();else return 1;return 0},finalize:function(h,d){var y;if(d.stringContent!==null){if(d.isFenced){var S=d.stringContent,L=S.indexOf(`
|
|
706
|
-
`),V=S.slice(0,L),G=S.slice(L+1),te=V.match(/^(\s*)(.*)/);d.infoPadding=te[1].length,d.info=cs(te[2].trim()),d.literal=G}else d.literal=(y=d.stringContent)===null||y===void 0?void 0:y.replace(/(\n *)+$/,`
|
|
707
|
-
`);d.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},M7={continue:function(h,d){return h.blank&&(d.htmlBlockType===6||d.htmlBlockType===7)?1:0},finalize:function(h,d){var y;d.literal=((y=d.stringContent)===null||y===void 0?void 0:y.replace(/(\n *)+$/,""))||null,d.stringContent=null},canContain:function(){return!1},acceptsLines:!0},A7={continue:function(h){return h.blank?1:0},finalize:function(h,d){if(d.stringContent!==null){for(var y,S=!1;bn(d.stringContent,0)===Fp&&(y=h.inlineParser.parseReference(d,h.refMap));)d.stringContent=d.stringContent.slice(y),S=!0;S&&_p(d.stringContent)&&d.unlink()}},canContain:function(){return!1},acceptsLines:!0},O7=zp,N7=zp,bo={document:k7,list:w7,blockQuote:C7,item:T7,heading:S7,thematicBreak:x7,codeBlock:E7,htmlBlock:M7,paragraph:A7,table:u7,tableBody:c7,tableHead:f7,tableRow:p7,tableCell:v7,tableDelimRow:d7,tableDelimCell:h7,refDef:O7,customBlock:b7,frontMatter:N7};function ff(h){for(var d=0,y=0,S=[],L=0;L<h.length;L+=1)if(h[L]==="|"&&h[L-1]!=="\\"){var V=h.substring(d,L);d===0&&yp(V)?y=L+1:S.push(V),d=L+1}if(d<h.length){var V=h.substring(d,h.length);yp(V)||S.push(V)}return[y,S]}function df(h,d,y,S){for(var L=[],V=0,G=d;V<G.length;V++){var te=G[V],Se=te.match(/^[ \t]+/),Ae=Se?Se[0].length:0,Ve=void 0,We=void 0;if(Ae===te.length)Ae=0,Ve=0,We="";else{var qe=te.match(/[ \t]+$/);Ve=qe?qe[0].length:0,We=te.slice(Ae,te.length-Ve)}var rt=S+Ae,tt=ur(h,[[y,S],[y,S+te.length-1]]);tt.stringContent=We.replace(/\\\|/g,"|"),tt.startIdx=L.length,tt.endIdx=L.length,tt.lineOffsets=[rt-1],tt.paddingLeft=Ae,tt.paddingRight=Ve,L.push(tt),S+=te.length+1}return L}function D7(h){var d=null,y=h.stringContent,S=y[0],L=y[y.length-1];return L===":"?d=S===":"?"center":"right":S===":"&&(d="left"),{align:d}}var L7=function(h,d){var y=d.stringContent;if(d.type==="paragraph"&&!h.indented&&!h.blank){var S=y.length-1,L=y.lastIndexOf(`
|
|
708
|
-
`,S-1)+1,V=y.slice(L,S),G=h.currentLine.slice(h.nextNonspace),te=ff(V),Se=te[0],Ae=te[1],Ve=ff(G),We=Ve[0],qe=Ve[1],rt=/^[ \t]*:?-+:?[ \t]*$/;if(!Ae.length||!qe.length||qe.some(function(Ei){return!rt.test(Ei)})||qe.length===1&&G.indexOf("|")!==0)return 0;var tt=d.lineOffsets,Rt=h.lineNumber-1,cr=Tl(tt)+1,Tr=ur("table",[[Rt,cr],[h.lineNumber,h.offset]]);if(Tr.columns=qe.map(function(){return{align:null}}),d.insertAfter(Tr),tt.length===1)d.unlink();else{d.stringContent=y.slice(0,L);var Ti=y.lastIndexOf(`
|
|
709
|
-
`,L-2)+1,In=L-Ti-1;h.lastLineLength=tt[tt.length-2]+In,h.finalize(d,Rt-1)}h.advanceOffset(h.currentLine.length-h.offset,!1);var kn=ur("tableHead",[[Rt,cr],[h.lineNumber,h.offset]]);Tr.appendChild(kn);var Un=ur("tableRow",[[Rt,cr],[Rt,cr+V.length-1]]),Si=ur("tableDelimRow",[[h.lineNumber,h.nextNonspace+1],[h.lineNumber,h.offset]]);kn.appendChild(Un),kn.appendChild(Si),df("tableCell",Ae,Rt,cr+Se).forEach(function(Ei){Un.appendChild(Ei)});var xi=df("tableDelimCell",qe,h.lineNumber,h.nextNonspace+1+We);return xi.forEach(function(Ei){Si.appendChild(Ei)}),Tr.columns=xi.map(D7),h.tip=Tr,2}return 0},R7=function(h,d){if(d.type!=="table"&&d.type!=="tableBody"||!h.blank&&h.currentLine.indexOf("|")===-1)return 0;if(h.advanceOffset(h.currentLine.length-h.offset,!1),h.blank){var y=d;return d.type==="tableBody"&&(y=d.parent,h.finalize(d,h.lineNumber-1)),h.finalize(y,h.lineNumber-1),0}var S=d;d.type==="table"&&(S=h.addChild("tableBody",h.nextNonspace),S.stringContent=null);var L=ur("tableRow",[[h.lineNumber,h.nextNonspace+1],[h.lineNumber,h.currentLine.length]]);S.appendChild(L);var V=S.parent,G=h.currentLine.slice(h.nextNonspace),te=ff(G),Se=te[0],Ae=te[1];return df("tableCell",Ae,h.lineNumber,h.nextNonspace+1+Se).forEach(function(Ve,We){We>=V.columns.length&&(Ve.ignored=!0),L.appendChild(Ve)}),2},I7=/^(\$\$)(\s*[a-zA-Z])+/,P7=/^(\$\$)(\s*[a-zA-Z])+.*(\$\$)/,B7=function(h){var d;if(!h.indented&&!P7.test(h.currentLine)&&(d=h.currentLine.match(I7))){var y=d[1].length;h.closeUnmatchedBlocks();var S=h.addChild("customBlock",h.nextNonspace);return S.syntaxLength=y,S.offset=h.indent,h.advanceNextNonspace(),h.advanceOffset(y,!1),2}return 0},F7=/^`{3,}(?!.*`)|^~{3,}/,q7=[/./,/^<(?:script|pre|style)(?:\s|>|$)/i,/^<!--/,/^<[?]/,/^<![A-Z]/,/^<!\[CDATA\[/,/^<[/]?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[123456]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|[/]?[>]|$)/i,new RegExp("^(?:"+Tp+"|"+Sp+")\\s*$","i")],H7=/^(?:=+|-+)[ \t]*$/,_7=/^#{1,6}(?:[ \t]+|$)/,z7=/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})[ \t]*$/,Vp=/^[*+-]/,Up=/^(\d{1,9})([.)])/;function V7(h,d){var y=h.currentLine.slice(h.nextNonspace),S,L,V={type:"bullet",tight:!0,bulletChar:"",start:0,delimiter:"",padding:0,markerOffset:h.indent,task:!1,checked:!1};if(h.indent>=4)return null;if(S=y.match(Vp))V.type="bullet",V.bulletChar=S[0][0];else if((S=y.match(Up))&&(d.type!=="paragraph"||S[1]==="1"))V.type="ordered",V.start=parseInt(S[1],10),V.delimiter=S[2];else return null;if(L=bn(h.currentLine,h.nextNonspace+S[0].length),!(L===-1||L===Ip||L===Bp)||d.type==="paragraph"&&!h.currentLine.slice(h.nextNonspace+S[0].length).match(qp))return null;h.advanceNextNonspace(),h.advanceOffset(S[0].length,!0);var G=h.column,te=h.offset;do h.advanceOffset(1,!0),L=bn(h.currentLine,h.offset);while(h.column-G<5&&yo(L));var Se=bn(h.currentLine,h.offset)===-1,Ae=h.column-G;return Ae>=5||Ae<1||Se?(V.padding=S[0].length+1,h.column=G,h.offset=te,yo(bn(h.currentLine,h.offset))&&h.advanceOffset(1,!0)):V.padding=S[0].length+Ae,V}function U7(h,d){return h.type===d.type&&h.delimiter===d.delimiter&&h.bulletChar===d.bulletChar}function $p(h,d){return h.options.disallowDeepHeading&&(d.type==="blockQuote"||d.type==="item")}var $7=function(h){return!h.indented&&bn(h.currentLine,h.nextNonspace)===Pp?(h.advanceNextNonspace(),h.advanceOffset(1,!1),yo(bn(h.currentLine,h.offset))&&h.advanceOffset(1,!0),h.closeUnmatchedBlocks(),h.addChild("blockQuote",h.nextNonspace),1):0},W7=function(h,d){var y;if(!h.indented&&!$p(h,d)&&(y=h.currentLine.slice(h.nextNonspace).match(_7))){h.advanceNextNonspace(),h.advanceOffset(y[0].length,!1),h.closeUnmatchedBlocks();var S=h.addChild("heading",h.nextNonspace);return S.level=y[0].trim().length,S.headingType="atx",S.stringContent=h.currentLine.slice(h.offset).replace(/^[ \t]*#+[ \t]*$/,"").replace(/[ \t]+#+[ \t]*$/,""),h.advanceOffset(h.currentLine.length-h.offset),2}return 0},j7=function(h){var d;if(!h.indented&&(d=h.currentLine.slice(h.nextNonspace).match(F7))){var y=d[0].length;h.closeUnmatchedBlocks();var S=h.addChild("codeBlock",h.nextNonspace);return S.isFenced=!0,S.fenceLength=y,S.fenceChar=d[0][0],S.fenceOffset=h.indent,h.advanceNextNonspace(),h.advanceOffset(y,!1),2}return 0},G7=function(h,d){if(!h.indented&&bn(h.currentLine,h.nextNonspace)===m7){var y=h.currentLine.slice(h.nextNonspace),S=h.options.disallowedHtmlBlockTags,L=void 0;for(L=1;L<=7;L++){var V=y.match(q7[L]);if(V){if(L===7){if(d.type==="paragraph")return 0;if(S.length>0){var G=new RegExp("</?(?:"+S.join("|")+")","i");if(G.test(V[0]))return 0}}h.closeUnmatchedBlocks();var te=h.addChild("htmlBlock",h.offset);return te.htmlBlockType=L,2}}}return 0},K7=function(h,d){var y;if(d.stringContent!==null&&!h.indented&&d.type==="paragraph"&&!$p(h,d.parent)&&(y=h.currentLine.slice(h.nextNonspace).match(H7))){h.closeUnmatchedBlocks();for(var S=void 0;bn(d.stringContent,0)===Fp&&(S=h.inlineParser.parseReference(d,h.refMap));)d.stringContent=d.stringContent.slice(S);if(d.stringContent.length>0){var L=ur("heading",d.sourcepos);return L.level=y[0][0]==="="?1:2,L.headingType="setext",L.stringContent=d.stringContent,d.insertAfter(L),d.unlink(),h.tip=L,h.advanceOffset(h.currentLine.length-h.offset,!1),2}return 0}return 0},J7=function(h){return!h.indented&&z7.test(h.currentLine.slice(h.nextNonspace))?(h.closeUnmatchedBlocks(),h.addChild("thematicBreak",h.nextNonspace),h.advanceOffset(h.currentLine.length-h.offset,!1),2):0},Y7=function(h,d){var y,S=d;return(!h.indented||d.type==="list")&&(y=V7(h,S))?(h.closeUnmatchedBlocks(),(h.tip.type!=="list"||!U7(S.listData,y))&&(S=h.addChild("list",h.nextNonspace),S.listData=y),S=h.addChild("item",h.nextNonspace),S.listData=y,1):0},X7=function(h){return h.indented&&h.tip.type!=="paragraph"&&!h.blank?(h.advanceOffset(Ml,!0),h.closeUnmatchedBlocks(),h.addChild("codeBlock",h.offset),2):0},hf=[$7,W7,j7,G7,K7,J7,Y7,X7,L7,R7,B7],Wp=/^(-{3}|\+{3}|;{3})$/,Z7=function(h,d){var y=h.currentLine,S=h.lineNumber,L=h.indented;if(S===1&&!L&&d.type==="document"&&Wp.test(y)){h.closeUnmatchedBlocks();var V=h.addChild("frontMatter",h.nextNonspace);return V.stringContent=y,h.advanceNextNonspace(),h.advanceOffset(y.length,!1),2}return 0},Q7={continue:function(h,d){var y=h.currentLine,S=y.match(Wp);return d.type==="frontMatter"&&S?(d.stringContent+=y,h.lastLineLength=S[0].length,h.finalize(d,h.lineNumber),2):0},finalize:function(h,d){d.stringContent!==null&&(d.literal=d.stringContent,d.stringContent=null)},canContain:function(){return!1},acceptsLines:!0},eX=[/./,/<\/(?:script|pre|style)>/i,/-->/,/\?>/,/>/,/\]\]>/],tX=/^[#`~*+_=<>0-9-;$]/,rX=/\r\n|\n|\r/;function pf(){return ur("document",[[1,1],[0,0]])}var nX={smart:!1,tagFilter:!1,extendedAutolinks:!1,disallowedHtmlBlockTags:[],referenceDefinition:!1,disallowDeepHeading:!1,customParser:null,frontMatter:!1},iX=(function(){function h(d){this.options=P(P({},nX),d),this.doc=pf(),this.tip=this.doc,this.oldtip=this.doc,this.lineNumber=0,this.offset=0,this.column=0,this.nextNonspace=0,this.nextNonspaceColumn=0,this.indent=0,this.currentLine="",this.indented=!1,this.blank=!1,this.partiallyConsumedTab=!1,this.allClosed=!0,this.lastMatchedContainer=this.doc,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.lastLineLength=0,this.lines=[],this.options.frontMatter&&(bo.frontMatter=Q7,hf.unshift(Z7)),this.inlineParser=new o7(this.options)}return h.prototype.advanceOffset=function(d,y){y===void 0&&(y=!1);for(var S=this.currentLine,L,V,G;d>0&&(G=S[this.offset]);)G===" "?(L=4-this.column%4,y?(this.partiallyConsumedTab=L>d,V=L>d?d:L,this.column+=V,this.offset+=this.partiallyConsumedTab?0:1,d-=V):(this.partiallyConsumedTab=!1,this.column+=L,this.offset+=1,d-=1)):(this.partiallyConsumedTab=!1,this.offset+=1,this.column+=1,d-=1)},h.prototype.advanceNextNonspace=function(){this.offset=this.nextNonspace,this.column=this.nextNonspaceColumn,this.partiallyConsumedTab=!1},h.prototype.findNextNonspace=function(){for(var d=this.currentLine,y=this.offset,S=this.column,L;(L=d.charAt(y))!=="";)if(L===" ")y++,S++;else if(L===" ")y++,S+=4-S%4;else break;this.blank=L===`
|
|
710
|
-
`||L==="\r"||L==="",this.nextNonspace=y,this.nextNonspaceColumn=S,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=Ml},h.prototype.addLine=function(){if(this.partiallyConsumedTab){this.offset+=1;var d=4-this.column%4;this.tip.stringContent+=ef(" ",d)}this.tip.lineOffsets?this.tip.lineOffsets.push(this.offset):this.tip.lineOffsets=[this.offset],this.tip.stringContent+=this.currentLine.slice(this.offset)+`
|
|
711
|
-
`},h.prototype.addChild=function(d,y){for(;!bo[this.tip.type].canContain(d);)this.finalize(this.tip,this.lineNumber-1);var S=y+1,L=ur(d,[[this.lineNumber,S],[0,0]]);return L.stringContent="",this.tip.appendChild(L),this.tip=L,L},h.prototype.closeUnmatchedBlocks=function(){if(!this.allClosed){for(;this.oldtip!==this.lastMatchedContainer;){var d=this.oldtip.parent;this.finalize(this.oldtip,this.lineNumber-1),this.oldtip=d}this.allClosed=!0}},h.prototype.finalize=function(d,y){var S=d.parent;d.open=!1,d.sourcepos[1]=[y,this.lastLineLength],bo[d.type].finalize(this,d),this.tip=S},h.prototype.processInlines=function(d){var y,S=this.options.customParser,L=d.walker();for(this.inlineParser.refMap=this.refMap,this.inlineParser.refLinkCandidateMap=this.refLinkCandidateMap,this.inlineParser.refDefCandidateMap=this.refDefCandidateMap,this.inlineParser.options=this.options;y=L.next();){var V=y.node,G=y.entering,te=V.type;S&&S[te]&&S[te](V,{entering:G,options:this.options}),!G&&(te==="paragraph"||te==="heading"||te==="tableCell"&&!V.ignored)&&this.inlineParser.parse(V)}},h.prototype.incorporateLine=function(d){var y=this.doc;this.oldtip=this.tip,this.offset=0,this.column=0,this.blank=!1,this.partiallyConsumedTab=!1,this.lineNumber+=1,d.indexOf("\0")!==-1&&(d=d.replace(/\0/g,"�")),this.currentLine=d;for(var S=!0,L;(L=y.lastChild)&&L.open;){switch(y=L,this.findNextNonspace(),bo[y.type].continue(this,y)){case 0:break;case 1:S=!1;break;case 2:this.lastLineLength=d.length;return;default:throw new Error("continue returned illegal value, must be 0, 1, or 2")}if(!S){y=y.parent;break}}this.allClosed=y===this.oldtip,this.lastMatchedContainer=y;for(var V=y.type!=="paragraph"&&bo[y.type].acceptsLines,G=hf.length;!V;){if(this.findNextNonspace(),y.type!=="table"&&y.type!=="tableBody"&&y.type!=="paragraph"&&!this.indented&&!tX.test(d.slice(this.nextNonspace))){this.advanceNextNonspace();break}for(var te=0;te<G;){var Se=hf[te](this,y);if(Se===1){y=this.tip;break}else if(Se===2){y=this.tip,V=!0;break}else te++}if(te===G){this.advanceNextNonspace();break}}if(!this.allClosed&&!this.blank&&this.tip.type==="paragraph")this.addLine();else{this.closeUnmatchedBlocks(),this.blank&&y.lastChild&&(y.lastChild.lastLineBlank=!0);for(var Ae=y.type,Ve=this.blank&&!(Ae==="blockQuote"||bp(y)&&y.isFenced||Ae==="item"&&!y.firstChild&&y.sourcepos[0][0]===this.lineNumber),We=y;We;)We.lastLineBlank=Ve,We=We.parent;bo[Ae].acceptsLines?(this.addLine(),fY(y)&&y.htmlBlockType>=1&&y.htmlBlockType<=5&&eX[y.htmlBlockType].test(this.currentLine.slice(this.offset))&&(this.lastLineLength=d.length,this.finalize(y,this.lineNumber))):this.offset<d.length&&!this.blank&&(y=this.addChild("paragraph",this.offset),this.advanceNextNonspace(),this.addLine())}this.lastLineLength=d.length},h.prototype.parse=function(d,y){this.doc=pf(),this.tip=this.doc,this.lineNumber=0,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";var S=d.split(rX),L=S.length;this.lines=y||S,this.options.referenceDefinition&&this.clearRefMaps(),d.charCodeAt(d.length-1)===of&&(L-=1);for(var V=0;V<L;V++)this.incorporateLine(S[V]);for(;this.tip;)this.finalize(this.tip,L);return this.processInlines(this.doc),this.doc},h.prototype.partialParseStart=function(d,y){this.doc=pf(),this.tip=this.doc,this.lineNumber=d-1,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";for(var S=y.length,L=0;L<S;L++)this.incorporateLine(y[L]);return this.doc},h.prototype.partialParseExtends=function(d){for(var y=0;y<d.length;y++)this.incorporateLine(d[y])},h.prototype.partialParseFinish=function(){for(;this.tip;)this.finalize(this.tip,this.lineNumber);this.processInlines(this.doc)},h.prototype.setRefMaps=function(d,y,S){this.refMap=d,this.refLinkCandidateMap=y,this.refDefCandidateMap=S},h.prototype.clearRefMaps=function(){[this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap].forEach(function(d){_Y(d)})},h})();function jp(h,d){return h[0]<d[0]?1:h[0]>d[0]?-1:h[1]<d[1]?1:h[1]>d[1]?-1:0}function aX(h,d){var y=h[0],S=h[1];return jp(S,d)===1?1:jp(y,d)===-1?-1:0}function oX(h,d){if(!(h.parent!==d.parent||h===d)){for(var y=h.next;y&&y!==d;){for(var S=y.next,L=0,V=["parent","prev","next"];L<V.length;L++){var G=V[L];y[G]&&(rf(y[G].id),y[G]=null)}y=S}h.next=d.next,d.next?d.next.prev=h:h.parent.lastChild=h}}function sX(h){for(var d=[],y=h.firstChild;y;)d.push(y),y=y.next;return d}function Gp(h,d){for(var y=0,S=d;y<S.length;y++){var L=S[y];h.insertBefore(L)}}function lX(h,d){for(var y=d.length-1;y>=0;y-=1)h.prependChild(d[y])}function uX(h,d){if(!(!h||!h.parent||d===0)){var y=h.parent.walker();y.resumeAt(h,!0);for(var S;S=y.next();){var L=S.node,V=S.entering;V&&(L.sourcepos[0][0]+=d,L.sourcepos[1][0]+=d)}}}function Kp(h,d){var y=h[0],S=h[1];return S[0]<d?1:y[0]>d?-1:0}function Al(h,d){for(var y=h.firstChild;y;){var S=Kp(y.sourcepos,d);if(S===0)return y;if(S===-1)return y.prev||y;y=y.next}return h.lastChild}function cX(h){for(;h.lastChild;)h=h.lastChild;return h}function fX(h){for(;h.parent&&h.parent.type!=="document"&&h.parent.sourcepos[0][0]===h.sourcepos[0][0];)h=h.parent;return h}function dX(h,d){for(var y=h.firstChild,S=null;y;){var L=Kp(y.sourcepos,d);if(L===0){if(y.sourcepos[0][0]===d||!y.firstChild)return y;S=y,y=y.firstChild}else{if(L===-1)break;S=y,y=y.next}}return S?fX(cX(S)):null}function hX(h,d){for(var y=h,S=null;y;){var L=aX(y.sourcepos,d);if(L===0)if(y.firstChild)S=y,y=y.firstChild;else return y;else{if(L===-1)return S;if(y.next)y=y.next;else return S}}return y}function Jp(h){return Z6(h)||null}function vf(h,d,y){if(y===void 0&&(y=null),d)for(var S=d.walker();d&&d!==y;){h(d);var L=S.next();if(L)d=L.node;else break}}function pX(h){var d=Jp(h);if(!d)return!0;for(;d&&d.type!=="document";){if(!d.parent&&!d.prev&&!d.next)return!0;d=d.parent}return!1}var Yp=/\r\n|\n|\r/;function vX(h){var d=h.match(/^[ \t]+/);if(d&&(d[0].length>=2||/\t/.test(d[0])))return!0;var y=d?h.slice(d.length):h;return Vp.test(y)||Up.test(y)}function mX(h){return!_p(h)&&h.indexOf("|")!==-1}function mf(h){var d=h.id,y=h.title,S=h.sourcepos,L=h.dest;return{id:d,title:y,sourcepos:S,unlinked:!1,destination:L}}var gX=(function(){function h(d,y){this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.referenceDefinition=!!(y!=null&&y.referenceDefinition),this.parser=new iX(y),this.parser.setRefMaps(this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap),this.eventHandlerMap={change:[]},d=d||"",this.lineTexts=d.split(Yp),this.root=this.parser.parse(d,this.lineTexts)}return h.prototype.updateLineTexts=function(d,y,S){var L,V=d[0],G=d[1],te=y[0],Se=y[1],Ae=S.split(Yp),Ve=Ae.length,We=this.lineTexts[V-1],qe=this.lineTexts[te-1];Ae[0]=We.slice(0,G-1)+Ae[0],Ae[Ve-1]=Ae[Ve-1]+qe.slice(Se-1);var rt=te-V+1;return(L=this.lineTexts).splice.apply(L,F([V-1,rt],Ae)),Ve-rt},h.prototype.updateRootNodeState=function(){if(this.lineTexts.length===1&&this.lineTexts[0]===""){this.root.lastLineBlank=!0,this.root.sourcepos=[[1,1],[1,0]];return}this.root.lastChild&&(this.root.lastLineBlank=this.root.lastChild.lastLineBlank);for(var d=this.lineTexts,y=d.length-1;d[y]==="";)y-=1;d.length-2>y&&(y+=1),this.root.sourcepos[1]=[y+1,d[y].length]},h.prototype.replaceRangeNodes=function(d,y,S){d?(Gp(d,S),oX(d,y),[d.id,y.id].forEach(function(L){return rf(L)}),d.unlink()):y?(Gp(y,S),rf(y.id),y.unlink()):lX(this.root,S)},h.prototype.getNodeRange=function(d,y){var S=Al(this.root,d[0]),L=Al(this.root,y[0]);return L&&L.next&&y[0]+1===L.next.sourcepos[0][0]&&(L=L.next),[S,L]},h.prototype.trigger=function(d,y){this.eventHandlerMap[d].forEach(function(S){S(y)})},h.prototype.extendEndLine=function(d){for(;this.lineTexts[d]==="";)d+=1;return d},h.prototype.parseRange=function(d,y,S,L){d&&d.prev&&(kp(d.prev)&&vX(this.lineTexts[S-1])||hY(d.prev)&&mX(this.lineTexts[S-1]))&&(d=d.prev,S=d.sourcepos[0][0]);for(var V=this.lineTexts.slice(S-1,L),G=this.parser.partialParseStart(S,V),te=y?y.next:this.root.firstChild,Se=G.lastChild,Ae=Se&&bp(Se)&&Se.open,Ve=Se&&wp(Se)&&Se.open,We=Se&&kp(Se);(Ae||Ve)&&te||We&&te&&(te.type==="list"||te.sourcepos[0][1]>=2);){var qe=this.extendEndLine(te.sourcepos[1][0]);this.parser.partialParseExtends(this.lineTexts.slice(L,qe)),d||(d=y),y=te,L=qe,te=te.next}this.parser.partialParseFinish();var rt=sX(G);return{newNodes:rt,extStartNode:d,extEndNode:y}},h.prototype.getRemovedNodeRange=function(d,y){return!d||d&&mo(d)||y&&mo(y)?null:{id:[d.id,y.id],line:[d.sourcepos[0][0]-1,y.sourcepos[1][0]-1]}},h.prototype.markDeletedRefMap=function(d,y){var S=this;if(!go(this.refMap)){var L=function(V){if(mo(V)){var G=S.refMap[V.label];G&&V.id===G.id&&(G.unlinked=!0)}};d&&vf(L,d.parent,y),y&&vf(L,y)}},h.prototype.replaceWithNewRefDefState=function(d){var y=this;if(!go(this.refMap)){var S=function(L){if(mo(L)){var V=L.label,G=y.refMap[V];(!G||G.unlinked)&&(y.refMap[V]=mf(L))}};d.forEach(function(L){vf(S,L)})}},h.prototype.replaceWithRefDefCandidate=function(){var d=this;go(this.refDefCandidateMap)||Sl(this.refDefCandidateMap,function(y,S){var L=S.label,V=S.sourcepos,G=d.refMap[L];(!G||G.unlinked||G.sourcepos[0][0]>V[0][0])&&(d.refMap[L]=mf(S))})},h.prototype.getRangeWithRefDef=function(d,y,S,L,V){if(this.referenceDefinition&&!go(this.refMap)){var G=Al(this.root,d-1),te=Al(this.root,y+1);G&&mo(G)&&G!==S&&G!==L&&(S=G,d=S.sourcepos[0][0]),te&&mo(te)&&te!==S&&te!==L&&(L=te,y=this.extendEndLine(L.sourcepos[1][0]+V))}return[S,L,d,y]},h.prototype.parse=function(d,y,S){S===void 0&&(S=0);var L=this.getNodeRange(d,y),V=L[0],G=L[1],te=V?Math.min(V.sourcepos[0][0],d[0]):d[0],Se=this.extendEndLine((G?Math.max(G.sourcepos[1][0],y[0]):y[0])+S),Ae=this.parseRange.apply(this,this.getRangeWithRefDef(te,Se,V,G,S)),Ve=Ae.newNodes,We=Ae.extStartNode,qe=Ae.extEndNode,rt=this.getRemovedNodeRange(We,qe),tt=qe?qe.next:this.root.firstChild;return this.referenceDefinition?(this.markDeletedRefMap(We,qe),this.replaceRangeNodes(We,qe,Ve),this.replaceWithNewRefDefState(Ve)):this.replaceRangeNodes(We,qe,Ve),{nodes:Ve,removedNodeRange:rt,nextNode:tt}},h.prototype.parseRefLink=function(){var d=this,y=[];return go(this.refMap)||Sl(this.refMap,function(S,L){L.unlinked&&delete d.refMap[S],Sl(d.refLinkCandidateMap,function(V,G){var te=G.node,Se=G.refLabel;Se===S&&y.push(d.parse(te.sourcepos[0],te.sourcepos[1]))})}),y},h.prototype.removeUnlinkedCandidate=function(){go(this.refDefCandidateMap)||[this.refLinkCandidateMap,this.refDefCandidateMap].forEach(function(d){Sl(d,function(y){pX(y)&&delete d[y]})})},h.prototype.editMarkdown=function(d,y,S){var L=this.updateLineTexts(d,y,S),V=this.parse(d,y,L),G=HY(V,"nextNode");uX(V.nextNode,L),this.updateRootNodeState();var te=[G];return this.referenceDefinition&&(this.removeUnlinkedCandidate(),this.replaceWithRefDefCandidate(),te=te.concat(this.parseRefLink())),this.trigger("change",te),te},h.prototype.getLineTexts=function(){return this.lineTexts},h.prototype.getRootNode=function(){return this.root},h.prototype.findNodeAtPosition=function(d){var y=hX(this.root,d);return!y||y===this.root?null:y},h.prototype.findFirstNodeAtLine=function(d){return dX(this.root,d)},h.prototype.on=function(d,y){this.eventHandlerMap[d].push(y)},h.prototype.off=function(d,y){var S=this.eventHandlerMap[d],L=S.indexOf(y);S.splice(L,1)},h.prototype.findNodeById=function(d){return Jp(d)},h.prototype.removeAllNode=function(){Q6()},h})(),yX=["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"],Xp=new RegExp("<(/?(?:"+yX.join("|")+")[^>]*>)","ig");function Zp(h){return Xp.test(h)?h.replace(Xp,function(d,y){return"<"+y}):h}var Qp={heading:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"h"+h.level,outerNewLine:!0}},text:function(h){return{type:"text",content:h.literal}},softbreak:function(h,d){var y=d.options;return{type:"html",content:y.softbreak}},linebreak:function(){return{type:"html",content:`<br />
|
|
712
|
-
`}},emph:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"em"}},strong:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"strong"}},paragraph:function(h,d){var y,S=d.entering,L=(y=h.parent)===null||y===void 0?void 0:y.parent;return L&&L.type==="list"&&L.listData.tight?null:{type:S?"openTag":"closeTag",tagName:"p",outerNewLine:!0}},thematicBreak:function(){return{type:"openTag",tagName:"hr",outerNewLine:!0,selfClose:!0}},blockQuote:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"blockquote",outerNewLine:!0,innerNewLine:!0}},list:function(h,d){var y=d.entering,S=h.listData,L=S.type,V=S.start,G=L==="bullet"?"ul":"ol",te={};return G==="ol"&&V!==null&&V!==1&&(te.start=V.toString()),{type:y?"openTag":"closeTag",tagName:G,attributes:te,outerNewLine:!0}},item:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"li",outerNewLine:!0}},htmlInline:function(h,d){var y=d.options,S=y.tagFilter?Zp(h.literal):h.literal;return{type:"html",content:S}},htmlBlock:function(h,d){var y=d.options,S=y.tagFilter?Zp(h.literal):h.literal;return y.nodeId?[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"html",content:S},{type:"closeTag",tagName:"div",outerNewLine:!0}]:{type:"html",content:S,outerNewLine:!0}},code:function(h){return[{type:"openTag",tagName:"code"},{type:"text",content:h.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(h){var d=h.info,y=d?d.split(/\s+/):[],S=[];return y.length>0&&y[0].length>0&&S.push("language-"+vo(y[0])),[{type:"openTag",tagName:"pre",outerNewLine:!0},{type:"openTag",tagName:"code",classNames:S},{type:"text",content:h.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre",outerNewLine:!0}]},link:function(h,d){var y=d.entering;if(y){var S=h,L=S.title,V=S.destination;return{type:"openTag",tagName:"a",attributes:P({href:vo(V)},L&&{title:vo(L)})}}return{type:"closeTag",tagName:"a"}},image:function(h,d){var y=d.getChildrenText,S=d.skipChildren,L=h,V=L.title,G=L.destination;return S(),{type:"openTag",tagName:"img",selfClose:!0,attributes:P({src:vo(G),alt:y(h)},V&&{title:vo(V)})}},customBlock:function(h,d,y){var S=h.info.trim().toLowerCase(),L=y[S];if(L)try{return L(h,d)}catch(V){console.warn("[@toast-ui/editor] - The error occurred when "+S+" block node was parsed in markdown renderer: "+V)}return[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"text",content:h.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},frontMatter:function(h){return[{type:"openTag",tagName:"div",outerNewLine:!0,attributes:{style:"white-space: pre; display: none;"}},{type:"text",content:h.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},customInline:function(h,d,y){var S=h,L=S.info,V=S.firstChild,G=L.trim().toLowerCase(),te=y[G],Se=d.entering;if(te)try{return te(h,d)}catch(Ae){console.warn("[@toast-ui/editor] - The error occurred when "+G+" inline node was parsed in markdown renderer: "+Ae)}return Se?[{type:"openTag",tagName:"span"},{type:"text",content:"$$"+L+(V?" ":"")}]:[{type:"text",content:"$$"},{type:"closeTag",tagName:"span"}]}},ev={strike:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"del"}},item:function(h,d){var y=d.entering,S=h.listData,L=S.checked,V=S.task;if(y){var G={type:"openTag",tagName:"li",outerNewLine:!0};return V?[G,{type:"openTag",tagName:"input",selfClose:!0,attributes:P(P({},L&&{checked:""}),{disabled:"",type:"checkbox"})},{type:"text",content:" "}]:G}return{type:"closeTag",tagName:"li",outerNewLine:!0}},table:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"table",outerNewLine:!0}},tableHead:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"thead",outerNewLine:!0}},tableBody:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"tbody",outerNewLine:!0}},tableRow:function(h,d){var y=d.entering;if(y)return{type:"openTag",tagName:"tr",outerNewLine:!0};var S=[];if(h.lastChild)for(var L=h.parent.parent.columns.length,V=h.lastChild.endIdx,G=V+1;G<L;G+=1)S.push({type:"openTag",tagName:"td",outerNewLine:!0},{type:"closeTag",tagName:"td",outerNewLine:!0});return S.push({type:"closeTag",tagName:"tr",outerNewLine:!0}),S},tableCell:function(h,d){var y=d.entering;if(h.ignored)return{type:"text",content:""};var S=h.parent.parent,L=S.type==="tableHead"?"th":"td",V=S.parent,G=V.columns[h.startIdx],te=G!=null&&G.align?{align:G.align}:null;return y?P({type:"openTag",tagName:L,outerNewLine:!0},te&&{attributes:te}):{type:"closeTag",tagName:L,outerNewLine:!0}}},bX={softbreak:`
|
|
713
|
-
`,gfm:!1,tagFilter:!1,nodeId:!1};function kX(h){for(var d=[],y=h.walker(),S=null;S=y.next();){var L=S.node;L.type==="text"&&d.push(L.literal)}return d.join("")}var wX=(function(){function h(d){this.buffer=[],this.options=P(P({},bX),d),this.convertors=this.createConvertors(),delete this.options.convertors}return h.prototype.createConvertors=function(){var d=P({},Qp);if(this.options.gfm&&(d=P(P({},d),ev)),this.options.convertors){var y=this.options.convertors,S=Object.keys(y),L=P(P({},Qp),ev);S.forEach(function(V){var G=d[V],te=y[V],Se=Object.keys(L).indexOf(V)===-1?V.toLowerCase():V;G?d[Se]=function(Ae,Ve,We){return Ve.origin=function(){return G(Ae,Ve,We)},te(Ae,Ve)}:d[Se]=te})}return d},h.prototype.getConvertors=function(){return this.convertors},h.prototype.getOptions=function(){return this.options},h.prototype.render=function(d){var y=this;this.buffer=[];for(var S=d.walker(),L=null,V=function(){var te=L.node,Se=L.entering,Ae=G.convertors[te.type];if(!Ae)return"continue";var Ve=!1,We={entering:Se,leaf:!tf(te),options:G.options,getChildrenText:kX,skipChildren:function(){Ve=!0}},qe=wp(te)||pY(te)?Ae(te,We,G.convertors):Ae(te,We);if(qe){var rt=Array.isArray(qe)?qe:[qe];rt.forEach(function(tt,Rt){tt.type==="openTag"&&y.options.nodeId&&Rt===0&&(tt.attributes||(tt.attributes={}),tt.attributes["data-nodeid"]=String(te.id)),y.renderHTMLNode(tt)}),Ve&&(S.resumeAt(te,!1),S.next())}},G=this;L=S.next();)V();return this.addNewLine(),this.buffer.join("")},h.prototype.renderHTMLNode=function(d){switch(d.type){case"openTag":case"closeTag":this.renderElementNode(d);break;case"text":this.renderTextNode(d);break;case"html":this.renderRawHtmlNode(d);break}},h.prototype.generateOpenTagString=function(d){var y=this,S=d.tagName,L=d.classNames,V=d.attributes;this.buffer.push("<"+S),L&&L.length>0&&this.buffer.push(' class="'+L.join(" ")+'"'),V&&Object.keys(V).forEach(function(G){var te=V[G];y.buffer.push(" "+G+'="'+te+'"')}),d.selfClose&&this.buffer.push(" /"),this.buffer.push(">")},h.prototype.generateCloseTagString=function(d){var y=d.tagName;this.buffer.push("</"+y+">")},h.prototype.addNewLine=function(){this.buffer.length&&Tl(Tl(this.buffer))!==`
|
|
714
|
-
`&&this.buffer.push(`
|
|
715
|
-
`)},h.prototype.addOuterNewLine=function(d){d.outerNewLine&&this.addNewLine()},h.prototype.addInnerNewLine=function(d){d.innerNewLine&&this.addNewLine()},h.prototype.renderTextNode=function(d){this.buffer.push(vo(d.content))},h.prototype.renderRawHtmlNode=function(d){this.addOuterNewLine(d),this.buffer.push(d.content),this.addOuterNewLine(d)},h.prototype.renderElementNode=function(d){d.type==="openTag"?(this.addOuterNewLine(d),this.generateOpenTagString(d),d.selfClose?this.addOuterNewLine(d):this.addInnerNewLine(d)):(this.addInnerNewLine(d),this.generateCloseTagString(d),this.addOuterNewLine(d))},h})(),CX=f(956),TX=f.n(CX),SX=f(969),tv=f.n(SX),xX=f(348),rv=f.n(xX),EX=f(349),nv=f.n(EX),MX=f(204),iv=f.n(MX),AX=f(462),gf=f.n(AX),OX=f(522),av=f.n(OX),NX=f(990),DX=f.n(NX),LX=f(322),RX=f.n(LX),IX=f(758),PX=f.n(IX),BX=f(929),Ol=f.n(BX),FX=f(714),qX=f.n(FX);f(471);var ov="[A-Za-z][A-Za-z0-9-]*",HX="[a-zA-Z_:][a-zA-Z0-9:._-]*",_X="[^\"'=<>`\\x00-\\x20]+",zX="'[^']*'",VX='"[^"]*"',UX="(?:"+_X+"|"+zX+"|"+VX+")",$X="(?:\\s*=\\s*"+UX+")",sv="(?:\\s+"+HX+$X+"?)",WX="<("+ov+")("+sv+")*\\s*/?>",jX="</("+ov+")\\s*[>]",GX="(?:"+WX+"|"+jX+")",lv=new RegExp("^"+GX,"i");f(934),f(391);function yf(h,d){return h.indexOf(d)!==-1}var KX=["rel","target","hreflang","type"];function JX(h){if(!h)return null;var d={};return KX.forEach(function(y){Ol()(h[y])||(d[y]=h[y])}),d}function YX(h){return h[h.length-1]}function bf(h){return typeof h=="object"&&h!==null}function kf(h,d){var y=b({},h);return h&&d&&Object.keys(d).forEach(function(S){bf(y[S])?Array.isArray(d[S])?y[S]=wf(d[S]):y.hasOwnProperty(S)?y[S]=kf(y[S],d[S]):y[S]=Cf(d[S]):y[S]=d[S]}),y}function wf(h){return h.map(function(d){return bf(d)?Array.isArray(d)?wf(d):Cf(d):d})}function Cf(h){var d=Object.keys(h);return d.length?d.reduce(function(y,S){return bf(h[S])?y[S]=Array.isArray(h[S])?wf(h[S]):Cf(h[S]):y[S]=h[S],y},{}):h}function uv(h,d){return d===void 0&&(d={}),Object.keys(d).forEach(function(y){h.hasOwnProperty(y)&&typeof h[y]=="object"?Array.isArray(d[y])?h[y]=d[y]:uv(h[y],d[y]):h[y]=d[y]}),h}function cv(h,d){return h>d?[d,h]:[h,d]}function XX(h,d,y){var S=parseInt(h.left,10),L=parseInt(h.top,10),V=parseInt(h.width,10)+parseInt(h.paddingLeft,10)+parseInt(h.paddingRight,10),G=parseInt(h.height,10)+parseInt(h.paddingTop,10)+parseInt(h.paddingBottom,10);return d>=S&&d<=S+V&&y>=L&&y<=L+G}var ZX="toastui-editor-";function Nl(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];for(var y=[],S=0,L=h;S<L.length;S++){var V=L[S],G=void 0;Array.isArray(V)?G=V[0]?V[1]:null:G=V,G&&y.push(""+ZX+G)}return y.join(" ")}function fv(h){h.parentNode&&h.parentNode.removeChild(h)}function dv(h,d,y){Ol()(y)&&(y=!qX()(h,d));var S=y?iv():gf();S(h,d)}function QX(h,d){var y=document.createElement("div");PX()(h)?y.innerHTML=h:y.appendChild(h);var S=y.firstChild;return S}function eZ(h){var d=/<img class="ProseMirror-separator" alt="">/g,y=/ class="ProseMirror-trailingBreak"/g,S=h;return S=S.replace(d,""),S=S.replace(y,""),S}var tZ=f(294),hv=f.n(tZ);function rZ(h){return h.sourcepos[0][1]}function nZ(h){switch(h.type){case"code":case"text":case"emph":case"strong":case"strike":case"link":case"image":case"htmlInline":case"linebreak":case"softbreak":case"customInline":return!0;default:return!1}}function iZ(h,d,y){for(y===void 0&&(y=!0),h=y?h:h.parent;h&&h.type!=="document";){if(d(h))return h;h=h.parent}return null}function aZ(h){var d=h.firstChild.literal;switch(h.type){case"emph":return"*"+d+"*";case"strong":return"**"+d+"**";case"strike":return"~~"+d+"~~";case"code":return"`"+d+"`";case"link":case"image":var y=h,S=y.destination,L=y.title,V=h.type==="link"?"":"!";return V+"["+d+"]("+S+(L?' "'+L+'"':"")+")";default:return null}}var oZ={},pv=/\$\$widget\d+\s/;function vv(h){var d=h.search(pv);if(d!==-1){var y=h.substring(d),S=y.replace(pv,"").replace("$$","");h=h.substring(0,d),h+=vv(S)}return h}function sZ(h,d){var y=oZ[h],S=y.rule,L=y.toDOM,V=vv(d).match(S);return V&&(d=V[0]),L(d)}function lZ(h){for(var d,y="",S=h.walker();d=S.next();){var L=d.node,V=d.entering;V&&(L!==h&&L.type!=="text"?(y+=aZ(L),S.resumeAt(h,!1),S.next()):L.type==="text"&&(y+=L.literal))}return y}var uZ=f(368),cZ=f.n(uZ),fZ=["iframe","embed"],mv=[];function dZ(h){yf(fZ,h)&&mv.push(h.toLowerCase())}function hZ(h,d){return cZ().sanitize(h,b({ADD_TAGS:mv,ADD_ATTR:["rel","target","hreflang","type"],FORBID_TAGS:["input","script","textarea","form","button","select","meta","style","link","title","object","base"]},d))}function pZ(h,d){return h.literal.replace(new RegExp("(<\\s*"+d+"[^>]*>)|(</"+d+"\\s*[>])","ig"),"").trim()}function vZ(h){h=h.match(lv)[0];var d=h.match(new RegExp(sv,"g"));return d?d.reduce(function(y,S){var L=S.trim().split("="),V=L[0],G=L.slice(1);return G.length&&(y[V]=G.join("=").replace(/'|"/g,"").trim()),y},{}):{}}var mZ=/^\s*<\s*\//,gZ={paragraph:function(h,d){var y=d.entering,S=d.origin,L=d.options;return L.nodeId?{type:y?"openTag":"closeTag",outerNewLine:!0,tagName:"p"}:S()},softbreak:function(h){var d=h.prev&&h.prev.type==="htmlInline",y=d&&/<br ?\/?>/.test(h.prev.literal),S=y?`
|
|
716
|
-
`:`<br>
|
|
717
|
-
`;return{type:"html",content:S}},item:function(h,d){var y=d.entering;if(y){var S={},L=[];return h.listData.task&&(S["data-task"]="",L.push("task-list-item"),h.listData.checked&&(L.push("checked"),S["data-task-checked"]="")),{type:"openTag",tagName:"li",classNames:L,attributes:S,outerNewLine:!0}}return{type:"closeTag",tagName:"li",outerNewLine:!0}},code:function(h){var d={"data-backticks":String(h.tickCount)};return[{type:"openTag",tagName:"code",attributes:d},{type:"text",content:h.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(h){var d=h,y=d.fenceLength,S=d.info,L=S?S.split(/\s+/):[],V=[],G={};if(y>3&&(G["data-backticks"]=y),L.length>0&&L[0].length>0){var te=L[0];V.push("lang-"+te),G["data-language"]=te}return[{type:"openTag",tagName:"pre",classNames:V},{type:"openTag",tagName:"code",attributes:G},{type:"text",content:h.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre"}]},customInline:function(h,d){var y=d.origin,S=d.entering,L=d.skipChildren,V=h.info;if(V.indexOf("widget")!==-1&&S){L();var G=lZ(h),te=sZ(V,G).outerHTML;return[{type:"openTag",tagName:"span",classNames:["tui-widget"]},{type:"html",content:te},{type:"closeTag",tagName:"span"}]}return y()}};function yZ(h,d){var y=b({},gZ);return h&&(y.link=function(S,L){var V=L.entering,G=L.origin,te=G();return V&&(te.attributes=b(b({},te.attributes),h)),te}),d&&Object.keys(d).forEach(function(S){var L=y[S],V=d[S];L&&hv()(V)?y[S]=function(G,te){var Se=b({},te);return Se.origin=function(){return L(G,te)},V(G,Se)}:yf(["htmlBlock","htmlInline"],S)&&!hv()(V)?y[S]=function(G,te){var Se=G.literal.match(lv);if(Se){var Ae=Se[0],Ve=Se[1],We=Se[3],qe=(Ve||We).toLowerCase(),rt=V[qe],tt=pZ(G,qe);if(rt){var Rt=b({},G);return Rt.attrs=vZ(Ae),Rt.childrenHTML=tt,Rt.type=qe,te.entering=!mZ.test(G.literal),rt(Rt,te)}}return te.origin()}:y[S]=V}),y}var bZ=["UL","OL","BLOCKQUOTE"];function kZ(h,d){for(var y=0;h&&h!==d&&(yf(bZ,h.tagName)||(y+=h.offsetTop),h.offsetParent!==d.offsetParent);)h=h.parentElement;return y}function wZ(h,d){for(var y=d,S=null;y;){var L=y.firstElementChild;if(!L)break;var V=gv(L,h,kZ(y,d));S=y,y=V}var G=y||S;return G===d?null:G}function gv(h,d,y){return h&&d>y+h.offsetTop?gv(h.nextElementSibling,d,y)||h:null}var CZ={};function Tf(h){h&&(delete CZ[Number(h.getAttribute("data-nodeid"))],DX()(h.children).forEach(function(d){Tf(d)}))}var Sf=Nl("md-preview-highlight");function TZ(h,d){for(var y=h.firstChild;y&&y.next&&!(rZ(y.next)>d+1);)y=y.next;return y}var SZ=(function(){function h(d,y){var S=document.createElement("div");this.el=S,this.eventEmitter=d,this.isViewer=!!y.isViewer,this.el.className=Nl("md-preview");var L=y.linkAttributes,V=y.customHTMLRenderer,G=y.sanitizer,te=y.highlight,Se=te===void 0?!1:te;this.renderer=new wX({gfm:!0,nodeId:!0,convertors:yZ(L,V)}),this.cursorNodeId=null,this.sanitizer=G,this.initEvent(Se),this.initContentSection(),this.isViewer&&(this.previewContent.style.overflowWrap="break-word")}return h.prototype.initContentSection=function(){this.previewContent=QX('<div class="'+Nl("contents")+'"></div>'),this.isViewer||this.el.appendChild(this.previewContent)},h.prototype.toggleActive=function(d){dv(this.el,"active",d)},h.prototype.initEvent=function(d){var y=this;this.eventEmitter.listen("updatePreview",this.update.bind(this)),!this.isViewer&&(d&&(this.eventEmitter.listen("changeToolbarState",function(S){var L=S.mdNode,V=S.cursorPos;y.updateCursorNode(L,V)}),this.eventEmitter.listen("blur",function(){y.removeHighlight()})),rv()(this.el,"scroll",function(S){y.eventEmitter.emit("scroll","preview",wZ(S.target.scrollTop,y.previewContent))}),this.eventEmitter.listen("changePreviewTabPreview",function(){return y.toggleActive(!0)}),this.eventEmitter.listen("changePreviewTabWrite",function(){return y.toggleActive(!1)}))},h.prototype.removeHighlight=function(){if(this.cursorNodeId){var d=this.getElementByNodeId(this.cursorNodeId);d&&gf()(d,Sf)}},h.prototype.updateCursorNode=function(d,y){d&&(d=iZ(d,function(G){return!nZ(G)}),d.type==="tableRow"?d=TZ(d,y[1]):d.type==="tableBody"&&(d=null));var S=d?d.id:null;if(this.cursorNodeId!==S){var L=this.getElementByNodeId(this.cursorNodeId),V=this.getElementByNodeId(S);L&&gf()(L,Sf),V&&iv()(V,Sf),this.cursorNodeId=S}},h.prototype.getElementByNodeId=function(d){return d?this.previewContent.querySelector('[data-nodeid="'+d+'"]'):null},h.prototype.update=function(d){var y=this;d.forEach(function(S){return y.replaceRangeNodes(S)}),this.eventEmitter.emit("afterPreviewRender",this)},h.prototype.replaceRangeNodes=function(d){var y=this,S=d.nodes,L=d.removedNodeRange,V=this.previewContent,G=this.eventEmitter.emitReduce("beforePreviewRender",this.sanitizer(S.map(function(tt){return y.renderer.render(tt)}).join("")));if(!L)V.insertAdjacentHTML("afterbegin",G);else{var te=L.id,Se=te[0],Ae=te[1],Ve=this.getElementByNodeId(Se),We=this.getElementByNodeId(Ae);if(Ve){Ve.insertAdjacentHTML("beforebegin",G);for(var qe=Ve;qe&&qe!==We;){var rt=qe.nextElementSibling;fv(qe),Tf(qe),qe=rt}qe!=null&&qe.parentNode&&(fv(qe),Tf(qe))}}},h.prototype.getRenderer=function(){return this.renderer},h.prototype.destroy=function(){nv()(this.el,"scroll"),this.el=null},h.prototype.getElement=function(){return this.el},h.prototype.getHTML=function(){return eZ(this.previewContent.innerHTML)},h.prototype.setHTML=function(d){this.previewContent.innerHTML=d},h.prototype.setHeight=function(d){av()(this.el,{height:d+"px"})},h.prototype.setMinHeight=function(d){av()(this.el,{minHeight:d+"px"})},h})(),xZ=SZ,Dl=f(814),xf=f(479),yv=f(311),EZ=f(481),MZ=f(43),AZ=f(928),OZ=f.n(AZ),NZ=(function(){function h(){this.keys=[],this.values=[]}return h.prototype.getKeyIndex=function(d){return OZ()(d,this.keys)},h.prototype.get=function(d){return this.values[this.getKeyIndex(d)]},h.prototype.set=function(d,y){var S=this.getKeyIndex(d);return S>-1?this.values[S]=y:(this.keys.push(d),this.values.push(y)),this},h.prototype.has=function(d){return this.getKeyIndex(d)>-1},h.prototype.delete=function(d){var y=this.getKeyIndex(d);return y>-1?(this.keys.splice(y,1),this.values.splice(y,1),!0):!1},h.prototype.forEach=function(d,y){var S=this;y===void 0&&(y=this),this.values.forEach(function(L,V){L&&S.keys[V]&&d.call(y,L,S.keys[V],S)})},h.prototype.clear=function(){this.keys=[],this.values=[]},h})(),bv=NZ,Ef="en-US",DZ=(function(){function h(){this.code=Ef,this.langs=new bv}return h.prototype.setCode=function(d){this.code=d||Ef},h.prototype.setLanguage=function(d,y){var S=this;d=[].concat(d),d.forEach(function(L){if(!S.langs.has(L))S.langs.set(L,y);else{var V=S.langs.get(L);S.langs.set(L,tv()(V,y))}})},h.prototype.get=function(d,y){y||(y=this.code);var S=this.langs.get(y);S||(S=this.langs.get(Ef));var L=S[d];if(!L)throw new Error('There is no text key "'+d+'" in '+y);return L},h})(),LZ=new DZ;function RZ(h,d){for(var y=h.depth;y;){var S=h.node(y);if(d(S,y))return{node:S,depth:y,offset:y>0?h.before(y):0};y-=1}return null}var kv=new Map,wv=(function(){function h(d,y,S,L){this.table=d,this.tableRows=y,this.tableStartPos=S,this.rowInfo=L}return h.create=function(d){var y=RZ(d,function(tt){var Rt=tt.type;return Rt.name==="table"});if(y){var S=y.node,L=y.depth,V=y.offset,G=kv.get(S);if((G==null?void 0:G.tableStartPos)===V+1)return G;var te=[],Se=d.start(L),Ae=S.child(0),Ve=S.child(1),We=Mf(Ae,Se),qe=Mf(Ve,Se+Ae.nodeSize);Ae.forEach(function(tt){return te.push(tt)}),Ve.forEach(function(tt){return te.push(tt)});var rt=new h(S,te,Se,We.concat(qe));return kv.set(S,rt),rt}return null},Object.defineProperty(h.prototype,"totalRowCount",{get:function(){return this.rowInfo.length},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"totalColumnCount",{get:function(){return this.rowInfo[0].length},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"tableStartOffset",{get:function(){return this.tableStartPos},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"tableEndOffset",{get:function(){return this.tableStartPos+this.table.nodeSize-1},enumerable:!1,configurable:!0}),h.prototype.getCellInfo=function(d,y){return this.rowInfo[d][y]},h.prototype.posAt=function(d,y){for(var S=0,L=this.tableStartPos;;S+=1){var V=L+this.tableRows[S].nodeSize;if(S===d){for(var G=y;G<this.totalColumnCount&&this.rowInfo[S][G].offset<L;)G+=1;return G===this.totalColumnCount?V:this.rowInfo[S][G].offset}L=V}},h.prototype.getNodeAndPos=function(d,y){var S=this.rowInfo[d][y];return{node:this.table.nodeAt(S.offset-this.tableStartOffset),pos:S.offset}},h.prototype.extendedRowspan=function(d,y){return!1},h.prototype.extendedColspan=function(d,y){return!1},h.prototype.getRowspanCount=function(d,y){return 0},h.prototype.getColspanCount=function(d,y){return 0},h.prototype.decreaseColspanCount=function(d,y){return 0},h.prototype.decreaseRowspanCount=function(d,y){return 0},h.prototype.getColspanStartInfo=function(d,y){return null},h.prototype.getRowspanStartInfo=function(d,y){return null},h.prototype.getCellStartOffset=function(d,y){var S=this.rowInfo[d][y].offset;return this.extendedRowspan(d,y)?this.posAt(d,y):S},h.prototype.getCellEndOffset=function(d,y){var S=this.rowInfo[d][y],L=S.offset,V=S.nodeSize;return this.extendedRowspan(d,y)?this.posAt(d,y):L+V},h.prototype.getCellIndex=function(d){for(var y=0;y<this.totalRowCount;y+=1)for(var S=this.rowInfo[y],L=0;L<this.totalColumnCount;L+=1)if(S[L].offset+1>d.pos)return[y,L];return[0,0]},h.prototype.getRectOffsets=function(d,y){var S,L,V;y===void 0&&(y=d),d.pos>y.pos&&(S=[y,d],d=S[0],y=S[1]);var G=this.getCellIndex(d),te=G[0],Se=G[1],Ae=this.getCellIndex(y),Ve=Ae[0],We=Ae[1];return L=cv(te,Ve),te=L[0],Ve=L[1],V=cv(Se,We),Se=V[0],We=V[1],this.getSpannedOffsets({startRowIdx:te,startColIdx:Se,endRowIdx:Ve,endColIdx:We})},h.prototype.getSpannedOffsets=function(d){return d},h})(),Mf=function(h,d){var y=[];return h.forEach(function(S,L){var V={rowspanMap:{},colspanMap:{},length:0};S.forEach(function(G,te){for(var Se=G.nodeSize,Ae=0;V[Ae];)Ae+=1;V[Ae]={offset:d+L+te+2,nodeSize:Se},V.length+=1}),y.push(V)}),y};function IZ(h,d){return uv(wv.prototype,h),Mf=d,wv}function PZ(h){var d=h.plugin,y=h.eventEmitter,S=h.usageStatistics,L=h.instance,V={Plugin:Dl.Plugin,PluginKey:Dl.PluginKey,Selection:Dl.Selection,TextSelection:Dl.TextSelection},G={Decoration:yv.Decoration,DecorationSet:yv.DecorationSet},te={Fragment:MZ.Fragment},Se={InputRule:xf.InputRule,inputRules:xf.inputRules,undoInputRule:xf.undoInputRule},Ae={keymap:EZ.keymap},Ve={eventEmitter:y,usageStatistics:S,instance:L,pmState:V,pmView:G,pmModel:te,pmRules:Se,pmKeymap:Ae,i18n:LZ};if(RX()(d)){var We=d[0],qe=d[1],rt=qe===void 0?{}:qe;return We(Ve,rt)}return d(Ve)}function BZ(h){var d=h.plugins,y=h.eventEmitter,S=h.usageStatistics,L=h.instance;return y.listen("mixinTableOffsetMapPrototype",IZ),(d??[]).reduce(function(V,G){var te=PZ({plugin:G,eventEmitter:y,usageStatistics:S,instance:L});if(!te)throw new Error("The return value of the executed plugin is empty.");var Se=te.markdownParsers,Ae=te.toHTMLRenderers,Ve=te.toMarkdownRenderers,We=te.markdownPlugins,qe=te.wysiwygPlugins,rt=te.wysiwygNodeViews,tt=te.markdownCommands,Rt=te.wysiwygCommands,cr=te.toolbarItems;return Ae&&(V.toHTMLRenderers=kf(V.toHTMLRenderers,Ae)),Ve&&(V.toMarkdownRenderers=kf(V.toMarkdownRenderers,Ve)),We&&(V.mdPlugins=V.mdPlugins.concat(We)),qe&&(V.wwPlugins=V.wwPlugins.concat(qe)),rt&&(V.wwNodeViews=b(b({},V.wwNodeViews),rt)),tt&&(V.mdCommands=b(b({},V.mdCommands),tt)),Rt&&(V.wwCommands=b(b({},V.wwCommands),Rt)),cr&&(V.toolbarItems=V.toolbarItems.concat(cr)),Se&&(V.markdownParsers=b(b({},V.markdownParsers),Se)),V},{toHTMLRenderers:{},toMarkdownRenderers:{},mdPlugins:[],wwPlugins:[],wwNodeViews:{},mdCommands:{},wwCommands:{},toolbarItems:[],markdownParsers:{}})}var FZ=f(404),qZ=f.n(FZ),Cv=["afterPreviewRender","updatePreview","changeMode","needChangeMode","command","changePreviewStyle","changePreviewTabPreview","changePreviewTabWrite","scroll","contextmenu","show","hide","changeLanguage","changeToolbarState","toggleScrollSync","mixinTableOffsetMapPrototype","setFocusedNode","removePopupWidget","query","openPopup","closePopup","addImageBlobHook","beforePreviewRender","beforeConvertWysiwygToMarkdown","load","loadUI","change","caretChange","destroy","focus","blur","keydown","keyup"],HZ=(function(){function h(){var d=this;this.events=new bv,this.eventTypes=Cv.reduce(function(y,S){return b(b({},y),{type:S})},{}),this.hold=!1,Cv.forEach(function(y){d.addEventType(y)})}return h.prototype.listen=function(d,y){var S=this.getTypeInfo(d),L=this.events.get(S.type)||[];if(!this.hasEventType(S.type))throw new Error("There is no event type "+S.type);S.namespace&&(y.namespace=S.namespace),L.push(y),this.events.set(S.type,L)},h.prototype.emit=function(d){for(var y=[],S=1;S<arguments.length;S++)y[S-1]=arguments[S];var L=this.getTypeInfo(d),V=this.events.get(L.type),G=[];return!this.hold&&V&&V.forEach(function(te){var Se=te.apply(void 0,y);Ol()(Se)||G.push(Se)}),G},h.prototype.emitReduce=function(d,y){for(var S=[],L=2;L<arguments.length;L++)S[L-2]=arguments[L];var V=this.events.get(d);return!this.hold&&V&&V.forEach(function(G){var te=G.apply(void 0,T([y],S));qZ()(te)||(y=te)}),y},h.prototype.getTypeInfo=function(d){var y=d.split(".");return{type:y[0],namespace:y[1]}},h.prototype.hasEventType=function(d){return!Ol()(this.eventTypes[this.getTypeInfo(d).type])},h.prototype.addEventType=function(d){if(this.hasEventType(d))throw new Error("There is already have event type "+d);this.eventTypes[d]=d},h.prototype.removeEventHandler=function(d,y){var S=this,L=this.getTypeInfo(d),V=L.type,G=L.namespace;V&&y?this.removeEventHandlerWithHandler(V,y):V&&!G?this.events.delete(V):!V&&G?this.events.forEach(function(te,Se){S.removeEventHandlerWithTypeInfo(Se,G)}):V&&G&&this.removeEventHandlerWithTypeInfo(V,G)},h.prototype.removeEventHandlerWithHandler=function(d,y){var S=this.events.get(d);if(S){var L=S.indexOf(y);S.indexOf(y)>=0&&S.splice(L,1)}},h.prototype.removeEventHandlerWithTypeInfo=function(d,y){var S=[],L=this.events.get(d);L&&(L.map(function(V){return V.namespace!==y&&S.push(V),null}),this.events.set(d,S))},h.prototype.getEvents=function(){return this.events},h.prototype.holdEventInvoke=function(d){this.hold=!0,d(),this.hold=!1},h})(),_Z=HZ,zZ="data-task",VZ="data-task-disabled",UZ="checked";function $Z(h){["htmlBlock","htmlInline"].forEach(function(d){h[d]&&Object.keys(h[d]).forEach(function(y){return dZ(y)})})}var WZ=(function(){function h(d){var y=this;this.options=tv()({linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,usageStatistics:!0,theme:"light"},d),this.eventEmitter=new _Z;var S=JX(this.options.linkAttributes),L=BZ({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this})||{},V=L.toHTMLRenderers,G=L.markdownParsers,te=this.options,Se=te.customHTMLRenderer,Ae=te.extendedAutolinks,Ve=te.referenceDefinition,We=te.frontMatter,qe=te.customHTMLSanitizer,rt={linkAttributes:S,customHTMLRenderer:b(b({},V),Se),extendedAutolinks:Ae,referenceDefinition:Ve,frontMatter:We,sanitizer:qe||hZ};$Z(rt.customHTMLRenderer),this.options.events&&TX()(this.options.events,function(In,kn){y.on(kn,In)});var tt=this.options,Rt=tt.el,cr=tt.initialValue,Tr=tt.theme,Ti=Rt.innerHTML;Tr!=="light"&&Rt.classList.add(Nl(Tr)),Rt.innerHTML="",this.toastMark=new gX("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:Ae,referenceDefinition:Ve,disallowDeepHeading:!0,frontMatter:We,customParser:G}),this.preview=new xZ(this.eventEmitter,b(b({},rt),{isViewer:!0})),rv()(this.preview.previewContent,"mousedown",this.toggleTask.bind(this)),cr?this.setMarkdown(cr):Ti&&this.preview.setHTML(Ti),Rt.appendChild(this.preview.previewContent),this.eventEmitter.emit("load",this)}return h.prototype.toggleTask=function(d){var y=d.target,S=getComputedStyle(y,":before");!y.hasAttribute(VZ)&&y.hasAttribute(zZ)&&XX(S,d.offsetX,d.offsetY)&&(dv(y,UZ),this.eventEmitter.emit("change",{source:"viewer",date:d}))},h.prototype.setMarkdown=function(d){var y=this.toastMark.getLineTexts(),S=y.length,L=YX(y),V=[S,L.length+1],G=this.toastMark.editMarkdown([1,1],V,d||"");this.eventEmitter.emit("updatePreview",G)},h.prototype.on=function(d,y){this.eventEmitter.listen(d,y)},h.prototype.off=function(d){this.eventEmitter.removeEventHandler(d)},h.prototype.addHook=function(d,y){this.eventEmitter.removeEventHandler(d),this.eventEmitter.listen(d,y)},h.prototype.destroy=function(){nv()(this.preview.el,"mousedown",this.toggleTask.bind(this)),this.preview.destroy(),this.eventEmitter.emit("destroy")},h.prototype.isViewer=function(){return!0},h.prototype.isMarkdownMode=function(){return!1},h.prototype.isWysiwygMode=function(){return!1},h})(),jZ=WZ,GZ=jZ})(),p=p.default,p})()})})(hd)),hd.exports}var J8e=K8e();const Y8e=QZ(J8e);/**
|
|
718
|
-
* TOAST UI Editor : React Wrapper
|
|
719
|
-
* @version 3.2.3 | Fri Feb 17 2023
|
|
720
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
721
|
-
* @license MIT
|
|
722
|
-
*//*! *****************************************************************************
|
|
723
|
-
Copyright (c) Microsoft Corporation.
|
|
724
|
-
|
|
725
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
726
|
-
purpose with or without fee is hereby granted.
|
|
727
|
-
|
|
728
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
729
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
730
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
731
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
732
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
733
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
734
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
735
|
-
***************************************************************************** */var ih=function(r,e){return ih=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},ih(r,e)};function k0(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ih(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Yo=function(){return Yo=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Yo.apply(this,arguments)},X8e=(function(r){k0(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.rootEl=Lo.createRef(),t}return e.prototype.getRootElement=function(){return this.rootEl.current},e.prototype.getInstance=function(){return this.editorInst},e.prototype.getBindingEventNames=function(){var t=this;return Object.keys(this.props).filter(function(n){return/^on[A-Z][a-zA-Z]+/.test(n)}).filter(function(n){return t.props[n]})},e.prototype.bindEventHandlers=function(t){var n=this;this.getBindingEventNames().forEach(function(i){var a=i[2].toLowerCase()+i.slice(3);n.editorInst.off(a),n.editorInst.on(a,t[i])})},e.prototype.getInitEvents=function(){var t=this;return this.getBindingEventNames().reduce(function(n,i){var a=i[2].toLowerCase()+i.slice(3);return n[a]=t.props[i],n},{})},e.prototype.componentDidMount=function(){this.editorInst=new Zt(Yo(Yo({el:this.rootEl.current},this.props),{events:this.getInitEvents()}))},e.prototype.shouldComponentUpdate=function(t){var n=this.getInstance(),i=t.height,a=t.previewStyle;return i&&this.props.height!==i&&n.setHeight(i),a&&this.props.previewStyle!==a&&n.changePreviewStyle(a),this.bindEventHandlers(t),!1},e.prototype.render=function(){return Lo.createElement("div",{ref:this.rootEl})},e})(Lo.Component);(function(r){k0(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.rootEl=Lo.createRef(),t}return e.prototype.getRootElement=function(){return this.rootEl.current},e.prototype.getInstance=function(){return this.viewerInst},e.prototype.getBindingEventNames=function(){var t=this;return Object.keys(this.props).filter(function(n){return/^on[A-Z][a-zA-Z]+/.test(n)}).filter(function(n){return t.props[n]})},e.prototype.bindEventHandlers=function(t){var n=this;this.getBindingEventNames().forEach(function(i){var a=i[2].toLowerCase()+i.slice(3);n.viewerInst.off(a),n.viewerInst.on(a,t[i])})},e.prototype.getInitEvents=function(){var t=this;return this.getBindingEventNames().reduce(function(n,i){var a=i[2].toLowerCase()+i.slice(3);return n[a]=t.props[i],n},{})},e.prototype.componentDidMount=function(){this.viewerInst=new Y8e(Yo(Yo({el:this.rootEl.current},this.props),{events:this.getInitEvents()}))},e.prototype.shouldComponentUpdate=function(t){return this.bindEventHandlers(t),!1},e.prototype.render=function(){return Lo.createElement("div",{ref:this.rootEl})},e})(Lo.Component);/**
|
|
736
|
-
* @toast-ui/editor : i18n
|
|
737
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
738
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
739
|
-
* @license MIT
|
|
740
|
-
*/Zt.setLanguage("ar",{Markdown:"لغة ترميز",WYSIWYG:"ما تراه هو ما تحصل عليه",Write:"يكتب",Preview:"عرض مسبق",Headings:"العناوين",Paragraph:"فقرة",Bold:"خط عريض",Italic:"خط مائل",Strike:"إضراب",Code:"رمز",Line:"خط",Blockquote:"فقرة مقتبسة","Unordered list":"قائمة غير مرتبة","Ordered list":"قائمة مرتبة",Task:"مهمة",Indent:"المسافة البادئة",Outdent:"المسافة الخارجة","Insert link":"أدخل الرابط","Insert CodeBlock":"أدخل الكود","Insert table":"أدخل جدول","Insert image":"أدخل صورة",Heading:"عنوان","Image URL":"رابط الصورة","Select image file":"حدد ملف الصورة","Choose a file":"اختيار الملف","No file":"لا ملف",Description:"وصف",OK:"موافقة",More:"أكثر",Cancel:"إلغاء",File:"ملف",URL:"رابط","Link text":"نص الرابط","Add row to up":"أضف صفًا لأعلى","Add row to down":"أضف صفًا إلى أسفل","Add column to left":"أضف العمود على اليسار","Add column to right":"أضف عمودًا إلى اليمين","Remove row":"حذف سطر","Remove column":"حذف عمود","Align column to left":"محاذاة اليسار","Align column to center":"محاذاة الوسط","Align column to right":"محاذاة اليمين","Remove table":"حذف الجدول","Would you like to paste as table?":"هل تريد اللصق كجدول","Text color":"لون النص","Auto scroll enabled":"التحريك التلقائي ممكّن","Auto scroll disabled":"التحريك التلقائي معطّل","Choose language":"اختر اللغة"});/**
|
|
741
|
-
* @toast-ui/editor : i18n
|
|
742
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
743
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
744
|
-
* @license MIT
|
|
745
|
-
*/Zt.setLanguage("zh-CN",{Markdown:"Markdown",WYSIWYG:"所见即所得",Write:"编辑",Preview:"预览",Headings:"标题",Paragraph:"文本",Bold:"加粗",Italic:"斜体字",Strike:"删除线",Code:"内嵌代码",Line:"水平线",Blockquote:"引用块","Unordered list":"无序列表","Ordered list":"有序列表",Task:"任务",Indent:"缩进",Outdent:"减少缩进","Insert link":"插入链接","Insert CodeBlock":"插入代码块","Insert table":"插入表格","Insert image":"插入图片",Heading:"标题","Image URL":"图片网址","Select image file":"选择图片文件","Choose a file":"选择一个文件","No file":"没有文件",Description:"说明",OK:"确认",More:"更多",Cancel:"取消",File:"文件",URL:"URL","Link text":"链接文本","Add row to up":"向上添加行","Add row to down":"在下方添加行","Add column to left":"在左侧添加列","Add column to right":"在右侧添加列","Remove row":"删除行","Remove column":"删除列","Align column to left":"左对齐","Align column to center":"居中对齐","Align column to right":"右对齐","Remove table":"删除表格","Would you like to paste as table?":"需要粘贴为表格吗?","Text color":"文字颜色","Auto scroll enabled":"自动滚动已启用","Auto scroll disabled":"自动滚动已禁用","Choose language":"选择语言"});/**
|
|
746
|
-
* @toast-ui/editor : i18n
|
|
747
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
748
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
749
|
-
* @license MIT
|
|
750
|
-
*/Zt.setLanguage("zh-TW",{Markdown:"Markdown",WYSIWYG:"所見即所得",Write:"編輯",Preview:"預覽",Headings:"標題",Paragraph:"內文",Bold:"粗體",Italic:"斜體",Strike:"刪除線",Code:"內嵌程式碼",Line:"分隔線",Blockquote:"引言","Unordered list":"項目符號清單","Ordered list":"編號清單",Task:"核取方塊清單",Indent:"增加縮排",Outdent:"減少縮排","Insert link":"插入超連結","Insert CodeBlock":"插入程式碼區塊","Insert table":"插入表格","Insert image":"插入圖片",Heading:"標題","Image URL":"圖片網址","Select image file":"選擇圖片檔案","Choose a file":"選擇一個文件","No file":"沒有文件",Description:"描述",OK:"確認",More:"更多",Cancel:"取消",File:"檔案",URL:"URL","Link text":"超連結文字","Add row to up":"向上添加行","Add row to down":"在下方添加行","Add column to left":"在左側添加列","Add column to right":"在右側添加列","Remove row":"刪除行","Remove column":"刪除列","Align column to left":"靠左對齊","Align column to center":"置中","Align column to right":"靠右對齊","Remove table":"刪除表格","Would you like to paste as table?":"您要以表格貼上嗎?","Text color":"文字顏色","Auto scroll enabled":"已啟用自動滾動","Auto scroll disabled":"已停用自動滾動","Choose language":"選擇語言"});/**
|
|
751
|
-
* @toast-ui/editor : i18n
|
|
752
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
753
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
754
|
-
* @license MIT
|
|
755
|
-
*/Zt.setLanguage(["hr","hr-HR"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Piši",Preview:"Pregled",Headings:"Naslovi",Paragraph:"Paragraf",Bold:"podebljano",Italic:"kurziv",Strike:"prcrtano",Code:"Uklopljeni kôd",Line:"Linija",Blockquote:"Blok citat","Unordered list":"Neporedana lista","Ordered list":"Poredana lista",Task:"Task",Indent:"Povećaj uvlaku",Outdent:"Smanji uvlaku","Insert link":"Umetni link","Insert CodeBlock":"Umetni blok kôda","Insert table":"Umetni tablicu","Insert image":"Umetni sliku",Heading:"Naslov","Image URL":"URL slike","Select image file":"Odaberi slikovnu datoteku","Choose a file":"Odaberite datoteka","No file":"Nema datoteka",Description:"Opis",OK:"OK",More:"Više",Cancel:"Odustani",File:"Datoteka",URL:"URL","Link text":"Tekst linka","Add row to up":"Dodaj redak prema gore","Add row to down":"Dodaj redak prema dolje","Add column to left":"Dodaj stupac s lijeve strane","Add column to right":"Dodajte stupac s desne strane","Remove row":"Ukloni redak","Remove column":"Remove stupac","Align column to left":"Poravnaj lijevo","Align column to center":"Poravnaj centrirano","Align column to right":"Poravnaj desno","Remove table":"Ukloni tablicu","Would you like to paste as table?":"Zalite li zalijepiti kao tablicu?","Text color":"Boja teksta","Auto scroll enabled":"Omogući auto klizanje","Auto scroll disabled":"Onemogući auto klizanje","Choose language":"Odabir jezika"});/**
|
|
756
|
-
* @toast-ui/editor : i18n
|
|
757
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
758
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
759
|
-
* @license MIT
|
|
760
|
-
*/Zt.setLanguage(["cs","cs-CZ"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Napsat",Preview:"Náhled",Headings:"Nadpisy",Paragraph:"Odstavec",Bold:"Tučné",Italic:"Kurzíva",Strike:"Přeškrtnuté",Code:"Kód",Line:"Vodorovná čára",Blockquote:"Citace","Unordered list":"Seznam s odrážkami","Ordered list":"Číslovaný seznam",Task:"Úkol",Indent:"Zvětšit odsazení",Outdent:"Zmenšit odsazení","Insert link":"Vložit odkaz","Insert CodeBlock":"Vložit blok kódu","Insert table":"Vložit tabulku","Insert image":"Vložit obrázek",Heading:"Nadpis","Image URL":"URL obrázku","Select image file":"Vybrat obrázek","Choose a file":"Vyberte soubor","No file":"Žádný soubor",Description:"Popis",OK:"OK",More:"Více",Cancel:"Zrušit",File:"Soubor",URL:"URL","Link text":"Text odkazu","Add row to up":"Přidejte řádek nahoru","Add row to down":"Přidejte řádek dolů","Add column to left":"Přidat sloupec vlevo","Add column to right":"Přidat sloupec doprava","Remove row":"Odebrat řádek","Remove column":"Odebrat sloupec","Align column to left":"Zarovnat vlevo","Align column to center":"Zarovnat na střed","Align column to right":"Zarovnat vpravo","Remove table":"Odstranit tabulku","Would you like to paste as table?":"Chcete vložit jako tabulku?","Text color":"Barva textu","Auto scroll enabled":"Automatické rolování zapnuto","Auto scroll disabled":"Automatické rolování vypnuto","Choose language":"Vybrat jazyk"});/**
|
|
761
|
-
* @toast-ui/editor : i18n
|
|
762
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
763
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
764
|
-
* @license MIT
|
|
765
|
-
*/Zt.setLanguage(["nl","nl-NL"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Opslaan",Preview:"Voorbeeld",Headings:"Koppen",Paragraph:"Alinea",Bold:"Vet",Italic:"Cursief",Strike:"Doorhalen",Code:"Inline code",Line:"Regel",Blockquote:"Citaatblok","Unordered list":"Opsomming","Ordered list":"Genummerde opsomming",Task:"Taak",Indent:"Niveau verhogen",Outdent:"Niveau verlagen","Insert link":"Link invoegen","Insert CodeBlock":"Codeblok toevoegen","Insert table":"Tabel invoegen","Insert image":"Afbeelding invoegen",Heading:"Kop","Image URL":"Afbeelding URL","Select image file":"Selecteer een afbeelding","Choose a file":"Kies een bestand","No file":"Geen bestand",Description:"Omschrijving",OK:"OK",More:"Meer",Cancel:"Annuleren",File:"Bestand",URL:"URL","Link text":"Link tekst","Add row to up":"Voeg rij toe aan omhoog","Add row to down":"Rij naar beneden toevoegen","Add column to left":"Voeg kolom aan de linkerkant toe","Add column to right":"Voeg een kolom aan de rechterkant toe","Remove row":"Rij verwijderen","Remove column":"Kolom verwijderen","Align column to left":"Links uitlijnen","Align column to center":"Centreren","Align column to right":"Rechts uitlijnen","Remove table":"Verwijder tabel","Would you like to paste as table?":"Wil je dit als tabel plakken?","Text color":"Tekstkleur","Auto scroll enabled":"Autoscroll ingeschakeld","Auto scroll disabled":"Autoscroll uitgeschakeld","Choose language":"Kies een taal"});/**
|
|
766
|
-
* @toast-ui/editor : i18n
|
|
767
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
768
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
769
|
-
* @license MIT
|
|
770
|
-
*/Zt.setLanguage(["en","en-US"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Write",Preview:"Preview",Headings:"Headings",Paragraph:"Paragraph",Bold:"Bold",Italic:"Italic",Strike:"Strike",Code:"Inline code",Line:"Line",Blockquote:"Blockquote","Unordered list":"Unordered list","Ordered list":"Ordered list",Task:"Task",Indent:"Indent",Outdent:"Outdent","Insert link":"Insert link","Insert CodeBlock":"Insert codeBlock","Insert table":"Insert table","Insert image":"Insert image",Heading:"Heading","Image URL":"Image URL","Select image file":"Select image file","Choose a file":"Choose a file","No file":"No file",Description:"Description",OK:"OK",More:"More",Cancel:"Cancel",File:"File",URL:"URL","Link text":"Link text","Add row to up":"Add row to up","Add row to down":"Add row to down","Add column to left":"Add column to left","Add column to right":"Add column to right","Remove row":"Remove row","Remove column":"Remove column","Align column to left":"Align column to left","Align column to center":"Align column to center","Align column to right":"Align column to right","Remove table":"Remove table","Would you like to paste as table?":"Would you like to paste as table?","Text color":"Text color","Auto scroll enabled":"Auto scroll enabled","Auto scroll disabled":"Auto scroll disabled","Choose language":"Choose language"});/**
|
|
771
|
-
* @toast-ui/editor : i18n
|
|
772
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
773
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
774
|
-
* @license MIT
|
|
775
|
-
*/Zt.setLanguage(["fi","fi-FI"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Kirjoita",Preview:"Esikatselu",Headings:"Otsikot",Paragraph:"Kappale",Bold:"Lihavointi",Italic:"Kursivointi",Strike:"Yliviivaus",Code:"Koodi",Line:"Vaakaviiva",Blockquote:"Lainaus","Unordered list":"Luettelo","Ordered list":"Numeroitu luettelo",Task:"Tehtävä",Indent:"Suurenna sisennystä",Outdent:"Pienennä sisennystä","Insert link":"Lisää linkki","Insert CodeBlock":"Lisää koodia","Insert table":"Lisää taulukko","Insert image":"Lisää kuva",Heading:"Otsikko","Image URL":"Kuvan URL","Select image file":"Valitse kuvatiedosto","Choose a file":"Valitse tiedosto","No file":"Ei tiedosto",Description:"Kuvaus",OK:"OK",More:"Lisää",Cancel:"Peruuta",File:"Tiedosto",URL:"URL","Link text":"Linkkiteksti","Add row to up":"Lisää rivi ylöspäin","Add row to down":"Lisää rivi alaspäin","Add column to left":"Lisää sarake vasemmalla","Add column to right":"Lisää sarake oikealle","Remove row":"Poista rivi","Remove column":"Poista sarake","Align column to left":"Tasaus vasemmalle","Align column to center":"Keskitä","Align column to right":"Tasaus oikealle","Remove table":"Poista taulukko","Would you like to paste as table?":"Haluatko liittää taulukkomuodossa?","Text color":"Tekstin väri","Auto scroll enabled":"Automaattinen skrollaus käytössä","Auto scroll disabled":"Automaattinen skrollaus pois käytöstä","Choose language":"Valitse kieli"});/**
|
|
776
|
-
* @toast-ui/editor : i18n
|
|
777
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
778
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
779
|
-
* @license MIT
|
|
780
|
-
*/Zt.setLanguage(["fr","fr-FR"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Écrire",Preview:"Aperçu",Headings:"En-têtes",Paragraph:"Paragraphe",Bold:"Gras",Italic:"Italique",Strike:"Barré",Code:"Code en ligne",Line:"Ligne",Blockquote:"Citation","Unordered list":"Liste non-ordonnée","Ordered list":"Liste ordonnée",Task:"Tâche",Indent:"Retrait",Outdent:"Sortir","Insert link":"Insérer un lien","Insert CodeBlock":"Insérer un bloc de code","Insert table":"Insérer un tableau","Insert image":"Insérer une image",Heading:"En-tête","Image URL":"URL de l'image","Select image file":"Sélectionnez un fichier image","Choose a file":"Choisissez un fichier","No file":"Pas de fichier",Description:"Description",OK:"OK",More:"de plus",Cancel:"Annuler",File:"Fichier",URL:"URL","Link text":"Texte du lien","Add row to up":"Ajouter une ligne vers le haut","Add row to down":"Ajouter une ligne vers le bas","Add column to left":"Ajouter une colonne à gauche","Add column to right":"Ajouter une colonne à droite","Remove row":"Supprimer une ligne","Remove column":"Supprimer une colonne","Align column to left":"Aligner à gauche","Align column to center":"Aligner au centre","Align column to right":"Aligner à droite","Remove table":"Supprimer le tableau","Would you like to paste as table?":"Voulez-vous coller ce contenu en tant que tableau ?","Text color":"Couleur du texte","Auto scroll enabled":"Défilement automatique activé","Auto scroll disabled":"Défilement automatique désactivé","Choose language":"Choix de la langue"});/**
|
|
781
|
-
* @toast-ui/editor : i18n
|
|
782
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
783
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
784
|
-
* @license MIT
|
|
785
|
-
*/Zt.setLanguage(["gl","gl-ES"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Escribir",Preview:"Vista previa",Headings:"Encabezados",Paragraph:"Parágrafo",Bold:"Negriña",Italic:"Cursiva",Strike:"Riscado",Code:"Código",Line:"Liña",Blockquote:"Cita","Unordered list":"Lista desordenada","Ordered list":"Lista ordenada",Task:"Tarefa",Indent:"Sangría",Outdent:"Anular sangría","Insert link":"Inserir enlace","Insert CodeBlock":"Inserir bloque de código","Insert table":"Inserir táboa","Insert image":"Inserir imaxe",Heading:"Encabezado","Image URL":"URL da imaxe","Select image file":"Seleccionar arquivo da imaxe","Choose a file":"Escoge un archivo","No file":"Ningún archivo",Description:"Descrición",OK:"Aceptar",More:"Máis",Cancel:"Cancelar",File:"Arquivo",URL:"URL","Link text":"Texto do enlace","Add row to up":"Engade fila para arriba","Add row to down":"Engade fila para abaixo","Add column to left":"Engade columna á esquerda","Add column to right":"Engade columna á dereita","Remove row":"Eliminar fila","Remove column":"Eliminar columna","Align column to left":"Aliñar á esquerda","Align column to center":"Centrar","Align column to right":"Aliñar á dereita","Remove table":"Eliminar táboa","Would you like to paste as table?":"Desexa pegar como táboa?","Text color":"Cor do texto","Auto scroll enabled":"Desprazamento automático habilitado","Auto scroll disabled":"Desprazamento automático deshabilitado","Choose language":"Elixir idioma"});/**
|
|
786
|
-
* @toast-ui/editor : i18n
|
|
787
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
788
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
789
|
-
* @license MIT
|
|
790
|
-
*/Zt.setLanguage(["de","de-DE"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Verfassen",Preview:"Vorschau",Headings:"Überschriften",Paragraph:"Text",Bold:"Fett",Italic:"Kursiv",Strike:"Durchgestrichen",Code:"Code",Line:"Trennlinie",Blockquote:"Blocktext","Unordered list":"Aufzählung","Ordered list":"Nummerierte Aufzählung",Task:"Aufgabe",Indent:"Einrücken",Outdent:"Ausrücken","Insert link":"Link einfügen","Insert CodeBlock":"Codeblock einfügen","Insert table":"Tabelle einfügen","Insert image":"Grafik einfügen",Heading:"Titel","Image URL":"Bild URL","Select image file":"Grafik auswählen","Choose a file":"Wähle eine Datei","No file":"Keine Datei",Description:"Beschreibung",OK:"OK",More:"Mehr",Cancel:"Abbrechen",File:"Datei",URL:"URL","Link text":"Anzuzeigender Text","Add row to up":"Zeile nach oben hinzufügen","Add row to down":"Zeile nach unten hinzufügen","Add column to left":"Spalte links hinzufügen","Add column to right":"Spalte rechts hinzufügen","Remove row":"Zeile entfernen","Remove column":"Spalte entfernen","Align column to left":"Links ausrichten","Align column to center":"Zentrieren","Align column to right":"Rechts ausrichten","Remove table":"Tabelle entfernen","Would you like to paste as table?":"Möchten Sie eine Tabelle einfügen?","Text color":"Textfarbe","Auto scroll enabled":"Autoscrollen aktiviert","Auto scroll disabled":"Autoscrollen deaktiviert","Choose language":"Sprache auswählen"});/**
|
|
791
|
-
* @toast-ui/editor : i18n
|
|
792
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
793
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
794
|
-
* @license MIT
|
|
795
|
-
*/Zt.setLanguage(["it","it-IT"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Scrivere",Preview:"Anteprima",Headings:"Intestazioni",Paragraph:"Paragrafo",Bold:"Grassetto",Italic:"Corsivo",Strike:"Barrato",Code:"Codice",Line:"Linea",Blockquote:"Blocco citazione","Unordered list":"Lista puntata","Ordered list":"Lista numerata",Task:"Attività",Indent:"Aggiungi indentazione",Outdent:"Rimuovi indentazione","Insert link":"Inserisci link","Insert CodeBlock":"Inserisci blocco di codice","Insert table":"Inserisci tabella","Insert image":"Inserisci immagine",Heading:"Intestazione","Image URL":"URL immagine","Select image file":"Seleziona file immagine","Choose a file":"Scegli un file","No file":"Nessun file",Description:"Descrizione",OK:"OK",More:"Più",Cancel:"Cancella",File:"File",URL:"URL","Link text":"Testo del collegamento","Add row to up":"Aggiungi riga in alto","Add row to down":"Aggiungi riga in basso","Add column to left":"Aggiungi colonna a sinistra","Add column to right":"Aggiungi colonna a destra","Remove row":"Rimuovi riga","Remove column":"Rimuovi colonna","Align column to left":"Allinea a sinistra","Align column to center":"Allinea al centro","Align column to right":"Allinea a destra","Remove table":"Rimuovi tabella","Would you like to paste as table?":"Desideri incollare sotto forma di tabella?","Text color":"Colore del testo","Auto scroll enabled":"Scrolling automatico abilitato","Auto scroll disabled":"Scrolling automatico disabilitato","Choose language":"Scegli la lingua"});/**
|
|
796
|
-
* @toast-ui/editor : i18n
|
|
797
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
798
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
799
|
-
* @license MIT
|
|
800
|
-
*/Zt.setLanguage(["ja","ja-JP"],{Markdown:"マークダウン",WYSIWYG:"WYSIWYG",Write:"編集する",Preview:"プレビュー",Headings:"見出し",Paragraph:"本文",Bold:"太字",Italic:"イタリック",Strike:"ストライク",Code:"インラインコード",Line:"ライン",Blockquote:"引用","Unordered list":"番号なしリスト","Ordered list":"順序付きリスト",Task:"タスク",Indent:"インデント",Outdent:"アウトデント","Insert link":"リンク挿入","Insert CodeBlock":"コードブロック挿入","Insert table":"テーブル挿入","Insert image":"画像挿入",Heading:"見出し","Image URL":"イメージURL","Select image file":"画像ファイル選択","Choose a file":"ファイルの選択","No file":"ファイルがない",Description:"ディスクリプション ",OK:"はい",More:"もっと",Cancel:"キャンセル",File:"ファイル",URL:"URL","Link text":"リンクテキスト","Add row to up":"行を上に追加","Add row to down":"下に行を追加","Add column to left":"左側に列を追加","Add column to right":"右側に列を追加","Remove row":"行削除","Remove column":"列削除","Align column to left":"左揃え","Align column to center":"中央揃え","Align column to right":"右揃え","Remove table":"テーブル削除","Would you like to paste as table?":"テーブルを貼り付けますか?","Text color":"文字色相","Auto scroll enabled":"自動スクロールが有効","Auto scroll disabled":"自動スクロールを無効に","Choose language":"言語選択"});/**
|
|
801
|
-
* @toast-ui/editor : i18n
|
|
802
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
803
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
804
|
-
* @license MIT
|
|
805
|
-
*/Zt.setLanguage(["ko","ko-KR"],{Markdown:"마크다운",WYSIWYG:"위지윅",Write:"편집하기",Preview:"미리보기",Headings:"제목크기",Paragraph:"본문",Bold:"굵게",Italic:"기울임꼴",Strike:"취소선",Code:"인라인 코드",Line:"문단나눔",Blockquote:"인용구","Unordered list":"글머리 기호","Ordered list":"번호 매기기",Task:"체크박스",Indent:"들여쓰기",Outdent:"내어쓰기","Insert link":"링크 삽입","Insert CodeBlock":"코드블럭 삽입","Insert table":"표 삽입","Insert image":"이미지 삽입",Heading:"제목","Image URL":"이미지 주소","Select image file":"이미지 파일을 선택하세요.","Choose a file":"파일 선택","No file":"선택된 파일 없음",Description:"설명",OK:"확인",More:"더 보기",Cancel:"취소",File:"파일",URL:"주소","Link text":"링크 텍스트","Add row to up":"위에 행 추가","Add row to down":"아래에 행 추가","Add column to left":"왼쪽에 열 추가","Add column to right":"오른쪽에 열 추가","Remove row":"행 삭제","Remove column":"열 삭제","Align column to left":"열 왼쪽 정렬","Align column to center":"열 가운데 정렬","Align column to right":"열 오른쪽 정렬","Remove table":"표 삭제","Would you like to paste as table?":"표형태로 붙여 넣겠습니까?","Text color":"글자 색상","Auto scroll enabled":"자동 스크롤 켜짐","Auto scroll disabled":"자동 스크롤 꺼짐","Choose language":"언어 선택"});/**
|
|
806
|
-
* @toast-ui/editor : i18n
|
|
807
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
808
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
809
|
-
* @license MIT
|
|
810
|
-
*/Zt.setLanguage(["nb","nb-NO"],{Markdown:"Funksjonaliteter",WYSIWYG:"WYSIWYG",Write:"Skriv",Preview:"Forhåndsvisning",Headings:"Overskrift",Paragraph:"Paragraf",Bold:"Fet skrift",Italic:"Italic",Strike:"Strike",Code:"Kode",Line:"Linje",Blockquote:"Blokksitat","Unordered list":"Usortert liste","Ordered list":"Sortert liste",Task:"Task",Indent:"Indent",Outdent:"Outdent","Insert link":"Sett inn lenke","Insert CodeBlock":"Sett inn CodeStreng","Insert table":"Sett inn diagram","Insert image":"Sett inn bilde",Heading:"Overskrift","Image URL":"BildeURL","Select image file":"Velg bildefil","Choose a file":"Velg en fil","No file":"Ingen fil",Description:"Beskrivelse",OK:"OK",More:"Mer",Cancel:"Angre",File:"Fil",URL:"URL","Link text":"Lenketekst","Add row to up":"Legg rad til opp","Add row to down":"Legg rad til ned","Add column to left":"Legg til kolonne til venstre","Add column to right":"Legg til kolonne til høyre","Remove row":"Fjern rad","Remove column":"Fjern kolonne","Align column to left":"Venstreorienter","Align column to center":"Senterorienter","Align column to right":"Høyreorienter","Remove table":"Fjern diagram","Would you like to paste as table?":"Ønsker du å lime inn som et diagram?","Text color":"Tekstfarge","Auto scroll enabled":"Auto-scroll aktivert","Auto scroll disabled":"Auto-scroll deaktivert","Choose language":"Velg språl"});/**
|
|
811
|
-
* @toast-ui/editor : i18n
|
|
812
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
813
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
814
|
-
* @license MIT
|
|
815
|
-
*/Zt.setLanguage(["pl","pl-PL"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Napisz",Preview:"Podgląd",Headings:"Nagłówki",Paragraph:"Akapit",Bold:"Pogrubienie",Italic:"Kursywa",Strike:"Przekreślenie",Code:"Fragment kodu",Line:"Linia",Blockquote:"Cytat","Unordered list":"Lista nieuporządkowana","Ordered list":"Lista uporządkowana",Task:"Zadanie",Indent:"Utwórz wcięcie",Outdent:"Usuń wcięcie","Insert link":"Umieść odnośnik","Insert CodeBlock":"Umieść blok kodu","Insert table":"Umieść tabelę","Insert image":"Umieść obraz",Heading:"Nagłówek","Image URL":"Adres URL obrazu","Select image file":"Wybierz plik obrazu","Choose a file":"Wybierz plik","No file":"Brak plik",Description:"Opis",OK:"OK",More:"Więcej",Cancel:"Anuluj",File:"Plik",URL:"URL","Link text":"Tekst odnośnika","Add row to up":"Dodaj wiersz do góry","Add row to down":"Dodaj wiersz w dół","Add column to left":"Dodaj kolumnę po lewej stronie","Add column to right":"Dodaj kolumnę po prawej stronie","Remove row":"Usuń rząd","Remove column":"Usuń kolumnę","Align column to left":"Wyrównaj do lewej","Align column to center":"Wyśrodkuj","Align column to right":"Wyrównaj do prawej","Remove table":"Usuń tabelę","Would you like to paste as table?":"Czy chcesz wkleić tekst jako tabelę?","Text color":"Kolor tekstu","Auto scroll enabled":"Włączono automatyczne przewijanie","Auto scroll disabled":"Wyłączono automatyczne przewijanie","Choose language":"Wybierz język"});/**
|
|
816
|
-
* @toast-ui/editor : i18n
|
|
817
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
818
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
819
|
-
* @license MIT
|
|
820
|
-
*/Zt.setLanguage(["pt","pt-BR"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Escrever",Preview:"Pré-visualizar",Headings:"Cabeçalhos",Paragraph:"Parágrafo",Bold:"Negrito",Italic:"Itálico",Strike:"Traçado",Code:"Código",Line:"Linha",Blockquote:"Bloco de citação","Unordered list":"Lista não ordenada","Ordered list":"Lista ordenada",Task:"Tarefa",Indent:"Recuo à esquerda",Outdent:"Recuo à direita","Insert link":"Inserir link","Insert CodeBlock":"Inserir bloco de código","Insert table":"Inserir tabela","Insert image":"Inserir imagem",Heading:"Título","Image URL":"URL da imagem","Select image file":"Selecione um arquivo de imagem","Choose a file":"Escolha um arquivo","No file":"Nenhum arquivo",Description:"Descrição",OK:"OK",More:"Mais",Cancel:"Cancelar",File:"Arquivo",URL:"URL","Link text":"Link de texto","Add row to up":"Adicionar linha para cima","Add row to down":"Adicionar linha para baixo","Add column to left":"Adicionar coluna à esquerda","Add column to right":"Adicionar coluna à direita","Remove row":"Remover linha","Remove column":"Remover coluna","Align column to left":"Alinhar à esquerda","Align column to center":"Alinhar ao centro","Align column to right":"Alinhar à direita","Remove table":"Remover tabela","Would you like to paste as table?":"Você gostaria de colar como mesa?","Text color":"Cor do texto","Auto scroll enabled":"Rolagem automática habilitada","Auto scroll disabled":"Rolagem automática desabilitada","Choose language":"Escolher linguagem"});/**
|
|
821
|
-
* @toast-ui/editor : i18n
|
|
822
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
823
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
824
|
-
* @license MIT
|
|
825
|
-
*/Zt.setLanguage(["ru","ru-RU"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Редактор",Preview:"Просмотр",Headings:"Заголовки",Paragraph:"Абзац",Bold:"Жирный",Italic:"Курсив",Strike:"Зачеркнутый",Code:"Код",Line:"Линия",Blockquote:"Цитата","Unordered list":"Неупорядоченный список","Ordered list":"Упорядоченный список",Task:"Галочка",Indent:"Увеличить отступ",Outdent:"Уменьшить отступ","Insert link":"Вставить ссылку","Insert CodeBlock":"Вставить блок кода","Insert table":"Вставить таблицу","Insert image":"Вставить изображение",Heading:"Заголовок","Image URL":"URL изображения","Select image file":"Выбрать файл изображения","Choose a file":"Выбрать","No file":"Нет файла",Description:"Описание",OK:"Хорошо",More:"Еще",Cancel:"Отмена",File:"Файл",URL:"URL","Link text":"Текст ссылки","Add row to up":"Добавить строку вверх","Add row to down":"Добавить строку вниз","Add column to left":"Добавить столбец слева","Add column to right":"Добавить столбец справа","Remove row":"Удалить ряд","Remove column":"Удалить столбец","Align column to left":"Выровнять по левому краю","Align column to center":"Выровнять по центру","Align column to right":"Выровнять по правому краю","Remove table":"Удалить таблицу","Would you like to paste as table?":"Вы хотите вставить в виде таблицы?","Text color":"Цвет текста","Auto scroll enabled":"Автопрокрутка включена","Auto scroll disabled":"Автопрокрутка отключена","Choose language":"Выбрать язык"});/**
|
|
826
|
-
* @toast-ui/editor : i18n
|
|
827
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
828
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
829
|
-
* @license MIT
|
|
830
|
-
*/Zt.setLanguage(["es","es-ES"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Escribir",Preview:"Vista previa",Headings:"Encabezados",Paragraph:"Párrafo",Bold:"Negrita",Italic:"Itálica",Strike:"Tachado",Code:"Código",Line:"Línea",Blockquote:"Cita","Unordered list":"Lista desordenada","Ordered list":"Lista ordenada",Task:"Tarea",Indent:"Sangría",Outdent:"Saliendo","Insert link":"Insertar enlace","Insert CodeBlock":"Insertar bloque de código","Insert table":"Insertar tabla","Insert image":"Insertar imagen",Heading:"Encabezado","Image URL":"URL de la imagen","Select image file":"Seleccionar archivo de imagen","Choose a file":"Escoge un archivo","No file":"Ningún archivo",Description:"Descripción",OK:"Aceptar",More:"Más",Cancel:"Cancelar",File:"Archivo",URL:"URL","Link text":"Texto del enlace","Add row to up":"Agregar fila para subir","Add row to down":"Agregar fila hacia abajo","Add column to left":"Agregar columna a la izquierda","Add column to right":"Agregar columna a la derecha","Remove row":"Eliminar fila","Remove column":"Eliminar columna","Align column to left":"Alinear a la izquierda","Align column to center":"Centrar","Align column to right":"Alinear a la derecha","Remove table":"Eliminar tabla","Would you like to paste as table?":"¿Desea pegar como tabla?","Text color":"Color del texto","Auto scroll enabled":"Desplazamiento automático habilitado","Auto scroll disabled":"Desplazamiento automático deshabilitado","Choose language":"Elegir idioma"});/**
|
|
831
|
-
* @toast-ui/editor : i18n
|
|
832
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
833
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
834
|
-
* @license MIT
|
|
835
|
-
*/Zt.setLanguage(["sv","sv-SE"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Skriv",Preview:"Förhandsgranska",Headings:"Överskrifter",Paragraph:"Paragraf",Bold:"Fet",Italic:"Kursiv",Strike:"Genomstruken",Code:"Kodrad",Line:"Linje",Blockquote:"Citatblock","Unordered list":"Punktlista","Ordered list":"Numrerad lista",Task:"Att göra",Indent:"Öka indrag",Outdent:"Minska indrag","Insert link":"Infoga länk","Insert CodeBlock":"Infoga kodblock","Insert table":"Infoga tabell","Insert image":"Infoga bild",Heading:"Överskrift","Image URL":"Bildadress","Select image file":"Välj en bildfil","Choose a file":"Välj en fil","No file":"Ingen fil",Description:"Beskrivning",OK:"OK",More:"Mer",Cancel:"Avbryt",File:"Fil",URL:"Adress","Link text":"Länktext","Add row to up":"Lägg till rad till upp","Add row to down":"Lägg till rad till ner","Add column to left":"Lägg till kolumn till vänster","Add column to right":"Lägg till kolumn till höger","Remove row":"Radera rad","Remove column":"Radera kolumn","Align column to left":"Vänsterjustera","Align column to center":"Centrera","Align column to right":"Högerjustera","Remove table":"Radera tabell","Would you like to paste as table?":"Vill du klistra in som en tabell?","Text color":"Textfärg","Auto scroll enabled":"Automatisk scroll aktiverad","Auto scroll disabled":"Automatisk scroll inaktiverad","Choose language":"Välj språk"});/**
|
|
836
|
-
* @toast-ui/editor : i18n
|
|
837
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
838
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
839
|
-
* @license MIT
|
|
840
|
-
*/Zt.setLanguage(["tr","tr-TR"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Düzenle",Preview:"Ön izleme",Headings:"Başlıklar",Paragraph:"Paragraf",Bold:"Kalın",Italic:"İtalik",Strike:"Altı çizgili",Code:"Satır içi kod",Line:"Çizgi",Blockquote:"Alıntı","Unordered list":"Sıralanmamış liste","Ordered list":"Sıralı liste",Task:"Görev kutusu",Indent:"Girintiyi arttır",Outdent:"Girintiyi azalt","Insert link":"Bağlantı ekle","Insert CodeBlock":"Kod bloku ekle","Insert table":"Tablo ekle","Insert image":"İmaj ekle",Heading:"Başlık","Image URL":"İmaj URL","Select image file":"İmaj dosyası seç","Choose a file":"Bir dosya seçin","No file":"Dosya yok",Description:"Açıklama",OK:"Onay",More:"Daha Fazla",Cancel:"İptal",File:"Dosya",URL:"URL","Link text":"Bağlantı yazısı","Add row to up":"Yukarı satır ekle","Add row to down":"Aşağı satır ekle","Add column to left":"Sola sütun ekleyin","Add column to right":"Sağa sütun ekle","Remove row":"Satır sil","Remove column":"Sütun sil","Align column to left":"Sola hizala","Align column to center":"Merkeze hizala","Align column to right":"Sağa hizala","Remove table":"Tabloyu kaldır","Would you like to paste as table?":"Tablo olarak yapıştırmak ister misiniz?","Text color":"Metin rengi","Auto scroll enabled":"Otomatik kaydırma açık","Auto scroll disabled":"Otomatik kaydırma kapalı","Choose language":"Dil seçiniz"});/**
|
|
841
|
-
* @toast-ui/editor : i18n
|
|
842
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
843
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
844
|
-
* @license MIT
|
|
845
|
-
*/Zt.setLanguage(["uk","uk-UA"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Написати",Preview:"Попередній перегляд",Headings:"Заголовки",Paragraph:"Абзац",Bold:"Жирний",Italic:"Курсив",Strike:"Закреслений",Code:"Вбудований код",Line:"Лінія",Blockquote:"Блок цитування","Unordered list":"Невпорядкований список","Ordered list":"Упорядкований список",Task:"Завдання",Indent:"відступ",Outdent:"застарілий","Insert link":"Вставити посилання","Insert CodeBlock":"Вставити код","Insert table":"Вставити таблицю","Insert image":"Вставити зображення",Heading:"Заголовок","Image URL":"URL зображення","Select image file":"Вибрати файл зображення","Choose a file":"Виберіть файл","No file":"Немає файлу",Description:"Опис",OK:"OK",More:"ще",Cancel:"Скасувати",File:"Файл",URL:"URL","Link text":"Текст посилання","Add row to up":"Додати рядок вгору","Add row to down":"Додати рядок вниз","Add column to left":"Додайте стовпець зліва","Add column to right":"Додайте стовпець праворуч","Remove row":"Видалити ряд","Remove column":"Видалити стовпчик","Align column to left":"Вирівняти по лівому краю","Align column to center":"Вирівняти по центру","Align column to right":"Вирівняти по правому краю","Remove table":"Видалити таблицю","Would you like to paste as table?":"Ви хочете вставити у вигляді таблиці?","Text color":"Колір тексту","Auto scroll enabled":"Автоматична прокрутка включена","Auto scroll disabled":"Автоматична прокрутка відключена","Choose language":"Вибрати мову"});const Z8e=["ar","zh","hr","cs","nl","en","fi","fr","gl","de","it","ja","ko","nb","pl","pt","ru","es","sv","tr","uk"],Jy=document.documentElement.lang,Yy=Z8e.includes(Jy)?Jy:"en",n5e=({initialValue:r,onChange:e,options:t,disabled:n})=>{const i=ko.useRef(null),{width:a}=JZ(),{appearance:o}=YZ(),s=o==="dark"?"dark":"light",[l,f]=ko.useState({height:"600px",initialEditType:"markdown",useCommandShortcut:!0,language:Yy});ko.useEffect(()=>{if(i.current&&r){const b=i.current.getInstance();b.getMarkdown().trim()||b.setMarkdown(r)}},[]),ko.useEffect(()=>{if(i.current&&r!==void 0){const b=i.current.getInstance();b.getMarkdown()!==r&&(console.log("Syncing editor with new value:",r),b.setMarkdown(r))}},[r]),ko.useEffect(()=>{const b=a<1200;f(T=>({...T,...t,previewStyle:b?"tab":(t==null?void 0:t.previewStyle)||"vertical",height:(t==null?void 0:t.height)||"600px",initialEditType:(t==null?void 0:t.initialEditType)||"markdown",useCommandShortcut:(t==null?void 0:t.useCommandShortcut)!==void 0?t.useCommandShortcut:!0})),i.current&&i.current.getInstance().changePreviewStyle(b?"tab":(t==null?void 0:t.previewStyle)||"vertical")},[a,t,s]);const p=ko.useCallback(()=>{var x;const b=(x=i.current)==null?void 0:x.getInstance(),T=b==null?void 0:b.getMarkdown();e&&T&&e(T)},[e]);return Tv.jsx("div",{className:`${n?"pointer-events-none opacity-50":""}`,children:Tv.jsx(X8e,{ref:i,onChange:p,autofocus:!1,theme:s,...l},`editor-${s}-${Yy}`)})};export{n5e as default};
|