From 08727012309bbbb4b58cf7757273c9aa1a71121e Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Tue, 26 Nov 2024 20:16:26 -0500 Subject: [PATCH 01/14] task: Remove iOS build output from VCS --- .gitignore | 6 +- .../Gutenberg/assets/app-CcUQEHgT.js | 1 - .../Gutenberg/assets/index-BjJGES_T.js | 813 ------------------ .../Gutenberg/assets/index-U9U0j6Xt.css | 1 - .../Gutenberg/assets/remote-Burdcc-1.js | 1 - .../Gutenberg/assets/remote-CQnyfBG_.css | 1 - ios/Sources/GutenbergKit/Gutenberg/index.html | 16 - .../GutenbergKit/Gutenberg/remote.html | 16 - 8 files changed, 3 insertions(+), 852 deletions(-) delete mode 100644 ios/Sources/GutenbergKit/Gutenberg/assets/app-CcUQEHgT.js delete mode 100644 ios/Sources/GutenbergKit/Gutenberg/assets/index-BjJGES_T.js delete mode 100644 ios/Sources/GutenbergKit/Gutenberg/assets/index-U9U0j6Xt.css delete mode 100644 ios/Sources/GutenbergKit/Gutenberg/assets/remote-Burdcc-1.js delete mode 100644 ios/Sources/GutenbergKit/Gutenberg/assets/remote-CQnyfBG_.css delete mode 100644 ios/Sources/GutenbergKit/Gutenberg/index.html delete mode 100644 ios/Sources/GutenbergKit/Gutenberg/remote.html diff --git a/.gitignore b/.gitignore index 47c4c257..7d1872da 100644 --- a/.gitignore +++ b/.gitignore @@ -190,6 +190,6 @@ local.properties /android/Gutenberg/src/main/assets/remote.html # Disabled removing these files until this is published like Android in CI. -# /ios/Sources/GutenbergKit/Gutenberg/assets -# /ios/Sources/GutenbergKit/Gutenberg/index.html -# /ios/Sources/GutenbergKit/Gutenberg/remote.html +/ios/Sources/GutenbergKit/Gutenberg/assets +/ios/Sources/GutenbergKit/Gutenberg/index.html +/ios/Sources/GutenbergKit/Gutenberg/remote.html diff --git a/ios/Sources/GutenbergKit/Gutenberg/assets/app-CcUQEHgT.js b/ios/Sources/GutenbergKit/Gutenberg/assets/app-CcUQEHgT.js deleted file mode 100644 index 52652003..00000000 --- a/ios/Sources/GutenbergKit/Gutenberg/assets/app-CcUQEHgT.js +++ /dev/null @@ -1 +0,0 @@ -import{o as V,e as z,a as K}from"./remote-Burdcc-1.js";const{SVG:W,Path:Z}=window.wp.primitives,{jsx:S}=window.ReactJSXRuntime,q=S(W,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:S(Z,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})}),{SVG:H,Path:Q}=window.wp.primitives,{jsx:E}=window.ReactJSXRuntime,Y=E(H,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:E(Q,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"})}),{Fragment:v,jsx:i,jsxs:w}=window.ReactJSXRuntime,{useState:ee}=window.wp.element,{BlockInspector:te,BlockToolbar:oe,Inserter:ne,store:se}=window.wp.blockEditor,{useSelect:ie}=window.wp.data,{Button:re,Popover:le,ToolbarButton:ce}=window.wp.components,{__:ae}=window.wp.i18n,de=()=>{const[e,t]=ee(!1),{isSelected:o}=ie(d=>{const{getSelectedBlockClientId:u}=d(se);return{isSelected:u()!==null}});function s(){t(!0)}function r(){t(!1)}return w(v,{children:[w("div",{className:"gbkit gbkit-editor-toolbar",children:[i(ne,{}),o&&i("div",{className:"gbkit-editor-toolbar_toolbar-group",children:i(ce,{title:ae("Open Settings"),icon:Y,onClick:s,className:"gbkit-editor-toolbar_settings_icon"})}),i(oe,{})]}),e&&i(le,{className:"block-settings-menu",variant:"unstyled",placement:"overlay",children:w(v,{children:[i("div",{className:"block-settings-menu__header",children:i(re,{className:"block-settings-menu__close",icon:q,onClick:r})}),i(te,{})]})})]})},ue=[{name:"post",baseURL:"/wp/v2/posts"},{name:"page",baseURL:"/wp/v2/pages"},{name:"attachment",baseURL:"/wp/v2/media"},{name:"wp_block",baseURL:"/wp/v2/blocks"}].map(e=>({kind:"postType",...e,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:["title","excerpt","content"]})),{__dangerousOptInToUnstableAPIsOnlyForCoreModules:we}=window.wp.privateApis,{lock:Ze,unlock:U}=we("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/editor"),{store:pe}=window.wp.editor,{useSelect:me}=window.wp.data,{privateApis:be}=window.wp.blockEditor,{store:he}=window.wp.editPost,{useMemo:fe}=window.wp.element,{getLayoutStyles:ke}=U(be);function ge(){const{hasThemeStyleSupport:e,editorSettings:t}=me(o=>({hasThemeStyleSupport:o(he).isFeatureActive("themeStyles"),editorSettings:o(pe).getEditorSettings()}),[]);return fe(()=>{const o=[...t?.defaultEditorStyles??[]];return!t.disableLayoutStyles&&!e&&o.push({css:ke({style:{},selector:"body",hasBlockGapSupport:!1,hasFallbackGapSupport:!0,fallbackGapValue:"0.5em"})}),e?t.styles??[]:o},[t.defaultEditorStyles,t.disableLayoutStyles,t.styles,e])}const{addFilter:ye,removeFilter:Se}=window.wp.hooks,{useCallback:Ee,useEffect:N}=window.wp.element;function ve(){N(()=>(ye("editor.MediaUpload","GutenbergKit",()=>Re),()=>{Se("editor.MediaUpload","GutenbergKit")}),[])}function Re({render:e,...t}){const{open:o}=_e(t);return e({open:o})}function _e({onSelect:e,...t}){return N(()=>(window.editor.setMediaUploadAttachment=s=>{e(t.multiple?s:s[0])},()=>{window.editor.setMediaUploadAttachment=()=>{}}),[e,t.multiple]),{open:Ee(()=>V(t),[t])}}const{jsx:l,jsxs:R}=window.ReactJSXRuntime,{useEffect:_,useRef:p,useMemo:Pe}=window.wp.element,{BlockList:xe,privateApis:Te}=window.wp.blockEditor,{Popover:Ce}=window.wp.components,{getBlockTypes:Be,unregisterBlockType:Le}=window.wp.blocks,{registerCoreBlocks:$e}=window.wp.blockLibrary,{store:P,mediaUpload:Ue,EditorProvider:Ne,EditorSnackbars:je,PostTitle:Ae}=window.wp.editor,{useDispatch:x,useSelect:T,subscribe:Me}=window.wp.data,{store:m}=window.wp.coreData,c={},{ExperimentalBlockCanvas:Ie}=U(Te);function Fe({post:e}){const t=p(),o=p(e.title),s=p(e.content),{addEntities:r,editEntityRecord:d,receiveEntityRecords:u}=x(m),{setEditedPost:b}=x(P),{getEditedPostAttribute:j,getEditedPostContent:h}=T(P);_(()=>(window.editor=c,r(ue),u("postType",e.type,e),$e(),z(),b(e.type,e.id),()=>{window.editor={},Be().forEach(n=>{Le(n.name)})}),[]);const{blockPatterns:f,currentPost:A,hasLoadedPost:M,hasUploadPermissions:k,reusableBlocks:g}=T(n=>{const{getEntityRecord:a,getEntityRecords:G,hasFinishedResolution:O}=n(m),D=a("root","user",e.author),J=a("postType",e.type,e.id),X=e?.id?O("getEntityRecord",["postType",e.type,e.id]):!0;return{blockPatterns:n(m).getBlockPatterns(),currentPost:J,hasLoadedPost:X,hasUploadPermissions:D?.capabilities?.upload_files??!0,reusableBlocks:G("postType","wp_block")}},[e.author,e.id,e.type]);_(()=>Me(()=>{const{title:n,content:a}=c.getTitleAndContent();(n!==o.current||a!==s.current)&&(K(),o.current=n,s.current=a)}),[]);function y(n){d("postType",e.type,e.id,n)}c.setContent=n=>{y({content:decodeURIComponent(n)})},c.setTitle=n=>{y({title:decodeURIComponent(n)})},c.getContent=(n=!1)=>(n&&C(),h()),c.getTitleAndContent=(n=!1)=>(n&&C(),{title:j("title"),content:h()});const I=Pe(()=>({hasFixedToolbar:!0,mediaUpload:k?Ue:void 0,__experimentalReusableBlocks:g,__experimentalBlockPatterns:f}),[f,k,g]),F=ge();return ve(),M&&l("div",{className:"editor__container",children:R(Ne,{post:A,settings:I,useSubRegistry:!1,children:[R(Ie,{shouldIframe:!1,height:"auto",styles:F,children:[l("div",{className:"editor-visual-editor__post-title-wrapper",children:l(Ae,{ref:t})}),l(xe,{})]}),l(de,{}),l(Ce.Slot,{}),l(je,{})]})})}function C(){const e=document.activeElement;e&&e.tagName==="P"&&e.blur()}const{jsx:B}=window.ReactJSXRuntime,{Notice:Ge}=window.wp.components,{__:Oe}=window.wp.i18n,{useState:De,useEffect:L}=window.wp.element;function Je(){const{notice:e,clearNotice:t}=Xe(),o=[{label:"Retry",onClick:()=>window.location.href="remote.html",variant:"primary"},{label:"Dismiss",onClick:t,variant:"secondary"}];return e?B("div",{className:"editor-load-notice",children:B(Ge,{actions:o,status:"warning",isDismissible:!1,children:e})}):null}function Xe(){const[e,t]=De(null);return L(()=>{const s=new URL(window.location.href).searchParams.get("error");let r=null;switch(s){case Ve:r=Oe("Oops! We couldn't load your site's editor and plugins. Don't worry, you can use the default editor for now.");break;default:r=null}t(r)},[]),L(()=>{if(e){const o=setTimeout(()=>{t(null)},2e4);return()=>clearTimeout(o)}},[e]),{notice:e,clearNotice:()=>t(null)}}const Ve="remote_editor_load_error",{Fragment:ze,jsx:$,jsxs:Ke}=window.ReactJSXRuntime;function qe(e){return Ke(ze,{children:[$(Je,{}),$(Fe,{...e})]})}export{qe as default}; diff --git a/ios/Sources/GutenbergKit/Gutenberg/assets/index-BjJGES_T.js b/ios/Sources/GutenbergKit/Gutenberg/assets/index-BjJGES_T.js deleted file mode 100644 index 958408db..00000000 --- a/ios/Sources/GutenbergKit/Gutenberg/assets/index-BjJGES_T.js +++ /dev/null @@ -1,813 +0,0 @@ -var Q5e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Z2n=Q5e((Vbn,$4)=>{function J5e(e,t){for(var n=0;no[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&o(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();var I0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Or(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wee(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}),n}var kee={exports:{}},ax={},See={exports:{}},mn={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Xz=Symbol.for("react.element"),exe=Symbol.for("react.portal"),txe=Symbol.for("react.fragment"),nxe=Symbol.for("react.strict_mode"),oxe=Symbol.for("react.profiler"),rxe=Symbol.for("react.provider"),sxe=Symbol.for("react.context"),ixe=Symbol.for("react.forward_ref"),axe=Symbol.for("react.suspense"),cxe=Symbol.for("react.memo"),lxe=Symbol.for("react.lazy"),eF=Symbol.iterator;function uxe(e){return e===null||typeof e!="object"?null:(e=eF&&e[eF]||e["@@iterator"],typeof e=="function"?e:null)}var Cee={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qee=Object.assign,Ree={};function fh(e,t,n){this.props=e,this.context=t,this.refs=Ree,this.updater=n||Cee}fh.prototype.isReactComponent={};fh.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};fh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Tee(){}Tee.prototype=fh.prototype;function zW(e,t,n){this.props=e,this.context=t,this.refs=Ree,this.updater=n||Cee}var OW=zW.prototype=new Tee;OW.constructor=zW;qee(OW,fh.prototype);OW.isPureReactComponent=!0;var tF=Array.isArray,Eee=Object.prototype.hasOwnProperty,yW={current:null},Wee={key:!0,ref:!0,__self:!0,__source:!0};function Nee(e,t,n){var o,r={},s=null,i=null;if(t!=null)for(o in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)Eee.call(t,o)&&!Wee.hasOwnProperty(o)&&(r[o]=t[o]);var c=arguments.length-2;if(c===1)r.children=n;else if(1/g;function a6(e,t,n,o,r){return{element:e,tokenStart:t,tokenLength:n,prevOffset:o,leadingTextStart:r,children:[]}}const zo=(e,t)=>{if(Oi=e,la=0,pu=[],Ql=[],jee.lastIndex=0,!yxe(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do;while(Axe(t));return O.createElement(O.Fragment,null,...pu)},yxe=e=>{const t=typeof e=="object",n=t&&Object.values(e);return t&&n.length&&n.every(o=>O.isValidElement(o))};function Axe(e){const t=vxe(),[n,o,r,s]=t,i=Ql.length,c=r>la?la:null;if(!e[o])return c6(),!1;switch(n){case"no-more-tokens":if(i!==0){const{leadingTextStart:p,tokenStart:f}=Ql.pop();pu.push(Oi.substr(p,f))}return c6(),!1;case"self-closed":return i===0?(c!==null&&pu.push(Oi.substr(c,r-c)),pu.push(e[o]),la=r+s,!0):(oF(a6(e[o],r,s)),la=r+s,!0);case"opener":return Ql.push(a6(e[o],r,s,r+s,c)),la=r+s,!0;case"closer":if(i===1)return xxe(r),la=r+s,!0;const l=Ql.pop(),u=Oi.substr(l.prevOffset,r-l.prevOffset);l.children.push(u),l.prevOffset=r+s;const d=a6(l.element,l.tokenStart,l.tokenLength,r+s);return d.children=l.children,oF(d),la=r+s,!0;default:return c6(),!1}}function vxe(){const e=jee.exec(Oi);if(e===null)return["no-more-tokens"];const t=e.index,[n,o,r,s]=e,i=n.length;return s?["self-closed",r,t,i]:o?["closer",r,t,i]:["opener",r,t,i]}function c6(){const e=Oi.length-la;e!==0&&pu.push(Oi.substr(la,e))}function oF(e){const{element:t,tokenStart:n,tokenLength:o,prevOffset:r,children:s}=e,i=Ql[Ql.length-1],c=Oi.substr(i.prevOffset,n-i.prevOffset);c&&i.children.push(c),i.children.push(O.cloneElement(t,null,...s)),i.prevOffset=r||n+o}function xxe(e){const{element:t,leadingTextStart:n,prevOffset:o,tokenStart:r,children:s}=Ql.pop(),i=e?Oi.substr(o,e-o):Oi.substr(o);i&&s.push(i),n!==null&&pu.push(Oi.substr(n,r-n)),pu.push(O.cloneElement(t,null,...s))}var Pee={exports:{}},hs={},Iee={exports:{}},Dee={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */(function(e){function t(P,D){var H=P.length;P.push(D);e:for(;0>>1,K=P[G];if(0>>1;Gr(ae,H))Zr(ne,ae)?(P[G]=ne,P[Z]=H,G=Z):(P[G]=ae,P[oe]=H,G=oe);else if(Zr(ne,H))P[G]=ne,P[Z]=H,G=Z;else break e}}return D}function r(P,D){var H=P.sortIndex-D.sortIndex;return H!==0?H:P.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,c=i.now();e.unstable_now=function(){return i.now()-c}}var l=[],u=[],d=1,p=null,f=3,b=!1,h=!1,g=!1,z=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(P){for(var D=n(u);D!==null;){if(D.callback===null)o(u);else if(D.startTime<=P)o(u),D.sortIndex=D.expirationTime,t(l,D);else break;D=n(u)}}function M(P){if(g=!1,v(P),!h)if(n(l)!==null)h=!0,N(y);else{var D=n(u);D!==null&&j(M,D.startTime-P)}}function y(P,D){h=!1,g&&(g=!1,A(k),k=-1),b=!0;var H=f;try{for(v(D),p=n(l);p!==null&&(!(p.expirationTime>D)||P&&!q());){var G=p.callback;if(typeof G=="function"){p.callback=null,f=p.priorityLevel;var K=G(p.expirationTime<=D);D=e.unstable_now(),typeof K=="function"?p.callback=K:p===n(l)&&o(l),v(D)}else o(l);p=n(l)}if(p!==null)var J=!0;else{var oe=n(u);oe!==null&&j(M,oe.startTime-D),J=!1}return J}finally{p=null,f=H,b=!1}}var _=!1,w=null,k=-1,S=5,C=-1;function q(){return!(e.unstable_now()-CP||125G?(P.sortIndex=H,t(u,P),n(l)===null&&P===n(u)&&(g?(A(k),k=-1):g=!0,j(M,H-G))):(P.sortIndex=K,t(l,P),h||b||(h=!0,N(y))),P},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(P){var D=f;return function(){var H=f;f=D;try{return P.apply(this,arguments)}finally{f=H}}}})(Dee);Iee.exports=Dee;var _xe=Iee.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var wxe=O,ds=_xe;function Le(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zq=Object.prototype.hasOwnProperty,kxe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rF={},sF={};function Sxe(e){return Zq.call(sF,e)?!0:Zq.call(rF,e)?!1:kxe.test(e)?sF[e]=!0:(rF[e]=!0,!1)}function Cxe(e,t,n,o){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function qxe(e,t,n,o){if(t===null||typeof t>"u"||Cxe(e,t,n,o))return!0;if(o)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function d1(e,t,n,o,r,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var br={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){br[e]=new d1(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];br[t]=new d1(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){br[e]=new d1(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){br[e]=new d1(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){br[e]=new d1(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){br[e]=new d1(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){br[e]=new d1(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){br[e]=new d1(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){br[e]=new d1(e,5,!1,e.toLowerCase(),null,!1,!1)});var vW=/[\-:]([a-z])/g;function xW(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(vW,xW);br[t]=new d1(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(vW,xW);br[t]=new d1(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(vW,xW);br[t]=new d1(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){br[e]=new d1(e,1,!1,e.toLowerCase(),null,!1,!1)});br.xlinkHref=new d1("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){br[e]=new d1(e,1,!1,e.toLowerCase(),null,!0,!0)});function _W(e,t,n,o){var r=br.hasOwnProperty(t)?br[t]:null;(r!==null?r.type!==0:o||!(2c||r[i]!==s[c]){var l=` -`+r[i].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=i&&0<=c);break}}}finally{u6=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ig(e):""}function Rxe(e){switch(e.tag){case 5:return ig(e.type);case 16:return ig("Lazy");case 13:return ig("Suspense");case 19:return ig("SuspenseList");case 0:case 2:case 15:return e=d6(e.type,!1),e;case 11:return e=d6(e.type.render,!1),e;case 1:return e=d6(e.type,!0),e;default:return""}}function tR(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case h2:return"Fragment";case b2:return"Portal";case Qq:return"Profiler";case wW:return"StrictMode";case Jq:return"Suspense";case eR:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Vee:return(e.displayName||"Context")+".Consumer";case $ee:return(e._context.displayName||"Context")+".Provider";case kW:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case SW:return t=e.displayName||null,t!==null?t:tR(e.type)||"Memo";case Dl:t=e._payload,e=e._init;try{return tR(e(t))}catch{}}return null}function Txe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return tR(t);case 8:return t===wW?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function qu(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Uee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Exe(e){var t=Uee(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(i){o=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return o},setValue:function(i){o=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function XO(e){e._valueTracker||(e._valueTracker=Exe(e))}function Xee(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=Uee(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function V4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function nR(e,t){var n=t.checked;return Y0({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function aF(e,t){var n=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;n=qu(t.value!=null?t.value:n),e._wrapperState={initialChecked:o,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Gee(e,t){t=t.checked,t!=null&&_W(e,"checked",t,!1)}function oR(e,t){Gee(e,t);var n=qu(t.value),o=t.type;if(n!=null)o==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?rR(e,t.type,n):t.hasOwnProperty("defaultValue")&&rR(e,t.type,qu(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function cF(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function rR(e,t,n){(t!=="number"||V4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ag=Array.isArray;function $2(e,t,n,o){if(e=e.options,t){t={};for(var r=0;r"+t.valueOf().toString()+"",t=GO.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function uM(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Sg={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Wxe=["Webkit","ms","Moz","O"];Object.keys(Sg).forEach(function(e){Wxe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Sg[t]=Sg[e]})});function Qee(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Sg.hasOwnProperty(e)&&Sg[e]?(""+t).trim():t+"px"}function Jee(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var o=n.indexOf("--")===0,r=Qee(n,t[n],o);n==="float"&&(n="cssFloat"),o?e.setProperty(n,r):e[n]=r}}var Nxe=Y0({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function aR(e,t){if(t){if(Nxe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Le(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Le(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Le(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Le(62))}}function cR(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lR=null;function CW(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var uR=null,V2=null,H2=null;function dF(e){if(e=Yz(e)){if(typeof uR!="function")throw Error(Le(280));var t=e.stateNode;t&&(t=px(t),uR(e.stateNode,e.type,t))}}function ete(e){V2?H2?H2.push(e):H2=[e]:V2=e}function tte(){if(V2){var e=V2,t=H2;if(H2=V2=null,dF(e),t)for(e=0;e>>=0,e===0?32:31-(Uxe(e)/Xxe|0)|0}var KO=64,YO=4194304;function cg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function G4(e,t){var n=e.pendingLanes;if(n===0)return 0;var o=0,r=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var c=i&~r;c!==0?o=cg(c):(s&=i,s!==0&&(o=cg(s)))}else i=n&~r,i!==0?o=cg(i):s!==0&&(o=cg(s));if(o===0)return 0;if(t!==0&&t!==o&&!(t&r)&&(r=o&-o,s=t&-t,r>=s||r===16&&(s&4194240)!==0))return t;if(o&4&&(o|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0n;n++)t.push(e);return t}function Gz(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yi(t),e[t]=n}function Zxe(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0=qg),OF=" ",yF=!1;function yte(e,t){switch(e){case"keyup":return __e.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ate(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var m2=!1;function k_e(e,t){switch(e){case"compositionend":return Ate(t);case"keypress":return t.which!==32?null:(yF=!0,OF);case"textInput":return e=t.data,e===OF&&yF?null:e;default:return null}}function S_e(e,t){if(m2)return e==="compositionend"||!LW&&yte(e,t)?(e=zte(),FA=WW=Jl=null,m2=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_F(n)}}function wte(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wte(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kte(){for(var e=window,t=V4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=V4(e.document)}return t}function jW(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function L_e(e){var t=kte(),n=e.focusedElem,o=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&wte(n.ownerDocument.documentElement,n)){if(o!==null&&jW(n)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var r=n.textContent.length,s=Math.min(o.start,r);o=o.end===void 0?s:Math.min(o.end,r),!e.extend&&s>o&&(r=o,o=s,s=r),r=wF(n,s);var i=wF(n,o);r&&i&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(r.node,r.offset),e.removeAllRanges(),s>o?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,g2=null,mR=null,Tg=null,gR=!1;function kF(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;gR||g2==null||g2!==V4(o)||(o=g2,"selectionStart"in o&&jW(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Tg&&mM(Tg,o)||(Tg=o,o=Z4(mR,"onSelect"),0O2||(e.current=vR[O2],vR[O2]=null,O2--)}function g0(e,t){O2++,vR[O2]=e.current,e.current=t}var Ru={},$r=fd(Ru),C1=fd(!1),Sp=Ru;function hb(e,t){var n=e.type.contextTypes;if(!n)return Ru;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in n)r[s]=t[s];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function q1(e){return e=e.childContextTypes,e!=null}function J4(){_0(C1),_0($r)}function WF(e,t,n){if($r.current!==Ru)throw Error(Le(168));g0($r,t),g0(C1,n)}function Bte(e,t,n){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return n;o=o.getChildContext();for(var r in o)if(!(r in t))throw Error(Le(108,Txe(e)||"Unknown",r));return Y0({},n,o)}function ev(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ru,Sp=$r.current,g0($r,e),g0(C1,C1.current),!0}function NF(e,t,n){var o=e.stateNode;if(!o)throw Error(Le(169));n?(e=Bte(e,t,Sp),o.__reactInternalMemoizedMergedChildContext=e,_0(C1),_0($r),g0($r,e)):_0(C1),g0(C1,n)}var yc=null,fx=!1,_6=!1;function Lte(e){yc===null?yc=[e]:yc.push(e)}function K_e(e){fx=!0,Lte(e)}function bd(){if(!_6&&yc!==null){_6=!0;var e=0,t=Zn;try{var n=yc;for(Zn=1;e>=i,r-=i,xc=1<<32-yi(t)+r|n<k?(S=w,w=null):S=w.sibling;var C=f(A,w,v[k],M);if(C===null){w===null&&(w=S);break}e&&w&&C.alternate===null&&t(A,w),x=s(C,x,k),_===null?y=C:_.sibling=C,_=C,w=S}if(k===v.length)return n(A,w),W0&&$d(A,k),y;if(w===null){for(;kk?(S=w,w=null):S=w.sibling;var q=f(A,w,C.value,M);if(q===null){w===null&&(w=S);break}e&&w&&q.alternate===null&&t(A,w),x=s(q,x,k),_===null?y=q:_.sibling=q,_=q,w=S}if(C.done)return n(A,w),W0&&$d(A,k),y;if(w===null){for(;!C.done;k++,C=v.next())C=p(A,C.value,M),C!==null&&(x=s(C,x,k),_===null?y=C:_.sibling=C,_=C);return W0&&$d(A,k),y}for(w=o(A,w);!C.done;k++,C=v.next())C=b(w,A,k,C.value,M),C!==null&&(e&&C.alternate!==null&&w.delete(C.key===null?k:C.key),x=s(C,x,k),_===null?y=C:_.sibling=C,_=C);return e&&w.forEach(function(E){return t(A,E)}),W0&&$d(A,k),y}function z(A,x,v,M){if(typeof v=="object"&&v!==null&&v.type===h2&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case UO:e:{for(var y=v.key,_=x;_!==null;){if(_.key===y){if(y=v.type,y===h2){if(_.tag===7){n(A,_.sibling),x=r(_,v.props.children),x.return=A,A=x;break e}}else if(_.elementType===y||typeof y=="object"&&y!==null&&y.$$typeof===Dl&&jF(y)===_.type){n(A,_.sibling),x=r(_,v.props),x.ref=km(A,_,v),x.return=A,A=x;break e}n(A,_);break}else t(A,_);_=_.sibling}v.type===h2?(x=bp(v.props.children,A.mode,M,v.key),x.return=A,A=x):(M=YA(v.type,v.key,v.props,null,A.mode,M),M.ref=km(A,x,v),M.return=A,A=M)}return i(A);case b2:e:{for(_=v.key;x!==null;){if(x.key===_)if(x.tag===4&&x.stateNode.containerInfo===v.containerInfo&&x.stateNode.implementation===v.implementation){n(A,x.sibling),x=r(x,v.children||[]),x.return=A,A=x;break e}else{n(A,x);break}else t(A,x);x=x.sibling}x=E6(v,A.mode,M),x.return=A,A=x}return i(A);case Dl:return _=v._init,z(A,x,_(v._payload),M)}if(ag(v))return h(A,x,v,M);if(Am(v))return g(A,x,v,M);oy(A,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,x!==null&&x.tag===6?(n(A,x.sibling),x=r(x,v),x.return=A,A=x):(n(A,x),x=T6(v,A.mode,M),x.return=A,A=x),i(A)):n(A,x)}return z}var gb=Dte(!0),Fte=Dte(!1),ov=fd(null),rv=null,v2=null,FW=null;function $W(){FW=v2=rv=null}function VW(e){var t=ov.current;_0(ov),e._currentValue=t}function wR(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function X2(e,t){rv=e,FW=v2=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(w1=!0),e.firstContext=null)}function Xs(e){var t=e._currentValue;if(FW!==e)if(e={context:e,memoizedValue:t,next:null},v2===null){if(rv===null)throw Error(Le(308));v2=e,rv.dependencies={lanes:0,firstContext:e}}else v2=v2.next=e;return t}var op=null;function HW(e){op===null?op=[e]:op.push(e)}function $te(e,t,n,o){var r=t.interleaved;return r===null?(n.next=n,HW(t)):(n.next=r.next,r.next=n),t.interleaved=n,Gc(e,o)}function Gc(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Fl=!1;function UW(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vte(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ec(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function gu(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,Tn&2){var r=o.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),o.pending=t,Gc(e,n)}return r=o.interleaved,r===null?(t.next=t,HW(o)):(t.next=r.next,r.next=t),o.interleaved=t,Gc(e,n)}function VA(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,RW(e,n)}}function PF(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?r=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?r=s=t:s=s.next=t}else r=s=t;n={baseState:o.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:o.shared,effects:o.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function sv(e,t,n,o){var r=e.updateQueue;Fl=!1;var s=r.firstBaseUpdate,i=r.lastBaseUpdate,c=r.shared.pending;if(c!==null){r.shared.pending=null;var l=c,u=l.next;l.next=null,i===null?s=u:i.next=u,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,c=d.lastBaseUpdate,c!==i&&(c===null?d.firstBaseUpdate=u:c.next=u,d.lastBaseUpdate=l))}if(s!==null){var p=r.baseState;i=0,d=u=l=null,c=s;do{var f=c.lane,b=c.eventTime;if((o&f)===f){d!==null&&(d=d.next={eventTime:b,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var h=e,g=c;switch(f=t,b=n,g.tag){case 1:if(h=g.payload,typeof h=="function"){p=h.call(b,p,f);break e}p=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h=="function"?h.call(b,p,f):h,f==null)break e;p=Y0({},p,f);break e;case 2:Fl=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,f=r.effects,f===null?r.effects=[c]:f.push(c))}else b={eventTime:b,lane:f,tag:c.tag,payload:c.payload,callback:c.callback,next:null},d===null?(u=d=b,l=p):d=d.next=b,i|=f;if(c=c.next,c===null){if(c=r.shared.pending,c===null)break;f=c,c=f.next,f.next=null,r.lastBaseUpdate=f,r.shared.pending=null}}while(!0);if(d===null&&(l=p),r.baseState=l,r.firstBaseUpdate=u,r.lastBaseUpdate=d,t=r.shared.interleaved,t!==null){r=t;do i|=r.lane,r=r.next;while(r!==t)}else s===null&&(r.shared.lanes=0);Rp|=i,e.lanes=i,e.memoizedState=p}}function IF(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var o=k6.transition;k6.transition={};try{e(!1),t()}finally{Zn=n,k6.transition=o}}function ane(){return Gs().memoizedState}function J_e(e,t,n){var o=zu(e);if(n={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null},cne(e))lne(t,n);else if(n=$te(e,t,n,o),n!==null){var r=t1();Ai(n,e,o,r),une(n,t,o)}}function ewe(e,t,n){var o=zu(e),r={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null};if(cne(e))lne(t,r);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,c=s(i,n);if(r.hasEagerState=!0,r.eagerState=c,wi(c,i)){var l=t.interleaved;l===null?(r.next=r,HW(t)):(r.next=l.next,l.next=r),t.interleaved=r;return}}catch{}finally{}n=$te(e,t,r,o),n!==null&&(r=t1(),Ai(n,e,o,r),une(n,t,o))}}function cne(e){var t=e.alternate;return e===G0||t!==null&&t===G0}function lne(e,t){Eg=av=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function une(e,t,n){if(n&4194240){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,RW(e,n)}}var cv={readContext:Xs,useCallback:kr,useContext:kr,useEffect:kr,useImperativeHandle:kr,useInsertionEffect:kr,useLayoutEffect:kr,useMemo:kr,useReducer:kr,useRef:kr,useState:kr,useDebugValue:kr,useDeferredValue:kr,useTransition:kr,useMutableSource:kr,useSyncExternalStore:kr,useId:kr,unstable_isNewReconciler:!1},twe={readContext:Xs,useCallback:function(e,t){return sa().memoizedState=[e,t===void 0?null:t],e},useContext:Xs,useEffect:FF,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,UA(4194308,4,nne.bind(null,t,e),n)},useLayoutEffect:function(e,t){return UA(4194308,4,e,t)},useInsertionEffect:function(e,t){return UA(4,2,e,t)},useMemo:function(e,t){var n=sa();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var o=sa();return t=n!==void 0?n(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=J_e.bind(null,G0,e),[o.memoizedState,e]},useRef:function(e){var t=sa();return e={current:e},t.memoizedState=e},useState:DF,useDebugValue:eN,useDeferredValue:function(e){return sa().memoizedState=e},useTransition:function(){var e=DF(!1),t=e[0];return e=Q_e.bind(null,e[1]),sa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var o=G0,r=sa();if(W0){if(n===void 0)throw Error(Le(407));n=n()}else{if(n=t(),Ho===null)throw Error(Le(349));qp&30||Gte(o,t,n)}r.memoizedState=n;var s={value:n,getSnapshot:t};return r.queue=s,FF(Yte.bind(null,o,s,e),[e]),o.flags|=2048,xM(9,Kte.bind(null,o,s,n,t),void 0,null),n},useId:function(){var e=sa(),t=Ho.identifierPrefix;if(W0){var n=_c,o=xc;n=(o&~(1<<32-yi(o)-1)).toString(32)+n,t=":"+t+"R"+n,n=AM++,0<\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=i.createElement(n,{is:o.is}):(e=i.createElement(n),n==="select"&&(i=e,o.multiple?i.multiple=!0:o.size&&(i.size=o.size))):e=i.createElementNS(e,n),e[Ma]=t,e[zM]=o,One(e,t,!1,!1),t.stateNode=e;e:{switch(i=cR(n,o),n){case"dialog":v0("cancel",e),v0("close",e),r=o;break;case"iframe":case"object":case"embed":v0("load",e),r=o;break;case"video":case"audio":for(r=0;rOb&&(t.flags|=128,o=!0,Sm(s,!1),t.lanes=4194304)}else{if(!o)if(e=iv(i),e!==null){if(t.flags|=128,o=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Sm(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!W0)return Sr(t),null}else 2*ao()-s.renderingStartTime>Ob&&n!==1073741824&&(t.flags|=128,o=!0,Sm(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ao(),t.sibling=null,n=F0.current,g0(F0,o?n&1|2:n&1),t):(Sr(t),null);case 22:case 23:return iN(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?Q1&1073741824&&(Sr(t),t.subtreeFlags&6&&(t.flags|=8192)):Sr(t),null;case 24:return null;case 25:return null}throw Error(Le(156,t.tag))}function lwe(e,t){switch(IW(t),t.tag){case 1:return q1(t.type)&&J4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mb(),_0(C1),_0($r),KW(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return GW(t),null;case 13:if(_0(F0),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Le(340));mb()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _0(F0),null;case 4:return Mb(),null;case 10:return VW(t.type._context),null;case 22:case 23:return iN(),null;case 24:return null;default:return null}}var sy=!1,Er=!1,uwe=typeof WeakSet=="function"?WeakSet:Set,ut=null;function x2(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){to(e,t,o)}else n.current=null}function NR(e,t,n){try{n()}catch(o){to(e,t,o)}}var JF=!1;function dwe(e,t){if(MR=K4,e=kte(),jW(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var r=o.anchorOffset,s=o.focusNode;o=o.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,c=-1,l=-1,u=0,d=0,p=e,f=null;t:for(;;){for(var b;p!==n||r!==0&&p.nodeType!==3||(c=i+r),p!==s||o!==0&&p.nodeType!==3||(l=i+o),p.nodeType===3&&(i+=p.nodeValue.length),(b=p.firstChild)!==null;)f=p,p=b;for(;;){if(p===e)break t;if(f===n&&++u===r&&(c=i),f===s&&++d===o&&(l=i),(b=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=b}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(zR={focusedElem:e,selectionRange:n},K4=!1,ut=t;ut!==null;)if(t=ut,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ut=e;else for(;ut!==null;){t=ut;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,z=h.memoizedState,A=t.stateNode,x=A.getSnapshotBeforeUpdate(t.elementType===t.type?g:li(t.type,g),z);A.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Le(163))}}catch(M){to(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,ut=e;break}ut=t.return}return h=JF,JF=!1,h}function Wg(e,t,n){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var r=o=o.next;do{if((r.tag&e)===e){var s=r.destroy;r.destroy=void 0,s!==void 0&&NR(t,n,s)}r=r.next}while(r!==o)}}function mx(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var o=n.create;n.destroy=o()}n=n.next}while(n!==t)}}function BR(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function vne(e){var t=e.alternate;t!==null&&(e.alternate=null,vne(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ma],delete t[zM],delete t[AR],delete t[X_e],delete t[G_e])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function xne(e){return e.tag===5||e.tag===3||e.tag===4}function e$(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xne(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function LR(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Q4));else if(o!==4&&(e=e.child,e!==null))for(LR(e,t,n),e=e.sibling;e!==null;)LR(e,t,n),e=e.sibling}function jR(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(jR(e,t,n),e=e.sibling;e!==null;)jR(e,t,n),e=e.sibling}var nr=null,pi=!1;function ql(e,t,n){for(n=n.child;n!==null;)_ne(e,t,n),n=n.sibling}function _ne(e,t,n){if(va&&typeof va.onCommitFiberUnmount=="function")try{va.onCommitFiberUnmount(cx,n)}catch{}switch(n.tag){case 5:Er||x2(n,t);case 6:var o=nr,r=pi;nr=null,ql(e,t,n),nr=o,pi=r,nr!==null&&(pi?(e=nr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):nr.removeChild(n.stateNode));break;case 18:nr!==null&&(pi?(e=nr,n=n.stateNode,e.nodeType===8?x6(e.parentNode,n):e.nodeType===1&&x6(e,n),bM(e)):x6(nr,n.stateNode));break;case 4:o=nr,r=pi,nr=n.stateNode.containerInfo,pi=!0,ql(e,t,n),nr=o,pi=r;break;case 0:case 11:case 14:case 15:if(!Er&&(o=n.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){r=o=o.next;do{var s=r,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&NR(n,t,i),r=r.next}while(r!==o)}ql(e,t,n);break;case 1:if(!Er&&(x2(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=n.memoizedProps,o.state=n.memoizedState,o.componentWillUnmount()}catch(c){to(n,t,c)}ql(e,t,n);break;case 21:ql(e,t,n);break;case 22:n.mode&1?(Er=(o=Er)||n.memoizedState!==null,ql(e,t,n),Er=o):ql(e,t,n);break;default:ql(e,t,n)}}function t$(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new uwe),t.forEach(function(o){var r=Owe.bind(null,e,o);n.has(o)||(n.add(o),o.then(r,r))})}}function ci(e,t){var n=t.deletions;if(n!==null)for(var o=0;or&&(r=i),o&=~s}if(o=r,o=ao()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*fwe(o/1960))-o,10e?16:e,eu===null)var o=!1;else{if(e=eu,eu=null,dv=0,Tn&6)throw Error(Le(331));var r=Tn;for(Tn|=4,ut=e.current;ut!==null;){var s=ut,i=s.child;if(ut.flags&16){var c=s.deletions;if(c!==null){for(var l=0;lao()-rN?fp(e,0):oN|=n),R1(e,t)}function Ene(e,t){t===0&&(e.mode&1?(t=YO,YO<<=1,!(YO&130023424)&&(YO=4194304)):t=1);var n=t1();e=Gc(e,t),e!==null&&(Gz(e,t,n),R1(e,n))}function zwe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ene(e,n)}function Owe(e,t){var n=0;switch(e.tag){case 13:var o=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(Le(314))}o!==null&&o.delete(t),Ene(e,n)}var Wne;Wne=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||C1.current)w1=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return w1=!1,awe(e,t,n);w1=!!(e.flags&131072)}else w1=!1,W0&&t.flags&1048576&&jte(t,nv,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;XA(e,t),e=t.pendingProps;var r=hb(t,$r.current);X2(t,n),r=ZW(null,t,o,e,r,n);var s=QW();return t.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,q1(o)?(s=!0,ev(t)):s=!1,t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,UW(t),r.updater=hx,t.stateNode=r,r._reactInternals=t,SR(t,o,e,n),t=RR(null,t,o,!0,s,n)):(t.tag=0,W0&&s&&PW(t),Qr(null,t,r,n),t=t.child),t;case 16:o=t.elementType;e:{switch(XA(e,t),e=t.pendingProps,r=o._init,o=r(o._payload),t.type=o,r=t.tag=Awe(o),e=li(o,e),r){case 0:t=qR(null,t,o,e,n);break e;case 1:t=YF(null,t,o,e,n);break e;case 11:t=GF(null,t,o,e,n);break e;case 14:t=KF(null,t,o,li(o.type,e),n);break e}throw Error(Le(306,o,""))}return t;case 0:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),qR(e,t,o,r,n);case 1:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),YF(e,t,o,r,n);case 3:e:{if(gne(t),e===null)throw Error(Le(387));o=t.pendingProps,s=t.memoizedState,r=s.element,Vte(e,t),sv(t,o,null,n);var i=t.memoizedState;if(o=i.element,s.isDehydrated)if(s={element:o,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){r=zb(Error(Le(423)),t),t=ZF(e,t,o,n,r);break e}else if(o!==r){r=zb(Error(Le(424)),t),t=ZF(e,t,o,n,r);break e}else for(ns=mu(t.stateNode.containerInfo.firstChild),ss=t,W0=!0,fi=null,n=Fte(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(mb(),o===r){t=Kc(e,t,n);break e}Qr(e,t,o,n)}t=t.child}return t;case 5:return Hte(t),e===null&&_R(t),o=t.type,r=t.pendingProps,s=e!==null?e.memoizedProps:null,i=r.children,OR(o,r)?i=null:s!==null&&OR(o,s)&&(t.flags|=32),mne(e,t),Qr(e,t,i,n),t.child;case 6:return e===null&&_R(t),null;case 13:return Mne(e,t,n);case 4:return XW(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=gb(t,null,o,n):Qr(e,t,o,n),t.child;case 11:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),GF(e,t,o,r,n);case 7:return Qr(e,t,t.pendingProps,n),t.child;case 8:return Qr(e,t,t.pendingProps.children,n),t.child;case 12:return Qr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(o=t.type._context,r=t.pendingProps,s=t.memoizedProps,i=r.value,g0(ov,o._currentValue),o._currentValue=i,s!==null)if(wi(s.value,i)){if(s.children===r.children&&!C1.current){t=Kc(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var c=s.dependencies;if(c!==null){i=s.child;for(var l=c.firstContext;l!==null;){if(l.context===o){if(s.tag===1){l=Ec(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),wR(s.return,n,t),c.lanes|=n;break}l=l.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(Le(341));i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),wR(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}Qr(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,o=t.pendingProps.children,X2(t,n),r=Xs(r),o=o(r),t.flags|=1,Qr(e,t,o,n),t.child;case 14:return o=t.type,r=li(o,t.pendingProps),r=li(o.type,r),KF(e,t,o,r,n);case 15:return bne(e,t,t.type,t.pendingProps,n);case 17:return o=t.type,r=t.pendingProps,r=t.elementType===o?r:li(o,r),XA(e,t),t.tag=1,q1(o)?(e=!0,ev(t)):e=!1,X2(t,n),dne(t,o,r),SR(t,o,r,n),RR(null,t,o,!0,e,n);case 19:return zne(e,t,n);case 22:return hne(e,t,n)}throw Error(Le(156,t.tag))};function Nne(e,t){return cte(e,t)}function ywe(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ps(e,t,n,o){return new ywe(e,t,n,o)}function cN(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Awe(e){if(typeof e=="function")return cN(e)?1:0;if(e!=null){if(e=e.$$typeof,e===kW)return 11;if(e===SW)return 14}return 2}function Ou(e,t){var n=e.alternate;return n===null?(n=Ps(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function YA(e,t,n,o,r,s){var i=2;if(o=e,typeof e=="function")cN(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case h2:return bp(n.children,r,s,t);case wW:i=8,r|=8;break;case Qq:return e=Ps(12,n,t,r|2),e.elementType=Qq,e.lanes=s,e;case Jq:return e=Ps(13,n,t,r),e.elementType=Jq,e.lanes=s,e;case eR:return e=Ps(19,n,t,r),e.elementType=eR,e.lanes=s,e;case Hee:return Mx(n,r,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $ee:i=10;break e;case Vee:i=9;break e;case kW:i=11;break e;case SW:i=14;break e;case Dl:i=16,o=null;break e}throw Error(Le(130,e==null?e:typeof e,""))}return t=Ps(i,n,t,r),t.elementType=e,t.type=o,t.lanes=s,t}function bp(e,t,n,o){return e=Ps(7,e,o,t),e.lanes=n,e}function Mx(e,t,n,o){return e=Ps(22,e,o,t),e.elementType=Hee,e.lanes=n,e.stateNode={isHidden:!1},e}function T6(e,t,n){return e=Ps(6,e,null,t),e.lanes=n,e}function E6(e,t,n){return t=Ps(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vwe(e,t,n,o,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=f6(0),this.expirationTimes=f6(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=f6(0),this.identifierPrefix=o,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function lN(e,t,n,o,r,s,i,c,l){return e=new vwe(e,t,n,c,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ps(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:o,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},UW(s),e}function xwe(e,t,n){var o=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Pne)}catch(e){console.error(e)}}Pne(),Pee.exports=hs;var n1=Pee.exports,Ine,l$=n1;Ine=l$.createRoot,l$.hydrateRoot;const Cwe=e=>typeof e=="number"?!1:typeof e?.valueOf()=="string"||Array.isArray(e)?!e.length:!e,So={OS:"web",select:e=>"web"in e?e.web:e.default,isWeb:!0};/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */function u$(e){return Object.prototype.toString.call(e)==="[object Object]"}function Qz(e){var t,n;return u$(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(u$(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var $R=function(e,t){return $R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])},$R(e,t)};function qwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");$R(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var J0=function(){return J0=Object.assign||function(t){for(var n,o=1,r=arguments.length;o0&&n>="0"&&n<="9"?"_"+n+o:""+n.toUpperCase()+o}function bv(e,t){return t===void 0&&(t={}),vx(e,J0({delimiter:"",transform:Dne},t))}function Wwe(e,t){return t===0?e.toLowerCase():Dne(e,t)}function fN(e,t){return t===void 0&&(t={}),bv(e,J0({transform:Wwe},t))}function Nwe(e){return e.charAt(0).toUpperCase()+e.substr(1)}function Bwe(e){return Nwe(e.toLowerCase())}function Fne(e,t){return t===void 0&&(t={}),vx(e,J0({delimiter:" ",transform:Bwe},t))}function Lwe(e,t){return t===void 0&&(t={}),vx(e,J0({delimiter:"."},t))}function Ks(e,t){return t===void 0&&(t={}),Lwe(e,J0({delimiter:"-"},t))}function jwe(e){return e.replace(/>/g,">")}const Pwe=/[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;function $ne(e){return e.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi,"&")}function Iwe(e){return e.replace(/"/g,""")}function Vne(e){return e.replace(/{typeof o=="string"&&o.trim()!==""&&(n+=o)}),O.createElement("div",{dangerouslySetInnerHTML:{__html:n},...t})}const{Provider:Fwe,Consumer:$we}=O.createContext(void 0),Vwe=O.forwardRef(()=>null),Hwe=new Set(["string","boolean","number"]),Uwe=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Xwe=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),Gwe=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),Kwe=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function Une(e,t){return t.some(n=>e.indexOf(n)===0)}function Ywe(e){return e==="key"||e==="children"}function Zwe(e,t){switch(e){case"style":return oke(t)}return t}const p$=["accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xmlnsXlink","xHeight"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),f$=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","suppressContentEditableWarning","suppressHydrationWarning","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),b$=["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","xmlns:xlink"].reduce((e,t)=>(e[t.replace(":","").toLowerCase()]=t,e),{});function Qwe(e){switch(e){case"htmlFor":return"for";case"className":return"class"}const t=e.toLowerCase();return f$[t]?f$[t]:p$[t]?Ks(p$[t]):b$[t]?b$[t]:t}function Jwe(e){return e.startsWith("--")?e:Une(e,["ms","O","Moz","Webkit"])?"-"+Ks(e):Ks(e)}function eke(e,t){return typeof t=="number"&&t!==0&&!Kwe.has(e)?t+"px":t}function jr(e,t,n={}){if(e==null||e===!1)return"";if(Array.isArray(e))return Lg(e,t,n);switch(typeof e){case"string":return VR(e);case"number":return e.toString()}const{type:o,props:r}=e;switch(o){case O.StrictMode:case O.Fragment:return Lg(r.children,t,n);case Ro:const{children:s,...i}=r;return h$(Object.keys(i).length?"div":null,{...i,dangerouslySetInnerHTML:{__html:s}},t,n)}switch(typeof o){case"string":return h$(o,r,t,n);case"function":return o.prototype&&typeof o.prototype.render=="function"?tke(o,r,t,n):jr(o(r,n),t,n)}switch(o&&o.$$typeof){case Fwe.$$typeof:return Lg(r.children,r.value,n);case $we.$$typeof:return jr(r.children(t||o._currentValue),t,n);case Vwe.$$typeof:return jr(o.render(r),t,n)}return""}function h$(e,t,n,o={}){let r="";if(e==="textarea"&&t.hasOwnProperty("value")){r=Lg(t.value,n,o);const{value:i,...c}=t;t=c}else t.dangerouslySetInnerHTML&&typeof t.dangerouslySetInnerHTML.__html=="string"?r=t.dangerouslySetInnerHTML.__html:typeof t.children<"u"&&(r=Lg(t.children,n,o));if(!e)return r;const s=nke(t);return Uwe.has(e)?"<"+e+s+"/>":"<"+e+s+">"+r+""}function tke(e,t,n,o={}){const r=new e(t,o);return typeof r.getChildContext=="function"&&Object.assign(o,r.getChildContext()),jr(r.render(),n,o)}function Lg(e,t,n={}){let o="";e=Array.isArray(e)?e:[e];for(let r=0;r=0),g.type){case"b":p=parseInt(p,10).toString(2);break;case"c":p=String.fromCharCode(parseInt(p,10));break;case"d":case"i":p=parseInt(p,10);break;case"j":p=JSON.stringify(p,null,g.width?parseInt(g.width):0);break;case"e":p=g.precision?parseFloat(p).toExponential(g.precision):parseFloat(p).toExponential();break;case"f":p=g.precision?parseFloat(p).toFixed(g.precision):parseFloat(p);break;case"g":p=g.precision?String(Number(p.toPrecision(g.precision))):parseFloat(p);break;case"o":p=(parseInt(p,10)>>>0).toString(8);break;case"s":p=String(p),p=g.precision?p.substring(0,g.precision):p;break;case"t":p=String(!!p),p=g.precision?p.substring(0,g.precision):p;break;case"T":p=Object.prototype.toString.call(p).slice(8,-1).toLowerCase(),p=g.precision?p.substring(0,g.precision):p;break;case"u":p=parseInt(p,10)>>>0;break;case"v":p=p.valueOf(),p=g.precision?p.substring(0,g.precision):p;break;case"x":p=(parseInt(p,10)>>>0).toString(16);break;case"X":p=(parseInt(p,10)>>>0).toString(16).toUpperCase();break}t.json.test(g.type)?f+=p:(t.number.test(g.type)&&(!v||g.sign)?(M=v?"+":"-",p=p.toString().replace(t.sign,"")):M="",A=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",x=g.width-(M+p).length,z=g.width&&x>0?A.repeat(x):"",f+=g.align?M+p+z:A==="0"?M+z+p:z+M+p)}return f}var s=Object.create(null);function i(c){if(s[c])return s[c];for(var l=c,u,d=[],p=0;l;){if((u=t.text.exec(l))!==null)d.push(u[0]);else if((u=t.modulo.exec(l))!==null)d.push("%");else if((u=t.placeholder.exec(l))!==null){if(u[2]){p|=1;var f=[],b=u[2],h=[];if((h=t.key.exec(b))!==null)for(f.push(h[1]);(b=b.substring(h[0].length))!=="";)if((h=t.key_access.exec(b))!==null)f.push(h[1]);else if((h=t.index_access.exec(b))!==null)f.push(h[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=f}else p|=2;if(p===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");d.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");l=l.substring(u[0].length)}return s[c]=d}e.sprintf=n,e.vsprintf=o,typeof window<"u"&&(window.sprintf=n,window.vsprintf=o)})()})(Xne);const rke=Or(Xne),ske=gs(console.error);function le(e,...t){try{return rke.sprintf(e,...t)}catch(n){return n instanceof Error&&ske(`sprintf error: - -`+n.toString()),e}}var HR,Gne,ug,Kne;HR={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1};Gne=["(","?"];ug={")":["("],":":["?","?:"]};Kne=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;function ike(e){for(var t=[],n=[],o,r,s,i;o=e.match(Kne);){for(r=o[0],s=e.substr(0,o.index).trim(),s&&t.push(s);i=n.pop();){if(ug[r]){if(ug[r][0]===i){r=ug[r][1]||r;break}}else if(Gne.indexOf(i)>=0||HR[i]":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function cke(e,t){var n=[],o,r,s,i,c,l;for(o=0;o{const o=new bN({}),r=new Set,s=()=>{r.forEach(M=>M())},i=M=>(r.add(M),()=>r.delete(M)),c=(M="default")=>o.data[M],l=(M,y="default")=>{o.data[y]={...o.data[y],...M},o.data[y][""]={...g$[""],...o.data[y]?.[""]},delete o.pluralForms[y]},u=(M,y)=>{l(M,y),s()},d=(M,y="default")=>{o.data[y]={...o.data[y],...M,"":{...g$[""],...o.data[y]?.[""],...M?.[""]}},delete o.pluralForms[y],s()},p=(M,y)=>{o.data={},o.pluralForms={},u(M,y)},f=(M="default",y,_,w,k)=>(o.data[M]||l(void 0,M),o.dcnpgettext(M,y,_,w,k)),b=(M="default")=>M,h=(M,y)=>{let _=f(y,void 0,M);return n?(_=n.applyFilters("i18n.gettext",_,M,y),n.applyFilters("i18n.gettext_"+b(y),_,M,y)):_},g=(M,y,_)=>{let w=f(_,y,M);return n?(w=n.applyFilters("i18n.gettext_with_context",w,M,y,_),n.applyFilters("i18n.gettext_with_context_"+b(_),w,M,y,_)):w},z=(M,y,_,w)=>{let k=f(w,void 0,M,y,_);return n?(k=n.applyFilters("i18n.ngettext",k,M,y,_,w),n.applyFilters("i18n.ngettext_"+b(w),k,M,y,_,w)):k},A=(M,y,_,w,k)=>{let S=f(k,w,M,y,_);return n?(S=n.applyFilters("i18n.ngettext_with_context",S,M,y,_,w,k),n.applyFilters("i18n.ngettext_with_context_"+b(k),S,M,y,_,w,k)):S},x=()=>g("ltr","text direction")==="rtl",v=(M,y,_)=>{const w=y?y+""+M:M;let k=!!o.data?.[_??"default"]?.[w];return n&&(k=n.applyFilters("i18n.has_translation",k,M,y,_),k=n.applyFilters("i18n.has_translation_"+b(_),k,M,y,_)),k};if(n){const M=y=>{pke.test(y)&&s()};n.addAction("hookAdded","core/i18n",M),n.addAction("hookRemoved","core/i18n",M)}return{getLocaleData:c,setLocaleData:u,addLocaleData:d,resetLocaleData:p,subscribe:i,__:h,_x:g,_n:z,_nx:A,isRTL:x,hasTranslation:v}};function Yne(e){return typeof e!="string"||e===""?(console.error("The namespace must be a non-empty string."),!1):/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)?!0:(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)}function hN(e){return typeof e!="string"||e===""?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)?!0:(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)}function M$(e,t){return function(o,r,s,i=10){const c=e[t];if(!hN(o)||!Yne(r))return;if(typeof s!="function"){console.error("The hook callback must be a function.");return}if(typeof i!="number"){console.error("If specified, the hook priority must be a number.");return}const l={callback:s,priority:i,namespace:r};if(c[o]){const u=c[o].handlers;let d;for(d=u.length;d>0&&!(i>=u[d-1].priority);d--);d===u.length?u[d]=l:u.splice(d,0,l),c.__current.forEach(p=>{p.name===o&&p.currentIndex>=d&&p.currentIndex++})}else c[o]={handlers:[l],runs:0};o!=="hookAdded"&&e.doAction("hookAdded",o,r,s,i)}}function cy(e,t,n=!1){return function(r,s){const i=e[t];if(!hN(r)||!n&&!Yne(s))return;if(!i[r])return 0;let c=0;if(n)c=i[r].handlers.length,i[r]={runs:i[r].runs,handlers:[]};else{const l=i[r].handlers;for(let u=l.length-1;u>=0;u--)l[u].namespace===s&&(l.splice(u,1),c++,i.__current.forEach(d=>{d.name===r&&d.currentIndex>=u&&d.currentIndex--}))}return r!=="hookRemoved"&&e.doAction("hookRemoved",r,s),c}}function z$(e,t){return function(o,r){const s=e[t];return typeof r<"u"?o in s&&s[o].handlers.some(i=>i.namespace===r):o in s}}function ly(e,t,n,o){return function(s,...i){const c=e[t];c[s]||(c[s]={handlers:[],runs:0}),c[s].runs++;const l=c[s].handlers;if(!l||!l.length)return n?i[0]:void 0;const u={name:s,currentIndex:0};async function d(){try{c.__current.add(u);let f=n?i[0]:void 0;for(;u.currentIndex"u"?r.__current.size>0:Array.from(r.__current).some(s=>s.name===o)}}function A$(e,t){return function(o){const r=e[t];if(hN(o))return r[o]&&r[o].runs?r[o].runs:0}}class bke{constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=M$(this,"actions"),this.addFilter=M$(this,"filters"),this.removeAction=cy(this,"actions"),this.removeFilter=cy(this,"filters"),this.hasAction=z$(this,"actions"),this.hasFilter=z$(this,"filters"),this.removeAllActions=cy(this,"actions",!0),this.removeAllFilters=cy(this,"filters",!0),this.doAction=ly(this,"actions",!1,!1),this.doActionAsync=ly(this,"actions",!1,!0),this.applyFilters=ly(this,"filters",!0,!1),this.applyFiltersAsync=ly(this,"filters",!0,!0),this.currentAction=O$(this,"actions"),this.currentFilter=O$(this,"filters"),this.doingAction=y$(this,"actions"),this.doingFilter=y$(this,"filters"),this.didAction=A$(this,"actions"),this.didFilter=A$(this,"filters")}}function Zne(){return new bke}const Qne=Zne(),{addAction:UR,addFilter:cn,removeAction:v$,removeFilter:XR,hasAction:tbn,hasFilter:Jne,removeAllActions:nbn,removeAllFilters:obn,doAction:e0e,doActionAsync:hke,applyFilters:B0,applyFiltersAsync:mke,currentAction:rbn,currentFilter:sbn,doingAction:ibn,doingFilter:abn,didAction:cbn,didFilter:lbn,actions:ubn,filters:dbn}=Qne,Ao=fke(void 0,void 0,Qne);Ao.getLocaleData.bind(Ao);Ao.setLocaleData.bind(Ao);Ao.resetLocaleData.bind(Ao);Ao.subscribe.bind(Ao);const m=Ao.__.bind(Ao),ye=Ao._x.bind(Ao),fn=Ao._n.bind(Ao);Ao._nx.bind(Ao);const dt=Ao.isRTL.bind(Ao);Ao.hasTranslation.bind(Ao);function gke(e){const t=(n,o)=>{const{headers:r={}}=n;for(const s in r)if(s.toLowerCase()==="x-wp-nonce"&&r[s]===t.nonce)return o(n);return o({...n,headers:{...r,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t}const t0e=(e,t)=>{let n=e.path,o,r;return typeof e.namespace=="string"&&typeof e.endpoint=="string"&&(o=e.namespace.replace(/^\/|\/$/g,""),r=e.endpoint.replace(/^\//,""),r?n=o+"/"+r:n=o),delete e.namespace,delete e.endpoint,t({...e,path:n})},Mke=e=>(t,n)=>t0e(t,o=>{let r=o.url,s=o.path,i;return typeof s=="string"&&(i=e,e.indexOf("?")!==-1&&(s=s.replace("?","&")),s=s.replace(/^\//,""),typeof i=="string"&&i.indexOf("?")!==-1&&(s=s.replace("?","&")),r=i+s),n({...o,url:r})});function lf(e){try{return new URL(e),!0}catch{return!1}}const zke=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;function n0e(e){return zke.test(e)}const Oke=/^(tel:)?(\+)?\d{6,15}$/;function yke(e){return e=e.replace(/[-.() ]/g,""),Oke.test(e)}function _x(e){const t=/^([^\s:]+:)/.exec(e);if(t)return t[1]}function mN(e){return e?/^[a-z\-.\+]+[0-9]*:$/i.test(e):!1}function gN(e){const t=/^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function Ake(e){return e?/^[^\s#?]+$/.test(e):!1}function hd(e){const t=/^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(e);if(t)return t[1]}function vke(e){return e?/^[^\s#?]+$/.test(e):!1}function MN(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch{}if(t)return t}function wx(e){let t="";const n=Object.entries(e);let o;for(;o=n.shift();){let[r,s]=o;if(Array.isArray(s)||s&&s.constructor===Object){const c=Object.entries(s).reverse();for(const[l,u]of c)n.unshift([`${r}[${l}]`,u])}else s!==void 0&&(s===null&&(s=""),t+="&"+[r,s].map(encodeURIComponent).join("="))}return t.substr(1)}function xke(e){return e?/^[^\s#?\/]+$/.test(e):!1}function _ke(e){const t=hd(e),n=MN(e);let o="/";return t&&(o+=t),n&&(o+=`?${n}`),o}function wke(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}function GR(e){return e?/^#[^\s#?\/]*$/.test(e):!1}function wM(e){try{return decodeURIComponent(e)}catch{return e}}function kke(e,t,n){const o=t.length,r=o-1;for(let s=0;s{const[o,r=""]=n.split("=").filter(Boolean).map(wM);if(o){const s=o.replace(/\]/g,"").split("[");kke(t,s,r)}return t},Object.create(null))}function St(e="",t){if(!t||!Object.keys(t).length)return e;let n=e;const o=e.indexOf("?");return o!==-1&&(t=Object.assign(kx(e),t),n=n.substr(0,o)),n+"?"+wx(t)}function KR(e,t){return kx(e)[t]}function x$(e,t){return KR(e,t)!==void 0}function hv(e,...t){const n=e.indexOf("?");if(n===-1)return e;const o=kx(e),r=e.substr(0,n);t.forEach(i=>delete o[i]);const s=wx(o);return s?r+"?"+s:r}const Ske=/^(?:[a-z]+:|#|\?|\.|\/)/i;function uf(e){return e&&(e=e.trim(),!Ske.test(e)&&!n0e(e)?"http://"+e:e)}function Jz(e){try{return decodeURI(e)}catch{return e}}function e3(e,t=null){if(!e)return"";let n=e.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"");n.match(/^[^\/]+\/$/)&&(n=n.replace("/",""));const o=/\/([^\/?]+)\.(?:[\w]+)(?=\?|$)/;if(!t||n.length<=t||!n.match(o))return n;n=n.split("?")[0];const r=n.split("/"),s=r[r.length-1];if(s.length<=t)return"…"+n.slice(-t);const i=s.lastIndexOf("."),[c,l]=[s.slice(0,i),s.slice(i+1)],u=c.slice(-3)+"."+l;return s.slice(0,t-u.length-1)+"…"+u}var Sx={exports:{}},o0e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},r0e=Object.keys(o0e).join("|"),Cke=new RegExp(r0e,"g"),qke=new RegExp(r0e,"");function Rke(e){return o0e[e]}var s0e=function(e){return e.replace(Cke,Rke)},Tke=function(e){return!!e.match(qke)};Sx.exports=s0e;Sx.exports.has=Tke;Sx.exports.remove=s0e;var Eke=Sx.exports;const Ys=Or(Eke);function zN(e){return e?Ys(e).replace(/[\s\./]+/g,"-").replace(/[^\p{L}\p{N}_-]+/gu,"").toLowerCase().replace(/-+/g,"-").replace(/(^-+)|(-+$)/g,""):""}function df(e){let t;if(e){try{t=new URL(e,"http://example.com").pathname.split("/").pop()}catch{}if(t)return t}}function _$(e){const t=e.split("?"),n=t[1],o=t[0];return n?o+"?"+n.split("&").map(r=>r.split("=")).map(r=>r.map(decodeURIComponent)).sort((r,s)=>r[0].localeCompare(s[0])).map(r=>r.map(encodeURIComponent)).map(r=>r.join("=")).join("&"):o}function Wke(e){const t=Object.fromEntries(Object.entries(e).map(([n,o])=>[_$(n),o]));return(n,o)=>{const{parse:r=!0}=n;let s=n.path;if(!s&&n.url){const{rest_route:l,...u}=kx(n.url);typeof l=="string"&&(s=St(l,u))}if(typeof s!="string")return o(n);const i=n.method||"GET",c=_$(s);if(i==="GET"&&t[c]){const l=t[c];return delete t[c],w$(l,!!r)}else if(i==="OPTIONS"&&t[i]&&t[i][c]){const l=t[i][c];return delete t[i][c],w$(l,!!r)}return o(n)}}function w$(e,t){return Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}const Nke=({path:e,url:t,...n},o)=>({...n,url:t&&St(t,o),path:e&&St(e,o)}),k$=e=>e.json?e.json():Promise.reject(e),Bke=e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}},S$=e=>{const{next:t}=Bke(e.headers.get("link"));return t},Lke=e=>{const t=!!e.path&&e.path.indexOf("per_page=-1")!==-1,n=!!e.url&&e.url.indexOf("per_page=-1")!==-1;return t||n},i0e=async(e,t)=>{if(e.parse===!1||!Lke(e))return t(e);const n=await et({...Nke(e,{per_page:100}),parse:!1}),o=await k$(n);if(!Array.isArray(o))return o;let r=S$(n);if(!r)return o;let s=[].concat(o);for(;r;){const i=await et({...e,path:void 0,url:r,parse:!1}),c=await k$(i);s=s.concat(c),r=S$(i)}return s},jke=new Set(["PATCH","PUT","DELETE"]),Pke="GET",Ike=(e,t)=>{const{method:n=Pke}=e;return jke.has(n.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":n,"Content-Type":"application/json"},method:"POST"}),t(e)},Dke=(e,t)=>(typeof e.url=="string"&&!x$(e.url,"_locale")&&(e.url=St(e.url,{_locale:"user"})),typeof e.path=="string"&&!x$(e.path,"_locale")&&(e.path=St(e.path,{_locale:"user"})),t(e)),Fke=(e,t=!0)=>t?e.status===204?null:e.json?e.json():Promise.reject(e):e,$ke=e=>{const t={code:"invalid_json",message:m("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch(()=>{throw t})},a0e=(e,t=!0)=>Promise.resolve(Fke(e,t)).catch(n=>ON(n,t));function ON(e,t=!0){if(!t)throw e;return $ke(e).then(n=>{const o={code:"unknown_error",message:m("An unknown error occurred.")};throw n||o})}function Vke(e){const t=!!e.method&&e.method==="POST";return(!!e.path&&e.path.indexOf("/wp/v2/media")!==-1||!!e.url&&e.url.indexOf("/wp/v2/media")!==-1)&&t}const Hke=(e,t)=>{if(!Vke(e))return t(e);let n=0;const o=5,r=s=>(n++,t({path:`/wp/v2/media/${s}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch(()=>n{if(!s.headers)return Promise.reject(s);const i=s.headers.get("x-wp-upload-attachment-id");return s.status>=500&&s.status<600&&i?r(i).catch(()=>e.parse!==!1?Promise.reject({code:"post_process",message:m("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(s)):ON(s,e.parse)}).then(s=>a0e(s,e.parse))},Uke=e=>(t,n)=>{if(typeof t.url=="string"){const o=KR(t.url,"wp_theme_preview");o===void 0?t.url=St(t.url,{wp_theme_preview:e}):o===""&&(t.url=hv(t.url,"wp_theme_preview"))}if(typeof t.path=="string"){const o=KR(t.path,"wp_theme_preview");o===void 0?t.path=St(t.path,{wp_theme_preview:e}):o===""&&(t.path=hv(t.path,"wp_theme_preview"))}return n(t)},Xke={Accept:"application/json, */*;q=0.1"},Gke={credentials:"include"},c0e=[Dke,t0e,Ike,i0e];function Kke(e){c0e.unshift(e)}const l0e=e=>{if(e.status>=200&&e.status<300)return e;throw e},Yke=e=>{const{url:t,path:n,data:o,parse:r=!0,...s}=e;let{body:i,headers:c}=e;return c={...Xke,...c},o&&(i=JSON.stringify(o),c["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,{...Gke,...s,body:i,headers:c}).then(u=>Promise.resolve(u).then(l0e).catch(d=>ON(d,r)).then(d=>a0e(d,r)),u=>{throw u&&u.name==="AbortError"?u:{code:"fetch_error",message:m("You are probably offline.")}})};let u0e=Yke;function Zke(e){u0e=e}function et(e){return c0e.reduceRight((n,o)=>r=>o(r,n),u0e)(e).catch(n=>n.code!=="rest_cookie_invalid_nonce"?Promise.reject(n):window.fetch(et.nonceEndpoint).then(l0e).then(o=>o.text()).then(o=>(et.nonceMiddleware.nonce=o,et(e))))}et.use=Kke;et.setFetchHandler=Zke;et.createNonceMiddleware=gke;et.createPreloadingMiddleware=Wke;et.createRootURLMiddleware=Mke;et.fetchAllMiddleware=i0e;et.mediaUploadMiddleware=Hke;et.createThemePreviewMiddleware=Uke;const C$=Object.create(null);function qe(e,t={}){const{since:n,version:o,alternative:r,plugin:s,link:i,hint:c}=t,l=s?` from ${s}`:"",u=n?` since version ${n}`:"",d=o?` and will be removed${l} in version ${o}`:"",p=r?` Please use ${r} instead.`:"",f=i?` See: ${i}`:"",b=c?` Note: ${c}`:"",h=`${e} is deprecated${u}${d}.${p}${f}${b}`;h in C$||(e0e("deprecated",e,t,h),console.warn(h),C$[h]=!0)}function kM(e){"@babel/helpers - typeof";return kM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kM(e)}function Qke(e,t){if(kM(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(kM(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jke(e){var t=Qke(e,"string");return kM(t)=="symbol"?t:t+""}function e6e(e,t,n){return(t=Jke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function R$(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Y1(1));return n(d0e)(e,t)}if(typeof e!="function")throw new Error(Y1(2));var r=e,s=t,i=[],c=i,l=!1;function u(){c===i&&(c=i.slice())}function d(){if(l)throw new Error(Y1(3));return s}function p(g){if(typeof g!="function")throw new Error(Y1(4));if(l)throw new Error(Y1(5));var z=!0;return u(),c.push(g),function(){if(z){if(l)throw new Error(Y1(6));z=!1,u();var x=c.indexOf(g);c.splice(x,1),i=null}}}function f(g){if(!t6e(g))throw new Error(Y1(7));if(typeof g.type>"u")throw new Error(Y1(8));if(l)throw new Error(Y1(9));try{l=!0,s=r(s,g)}finally{l=!1}for(var z=i=c,A=0;A1&&arguments[1]!==void 0?arguments[1]:this;this._map.forEach(function(s,i){i!==null&&sp(i)==="object"&&(s=s[1]),n.call(r,s,i,o)})}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}]),e}(),c6e=a6e;const ia=Or(c6e);function l6e(e){return!!e&&typeof e[Symbol.iterator]=="function"&&typeof e.next=="function"}var p0e={},l0={},Cx={};Object.defineProperty(Cx,"__esModule",{value:!0});var u6e={all:Symbol("all"),error:Symbol("error"),fork:Symbol("fork"),join:Symbol("join"),race:Symbol("race"),call:Symbol("call"),cps:Symbol("cps"),subscribe:Symbol("subscribe")};Cx.default=u6e;Object.defineProperty(l0,"__esModule",{value:!0});l0.createChannel=l0.subscribe=l0.cps=l0.apply=l0.call=l0.invoke=l0.delay=l0.race=l0.join=l0.fork=l0.error=l0.all=void 0;var d6e=Cx,Xa=p6e(d6e);function p6e(e){return e&&e.__esModule?e:{default:e}}l0.all=function(t){return{type:Xa.default.all,value:t}};l0.error=function(t){return{type:Xa.default.error,error:t}};l0.fork=function(t){for(var n=arguments.length,o=Array(n>1?n-1:0),r=1;r1?n-1:0),r=1;r2?o-2:0),s=2;s1?n-1:0),r=1;r"u"?"undefined":f6e(t))==="object"&&!!t},all:function(t){return z1.obj(t)&&t.type===Rl.default.all},error:function(t){return z1.obj(t)&&t.type===Rl.default.error},array:Array.isArray,func:function(t){return typeof t=="function"},promise:function(t){return t&&z1.func(t.then)},iterator:function(t){return t&&z1.func(t.next)&&z1.func(t.throw)},fork:function(t){return z1.obj(t)&&t.type===Rl.default.fork},join:function(t){return z1.obj(t)&&t.type===Rl.default.join},race:function(t){return z1.obj(t)&&t.type===Rl.default.race},call:function(t){return z1.obj(t)&&t.type===Rl.default.call},cps:function(t){return z1.obj(t)&&t.type===Rl.default.cps},subscribe:function(t){return z1.obj(t)&&t.type===Rl.default.subscribe},channel:function(t){return z1.obj(t)&&z1.func(t.subscribe)}};mh.default=z1;Object.defineProperty(ts,"__esModule",{value:!0});ts.iterator=ts.array=ts.object=ts.error=ts.any=void 0;var m6e=mh,yb=g6e(m6e);function g6e(e){return e&&e.__esModule?e:{default:e}}var M6e=ts.any=function(t,n,o,r){return r(t),!0},z6e=ts.error=function(t,n,o,r,s){return yb.default.error(t)?(s(t.error),!0):!1},O6e=ts.object=function(t,n,o,r,s){if(!yb.default.all(t)||!yb.default.obj(t.value))return!1;var i={},c=Object.keys(t.value),l=0,u=!1,d=function(b,h){u||(i[b]=h,l++,l===c.length&&r(i))},p=function(b,h){u||(u=!0,s(h))};return c.map(function(f){o(t.value[f],function(b){return d(f,b)},function(b){return p(f,b)})}),!0},y6e=ts.array=function(t,n,o,r,s){if(!yb.default.all(t)||!yb.default.array(t.value))return!1;var i=[],c=0,l=!1,u=function(f,b){l||(i[f]=b,c++,c===t.value.length&&r(i))},d=function(f,b){l||(l=!0,s(b))};return t.value.map(function(p,f){o(p,function(b){return u(f,b)},function(b){return d(f,b)})}),!0},A6e=ts.iterator=function(t,n,o,r,s){return yb.default.iterator(t)?(o(t,n,s),!0):!1};ts.default=[z6e,A6e,y6e,O6e,M6e];Object.defineProperty(yN,"__esModule",{value:!0});var v6e=ts,x6e=f0e(v6e),_6e=mh,w6e=f0e(_6e);function f0e(e){return e&&e.__esModule?e:{default:e}}function N$(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t(c,l,u,d,p)=>{if(!$6e(c,s))return!1;const f=i(c);return m0e(f)?f.then(d,p):d(f),!0}),o=(s,i)=>ZR(s)?(t(s),i(),!0):!1;n.push(o);const r=p0e.create(n);return s=>new Promise((i,c)=>r(s,l=>{ZR(l)&&t(l),i(l)},c))}function H6e(e={}){return t=>{const n=V6e(e,t.dispatch);return o=>r=>l6e(r)?n(r):o(r)}}function C0(e,t){return n=>{const o=e(n);return o.displayName=U6e(t,n),o}}const U6e=(e,t)=>{const n=t.displayName||t.name||"Component";return`${bv(e??"")}(${n})`},F1=(e,t,n)=>{let o,r,s=0,i,c,l,u=0,d=!1,p=!1,f=!0;n&&(d=!!n.leading,p="maxWait"in n,n.maxWait!==void 0&&(s=Math.max(n.maxWait,t)),f="trailing"in n?!!n.trailing:f);function b(q){const E=o,T=r;return o=void 0,r=void 0,u=q,i=e.apply(T,E),i}function h(q,E){c=setTimeout(q,E)}function g(){c!==void 0&&clearTimeout(c)}function z(q){return u=q,h(M,t),d?b(q):i}function A(q){return q-(l||0)}function x(q){const E=A(q),T=q-u,W=t-E;return p?Math.min(W,s-T):W}function v(q){const E=A(q),T=q-u;return l===void 0||E>=t||E<0||p&&T>=s}function M(){const q=Date.now();if(v(q))return _(q);h(M,x(q))}function y(){c=void 0}function _(q){return y(),f&&o?b(q):(o=r=void 0,i)}function w(){g(),u=0,y(),o=l=r=void 0}function k(){return S()?_(Date.now()):i}function S(){return c!==void 0}function C(...q){const E=Date.now(),T=v(E);if(o=q,r=this,l=E,T){if(!S())return z(l);if(p)return h(M,t),b(l)}return S()||h(M,t),i}return C.cancel=w,C.flush=k,C.pending=S,C},vN=(e,t,n)=>{let o=!0,r=!0;return n&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),F1(e,t,{leading:o,trailing:r,maxWait:t})};function Ab(){const e=new Map,t=new Map;function n(o){const r=t.get(o);if(r)for(const s of r)s()}return{get(o){return e.get(o)},set(o,r){e.set(o,r),n(o)},delete(o){e.delete(o),n(o)},subscribe(o,r){let s=t.get(o);return s||(s=new Set,t.set(o,s)),s.add(r),()=>{s.delete(r),s.size===0&&t.delete(o)}}}}const g0e=(e=!1)=>(...t)=>(...n)=>{const o=t.flat();return e&&o.reverse(),o.reduce((r,s)=>[s(...r)],n)[0]},ip=g0e(),Wn=g0e(!0);function xN(e){return C0(t=>n=>e(n)?a.jsx(t,{...n}):null,"ifCondition")}function M0e(e,t){if(e===t)return!0;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;let r=0;for(;r{if(n)return n;const o=K6e(e);return t?`${t}-${o}`:o},[e,n,t])}const Y6e=C0(e=>t=>{const n=Ge(e);return a.jsx(e,{...t,instanceId:n})},"instanceId"),Z6e=C0(e=>class extends O.Component{constructor(n){super(n),this.timeouts=[],this.setTimeout=this.setTimeout.bind(this),this.clearTimeout=this.clearTimeout.bind(this)}componentWillUnmount(){this.timeouts.forEach(clearTimeout)}setTimeout(n,o){const r=setTimeout(()=>{n(),this.clearTimeout(r)},o);return this.timeouts.push(r),r}clearTimeout(n){clearTimeout(n),this.timeouts=this.timeouts.filter(o=>o!==n)}render(){return a.jsx(e,{...this.props,setTimeout:this.setTimeout,clearTimeout:this.clearTimeout})}},"withSafeTimeout");function Q6e(e){return[e?'[tabindex]:not([tabindex^="-"])':"[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])",'iframe:not([tabindex^="-"])',"object","embed","area[href]","[contenteditable]:not([contenteditable=false])"].join(",")}function z0e(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function J6e(e){const t=e.closest("map[name]");if(!t)return!1;const n=e.ownerDocument.querySelector('img[usemap="#'+t.name+'"]');return!!n&&z0e(n)}function qx(e,{sequential:t=!1}={}){const n=e.querySelectorAll(Q6e(t));return Array.from(n).filter(o=>{if(!z0e(o))return!1;const{nodeName:r}=o;return r==="AREA"?J6e(o):!0})}const eSe=Object.freeze(Object.defineProperty({__proto__:null,find:qx},Symbol.toStringTag,{value:"Module"}));function QR(e){const t=e.getAttribute("tabindex");return t===null?0:parseInt(t,10)}function O0e(e){return QR(e)!==-1}function tSe(){const e={};return function(n,o){const{nodeName:r,type:s,checked:i,name:c}=o;if(r!=="INPUT"||s!=="radio"||!c)return n.concat(o);const l=e.hasOwnProperty(c);if(!(i||!l))return n;if(l){const d=e[c];n=n.filter(p=>p!==d)}return e[c]=o,n.concat(o)}}function nSe(e,t){return{element:e,index:t}}function oSe(e){return e.element}function rSe(e,t){const n=QR(e.element),o=QR(t.element);return n===o?e.index-t.index:n-o}function _N(e){return e.filter(O0e).map(nSe).sort(rSe).map(oSe).reduce(tSe(),[])}function sSe(e){return _N(qx(e))}function iSe(e){return _N(qx(e.ownerDocument.body)).reverse().find(t=>e.compareDocumentPosition(t)&e.DOCUMENT_POSITION_PRECEDING)}function aSe(e){return _N(qx(e.ownerDocument.body)).find(t=>e.compareDocumentPosition(t)&e.DOCUMENT_POSITION_FOLLOWING)}const cSe=Object.freeze(Object.defineProperty({__proto__:null,find:sSe,findNext:aSe,findPrevious:iSe,isTabbableIndex:O0e},Symbol.toStringTag,{value:"Module"}));function ZA(e){if(!e.collapsed){const s=Array.from(e.getClientRects());if(s.length===1)return s[0];const i=s.filter(({width:p})=>p>1);if(i.length===0)return e.getBoundingClientRect();if(i.length===1)return i[0];let{top:c,bottom:l,left:u,right:d}=i[0];for(const{top:p,bottom:f,left:b,right:h}of i)pl&&(l=f),bd&&(d=h);return new window.DOMRect(u,c,d-u,l-c)}const{startContainer:t}=e,{ownerDocument:n}=t;if(t.nodeName==="BR"){const{parentNode:s}=t,i=Array.from(s.childNodes).indexOf(t);e=n.createRange(),e.setStart(s,i),e.setEnd(s,i)}const o=e.getClientRects();if(o.length>1)return null;let r=o[0];if(!r||r.height===0){const s=n.createTextNode("​");e=e.cloneRange(),e.insertNode(s),r=e.getClientRects()[0],s.parentNode,s.parentNode.removeChild(s)}return r}function JR(e){const t=e.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;return n?ZA(n):null}function y0e(e){e.defaultView;const t=e.defaultView.getSelection(),n=t.rangeCount?t.getRangeAt(0):null;return!!n&&!n.collapsed}function wN(e){return e?.nodeName==="INPUT"}function Tu(e){const t=["button","checkbox","hidden","file","radio","image","range","reset","submit","number","email","time"];return wN(e)&&e.type&&!t.includes(e.type)||e.nodeName==="TEXTAREA"||e.contentEditable==="true"}function lSe(e){if(!wN(e)&&!Tu(e))return!1;try{const{selectionStart:t,selectionEnd:n}=e;return t===null||t!==n}catch{return!0}}function uSe(e){return y0e(e)||!!e.activeElement&&lSe(e.activeElement)}function dSe(e){return!!e.activeElement&&(wN(e.activeElement)||Tu(e.activeElement)||y0e(e))}function mv(e){return e.ownerDocument.defaultView,e.ownerDocument.defaultView.getComputedStyle(e)}function T1(e,t="vertical"){if(e){if((t==="vertical"||t==="all")&&e.scrollHeight>e.clientHeight){const{overflowY:n}=mv(e);if(/(auto|scroll)/.test(n))return e}if((t==="horizontal"||t==="all")&&e.scrollWidth>e.clientWidth){const{overflowX:n}=mv(e);if(/(auto|scroll)/.test(n))return e}return e.ownerDocument===e.parentNode?e:T1(e.parentNode,t)}}function Rx(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"}function pSe(e){if(Rx(e))return e.selectionStart===0&&e.value.length===e.selectionEnd;if(!e.isContentEditable)return!0;const{ownerDocument:t}=e,{defaultView:n}=t,o=n.getSelection(),r=o.rangeCount?o.getRangeAt(0):null;if(!r)return!0;const{startContainer:s,endContainer:i,startOffset:c,endOffset:l}=r;if(s===e&&i===e&&c===0&&l===e.childNodes.length)return!0;e.lastChild;const u=i.nodeType===i.TEXT_NODE?i.data.length:i.childNodes.length;return L$(s,e,"firstChild")&&L$(i,e,"lastChild")&&c===0&&l===u}function L$(e,t,n){let o=t;do{if(e===o)return!0;o=o[n]}while(o);return!1}function A0e(e){if(!e)return!1;const{tagName:t}=e;return Rx(e)||t==="BUTTON"||t==="SELECT"}function kN(e){return mv(e).direction==="rtl"}function fSe(e){const t=Array.from(e.getClientRects());if(!t.length)return;const n=Math.min(...t.map(({top:r})=>r));return Math.max(...t.map(({bottom:r})=>r))-n}function v0e(e){const{anchorNode:t,focusNode:n,anchorOffset:o,focusOffset:r}=e,s=t.compareDocumentPosition(n);return s&t.DOCUMENT_POSITION_PRECEDING?!1:s&t.DOCUMENT_POSITION_FOLLOWING?!0:s===0?o<=r:!0}function bSe(e,t,n){if(e.caretRangeFromPoint)return e.caretRangeFromPoint(t,n);if(!e.caretPositionFromPoint)return null;const o=e.caretPositionFromPoint(t,n);if(!o)return null;const r=e.createRange();return r.setStart(o.offsetNode,o.offset),r.collapse(!0),r}function x0e(e,t,n,o){const r=o.style.zIndex,s=o.style.position,{position:i="static"}=mv(o);i==="static"&&(o.style.position="relative"),o.style.zIndex="10000";const c=bSe(e,t,n);return o.style.zIndex=r,o.style.position=s,c}function _0e(e,t,n){let o=n();return(!o||!o.startContainer||!e.contains(o.startContainer))&&(e.scrollIntoView(t),o=n(),!o||!o.startContainer||!e.contains(o.startContainer))?null:o}function w0e(e,t,n=!1){if(Rx(e)&&typeof e.selectionStart=="number")return e.selectionStart!==e.selectionEnd?!1:t?e.selectionStart===0:e.value.length===e.selectionStart;if(!e.isContentEditable)return!0;const{ownerDocument:o}=e,{defaultView:r}=o,s=r.getSelection();if(!s||!s.rangeCount)return!1;const i=s.getRangeAt(0),c=i.cloneRange(),l=v0e(s),u=s.isCollapsed;u||c.collapse(!l);const d=ZA(c),p=ZA(i);if(!d||!p)return!1;const f=fSe(i);if(!u&&f&&f>d.height&&l===t)return!1;const b=kN(e)?!t:t,h=e.getBoundingClientRect(),g=b?h.left+1:h.right-1,z=t?h.top+1:h.bottom-1,A=_0e(e,t,()=>x0e(o,g,z,e));if(!A)return!1;const x=ZA(A);if(!x)return!1;const v=t?"top":"bottom",M=b?"left":"right",y=x[v]-p[v],_=x[M]-d[M],w=Math.abs(y)<=1,k=Math.abs(_)<=1;return n?w:w&&k}function N6(e,t){return w0e(e,t)}function j$(e,t){return w0e(e,t,!0)}function hSe(e,t,n){const{ownerDocument:o}=e,r=kN(e)?!t:t,s=e.getBoundingClientRect();n===void 0?n=t?s.right-1:s.left+1:n<=s.left?n=s.left+1:n>=s.right&&(n=s.right-1);const i=r?s.bottom-1:s.top+1;return x0e(o,n,i,e)}function k0e(e,t,n){if(!e)return;if(e.focus(),Rx(e)){if(typeof e.selectionStart!="number")return;t?(e.selectionStart=e.value.length,e.selectionEnd=e.value.length):(e.selectionStart=0,e.selectionEnd=0);return}if(!e.isContentEditable)return;const o=_0e(e,t,()=>hSe(e,t,n));if(!o)return;const{ownerDocument:r}=e,{defaultView:s}=r,i=s.getSelection();i.removeAllRanges(),i.addRange(o)}function S0e(e,t){return k0e(e,t,void 0)}function mSe(e,t,n){return k0e(e,t,n?.left)}function C0e(e,t){t.parentNode,t.parentNode.insertBefore(e,t.nextSibling)}function Np(e){e.parentNode,e.parentNode.removeChild(e)}function gSe(e,t){e.parentNode,C0e(t,e.parentNode),Np(e)}function jg(e){const t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}function P$(e,t){const n=e.ownerDocument.createElement(t);for(;e.firstChild;)n.appendChild(e.firstChild);return e.parentNode,e.parentNode.replaceChild(n,e),n}function qm(e,t){t.parentNode,t.parentNode.insertBefore(e,t),e.appendChild(t)}function Tx(e){const{body:t}=document.implementation.createHTMLDocument("");t.innerHTML=e;const n=t.getElementsByTagName("*");let o=n.length;for(;o--;){const r=n[o];if(r.tagName==="SCRIPT")Np(r);else{let s=r.attributes.length;for(;s--;){const{name:i}=r.attributes[s];i.startsWith("on")&&r.removeAttribute(i)}}}return t.innerHTML}function L1(e){e=Tx(e);const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body.textContent||""}function gv(e){switch(e.nodeType){case e.TEXT_NODE:return/^[ \f\n\r\t\v\u00a0]*$/.test(e.nodeValue||"");case e.ELEMENT_NODE:return e.hasAttributes()?!1:e.hasChildNodes()?Array.from(e.childNodes).every(gv):!0;default:return!0}}const Pg={strong:{},em:{},s:{},del:{},ins:{},a:{attributes:["href","target","rel","id"]},code:{},abbr:{attributes:["title"]},sub:{},sup:{},br:{},small:{},q:{attributes:["cite"]},dfn:{attributes:["title"]},data:{attributes:["value"]},time:{attributes:["datetime"]},var:{},samp:{},kbd:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{attributes:["dir"]},bdo:{attributes:["dir"]},wbr:{},"#text":{}},MSe=["#text","br"];Object.keys(Pg).filter(e=>!MSe.includes(e)).forEach(e=>{const{[e]:t,...n}=Pg;Pg[e].children=n});const zSe={audio:{attributes:["src","preload","autoplay","mediagroup","loop","muted"]},canvas:{attributes:["width","height"]},embed:{attributes:["src","type","width","height"]},img:{attributes:["alt","src","srcset","usemap","ismap","width","height"]},object:{attributes:["data","type","name","usemap","form","width","height"]},video:{attributes:["src","poster","preload","playsinline","autoplay","mediagroup","loop","muted","controls","width","height"]}},uy={...Pg,...zSe};function Ex(e){if(e!=="paste")return uy;const{u:t,abbr:n,data:o,time:r,wbr:s,bdi:i,bdo:c,...l}={...uy,ins:{children:uy.ins.children},del:{children:uy.del.children}};return l}function K2(e){const t=e.nodeName.toLowerCase();return Ex().hasOwnProperty(t)||t==="span"}function q0e(e){const t=e.nodeName.toLowerCase();return Pg.hasOwnProperty(t)||t==="span"}function OSe(e){return!!e&&e.nodeType===e.ELEMENT_NODE}const ySe=()=>{};function dg(e,t,n,o){Array.from(e).forEach(r=>{const s=r.nodeName.toLowerCase();if(n.hasOwnProperty(s)&&(!n[s].isMatch||n[s].isMatch?.(r))){if(OSe(r)){const{attributes:i=[],classes:c=[],children:l,require:u=[],allowEmpty:d}=n[s];if(l&&!d&&gv(r)){Np(r);return}if(r.hasAttributes()&&(Array.from(r.attributes).forEach(({name:p})=>{p!=="class"&&!i.includes(p)&&r.removeAttribute(p)}),r.classList&&r.classList.length)){const p=c.map(f=>typeof f=="string"?b=>b===f:f instanceof RegExp?b=>f.test(b):ySe);Array.from(r.classList).forEach(f=>{p.some(b=>b(f))||r.classList.remove(f)}),r.classList.length||r.removeAttribute("class")}if(r.hasChildNodes()){if(l==="*")return;if(l)u.length&&!r.querySelector(u.join(","))?(dg(r.childNodes,t,n,o),jg(r)):r.parentNode&&r.parentNode.nodeName==="BODY"&&K2(r)?(dg(r.childNodes,t,n,o),Array.from(r.childNodes).some(p=>!K2(p))&&jg(r)):dg(r.childNodes,t,l,o);else for(;r.firstChild;)Np(r.firstChild)}}}else dg(r.childNodes,t,n,o),o&&!K2(r)&&r.nextElementSibling&&C0e(t.createElement("br"),r),jg(r)})}function e8(e,t,n){const o=document.implementation.createHTMLDocument("");return o.body.innerHTML=e,dg(o.body.childNodes,o,t,n),o.body.innerHTML}function Mv(e){const t=Array.from(e.files);return Array.from(e.items).forEach(n=>{const o=n.getAsFile();o&&!t.find(({name:r,type:s,size:i})=>r===o.name&&s===o.type&&i===o.size)&&t.push(o)}),t}const co={focusable:eSe,tabbable:cSe};function Ft(e,t){const n=O.useRef();return O.useCallback(o=>{o?n.current=e(o):n.current&&n.current()},t)}function SN(){return Ft(e=>{function t(n){const{key:o,shiftKey:r,target:s}=n;if(o!=="Tab")return;const i=r?"findPrevious":"findNext",c=co.tabbable[i](s)||null;if(s.contains(c)){n.preventDefault(),c?.focus();return}if(e.contains(c))return;const l=r?"append":"prepend",{ownerDocument:u}=e,d=u.createElement("div");d.tabIndex=-1,e[l](d),d.addEventListener("blur",()=>e.removeChild(d)),d.focus()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},[])}var R0e={exports:{}};/*! - * clipboard.js v2.0.11 - * https://clipboardjs.com/ - * - * Licensed MIT © Zeno Rocha - */(function(e,t){(function(o,r){e.exports=r()})(I0,function(){return function(){var n={686:function(s,i,c){c.d(i,{default:function(){return G}});var l=c(279),u=c.n(l),d=c(370),p=c.n(d),f=c(817),b=c.n(f);function h(K){try{return document.execCommand(K)}catch{return!1}}var g=function(J){var oe=b()(J);return h("cut"),oe},z=g;function A(K){var J=document.documentElement.getAttribute("dir")==="rtl",oe=document.createElement("textarea");oe.style.fontSize="12pt",oe.style.border="0",oe.style.padding="0",oe.style.margin="0",oe.style.position="absolute",oe.style[J?"right":"left"]="-9999px";var ae=window.pageYOffset||document.documentElement.scrollTop;return oe.style.top="".concat(ae,"px"),oe.setAttribute("readonly",""),oe.value=K,oe}var x=function(J,oe){var ae=A(J);oe.container.appendChild(ae);var Z=b()(ae);return h("copy"),ae.remove(),Z},v=function(J){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},ae="";return typeof J=="string"?ae=x(J,oe):J instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(J?.type)?ae=x(J.value,oe):(ae=b()(J),h("copy")),ae},M=v;function y(K){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?y=function(oe){return typeof oe}:y=function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},y(K)}var _=function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=J.action,ae=oe===void 0?"copy":oe,Z=J.container,ne=J.target,te=J.text;if(ae!=="copy"&&ae!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(ne!==void 0)if(ne&&y(ne)==="object"&&ne.nodeType===1){if(ae==="copy"&&ne.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(ae==="cut"&&(ne.hasAttribute("readonly")||ne.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(te)return M(te,{container:Z});if(ne)return ae==="cut"?z(ne):M(ne,{container:Z})},w=_;function k(K){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(oe){return typeof oe}:k=function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},k(K)}function S(K,J){if(!(K instanceof J))throw new TypeError("Cannot call a class as a function")}function C(K,J){for(var oe=0;oe"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function P(K){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(oe){return oe.__proto__||Object.getPrototypeOf(oe)},P(K)}function D(K,J){var oe="data-clipboard-".concat(K);if(J.hasAttribute(oe))return J.getAttribute(oe)}var H=function(K){E(oe,K);var J=W(oe);function oe(ae,Z){var ne;return S(this,oe),ne=J.call(this),ne.resolveOptions(Z),ne.listenClick(ae),ne}return q(oe,[{key:"resolveOptions",value:function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Z.action=="function"?Z.action:this.defaultAction,this.target=typeof Z.target=="function"?Z.target:this.defaultTarget,this.text=typeof Z.text=="function"?Z.text:this.defaultText,this.container=k(Z.container)==="object"?Z.container:document.body}},{key:"listenClick",value:function(Z){var ne=this;this.listener=p()(Z,"click",function(te){return ne.onClick(te)})}},{key:"onClick",value:function(Z){var ne=Z.delegateTarget||Z.currentTarget,te=this.action(ne)||"copy",pe=w({action:te,container:this.container,target:this.target(ne),text:this.text(ne)});this.emit(pe?"success":"error",{action:te,text:pe,trigger:ne,clearSelection:function(){ne&&ne.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Z){return D("action",Z)}},{key:"defaultTarget",value:function(Z){var ne=D("target",Z);if(ne)return document.querySelector(ne)}},{key:"defaultText",value:function(Z){return D("text",Z)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return M(Z,ne)}},{key:"cut",value:function(Z){return z(Z)}},{key:"isSupported",value:function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],ne=typeof Z=="string"?[Z]:Z,te=!!document.queryCommandSupported;return ne.forEach(function(pe){te=te&&!!document.queryCommandSupported(pe)}),te}}]),oe}(u()),G=H},828:function(s){var i=9;if(typeof Element<"u"&&!Element.prototype.matches){var c=Element.prototype;c.matches=c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector}function l(u,d){for(;u&&u.nodeType!==i;){if(typeof u.matches=="function"&&u.matches(d))return u;u=u.parentNode}}s.exports=l},438:function(s,i,c){var l=c(828);function u(f,b,h,g,z){var A=p.apply(this,arguments);return f.addEventListener(h,A,z),{destroy:function(){f.removeEventListener(h,A,z)}}}function d(f,b,h,g,z){return typeof f.addEventListener=="function"?u.apply(null,arguments):typeof h=="function"?u.bind(null,document).apply(null,arguments):(typeof f=="string"&&(f=document.querySelectorAll(f)),Array.prototype.map.call(f,function(A){return u(A,b,h,g,z)}))}function p(f,b,h,g){return function(z){z.delegateTarget=l(z.target,b),z.delegateTarget&&g.call(f,z)}}s.exports=d},879:function(s,i){i.node=function(c){return c!==void 0&&c instanceof HTMLElement&&c.nodeType===1},i.nodeList=function(c){var l=Object.prototype.toString.call(c);return c!==void 0&&(l==="[object NodeList]"||l==="[object HTMLCollection]")&&"length"in c&&(c.length===0||i.node(c[0]))},i.string=function(c){return typeof c=="string"||c instanceof String},i.fn=function(c){var l=Object.prototype.toString.call(c);return l==="[object Function]"}},370:function(s,i,c){var l=c(879),u=c(438);function d(h,g,z){if(!h&&!g&&!z)throw new Error("Missing required arguments");if(!l.string(g))throw new TypeError("Second argument must be a String");if(!l.fn(z))throw new TypeError("Third argument must be a Function");if(l.node(h))return p(h,g,z);if(l.nodeList(h))return f(h,g,z);if(l.string(h))return b(h,g,z);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(h,g,z){return h.addEventListener(g,z),{destroy:function(){h.removeEventListener(g,z)}}}function f(h,g,z){return Array.prototype.forEach.call(h,function(A){A.addEventListener(g,z)}),{destroy:function(){Array.prototype.forEach.call(h,function(A){A.removeEventListener(g,z)})}}}function b(h,g,z){return u(document.body,h,g,z)}s.exports=d},817:function(s){function i(c){var l;if(c.nodeName==="SELECT")c.focus(),l=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var u=c.hasAttribute("readonly");u||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),u||c.removeAttribute("readonly"),l=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var d=window.getSelection(),p=document.createRange();p.selectNodeContents(c),d.removeAllRanges(),d.addRange(p),l=d.toString()}return l}s.exports=i},279:function(s){function i(){}i.prototype={on:function(c,l,u){var d=this.e||(this.e={});return(d[c]||(d[c]=[])).push({fn:l,ctx:u}),this},once:function(c,l,u){var d=this;function p(){d.off(c,p),l.apply(u,arguments)}return p._=l,this.on(c,p,u)},emit:function(c){var l=[].slice.call(arguments,1),u=((this.e||(this.e={}))[c]||[]).slice(),d=0,p=u.length;for(d;d{const s=new vSe(r,{text(){return typeof n.current=="function"?n.current():n.current||""}});return s.on("success",({clearSelection:i})=>{i(),o.current&&o.current()}),()=>{s.destroy()}},[])}function Wa(e=null){if(!e){if(typeof window>"u")return!1;e=window}const{platform:t}=e.navigator;return t.indexOf("Mac")!==-1||["iPad","iPhone"].includes(t)}const Na=8,vb=9,Oo=13,Eu=27,CN=32,xSe=33,_Se=34,SM=35,Y2=36,Is=37,_a=38,Ds=39,o1=40,Wc=46,wSe=121,ui="alt",ua="ctrl",ap="meta",di="shift";function T0e(e){return e.length<2?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function t3(e,t){return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,t(o)]))}const Wx={primary:e=>e()?[ap]:[ua],primaryShift:e=>e()?[di,ap]:[ua,di],primaryAlt:e=>e()?[ui,ap]:[ua,ui],secondary:e=>e()?[di,ui,ap]:[ua,di,ui],access:e=>e()?[ua,ui]:[di,ui],ctrl:()=>[ua],alt:()=>[ui],ctrlShift:()=>[ua,di],shift:()=>[di],shiftAlt:()=>[di,ui],undefined:()=>[]},kSe=t3(Wx,e=>(t,n=Wa)=>[...e(n),t.toLowerCase()].join("+")),E0e=t3(Wx,e=>(t,n=Wa)=>{const o=n(),r={[ui]:o?"⌥":"Alt",[ua]:o?"⌃":"Ctrl",[ap]:"⌘",[di]:o?"⇧":"Shift"};return[...e(n).reduce((i,c)=>{var l;const u=(l=r[c])!==null&&l!==void 0?l:c;return o?[...i,u]:[...i,u,"+"]},[]),T0e(t)]}),r1=t3(E0e,e=>(t,n=Wa)=>e(t,n).join("")),W0e=t3(Wx,e=>(t,n=Wa)=>{const o=n(),r={[di]:"Shift",[ap]:o?"Command":"Control",[ua]:"Control",[ui]:o?"Option":"Alt",",":m("Comma"),".":m("Period"),"`":m("Backtick"),"~":m("Tilde")};return[...e(n),t].map(s=>{var i;return T0e((i=r[s])!==null&&i!==void 0?i:s)}).join(o?" ":" + ")});function SSe(e){return[ui,ua,ap,di].filter(t=>e[`${t}Key`])}const wa=t3(Wx,e=>(t,n,o=Wa)=>{const r=e(o),s=SSe(t),i={Comma:",",Backslash:"\\",IntlRo:"\\",IntlYen:"\\"},c=r.filter(d=>!s.includes(d)),l=s.filter(d=>!r.includes(d));if(c.length>0||l.length>0)return!1;let u=t.key.toLowerCase();return n?(t.altKey&&n.length===1&&(u=String.fromCharCode(t.keyCode).toLowerCase()),t.shiftKey&&n.length===1&&i[t.code]&&(u=i[t.code]),n==="del"&&(n="delete"),u===n.toLowerCase()):r.includes(u)});function Nx(e="firstElement"){const t=O.useRef(e),n=r=>{r.focus({preventScroll:!0})},o=O.useRef();return O.useEffect(()=>{t.current=e},[e]),Ft(r=>{var s;if(!(!r||t.current===!1)&&!r.contains((s=r.ownerDocument?.activeElement)!==null&&s!==void 0?s:null)){if(t.current!=="firstElement"){n(r);return}return o.current=setTimeout(()=>{const i=co.tabbable.find(r)[0];i&&n(i)},0),()=>{o.current&&clearTimeout(o.current)}}},[])}let dy=null;function qN(e){const t=O.useRef(null),n=O.useRef(null),o=O.useRef(e);return O.useEffect(()=>{o.current=e},[e]),O.useCallback(r=>{if(r){if(t.current=r,n.current)return;n.current=r.ownerDocument.activeElement}else if(n.current){const i=t.current?.contains(t.current?.ownerDocument.activeElement);if(t.current?.isConnected&&!i){var s;(s=dy)!==null&&s!==void 0||(dy=n.current);return}o.current?o.current():(n.current.isConnected?n.current:dy)?.focus(),dy=null}},[])}const CSe=["button","submit"];function qSe(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return CSe.includes(e.type)}return!1}function N0e(e){const t=O.useRef(e);O.useEffect(()=>{t.current=e},[e]);const n=O.useRef(!1),o=O.useRef(),r=O.useCallback(()=>{clearTimeout(o.current)},[]);O.useEffect(()=>()=>r(),[]),O.useEffect(()=>{e||r()},[e,r]);const s=O.useCallback(c=>{const{type:l,target:u}=c;["mouseup","touchend"].includes(l)?n.current=!1:qSe(u)&&(n.current=!0)},[]),i=O.useCallback(c=>{if(c.persist(),n.current)return;const l=c.target.getAttribute("data-unstable-ignore-focus-outside-for-relatedtarget");l&&c.relatedTarget?.closest(l)||(o.current=setTimeout(()=>{if(!document.hasFocus()){c.preventDefault();return}typeof t.current=="function"&&t.current(c)},0))},[]);return{onFocus:r,onMouseDown:s,onMouseUp:s,onTouchStart:s,onTouchEnd:s,onBlur:i}}function py(e,t){typeof e=="function"?e(t):e&&e.hasOwnProperty("current")&&(e.current=t)}function Xt(e){const t=O.useRef(),n=O.useRef(!1),o=O.useRef(!1),r=O.useRef([]),s=O.useRef(e);return s.current=e,O.useLayoutEffect(()=>{o.current===!1&&n.current===!0&&e.forEach((i,c)=>{const l=r.current[c];i!==l&&(py(l,null),py(i,t.current))}),r.current=e},e),O.useLayoutEffect(()=>{o.current=!1}),O.useCallback(i=>{py(t,i),o.current=!0,n.current=i!==null;const c=i?s.current:r.current;for(const l of c)py(l,i)},[])}function B0e(e){const t=O.useRef(),{constrainTabbing:n=e.focusOnMount!==!1}=e;O.useEffect(()=>{t.current=e},Object.values(e));const o=SN(),r=Nx(e.focusOnMount),s=qN(),i=N0e(l=>{t.current?.__unstableOnClose?t.current.__unstableOnClose("focus-outside",l):t.current?.onClose&&t.current.onClose()}),c=O.useCallback(l=>{l&&l.addEventListener("keydown",u=>{u.keyCode===Eu&&!u.defaultPrevented&&t.current?.onClose&&(u.preventDefault(),t.current.onClose())})},[]);return[Xt([n?o:null,e.focusOnMount!==!1?s:null,e.focusOnMount!==!1?r:null,c]),{...i,tabIndex:-1}]}function RN({isDisabled:e=!1}={}){return Ft(t=>{if(e)return;const n=t?.ownerDocument?.defaultView;if(!n)return;const o=[],r=()=>{t.childNodes.forEach(c=>{c instanceof n.HTMLElement&&(c.getAttribute("inert")||(c.setAttribute("inert","true"),o.push(()=>{c.removeAttribute("inert")})))})},s=F1(r,0,{leading:!0});r();const i=new window.MutationObserver(s);return i.observe(t,{childList:!0}),()=>{i&&i.disconnect(),s.cancel(),o.forEach(c=>c())}},[e])}function xb(e){const t=O.useRef(()=>{throw new Error("Callbacks created with `useEvent` cannot be called during rendering.")});return O.useInsertionEffect(()=>{t.current=e}),O.useCallback((...n)=>t.current?.(...n),[])}const TN=typeof window<"u"?O.useLayoutEffect:O.useEffect;function L0e({onDragStart:e,onDragMove:t,onDragEnd:n}){const[o,r]=O.useState(!1),s=O.useRef({onDragStart:e,onDragMove:t,onDragEnd:n});TN(()=>{s.current.onDragStart=e,s.current.onDragMove=t,s.current.onDragEnd=n},[e,t,n]);const i=O.useCallback(u=>s.current.onDragMove&&s.current.onDragMove(u),[]),c=O.useCallback(u=>{s.current.onDragEnd&&s.current.onDragEnd(u),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c),r(!1)},[]),l=O.useCallback(u=>{s.current.onDragStart&&s.current.onDragStart(u),document.addEventListener("mousemove",i),document.addEventListener("mouseup",c),r(!0)},[]);return O.useEffect(()=>()=>{o&&(document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c))},[o]),{startDrag:l,endDrag:c,isDragging:o}}const D$=new Map;function RSe(e){if(!e)return null;let t=D$.get(e);return t||(typeof window<"u"&&typeof window.matchMedia=="function"?(t=window.matchMedia(e),D$.set(e,t),t):null)}function EN(e){const t=O.useMemo(()=>{const n=RSe(e);return{subscribe(o){return n?(n.addEventListener?.("change",o),()=>{n.removeEventListener?.("change",o)}):()=>{}},getValue(){var o;return(o=n?.matches)!==null&&o!==void 0?o:!1}}},[e]);return O.useSyncExternalStore(t.subscribe,t.getValue,()=>!1)}function oo(e){const t=O.useRef();return O.useEffect(()=>{t.current=e},[e]),t.current}const $1=()=>EN("(prefers-reduced-motion: reduce)");function TSe(e,t){const n={...e};return Object.entries(t).forEach(([o,r])=>{n[o]?n[o]={...n[o],to:r.to}:n[o]=r}),n}const F$=(e,t)=>{const n=e?.findIndex(({id:r})=>typeof r=="string"?r===t.id:is(r,t.id)),o=[...e];return n!==-1?o[n]={id:t.id,changes:TSe(o[n].changes,t.changes)}:o.push(t),o};function ESe(){let e=[],t=[],n=0;const o=()=>{e=e.slice(0,n||void 0),n=0},r=()=>{var i;const c=e.length===0?0:e.length-1;let l=(i=e[c])!==null&&i!==void 0?i:[];t.forEach(u=>{l=F$(l,u)}),t=[],e[c]=l},s=i=>!i.filter(({changes:l})=>Object.values(l).some(({from:u,to:d})=>typeof u!="function"&&typeof d!="function"&&!is(u,d))).length;return{addRecord(i,c=!1){const l=!i||s(i);if(c){if(l)return;i.forEach(u=>{t=F$(t,u)})}else{if(o(),t.length&&r(),l)return;e.push(i)}},undo(){t.length&&(o(),r());const i=e[e.length-1+n];if(i)return n-=1,i},redo(){const i=e[e.length+n];if(i)return n+=1,i},hasUndo(){return!!e[e.length-1+n]},hasRedo(){return!!e[e.length+n]}}}const $$={xhuge:1920,huge:1440,wide:1280,xlarge:1080,large:960,medium:782,small:600,mobile:480},WSe={">=":"min-width","<":"max-width"},NSe={">=":(e,t)=>t>=e,"<":(e,t)=>t=")=>{const n=O.useContext(j0e),o=!n&&`(${WSe[t]}: ${$$[e]}px)`,r=EN(o||void 0);return n?NSe[t]($$[e],n):r};vn.__experimentalWidthProvider=j0e.Provider;function P0e(e,t={}){const n=xb(e),o=O.useRef(),r=O.useRef();return xb(s=>{var i;if(s===o.current)return;(i=r.current)!==null&&i!==void 0||(r.current=new ResizeObserver(n));const{current:c}=r;o.current&&c.unobserve(o.current),o.current=s,s&&c.observe(s,t)})}const BSe=e=>{let t;if(!e.contentBoxSize)t=[e.contentRect.width,e.contentRect.height];else if(e.contentBoxSize[0]){const r=e.contentBoxSize[0];t=[r.inlineSize,r.blockSize]}else{const r=e.contentBoxSize;t=[r.inlineSize,r.blockSize]}const[n,o]=t.map(r=>Math.round(r));return{width:n,height:o}},LSe={position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",opacity:0,overflow:"hidden",zIndex:-1};function jSe({onResize:e}){const t=P0e(n=>{const o=BSe(n.at(-1));e(o)});return a.jsx("div",{ref:t,style:LSe,"aria-hidden":"true"})}function PSe(e,t){return e.width===t.width&&e.height===t.height}const V$={width:null,height:null};function ISe(){const[e,t]=O.useState(V$),n=O.useRef(V$),o=O.useCallback(s=>{PSe(n.current,s)||(n.current=s,t(s))},[]);return[a.jsx(jSe,{onResize:o}),e]}function ps(e,t={}){return e?P0e(e,t):ISe()}var DSe={exports:{}};(function(e){(function(t){e.exports?e.exports=t():window.idleCallbackShim=t()})(function(){var t,n,o,r,s=typeof window<"u"?window:typeof I0!=null?I0:this||{},i=s.cancelRequestAnimationFrame&&s.requestAnimationFrame||setTimeout,c=s.cancelRequestAnimationFrame||clearTimeout,l=[],u=0,d=!1,p=7,f=35,b=125,h=0,g=0,z=0,A={get didTimeout(){return!1},timeRemaining:function(){var E=p-(Date.now()-g);return E<0?0:E}},x=v(function(){p=22,b=66,f=0});function v(E){var T,W,B=99,N=function(){var j=Date.now()-W;j9?o=setTimeout(w,n):(n=0,w()))}function S(){var E,T,W,B=p>9?9:1;if(g=Date.now(),d=!1,o=null,u>2||g-n-50B;T++)E=l.shift(),z++,E&&E(A);l.length?k():u=0}function C(E){return h++,l.push(E),k(),h}function q(E){var T=E-1-z;l[T]&&(l[T]=null)}if(!s.requestIdleCallback||!s.cancelIdleCallback)s.requestIdleCallback=C,s.cancelIdleCallback=q,s.document&&document.addEventListener&&(s.addEventListener("scroll",y,!0),s.addEventListener("resize",y),document.addEventListener("focus",y,!0),document.addEventListener("mouseover",y,!0),["click","keypress","touchstart","mousedown"].forEach(function(E){document.addEventListener(E,y,{capture:!0,passive:!0})}),s.MutationObserver&&new MutationObserver(y).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}));else try{s.requestIdleCallback(function(){},{timeout:0})}catch{(function(T){var W,B;if(s.requestIdleCallback=function(N,j){return j&&typeof j.timeout=="number"?T(N,j.timeout):T(N)},s.IdleCallbackDeadline&&(W=IdleCallbackDeadline.prototype)){if(B=Object.getOwnPropertyDescriptor(W,"timeRemaining"),!B||!B.configurable||!B.get)return;Object.defineProperty(W,"timeRemaining",{value:function(){return B.get.call(this)},enumerable:!0,configurable:!0})}})(s.requestIdleCallback)}return{request:C,cancel:q}})})(DSe);function FSe(){return typeof window>"u"?e=>{setTimeout(()=>e(Date.now()),0)}:window.requestIdleCallback}const H$=FSe(),I0e=()=>{const e=new Map;let t=!1;const n=c=>{for(const[l,u]of e)if(e.delete(l),u(),typeof c=="number"||c.timeRemaining()<=0)break;if(e.size===0){t=!1;return}H$(n)};return{add:(c,l)=>{e.set(c,l),t||(t=!0,H$(n))},flush:c=>{const l=e.get(c);return l===void 0?!1:(e.delete(c),l(),!0)},cancel:c=>e.delete(c),reset:()=>{e.clear(),t=!1}}};function $Se(e,t){const n=[];for(let o=0;o{let s=$Se(e,o);s.length{n1.flushSync(()=>{r(l=>[...l,...e.slice(c,c+n)])})});return()=>i.reset()},[e]),o}function VSe(e,t){if(e.length!==t.length)return!1;for(var n=0;nF1(e,t??0,n),[e,t,n]);return O.useEffect(()=>()=>o.cancel(),[o]),o}function F0e(e=""){const[t,n]=O.useState(e),[o,r]=O.useState(e),s=Kr(r,250);return O.useEffect(()=>{s(t)},[t,s]),[t,n,o]}function t8(e,t,n){const o=D0e(()=>vN(e,t??0,n),[e,t,n]);return O.useEffect(()=>()=>o.cancel(),[o]),o}function $f(e){const t=O.useRef();return t.current=e,t}function Bx({dropZoneElement:e,isDisabled:t,onDrop:n,onDragStart:o,onDragEnter:r,onDragLeave:s,onDragEnd:i,onDragOver:c}){const l=$f(n),u=$f(o),d=$f(r),p=$f(s),f=$f(i),b=$f(c);return Ft(h=>{if(t)return;const g=e??h;let z=!1;const{ownerDocument:A}=g;function x(S){const{defaultView:C}=A;if(!S||!C||!(S instanceof C.HTMLElement)||!g.contains(S))return!1;let q=S;do if(q.dataset.isDropZone)return q===g;while(q=q.parentElement);return!1}function v(S){z||(z=!0,A.addEventListener("dragend",k),A.addEventListener("mousemove",k),u.current&&u.current(S))}function M(S){S.preventDefault(),!g.contains(S.relatedTarget)&&d.current&&d.current(S)}function y(S){!S.defaultPrevented&&b.current&&b.current(S),S.preventDefault()}function _(S){x(S.relatedTarget)||p.current&&p.current(S)}function w(S){S.defaultPrevented||(S.preventDefault(),S.dataTransfer&&S.dataTransfer.files.length,l.current&&l.current(S),k(S))}function k(S){z&&(z=!1,A.removeEventListener("dragend",k),A.removeEventListener("mousemove",k),f.current&&f.current(S))}return g.dataset.isDropZone="true",g.addEventListener("drop",w),g.addEventListener("dragenter",M),g.addEventListener("dragover",y),g.addEventListener("dragleave",_),A.addEventListener("dragenter",v),()=>{delete g.dataset.isDropZone,g.removeEventListener("drop",w),g.removeEventListener("dragenter",M),g.removeEventListener("dragover",y),g.removeEventListener("dragleave",_),A.removeEventListener("dragend",k),A.removeEventListener("mousemove",k),A.removeEventListener("dragenter",v)}},[t,e])}function $0e(){return Ft(e=>{const{ownerDocument:t}=e;if(!t)return;const{defaultView:n}=t;if(!n)return;function o(){t&&t.activeElement===e&&e.focus()}return n.addEventListener("blur",o),()=>{n.removeEventListener("blur",o)}},[])}const HSe=30;function USe(e,t,n,o){var r,s;const i=(r=o?.initWindowSize)!==null&&r!==void 0?r:HSe,c=(s=o?.useWindowing)!==null&&s!==void 0?s:!0,[l,u]=O.useState({visibleItems:i,start:0,end:i,itemInView:d=>d>=0&&d<=i});return O.useLayoutEffect(()=>{if(!c)return;const d=T1(e.current),p=b=>{var h;if(!d)return;const g=Math.ceil(d.clientHeight/t),z=b?g:(h=o?.windowOverscan)!==null&&h!==void 0?h:g,A=Math.floor(d.scrollTop/t),x=Math.max(0,A-z),v=Math.min(n-1,A+g+z);u(M=>{const y={visibleItems:g,start:x,end:v,itemInView:_=>x<=_&&_<=v};return M.start!==y.start||M.end!==y.end||M.visibleItems!==y.visibleItems?y:M})};p(!0);const f=F1(()=>{p()},16);return d?.addEventListener("scroll",f),d?.ownerDocument?.defaultView?.addEventListener("resize",f),d?.ownerDocument?.defaultView?.addEventListener("resize",f),()=>{d?.removeEventListener("scroll",f),d?.ownerDocument?.defaultView?.removeEventListener("resize",f)}},[t,e,n,o?.expandedState,o?.windowOverscan,c]),O.useLayoutEffect(()=>{if(!c)return;const d=T1(e.current),p=f=>{switch(f.keyCode){case Y2:return d?.scrollTo({top:0});case SM:return d?.scrollTo({top:n*t});case xSe:return d?.scrollTo({top:d.scrollTop-l.visibleItems*t});case _Se:return d?.scrollTo({top:d.scrollTop+l.visibleItems*t})}};return d?.ownerDocument?.defaultView?.addEventListener("keydown",p),()=>{d?.ownerDocument?.defaultView?.removeEventListener("keydown",p)}},[n,t,e,l.visibleItems,c,o?.expandedState]),[l,u]}function V0e(e,t){const[n,o]=O.useMemo(()=>[r=>e.subscribe(t,r),()=>e.get(t)],[e,t]);return O.useSyncExternalStore(n,o,o)}function H0e(e){const t=Object.keys(e);return function(o={},r){const s={};let i=!1;for(const c of t){const l=e[c],u=o[c],d=l(u,r);s[c]=d,i=i||d!==u}return i?s:o}}function Je(e){const t=new WeakMap,n=(...o)=>{let r=t.get(n.registry);return r||(r=e(n.registry.select),t.set(n.registry,r)),r(...o)};return n.isRegistrySelector=!0,n}function B6(e){return e.isRegistryControl=!0,e}const XSe="@@data/SELECT",GSe="@@data/RESOLVE_SELECT",KSe="@@data/DISPATCH",YSe={[XSe]:B6(e=>({storeKey:t,selectorName:n,args:o})=>e.select(t)[n](...o)),[GSe]:B6(e=>({storeKey:t,selectorName:n,args:o})=>{const r=e.select(t)[n].hasResolver?"resolveSelect":"select";return e[r](t)[n](...o)}),[KSe]:B6(e=>({storeKey:t,actionName:n,args:o})=>e.dispatch(t)[n](...o))},ZSe=["@wordpress/block-directory","@wordpress/block-editor","@wordpress/block-library","@wordpress/blocks","@wordpress/commands","@wordpress/components","@wordpress/core-commands","@wordpress/core-data","@wordpress/customize-widgets","@wordpress/data","@wordpress/edit-post","@wordpress/edit-site","@wordpress/edit-widgets","@wordpress/editor","@wordpress/format-library","@wordpress/interface","@wordpress/patterns","@wordpress/preferences","@wordpress/reusable-blocks","@wordpress/router","@wordpress/dataviews","@wordpress/fields"],U$=[],QSe=!globalThis.IS_WORDPRESS_CORE,Yr=(e,t)=>{if(!ZSe.includes(t))throw new Error(`You tried to opt-in to unstable APIs as module "${t}". This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);if(!QSe&&U$.includes(t))throw new Error(`You tried to opt-in to unstable APIs as module "${t}" which is already registered. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.`);return U$.push(t),{lock:JSe,unlock:eCe}};function JSe(e,t){if(!e)throw new Error("Cannot lock an undefined object.");Ig in e||(e[Ig]={}),U0e.set(e[Ig],t)}function eCe(e){if(!e)throw new Error("Cannot unlock an undefined object.");if(!(Ig in e))throw new Error("Cannot unlock an object that was not locked before. ");return U0e.get(e[Ig])}const U0e=new WeakMap,Ig=Symbol("Private API ID"),{lock:pg,unlock:Vf}=Yr("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/data"),tCe=()=>e=>t=>m0e(t)?t.then(n=>{if(n)return e(n)}):e(t),nCe=(e,t)=>()=>n=>o=>{const r=e.select(t).getCachedResolvers();return Object.entries(r).forEach(([i,c])=>{const l=e.stores[t]?.resolvers?.[i];!l||!l.shouldInvalidate||c.forEach((u,d)=>{u!==void 0&&(u.status!=="finished"&&u.status!=="error"||l.shouldInvalidate(o,...d)&&e.dispatch(t).invalidateResolution(i,d))})}),n(o)};function oCe(e){return()=>t=>n=>typeof n=="function"?n(e):t(n)}const rCe=e=>t=>(n={},o)=>{const r=o[e];if(r===void 0)return n;const s=t(n[r],o);return s===n[r]?n:{...n,[r]:s}};function jl(e){if(e==null)return[];const t=e.length;let n=t;for(;n>0&&e[n-1]===void 0;)n--;return n===t?e:e.slice(0,n)}const sCe=rCe("selectorName")((e=new ia,t)=>{switch(t.type){case"START_RESOLUTION":{const n=new ia(e);return n.set(jl(t.args),{status:"resolving"}),n}case"FINISH_RESOLUTION":{const n=new ia(e);return n.set(jl(t.args),{status:"finished"}),n}case"FAIL_RESOLUTION":{const n=new ia(e);return n.set(jl(t.args),{status:"error",error:t.error}),n}case"START_RESOLUTIONS":{const n=new ia(e);for(const o of t.args)n.set(jl(o),{status:"resolving"});return n}case"FINISH_RESOLUTIONS":{const n=new ia(e);for(const o of t.args)n.set(jl(o),{status:"finished"});return n}case"FAIL_RESOLUTIONS":{const n=new ia(e);return t.args.forEach((o,r)=>{const s={status:"error",error:void 0},i=t.errors[r];i&&(s.error=i),n.set(jl(o),s)}),n}case"INVALIDATE_RESOLUTION":{const n=new ia(e);return n.delete(jl(t.args)),n}}return e}),iCe=(e={},t)=>{switch(t.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":{if(t.selectorName in e){const{[t.selectorName]:n,...o}=e;return o}return e}case"START_RESOLUTION":case"FINISH_RESOLUTION":case"FAIL_RESOLUTION":case"START_RESOLUTIONS":case"FINISH_RESOLUTIONS":case"FAIL_RESOLUTIONS":case"INVALIDATE_RESOLUTION":return sCe(e,t)}return e};var L6={};function aCe(e){return[e]}function cCe(e){return!!e&&typeof e=="object"}function lCe(){var e={clear:function(){e.head=null}};return e}function X$(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;oArray.from(t._map.values()).some(n=>n[1]?.status==="resolving"))}const gCe=ct(e=>{const t={};return Object.values(e).forEach(n=>Array.from(n._map.values()).forEach(o=>{var r;const s=(r=o[1]?.status)!==null&&r!==void 0?r:"error";t[s]||(t[s]=0),t[s]++})),t},e=>[e]),MCe=Object.freeze(Object.defineProperty({__proto__:null,countSelectorsByStatus:gCe,getCachedResolvers:hCe,getIsResolving:uCe,getResolutionError:fCe,getResolutionState:ff,hasFinishedResolution:dCe,hasResolutionFailed:pCe,hasResolvingSelectors:mCe,hasStartedResolution:X0e,isResolving:bCe},Symbol.toStringTag,{value:"Module"}));function G0e(e,t){return{type:"START_RESOLUTION",selectorName:e,args:t}}function K0e(e,t){return{type:"FINISH_RESOLUTION",selectorName:e,args:t}}function Y0e(e,t,n){return{type:"FAIL_RESOLUTION",selectorName:e,args:t,error:n}}function zCe(e,t){return{type:"START_RESOLUTIONS",selectorName:e,args:t}}function OCe(e,t){return{type:"FINISH_RESOLUTIONS",selectorName:e,args:t}}function yCe(e,t,n){return{type:"FAIL_RESOLUTIONS",selectorName:e,args:t,errors:n}}function ACe(e,t){return{type:"INVALIDATE_RESOLUTION",selectorName:e,args:t}}function vCe(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function xCe(e){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:e}}const _Ce=Object.freeze(Object.defineProperty({__proto__:null,failResolution:Y0e,failResolutions:yCe,finishResolution:K0e,finishResolutions:OCe,invalidateResolution:ACe,invalidateResolutionForStore:vCe,invalidateResolutionForStoreSelector:xCe,startResolution:G0e,startResolutions:zCe},Symbol.toStringTag,{value:"Module"})),j6=e=>{const t=[...e];for(let n=t.length-1;n>=0;n--)t[n]===void 0&&t.splice(n,1);return t},tu=(e,t)=>Object.fromEntries(Object.entries(e??{}).map(([n,o])=>[n,t(o,n)])),wCe=(e,t)=>t instanceof Map?Object.fromEntries(t):t instanceof window.HTMLElement?null:t;function kCe(){const e={};return{isRunning(t,n){return e[t]&&e[t].get(j6(n))},clear(t,n){e[t]&&e[t].delete(j6(n))},markAsRunning(t,n){e[t]||(e[t]=new ia),e[t].set(j6(n),!0)}}}function G$(e){const t=new WeakMap;return{get(n,o){let r=t.get(n);return r||(r=e(n,o),t.set(n,r)),r}}}function s1(e,t){const n={},o={},r={privateActions:n,registerPrivateActions:i=>{Object.assign(n,i)},privateSelectors:o,registerPrivateSelectors:i=>{Object.assign(o,i)}},s={name:e,instantiate:i=>{const c=new Set,l=t.reducer,d=SCe(e,t,i,{registry:i,get dispatch(){return z},get select(){return w},get resolveSelect(){return E()}});pg(d,r);const p=kCe();function f(N){return(...j)=>Promise.resolve(d.dispatch(N(...j)))}const b={...tu(_Ce,f),...tu(t.actions,f)},h=G$(f),g=new Proxy(()=>{},{get:(N,j)=>{const P=n[j];return P?h.get(P,j):b[j]}}),z=new Proxy(g,{apply:(N,j,[P])=>d.dispatch(P)});pg(b,g);const A=t.resolvers?RCe(t.resolvers):{};function x(N,j){N.isRegistrySelector&&(N.registry=i);const P=(...H)=>{H=n8(N,H);const G=d.__unstableOriginalGetState();return N.isRegistrySelector&&(N.registry=i),N(G.root,...H)};P.__unstableNormalizeArgs=N.__unstableNormalizeArgs;const D=A[j];return D?TCe(P,j,D,d,p):(P.hasResolver=!1,P)}function v(N){const j=(...P)=>{const D=d.__unstableOriginalGetState(),H=P&&P[0],G=P&&P[1],K=t?.selectors?.[H];return H&&K&&(P[1]=n8(K,G)),N(D.metadata,...P)};return j.hasResolver=!1,j}const M={...tu(MCe,v),...tu(t.selectors,x)},y=G$(x);for(const[N,j]of Object.entries(o))y.get(j,N);const _=new Proxy(()=>{},{get:(N,j)=>{const P=o[j];return P?y.get(P,j):M[j]}}),w=new Proxy(_,{apply:(N,j,[P])=>P(d.__unstableOriginalGetState())});pg(M,_);const k=CCe(M,d),S=qCe(M,d),C=()=>M,q=()=>b,E=()=>k,T=()=>S;d.__unstableOriginalGetState=d.getState,d.getState=()=>d.__unstableOriginalGetState().root;const W=d&&(N=>(c.add(N),()=>c.delete(N)));let B=d.__unstableOriginalGetState();return d.subscribe(()=>{const N=d.__unstableOriginalGetState(),j=N!==B;if(B=N,j)for(const P of c)P()}),{reducer:l,store:d,actions:b,selectors:M,resolvers:A,getSelectors:C,getResolveSelectors:E,getSuspendSelectors:T,getActions:q,subscribe:W}}};return pg(s,r),s}function SCe(e,t,n,o){const r={...t.controls,...YSe},s=tu(r,p=>p.isRegistryControl?p(n):p),i=[nCe(n,e),tCe,H6e(s),oCe(o)],c=[o6e(...i)];typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&c.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:e,instanceId:e,serialize:{replacer:wCe}}));const{reducer:l,initialState:u}=t,d=H0e({metadata:iCe,root:l});return d0e(d,{root:u},Wn(c))}function CCe(e,t){const{getIsResolving:n,hasStartedResolution:o,hasFinishedResolution:r,hasResolutionFailed:s,isResolving:i,getCachedResolvers:c,getResolutionState:l,getResolutionError:u,hasResolvingSelectors:d,countSelectorsByStatus:p,...f}=e;return tu(f,(b,h)=>b.hasResolver?(...g)=>new Promise((z,A)=>{const x=()=>e.hasFinishedResolution(h,g),v=w=>{if(e.hasResolutionFailed(h,g)){const S=e.getResolutionError(h,g);A(S)}else z(w)},M=()=>b.apply(null,g),y=M();if(x())return v(y);const _=t.subscribe(()=>{x()&&(_(),v(M()))})}):async(...g)=>b.apply(null,g))}function qCe(e,t){return tu(e,(n,o)=>n.hasResolver?(...r)=>{const s=n.apply(null,r);if(e.hasFinishedResolution(o,r)){if(e.hasResolutionFailed(o,r))throw e.getResolutionError(o,r);return s}throw new Promise(i=>{const c=t.subscribe(()=>{e.hasFinishedResolution(o,r)&&(i(),c())})})}:n)}function RCe(e){return tu(e,t=>t.fulfill?t:{...t,fulfill:t})}function TCe(e,t,n,o,r){function s(c){const l=o.getState();if(r.isRunning(t,c)||typeof n.isFulfilled=="function"&&n.isFulfilled(l,...c))return;const{metadata:u}=o.__unstableOriginalGetState();X0e(u,t,c)||(r.markAsRunning(t,c),setTimeout(async()=>{r.clear(t,c),o.dispatch(G0e(t,c));try{const d=n.fulfill(...c);d&&await o.dispatch(d),o.dispatch(K0e(t,c))}catch(d){o.dispatch(Y0e(t,c,d))}},0))}const i=(...c)=>(c=n8(e,c),s(c),e(...c));return i.hasResolver=!0,i}function n8(e,t){return e.__unstableNormalizeArgs&&typeof e.__unstableNormalizeArgs=="function"&&t?.length?e.__unstableNormalizeArgs(t):t}const ECe={name:"core/data",instantiate(e){const t=o=>(r,...s)=>e.select(r)[o](...s),n=o=>(r,...s)=>e.dispatch(r)[o](...s);return{getSelectors(){return Object.fromEntries(["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"].map(o=>[o,t(o)]))},getActions(){return Object.fromEntries(["startResolution","finishResolution","invalidateResolution","invalidateResolutionForStore","invalidateResolutionForStoreSelector"].map(o=>[o,n(o)]))},subscribe(){return()=>()=>{}}}}};function K$(){let e=!1,t=!1;const n=new Set,o=()=>Array.from(n).forEach(r=>r());return{get isPaused(){return e},subscribe(r){return n.add(r),()=>n.delete(r)},pause(){e=!0},resume(){e=!1,t&&(t=!1,o())},emit(){if(e){t=!0;return}o()}}}function Rm(e){return typeof e=="string"?e:e.name}function WN(e={},t=null){const n={},o=K$();let r=null;function s(){o.emit()}const i=(y,_)=>{if(!_)return o.subscribe(y);const w=Rm(_),k=n[w];return k?k.subscribe(y):t?t.subscribe(y,_):o.subscribe(y)};function c(y){const _=Rm(y);r?.add(_);const w=n[_];return w?w.getSelectors():t?.select(_)}function l(y,_){r=new Set;try{return y.call(this)}finally{_.current=Array.from(r),r=null}}function u(y){const _=Rm(y);r?.add(_);const w=n[_];return w?w.getResolveSelectors():t&&t.resolveSelect(_)}function d(y){const _=Rm(y);r?.add(_);const w=n[_];return w?w.getSuspendSelectors():t&&t.suspendSelect(_)}function p(y){const _=Rm(y),w=n[_];return w?w.getActions():t&&t.dispatch(_)}function f(y){return Object.fromEntries(Object.entries(y).map(([_,w])=>typeof w!="function"?[_,w]:[_,function(){return x[_].apply(null,arguments)}]))}function b(y,_){if(n[y])return console.error('Store "'+y+'" is already registered.'),n[y];const w=_();if(typeof w.getSelectors!="function")throw new TypeError("store.getSelectors must be a function");if(typeof w.getActions!="function")throw new TypeError("store.getActions must be a function");if(typeof w.subscribe!="function")throw new TypeError("store.subscribe must be a function");w.emitter=K$();const k=w.subscribe;if(w.subscribe=S=>{const C=w.emitter.subscribe(S),q=k(()=>{if(w.emitter.isPaused){w.emitter.emit();return}S()});return()=>{q?.(),C?.()}},n[y]=w,w.subscribe(s),t)try{Vf(w.store).registerPrivateActions(Vf(t).privateActionsOf(y)),Vf(w.store).registerPrivateSelectors(Vf(t).privateSelectorsOf(y))}catch{}return w}function h(y){b(y.name,()=>y.instantiate(x))}function g(y,_){qe("wp.data.registerGenericStore",{since:"5.9",alternative:"wp.data.register( storeDescriptor )"}),b(y,()=>_)}function z(y,_){if(!_.reducer)throw new TypeError("Must specify store reducer");return b(y,()=>s1(y,_).instantiate(x)).store}function A(y){if(o.isPaused){y();return}o.pause(),Object.values(n).forEach(_=>_.emitter.pause());try{y()}finally{o.resume(),Object.values(n).forEach(_=>_.emitter.resume())}}let x={batch:A,stores:n,namespaces:n,subscribe:i,select:c,resolveSelect:u,suspendSelect:d,dispatch:p,use:v,register:h,registerGenericStore:g,registerStore:z,__unstableMarkListeningStores:l};function v(y,_){if(y)return x={...x,...y(x,_)},x}x.register(ECe);for(const[y,_]of Object.entries(e))x.register(s1(y,_));t&&t.subscribe(s);const M=f(x);return pg(M,{privateActionsOf:y=>{try{return Vf(n[y].store).privateActions}catch{return{}}},privateSelectorsOf:y=>{try{return Vf(n[y].store).privateSelectors}catch{return{}}}}),M}const Ga=WN();var WCe=function(t){return NCe(t)&&!BCe(t)};function NCe(e){return!!e&&typeof e=="object"}function BCe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||PCe(e)}var LCe=typeof Symbol=="function"&&Symbol.for,jCe=LCe?Symbol.for("react.element"):60103;function PCe(e){return e.$$typeof===jCe}function ICe(e){return Array.isArray(e)?[]:{}}function CM(e,t){return t.clone!==!1&&t.isMergeableObject(e)?_b(ICe(e),e,t):e}function DCe(e,t,n){return e.concat(t).map(function(o){return CM(o,n)})}function FCe(e,t){if(!t.customMerge)return _b;var n=t.customMerge(e);return typeof n=="function"?n:_b}function $Ce(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Y$(e){return Object.keys(e).concat($Ce(e))}function Z0e(e,t){try{return t in e}catch{return!1}}function VCe(e,t){return Z0e(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function HCe(e,t,n){var o={};return n.isMergeableObject(e)&&Y$(e).forEach(function(r){o[r]=CM(e[r],n)}),Y$(t).forEach(function(r){VCe(e,r)||(Z0e(e,r)&&n.isMergeableObject(t[r])?o[r]=FCe(r,n)(e[r],t[r],n):o[r]=CM(t[r],n))}),o}function _b(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||DCe,n.isMergeableObject=n.isMergeableObject||WCe,n.cloneUnlessOtherwiseSpecified=CM;var o=Array.isArray(t),r=Array.isArray(e),s=o===r;return s?o?n.arrayMerge(e,t,n):HCe(e,t,n):CM(t,n)}_b.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(o,r){return _b(o,r,n)},{})};var UCe=_b,XCe=UCe;const Q0e=Or(XCe),J0e=O.createContext(Ga),{Consumer:fbn,Provider:eoe}=J0e;function zn(){return O.useContext(J0e)}const toe=O.createContext(!1),{Consumer:bbn,Provider:Lx}=toe;function GCe(){return O.useContext(toe)}const P6=I0e();function KCe(e,t){const n=e.select,o={};let r,s,i=!1,c,l;const u=new Map;function d(f){var b;return(b=e.stores[f]?.store?.getState?.())!==null&&b!==void 0?b:{}}const p=f=>{const b=[...f],h=new Set;function g(A){if(i)for(const _ of b)u.get(_)!==d(_)&&(i=!1);u.clear();const x=()=>{i=!1,A()},v=()=>{c?P6.add(o,x):x()},M=[];function y(_){M.push(e.subscribe(v,_))}for(const _ of b)y(_);return h.add(y),()=>{h.delete(y);for(const _ of M.values())_?.();P6.cancel(o)}}function z(A){for(const x of A)if(!b.includes(x)){b.push(x);for(const v of h)v(x)}}return{subscribe:g,updateStores:z}};return(f,b)=>{function h(){if(i&&f===r)return s;const z={current:null},A=e.__unstableMarkListeningStores(()=>f(n,e),z);if(l)l.updateStores(z.current);else{for(const x of z.current)u.set(x,d(x));l=p(z.current)}is(s,A)||(s=A),r=f,i=!0}function g(){return h(),s}return c&&!b&&(i=!1,P6.cancel(o)),h(),c=b,{subscribe:l.subscribe,getValue:g}}}function YCe(e){return zn().select(e)}function ZCe(e,t,n){const o=zn(),r=GCe(),s=O.useMemo(()=>KCe(o),[o,e]),i=O.useCallback(t,n),{subscribe:c,getValue:l}=s(i,r),u=O.useSyncExternalStore(c,l,l);return O.useDebugValue(u),u}function I(e,t){const n=typeof e!="function",o=O.useRef(n);if(n!==o.current){const r=o.current?"static":"mapping",s=n?"static":"mapping";throw new Error(`Switching useSelect from ${r} to ${s} is not allowed`)}return n?YCe(e):ZCe(!1,e,t)}const p1=e=>C0(t=>G6e(n=>{const r=I((s,i)=>e(s,n,i));return a.jsx(t,{...n,...r})}),"withSelect"),se=e=>{const{dispatch:t}=zn();return e===void 0?t:t(e)},QCe=(e,t)=>{const n=zn(),o=O.useRef(e);return TN(()=>{o.current=e}),O.useMemo(()=>{const r=o.current(n.dispatch,n);return Object.fromEntries(Object.entries(r).map(([s,i])=>(typeof i!="function"&&console.warn(`Property ${s} returned from dispatchMap in useDispatchWithMap must be a function.`),[s,(...c)=>o.current(n.dispatch,n)[s](...c)])))},[n,...t])},Ka=e=>C0(t=>n=>{const r=QCe((s,i)=>e(s,n,i),[]);return a.jsx(t,{...n,...r})},"withDispatch");function D0(e){return Ga.dispatch(e)}function jn(e){return Ga.select(e)}const hr=H0e,JCe=Ga.resolveSelect;Ga.suspendSelect;const eqe=Ga.subscribe;Ga.registerGenericStore;const tqe=Ga.registerStore;Ga.use;const Js=Ga.register;var nqe=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var o,r,s;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],n.get(r[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(t[r]!==n[r])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),o=s.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=o;r--!==0;){var i=s[r];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n};const Yo=Or(nqe);function oqe(e,t){if(!e)return t;let n=!1;const o={};for(const r in t)Yo(e[r],t[r])?o[r]=e[r]:(n=!0,o[r]=t[r]);if(!n)return e;for(const r in e)o.hasOwnProperty(r)||(o[r]=e[r]);return o}function Wu(e){return typeof e=="string"?e.split(","):Array.isArray(e)?e:null}const noe=e=>t=>(n,o)=>n===void 0||e(o)?t(n,o):n,NN=e=>(...t)=>async({resolveSelect:n})=>{await n[e](...t)},Z$=e=>t=>(n={},o)=>{const r=o[e];if(r===void 0)return n;const s=t(n[r],o);return s===n[r]?n:{...n,[r]:s}},ooe=e=>t=>(n,o)=>t(n,e(o));function rqe(e){const t=new WeakMap;return n=>{let o;return t.has(n)?o=t.get(n):(o=e(n),n!==null&&typeof n=="object"&&t.set(n,o)),o}}function sqe(e,t){return(e.rawAttributes||[]).includes(t)}function jx(e,t,n){if(!e||typeof e!="object")return e;const o=Array.isArray(t)?t:t.split(".");return o.reduce((r,s,i)=>(r[s]===void 0&&(Number.isInteger(o[i+1])?r[s]=[]:r[s]={}),i===o.length-1&&(r[s]=n),r[s]),e),e}function iqe(e,t,n){if(!e||typeof e!="object"||typeof t!="string"&&!Array.isArray(t))return e;const o=Array.isArray(t)?t:t.split(".");let r=e;return o.forEach(s=>{r=r?.[s]}),r!==void 0?r:n}function aqe(e){return/^\s*\d+\s*$/.test(e)}const Dg=["create","read","update","delete"];function BN(e){const t={};if(!e)return t;const n={create:"POST",read:"GET",update:"PUT",delete:"DELETE"};for(const[o,r]of Object.entries(n))t[o]=e.includes(r);return t}function Px(e,t,n){return(typeof t=="object"?[e,t.kind,t.name,t.id]:[e,t,n]).filter(Boolean).join("/")}function roe(e,t,n){return{type:"RECEIVE_ITEMS",items:Array.isArray(e)?e:[e],persistedEdits:t,meta:n}}function cqe(e,t,n,o=!1){return{type:"REMOVE_ITEMS",itemIds:Array.isArray(n)?n:[n],kind:e,name:t,invalidateCache:o}}function lqe(e,t={},n,o){return{...roe(e,n,o),query:t}}function uqe(e){const t={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},n=Object.keys(e).sort();for(let s=0;s{x=x?.[v]}),jx(g,A,x)}}else{if(!e.itemIsComplete[c]?.[b])return null;g=h}p.push(g)}return p}const soe=ct((e,t={})=>{let n=Q$.get(e);if(n){const r=n.get(t);if(r!==void 0)return r}else n=new ia,Q$.set(e,n);const o=dqe(e,t);return n.set(t,o),o});function ioe(e,t={}){var n;const{stableKey:o,context:r}=gh(t);return(n=e.queries?.[r]?.[o]?.meta?.totalItems)!==null&&n!==void 0?n:null}function pqe(e,t={}){var n;const{stableKey:o,context:r}=gh(t);return(n=e.queries?.[r]?.[o]?.meta?.totalPages)!==null&&n!==void 0?n:null}function fqe(e={},t){switch(t.type){case"ADD_FORMAT_TYPES":return{...e,...t.formatTypes.reduce((n,o)=>({...n,[o.name]:o}),{})};case"REMOVE_FORMAT_TYPES":return Object.fromEntries(Object.entries(e).filter(([n])=>!t.names.includes(n)))}return e}const bqe=hr({formatTypes:fqe}),LN=ct(e=>Object.values(e.formatTypes),e=>[e.formatTypes]);function hqe(e,t){return e.formatTypes[t]}function mqe(e,t){const n=LN(e);return n.find(({className:o,tagName:r})=>o===null&&t===r)||n.find(({className:o,tagName:r})=>o===null&&r==="*")}function gqe(e,t){return LN(e).find(({className:n})=>n===null?!1:` ${t} `.indexOf(` ${n} `)>=0)}const Mqe=Object.freeze(Object.defineProperty({__proto__:null,getFormatType:hqe,getFormatTypeForBareElement:mqe,getFormatTypeForClassName:gqe,getFormatTypes:LN},Symbol.toStringTag,{value:"Module"}));function zqe(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Array.isArray(e)?e:[e]}}function Oqe(e){return{type:"REMOVE_FORMAT_TYPES",names:Array.isArray(e)?e:[e]}}const yqe=Object.freeze(Object.defineProperty({__proto__:null,addFormatTypes:zqe,removeFormatTypes:Oqe},Symbol.toStringTag,{value:"Module"})),Aqe="core/rich-text",wc=s1(Aqe,{reducer:bqe,selectors:Mqe,actions:yqe});Js(wc);function zv(e,t){if(e===t)return!0;if(!e||!t||e.type!==t.type)return!1;const n=e.attributes,o=t.attributes;if(n===o)return!0;if(!n||!o)return!1;const r=Object.keys(n),s=Object.keys(o);if(r.length!==s.length)return!1;const i=r.length;for(let c=0;c{const r=t[o-1];if(r){const s=n.slice();s.forEach((i,c)=>{const l=r[c];zv(i,l)&&(s[c]=l)}),t[o]=s}}),{...e,formats:t}}function J$(e,t,n){return e=e.slice(),e[t]=n,e}function Us(e,t,n=e.start,o=e.end){const{formats:r,activeFormats:s}=e,i=r.slice();if(n===o){const c=i[n]?.find(({type:l})=>l===t.type);if(c){const l=i[n].indexOf(c);for(;i[n]&&i[n][l]===c;)i[n]=J$(i[n],l,t),n--;for(o++;i[o]&&i[o][l]===c;)i[o]=J$(i[o],l,t),o++}}else{let c=1/0;for(let l=n;ld!==t.type);const u=i[l].length;uc!==t.type)||[],t]})}function kc({implementation:e},t){return kc.body||(kc.body=e.createHTMLDocument("").body),kc.body.innerHTML=t,kc.body}const yu="",aoe="\uFEFF";function jN(e,t=[]){const{formats:n,start:o,end:r,activeFormats:s}=e;if(o===void 0)return t;if(o===r){if(s)return s;const u=n[o-1]||t,d=n[o]||t;return u.lengthzv(p,f))||c.splice(d,1)}if(c.length===0)return t}return c||t}function coe(e){return jn(wc).getFormatType(e)}function eV(e,t){if(t)return e;const n={};for(const o in e){let r=o;o.startsWith("data-disable-rich-text-")&&(r=o.slice(23)),n[r]=e[o]}return n}function fy({type:e,tagName:t,attributes:n,unregisteredAttributes:o,object:r,boundaryClass:s,isEditableTree:i}){const c=coe(e);let l={};if(s&&i&&(l["data-rich-text-format-boundary"]="true"),!c)return n&&(l={...n,...l}),{type:e,attributes:eV(l,i),object:r};l={...o,...l};for(const u in n){const d=c.attributes?c.attributes[u]:!1;d?l[d]=n[u]:l[u]=n[u]}return c.className&&(l.class?l.class=`${c.className} ${l.class}`:l.class=c.className),i&&c.contentEditable===!1&&(l.contenteditable="false"),{type:t||c.tagName,object:c.object,attributes:eV(l,i)}}function vqe(e,t,n){do if(e[n]!==t[n])return!1;while(n--);return!0}function loe({value:e,preserveWhiteSpace:t,createEmpty:n,append:o,getLastChild:r,getParent:s,isText:i,getText:c,remove:l,appendText:u,onStartIndex:d,onEndIndex:p,isEditableTree:f,placeholder:b}){const{formats:h,replacements:g,text:z,start:A,end:x}=e,v=h.length+1,M=n(),y=jN(e),_=y[y.length-1];let w,k;o(M,"");for(let S=0;S{if(T&&w&&vqe(E,w,B)){T=r(T);return}const{type:N,tagName:j,attributes:P,unregisteredAttributes:D}=W,H=f&&W===_,G=s(T),K=o(G,fy({type:N,tagName:j,attributes:P,unregisteredAttributes:D,boundaryClass:H,isEditableTree:f}));i(T)&&c(T).length===0&&l(T),T=o(K,"")}),S===0&&(d&&A===0&&d(M,T),p&&x===0&&p(M,T)),C===yu){const W=g[S];if(!W)continue;const{type:B,attributes:N,innerHTML:j}=W,P=coe(B);!f&&B==="script"?(T=o(s(T),fy({type:"script",isEditableTree:f})),o(T,{html:decodeURIComponent(N["data-rich-text-script"])})):P?.contentEditable===!1?(T=o(s(T),fy({...W,isEditableTree:f,boundaryClass:A===S&&x===S+1})),j&&o(T,{html:j})):T=o(s(T),fy({...W,object:!0,isEditableTree:f})),T=o(s(T),"")}else!t&&C===` -`?(T=o(s(T),{type:"br",attributes:f?{"data-rich-text-line-break":"true"}:void 0,object:!0}),T=o(s(T),"")):i(T)?u(T,C):T=o(s(T),C);d&&A===S+1&&d(M,T),p&&x===S+1&&p(M,T),q&&S===z.length&&(o(s(T),aoe),b&&z.length===0&&o(s(T),{type:"span",attributes:{"data-rich-text-placeholder":b,style:"pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"}})),w=E,k=C}return M}function Uo({value:e,preserveWhiteSpace:t}){const n=loe({value:e,preserveWhiteSpace:t,createEmpty:xqe,append:wqe,getLastChild:_qe,getParent:Sqe,isText:Cqe,getText:qqe,remove:Rqe,appendText:kqe});return uoe(n.children)}function xqe(){return{}}function _qe({children:e}){return e&&e[e.length-1]}function wqe(e,t){return typeof t=="string"&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function kqe(e,t){e.text+=t}function Sqe({parent:e}){return e}function Cqe({text:e}){return typeof e=="string"}function qqe({text:e}){return e}function Rqe(e){const t=e.parent.children.indexOf(e);return t!==-1&&e.parent.children.splice(t,1),e}function Tqe({type:e,attributes:t,object:n,children:o}){let r="";for(const s in t)Hne(s)&&(r+=` ${s}="${xx(t[s])}"`);return n?`<${e}${r}>`:`<${e}${r}>${uoe(o)}`}function uoe(e=[]){return e.map(t=>t.html!==void 0?t.html:t.text===void 0?Tqe(t):Dwe(t.text)).join("")}function hp({text:e}){return e.replace(yu,"")}function Qd(){return{formats:[],replacements:[],text:""}}function Eqe({tagName:e,attributes:t}){let n;if(t&&t.class&&(n=jn(wc).getFormatTypeForClassName(t.class),n&&(t.class=` ${t.class} `.replace(` ${n.className} `," ").trim(),t.class||delete t.class)),n||(n=jn(wc).getFormatTypeForBareElement(e)),!n)return t?{type:e,attributes:t}:{type:e};if(n.__experimentalCreatePrepareEditableTree&&!n.__experimentalCreateOnChangeEditableValue)return null;if(!t)return{formatType:n,type:n.name,tagName:e};const o={},r={},s={...t};for(const i in n.attributes){const c=n.attributes[i];o[i]=s[c],delete s[c],typeof o[i]>"u"&&delete o[i]}for(const i in s)r[i]=t[i];return n.contentEditable===!1&&delete r.contenteditable,{formatType:n,type:n.name,tagName:e,attributes:o,unregisteredAttributes:r}}class p0{#e;static empty(){return new p0}static fromPlainText(t){return new p0(yn({text:t}))}static fromHTMLString(t){return new p0(yn({html:t}))}static fromHTMLElement(t,n={}){const{preserveWhiteSpace:o=!1}=n,r=o?t:doe(t),s=new p0(yn({element:r}));return Object.defineProperty(s,"originalHTML",{value:t.innerHTML}),s}constructor(t=Qd()){this.#e=t}toPlainText(){return hp(this.#e)}toHTMLString({preserveWhiteSpace:t}={}){return this.originalHTML||Uo({value:this.#e,preserveWhiteSpace:t})}valueOf(){return this.toHTMLString()}toString(){return this.toHTMLString()}toJSON(){return this.toHTMLString()}get length(){return this.text.length}get formats(){return this.#e.formats}get replacements(){return this.#e.replacements}get text(){return this.#e.text}}for(const e of Object.getOwnPropertyNames(String.prototype))p0.prototype.hasOwnProperty(e)||Object.defineProperty(p0.prototype,e,{value(...t){return this.toHTMLString()[e](...t)}});function yn({element:e,text:t,html:n,range:o,__unstableIsEditableTree:r}={}){return n instanceof p0?{text:n.text,formats:n.formats,replacements:n.replacements}:typeof t=="string"&&t.length>0?{formats:Array(t.length),replacements:Array(t.length),text:t}:(typeof n=="string"&&n.length>0&&(e=kc(document,n)),typeof e!="object"?Qd():poe({element:e,range:o,isEditableTree:r}))}function Bd(e,t,n,o){if(!n)return;const{parentNode:r}=t,{startContainer:s,startOffset:i,endContainer:c,endOffset:l}=n,u=e.text.length;o.start!==void 0?e.start=u+o.start:t===s&&t.nodeType===t.TEXT_NODE?e.start=u+i:r===s&&t===s.childNodes[i]?e.start=u:r===s&&t===s.childNodes[i-1]?e.start=u+o.text.length:t===s&&(e.start=u),o.end!==void 0?e.end=u+o.end:t===c&&t.nodeType===t.TEXT_NODE?e.end=u+l:r===c&&t===c.childNodes[l-1]?e.end=u+o.text.length:r===c&&t===c.childNodes[l]?e.end=u:t===c&&(e.end=u+l)}function Wqe(e,t,n){if(!t)return;const{startContainer:o,endContainer:r}=t;let{startOffset:s,endOffset:i}=t;return e===o&&(s=n(e.nodeValue.slice(0,s)).length),e===r&&(i=n(e.nodeValue.slice(0,i)).length),{startContainer:o,startOffset:s,endContainer:r,endOffset:i}}function doe(e,t=!0){const n=e.cloneNode(!0);return n.normalize(),Array.from(n.childNodes).forEach((o,r,s)=>{if(o.nodeType===o.TEXT_NODE){let i=o.nodeValue;/[\n\t\r\f]/.test(i)&&(i=i.replace(/[\n\t\r\f]+/g," ")),i.indexOf(" ")!==-1&&(i=i.replace(/ {2,}/g," ")),r===0&&i.startsWith(" ")?i=i.slice(1):t&&r===s.length-1&&i.endsWith(" ")&&(i=i.slice(0,-1)),o.nodeValue=i}else o.nodeType===o.ELEMENT_NODE&&doe(o,!1)}),n}const Nqe="\r";function tV(e){return e.replace(new RegExp(`[${aoe}${yu}${Nqe}]`,"gu"),"")}function poe({element:e,range:t,isEditableTree:n}){const o=Qd();if(!e)return o;if(!e.hasChildNodes())return Bd(o,e,t,Qd()),o;const r=e.childNodes.length;for(let i=0;in===t)}function jqe({start:e,end:t,replacements:n,text:o}){if(!(e+1!==t||o[e]!==yu))return n[e]}function md({start:e,end:t}){if(!(e===void 0||t===void 0))return e===t}function o8({text:e}){return e.length===0}function Pqe(e,t=""){return typeof t=="string"&&(t=yn({text:t})),Mh(e.reduce((n,{formats:o,replacements:r,text:s})=>({formats:n.formats.concat(t.formats,o),replacements:n.replacements.concat(t.replacements,r),text:n.text+t.text+s})))}function foe(e,t){if(t={name:e,...t},typeof t.name!="string"){window.console.error("Format names must be strings.");return}if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name)){window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");return}if(jn(wc).getFormatType(t.name)){window.console.error('Format "'+t.name+'" is already registered.');return}if(typeof t.tagName!="string"||t.tagName===""){window.console.error("Format tag names must be a string.");return}if((typeof t.className!="string"||t.className==="")&&t.className!==null){window.console.error("Format class names must be a string, or null to handle bare elements.");return}if(!/^[_a-zA-Z]+[a-zA-Z0-9_-]*$/.test(t.className)){window.console.error("A class name must begin with a letter, followed by any number of hyphens, underscores, letters, or numbers.");return}if(t.className===null){const n=jn(wc).getFormatTypeForBareElement(t.tagName);if(n&&n.name!=="core/unknown"){window.console.error(`Format "${n.name}" is already registered to handle bare tag name "${t.tagName}".`);return}}else{const n=jn(wc).getFormatTypeForClassName(t.className);if(n){window.console.error(`Format "${n.name}" is already registered to handle class name "${t.className}".`);return}}if(!("title"in t)||t.title===""){window.console.error('The format "'+t.name+'" must have a title.');return}if("keywords"in t&&t.keywords.length>3){window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');return}if(typeof t.title!="string"){window.console.error("Format titles must be strings.");return}return D0(wc).addFormatTypes(t),t}function gd(e,t,n=e.start,o=e.end){const{formats:r,activeFormats:s}=e,i=r.slice();if(n===o){const c=i[n]?.find(({type:l})=>l===t);if(c){for(;i[n]?.find(l=>l===c);)I6(i,n,t),n--;for(o++;i[o]?.find(l=>l===c);)I6(i,o,t),o++}}else for(let c=n;cc!==t)||[]})}function I6(e,t,n){const o=e[t].filter(({type:r})=>r!==n);o.length?e[t]=o:delete e[t]}function Xo(e,t,n=e.start,o=e.end){const{formats:r,replacements:s,text:i}=e;typeof t=="string"&&(t=yn({text:t}));const c=n+t.text.length;return Mh({formats:r.slice(0,n).concat(t.formats,r.slice(o)),replacements:s.slice(0,n).concat(t.replacements,s.slice(o)),text:i.slice(0,n)+t.text+i.slice(o),start:c,end:c})}function ki(e,t,n){return Xo(e,yn(),t,n)}function Iqe({formats:e,replacements:t,text:n,start:o,end:r},s,i){return n=n.replace(s,(c,...l)=>{const u=l[l.length-2];let d=i,p,f;return typeof d=="function"&&(d=i(c,...l)),typeof d=="object"?(p=d.formats,f=d.replacements,d=d.text):(p=Array(d.length),f=Array(d.length),e[u]&&(p=p.fill(e[u]))),e=e.slice(0,u).concat(p,e.slice(u+c.length)),t=t.slice(0,u).concat(f,t.slice(u+c.length)),o&&(o=r=u+d.length),d}),Mh({formats:e,replacements:t,text:n,start:o,end:r})}function boe(e,t,n,o){return Xo(e,{formats:[,],replacements:[t],text:yu},n,o)}function wb(e,t=e.start,n=e.end){const{formats:o,replacements:r,text:s}=e;return t===void 0||n===void 0?{...e}:{formats:o.slice(t,n),replacements:r.slice(t,n),text:s.slice(t,n)}}function IN({formats:e,replacements:t,text:n,start:o,end:r},s){if(typeof s!="string")return Dqe(...arguments);let i=0;return n.split(s).map(c=>{const l=i,u={formats:e.slice(l,l+c.length),replacements:t.slice(l,l+c.length),text:c};return i+=s.length+c.length,o!==void 0&&r!==void 0&&(o>=l&&ol&&(u.start=0),r>=l&&ri&&(u.end=c.length)),u})}function Dqe({formats:e,replacements:t,text:n,start:o,end:r},s=o,i=r){if(o===void 0||r===void 0)return;const c={formats:e.slice(0,s),replacements:t.slice(0,s),text:n.slice(0,s)},l={formats:e.slice(i),replacements:t.slice(i),text:n.slice(i),start:0,end:0};return[c,l]}function hoe(e,t){return e===t||e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}function r8(e,t,n){const o=e.parentNode;let r=0;for(;e=e.previousSibling;)r++;return n=[r,...n],o!==t&&(n=r8(o,t,n)),n}function nV(e,t){for(t=[...t];e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}function Fqe(e,t){if(t.html!==void 0)return e.innerHTML+=t.html;typeof t=="string"&&(t=e.ownerDocument.createTextNode(t));const{type:n,attributes:o}=t;if(n){t=e.ownerDocument.createElement(n);for(const r in o)t.setAttribute(r,o[r])}return e.appendChild(t)}function $qe(e,t){e.appendData(t)}function Vqe({lastChild:e}){return e}function Hqe({parentNode:e}){return e}function Uqe(e){return e.nodeType===e.TEXT_NODE}function Xqe({nodeValue:e}){return e}function Gqe(e){return e.parentNode.removeChild(e)}function Kqe({value:e,prepareEditableTree:t,isEditableTree:n=!0,placeholder:o,doc:r=document}){let s=[],i=[];return t&&(e={...e,formats:t(e)}),{body:loe({value:e,createEmpty:()=>kc(r,""),append:Fqe,getLastChild:Vqe,getParent:Hqe,isText:Uqe,getText:Xqe,remove:Gqe,appendText:$qe,onStartIndex(u,d){s=r8(d,u,[d.nodeValue.length])},onEndIndex(u,d){i=r8(d,u,[d.nodeValue.length])},isEditableTree:n,placeholder:o}),selection:{startPath:s,endPath:i}}}function Yqe({value:e,current:t,prepareEditableTree:n,__unstableDomOnly:o,placeholder:r}){const{body:s,selection:i}=Kqe({value:e,prepareEditableTree:n,placeholder:r,doc:t.ownerDocument});moe(s,t),e.start!==void 0&&!o&&Zqe(i,t)}function moe(e,t){let n=0,o;for(;o=e.firstChild;){const r=t.childNodes[n];if(!r)t.appendChild(o);else if(r.isEqualNode(o))e.removeChild(o);else if(r.nodeName!==o.nodeName||r.nodeType===r.TEXT_NODE&&r.data!==o.data)t.replaceChild(o,r);else{const s=r.attributes,i=o.attributes;if(s){let c=s.length;for(;c--;){const{name:l}=s[c];o.getAttribute(l)||r.removeAttribute(l)}}if(i)for(let c=0;c0){if(hoe(d,u.getRangeAt(0)))return;u.removeAllRanges()}u.addRange(d),p!==c.activeElement&&p instanceof l.HTMLElement&&p.focus()}function Qqe(e){if(!(typeof document>"u")){if(document.readyState==="complete"||document.readyState==="interactive")return void e();document.addEventListener("DOMContentLoaded",e)}}function oV(e="polite"){const t=document.createElement("div");t.id=`a11y-speak-${e}`,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");const{body:n}=document;return n&&n.appendChild(t),t}function Jqe(){const e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=m("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");const{body:t}=document;return t&&t.appendChild(e),e}function eRe(){const e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text");for(let n=0;n]+>/g," "),rV===e&&(e+=" "),rV=e,e}function At(e,t){eRe(),e=tRe(e);const n=document.getElementById("a11y-speak-intro-text"),o=document.getElementById("a11y-speak-assertive"),r=document.getElementById("a11y-speak-polite");o&&t==="assertive"?o.textContent=e:r&&(r.textContent=e),n&&n.removeAttribute("hidden")}function nRe(){const e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");e===null&&Jqe(),t===null&&oV("assertive"),n===null&&oV("polite")}Qqe(nRe);function Ba(e,t){return PN(e,t.type)?(t.title&&At(le(m("%s removed."),t.title),"assertive"),gd(e,t.type)):(t.title&&At(le(m("%s applied."),t.title),"assertive"),Us(e,t))}function oRe(e,t,n,o){let r=e.startContainer;if(r.nodeType===r.TEXT_NODE&&e.startOffset===r.length&&r.nextSibling)for(r=r.nextSibling;r.firstChild;)r=r.firstChild;if(r.nodeType!==r.ELEMENT_NODE&&(r=r.parentElement),!r||r===t||!t.contains(r))return;const s=n+(o?"."+o:"");for(;r!==t;){if(r.matches(s))return r;r=r.parentElement}}function rRe(e,t){return{contextElement:t,getBoundingClientRect(){return t.contains(e.startContainer)?e.getBoundingClientRect():t.getBoundingClientRect()}}}function D6(e,t,n){if(!e)return;const{ownerDocument:o}=e,{defaultView:r}=o,s=r.getSelection();if(!s||!s.rangeCount)return;const i=s.getRangeAt(0);if(!i||!i.startContainer)return;const c=oRe(i,e,t,n);return c||rRe(i,e)}function n3({editableContentElement:e,settings:t={}}){const{tagName:n,className:o,isActive:r}=t,[s,i]=O.useState(()=>D6(e,n,o)),c=oo(r);return O.useLayoutEffect(()=>{if(!e)return;function l(){i(D6(e,n,o))}function u(){p.addEventListener("selectionchange",l)}function d(){p.removeEventListener("selectionchange",l)}const{ownerDocument:p}=e;return(e===p.activeElement||!c&&r||c&&!r)&&(i(D6(e,n,o)),u()),e.addEventListener("focusin",u),e.addEventListener("focusout",d),()=>{d(),e.removeEventListener("focusin",u),e.removeEventListener("focusout",d)}},[e,n,o,r,c]),s}const sRe="pre-wrap",iRe="1px";function aRe(){return O.useCallback(e=>{e&&(e.style.whiteSpace=sRe,e.style.minWidth=iRe)},[])}function cRe({record:e}){const t=O.useRef(),{activeFormats:n=[],replacements:o,start:r}=e.current,s=o[r];return O.useEffect(()=>{if((!n||!n.length)&&!s)return;const i="*[data-rich-text-format-boundary]",c=t.current.querySelector(i);if(!c)return;const{ownerDocument:l}=c,{defaultView:u}=l,p=u.getComputedStyle(c).color.replace(")",", 0.2)").replace("rgb","rgba"),f=`.rich-text:focus ${i}`,b=`background-color: ${p}`,h=`${f} {${b}}`,g="rich-text-boundary-style";let z=l.getElementById(g);z||(z=l.createElement("style"),z.id=g,l.head.appendChild(z)),z.innerHTML!==h&&(z.innerHTML=h)},[n,s]),t}const lRe=e=>t=>{function n(r){const{record:s}=e.current,{ownerDocument:i}=t;if(md(s.current)||!t.contains(i.activeElement))return;const c=wb(s.current),l=hp(c),u=Uo({value:c});r.clipboardData.setData("text/plain",l),r.clipboardData.setData("text/html",u),r.clipboardData.setData("rich-text","true"),r.preventDefault(),r.type==="cut"&&i.execCommand("delete")}const{defaultView:o}=t.ownerDocument;return o.addEventListener("copy",n),o.addEventListener("cut",n),()=>{o.removeEventListener("copy",n),o.removeEventListener("cut",n)}},uRe=()=>e=>{function t(o){const{target:r}=o;if(r===e||r.textContent&&r.isContentEditable)return;const{ownerDocument:s}=r,{defaultView:i}=s,c=i.getSelection();if(c.containsNode(r))return;const l=s.createRange(),u=r.isContentEditable?r:r.closest("[contenteditable]");l.selectNode(u),c.removeAllRanges(),c.addRange(l),o.preventDefault()}function n(o){o.relatedTarget&&!e.contains(o.relatedTarget)&&o.relatedTarget.tagName==="A"&&t(o)}return e.addEventListener("click",t),e.addEventListener("focusin",n),()=>{e.removeEventListener("click",t),e.removeEventListener("focusin",n)}},sV=[],dRe=e=>t=>{function n(o){const{keyCode:r,shiftKey:s,altKey:i,metaKey:c,ctrlKey:l}=o;if(s||i||c||l||r!==Is&&r!==Ds)return;const{record:u,applyRecord:d,forceRender:p}=e.current,{text:f,formats:b,start:h,end:g,activeFormats:z=[]}=u.current,A=md(u.current),{ownerDocument:x}=t,{defaultView:v}=x,{direction:M}=v.getComputedStyle(t),y=M==="rtl"?Ds:Is,_=o.keyCode===y;if(A&&z.length===0&&(h===0&&_||g===f.length&&!_)||!A)return;const w=b[h-1]||sV,k=b[h]||sV,S=_?w:k,C=z.every((N,j)=>N===S[j]);let q=z.length;if(C?q{t.removeEventListener("keydown",n)}},pRe=e=>t=>{function n(o){const{keyCode:r}=o,{createRecord:s,handleChange:i}=e.current;if(o.defaultPrevented||r!==Wc&&r!==Na)return;const c=s(),{start:l,end:u,text:d}=c;l===0&&u!==0&&u===d.length&&(i(ki(c)),o.preventDefault())}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}};function fRe({value:e,start:t,end:n,formats:o}){const r=Math.min(t,n),s=Math.max(t,n),i=e.formats[r-1]||[],c=e.formats[s]||[];for(e.activeFormats=o.map((l,u)=>{if(i[u]){if(zv(l,i[u]))return i[u]}else if(c[u]&&zv(l,c[u]))return c[u];return l});--n>=t;)e.activeFormats.length>0?e.formats[n]=e.activeFormats:delete e.formats[n];return e}const bRe=new Set(["insertParagraph","insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink"]),iV=[],goe="data-rich-text-placeholder";function hRe(e){const t=e.getSelection(),{anchorNode:n,anchorOffset:o}=t;if(n.nodeType!==n.ELEMENT_NODE)return;const r=n.childNodes[o];!r||r.nodeType!==r.ELEMENT_NODE||!r.hasAttribute(goe)||t.collapseToStart()}const mRe=e=>t=>{const{ownerDocument:n}=t,{defaultView:o}=n;let r=!1;function s(d){if(r)return;let p;d&&(p=d.inputType);const{record:f,applyRecord:b,createRecord:h,handleChange:g}=e.current;if(p&&(p.indexOf("format")===0||bRe.has(p))){b(f.current);return}const z=h(),{start:A,activeFormats:x=[]}=f.current,v=fRe({value:z,start:A,end:z.start,formats:x});g(v)}function i(){const{record:d,applyRecord:p,createRecord:f,onSelectionChange:b}=e.current;if(t.contentEditable!=="true")return;if(n.activeElement!==t){n.removeEventListener("selectionchange",i);return}if(r)return;const{start:h,end:g,text:z}=f(),A=d.current;if(z!==A.text){s();return}if(h===A.start&&g===A.end){A.text.length===0&&h===0&&hRe(o);return}const x={...A,start:h,end:g,activeFormats:A._newActiveFormats,_newActiveFormats:void 0},v=jN(x,iV);x.activeFormats=v,d.current=x,p(x,{domOnly:!0}),b(h,g)}function c(){r=!0,n.removeEventListener("selectionchange",i),t.querySelector(`[${goe}]`)?.remove()}function l(){r=!1,s({inputType:"insertText"}),n.addEventListener("selectionchange",i)}function u(){const{record:d,isSelected:p,onSelectionChange:f,applyRecord:b}=e.current;t.parentElement.closest('[contenteditable="true"]')||(p?b(d.current,{domOnly:!0}):d.current={...d.current,start:void 0,end:void 0,activeFormats:iV},f(d.current.start,d.current.end),window.queueMicrotask(i),n.addEventListener("selectionchange",i))}return t.addEventListener("input",s),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("focus",u),()=>{t.removeEventListener("input",s),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("focus",u)}},gRe=()=>e=>{const{ownerDocument:t}=e,{defaultView:n}=t,o=n?.getSelection();let r;function s(){return o.rangeCount?o.getRangeAt(0):null}function i(c){const l=c.type==="keydown"?"keyup":"pointerup";function u(){t.removeEventListener(l,d),t.removeEventListener("selectionchange",u),t.removeEventListener("input",u)}function d(){u(),!hoe(r,s())&&t.dispatchEvent(new Event("selectionchange"))}t.addEventListener(l,d),t.addEventListener("selectionchange",u),t.addEventListener("input",u),r=s()}return e.addEventListener("pointerdown",i),e.addEventListener("keydown",i),()=>{e.removeEventListener("pointerdown",i),e.removeEventListener("keydown",i)}},MRe=[lRe,uRe,dRe,pRe,mRe,gRe];function zRe(e){const t=O.useRef(e);t.current=e;const n=O.useMemo(()=>MRe.map(o=>o(t)),[t]);return Ft(o=>{const r=n.map(s=>s(o));return()=>{r.forEach(s=>s())}},[n])}function Moe({value:e="",selectionStart:t,selectionEnd:n,placeholder:o,onSelectionChange:r,preserveWhiteSpace:s,onChange:i,__unstableDisableFormats:c,__unstableIsSelected:l,__unstableDependencies:u=[],__unstableAfterParse:d,__unstableBeforeSerialize:p,__unstableAddInvisibleFormats:f}){const b=zn(),[,h]=O.useReducer(()=>({})),g=O.useRef();function z(){const{ownerDocument:{defaultView:C}}=g.current,q=C.getSelection(),E=q.rangeCount>0?q.getRangeAt(0):null;return yn({element:g.current,range:E,__unstableIsEditableTree:!0})}function A(C,{domOnly:q}={}){Yqe({value:C,current:g.current,prepareEditableTree:f,__unstableDomOnly:q,placeholder:o})}const x=O.useRef(e),v=O.useRef();function M(){x.current=e,v.current=e,e instanceof p0||(v.current=e?p0.fromHTMLString(e,{preserveWhiteSpace:s}):p0.empty()),v.current={text:v.current.text,formats:v.current.formats,replacements:v.current.replacements},c&&(v.current.formats=Array(e.length),v.current.replacements=Array(e.length)),d&&(v.current.formats=d(v.current)),v.current.start=t,v.current.end=n}const y=O.useRef(!1);v.current?(t!==v.current.start||n!==v.current.end)&&(y.current=l,v.current={...v.current,start:t,end:n,activeFormats:void 0}):(y.current=l,M());function _(C){if(v.current=C,A(C),c)x.current=C.text;else{const B=p?p(C):C.formats;C={...C,formats:B},typeof e=="string"?x.current=Uo({value:C,preserveWhiteSpace:s}):x.current=new p0(C)}const{start:q,end:E,formats:T,text:W}=v.current;b.batch(()=>{r(q,E),i(x.current,{__unstableFormats:T,__unstableText:W})}),h()}function w(){M(),A(v.current)}const k=O.useRef(!1);O.useLayoutEffect(()=>{k.current&&e!==x.current&&(w(),h())},[e]),O.useLayoutEffect(()=>{y.current&&(g.current.ownerDocument.activeElement!==g.current&&g.current.focus(),A(v.current),y.current=!1)},[y.current]);const S=Xt([g,aRe(),cRe({record:v}),zRe({record:v,handleChange:_,applyRecord:A,createRecord:z,isSelected:l,onSelectionChange:r,forceRender:h}),Ft(()=>{w(),k.current=!0},[o,...u])]);return{value:v.current,getValue:()=>v.current,onChange:_,ref:S}}let by;const ORe=new Uint8Array(16);function yRe(){if(!by&&(by=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!by))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return by(ORe)}const tr=[];for(let e=0;e<256;++e)tr.push((e+256).toString(16).slice(1));function ARe(e,t=0){return tr[e[t+0]]+tr[e[t+1]]+tr[e[t+2]]+tr[e[t+3]]+"-"+tr[e[t+4]]+tr[e[t+5]]+"-"+tr[e[t+6]]+tr[e[t+7]]+"-"+tr[e[t+8]]+tr[e[t+9]]+"-"+tr[e[t+10]]+tr[e[t+11]]+tr[e[t+12]]+tr[e[t+13]]+tr[e[t+14]]+tr[e[t+15]]}const vRe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),aV={randomUUID:vRe};function Si(e,t,n){if(aV.randomUUID&&!t&&!e)return aV.randomUUID();e=e||{};const o=e.random||(e.rng||yRe)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,ARe(o)}let F6=null;function xRe(e,t){const n=[...e],o=[];for(;n.length;)o.push(n.splice(0,t));return o}async function _Re(e){F6===null&&(F6=(await et({path:"/batch/v1",method:"OPTIONS"})).endpoints[0].args.requests.maxItems);const t=[];for(const n of xRe(e,F6)){const o=await et({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:n.map(s=>({path:s.path,body:s.data,method:s.method,headers:s.headers}))}});let r;o.failed?r=o.responses.map(s=>({error:s?.body})):r=o.responses.map(s=>{const i={};return s.status>=200&&s.status<300?i.output=s.body:i.error=s.body,i}),t.push(...r)}return t}function wRe(e=_Re){let t=0,n=[];const o=new kRe;return{add(r){const s=++t;o.add(s);const i=c=>new Promise((l,u)=>{n.push({input:c,resolve:l,reject:u}),o.delete(s)});return typeof r=="function"?Promise.resolve(r(i)).finally(()=>{o.delete(s)}):i(r)},async run(){o.size&&await new Promise(i=>{const c=o.subscribe(()=>{o.size||(c(),i(void 0))})});let r;try{if(r=await e(n.map(({input:i})=>i)),r.length!==n.length)throw new Error("run: Array returned by processor must be same size as input array.")}catch(i){for(const{reject:c}of n)c(i);throw i}let s=!0;return r.forEach((i,c)=>{const l=n[c];if(i?.error)l?.reject(i.error),s=!1;else{var u;l?.resolve((u=i?.output)!==null&&u!==void 0?u:i)}}),n=[],s}}}class kRe{constructor(...t){this.set=new Set(...t),this.subscribers=new Set}get size(){return this.set.size}add(t){return this.set.add(t),this.subscribers.forEach(n=>n()),this}delete(t){const n=this.set.delete(t);return this.subscribers.forEach(o=>o()),n}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}}const ur="core",E1=()=>new Map,s8=e=>{const t=E1();return e.forEach((n,o)=>{t.set(o,n)}),t},Vr=(e,t,n)=>{let o=e.get(t);return o===void 0&&e.set(t,o=n()),o},SRe=(e,t)=>{const n=[];for(const[o,r]of e)n.push(t(r,o));return n},CRe=(e,t)=>{for(const[n,o]of e)if(t(o,n))return!0;return!1},Nu=()=>new Set,$6=e=>e[e.length-1],qRe=(e,t)=>{for(let n=0;n{this.off(t,o),n(...r)};this.on(t,o)}off(t,n){const o=this._observers.get(t);o!==void 0&&(o.delete(n),o.size===0&&this._observers.delete(t))}emit(t,n){return Yc((this._observers.get(t)||E1()).values()).forEach(o=>o(...n))}destroy(){this._observers=E1()}}class o3{constructor(){this._observers=E1()}on(t,n){Vr(this._observers,t,Nu).add(n)}once(t,n){const o=(...r)=>{this.off(t,o),n(...r)};this.on(t,o)}off(t,n){const o=this._observers.get(t);o!==void 0&&(o.delete(n),o.size===0&&this._observers.delete(t))}emit(t,n){return Yc((this._observers.get(t)||E1()).values()).forEach(o=>o(...n))}destroy(){this._observers=E1()}}const La=Math.floor,QA=Math.abs,ERe=Math.log10,DN=(e,t)=>ee>t?e:t,zoe=e=>e!==0?e<0:1/e<0,cV=1,lV=2,V6=4,H6=8,qM=32,Nc=64,as=128,Ix=31,i8=63,mp=127,WRe=2147483647,Ooe=Number.MAX_SAFE_INTEGER,NRe=Number.isInteger||(e=>typeof e=="number"&&isFinite(e)&&La(e)===e),BRe=String.fromCharCode,LRe=e=>e.toLowerCase(),jRe=/^\s*/g,PRe=e=>e.replace(jRe,""),IRe=/([A-Z])/g,uV=(e,t)=>PRe(e.replace(IRe,n=>`${t}${LRe(n)}`)),DRe=e=>{const t=unescape(encodeURIComponent(e)),n=t.length,o=new Uint8Array(n);for(let r=0;rRM.encode(e),a8=RM?FRe:DRe;let Fg=typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});Fg&&Fg.decode(new Uint8Array).length===1&&(Fg=null);class r3{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Po=()=>new r3,$Re=e=>{let t=e.cpos;for(let n=0;n{const t=new Uint8Array($Re(e));let n=0;for(let o=0;o{const n=e.cbuf.length;n-e.cpos{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t},TM=No,Rt=(e,t)=>{for(;t>mp;)No(e,as|mp&t),t=La(t/128);No(e,mp&t)},FN=(e,t)=>{const n=zoe(t);for(n&&(t=-t),No(e,(t>i8?as:0)|(n?Nc:0)|i8&t),t=La(t/64);t>0;)No(e,(t>mp?as:0)|mp&t),t=La(t/128)},c8=new Uint8Array(3e4),HRe=c8.length/3,URe=(e,t)=>{if(t.length{const n=unescape(encodeURIComponent(t)),o=n.length;Rt(e,o);for(let r=0;r{const n=e.cbuf.length,o=e.cpos,r=DN(n-o,t.length),s=t.length-r;e.cbuf.set(t.subarray(0,r),o),e.cpos+=r,s>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(bf(n*2,s)),e.cbuf.set(t.subarray(r)),e.cpos=s)},eo=(e,t)=>{Rt(e,t.byteLength),Dx(e,t)},$N=(e,t)=>{VRe(e,t);const n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},GRe=(e,t)=>$N(e,4).setFloat32(0,t,!1),KRe=(e,t)=>$N(e,8).setFloat64(0,t,!1),YRe=(e,t)=>$N(e,8).setBigInt64(0,t,!1),dV=new DataView(new ArrayBuffer(4)),ZRe=e=>(dV.setFloat32(0,e),dV.getFloat32(0)===e),kb=(e,t)=>{switch(typeof t){case"string":No(e,119),ka(e,t);break;case"number":NRe(t)&&QA(t)<=WRe?(No(e,125),FN(e,t)):ZRe(t)?(No(e,124),GRe(e,t)):(No(e,123),KRe(e,t));break;case"bigint":No(e,122),YRe(e,t);break;case"object":if(t===null)No(e,126);else if(RRe(t)){No(e,117),Rt(e,t.length);for(let n=0;n0&&Rt(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}const fV=e=>{e.count>0&&(FN(e.encoder,e.count===1?e.s:-e.s),e.count>1&&Rt(e.encoder,e.count-2))};class JA{constructor(){this.encoder=new r3,this.s=0,this.count=0}write(t){this.s===t?this.count++:(fV(this),this.count=1,this.s=t)}toUint8Array(){return fV(this),$0(this.encoder)}}const bV=e=>{if(e.count>0){const t=e.diff*2+(e.count===1?0:1);FN(e.encoder,t),e.count>1&&Rt(e.encoder,e.count-2)}};class U6{constructor(){this.encoder=new r3,this.s=0,this.count=0,this.diff=0}write(t){this.diff===t-this.s?(this.s=t,this.count++):(bV(this),this.count=1,this.diff=t-this.s,this.s=t)}toUint8Array(){return bV(this),$0(this.encoder)}}class QRe{constructor(){this.sarr=[],this.s="",this.lensE=new JA}write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}toUint8Array(){const t=new r3;return this.sarr.push(this.s),this.s="",ka(t,this.sarr.join("")),Dx(t,this.lensE.toUint8Array()),$0(t)}}const Ci=e=>new Error(e),Sa=()=>{throw Ci("Method unimplemented")},ja=()=>{throw Ci("Unexpected case")},yoe=Ci("Unexpected end of array"),Aoe=Ci("Integer out of Range");class Fx{constructor(t){this.arr=t,this.pos=0}}const Ya=e=>new Fx(e),JRe=e=>e.pos!==e.arr.length,e8e=(e,t)=>{const n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},Bo=e=>e8e(e,Zt(e)),Bp=e=>e.arr[e.pos++],Zt=e=>{let t=0,n=1;const o=e.arr.length;for(;e.posOoe)throw Aoe}throw yoe},VN=e=>{let t=e.arr[e.pos++],n=t&i8,o=64;const r=(t&Nc)>0?-1:1;if(!(t&as))return r*n;const s=e.arr.length;for(;e.posOoe)throw Aoe}throw yoe},t8e=e=>{let t=Zt(e);if(t===0)return"";{let n=String.fromCodePoint(Bp(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(Bp(e));else for(;t>0;){const o=t<1e4?t:1e4,r=e.arr.subarray(e.pos,e.pos+o);e.pos+=o,n+=String.fromCodePoint.apply(null,r),t-=o}return decodeURIComponent(escape(n))}},n8e=e=>Fg.decode(Bo(e)),Bc=Fg?n8e:t8e,HN=(e,t)=>{const n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},o8e=e=>HN(e,4).getFloat32(0,!1),r8e=e=>HN(e,8).getFloat64(0,!1),s8e=e=>HN(e,8).getBigInt64(0,!1),i8e=[e=>{},e=>null,VN,o8e,r8e,s8e,e=>!1,e=>!0,Bc,e=>{const t=Zt(e),n={};for(let o=0;o{const t=Zt(e),n=[];for(let o=0;oi8e[127-Bp(e)](e);class hV extends Fx{constructor(t,n){super(t),this.reader=n,this.s=null,this.count=0}read(){return this.count===0&&(this.s=this.reader(this),JRe(this)?this.count=Zt(this)+1:this.count=-1),this.count--,this.s}}class e4 extends Fx{constructor(t){super(t),this.s=0,this.count=0}read(){if(this.count===0){this.s=VN(this);const t=zoe(this.s);this.count=1,t&&(this.s=-this.s,this.count=Zt(this)+2)}return this.count--,this.s}}class X6 extends Fx{constructor(t){super(t),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const t=VN(this),n=t&1;this.diff=La(t/2),this.count=1,n&&(this.count=Zt(this)+2)}return this.s+=this.diff,this.count--,this.s}}class a8e{constructor(t){this.decoder=new e4(t),this.str=Bc(this.decoder),this.spos=0}read(){const t=this.spos+this.decoder.read(),n=this.str.slice(this.spos,t);return this.spos=t,n}}const c8e=crypto.getRandomValues.bind(crypto),l8e=Math.random,voe=()=>c8e(new Uint32Array(1))[0],u8e="10000000-1000-4000-8000"+-1e11,xoe=()=>u8e.replace(/[018]/g,e=>(e^voe()&15>>e/4).toString(16)),Zc=Date.now,Cb=e=>new Promise(e);Promise.all.bind(Promise);const d8e=e=>Promise.reject(e),UN=e=>Promise.resolve(e),mV=e=>e===void 0?null:e;class p8e{constructor(){this.map=new Map}setItem(t,n){this.map.set(t,n)}getItem(t){return this.map.get(t)}}let _oe=new p8e,XN=!0;try{typeof localStorage<"u"&&localStorage&&(_oe=localStorage,XN=!1)}catch{}const woe=_oe,f8e=e=>XN||addEventListener("storage",e),b8e=e=>XN||removeEventListener("storage",e),h8e=Object.assign,koe=Object.keys,m8e=(e,t)=>{for(const n in e)t(e[n],n)},gV=e=>koe(e).length,MV=e=>koe(e).length,g8e=e=>{for(const t in e)return!1;return!0},M8e=(e,t)=>{for(const n in e)if(!t(e[n],n))return!1;return!0},Soe=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),z8e=(e,t)=>e===t||MV(e)===MV(t)&&M8e(e,(n,o)=>(n!==void 0||Soe(t,o))&&t[o]===n),O8e=Object.freeze,Coe=e=>{for(const t in e){const n=e[t];(typeof n=="object"||typeof n=="function")&&Coe(e[t])}return O8e(e)},GN=(e,t,n=0)=>{try{for(;n{},A8e=e=>e,v8e=(e,t)=>e===t,$g=(e,t)=>{if(e==null||t==null)return v8e(e,t);if(e.constructor!==t.constructor)return!1;if(e===t)return!0;switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:{if(e.byteLength!==t.byteLength)return!1;for(let n=0;nt.includes(e);var qoe={};const qb=typeof process<"u"&&process.release&&/node|io\.js/.test(process.release.name)&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]",Roe=typeof window<"u"&&typeof document<"u"&&!qb;let Ji;const _8e=()=>{if(Ji===void 0)if(qb){Ji=E1();const e=process.argv;let t=null;for(let n=0;n{if(e.length!==0){const[t,n]=e.split("=");Ji.set(`--${uV(t,"-")}`,n),Ji.set(`-${uV(t,"-")}`,n)}})):Ji=E1();return Ji},l8=e=>_8e().has(e),EM=e=>mV(qb?qoe[e.toUpperCase().replaceAll("-","_")]:woe.getItem(e)),Toe=e=>l8("--"+e)||EM(e)!==null;Toe("production");const w8e=qb&&x8e(qoe.FORCE_COLOR,["true","1","2"]),k8e=w8e||!l8("--no-colors")&&!Toe("no-color")&&(!qb||process.stdout.isTTY)&&(!qb||l8("--color")||EM("COLORTERM")!==null||(EM("TERM")||"").includes("color")),Eoe=e=>new Uint8Array(e),S8e=(e,t,n)=>new Uint8Array(e,t,n),C8e=e=>new Uint8Array(e),q8e=e=>{let t="";for(let n=0;nBuffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),T8e=e=>{const t=atob(e),n=Eoe(t.length);for(let o=0;o{const t=Buffer.from(e,"base64");return S8e(t.buffer,t.byteOffset,t.byteLength)},Woe=Roe?q8e:R8e,KN=Roe?T8e:E8e,W8e=e=>{const t=Eoe(e.byteLength);return t.set(e),t};class N8e{constructor(t,n){this.left=t,this.right=n}}const cc=(e,t)=>new N8e(e,t);typeof DOMParser<"u"&&new DOMParser;const B8e=e=>SRe(e,(t,n)=>`${n}:${t};`).join(""),L8e=JSON.stringify,bl=Symbol,Fs=bl(),Lp=bl(),Noe=bl(),YN=bl(),Boe=bl(),Loe=bl(),joe=bl(),$x=bl(),Vx=bl(),j8e=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());const t=[],n=[];let o=0;for(;o0&&n.push(t.join(""));o{const n=zV[G6],o=EM("log"),r=o!==null&&(o==="*"||o==="true"||new RegExp(o,"gi").test(t));return G6=(G6+1)%zV.length,t+=": ",r?(...s)=>{s.length===1&&s[0]?.constructor===Function&&(s=s[0]());const i=Zc(),c=i-OV;OV=i,e(n,t,Vx,...s.map(l=>{switch(l!=null&&l.constructor===Uint8Array&&(l=Array.from(l)),typeof l){case"string":case"symbol":return l;default:return L8e(l)}}),n," +"+c+"ms")}:y8e},I8e={[Fs]:cc("font-weight","bold"),[Lp]:cc("font-weight","normal"),[Noe]:cc("color","blue"),[Boe]:cc("color","green"),[YN]:cc("color","grey"),[Loe]:cc("color","red"),[joe]:cc("color","purple"),[$x]:cc("color","orange"),[Vx]:cc("color","black")},D8e=e=>{e.length===1&&e[0]?.constructor===Function&&(e=e[0]());const t=[],n=[],o=E1();let r=[],s=0;for(;s0||l.length>0?(t.push("%c"+i),n.push(l)):t.push(i)}else break}}for(s>0&&(r=n,r.unshift(t.join("")));s{console.log(...Poe(e)),Doe.forEach(t=>t.print(e))},F8e=(...e)=>{console.warn(...Poe(e)),e.unshift($x),Doe.forEach(t=>t.print(e))},Doe=Nu(),$8e=e=>P8e(Ioe,e),Foe=e=>({[Symbol.iterator](){return this},next:e}),V8e=(e,t)=>Foe(()=>{let n;do n=e.next();while(!n.done&&!t(n.value));return n}),K6=(e,t)=>Foe(()=>{const{done:n,value:o}=e.next();return{done:n,value:n?void 0:t(o)}});class ZN{constructor(t,n){this.clock=t,this.len=n}}class s3{constructor(){this.clients=new Map}}const $oe=(e,t,n)=>t.clients.forEach((o,r)=>{const s=e.doc.store.clients.get(r);for(let i=0;i{let n=0,o=e.length-1;for(;n<=o;){const r=La((n+o)/2),s=e[r],i=s.clock;if(i<=t){if(t{const n=e.clients.get(t.client);return n!==void 0&&H8e(n,t.clock)!==null},QN=e=>{e.clients.forEach(t=>{t.sort((r,s)=>r.clock-s.clock);let n,o;for(n=1,o=1;n=s.clock?r.len=bf(r.len,s.clock+s.len-r.clock):(o{const t=new s3;for(let n=0;n{if(!t.clients.has(r)){const s=o.slice();for(let i=n+1;i{Vr(e.clients,t,()=>[]).push(new ZN(n,o))},X8e=()=>new s3,G8e=e=>{const t=X8e();return e.clients.forEach((n,o)=>{const r=[];for(let s=0;s0&&t.clients.set(o,r)}),t},zh=(e,t)=>{Rt(e.restEncoder,t.clients.size),Yc(t.clients.entries()).sort((n,o)=>o[0]-n[0]).forEach(([n,o])=>{e.resetDsCurVal(),Rt(e.restEncoder,n);const r=o.length;Rt(e.restEncoder,r);for(let s=0;s{const t=new s3,n=Zt(e.restDecoder);for(let o=0;o0){const i=Vr(t.clients,r,()=>[]);for(let c=0;c{const o=new s3,r=Zt(e.restDecoder);for(let s=0;s0){const s=new jp;return Rt(s.restEncoder,0),zh(s,o),s.toUint8Array()}return null},Hoe=voe;class Oh extends TRe{constructor({guid:t=xoe(),collectionid:n=null,gc:o=!0,gcFilter:r=()=>!0,meta:s=null,autoLoad:i=!1,shouldLoad:c=!0}={}){super(),this.gc=o,this.gcFilter=r,this.clientID=Hoe(),this.guid=t,this.collectionid=n,this.share=new Map,this.store=new tre,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=c,this.autoLoad=i,this.meta=s,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=Cb(u=>{this.on("load",()=>{this.isLoaded=!0,u(this)})});const l=()=>Cb(u=>{const d=p=>{(p===void 0||p===!0)&&(this.off("sync",d),u())};this.on("sync",d)});this.on("sync",u=>{u===!1&&this.isSynced&&(this.whenSynced=l()),this.isSynced=u===void 0||u===!0,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=l()}load(){const t=this._item;t!==null&&!this.shouldLoad&&u0(t.parent.doc,n=>{n.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Yc(this.subdocs).map(t=>t.guid))}transact(t,n=null){return u0(this,t,n)}get(t,n=dr){const o=Vr(this.share,t,()=>{const s=new n;return s._integrate(this,null),s}),r=o.constructor;if(n!==dr&&r!==n)if(r===dr){const s=new n;s._map=o._map,o._map.forEach(i=>{for(;i!==null;i=i.left)i.parent=s}),s._start=o._start;for(let i=s._start;i!==null;i=i.right)i.parent=s;return s._length=o._length,this.share.set(t,s),s._integrate(this,null),s}else throw new Error(`Type with the name ${t} has already been defined with a different constructor`);return o}getArray(t=""){return this.get(t,Q2)}getText(t=""){return this.get(t,Eb)}getMap(t=""){return this.get(t,Tb)}getXmlElement(t=""){return this.get(t,Wb)}getXmlFragment(t=""){return this.get(t,Pp)}toJSON(){const t={};return this.share.forEach((n,o)=>{t[o]=n.toJSON()}),t}destroy(){this.isDestroyed=!0,Yc(this.subdocs).forEach(n=>n.destroy());const t=this._item;if(t!==null){this._item=null;const n=t.content;n.doc=new Oh({guid:this.guid,...n.opts,shouldLoad:!1}),n.doc._item=t,u0(t.parent.doc,o=>{const r=n.doc;t.deleted||o.subdocsAdded.add(r),o.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class Uoe{constructor(t){this.restDecoder=t}resetDsCurVal(){}readDsClock(){return Zt(this.restDecoder)}readDsLen(){return Zt(this.restDecoder)}}class Xoe extends Uoe{readLeftID(){return An(Zt(this.restDecoder),Zt(this.restDecoder))}readRightID(){return An(Zt(this.restDecoder),Zt(this.restDecoder))}readClient(){return Zt(this.restDecoder)}readInfo(){return Bp(this.restDecoder)}readString(){return Bc(this.restDecoder)}readParentInfo(){return Zt(this.restDecoder)===1}readTypeRef(){return Zt(this.restDecoder)}readLen(){return Zt(this.restDecoder)}readAny(){return Sb(this.restDecoder)}readBuf(){return W8e(Bo(this.restDecoder))}readJSON(){return JSON.parse(Bc(this.restDecoder))}readKey(){return Bc(this.restDecoder)}}class K8e{constructor(t){this.dsCurrVal=0,this.restDecoder=t}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=Zt(this.restDecoder),this.dsCurrVal}readDsLen(){const t=Zt(this.restDecoder)+1;return this.dsCurrVal+=t,t}}class Rb extends K8e{constructor(t){super(t),this.keys=[],Zt(t),this.keyClockDecoder=new X6(Bo(t)),this.clientDecoder=new e4(Bo(t)),this.leftClockDecoder=new X6(Bo(t)),this.rightClockDecoder=new X6(Bo(t)),this.infoDecoder=new hV(Bo(t),Bp),this.stringDecoder=new a8e(Bo(t)),this.parentInfoDecoder=new hV(Bo(t),Bp),this.typeRefDecoder=new e4(Bo(t)),this.lenDecoder=new e4(Bo(t))}readLeftID(){return new Z2(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new Z2(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return Sb(this.restDecoder)}readBuf(){return Bo(this.restDecoder)}readJSON(){return Sb(this.restDecoder)}readKey(){const t=this.keyClockDecoder.read();if(t{o=bf(o,t[0].id.clock);const r=Pa(t,o);Rt(e.restEncoder,t.length-r),e.writeClient(n),Rt(e.restEncoder,o);const s=t[r];s.write(e,o-s.id.clock);for(let i=r+1;i{const o=new Map;n.forEach((r,s)=>{Fo(t,s)>r&&o.set(s,r)}),Hx(t).forEach((r,s)=>{n.has(s)||o.set(s,0)}),Rt(e.restEncoder,o.size),Yc(o.entries()).sort((r,s)=>s[0]-r[0]).forEach(([r,s])=>{Y8e(e,t.clients.get(r),r,s)})},Z8e=(e,t)=>{const n=E1(),o=Zt(e.restDecoder);for(let r=0;r{const o=[];let r=Yc(n.keys()).sort((b,h)=>b-h);if(r.length===0)return null;const s=()=>{if(r.length===0)return null;let b=n.get(r[r.length-1]);for(;b.refs.length===b.i;)if(r.pop(),r.length>0)b=n.get(r[r.length-1]);else return null;return b};let i=s();if(i===null)return null;const c=new tre,l=new Map,u=(b,h)=>{const g=l.get(b);(g==null||g>h)&&l.set(b,h)};let d=i.refs[i.i++];const p=new Map,f=()=>{for(const b of o){const h=b.id.client,g=n.get(h);g?(g.i--,c.clients.set(h,g.refs.slice(g.i)),n.delete(h),g.i=0,g.refs=[]):c.clients.set(h,[b]),r=r.filter(z=>z!==h)}o.length=0};for(;;){if(d.constructor!==Ls){const h=Vr(p,d.id.client,()=>Fo(t,d.id.client))-d.id.clock;if(h<0)o.push(d),u(d.id.client,d.id.clock-1),f();else{const g=d.getMissing(e,t);if(g!==null){o.push(d);const z=n.get(g)||{refs:[],i:0};if(z.refs.length===z.i)u(g,Fo(t,g)),f();else{d=z.refs[z.i++];continue}}else(h===0||h0)d=o.pop();else if(i!==null&&i.i0){const b=new jp;return eB(b,c,new Map),Rt(b.restEncoder,0),{missing:l,update:b.toUint8Array()}}return null},J8e=(e,t)=>eB(e,t.doc.store,t.beforeState),eTe=(e,t,n,o=new Rb(e))=>u0(t,r=>{r.local=!1;let s=!1;const i=r.doc,c=i.store,l=Z8e(o,i),u=Q8e(r,c,l),d=c.pendingStructs;if(d){for(const[f,b]of d.missing)if(bb)&&d.missing.set(f,b)}d.update=yv([d.update,u.update])}}else c.pendingStructs=u;const p=yV(o,r,c);if(c.pendingDs){const f=new Rb(Ya(c.pendingDs));Zt(f.restDecoder);const b=yV(f,r,c);p&&b?c.pendingDs=yv([p,b]):c.pendingDs=p||b}else c.pendingDs=p;if(s){const f=c.pendingStructs.update;c.pendingStructs=null,Yoe(r.doc,f)}},n,!1),Yoe=(e,t,n,o=Rb)=>{const r=Ya(t);eTe(r,e,n,new o(r))},Zoe=(e,t,n)=>Yoe(e,t,n,Xoe),tTe=(e,t,n=new Map)=>{eB(e,t.store,n),zh(e,G8e(t.store))},nTe=(e,t=new Uint8Array([0]),n=new jp)=>{const o=Qoe(t);tTe(n,e,o);const r=[n.toUint8Array()];if(e.store.pendingDs&&r.push(e.store.pendingDs),e.store.pendingStructs&&r.push(gTe(e.store.pendingStructs.update,t)),r.length>1){if(n.constructor===i3)return hTe(r.map((s,i)=>i===0?s:zTe(s)));if(n.constructor===jp)return yv(r)}return r[0]},tB=(e,t)=>nTe(e,t,new i3),oTe=e=>{const t=new Map,n=Zt(e.restDecoder);for(let o=0;ooTe(new Uoe(Ya(e))),Joe=(e,t)=>(Rt(e.restEncoder,t.size),Yc(t.entries()).sort((n,o)=>o[0]-n[0]).forEach(([n,o])=>{Rt(e.restEncoder,n),Rt(e.restEncoder,o)}),e),rTe=(e,t)=>Joe(e,Hx(t.store)),sTe=(e,t=new Koe)=>(e instanceof Map?Joe(t,e):rTe(t,e),t.toUint8Array()),iTe=e=>sTe(e,new Goe);class aTe{constructor(){this.l=[]}}const AV=()=>new aTe,vV=(e,t)=>e.l.push(t),xV=(e,t)=>{const n=e.l,o=n.length;e.l=n.filter(r=>t!==r),o===e.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},ere=(e,t,n)=>GN(e.l,[t,n]);class Z2{constructor(t,n){this.client=t,this.clock=n}}const hy=(e,t)=>e===t||e!==null&&t!==null&&e.client===t.client&&e.clock===t.clock,An=(e,t)=>new Z2(e,t),cTe=e=>{for(const[t,n]of e.doc.share.entries())if(n===e)return t;throw ja()},i2=(e,t)=>t===void 0?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!Voe(t.ds,e.id),u8=(e,t)=>{const n=Vr(e.meta,u8,Nu),o=e.doc.store;n.has(t)||(t.sv.forEach((r,s)=>{r{}),n.add(t))};class tre{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const Hx=e=>{const t=new Map;return e.clients.forEach((n,o)=>{const r=n[n.length-1];t.set(o,r.id.clock+r.length)}),t},Fo=(e,t)=>{const n=e.clients.get(t);if(n===void 0)return 0;const o=n[n.length-1];return o.id.clock+o.length},nre=(e,t)=>{let n=e.clients.get(t.id.client);if(n===void 0)n=[],e.clients.set(t.id.client,n);else{const o=n[n.length-1];if(o.id.clock+o.length!==t.id.clock)throw ja()}n.push(t)},Pa=(e,t)=>{let n=0,o=e.length-1,r=e[o],s=r.id.clock;if(s===t)return o;let i=La(t/(s+r.length-1)*o);for(;n<=o;){if(r=e[i],s=r.id.clock,s<=t){if(t{const n=e.clients.get(t.client);return n[Pa(n,t.clock)]},Y6=lTe,d8=(e,t,n)=>{const o=Pa(t,n),r=t[o];return r.id.clock{const n=e.doc.store.clients.get(t.client);return n[d8(e,n,t.clock)]},_V=(e,t,n)=>{const o=t.clients.get(n.client),r=Pa(o,n.clock),s=o[r];return n.clock!==s.id.clock+s.length-1&&s.constructor!==Bs&&o.splice(r+1,0,kv(e,s,n.clock-s.id.clock+1)),s},uTe=(e,t,n)=>{const o=e.clients.get(t.id.client);o[Pa(o,t.id.clock)]=n},ore=(e,t,n,o,r)=>{if(o===0)return;const s=n+o;let i=d8(e,t,n),c;do c=t[i++],st.deleteSet.clients.size===0&&!CRe(t.afterState,(n,o)=>t.beforeState.get(o)!==n)?!1:(QN(t.deleteSet),J8e(e,t),zh(e,t.deleteSet),!0),kV=(e,t,n)=>{const o=t._item;(o===null||o.id.clock<(e.beforeState.get(o.id.client)||0)&&!o.deleted)&&Vr(e.changed,t,Nu).add(n)},t4=(e,t)=>{let n=e[t],o=e[t-1],r=t;for(;r>0;n=o,o=e[--r-1]){if(o.deleted===n.deleted&&o.constructor===n.constructor&&o.mergeWith(n)){n instanceof Wr&&n.parentSub!==null&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,o);continue}break}const s=t-r;return s&&e.splice(t+1-s,s),s},pTe=(e,t,n)=>{for(const[o,r]of e.clients.entries()){const s=t.clients.get(o);for(let i=r.length-1;i>=0;i--){const c=r[i],l=c.clock+c.len;for(let u=Pa(s,c.clock),d=s[u];u{e.clients.forEach((n,o)=>{const r=t.clients.get(o);for(let s=n.length-1;s>=0;s--){const i=n[s],c=DN(r.length-1,1+Pa(r,i.clock+i.len-1));for(let l=c,u=r[l];l>0&&u.id.clock>=i.clock;u=r[l])l-=1+t4(r,l)}})},rre=(e,t)=>{if(tc.push(()=>{(u._item===null||!u._item.deleted)&&u._callObserver(n,l)})),c.push(()=>{n.changedParentTypes.forEach((l,u)=>{u._dEH.l.length>0&&(u._item===null||!u._item.deleted)&&(l=l.filter(d=>d.target._item===null||!d.target._item.deleted),l.forEach(d=>{d.currentTarget=u,d._path=null}),l.sort((d,p)=>d.path.length-p.path.length),ere(u._dEH,l,n))})}),c.push(()=>o.emit("afterTransaction",[n,o])),GN(c,[]),n._needFormattingCleanup&&ETe(n)}finally{o.gc&&pTe(s,r,o.gcFilter),fTe(s,r),n.afterState.forEach((d,p)=>{const f=n.beforeState.get(p)||0;if(f!==d){const b=r.clients.get(p),h=bf(Pa(b,f),1);for(let g=b.length-1;g>=h;)g-=1+t4(b,g)}});for(let d=i.length-1;d>=0;d--){const{client:p,clock:f}=i[d].id,b=r.clients.get(p),h=Pa(b,f);h+11||h>0&&t4(b,h)}if(!n.local&&n.afterState.get(o.clientID)!==n.beforeState.get(o.clientID)&&(Ioe($x,Fs,"[yjs] ",Lp,Loe,"Changed the client-id because another client seems to be using it."),o.clientID=Hoe()),o.emit("afterTransactionCleanup",[n,o]),o._observers.has("update")){const d=new i3;wV(d,n)&&o.emit("update",[d.toUint8Array(),n.origin,o,n])}if(o._observers.has("updateV2")){const d=new jp;wV(d,n)&&o.emit("updateV2",[d.toUint8Array(),n.origin,o,n])}const{subdocsAdded:c,subdocsLoaded:l,subdocsRemoved:u}=n;(c.size>0||u.size>0||l.size>0)&&(c.forEach(d=>{d.clientID=o.clientID,d.collectionid==null&&(d.collectionid=o.collectionid),o.subdocs.add(d)}),u.forEach(d=>o.subdocs.delete(d)),o.emit("subdocs",[{loaded:l,added:c,removed:u},o,n]),u.forEach(d=>d.destroy())),e.length<=t+1?(o._transactionCleanups=[],o.emit("afterAllTransactions",[o,e])):rre(e,t+1)}}},u0=(e,t,n=null,o=!0)=>{const r=e._transactionCleanups;let s=!1,i=null;e._transaction===null&&(s=!0,e._transaction=new dTe(e,n,o),r.push(e._transaction),r.length===1&&e.emit("beforeAllTransactions",[e]),e.emit("beforeTransaction",[e._transaction,e]));try{i=t(e._transaction)}finally{if(s){const c=e._transaction===r[0];e._transaction=null,c&&rre(r,0)}}return i};function*bTe(e){const t=Zt(e.restDecoder);for(let n=0;nyv(e,Xoe,i3),mTe=(e,t)=>{if(e.constructor===Bs){const{client:n,clock:o}=e.id;return new Bs(An(n,o+t),e.length-t)}else if(e.constructor===Ls){const{client:n,clock:o}=e.id;return new Ls(An(n,o+t),e.length-t)}else{const n=e,{client:o,clock:r}=n.id;return new Wr(An(o,r+t),null,An(o,r+t-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(t))}},yv=(e,t=Rb,n=jp)=>{if(e.length===1)return e[0];const o=e.map(d=>new t(Ya(d)));let r=o.map(d=>new nB(d,!0)),s=null;const i=new n,c=new oB(i);for(;r=r.filter(f=>f.curr!==null),r.sort((f,b)=>{if(f.curr.id.client===b.curr.id.client){const h=f.curr.id.clock-b.curr.id.clock;return h===0?f.curr.constructor===b.curr.constructor?0:f.curr.constructor===Ls?1:-1:h}else return b.curr.id.client-f.curr.id.client}),r.length!==0;){const d=r[0],p=d.curr.id.client;if(s!==null){let f=d.curr,b=!1;for(;f!==null&&f.id.clock+f.length<=s.struct.id.clock+s.struct.length&&f.id.client>=s.struct.id.client;)f=d.next(),b=!0;if(f===null||f.id.client!==p||b&&f.id.clock>s.struct.id.clock+s.struct.length)continue;if(p!==s.struct.id.client)Kl(c,s.struct,s.offset),s={struct:f,offset:0},d.next();else if(s.struct.id.clock+s.struct.length0&&(s.struct.constructor===Ls?s.struct.length-=h:f=mTe(f,h)),s.struct.mergeWith(f)||(Kl(c,s.struct,s.offset),s={struct:f,offset:0},d.next())}}else s={struct:d.curr,offset:0},d.next();for(let f=d.curr;f!==null&&f.id.client===p&&f.id.clock===s.struct.id.clock+s.struct.length&&f.constructor!==Ls;f=d.next())Kl(c,s.struct,s.offset),s={struct:f,offset:0}}s!==null&&(Kl(c,s.struct,s.offset),s=null),rB(c);const l=o.map(d=>JN(d)),u=U8e(l);return zh(i,u),i.toUint8Array()},gTe=(e,t,n=Rb,o=jp)=>{const r=Qoe(t),s=new o,i=new oB(s),c=new n(Ya(e)),l=new nB(c,!1);for(;l.curr;){const d=l.curr,p=d.id.client,f=r.get(p)||0;if(l.curr.constructor===Ls){l.next();continue}if(d.id.clock+d.length>f)for(Kl(i,d,bf(f-d.id.clock,0)),l.next();l.curr&&l.curr.id.client===p;)Kl(i,l.curr,0),l.next();else for(;l.curr&&l.curr.id.client===p&&l.curr.id.clock+l.curr.length<=f;)l.next()}rB(i);const u=JN(c);return zh(s,u),s.toUint8Array()},sre=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:$0(e.encoder.restEncoder)}),e.encoder.restEncoder=Po(),e.written=0)},Kl=(e,t,n)=>{e.written>0&&e.currClient!==t.id.client&&sre(e),e.written===0&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),Rt(e.encoder.restEncoder,t.id.clock+n)),t.write(e.encoder,n),e.written++},rB=e=>{sre(e);const t=e.encoder.restEncoder;Rt(t,e.clientStructs.length);for(let n=0;n{const r=new n(Ya(e)),s=new nB(r,!1),i=new o,c=new oB(i);for(let u=s.curr;u!==null;u=s.next())Kl(c,t(u),0);rB(c);const l=JN(r);return zh(i,l),i.toUint8Array()},zTe=e=>MTe(e,A8e,Rb,i3),SV="You must not compute changes after the event-handler fired.";class Ux{constructor(t,n){this.target=t,this.currentTarget=t,this.transaction=n,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=OTe(this.currentTarget,this.target))}deletes(t){return Voe(this.transaction.deleteSet,t.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw Ci(SV);const t=new Map,n=this.target;this.transaction.changed.get(n).forEach(r=>{if(r!==null){const s=n._map.get(r);let i,c;if(this.adds(s)){let l=s.left;for(;l!==null&&this.adds(l);)l=l.left;if(this.deletes(s))if(l!==null&&this.deletes(l))i="delete",c=$6(l.content.getContent());else return;else l!==null&&this.deletes(l)?(i="update",c=$6(l.content.getContent())):(i="add",c=void 0)}else if(this.deletes(s))i="delete",c=$6(s.content.getContent());else return;t.set(r,{action:i,oldValue:c})}}),this._keys=t}return this._keys}get delta(){return this.changes.delta}adds(t){return t.id.clock>=(this.transaction.beforeState.get(t.id.client)||0)}get changes(){let t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Ci(SV);const n=this.target,o=Nu(),r=Nu(),s=[];if(t={added:o,deleted:r,delta:s,keys:this.keys},this.transaction.changed.get(n).has(null)){let c=null;const l=()=>{c&&s.push(c)};for(let u=n._start;u!==null;u=u.right)u.deleted?this.deletes(u)&&!this.adds(u)&&((c===null||c.delete===void 0)&&(l(),c={delete:0}),c.delete+=u.length,r.add(u)):this.adds(u)?((c===null||c.insert===void 0)&&(l(),c={insert:[]}),c.insert=c.insert.concat(u.content.getContent()),o.add(u)):((c===null||c.retain===void 0)&&(l(),c={retain:0}),c.retain+=u.length);c!==null&&c.retain===void 0&&l()}this._changes=t}return t}}const OTe=(e,t)=>{const n=[];for(;t._item!==null&&t!==e;){if(t._item.parentSub!==null)n.unshift(t._item.parentSub);else{let o=0,r=t._item.parent._start;for(;r!==t._item&&r!==null;)!r.deleted&&r.countable&&(o+=r.length),r=r.right;n.unshift(o)}t=t._item.parent}return n},Pr=()=>{F8e("Invalid access: Add Yjs type to a document before reading data.")},ire=80;let sB=0;class yTe{constructor(t,n){t.marker=!0,this.p=t,this.index=n,this.timestamp=sB++}}const ATe=e=>{e.timestamp=sB++},are=(e,t,n)=>{e.p.marker=!1,e.p=t,t.marker=!0,e.index=n,e.timestamp=sB++},vTe=(e,t,n)=>{if(e.length>=ire){const o=e.reduce((r,s)=>r.timestamp{if(e._start===null||t===0||e._searchMarker===null)return null;const n=e._searchMarker.length===0?null:e._searchMarker.reduce((s,i)=>QA(t-s.index)t;)o=o.left,!o.deleted&&o.countable&&(r-=o.length);for(;o.left!==null&&o.left.id.client===o.id.client&&o.left.id.clock+o.left.length===o.id.clock;)o=o.left,!o.deleted&&o.countable&&(r-=o.length);return n!==null&&QA(n.index-r){for(let o=e.length-1;o>=0;o--){const r=e[o];if(n>0){let s=r.p;for(s.marker=!1;s&&(s.deleted||!s.countable);)s=s.left,s&&!s.deleted&&s.countable&&(r.index-=s.length);if(s===null||s.marker===!0){e.splice(o,1);continue}r.p=s,s.marker=!0}(t0&&t===r.index)&&(r.index=bf(t,r.index+n))}},Gx=(e,t,n)=>{const o=e,r=t.changedParentTypes;for(;Vr(r,e,()=>[]).push(n),e._item!==null;)e=e._item.parent;ere(o._eH,n,t)};class dr{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=AV(),this._dEH=AV(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(t,n){this.doc=t,this._item=n}_copy(){throw Sa()}clone(){throw Sa()}_write(t){}get _first(){let t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}_callObserver(t,n){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(t){vV(this._eH,t)}observeDeep(t){vV(this._dEH,t)}unobserve(t){xV(this._eH,t)}unobserveDeep(t){xV(this._dEH,t)}toJSON(){}}const cre=(e,t,n)=>{e.doc??Pr(),t<0&&(t=e._length+t),n<0&&(n=e._length+n);let o=n-t;const r=[];let s=e._start;for(;s!==null&&o>0;){if(s.countable&&!s.deleted){const i=s.content.getContent();if(i.length<=t)t-=i.length;else{for(let c=t;c0;c++)r.push(i[c]),o--;t=0}}s=s.right}return r},lre=e=>{e.doc??Pr();const t=[];let n=e._start;for(;n!==null;){if(n.countable&&!n.deleted){const o=n.content.getContent();for(let r=0;r{let n=0,o=e._start;for(e.doc??Pr();o!==null;){if(o.countable&&!o.deleted){const r=o.content.getContent();for(let s=0;s{const n=[];return NM(e,(o,r)=>{n.push(t(o,r,e))}),n},xTe=e=>{let t=e._start,n=null,o=0;return{[Symbol.iterator](){return this},next:()=>{if(n===null){for(;t!==null&&t.deleted;)t=t.right;if(t===null)return{done:!0,value:void 0};n=t.content.getContent(),o=0,t=t.right}const r=n[o++];return n.length<=o&&(n=null),{done:!1,value:r}}}},dre=(e,t)=>{e.doc??Pr();const n=Xx(e,t);let o=e._start;for(n!==null&&(o=n.p,t-=n.index);o!==null;o=o.right)if(!o.deleted&&o.countable){if(t{let r=n;const s=e.doc,i=s.clientID,c=s.store,l=n===null?t._start:n.right;let u=[];const d=()=>{u.length>0&&(r=new Wr(An(i,Fo(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new Ip(u)),r.integrate(e,0),u=[])};o.forEach(p=>{if(p===null)u.push(p);else switch(p.constructor){case Number:case Object:case Boolean:case Array:case String:u.push(p);break;default:switch(d(),p.constructor){case Uint8Array:case ArrayBuffer:r=new Wr(An(i,Fo(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new a3(new Uint8Array(p))),r.integrate(e,0);break;case Oh:r=new Wr(An(i,Fo(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new c3(p)),r.integrate(e,0);break;default:if(p instanceof dr)r=new Wr(An(i,Fo(c,i)),r,r&&r.lastId,l,l&&l.id,t,null,new hl(p)),r.integrate(e,0);else throw new Error("Unexpected content type in insert operation")}}}),d()},pre=()=>Ci("Length exceeded!"),fre=(e,t,n,o)=>{if(n>t._length)throw pre();if(n===0)return t._searchMarker&&WM(t._searchMarker,n,o.length),Av(e,t,null,o);const r=n,s=Xx(t,n);let i=t._start;for(s!==null&&(i=s.p,n-=s.index,n===0&&(i=i.prev,n+=i&&i.countable&&!i.deleted?i.length:0));i!==null;i=i.right)if(!i.deleted&&i.countable){if(n<=i.length){n{let r=(t._searchMarker||[]).reduce((s,i)=>i.index>s.index?i:s,{index:0,p:t._start}).p;if(r)for(;r.right;)r=r.right;return Av(e,t,r,n)},bre=(e,t,n,o)=>{if(o===0)return;const r=n,s=o,i=Xx(t,n);let c=t._start;for(i!==null&&(c=i.p,n-=i.index);c!==null&&n>0;c=c.right)!c.deleted&&c.countable&&(n0&&c!==null;)c.deleted||(o0)throw pre();t._searchMarker&&WM(t._searchMarker,r,-s+o)},vv=(e,t,n)=>{const o=t._map.get(n);o!==void 0&&o.delete(e)},iB=(e,t,n,o)=>{const r=t._map.get(n)||null,s=e.doc,i=s.clientID;let c;if(o==null)c=new Ip([o]);else switch(o.constructor){case Number:case Object:case Boolean:case Array:case String:c=new Ip([o]);break;case Uint8Array:c=new a3(o);break;case Oh:c=new c3(o);break;default:if(o instanceof dr)c=new hl(o);else throw new Error("Unexpected content type")}new Wr(An(i,Fo(s.store,i)),r,r&&r.lastId,null,null,t,n,c).integrate(e,0)},aB=(e,t)=>{e.doc??Pr();const n=e._map.get(t);return n!==void 0&&!n.deleted?n.content.getContent()[n.length-1]:void 0},hre=e=>{const t={};return e.doc??Pr(),e._map.forEach((n,o)=>{n.deleted||(t[o]=n.content.getContent()[n.length-1])}),t},mre=(e,t)=>{e.doc??Pr();const n=e._map.get(t);return n!==void 0&&!n.deleted},wTe=(e,t)=>{const n={};return e._map.forEach((o,r)=>{let s=o;for(;s!==null&&(!t.sv.has(s.id.client)||s.id.clock>=(t.sv.get(s.id.client)||0));)s=s.left;s!==null&&i2(s,t)&&(n[r]=s.content.getContent()[s.length-1])}),n},my=e=>(e.doc??Pr(),V8e(e._map.entries(),t=>!t[1].deleted));class kTe extends Ux{}class Q2 extends dr{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(t){const n=new Q2;return n.push(t),n}_integrate(t,n){super._integrate(t,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Q2}clone(){const t=new Q2;return t.insert(0,this.toArray().map(n=>n instanceof dr?n.clone():n)),t}get length(){return this.doc??Pr(),this._length}_callObserver(t,n){super._callObserver(t,n),Gx(this,t,new kTe(this,t))}insert(t,n){this.doc!==null?u0(this.doc,o=>{fre(o,this,t,n)}):this._prelimContent.splice(t,0,...n)}push(t){this.doc!==null?u0(this.doc,n=>{_Te(n,this,t)}):this._prelimContent.push(...t)}unshift(t){this.insert(0,t)}delete(t,n=1){this.doc!==null?u0(this.doc,o=>{bre(o,this,t,n)}):this._prelimContent.splice(t,n)}get(t){return dre(this,t)}toArray(){return lre(this)}slice(t=0,n=this.length){return cre(this,t,n)}toJSON(){return this.map(t=>t instanceof dr?t.toJSON():t)}map(t){return ure(this,t)}forEach(t){NM(this,t)}[Symbol.iterator](){return xTe(this)}_write(t){t.writeTypeRef(QTe)}}const STe=e=>new Q2;class CTe extends Ux{constructor(t,n,o){super(t,n),this.keysChanged=o}}class Tb extends dr{constructor(t){super(),this._prelimContent=null,t===void 0?this._prelimContent=new Map:this._prelimContent=new Map(t)}_integrate(t,n){super._integrate(t,n),this._prelimContent.forEach((o,r)=>{this.set(r,o)}),this._prelimContent=null}_copy(){return new Tb}clone(){const t=new Tb;return this.forEach((n,o)=>{t.set(o,n instanceof dr?n.clone():n)}),t}_callObserver(t,n){Gx(this,t,new CTe(this,t,n))}toJSON(){this.doc??Pr();const t={};return this._map.forEach((n,o)=>{if(!n.deleted){const r=n.content.getContent()[n.length-1];t[o]=r instanceof dr?r.toJSON():r}}),t}get size(){return[...my(this)].length}keys(){return K6(my(this),t=>t[0])}values(){return K6(my(this),t=>t[1].content.getContent()[t[1].length-1])}entries(){return K6(my(this),t=>[t[0],t[1].content.getContent()[t[1].length-1]])}forEach(t){this.doc??Pr(),this._map.forEach((n,o)=>{n.deleted||t(n.content.getContent()[n.length-1],o,this)})}[Symbol.iterator](){return this.entries()}delete(t){this.doc!==null?u0(this.doc,n=>{vv(n,this,t)}):this._prelimContent.delete(t)}set(t,n){return this.doc!==null?u0(this.doc,o=>{iB(o,this,t,n)}):this._prelimContent.set(t,n),n}get(t){return aB(this,t)}has(t){return mre(this,t)}clear(){this.doc!==null?u0(this.doc,t=>{this.forEach(function(n,o,r){vv(t,r,o)})}):this._prelimContent.clear()}_write(t){t.writeTypeRef(JTe)}}const qTe=e=>new Tb,nu=(e,t)=>e===t||typeof e=="object"&&typeof t=="object"&&e&&t&&z8e(e,t);class p8{constructor(t,n,o,r){this.left=t,this.right=n,this.index=o,this.currentAttributes=r}forward(){switch(this.right===null&&ja(),this.right.content.constructor){case To:this.right.deleted||yh(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const CV=(e,t,n)=>{for(;t.right!==null&&n>0;){switch(t.right.content.constructor){case To:t.right.deleted||yh(t.currentAttributes,t.right.content);break;default:t.right.deleted||(n{const r=new Map,s=o?Xx(t,n):null;if(s){const i=new p8(s.p.left,s.p,s.index,r);return CV(e,i,n-s.index)}else{const i=new p8(null,t._start,0,r);return CV(e,i,n)}},gre=(e,t,n,o)=>{for(;n.right!==null&&(n.right.deleted===!0||n.right.content.constructor===To&&nu(o.get(n.right.content.key),n.right.content.value));)n.right.deleted||o.delete(n.right.content.key),n.forward();const r=e.doc,s=r.clientID;o.forEach((i,c)=>{const l=n.left,u=n.right,d=new Wr(An(s,Fo(r.store,s)),l,l&&l.lastId,u,u&&u.id,t,null,new To(c,i));d.integrate(e,0),n.right=d,n.forward()})},yh=(e,t)=>{const{key:n,value:o}=t;o===null?e.delete(n):e.set(n,o)},Mre=(e,t)=>{for(;e.right!==null;){if(!(e.right.deleted||e.right.content.constructor===To&&nu(t[e.right.content.key]??null,e.right.content.value)))break;e.forward()}},zre=(e,t,n,o)=>{const r=e.doc,s=r.clientID,i=new Map;for(const c in o){const l=o[c],u=n.currentAttributes.get(c)??null;if(!nu(u,l)){i.set(c,u);const{left:d,right:p}=n;n.right=new Wr(An(s,Fo(r.store,s)),d,d&&d.lastId,p,p&&p.id,t,null,new To(c,l)),n.right.integrate(e,0),n.forward()}}return i},Z6=(e,t,n,o,r)=>{n.currentAttributes.forEach((f,b)=>{r[b]===void 0&&(r[b]=null)});const s=e.doc,i=s.clientID;Mre(n,r);const c=zre(e,t,n,r),l=o.constructor===String?new Ia(o):o instanceof dr?new hl(o):new hf(o);let{left:u,right:d,index:p}=n;t._searchMarker&&WM(t._searchMarker,n.index,l.getLength()),d=new Wr(An(i,Fo(s.store,i)),u,u&&u.lastId,d,d&&d.id,t,null,l),d.integrate(e,0),n.right=d,n.index=p,n.forward(),gre(e,t,n,c)},qV=(e,t,n,o,r)=>{const s=e.doc,i=s.clientID;Mre(n,r);const c=zre(e,t,n,r);e:for(;n.right!==null&&(o>0||c.size>0&&(n.right.deleted||n.right.content.constructor===To));){if(!n.right.deleted)switch(n.right.content.constructor){case To:{const{key:l,value:u}=n.right.content,d=r[l];if(d!==void 0){if(nu(d,u))c.delete(l);else{if(o===0)break e;c.set(l,u)}n.right.delete(e)}else n.currentAttributes.set(l,u);break}default:o0){let l="";for(;o>0;o--)l+=` -`;n.right=new Wr(An(i,Fo(s.store,i)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,t,null,new Ia(l)),n.right.integrate(e,0),n.forward()}gre(e,t,n,c)},Ore=(e,t,n,o,r)=>{let s=t;const i=E1();for(;s&&(!s.countable||s.deleted);){if(!s.deleted&&s.content.constructor===To){const u=s.content;i.set(u.key,u)}s=s.right}let c=0,l=!1;for(;t!==s;){if(n===t&&(l=!0),!t.deleted){const u=t.content;switch(u.constructor){case To:{const{key:d,value:p}=u,f=o.get(d)??null;(i.get(d)!==u||f===p)&&(t.delete(e),c++,!l&&(r.get(d)??null)===p&&f!==p&&(f===null?r.delete(d):r.set(d,f))),!l&&!t.deleted&&yh(r,u);break}}}t=t.right}return c},RTe=(e,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const n=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===To){const o=t.content.key;n.has(o)?t.delete(e):n.add(o)}t=t.left}},TTe=e=>{let t=0;return u0(e.doc,n=>{let o=e._start,r=e._start,s=E1();const i=s8(s);for(;r;){if(r.deleted===!1)switch(r.content.constructor){case To:yh(i,r.content);break;default:t+=Ore(n,o,r,s,i),s=s8(i),o=r;break}r=r.right}}),t},ETe=e=>{const t=new Set,n=e.doc;for(const[o,r]of e.afterState.entries()){const s=e.beforeState.get(o)||0;r!==s&&ore(e,n.store.clients.get(o),s,r,i=>{!i.deleted&&i.content.constructor===To&&i.constructor!==Bs&&t.add(i.parent)})}u0(n,o=>{$oe(e,e.deleteSet,r=>{if(r instanceof Bs||!r.parent._hasFormatting||t.has(r.parent))return;const s=r.parent;r.content.constructor===To?t.add(s):RTe(o,r)});for(const r of t)TTe(r)})},RV=(e,t,n)=>{const o=n,r=s8(t.currentAttributes),s=t.right;for(;n>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case hl:case hf:case Ia:n{r===null?this.childListChanged=!0:this.keysChanged.add(r)})}get changes(){if(this._changes===null){const t={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=t}return this._changes}get delta(){if(this._delta===null){const t=this.target.doc,n=[];u0(t,o=>{const r=new Map,s=new Map;let i=this.target._start,c=null;const l={};let u="",d=0,p=0;const f=()=>{if(c!==null){let b=null;switch(c){case"delete":p>0&&(b={delete:p}),p=0;break;case"insert":(typeof u=="object"||u.length>0)&&(b={insert:u},r.size>0&&(b.attributes={},r.forEach((h,g)=>{h!==null&&(b.attributes[g]=h)}))),u="";break;case"retain":d>0&&(b={retain:d},g8e(l)||(b.attributes=h8e({},l))),d=0;break}b&&n.push(b),c=null}};for(;i!==null;){switch(i.content.constructor){case hl:case hf:this.adds(i)?this.deletes(i)||(f(),c="insert",u=i.content.getContent()[0],f()):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),p+=1):i.deleted||(c!=="retain"&&(f(),c="retain"),d+=1);break;case Ia:this.adds(i)?this.deletes(i)||(c!=="insert"&&(f(),c="insert"),u+=i.content.str):this.deletes(i)?(c!=="delete"&&(f(),c="delete"),p+=i.length):i.deleted||(c!=="retain"&&(f(),c="retain"),d+=i.length);break;case To:{const{key:b,value:h}=i.content;if(this.adds(i)){if(!this.deletes(i)){const g=r.get(b)??null;nu(g,h)?h!==null&&i.delete(o):(c==="retain"&&f(),nu(h,s.get(b)??null)?delete l[b]:l[b]=h)}}else if(this.deletes(i)){s.set(b,h);const g=r.get(b)??null;nu(g,h)||(c==="retain"&&f(),l[b]=g)}else if(!i.deleted){s.set(b,h);const g=l[b];g!==void 0&&(nu(g,h)?g!==null&&i.delete(o):(c==="retain"&&f(),h===null?delete l[b]:l[b]=h))}i.deleted||(c==="insert"&&f(),yh(r,i.content));break}}i=i.right}for(f();n.length>0;){const b=n[n.length-1];if(b.retain!==void 0&&b.attributes===void 0)n.pop();else break}}),this._delta=n}return this._delta}}class Eb extends dr{constructor(t){super(),this._pending=t!==void 0?[()=>this.insert(0,t)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??Pr(),this._length}_integrate(t,n){super._integrate(t,n);try{this._pending.forEach(o=>o())}catch(o){console.error(o)}this._pending=null}_copy(){return new Eb}clone(){const t=new Eb;return t.applyDelta(this.toDelta()),t}_callObserver(t,n){super._callObserver(t,n);const o=new WTe(this,t,n);Gx(this,t,o),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}toString(){this.doc??Pr();let t="",n=this._start;for(;n!==null;)!n.deleted&&n.countable&&n.content.constructor===Ia&&(t+=n.content.str),n=n.right;return t}toJSON(){return this.toString()}applyDelta(t,{sanitize:n=!0}={}){this.doc!==null?u0(this.doc,o=>{const r=new p8(null,this._start,0,new Map);for(let s=0;s0)&&Z6(o,this,r,c,i.attributes||{})}else i.retain!==void 0?qV(o,this,r,i.retain,i.attributes||{}):i.delete!==void 0&&RV(o,r,i.delete)}}):this._pending.push(()=>this.applyDelta(t))}toDelta(t,n,o){this.doc??Pr();const r=[],s=new Map,i=this.doc;let c="",l=this._start;function u(){if(c.length>0){const p={};let f=!1;s.forEach((h,g)=>{f=!0,p[g]=h});const b={insert:c};f&&(b.attributes=p),r.push(b),c=""}}const d=()=>{for(;l!==null;){if(i2(l,t)||n!==void 0&&i2(l,n))switch(l.content.constructor){case Ia:{const p=s.get("ychange");t!==void 0&&!i2(l,t)?(p===void 0||p.user!==l.id.client||p.type!=="removed")&&(u(),s.set("ychange",o?o("removed",l.id):{type:"removed"})):n!==void 0&&!i2(l,n)?(p===void 0||p.user!==l.id.client||p.type!=="added")&&(u(),s.set("ychange",o?o("added",l.id):{type:"added"})):p!==void 0&&(u(),s.delete("ychange")),c+=l.content.str;break}case hl:case hf:{u();const p={insert:l.content.getContent()[0]};if(s.size>0){const f={};p.attributes=f,s.forEach((b,h)=>{f[h]=b})}r.push(p);break}case To:i2(l,t)&&(u(),yh(s,l.content));break}l=l.right}u()};return t||n?u0(i,p=>{t&&u8(p,t),n&&u8(p,n),d()},"cleanup"):d(),r}insert(t,n,o){if(n.length<=0)return;const r=this.doc;r!==null?u0(r,s=>{const i=gy(s,this,t,!o);o||(o={},i.currentAttributes.forEach((c,l)=>{o[l]=c})),Z6(s,this,i,n,o)}):this._pending.push(()=>this.insert(t,n,o))}insertEmbed(t,n,o){const r=this.doc;r!==null?u0(r,s=>{const i=gy(s,this,t,!o);Z6(s,this,i,n,o||{})}):this._pending.push(()=>this.insertEmbed(t,n,o||{}))}delete(t,n){if(n===0)return;const o=this.doc;o!==null?u0(o,r=>{RV(r,gy(r,this,t,!0),n)}):this._pending.push(()=>this.delete(t,n))}format(t,n,o){if(n===0)return;const r=this.doc;r!==null?u0(r,s=>{const i=gy(s,this,t,!1);i.right!==null&&qV(s,this,i,n,o)}):this._pending.push(()=>this.format(t,n,o))}removeAttribute(t){this.doc!==null?u0(this.doc,n=>{vv(n,this,t)}):this._pending.push(()=>this.removeAttribute(t))}setAttribute(t,n){this.doc!==null?u0(this.doc,o=>{iB(o,this,t,n)}):this._pending.push(()=>this.setAttribute(t,n))}getAttribute(t){return aB(this,t)}getAttributes(){return hre(this)}_write(t){t.writeTypeRef(eEe)}}const NTe=e=>new Eb;class Q6{constructor(t,n=()=>!0){this._filter=n,this._root=t,this._currentNode=t._start,this._firstCall=!0,t.doc??Pr()}[Symbol.iterator](){return this}next(){let t=this._currentNode,n=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(n)))do if(n=t.content.type,!t.deleted&&(n.constructor===Wb||n.constructor===Pp)&&n._start!==null)t=n._start;else for(;t!==null;)if(t.right!==null){t=t.right;break}else t.parent===this._root?t=null:t=t.parent._item;while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}class Pp extends dr{constructor(){super(),this._prelimContent=[]}get firstChild(){const t=this._first;return t?t.content.getContent()[0]:null}_integrate(t,n){super._integrate(t,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Pp}clone(){const t=new Pp;return t.insert(0,this.toArray().map(n=>n instanceof dr?n.clone():n)),t}get length(){return this.doc??Pr(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(t){return new Q6(this,t)}querySelector(t){t=t.toUpperCase();const o=new Q6(this,r=>r.nodeName&&r.nodeName.toUpperCase()===t).next();return o.done?null:o.value}querySelectorAll(t){return t=t.toUpperCase(),Yc(new Q6(this,n=>n.nodeName&&n.nodeName.toUpperCase()===t))}_callObserver(t,n){Gx(this,t,new jTe(this,n,t))}toString(){return ure(this,t=>t.toString()).join("")}toJSON(){return this.toString()}toDOM(t=document,n={},o){const r=t.createDocumentFragment();return o!==void 0&&o._createAssociation(r,this),NM(this,s=>{r.insertBefore(s.toDOM(t,n,o),null)}),r}insert(t,n){this.doc!==null?u0(this.doc,o=>{fre(o,this,t,n)}):this._prelimContent.splice(t,0,...n)}insertAfter(t,n){if(this.doc!==null)u0(this.doc,o=>{const r=t&&t instanceof dr?t._item:t;Av(o,this,r,n)});else{const o=this._prelimContent,r=t===null?0:o.findIndex(s=>s===t)+1;if(r===0&&t!==null)throw Ci("Reference item not found");o.splice(r,0,...n)}}delete(t,n=1){this.doc!==null?u0(this.doc,o=>{bre(o,this,t,n)}):this._prelimContent.splice(t,n)}toArray(){return lre(this)}push(t){this.insert(this.length,t)}unshift(t){this.insert(0,t)}get(t){return dre(this,t)}slice(t=0,n=this.length){return cre(this,t,n)}forEach(t){NM(this,t)}_write(t){t.writeTypeRef(nEe)}}const BTe=e=>new Pp;class Wb extends Pp{constructor(t="UNDEFINED"){super(),this.nodeName=t,this._prelimAttrs=new Map}get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_integrate(t,n){super._integrate(t,n),this._prelimAttrs.forEach((o,r)=>{this.setAttribute(r,o)}),this._prelimAttrs=null}_copy(){return new Wb(this.nodeName)}clone(){const t=new Wb(this.nodeName),n=this.getAttributes();return m8e(n,(o,r)=>{typeof o=="string"&&t.setAttribute(r,o)}),t.insert(0,this.toArray().map(o=>o instanceof dr?o.clone():o)),t}toString(){const t=this.getAttributes(),n=[],o=[];for(const c in t)o.push(c);o.sort();const r=o.length;for(let c=0;c0?" "+n.join(" "):"";return`<${s}${i}>${super.toString()}`}removeAttribute(t){this.doc!==null?u0(this.doc,n=>{vv(n,this,t)}):this._prelimAttrs.delete(t)}setAttribute(t,n){this.doc!==null?u0(this.doc,o=>{iB(o,this,t,n)}):this._prelimAttrs.set(t,n)}getAttribute(t){return aB(this,t)}hasAttribute(t){return mre(this,t)}getAttributes(t){return t?wTe(this,t):hre(this)}toDOM(t=document,n={},o){const r=t.createElement(this.nodeName),s=this.getAttributes();for(const i in s){const c=s[i];typeof c=="string"&&r.setAttribute(i,c)}return NM(this,i=>{r.appendChild(i.toDOM(t,n,o))}),o!==void 0&&o._createAssociation(r,this),r}_write(t){t.writeTypeRef(tEe),t.writeKey(this.nodeName)}}const LTe=e=>new Wb(e.readKey());class jTe extends Ux{constructor(t,n,o){super(t,o),this.childListChanged=!1,this.attributesChanged=new Set,n.forEach(r=>{r===null?this.childListChanged=!0:this.attributesChanged.add(r)})}}class xv extends Tb{constructor(t){super(),this.hookName=t}_copy(){return new xv(this.hookName)}clone(){const t=new xv(this.hookName);return this.forEach((n,o)=>{t.set(o,n)}),t}toDOM(t=document,n={},o){const r=n[this.hookName];let s;return r!==void 0?s=r.createDom(this):s=document.createElement(this.hookName),s.setAttribute("data-yjs-hook",this.hookName),o!==void 0&&o._createAssociation(s,this),s}_write(t){t.writeTypeRef(oEe),t.writeKey(this.hookName)}}const PTe=e=>new xv(e.readKey());class _v extends Eb{get nextSibling(){const t=this._item?this._item.next:null;return t?t.content.type:null}get prevSibling(){const t=this._item?this._item.prev:null;return t?t.content.type:null}_copy(){return new _v}clone(){const t=new _v;return t.applyDelta(this.toDelta()),t}toDOM(t=document,n,o){const r=t.createTextNode(this.toString());return o!==void 0&&o._createAssociation(r,this),r}toString(){return this.toDelta().map(t=>{const n=[];for(const r in t.attributes){const s=[];for(const i in t.attributes[r])s.push({key:i,value:t.attributes[r][i]});s.sort((i,c)=>i.keyr.nodeName=0;r--)o+=``;return o}).join("")}toJSON(){return this.toString()}_write(t){t.writeTypeRef(rEe)}}const ITe=e=>new _v;class cB{constructor(t,n){this.id=t,this.length=n}get deleted(){throw Sa()}mergeWith(t){return!1}write(t,n,o){throw Sa()}integrate(t,n){throw Sa()}}const DTe=0;class Bs extends cB{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,n){n>0&&(this.id.clock+=n,this.length-=n),nre(t.doc.store,this)}write(t,n){t.writeInfo(DTe),t.writeLen(this.length-n)}getMissing(t,n){return null}}class a3{constructor(t){this.content=t}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new a3(this.content)}splice(t){throw Sa()}mergeWith(t){return!1}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeBuf(this.content)}getRef(){return 3}}const FTe=e=>new a3(e.readBuf());class BM{constructor(t){this.len=t}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new BM(this.len)}splice(t){const n=new BM(this.len-t);return this.len=t,n}mergeWith(t){return this.len+=t.len,!0}integrate(t,n){Ov(t.deleteSet,n.id.client,n.id.clock,this.len),n.markDeleted()}delete(t){}gc(t){}write(t,n){t.writeLen(this.len-n)}getRef(){return 1}}const $Te=e=>new BM(e.readLen()),yre=(e,t)=>new Oh({guid:e,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class c3{constructor(t){t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;const n={};this.opts=n,t.gc||(n.gc=!1),t.autoLoad&&(n.autoLoad=!0),t.meta!==null&&(n.meta=t.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new c3(yre(this.doc.guid,this.opts))}splice(t){throw Sa()}mergeWith(t){return!1}integrate(t,n){this.doc._item=n,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}gc(t){}write(t,n){t.writeString(this.doc.guid),t.writeAny(this.opts)}getRef(){return 9}}const VTe=e=>new c3(yre(e.readString(),e.readAny()));class hf{constructor(t){this.embed=t}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new hf(this.embed)}splice(t){throw Sa()}mergeWith(t){return!1}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeJSON(this.embed)}getRef(){return 5}}const HTe=e=>new hf(e.readJSON());class To{constructor(t,n){this.key=t,this.value=n}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new To(this.key,this.value)}splice(t){throw Sa()}mergeWith(t){return!1}integrate(t,n){const o=n.parent;o._searchMarker=null,o._hasFormatting=!0}delete(t){}gc(t){}write(t,n){t.writeKey(this.key),t.writeJSON(this.value)}getRef(){return 6}}const UTe=e=>new To(e.readKey(),e.readJSON());class wv{constructor(t){this.arr=t}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new wv(this.arr)}splice(t){const n=new wv(this.arr.slice(t));return this.arr=this.arr.slice(0,t),n}mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}integrate(t,n){}delete(t){}gc(t){}write(t,n){const o=this.arr.length;t.writeLen(o-n);for(let r=n;r{const t=e.readLen(),n=[];for(let o=0;o{const t=e.readLen(),n=[];for(let o=0;o=55296&&o<=56319&&(this.str=this.str.slice(0,t-1)+"�",n.str="�"+n.str.slice(1)),n}mergeWith(t){return this.str+=t.str,!0}integrate(t,n){}delete(t){}gc(t){}write(t,n){t.writeString(n===0?this.str:this.str.slice(n))}getRef(){return 4}}const YTe=e=>new Ia(e.readString()),ZTe=[STe,qTe,NTe,LTe,BTe,PTe,ITe],QTe=0,JTe=1,eEe=2,tEe=3,nEe=4,oEe=5,rEe=6;class hl{constructor(t){this.type=t}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new hl(this.type._copy())}splice(t){throw Sa()}mergeWith(t){return!1}integrate(t,n){this.type._integrate(t.doc,n)}delete(t){let n=this.type._start;for(;n!==null;)n.deleted?n.id.clock<(t.beforeState.get(n.id.client)||0)&&t._mergeStructs.push(n):n.delete(t),n=n.right;this.type._map.forEach(o=>{o.deleted?o.id.clock<(t.beforeState.get(o.id.client)||0)&&t._mergeStructs.push(o):o.delete(t)}),t.changed.delete(this.type)}gc(t){let n=this.type._start;for(;n!==null;)n.gc(t,!0),n=n.right;this.type._start=null,this.type._map.forEach(o=>{for(;o!==null;)o.gc(t,!0),o=o.left}),this.type._map=new Map}write(t,n){this.type._write(t)}getRef(){return 7}}const sEe=e=>new hl(ZTe[e.readTypeRef()](e)),kv=(e,t,n)=>{const{client:o,clock:r}=t.id,s=new Wr(An(o,r+n),t,An(o,r+n-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(n));return t.deleted&&s.markDeleted(),t.keep&&(s.keep=!0),t.redone!==null&&(s.redone=An(t.redone.client,t.redone.clock+n)),t.right=s,s.right!==null&&(s.right.left=s),e._mergeStructs.push(s),s.parentSub!==null&&s.right===null&&s.parent._map.set(s.parentSub,s),t.length=n,s};let Wr=class f8 extends cB{constructor(t,n,o,r,s,i,c,l){super(t,l.getLength()),this.origin=o,this.left=n,this.right=r,this.rightOrigin=s,this.parent=i,this.parentSub=c,this.redone=null,this.content=l,this.info=this.content.isCountable()?lV:0}set marker(t){(this.info&H6)>0!==t&&(this.info^=H6)}get marker(){return(this.info&H6)>0}get keep(){return(this.info&cV)>0}set keep(t){this.keep!==t&&(this.info^=cV)}get countable(){return(this.info&lV)>0}get deleted(){return(this.info&V6)>0}set deleted(t){this.deleted!==t&&(this.info^=V6)}markDeleted(){this.info|=V6}getMissing(t,n){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=Fo(n,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=Fo(n,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===Z2&&this.id.client!==this.parent.client&&this.parent.clock>=Fo(n,this.parent.client))return this.parent.client;if(this.origin&&(this.left=_V(t,n,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Bu(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===Bs||this.right&&this.right.constructor===Bs)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===f8&&(this.parent=this.left.parent,this.parentSub=this.left.parentSub),this.right&&this.right.constructor===f8&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===Z2){const o=Y6(n,this.parent);o.constructor===Bs?this.parent=null:this.parent=o.content.type}return null}integrate(t,n){if(n>0&&(this.id.clock+=n,this.left=_V(t,t.doc.store,An(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(n),this.length-=n),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){let o=this.left,r;if(o!==null)r=o.right;else if(this.parentSub!==null)for(r=this.parent._map.get(this.parentSub)||null;r!==null&&r.left!==null;)r=r.left;else r=this.parent._start;const s=new Set,i=new Set;for(;r!==null&&r!==this.right;){if(i.add(r),s.add(r),hy(this.origin,r.origin)){if(r.id.client{o.p===t&&(o.p=this,!this.deleted&&this.countable&&(o.index-=this.length))}),t.keep&&(this.keep=!0),this.right=t.right,this.right!==null&&(this.right.left=this),this.length+=t.length,!0}return!1}delete(t){if(!this.deleted){const n=this.parent;this.countable&&this.parentSub===null&&(n._length-=this.length),this.markDeleted(),Ov(t.deleteSet,this.id.client,this.id.clock,this.length),kV(t,n,this.parentSub),this.content.delete(t)}}gc(t,n){if(!this.deleted)throw ja();this.content.gc(t),n?uTe(t,this,new Bs(this.id,this.length)):this.content=new BM(this.length)}write(t,n){const o=n>0?An(this.id.client,this.id.clock+n-1):this.origin,r=this.rightOrigin,s=this.parentSub,i=this.content.getRef()&Ix|(o===null?0:as)|(r===null?0:Nc)|(s===null?0:qM);if(t.writeInfo(i),o!==null&&t.writeLeftID(o),r!==null&&t.writeRightID(r),o===null&&r===null){const c=this.parent;if(c._item!==void 0){const l=c._item;if(l===null){const u=cTe(c);t.writeParentInfo(!0),t.writeString(u)}else t.writeParentInfo(!1),t.writeLeftID(l.id)}else c.constructor===String?(t.writeParentInfo(!0),t.writeString(c)):c.constructor===Z2?(t.writeParentInfo(!1),t.writeLeftID(c)):ja();s!==null&&t.writeString(s)}this.content.write(t,n)}};const Are=(e,t)=>iEe[t&Ix](e),iEe=[()=>{ja()},$Te,XTe,FTe,YTe,HTe,UTe,sEe,KTe,VTe,()=>{ja()}],aEe=10;class Ls extends cB{get deleted(){return!0}delete(){}mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}integrate(t,n){ja()}write(t,n){t.writeInfo(aEe),Rt(t.restEncoder,this.length-n)}getMissing(t,n){return null}}const vre=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{},xre="__ $YJS$ __";vre[xre]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");vre[xre]=!0;const mf=e=>Cb((t,n)=>{e.onerror=o=>n(new Error(o.target.error)),e.onsuccess=o=>t(o.target.result)}),cEe=(e,t)=>Cb((n,o)=>{const r=indexedDB.open(e);r.onupgradeneeded=s=>t(s.target.result),r.onerror=s=>o(Ci(s.target.error)),r.onsuccess=s=>{const i=s.target.result;i.onversionchange=()=>{i.close()},n(i)}}),lEe=e=>mf(indexedDB.deleteDatabase(e)),uEe=(e,t)=>t.forEach(n=>e.createObjectStore.apply(e,n)),fg=(e,t,n="readwrite")=>{const o=e.transaction(t,n);return t.map(r=>MEe(o,r))},_re=(e,t)=>mf(e.count(t)),dEe=(e,t)=>mf(e.get(t)),wre=(e,t)=>mf(e.delete(t)),pEe=(e,t,n)=>mf(e.put(t,n)),b8=(e,t)=>mf(e.add(t)),fEe=(e,t,n)=>mf(e.getAll(t,n)),bEe=(e,t,n)=>{let o=null;return gEe(e,t,r=>(o=r,!1),n).then(()=>o)},hEe=(e,t=null)=>bEe(e,t,"prev"),mEe=(e,t)=>Cb((n,o)=>{e.onerror=o,e.onsuccess=async r=>{const s=r.target.result;if(s===null||await t(s)===!1)return n();s.continue()}}),gEe=(e,t,n,o="next")=>mEe(e.openKeyCursor(t,o),r=>n(r.key)),MEe=(e,t)=>e.objectStore(t),zEe=(e,t)=>IDBKeyRange.upperBound(e,t),OEe=(e,t)=>IDBKeyRange.lowerBound(e,t),J6="custom",kre="updates",Sre=500,Cre=(e,t=()=>{},n=()=>{})=>{const[o]=fg(e.db,[kre]);return fEe(o,OEe(e._dbref,!1)).then(r=>{e._destroyed||(t(o),u0(e.doc,()=>{r.forEach(s=>Zoe(e.doc,s))},e,!1),n(o))}).then(()=>hEe(o).then(r=>{e._dbref=r+1})).then(()=>_re(o).then(r=>{e._dbsize=r})).then(()=>o)},yEe=(e,t=!0)=>Cre(e).then(n=>{(t||e._dbsize>=Sre)&&b8(n,tB(e.doc)).then(()=>wre(n,zEe(e._dbref,!0))).then(()=>_re(n).then(o=>{e._dbsize=o}))});class AEe extends o3{constructor(t,n){super(),this.doc=n,this.name=t,this._dbref=0,this._dbsize=0,this._destroyed=!1,this.db=null,this.synced=!1,this._db=cEe(t,o=>uEe(o,[["updates",{autoIncrement:!0}],["custom"]])),this.whenSynced=Cb(o=>this.on("synced",()=>o(this))),this._db.then(o=>{this.db=o,Cre(this,i=>b8(i,tB(n)),()=>{if(this._destroyed)return this;this.synced=!0,this.emit("synced",[this])})}),this._storeTimeout=1e3,this._storeTimeoutId=null,this._storeUpdate=(o,r)=>{if(this.db&&r!==this){const[s]=fg(this.db,[kre]);b8(s,o),++this._dbsize>=Sre&&(this._storeTimeoutId!==null&&clearTimeout(this._storeTimeoutId),this._storeTimeoutId=setTimeout(()=>{yEe(this,!1),this._storeTimeoutId=null},this._storeTimeout))}},n.on("update",this._storeUpdate),this.destroy=this.destroy.bind(this),n.on("destroy",this.destroy)}destroy(){return this._storeTimeoutId&&clearTimeout(this._storeTimeoutId),this.doc.off("update",this._storeUpdate),this.doc.off("destroy",this.destroy),this._destroyed=!0,this._db.then(t=>{t.close()})}clearData(){return this.destroy().then(()=>{lEe(this.name)})}get(t){return this._db.then(n=>{const[o]=fg(n,[J6],"readonly");return dEe(o,t)})}set(t,n){return this._db.then(o=>{const[r]=fg(o,[J6]);return pEe(r,n,t)})}del(t){return this._db.then(n=>{const[o]=fg(n,[J6]);return wre(o,t)})}}function vEe(e,t,n){const o=`${t}-${e}`,r=new AEe(o,n);return new Promise(s=>{r.on("synced",()=>{s(()=>r.destroy())})})}const xEe=1200,_Ee=2500,Sv=3e4,h8=e=>{if(e.shouldConnect&&e.ws===null){const t=new WebSocket(e.url),n=e.binaryType;let o=null;n&&(t.binaryType=n),e.ws=t,e.connecting=!0,e.connected=!1,t.onmessage=i=>{e.lastMessageReceived=Zc();const c=i.data,l=typeof c=="string"?JSON.parse(c):c;l&&l.type==="pong"&&(clearTimeout(o),o=setTimeout(s,Sv/2)),e.emit("message",[l,e])};const r=i=>{e.ws!==null&&(e.ws=null,e.connecting=!1,e.connected?(e.connected=!1,e.emit("disconnect",[{type:"disconnect",error:i},e])):e.unsuccessfulReconnects++,setTimeout(h8,DN(ERe(e.unsuccessfulReconnects+1)*xEe,_Ee),e)),clearTimeout(o)},s=()=>{e.ws===t&&e.send({type:"ping"})};t.onclose=()=>r(null),t.onerror=i=>r(i),t.onopen=()=>{e.lastMessageReceived=Zc(),e.connecting=!1,e.connected=!0,e.unsuccessfulReconnects=0,e.emit("connect",[{type:"connect"},e]),o=setTimeout(s,Sv/2)}}};class wEe extends o3{constructor(t,{binaryType:n}={}){super(),this.url=t,this.ws=null,this.binaryType=n||null,this.connected=!1,this.connecting=!1,this.unsuccessfulReconnects=0,this.lastMessageReceived=0,this.shouldConnect=!0,this._checkInterval=setInterval(()=>{this.connected&&Svn.key===t&&this.onmessage!==null&&this.onmessage({data:KN(n.newValue||"")}),f8e(this._onChange)}postMessage(t){woe.setItem(this.room,Woe(C8e(t)))}close(){b8e(this._onChange)}}const SEe=typeof BroadcastChannel>"u"?kEe:BroadcastChannel,lB=e=>Vr(qre,e,()=>{const t=Nu(),n=new SEe(e);return n.onmessage=o=>t.forEach(r=>r(o.data,"broadcastchannel")),{bc:n,subs:t}}),CEe=(e,t)=>(lB(e).subs.add(t),t),qEe=(e,t)=>{const n=lB(e),o=n.subs.delete(t);return o&&n.subs.size===0&&(n.bc.close(),qre.delete(e)),o},REe=(e,t,n=null)=>{const o=lB(e);o.bc.postMessage(t),o.subs.forEach(r=>r(t,n))},TEe=()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else n!==void 0&&n()}};function My(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Rre={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){var n=Math.floor,o=Math.abs,r=Math.pow;return function(){function s(i,c,l){function u(f,b){if(!c[f]){if(!i[f]){var h=typeof My=="function"&&My;if(!b&&h)return h(f,!0);if(d)return d(f,!0);var g=new Error("Cannot find module '"+f+"'");throw g.code="MODULE_NOT_FOUND",g}var z=c[f]={exports:{}};i[f][0].call(z.exports,function(A){var x=i[f][1][A];return u(x||A)},z,z.exports,s,i,c,l)}return c[f].exports}for(var d=typeof My=="function"&&My,p=0;p>16,C[q++]=255&y>>8,C[q++]=255&y;return S===2&&(y=g[M.charCodeAt(_)]<<2|g[M.charCodeAt(_+1)]>>4,C[q++]=255&y),S===1&&(y=g[M.charCodeAt(_)]<<10|g[M.charCodeAt(_+1)]<<4|g[M.charCodeAt(_+2)]>>2,C[q++]=255&y>>8,C[q++]=255&y),C}function p(M){return h[63&M>>18]+h[63&M>>12]+h[63&M>>6]+h[63&M]}function f(M,y,_){for(var w,k=[],S=y;S<_;S+=3)w=(16711680&M[S]<<16)+(65280&M[S+1]<<8)+(255&M[S+2]),k.push(p(w));return k.join("")}function b(M){for(var y,_=M.length,w=_%3,k=[],S=16383,C=0,q=_-w;Cq?q:C+S));return w===1?(y=M[_-1],k.push(h[y>>2]+h[63&y<<4]+"==")):w===2&&(y=(M[_-2]<<8)+M[_-1],k.push(h[y>>10]+h[63&y>>4]+h[63&y<<2]+"=")),k.join("")}c.byteLength=function(M){var y=l(M),_=y[0],w=y[1];return 3*(_+w)/4-w},c.toByteArray=d,c.fromByteArray=b;for(var h=[],g=[],z=typeof Uint8Array>"u"?Array:Uint8Array,A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x=0,v=A.length;xR)throw new RangeError('The value "'+R+'" is invalid for option "size"')}function h(R,L,$){return b(R),0>=R||L===void 0?d(R):typeof $=="string"?d(R).fill(L,$):d(R).fill(L)}function g(R){return b(R),d(0>R?0:0|M(R))}function z(R,L){if((typeof L!="string"||L==="")&&(L="utf8"),!p.isEncoding(L))throw new TypeError("Unknown encoding: "+L);var $=0|y(R,L),ue=d($),Me=ue.write(R,L);return Me!==$&&(ue=ue.slice(0,Me)),ue}function A(R){for(var L=0>R.length?0:0|M(R.length),$=d(L),ue=0;ueL||R.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|R}function y(R,L){if(p.isBuffer(R))return R.length;if(ArrayBuffer.isView(R)||X(R,ArrayBuffer))return R.byteLength;if(typeof R!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof R);var $=R.length,ue=2>>1;case"base64":return U(R).length;default:if(Me)return ue?-1:fe(R).length;L=(""+L).toLowerCase(),Me=!0}}function _(R,L,$){var ue=!1;if((L===void 0||0>L)&&(L=0),L>this.length||(($===void 0||$>this.length)&&($=this.length),0>=$)||($>>>=0,L>>>=0,$<=L))return"";for(R||(R="utf8");;)switch(R){case"hex":return G(this,L,$);case"utf8":case"utf-8":return j(this,L,$);case"ascii":return D(this,L,$);case"latin1":case"binary":return H(this,L,$);case"base64":return N(this,L,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,L,$);default:if(ue)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),ue=!0}}function w(R,L,$){var ue=R[L];R[L]=R[$],R[$]=ue}function k(R,L,$,ue,Me){if(R.length===0)return-1;if(typeof $=="string"?(ue=$,$=0):2147483647<$?$=2147483647:-2147483648>$&&($=-2147483648),$=+$,re($)&&($=Me?0:R.length-1),0>$&&($=R.length+$),$>=R.length){if(Me)return-1;$=R.length-1}else if(0>$)if(Me)$=0;else return-1;if(typeof L=="string"&&(L=p.from(L,ue)),p.isBuffer(L))return L.length===0?-1:S(R,L,$,ue,Me);if(typeof L=="number")return L&=255,typeof Uint8Array.prototype.indexOf=="function"?Me?Uint8Array.prototype.indexOf.call(R,L,$):Uint8Array.prototype.lastIndexOf.call(R,L,$):S(R,[L],$,ue,Me);throw new TypeError("val must be string, number or Buffer")}function S(R,L,$,ue,Me){function Ae(Ve,kt){return je===1?Ve[kt]:Ve.readUInt16BE(kt*je)}var je=1,rt=R.length,mt=L.length;if(ue!==void 0&&(ue=(ue+"").toLowerCase(),ue==="ucs2"||ue==="ucs-2"||ue==="utf16le"||ue==="utf-16le")){if(2>R.length||2>L.length)return-1;je=2,rt/=2,mt/=2,$/=2}var gt;if(Me){var Ye=-1;for(gt=$;gtrt&&($=rt-mt),gt=$;0<=gt;gt--){for(var Wt=!0,gn=0;gnMe&&(ue=Me)):ue=Me;var Ae=L.length;ue>Ae/2&&(ue=Ae/2);for(var je,rt=0;rtAe&&(je=Ae):rt===2?(mt=R[Me+1],(192&mt)==128&&(Wt=(31&Ae)<<6|63&mt,127Wt||57343Wt&&(je=Wt)))}je===null?(je=65533,rt=1):65535>>10),je=56320|1023&je),ue.push(je),Me+=rt}return P(ue)}function P(R){var L=R.length;if(L<=4096)return l.apply(String,R);for(var $="",ue=0;ueL)&&(L=0),(!$||0>$||$>ue)&&($=ue);for(var Me="",Ae=L;Ae<$;++Ae)Me+=pe(R[Ae]);return Me}function K(R,L,$){for(var ue=R.slice(L,$),Me="",Ae=0;AeR)throw new RangeError("offset is not uint");if(R+L>$)throw new RangeError("Trying to access beyond buffer length")}function oe(R,L,$,ue,Me,Ae){if(!p.isBuffer(R))throw new TypeError('"buffer" argument must be a Buffer instance');if(L>Me||LR.length)throw new RangeError("Index out of range")}function ae(R,L,$,ue){if($+ue>R.length)throw new RangeError("Index out of range");if(0>$)throw new RangeError("Index out of range")}function Z(R,L,$,ue,Me){return L=+L,$>>>=0,Me||ae(R,L,$,4),me.write(R,L,$,ue,23,4),$+4}function ne(R,L,$,ue,Me){return L=+L,$>>>=0,Me||ae(R,L,$,8),me.write(R,L,$,ue,52,8),$+8}function te(R){if(R=R.split("=")[0],R=R.trim().replace(Y,""),2>R.length)return"";for(;R.length%4!=0;)R+="=";return R}function pe(R){return 16>R?"0"+R.toString(16):R.toString(16)}function fe(R,L){L=L||1/0;for(var $,ue=R.length,Me=null,Ae=[],je=0;je$){if(!Me){if(56319<$){-1<(L-=3)&&Ae.push(239,191,189);continue}else if(je+1===ue){-1<(L-=3)&&Ae.push(239,191,189);continue}Me=$;continue}if(56320>$){-1<(L-=3)&&Ae.push(239,191,189),Me=$;continue}$=(Me-55296<<10|$-56320)+65536}else Me&&-1<(L-=3)&&Ae.push(239,191,189);if(Me=null,128>$){if(0>(L-=1))break;Ae.push($)}else if(2048>$){if(0>(L-=2))break;Ae.push(192|$>>6,128|63&$)}else if(65536>$){if(0>(L-=3))break;Ae.push(224|$>>12,128|63&$>>6,128|63&$)}else if(1114112>$){if(0>(L-=4))break;Ae.push(240|$>>18,128|63&$>>12,128|63&$>>6,128|63&$)}else throw new Error("Invalid code point")}return Ae}function ve(R){for(var L=[],$=0;$(L-=2));++je)$=R.charCodeAt(je),ue=$>>8,Me=$%256,Ae.push(Me),Ae.push(ue);return Ae}function U(R){return he.toByteArray(te(R))}function ce(R,L,$,ue){for(var Me=0;Me=L.length||Me>=R.length);++Me)L[Me+$]=R[Me];return Me}function X(R,L){return R instanceof L||R!=null&&R.constructor!=null&&R.constructor.name!=null&&R.constructor.name===L.name}function re(R){return R!==R}var he=s("base64-js"),me=s("ieee754");c.Buffer=p,c.SlowBuffer=function(R){return+R!=R&&(R=0),p.alloc(+R)},c.INSPECT_MAX_BYTES=50,c.kMaxLength=2147483647,p.TYPED_ARRAY_SUPPORT=function(){try{var R=new Uint8Array(1);return R.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},R.foo()===42}catch{return!1}}(),p.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){return p.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){return p.isBuffer(this)?this.byteOffset:void 0}}),typeof Symbol<"u"&&Symbol.species!=null&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),p.poolSize=8192,p.from=function(R,L,$){return f(R,L,$)},p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,p.alloc=function(R,L,$){return h(R,L,$)},p.allocUnsafe=function(R){return g(R)},p.allocUnsafeSlow=function(R){return g(R)},p.isBuffer=function(R){return R!=null&&R._isBuffer===!0&&R!==p.prototype},p.compare=function(R,L){if(X(R,Uint8Array)&&(R=p.from(R,R.offset,R.byteLength)),X(L,Uint8Array)&&(L=p.from(L,L.offset,L.byteLength)),!p.isBuffer(R)||!p.isBuffer(L))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(R===L)return 0;for(var $=R.length,ue=L.length,Me=0,Ae=u($,ue);MeL&&(R+=" ... "),""},p.prototype.compare=function(R,L,$,ue,Me){if(X(R,Uint8Array)&&(R=p.from(R,R.offset,R.byteLength)),!p.isBuffer(R))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof R);if(L===void 0&&(L=0),$===void 0&&($=R?R.length:0),ue===void 0&&(ue=0),Me===void 0&&(Me=this.length),0>L||$>R.length||0>ue||Me>this.length)throw new RangeError("out of range index");if(ue>=Me&&L>=$)return 0;if(ue>=Me)return-1;if(L>=$)return 1;if(L>>>=0,$>>>=0,ue>>>=0,Me>>>=0,this===R)return 0;for(var Ae=Me-ue,je=$-L,rt=u(Ae,je),mt=this.slice(ue,Me),gt=R.slice(L,$),Ye=0;Ye>>=0,isFinite($)?($>>>=0,ue===void 0&&(ue="utf8")):(ue=$,$=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Me=this.length-L;if(($===void 0||$>Me)&&($=Me),0$||0>L)||L>this.length)throw new RangeError("Attempt to write outside buffer bounds");ue||(ue="utf8");for(var Ae=!1;;)switch(ue){case"hex":return C(this,R,L,$);case"utf8":case"utf-8":return q(this,R,L,$);case"ascii":return E(this,R,L,$);case"latin1":case"binary":return T(this,R,L,$);case"base64":return W(this,R,L,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,R,L,$);default:if(Ae)throw new TypeError("Unknown encoding: "+ue);ue=(""+ue).toLowerCase(),Ae=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},p.prototype.slice=function(R,L){var $=this.length;R=~~R,L=L===void 0?$:~~L,0>R?(R+=$,0>R&&(R=0)):R>$&&(R=$),0>L?(L+=$,0>L&&(L=0)):L>$&&(L=$),L>>=0,L>>>=0,$||J(R,L,this.length);for(var ue=this[R],Me=1,Ae=0;++Ae>>=0,L>>>=0,$||J(R,L,this.length);for(var ue=this[R+--L],Me=1;0>>=0,L||J(R,1,this.length),this[R]},p.prototype.readUInt16LE=function(R,L){return R>>>=0,L||J(R,2,this.length),this[R]|this[R+1]<<8},p.prototype.readUInt16BE=function(R,L){return R>>>=0,L||J(R,2,this.length),this[R]<<8|this[R+1]},p.prototype.readUInt32LE=function(R,L){return R>>>=0,L||J(R,4,this.length),(this[R]|this[R+1]<<8|this[R+2]<<16)+16777216*this[R+3]},p.prototype.readUInt32BE=function(R,L){return R>>>=0,L||J(R,4,this.length),16777216*this[R]+(this[R+1]<<16|this[R+2]<<8|this[R+3])},p.prototype.readIntLE=function(R,L,$){R>>>=0,L>>>=0,$||J(R,L,this.length);for(var ue=this[R],Me=1,Ae=0;++Ae=Me&&(ue-=r(2,8*L)),ue},p.prototype.readIntBE=function(R,L,$){R>>>=0,L>>>=0,$||J(R,L,this.length);for(var ue=L,Me=1,Ae=this[R+--ue];0=Me&&(Ae-=r(2,8*L)),Ae},p.prototype.readInt8=function(R,L){return R>>>=0,L||J(R,1,this.length),128&this[R]?-1*(255-this[R]+1):this[R]},p.prototype.readInt16LE=function(R,L){R>>>=0,L||J(R,2,this.length);var $=this[R]|this[R+1]<<8;return 32768&$?4294901760|$:$},p.prototype.readInt16BE=function(R,L){R>>>=0,L||J(R,2,this.length);var $=this[R+1]|this[R]<<8;return 32768&$?4294901760|$:$},p.prototype.readInt32LE=function(R,L){return R>>>=0,L||J(R,4,this.length),this[R]|this[R+1]<<8|this[R+2]<<16|this[R+3]<<24},p.prototype.readInt32BE=function(R,L){return R>>>=0,L||J(R,4,this.length),this[R]<<24|this[R+1]<<16|this[R+2]<<8|this[R+3]},p.prototype.readFloatLE=function(R,L){return R>>>=0,L||J(R,4,this.length),me.read(this,R,!0,23,4)},p.prototype.readFloatBE=function(R,L){return R>>>=0,L||J(R,4,this.length),me.read(this,R,!1,23,4)},p.prototype.readDoubleLE=function(R,L){return R>>>=0,L||J(R,8,this.length),me.read(this,R,!0,52,8)},p.prototype.readDoubleBE=function(R,L){return R>>>=0,L||J(R,8,this.length),me.read(this,R,!1,52,8)},p.prototype.writeUIntLE=function(R,L,$,ue){if(R=+R,L>>>=0,$>>>=0,!ue){var Me=r(2,8*$)-1;oe(this,R,L,$,Me,0)}var Ae=1,je=0;for(this[L]=255&R;++je<$&&(Ae*=256);)this[L+je]=255&R/Ae;return L+$},p.prototype.writeUIntBE=function(R,L,$,ue){if(R=+R,L>>>=0,$>>>=0,!ue){var Me=r(2,8*$)-1;oe(this,R,L,$,Me,0)}var Ae=$-1,je=1;for(this[L+Ae]=255&R;0<=--Ae&&(je*=256);)this[L+Ae]=255&R/je;return L+$},p.prototype.writeUInt8=function(R,L,$){return R=+R,L>>>=0,$||oe(this,R,L,1,255,0),this[L]=255&R,L+1},p.prototype.writeUInt16LE=function(R,L,$){return R=+R,L>>>=0,$||oe(this,R,L,2,65535,0),this[L]=255&R,this[L+1]=R>>>8,L+2},p.prototype.writeUInt16BE=function(R,L,$){return R=+R,L>>>=0,$||oe(this,R,L,2,65535,0),this[L]=R>>>8,this[L+1]=255&R,L+2},p.prototype.writeUInt32LE=function(R,L,$){return R=+R,L>>>=0,$||oe(this,R,L,4,4294967295,0),this[L+3]=R>>>24,this[L+2]=R>>>16,this[L+1]=R>>>8,this[L]=255&R,L+4},p.prototype.writeUInt32BE=function(R,L,$){return R=+R,L>>>=0,$||oe(this,R,L,4,4294967295,0),this[L]=R>>>24,this[L+1]=R>>>16,this[L+2]=R>>>8,this[L+3]=255&R,L+4},p.prototype.writeIntLE=function(R,L,$,ue){if(R=+R,L>>>=0,!ue){var Me=r(2,8*$-1);oe(this,R,L,$,Me-1,-Me)}var Ae=0,je=1,rt=0;for(this[L]=255&R;++Ae<$&&(je*=256);)0>R&&rt===0&&this[L+Ae-1]!==0&&(rt=1),this[L+Ae]=255&(R/je>>0)-rt;return L+$},p.prototype.writeIntBE=function(R,L,$,ue){if(R=+R,L>>>=0,!ue){var Me=r(2,8*$-1);oe(this,R,L,$,Me-1,-Me)}var Ae=$-1,je=1,rt=0;for(this[L+Ae]=255&R;0<=--Ae&&(je*=256);)0>R&&rt===0&&this[L+Ae+1]!==0&&(rt=1),this[L+Ae]=255&(R/je>>0)-rt;return L+$},p.prototype.writeInt8=function(R,L,$){return R=+R,L>>>=0,$||oe(this,R,L,1,127,-128),0>R&&(R=255+R+1),this[L]=255&R,L+1},p.prototype.writeInt16LE=function(R,L,$){return R=+R,L>>>=0,$||oe(this,R,L,2,32767,-32768),this[L]=255&R,this[L+1]=R>>>8,L+2},p.prototype.writeInt16BE=function(R,L,$){return R=+R,L>>>=0,$||oe(this,R,L,2,32767,-32768),this[L]=R>>>8,this[L+1]=255&R,L+2},p.prototype.writeInt32LE=function(R,L,$){return R=+R,L>>>=0,$||oe(this,R,L,4,2147483647,-2147483648),this[L]=255&R,this[L+1]=R>>>8,this[L+2]=R>>>16,this[L+3]=R>>>24,L+4},p.prototype.writeInt32BE=function(R,L,$){return R=+R,L>>>=0,$||oe(this,R,L,4,2147483647,-2147483648),0>R&&(R=4294967295+R+1),this[L]=R>>>24,this[L+1]=R>>>16,this[L+2]=R>>>8,this[L+3]=255&R,L+4},p.prototype.writeFloatLE=function(R,L,$){return Z(this,R,L,!0,$)},p.prototype.writeFloatBE=function(R,L,$){return Z(this,R,L,!1,$)},p.prototype.writeDoubleLE=function(R,L,$){return ne(this,R,L,!0,$)},p.prototype.writeDoubleBE=function(R,L,$){return ne(this,R,L,!1,$)},p.prototype.copy=function(R,L,$,ue){if(!p.isBuffer(R))throw new TypeError("argument should be a Buffer");if($||($=0),ue||ue===0||(ue=this.length),L>=R.length&&(L=R.length),L||(L=0),0L)throw new RangeError("targetStart out of bounds");if(0>$||$>=this.length)throw new RangeError("Index out of range");if(0>ue)throw new RangeError("sourceEnd out of bounds");ue>this.length&&(ue=this.length),R.length-LMe||ue==="latin1")&&(R=Me)}}else typeof R=="number"&&(R&=255);if(0>L||this.length>>=0,$=$===void 0?this.length:$>>>0,R||(R=0);var Ae;if(typeof R=="number")for(Ae=L;Ae<$;++Ae)this[Ae]=R;else{var je=p.isBuffer(R)?R:p.from(R,ue),rt=je.length;if(rt===0)throw new TypeError('The value "'+R+'" is invalid for argument "value"');for(Ae=0;Ae<$-L;++Ae)this[Ae+L]=je[Ae%rt]}return this};var Y=/[^+/0-9A-Za-z-_]/g}).call(this)}).call(this,s("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:9}],4:[function(s,i,c){(function(l){(function(){function u(){let p;try{p=c.storage.getItem("debug")}catch{}return!p&&typeof l<"u"&&"env"in l&&(p=l.env.DEBUG),p}c.formatArgs=function(p){if(p[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+p[0]+(this.useColors?"%c ":" ")+"+"+i.exports.humanize(this.diff),!this.useColors)return;const f="color: "+this.color;p.splice(1,0,f,"color: inherit");let b=0,h=0;p[0].replace(/%[a-zA-Z%]/g,g=>{g==="%%"||(b++,g==="%c"&&(h=b))}),p.splice(h,0,f)},c.save=function(p){try{p?c.storage.setItem("debug",p):c.storage.removeItem("debug")}catch{}},c.load=u,c.useColors=function(){return!!(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},c.storage=function(){try{return localStorage}catch{}}(),c.destroy=(()=>{let p=!1;return()=>{p||(p=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),c.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],c.log=console.debug||console.log||(()=>{}),i.exports=s("./common")(c);const{formatters:d}=i.exports;d.j=function(p){try{return JSON.stringify(p)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}).call(this)}).call(this,s("_process"))},{"./common":5,_process:12}],5:[function(s,i){i.exports=function(c){function l(p){function f(...g){if(!f.enabled)return;const z=f,A=+new Date,x=A-(b||A);z.diff=x,z.prev=b,z.curr=A,b=A,g[0]=l.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let v=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(y,_)=>{if(y==="%%")return"%";v++;const w=l.formatters[_];if(typeof w=="function"){const k=g[v];y=w.call(z,k),g.splice(v,1),v--}return y}),l.formatArgs.call(z,g),(z.log||l.log).apply(z,g)}let b,h=null;return f.namespace=p,f.useColors=l.useColors(),f.color=l.selectColor(p),f.extend=u,f.destroy=l.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>h===null?l.enabled(p):h,set:g=>{h=g}}),typeof l.init=="function"&&l.init(f),f}function u(p,f){const b=l(this.namespace+(typeof f>"u"?":":f)+p);return b.log=this.log,b}function d(p){return p.toString().substring(2,p.toString().length-2).replace(/\.\*\?$/,"*")}return l.debug=l,l.default=l,l.coerce=function(p){return p instanceof Error?p.stack||p.message:p},l.disable=function(){const p=[...l.names.map(d),...l.skips.map(d).map(f=>"-"+f)].join(",");return l.enable(""),p},l.enable=function(p){l.save(p),l.names=[],l.skips=[];let f;const b=(typeof p=="string"?p:"").split(/[\s,]+/),h=b.length;for(f=0;f{l[p]=c[p]}),l.names=[],l.skips=[],l.formatters={},l.selectColor=function(p){let f=0;for(let b=0;bW&&!N.warned){N.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+(q+" listeners added. Use emitter.setMaxListeners() to increase limit"));j.name="MaxListenersExceededWarning",j.emitter=C,j.type=q,j.count=N.length,c(j)}return C}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(C,q,E){var T={fired:!1,wrapFn:void 0,target:C,type:q,listener:E},W=f.bind(T);return W.listener=E,T.wrapFn=W,W}function h(C,q,E){var T=C._events;if(T===void 0)return[];var W=T[q];return W===void 0?[]:typeof W=="function"?E?[W.listener||W]:[W]:E?x(W):z(W,W.length)}function g(C){var q=this._events;if(q!==void 0){var E=q[C];if(typeof E=="function")return 1;if(E!==void 0)return E.length}return 0}function z(C,q){for(var E=Array(q),T=0;TC||k(C))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+C+".");S=C}}),l.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(C){if(typeof C!="number"||0>C||k(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this},l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(C){for(var q=[],E=1;EW)return this;W===0?E.shift():A(E,W),E.length===1&&(T[C]=E[0]),T.removeListener!==void 0&&this.emit("removeListener",C,N||q)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(C){var q,E,T;if(E=this._events,E===void 0)return this;if(E.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):E[C]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete E[C]),this;if(arguments.length===0){var W,B=Object.keys(E);for(T=0;T"u")return null;var c={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return c.RTCPeerConnection?c:null}},{}],9:[function(s,i,c){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */c.read=function(l,u,d,p,f){var b,h,g=8*f-p-1,z=(1<>1,x=-7,v=d?f-1:0,M=d?-1:1,y=l[u+v];for(v+=M,b=y&(1<<-x)-1,y>>=-x,x+=g;0>=-x,x+=p;0>1,_=f===23?r(2,-24)-r(2,-77):0,w=p?0:b-1,k=p?1:-1,S=0>u||u===0&&0>1/u?1:0;for(u=o(u),isNaN(u)||u===1/0?(g=isNaN(u)?1:0,h=M):(h=n(x(u)/A),1>u*(z=r(2,-h))&&(h--,z*=2),u+=1<=h+y?_/z:_*r(2,1-y),2<=u*z&&(h++,z/=2),h+y>=M?(g=0,h=M):1<=h+y?(g=(u*z-1)*r(2,f),h+=y):(g=u*r(2,y-1)*r(2,f),h=0));8<=f;l[d+w]=255&g,w+=k,g/=256,f-=8);for(h=h<=1.5*h?"s":"")}i.exports=function(f,b){b=b||{};var h=typeof f;if(h=="string"&&0 */let l;i.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window>"u"?c:window):u=>(l||(l=Promise.resolve())).then(u).catch(d=>setTimeout(()=>{throw d},0))}).call(this)}).call(this,typeof I0>"u"?typeof self>"u"?typeof window>"u"?{}:window:self:I0)},{}],14:[function(s,i){(function(c,l){(function(){var u=s("safe-buffer").Buffer,d=l.crypto||l.msCrypto;i.exports=d&&d.getRandomValues?function(p,f){if(p>4294967295)throw new RangeError("requested too many random bytes");var b=u.allocUnsafe(p);if(0"u"?typeof self>"u"?typeof window>"u"?{}:window:self:I0)},{_process:12,"safe-buffer":30}],15:[function(s,i){function c(h,g){h.prototype=Object.create(g.prototype),h.prototype.constructor=h,h.__proto__=g}function l(h,g,z){function A(v,M,y){return typeof g=="string"?g:g(v,M,y)}z||(z=Error);var x=function(v){function M(y,_,w){return v.call(this,A(y,_,w))||this}return c(M,v),M}(z);x.prototype.name=z.name,x.prototype.code=h,b[h]=x}function u(h,g){if(Array.isArray(h)){var z=h.length;return h=h.map(function(A){return A+""}),2h.length)&&(z=h.length),h.substring(z-g.length,z)===g}function f(h,g,z){return typeof z!="number"&&(z=0),!(z+g.length>h.length)&&h.indexOf(g,z)!==-1}var b={};l("ERR_INVALID_OPT_VALUE",function(h,g){return'The value "'+g+'" is invalid for option "'+h+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(h,g,z){var A;typeof g=="string"&&d(g,"not ")?(A="must not be",g=g.replace(/^not /,"")):A="must be";var x;if(p(h," argument"))x="The ".concat(h," ").concat(A," ").concat(u(g,"type"));else{var v=f(h,".")?"property":"argument";x='The "'.concat(h,'" ').concat(v," ").concat(A," ").concat(u(g,"type"))}return x+=". Received type ".concat(typeof z),x},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),i.exports.codes=b},{}],16:[function(s,i){(function(c){(function(){function l(A){return this instanceof l?(f.call(this,A),b.call(this,A),this.allowHalfOpen=!0,void(A&&(A.readable===!1&&(this.readable=!1),A.writable===!1&&(this.writable=!1),A.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",u))))):new l(A)}function u(){this._writableState.ended||c.nextTick(d,this)}function d(A){A.end()}var p=Object.keys||function(A){var x=[];for(var v in A)x.push(v);return x};i.exports=l;var f=s("./_stream_readable"),b=s("./_stream_writable");s("inherits")(l,f);for(var h,g=p(b.prototype),z=0;z>>1,Y|=Y>>>2,Y|=Y>>>4,Y|=Y>>>8,Y|=Y>>>16,Y++),Y}function x(Y,R){return 0>=Y||R.length===0&&R.ended?0:R.objectMode?1:Y===Y?(Y>R.highWaterMark&&(R.highWaterMark=A(Y)),Y<=R.length?Y:R.ended?R.length:(R.needReadable=!0,0)):R.flowing&&R.length?R.buffer.head.data.length:R.length}function v(Y,R){if(D("onEofChunk"),!R.ended){if(R.decoder){var L=R.decoder.end();L&&L.length&&(R.buffer.push(L),R.length+=R.objectMode?1:L.length)}R.ended=!0,R.sync?M(Y):(R.needReadable=!1,!R.emittedReadable&&(R.emittedReadable=!0,y(Y)))}}function M(Y){var R=Y._readableState;D("emitReadable",R.needReadable,R.emittedReadable),R.needReadable=!1,R.emittedReadable||(D("emitReadable",R.flowing),R.emittedReadable=!0,c.nextTick(y,Y))}function y(Y){var R=Y._readableState;D("emitReadable_",R.destroyed,R.length,R.ended),!R.destroyed&&(R.length||R.ended)&&(Y.emit("readable"),R.emittedReadable=!1),R.needReadable=!R.flowing&&!R.ended&&R.length<=R.highWaterMark,T(Y)}function _(Y,R){R.readingMore||(R.readingMore=!0,c.nextTick(w,Y,R))}function w(Y,R){for(;!R.reading&&!R.ended&&(R.length=R.length?(L=R.decoder?R.buffer.join(""):R.buffer.length===1?R.buffer.first():R.buffer.concat(R.length),R.buffer.clear()):L=R.buffer.consume(Y,R.decoder),L}function B(Y){var R=Y._readableState;D("endReadable",R.endEmitted),R.endEmitted||(R.ended=!0,c.nextTick(N,R,Y))}function N(Y,R){if(D("endReadableNT",Y.endEmitted,Y.length),!Y.endEmitted&&Y.length===0&&(Y.endEmitted=!0,R.readable=!1,R.emit("end"),Y.autoDestroy)){var L=R._writableState;(!L||L.autoDestroy&&L.finished)&&R.destroy()}}function j(Y,R){for(var L=0,$=Y.length;L<$;L++)if(Y[L]===R)return L;return-1}i.exports=b;var P;b.ReadableState=f;var D;s("events").EventEmitter;var H=function(Y,R){return Y.listeners(R).length},G=s("./internal/streams/stream"),K=s("buffer").Buffer,J=l.Uint8Array||function(){},oe=s("util");D=oe&&oe.debuglog?oe.debuglog("stream"):function(){};var ae,Z,ne,te=s("./internal/streams/buffer_list"),pe=s("./internal/streams/destroy"),fe=s("./internal/streams/state"),ve=fe.getHighWaterMark,ke=s("../errors").codes,U=ke.ERR_INVALID_ARG_TYPE,ce=ke.ERR_STREAM_PUSH_AFTER_EOF,X=ke.ERR_METHOD_NOT_IMPLEMENTED,re=ke.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;s("inherits")(b,G);var he=pe.errorOrDestroy,me=["error","close","destroy","pause","resume"];Object.defineProperty(b.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(Y){this._readableState&&(this._readableState.destroyed=Y)}}),b.prototype.destroy=pe.destroy,b.prototype._undestroy=pe.undestroy,b.prototype._destroy=function(Y,R){R(Y)},b.prototype.push=function(Y,R){var L,$=this._readableState;return $.objectMode?L=!0:typeof Y=="string"&&(R=R||$.defaultEncoding,R!==$.encoding&&(Y=K.from(Y,R),R=""),L=!0),h(this,Y,R,!1,L)},b.prototype.unshift=function(Y){return h(this,Y,null,!0,!1)},b.prototype.isPaused=function(){return this._readableState.flowing===!1},b.prototype.setEncoding=function(Y){ae||(ae=s("string_decoder/").StringDecoder);var R=new ae(Y);this._readableState.decoder=R,this._readableState.encoding=this._readableState.decoder.encoding;for(var L=this._readableState.buffer.head,$="";L!==null;)$+=R.write(L.data),L=L.next;return this._readableState.buffer.clear(),$!==""&&this._readableState.buffer.push($),this._readableState.length=$.length,this},b.prototype.read=function(Y){D("read",Y),Y=parseInt(Y,10);var R=this._readableState,L=Y;if(Y!==0&&(R.emittedReadable=!1),Y===0&&R.needReadable&&((R.highWaterMark===0?0=R.highWaterMark)||R.ended))return D("read: emitReadable",R.length,R.ended),R.length===0&&R.ended?B(this):M(this),null;if(Y=x(Y,R),Y===0&&R.ended)return R.length===0&&B(this),null;var $=R.needReadable;D("need readable",$),(R.length===0||R.length-Y"u"?typeof self>"u"?typeof window>"u"?{}:window:self:I0)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/async_iterator":21,"./internal/streams/buffer_list":22,"./internal/streams/destroy":23,"./internal/streams/from":25,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,events:7,inherits:10,"string_decoder/":31,util:2}],19:[function(s,i){function c(A,x){var v=this._transformState;v.transforming=!1;var M=v.writecb;if(M===null)return this.emit("error",new b);v.writechunk=null,v.writecb=null,x!=null&&this.push(x),M(A);var y=this._readableState;y.reading=!1,(y.needReadable||y.length"u"?typeof self>"u"?typeof window>"u"?{}:window:self:I0)},{"../errors":15,"./_stream_duplex":16,"./internal/streams/destroy":23,"./internal/streams/state":27,"./internal/streams/stream":28,_process:12,buffer:3,inherits:10,"util-deprecate":32}],21:[function(s,i){(function(c){(function(){function l(k,S,C){return S in k?Object.defineProperty(k,S,{value:C,enumerable:!0,configurable:!0,writable:!0}):k[S]=C,k}function u(k,S){return{value:k,done:S}}function d(k){var S=k[g];if(S!==null){var C=k[y].read();C!==null&&(k[v]=null,k[g]=null,k[z]=null,S(u(C,!1)))}}function p(k){c.nextTick(d,k)}function f(k,S){return function(C,q){k.then(function(){return S[x]?void C(u(void 0,!0)):void S[M](C,q)},q)}}var b,h=s("./end-of-stream"),g=Symbol("lastResolve"),z=Symbol("lastReject"),A=Symbol("error"),x=Symbol("ended"),v=Symbol("lastPromise"),M=Symbol("handlePromise"),y=Symbol("stream"),_=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((b={get stream(){return this[y]},next:function(){var k=this,S=this[A];if(S!==null)return Promise.reject(S);if(this[x])return Promise.resolve(u(void 0,!0));if(this[y].destroyed)return new Promise(function(T,W){c.nextTick(function(){k[A]?W(k[A]):T(u(void 0,!0))})});var C,q=this[v];if(q)C=new Promise(f(q,this));else{var E=this[y].read();if(E!==null)return Promise.resolve(u(E,!1));C=new Promise(this[M])}return this[v]=C,C}},l(b,Symbol.asyncIterator,function(){return this}),l(b,"return",function(){var k=this;return new Promise(function(S,C){k[y].destroy(null,function(q){return q?void C(q):void S(u(void 0,!0))})})}),b),_);i.exports=function(k){var S,C=Object.create(w,(S={},l(S,y,{value:k,writable:!0}),l(S,g,{value:null,writable:!0}),l(S,z,{value:null,writable:!0}),l(S,A,{value:null,writable:!0}),l(S,x,{value:k._readableState.endEmitted,writable:!0}),l(S,M,{value:function(q,E){var T=C[y].read();T?(C[v]=null,C[g]=null,C[z]=null,q(u(T,!1))):(C[g]=q,C[z]=E)},writable:!0}),S));return C[v]=null,h(k,function(q){if(q&&q.code!=="ERR_STREAM_PREMATURE_CLOSE"){var E=C[z];return E!==null&&(C[v]=null,C[g]=null,C[z]=null,E(q)),void(C[A]=q)}var T=C[g];T!==null&&(C[v]=null,C[g]=null,C[z]=null,T(u(void 0,!0))),C[x]=!0}),k.on("readable",p.bind(null,C)),C}}).call(this)}).call(this,s("_process"))},{"./end-of-stream":24,_process:12}],22:[function(s,i){function c(v,M){var y=Object.keys(v);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(v);M&&(_=_.filter(function(w){return Object.getOwnPropertyDescriptor(v,w).enumerable})),y.push.apply(y,_)}return y}function l(v){for(var M,y=1;y>>0),_=this.head,w=0;_;)b(_.data,y,w),w+=_.data.length,_=_.next;return y}},{key:"consume",value:function(M,y){var _;return Mk.length?k.length:M;if(w+=S===k.length?k:k.slice(0,M),M-=S,M===0){S===k.length?(++_,this.head=y.next?y.next:this.tail=null):(this.head=y,y.data=k.slice(S));break}++_}return this.length-=_,w}},{key:"_getBuffer",value:function(M){var y=g.allocUnsafe(M),_=this.head,w=1;for(_.data.copy(y),M-=_.data.length;_=_.next;){var k=_.data,S=M>k.length?k.length:M;if(k.copy(y,y.length-M,0,S),M-=S,M===0){S===k.length?(++w,this.head=_.next?_.next:this.tail=null):(this.head=_,_.data=k.slice(S));break}++w}return this.length-=w,y}},{key:x,value:function(M,y){return A(this,l({},y,{depth:0,customInspect:!1}))}}]),v}()},{buffer:3,util:2}],23:[function(s,i){(function(c){(function(){function l(p,f){d(p,f),u(p)}function u(p){p._writableState&&!p._writableState.emitClose||p._readableState&&!p._readableState.emitClose||p.emit("close")}function d(p,f){p.emit("error",f)}i.exports={destroy:function(p,f){var b=this,h=this._readableState&&this._readableState.destroyed,g=this._writableState&&this._writableState.destroyed;return h||g?(f?f(p):p&&(this._writableState?!this._writableState.errorEmitted&&(this._writableState.errorEmitted=!0,c.nextTick(d,this,p)):c.nextTick(d,this,p)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(p||null,function(z){!f&&z?b._writableState?b._writableState.errorEmitted?c.nextTick(u,b):(b._writableState.errorEmitted=!0,c.nextTick(l,b,z)):c.nextTick(l,b,z):f?(c.nextTick(u,b),f(z)):c.nextTick(u,b)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(p,f){var b=p._readableState,h=p._writableState;b&&b.autoDestroy||h&&h.autoDestroy?p.destroy(f):p.emit("error",f)}}}).call(this)}).call(this,s("_process"))},{_process:12}],24:[function(s,i){function c(f){var b=!1;return function(){if(!b){b=!0;for(var h=arguments.length,g=Array(h),z=0;zv.length)throw new z("streams");var _,w=v.map(function(k,S){var C=Sb){var h=f?p:"highWaterMark";throw new l(h,b)}return n(b)}return u.objectMode?16:16384}}},{"../../../errors":15}],28:[function(s,i){i.exports=s("events").EventEmitter},{events:7}],29:[function(s,i,c){c=i.exports=s("./lib/_stream_readable.js"),c.Stream=c,c.Readable=c,c.Writable=s("./lib/_stream_writable.js"),c.Duplex=s("./lib/_stream_duplex.js"),c.Transform=s("./lib/_stream_transform.js"),c.PassThrough=s("./lib/_stream_passthrough.js"),c.finished=s("./lib/internal/streams/end-of-stream.js"),c.pipeline=s("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":16,"./lib/_stream_passthrough.js":17,"./lib/_stream_readable.js":18,"./lib/_stream_transform.js":19,"./lib/_stream_writable.js":20,"./lib/internal/streams/end-of-stream.js":24,"./lib/internal/streams/pipeline.js":26}],30:[function(s,i,c){function l(f,b){for(var h in f)b[h]=f[h]}function u(f,b,h){return p(f,b,h)}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var d=s("buffer"),p=d.Buffer;p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?i.exports=d:(l(d,c),c.Buffer=u),u.prototype=Object.create(p.prototype),l(p,u),u.from=function(f,b,h){if(typeof f=="number")throw new TypeError("Argument must not be a number");return p(f,b,h)},u.alloc=function(f,b,h){if(typeof f!="number")throw new TypeError("Argument must be a number");var g=p(f);return b===void 0?g.fill(0):typeof h=="string"?g.fill(b,h):g.fill(b),g},u.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return p(f)},u.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return d.SlowBuffer(f)}},{buffer:3}],31:[function(s,i,c){function l(w){if(!w)return"utf8";for(var k;;)switch(w){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return w;default:if(k)return;w=(""+w).toLowerCase(),k=!0}}function u(w){var k=l(w);if(typeof k!="string"&&(y.isEncoding===_||!_(w)))throw new Error("Unknown encoding: "+w);return k||w}function d(w){this.encoding=u(w);var k;switch(this.encoding){case"utf16le":this.text=g,this.end=z,k=4;break;case"utf8":this.fillLast=h,k=4;break;case"base64":this.text=A,this.end=x,k=3;break;default:return this.write=v,void(this.end=M)}this.lastNeed=0,this.lastTotal=0,this.lastChar=y.allocUnsafe(k)}function p(w){return 127>=w?0:w>>5==6?2:w>>4==14?3:w>>3==30?4:w>>6==2?-1:-2}function f(w,k,S){var C=k.length-1;if(C=C)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=w[w.length-1],w.toString("utf16le",k,w.length-1)}function z(w){var k=w&&w.length?this.write(w):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return k+this.lastChar.toString("utf16le",0,S)}return k}function A(w,k){var S=(w.length-k)%3;return S==0?w.toString("base64",k):(this.lastNeed=3-S,this.lastTotal=3,S==1?this.lastChar[0]=w[w.length-1]:(this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1]),w.toString("base64",k,w.length-S))}function x(w){var k=w&&w.length?this.write(w):"";return this.lastNeed?k+this.lastChar.toString("base64",0,3-this.lastNeed):k}function v(w){return w.toString(this.encoding)}function M(w){return w&&w.length?this.write(w):""}var y=s("safe-buffer").Buffer,_=y.isEncoding||function(w){switch(w=""+w,w&&w.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};c.StringDecoder=d,d.prototype.write=function(w){if(w.length===0)return"";var k,S;if(this.lastNeed){if(k=this.fillLast(w),k===void 0)return"";S=this.lastNeed,this.lastNeed=0}else S=0;return S"u"?typeof self>"u"?typeof window>"u"?{}:window:self:I0)},{}],"/":[function(s,i){function c(x){return x.replace(/a=ice-options:trickle\s\n/g,"")}function l(x){console.warn(x)}/*! simple-peer. MIT License. Feross Aboukhadijeh */const u=s("debug")("simple-peer"),d=s("get-browser-rtc"),p=s("randombytes"),f=s("readable-stream"),b=s("queue-microtask"),h=s("err-code"),{Buffer:g}=s("buffer"),z=65536;class A extends f.Duplex{constructor(v){if(v=Object.assign({allowHalfOpen:!1},v),super(v),this._id=p(4).toString("hex").slice(0,7),this._debug("new peer %o",v),this.channelName=v.initiator?v.channelName||p(20).toString("hex"):null,this.initiator=v.initiator||!1,this.channelConfig=v.channelConfig||A.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},A.config,v.config),this.offerOptions=v.offerOptions||{},this.answerOptions=v.answerOptions||{},this.sdpTransform=v.sdpTransform||(M=>M),this.streams=v.streams||(v.stream?[v.stream]:[]),this.trickle=v.trickle===void 0||v.trickle,this.allowHalfTrickle=v.allowHalfTrickle!==void 0&&v.allowHalfTrickle,this.iceCompleteTimeout=v.iceCompleteTimeout||5e3,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=v.wrtc&&typeof v.wrtc=="object"?v.wrtc:d(),!this._wrtc)throw h(typeof window>"u"?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(M){return void this.destroy(h(M,"ERR_PC_CONSTRUCTOR"))}this._isReactNativeWebrtc=typeof this._pc._peerConnectionId=="number",this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=M=>{this._onIceCandidate(M)},typeof this._pc.peerIdentity=="object"&&this._pc.peerIdentity.catch(M=>{this.destroy(h(M,"ERR_PC_PEER_IDENTITY"))}),this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=M=>{this._setupData(M)},this.streams&&this.streams.forEach(M=>{this.addStream(M)}),this._pc.ontrack=M=>{this._onTrack(M)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&this._channel.readyState==="open"}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot signal after peer is destroyed"),"ERR_DESTROYED");if(typeof v=="string")try{v=JSON.parse(v)}catch{v={}}this._debug("signal()"),v.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),v.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(v.transceiverRequest.kind,v.transceiverRequest.init)),v.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(v.candidate):this._pendingCandidates.push(v.candidate)),v.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(v)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(M=>{this._addIceCandidate(M)}),this._pendingCandidates=[],this._pc.remoteDescription.type==="offer"&&this._createAnswer())}).catch(M=>{this.destroy(h(M,"ERR_SET_REMOTE_DESCRIPTION"))}),v.sdp||v.candidate||v.renegotiate||v.transceiverRequest||this.destroy(h(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}}_addIceCandidate(v){const M=new this._wrtc.RTCIceCandidate(v);this._pc.addIceCandidate(M).catch(y=>{!M.address||M.address.endsWith(".local")?l("Ignoring unsupported ICE candidate."):this.destroy(h(y,"ERR_ADD_ICE_CANDIDATE"))})}send(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot send after peer is destroyed"),"ERR_DESTROYED");this._channel.send(v)}}addTransceiver(v,M){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addTransceiver after peer is destroyed"),"ERR_DESTROYED");if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(v,M),this._needsNegotiation()}catch(y){this.destroy(h(y,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind:v,init:M}})}}addStream(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot addStream after peer is destroyed"),"ERR_DESTROYED");this._debug("addStream()"),v.getTracks().forEach(M=>{this.addTrack(M,v)})}}addTrack(v,M){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot addTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("addTrack()");const y=this._senderMap.get(v)||new Map;let _=y.get(M);if(!_)_=this._pc.addTrack(v,M),y.set(M,_),this._senderMap.set(v,y),this._needsNegotiation();else throw _.removed?h(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED"):h(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(v,M,y){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot replaceTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("replaceTrack()");const _=this._senderMap.get(v),w=_?_.get(y):null;if(!w)throw h(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");M&&this._senderMap.set(M,_),w.replaceTrack==null?this.destroy(h(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):w.replaceTrack(M)}removeTrack(v,M){if(this.destroying)return;if(this.destroyed)throw h(new Error("cannot removeTrack after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSender()");const y=this._senderMap.get(v),_=y?y.get(M):null;if(!_)throw h(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{_.removed=!0,this._pc.removeTrack(_)}catch(w){w.name==="NS_ERROR_UNEXPECTED"?this._sendersAwaitingStable.push(_):this.destroy(h(w,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(v){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot removeStream after peer is destroyed"),"ERR_DESTROYED");this._debug("removeSenders()"),v.getTracks().forEach(M=>{this.removeTrack(M,v)})}}_needsNegotiation(){this._debug("_needsNegotiation"),this._batchedNegotiation||(this._batchedNegotiation=!0,b(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){if(!this.destroying){if(this.destroyed)throw h(new Error("cannot negotiate after peer is destroyed"),"ERR_DESTROYED");this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}}destroy(v){this._destroy(v,()=>{})}_destroy(v,M){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",v&&(v.message||v)),b(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",v&&(v.message||v)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch{}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch{}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,v&&this.emit("error",v),this.emit("close"),M()}))}_setupData(v){if(!v.channel)return this.destroy(h(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=v.channel,this._channel.binaryType="arraybuffer",typeof this._channel.bufferedAmountLowThreshold=="number"&&(this._channel.bufferedAmountLowThreshold=z),this.channelName=this._channel.label,this._channel.onmessage=y=>{this._onChannelMessage(y)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=y=>{const _=y.error instanceof Error?y.error:new Error(`Datachannel error: ${y.message} ${y.filename}:${y.lineno}:${y.colno}`);this.destroy(h(_,"ERR_DATA_CHANNEL"))};let M=!1;this._closingInterval=setInterval(()=>{this._channel&&this._channel.readyState==="closing"?(M&&this._onChannelClose(),M=!0):M=!1},5e3)}_read(){}_write(v,M,y){if(this.destroyed)return y(h(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(v)}catch(_){return this.destroy(h(_,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>z?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=y):y(null)}else this._debug("write before connect"),this._chunk=v,this._cb=y}_onFinish(){if(!this.destroyed){const v=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?v():this.once("connect",v)}}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(v=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(v.sdp=c(v.sdp)),v.sdp=this.sdpTransform(v.sdp);const M=()=>{if(!this.destroyed){const y=this._pc.localDescription||v;this._debug("signal"),this.emit("signal",{type:y.type,sdp:y.sdp})}};this._pc.setLocalDescription(v).then(()=>{this._debug("createOffer success"),this.destroyed||(this.trickle||this._iceComplete?M():this.once("_iceComplete",M))}).catch(y=>{this.destroy(h(y,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(v=>{this.destroy(h(v,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(v=>{v.mid||!v.sender.track||v.requested||(v.requested=!0,this.addTransceiver(v.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(v=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(v.sdp=c(v.sdp)),v.sdp=this.sdpTransform(v.sdp);const M=()=>{if(!this.destroyed){const y=this._pc.localDescription||v;this._debug("signal"),this.emit("signal",{type:y.type,sdp:y.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(v).then(()=>{this.destroyed||(this.trickle||this._iceComplete?M():this.once("_iceComplete",M))}).catch(y=>{this.destroy(h(y,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(v=>{this.destroy(h(v,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||this._pc.connectionState==="failed"&&this.destroy(h(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const v=this._pc.iceConnectionState,M=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",v,M),this.emit("iceStateChange",v,M),(v==="connected"||v==="completed")&&(this._pcReady=!0,this._maybeReady()),v==="failed"&&this.destroy(h(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),v==="closed"&&this.destroy(h(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(v){const M=y=>(Object.prototype.toString.call(y.values)==="[object Array]"&&y.values.forEach(_=>{Object.assign(y,_)}),y);this._pc.getStats.length===0||this._isReactNativeWebrtc?this._pc.getStats().then(y=>{const _=[];y.forEach(w=>{_.push(M(w))}),v(null,_)},y=>v(y)):0{if(this.destroyed)return;const _=[];y.result().forEach(w=>{const k={};w.names().forEach(S=>{k[S]=w.stat(S)}),k.id=w.id,k.type=w.type,k.timestamp=w.timestamp,_.push(M(k))}),v(null,_)},y=>v(y)):v(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const v=()=>{this.destroyed||this.getStats((M,y)=>{if(this.destroyed)return;M&&(y=[]);const _={},w={},k={};let S=!1;y.forEach(q=>{(q.type==="remotecandidate"||q.type==="remote-candidate")&&(_[q.id]=q),(q.type==="localcandidate"||q.type==="local-candidate")&&(w[q.id]=q),(q.type==="candidatepair"||q.type==="candidate-pair")&&(k[q.id]=q)});const C=q=>{S=!0;let E=w[q.localCandidateId];E&&(E.ip||E.address)?(this.localAddress=E.ip||E.address,this.localPort=+E.port):E&&E.ipAddress?(this.localAddress=E.ipAddress,this.localPort=+E.portNumber):typeof q.googLocalAddress=="string"&&(E=q.googLocalAddress.split(":"),this.localAddress=E[0],this.localPort=+E[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let T=_[q.remoteCandidateId];T&&(T.ip||T.address)?(this.remoteAddress=T.ip||T.address,this.remotePort=+T.port):T&&T.ipAddress?(this.remoteAddress=T.ipAddress,this.remotePort=+T.portNumber):typeof q.googRemoteAddress=="string"&&(T=q.googRemoteAddress.split(":"),this.remoteAddress=T[0],this.remotePort=+T[1]),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(y.forEach(q=>{q.type==="transport"&&q.selectedCandidatePairId&&C(k[q.selectedCandidatePairId]),(q.type==="googCandidatePair"&&q.googActiveConnection==="true"||(q.type==="candidatepair"||q.type==="candidate-pair")&&q.selected)&&C(q)}),!S&&(!Object.keys(k).length||Object.keys(w).length))return void setTimeout(v,100);if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(E){return this.destroy(h(E,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug('sent chunk from "write before connect"');const q=this._cb;this._cb=null,q(null)}typeof this._channel.bufferedAmountLowThreshold!="number"&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};v()}_onInterval(){this._cb&&this._channel&&!(this._channel.bufferedAmount>z)&&this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||(this._pc.signalingState==="stable"&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(v=>{this._pc.removeTrack(v),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(v){this.destroyed||(v.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:v.candidate.candidate,sdpMLineIndex:v.candidate.sdpMLineIndex,sdpMid:v.candidate.sdpMid}}):!v.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),v.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(v){if(this.destroyed)return;let M=v.data;M instanceof ArrayBuffer&&(M=g.from(M)),this.push(M)}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const v=this._cb;this._cb=null,v(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(v){this.destroyed||v.streams.forEach(M=>{this._debug("on track"),this.emit("track",v.track,M),this._remoteTracks.push({track:v.track,stream:M}),this._remoteStreams.some(y=>y.id===M.id)||(this._remoteStreams.push(M),b(()=>{this._debug("on stream"),this.emit("stream",M)}))})}_debug(){const v=[].slice.call(arguments);v[0]="["+this._id+"] "+v[0],u.apply(null,v)}}A.WEBRTC_SUPPORT=!!d(),A.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},A.channelConfig={},i.exports=A},{buffer:3,debug:4,"err-code":6,"get-browser-rtc":8,"queue-microtask":13,randombytes:14,"readable-stream":29}]},{},[])("/")})})(Rre);var EEe=Rre.exports;const WEe=Or(EEe),uB=0,dB=1,Tre=2,Ere=(e,t)=>{Rt(e,uB);const n=iTe(t);eo(e,n)},Wre=(e,t,n)=>{Rt(e,dB),eo(e,tB(t,n))},NEe=(e,t,n)=>Wre(t,n,Bo(e)),Nre=(e,t,n)=>{try{Zoe(t,Bo(e),n)}catch(o){console.error("Caught error while handling a Yjs update",o)}},BEe=(e,t)=>{Rt(e,Tre),eo(e,t)},LEe=Nre,jEe=(e,t,n,o)=>{const r=Zt(e);switch(r){case uB:NEe(e,t,n);break;case dB:Nre(e,n,o);break;case Tre:LEe(e,n,o);break;default:throw new Error("Unknown message type")}return r},eS=3e4;class PEe extends o3{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const n=Zc();this.getLocalState()!==null&&eS/2<=n-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const o=[];this.meta.forEach((r,s)=>{s!==this.clientID&&eS<=n-r.lastUpdated&&this.states.has(s)&&o.push(s)}),o.length>0&&m8(this,o,"timeout")},La(eS/10)),t.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const n=this.clientID,o=this.meta.get(n),r=o===void 0?0:o.clock+1,s=this.states.get(n);t===null?this.states.delete(n):this.states.set(n,t),this.meta.set(n,{clock:r,lastUpdated:Zc()});const i=[],c=[],l=[],u=[];t===null?u.push(n):s==null?t!=null&&i.push(n):(c.push(n),$g(s,t)||l.push(n)),(i.length>0||l.length>0||u.length>0)&&this.emit("change",[{added:i,updated:l,removed:u},"local"]),this.emit("update",[{added:i,updated:c,removed:u},"local"])}setLocalStateField(t,n){const o=this.getLocalState();o!==null&&this.setLocalState({...o,[t]:n})}getStates(){return this.states}}const m8=(e,t,n)=>{const o=[];for(let r=0;r0&&(e.emit("change",[{added:[],updated:[],removed:o},n]),e.emit("update",[{added:[],updated:[],removed:o},n]))},Cv=(e,t,n=e.states)=>{const o=t.length,r=Po();Rt(r,o);for(let s=0;s{const o=Ya(t),r=Zc(),s=[],i=[],c=[],l=[],u=Zt(o);for(let d=0;d0||c.length>0||l.length>0)&&e.emit("change",[{added:s,updated:c,removed:l},n]),(s.length>0||i.length>0||l.length>0)&&e.emit("update",[{added:s,updated:i,removed:l},n])},DEe=(e,t)=>{const n=a8(e).buffer,o=a8(t).buffer;return crypto.subtle.importKey("raw",n,"PBKDF2",!1,["deriveKey"]).then(r=>crypto.subtle.deriveKey({name:"PBKDF2",salt:o,iterations:1e5,hash:"SHA-256"},r,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))},Bre=(e,t)=>{if(!t)return UN(e);const n=crypto.getRandomValues(new Uint8Array(12));return crypto.subtle.encrypt({name:"AES-GCM",iv:n},t,e).then(o=>{const r=Po();return ka(r,"AES-GCM"),eo(r,n),eo(r,new Uint8Array(o)),$0(r)})},FEe=(e,t)=>{const n=Po();return kb(n,e),Bre($0(n),t)},Lre=(e,t)=>{if(!t)return UN(e);const n=Ya(e);Bc(n)!=="AES-GCM"&&d8e(Ci("Unknown encryption algorithm"));const r=Bo(n),s=Bo(n);return crypto.subtle.decrypt({name:"AES-GCM",iv:r},t,s).then(i=>new Uint8Array(i))},jre=(e,t)=>Lre(e,t).then(n=>Sb(Ya(new Uint8Array(n)))),$o=$8e("y-webrtc"),J2=0,Pre=3,LM=1,pB=4,jM=new Map,Ca=new Map,Ire=e=>{let t=!0;e.webrtcConns.forEach(n=>{n.synced||(t=!1)}),(!t&&e.synced||t&&!e.synced)&&(e.synced=t,e.provider.emit("synced",[{synced:t}]),$o("synced ",Fs,e.name,Lp," with all peers"))},Dre=(e,t,n)=>{const o=Ya(t),r=Po(),s=Zt(o);if(e===void 0)return null;const i=e.awareness,c=e.doc;let l=!1;switch(s){case J2:{Rt(r,J2);const u=jEe(o,r,c,e);u===dB&&!e.synced&&n(),u===uB&&(l=!0);break}case Pre:Rt(r,LM),eo(r,Cv(i,Array.from(i.getStates().keys()))),l=!0;break;case LM:IEe(i,Bo(o),e);break;case pB:{const u=Bp(o)===1,d=Bc(o);if(d!==e.peerId&&(e.bcConns.has(d)&&!u||!e.bcConns.has(d)&&u)){const p=[],f=[];u?(e.bcConns.add(d),f.push(d)):(e.bcConns.delete(d),p.push(d)),e.provider.emit("peers",[{added:f,removed:p,webrtcPeers:Array.from(e.webrtcConns.keys()),bcPeers:Array.from(e.bcConns)}]),Fre(e)}break}default:return console.error("Unable to compute message"),r}return l?r:null},$Ee=(e,t)=>{const n=e.room;return $o("received message from ",Fs,e.remotePeerId,YN," (",n.name,")",Lp,Vx),Dre(n,t,()=>{e.synced=!0,$o("synced ",Fs,n.name,Lp," with ",Fs,e.remotePeerId),Ire(n)})},tS=(e,t)=>{$o("send message to ",Fs,e.remotePeerId,Lp,YN," (",e.room.name,")",Vx);try{e.peer.send($0(t))}catch{}},VEe=(e,t)=>{$o("broadcast message in ",Fs,e.name,Lp),e.webrtcConns.forEach(n=>{try{n.peer.send(t)}catch{}})};class qv{constructor(t,n,o,r){$o("establishing connection to ",Fs,o),this.room=r,this.remotePeerId=o,this.glareToken=void 0,this.closed=!1,this.connected=!1,this.synced=!1,this.peer=new WEe({initiator:n,...r.provider.peerOpts}),this.peer.on("signal",s=>{this.glareToken===void 0&&(this.glareToken=Date.now()+Math.random()),Kx(t,r,{to:o,from:r.peerId,type:"signal",token:this.glareToken,signal:s})}),this.peer.on("connect",()=>{$o("connected to ",Fs,o),this.connected=!0;const i=r.provider.doc,c=r.awareness,l=Po();Rt(l,J2),Ere(l,i),tS(this,l);const u=c.getStates();if(u.size>0){const d=Po();Rt(d,LM),eo(d,Cv(c,Array.from(u.keys()))),tS(this,d)}}),this.peer.on("close",()=>{this.connected=!1,this.closed=!0,r.webrtcConns.has(this.remotePeerId)&&(r.webrtcConns.delete(this.remotePeerId),r.provider.emit("peers",[{removed:[this.remotePeerId],added:[],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}])),Ire(r),this.peer.destroy(),$o("closed connection to ",Fs,o),g8(r)}),this.peer.on("error",s=>{$o("Error in connection to ",Fs,o,": ",s),g8(r)}),this.peer.on("data",s=>{const i=$Ee(this,s);i!==null&&tS(this,i)})}destroy(){this.peer.destroy()}}const $l=(e,t)=>Bre(t,e.key).then(n=>e.mux(()=>REe(e.name,n))),TV=(e,t)=>{e.bcconnected&&$l(e,t),VEe(e,t)},g8=e=>{jM.forEach(t=>{t.connected&&(t.send({type:"subscribe",topics:[e.name]}),e.webrtcConns.size{if(e.provider.filterBcConns){const t=Po();Rt(t,pB),TM(t,1),ka(t,e.peerId),$l(e,$0(t))}};class HEe{constructor(t,n,o,r){this.peerId=xoe(),this.doc=t,this.awareness=n.awareness,this.provider=n,this.synced=!1,this.name=o,this.key=r,this.webrtcConns=new Map,this.bcConns=new Set,this.mux=TEe(),this.bcconnected=!1,this._bcSubscriber=s=>Lre(new Uint8Array(s),r).then(i=>this.mux(()=>{const c=Dre(this,i,()=>{});c&&$l(this,$0(c))})),this._docUpdateHandler=(s,i)=>{const c=Po();Rt(c,J2),BEe(c,s),TV(this,$0(c))},this._awarenessUpdateHandler=({added:s,updated:i,removed:c},l)=>{const u=s.concat(i).concat(c),d=Po();Rt(d,LM),eo(d,Cv(this.awareness,u)),TV(this,$0(d))},this._beforeUnloadHandler=()=>{m8(this.awareness,[t.clientID],"window unload"),Ca.forEach(s=>{s.disconnect()})},typeof window<"u"?window.addEventListener("beforeunload",this._beforeUnloadHandler):typeof process<"u"&&process.on("exit",this._beforeUnloadHandler)}connect(){this.doc.on("update",this._docUpdateHandler),this.awareness.on("update",this._awarenessUpdateHandler),g8(this);const t=this.name;CEe(t,this._bcSubscriber),this.bcconnected=!0,Fre(this);const n=Po();Rt(n,J2),Ere(n,this.doc),$l(this,$0(n));const o=Po();Rt(o,J2),Wre(o,this.doc),$l(this,$0(o));const r=Po();Rt(r,Pre),$l(this,$0(r));const s=Po();Rt(s,LM),eo(s,Cv(this.awareness,[this.doc.clientID])),$l(this,$0(s))}disconnect(){jM.forEach(n=>{n.connected&&n.send({type:"unsubscribe",topics:[this.name]})}),m8(this.awareness,[this.doc.clientID],"disconnect");const t=Po();Rt(t,pB),TM(t,0),ka(t,this.peerId),$l(this,$0(t)),qEe(this.name,this._bcSubscriber),this.bcconnected=!1,this.doc.off("update",this._docUpdateHandler),this.awareness.off("update",this._awarenessUpdateHandler),this.webrtcConns.forEach(n=>n.destroy())}destroy(){this.disconnect(),typeof window<"u"?window.removeEventListener("beforeunload",this._beforeUnloadHandler):typeof process<"u"&&process.off("exit",this._beforeUnloadHandler)}}const UEe=(e,t,n,o)=>{if(Ca.has(n))throw Ci(`A Yjs Doc connected to room "${n}" already exists!`);const r=new HEe(e,t,n,o);return Ca.set(n,r),r},Kx=(e,t,n)=>{t.key?FEe(n,t.key).then(o=>{e.send({type:"publish",topic:t.name,data:Woe(o)})}):e.send({type:"publish",topic:t.name,data:n})};class $re extends wEe{constructor(t){super(t),this.providers=new Set,this.on("connect",()=>{$o(`connected (${t})`);const n=Array.from(Ca.keys());this.send({type:"subscribe",topics:n}),Ca.forEach(o=>Kx(this,o,{type:"announce",from:o.peerId}))}),this.on("message",n=>{switch(n.type){case"publish":{const o=n.topic,r=Ca.get(o);if(r==null||typeof o!="string")return;const s=i=>{const c=r.webrtcConns,l=r.peerId;if(i==null||i.from===l||i.to!==void 0&&i.to!==l||r.bcConns.has(i.from))return;const u=c.has(i.from)?()=>{}:()=>r.provider.emit("peers",[{removed:[],added:[i.from],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}]);switch(i.type){case"announce":c.sizenew qv(this,!0,i.from,r)),u());break;case"signal":if(i.signal.type==="offer"){const d=c.get(i.from);if(d){const p=i.token,f=d.glareToken;if(f&&f>p){$o("offer rejected: ",i.from);return}d.glareToken=void 0}}if(i.signal.type==="answer"){$o("offer answered by: ",i.from);const d=c.get(i.from);d.glareToken=void 0}i.to===l&&(Vr(c,i.from,()=>new qv(this,!1,i.from,r)).peer.signal(i.signal),u());break}};r.key?typeof n.data=="string"&&jre(KN(n.data),r.key).then(s):s(n.data)}}}),this.on("disconnect",()=>$o(`disconnect (${t})`))}}class XEe extends o3{constructor(t,n,{signaling:o=["wss://y-webrtc-eu.fly.dev"],password:r=null,awareness:s=new PEe(n),maxConns:i=20+La(l8e()*15),filterBcConns:c=!0,peerOpts:l={}}={}){super(),this.roomName=t,this.doc=n,this.filterBcConns=c,this.awareness=s,this.shouldConnect=!1,this.signalingUrls=o,this.signalingConns=[],this.maxConns=i,this.peerOpts=l,this.key=r?DEe(r,t):UN(null),this.room=null,this.key.then(u=>{this.room=UEe(n,this,t,u),this.shouldConnect?this.room.connect():this.room.disconnect()}),this.connect(),this.destroy=this.destroy.bind(this),n.on("destroy",this.destroy)}get connected(){return this.room!==null&&this.shouldConnect}connect(){this.shouldConnect=!0,this.signalingUrls.forEach(t=>{const n=Vr(jM,t,()=>new $re(t));this.signalingConns.push(n),n.providers.add(this)}),this.room&&this.room.connect()}disconnect(){this.shouldConnect=!1,this.signalingConns.forEach(t=>{t.providers.delete(this),t.providers.size===0&&(t.destroy(),jM.delete(t.url))}),this.room&&this.room.disconnect()}destroy(){this.doc.off("destroy",this.destroy),this.key.then(()=>{this.room.destroy(),Ca.delete(this.roomName)}),super.destroy()}}function GEe(e,t){e.on("connect",()=>{$o(`connected (${t})`);const n=Array.from(Ca.keys());e.send({type:"subscribe",topics:n}),Ca.forEach(o=>Kx(e,o,{type:"announce",from:o.peerId}))}),e.on("message",n=>{switch(n.type){case"publish":{const o=n.topic,r=Ca.get(o);if(r===null||typeof o!="string"||r===void 0)return;const s=i=>{const c=r.webrtcConns,l=r.peerId;if(i===null||i.from===l||i.to!==void 0&&i.to!==l||r.bcConns.has(i.from))return;const u=c.has(i.from)?()=>{}:()=>r.provider.emit("peers",[{removed:[],added:[i.from],webrtcPeers:Array.from(r.webrtcConns.keys()),bcPeers:Array.from(r.bcConns)}]);switch(i.type){case"announce":c.sizenew qv(e,!0,i.from,r)),u());break;case"signal":if(i.signal.type==="offer"){const d=c.get(i.from);if(d){const p=i.token,f=d.glareToken;if(f&&f>p){$o("offer rejected: ",i.from);return}d.glareToken=void 0}}if(i.signal.type==="answer"){$o("offer answered by: ",i.from);const d=c.get(i.from);d&&(d.glareToken=void 0)}i.to===l&&(Vr(c,i.from,()=>new qv(e,!1,i.from,r)).peer.signal(i.signal),u());break}};r.key?typeof n.data=="string"&&jre(KN(n.data),r.key).then(s):s(n.data)}}}),e.on("disconnect",()=>$o(`disconnect (${t})`))}function EV(e){if(e.shouldConnect&&e.ws===null){const t=Math.floor(1e5+Math.random()*9e5),n=e.url,o=new window.EventSource(St(n,{subscriber_id:t,action:"gutenberg_signaling_server"}));let r=null;o.onmessage=l=>{e.lastMessageReceived=Date.now();const u=l.data;if(u){const d=JSON.parse(u);Array.isArray(d)&&d.forEach(s)}},e.ws=o,e.connecting=!0,e.connected=!1;const s=l=>{l&&l.type==="pong"&&(clearTimeout(r),r=setTimeout(c,Rv/2)),e.emit("message",[l,e])},i=l=>{e.ws!==null&&(e.ws.close(),e.ws=null,e.connecting=!1,e.connected?(e.connected=!1,e.emit("disconnect",[{type:"disconnect",error:l},e])):e.unsuccessfulReconnects++),clearTimeout(r)},c=()=>{e.ws&&e.ws.readyState===window.EventSource.OPEN&&e.send({type:"ping"})};e.ws&&(e.ws.onclose=()=>{i(null)},e.ws.send=function(u){window.fetch(n,{body:new URLSearchParams({subscriber_id:t.toString(),action:"gutenberg_signaling_server",message:u}),method:"POST"}).catch(()=>{$o("Error sending to server with message: "+u)})}),o.onerror=()=>{},o.onopen=()=>{e.connected||o.readyState===window.EventSource.OPEN&&(e.lastMessageReceived=Date.now(),e.connecting=!1,e.connected=!0,e.unsuccessfulReconnects=0,e.emit("connect",[{type:"connect"},e]),r=setTimeout(c,Rv/2))}}}const Rv=3e4;class KEe extends o3{constructor(t){super(),this.url=t,this.ws=null,this.binaryType=null,this.connected=!1,this.connecting=!1,this.unsuccessfulReconnects=0,this.lastMessageReceived=0,this.shouldConnect=!0,this._checkInterval=setInterval(()=>{this.connected&&Rv{const n=Vr(jM,t,t.startsWith("ws://")||t.startsWith("wss://")?()=>new $re(t):()=>new KEe(t));this.signalingConns.push(n),n.providers.add(this)}),this.room&&this.room.connect()}}function ZEe({signaling:e,password:t}){return function(n,o,r){const s=`${o}-${n}`;return new YEe(s,r,{signaling:e,password:t}),Promise.resolve(()=>!0)}}const QEe=(e,t)=>{const n={},o={},r={};function s(u,d){n[u]=d}async function i(u,d,p){const f=new Oh;r[u]=r[u]||{},r[u][d]=f;const b=()=>{const z=n[u].fromCRDTDoc(f);p(z)};f.on("update",b);const h=await e(d,u,f);t&&await t(d,u,f);const g=n[u].fetch;g&&g(d).then(z=>{f.transact(()=>{n[u].applyChangesToDoc(f,z)})}),o[u]=o[u]||{},o[u][d]=()=>{h(),f.off("update",b)}}async function c(u,d,p){const f=r[u][d];if(!f)throw"Error doc "+u+" "+d+" not found";f.transact(()=>{n[u].applyChangesToDoc(f,p)})}async function l(u,d){o?.[u]?.[d]&&o[u][d]()}return{register:s,bootstrap:i,update:c,discard:l}};let nS;function PM(){return nS||(nS=QEe(vEe,ZEe({signaling:[window?.wp?.ajax?.settings?.url],password:window?.__experimentalCollaborativeEditingSecret}))),nS}function JEe(e,t){return{type:"RECEIVE_USER_QUERY",users:Array.isArray(t)?t:[t],queryID:e}}function eWe(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function Vre(e){return{type:"ADD_ENTITIES",entities:e}}function tWe(e,t,n,o,r=!1,s,i){e==="postType"&&(n=(Array.isArray(n)?n:[n]).map(l=>l.status==="auto-draft"?{...l,title:""}:l));let c;return o?c=lqe(n,o,s,i):c=roe(n,s,i),{...c,kind:e,name:t,invalidateCache:r}}function nWe(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function oWe(e){return{type:"RECEIVE_CURRENT_GLOBAL_STYLES_ID",id:e}}function rWe(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLES",stylesheet:e,globalStyles:t}}function sWe(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS",stylesheet:e,variations:t}}function iWe(){return qe("wp.data.dispatch( 'core' ).receiveThemeSupports",{since:"5.9"}),{type:"DO_NOTHING"}}function aWe(e,t){return qe("wp.data.dispatch( 'core' ).receiveThemeGlobalStyleRevisions()",{since:"6.5.0",alternative:"wp.data.dispatch( 'core' ).receiveRevisions"}),{type:"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS",currentId:e,revisions:t}}function cWe(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}const Hre=(e,t,n,o,{__unstableFetch:r=et,throwOnError:s=!1}={})=>async({dispatch:i})=>{const l=(await i(Za(e,t))).find(f=>f.kind===e&&f.name===t);let u,d=!1;if(!l)return;const p=await i.__unstableAcquireStoreLock(ur,["entities","records",e,t,n],{exclusive:!0});try{i({type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:n});let f=!1;try{let b=`${l.baseURL}/${n}`;o&&(b=St(b,o)),d=await r({path:b,method:"DELETE"}),await i(cqe(e,t,n,!0))}catch(b){f=!0,u=b}if(i({type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:n,error:u}),f&&s)throw u;return d}finally{i.__unstableReleaseStoreLock(p)}},lWe=(e,t,n,o,r={})=>({select:s,dispatch:i})=>{const c=s.getEntityConfig(e,t);if(!c)throw new Error(`The entity being edited (${e}, ${t}) does not have a loaded config.`);const{mergedEdits:l={}}=c,u=s.getRawEntityRecord(e,t,n),d=s.getEditedEntityRecord(e,t,n),p={kind:e,name:t,recordId:n,edits:Object.keys(o).reduce((f,b)=>{const h=u[b],g=d[b],z=l[b]?{...g,...o[b]}:o[b];return f[b]=Yo(h,z)?void 0:z,f},{})};if(window.__experimentalEnableSync&&c.syncConfig){if(globalThis.IS_GUTENBERG_PLUGIN){const f=c.getSyncObjectId(n);PM().update(c.syncObjectType+"--edit",f,p.edits)}}else r.undoIgnore||s.getUndoManager().addRecord([{id:{kind:e,name:t,recordId:n},changes:Object.keys(o).reduce((f,b)=>(f[b]={from:d[b],to:o[b]},f),{})}],r.isCached),i({type:"EDIT_ENTITY_RECORD",...p})},uWe=()=>({select:e,dispatch:t})=>{const n=e.getUndoManager().undo();n&&t({type:"UNDO",record:n})},dWe=()=>({select:e,dispatch:t})=>{const n=e.getUndoManager().redo();n&&t({type:"REDO",record:n})},pWe=()=>({select:e})=>{e.getUndoManager().addRecord()},Ure=(e,t,n,{isAutosave:o=!1,__unstableFetch:r=et,throwOnError:s=!1}={})=>async({select:i,resolveSelect:c,dispatch:l})=>{const d=(await l(Za(e,t))).find(h=>h.kind===e&&h.name===t);if(!d)return;const p=d.key||mr,f=n[p],b=await l.__unstableAcquireStoreLock(ur,["entities","records",e,t,f||Si()],{exclusive:!0});try{for(const[A,x]of Object.entries(n))if(typeof x=="function"){const v=x(i.getEditedEntityRecord(e,t,f));l.editEntityRecord(e,t,f,{[A]:v},{undoIgnore:!0}),n[A]=v}l({type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:f,isAutosave:o});let h,g,z=!1;try{const A=`${d.baseURL}${f?"/"+f:""}`,x=i.getRawEntityRecord(e,t,f);if(o){const v=i.getCurrentUser(),M=v?v.id:void 0,y=await c.getAutosave(x.type,x.id,M);let _={...x,...y,...n};if(_=Object.keys(_).reduce((w,k)=>(["title","excerpt","content","meta"].includes(k)&&(w[k]=_[k]),w),{status:_.status==="auto-draft"?"draft":void 0}),h=await r({path:`${A}/autosaves`,method:"POST",data:_}),x.id===h.id){let w={...x,..._,...h};w=Object.keys(w).reduce((k,S)=>(["title","excerpt","content"].includes(S)?k[S]=w[S]:S==="status"?k[S]=x.status==="auto-draft"&&w.status==="draft"?w.status:x.status:k[S]=x[S],k),{}),l.receiveEntityRecords(e,t,w,void 0,!0)}else l.receiveAutosaves(x.id,h)}else{let v=n;d.__unstablePrePersist&&(v={...v,...d.__unstablePrePersist(x,v)}),h=await r({path:A,method:f?"PUT":"POST",data:v}),l.receiveEntityRecords(e,t,h,void 0,!0,v)}}catch(A){z=!0,g=A}if(l({type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:f,error:g,isAutosave:o}),z&&s)throw g;return h}finally{l.__unstableReleaseStoreLock(b)}},fWe=e=>async({dispatch:t})=>{const n=wRe(),o={saveEntityRecord(i,c,l,u){return n.add(d=>t.saveEntityRecord(i,c,l,{...u,__unstableFetch:d}))},saveEditedEntityRecord(i,c,l,u){return n.add(d=>t.saveEditedEntityRecord(i,c,l,{...u,__unstableFetch:d}))},deleteEntityRecord(i,c,l,u,d){return n.add(p=>t.deleteEntityRecord(i,c,l,u,{...d,__unstableFetch:p}))}},r=e.map(i=>i(o)),[,...s]=await Promise.all([n.run(),...r]);return s},bWe=(e,t,n,o)=>async({select:r,dispatch:s})=>{if(!r.hasEditsForEntityRecord(e,t,n))return;const c=(await s(Za(e,t))).find(p=>p.kind===e&&p.name===t);if(!c)return;const l=c.key||mr,u=r.getEntityRecordNonTransientEdits(e,t,n),d={[l]:n,...u};return await s.saveEntityRecord(e,t,d,o)},hWe=(e,t,n,o,r)=>async({select:s,dispatch:i})=>{if(!s.hasEditsForEntityRecord(e,t,n))return;const c=s.getEntityRecordNonTransientEdits(e,t,n),l={};for(const f of o)jx(l,f,iqe(c,f));const p=(await i(Za(e,t))).find(f=>f.kind===e&&f.name===t)?.key||mr;return n&&(l[p]=n),await i.saveEntityRecord(e,t,l,r)};function mWe(e){return qe("wp.data.dispatch( 'core' ).receiveUploadPermissions",{since:"5.9",alternative:"receiveUserPermission"}),Xre("create/media",e)}function Xre(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function gWe(e){return{type:"RECEIVE_USER_PERMISSIONS",permissions:e}}function MWe(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:Array.isArray(t)?t:[t]}}function zWe(e){return{type:"RECEIVE_NAVIGATION_FALLBACK_ID",fallbackId:e}}function OWe(e,t){return{type:"RECEIVE_DEFAULT_TEMPLATE",query:e,templateId:t}}const yWe=(e,t,n,o,r,s=!1,i)=>async({dispatch:c})=>{const u=(await c(Za(e,t))).find(p=>p.kind===e&&p.name===t),d=u&&u?.revisionKey?u.revisionKey:mr;c({type:"RECEIVE_ITEM_REVISIONS",key:d,items:Array.isArray(o)?o:[o],recordKey:n,meta:i,query:r,kind:e,name:t,invalidateCache:s})},AWe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalBatch:fWe,__experimentalReceiveCurrentGlobalStylesId:oWe,__experimentalReceiveThemeBaseGlobalStyles:rWe,__experimentalReceiveThemeGlobalStyleVariations:sWe,__experimentalSaveSpecifiedEntityEdits:hWe,__unstableCreateUndoLevel:pWe,addEntities:Vre,deleteEntityRecord:Hre,editEntityRecord:lWe,receiveAutosaves:MWe,receiveCurrentTheme:nWe,receiveCurrentUser:eWe,receiveDefaultTemplateId:OWe,receiveEmbedPreview:cWe,receiveEntityRecords:tWe,receiveNavigationFallbackId:zWe,receiveRevisions:yWe,receiveThemeGlobalStyleRevisions:aWe,receiveThemeSupports:iWe,receiveUploadPermissions:mWe,receiveUserPermission:Xre,receiveUserPermissions:gWe,receiveUserQuery:JEe,redo:dWe,saveEditedEntityRecord:bWe,saveEntityRecord:Ure,undo:uWe},Symbol.toStringTag,{value:"Module"})),mr="id",vWe=["title","excerpt","content"],Gre=[{label:m("Base"),kind:"root",name:"__unstableBase",baseURL:"/",baseURLParams:{_fields:["description","gmt_offset","home","name","site_icon","site_icon_url","site_logo","timezone_string","url"].join(",")},plural:"__unstableBases",syncConfig:{fetch:async()=>et({path:"/"}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach(([o,r])=>{n.get(o)!==r&&n.set(o,r)})},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/base",getSyncObjectId:()=>"index"},{label:m("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"},plural:"postTypes",syncConfig:{fetch:async e=>et({path:`/wp/v2/types/${e}?context=edit`}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach(([o,r])=>{n.get(o)!==r&&n.set(o,r)})},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/postType",getSyncObjectId:e=>e},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:m("Media"),rawAttributes:["caption","title","description"],supportsPagination:!0},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:m("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",baseURLParams:{context:"edit"},plural:"sidebars",transientEdits:{blocks:!0},label:m("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:m("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:m("Widget types")},{label:m("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",baseURLParams:{context:"edit"},plural:"users"},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",baseURLParams:{context:"edit"},plural:"comments",label:m("Comment")},{name:"menu",kind:"root",baseURL:"/wp/v2/menus",baseURLParams:{context:"edit"},plural:"menus",label:m("Menu")},{name:"menuItem",kind:"root",baseURL:"/wp/v2/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:m("Menu Item"),rawAttributes:["title"]},{name:"menuLocation",kind:"root",baseURL:"/wp/v2/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:m("Menu Location"),key:"name"},{label:m("Global Styles"),name:"globalStyles",kind:"root",baseURL:"/wp/v2/global-styles",baseURLParams:{context:"edit"},plural:"globalStylesVariations",getTitle:e=>e?.title?.rendered||e?.title,getRevisionsUrl:(e,t)=>`/wp/v2/global-styles/${e}/revisions${t?"/"+t:""}`,supportsPagination:!0},{label:m("Themes"),name:"theme",kind:"root",baseURL:"/wp/v2/themes",baseURLParams:{context:"edit"},plural:"themes",key:"stylesheet"},{label:m("Plugins"),name:"plugin",kind:"root",baseURL:"/wp/v2/plugins",baseURLParams:{context:"edit"},plural:"plugins",key:"plugin"},{label:m("Status"),name:"status",kind:"root",baseURL:"/wp/v2/statuses",baseURLParams:{context:"edit"},plural:"statuses",key:"slug"}],Kre=[{kind:"postType",loadEntities:wWe},{kind:"taxonomy",loadEntities:kWe},{kind:"root",name:"site",plural:"sites",loadEntities:SWe}],xWe=(e,t)=>{const n={};return e?.status==="auto-draft"&&(!t.status&&!n.status&&(n.status="draft"),(!t.title||t.title==="Auto Draft")&&!n.title&&(!e?.title||e?.title==="Auto Draft")&&(n.title="")),n},oS=new WeakMap;function _We(e){const t={...e};for(const[n,o]of Object.entries(e))o instanceof p0&&(t[n]=o.valueOf());return t}function Yre(e){return e.map(t=>{const{innerBlocks:n,attributes:o,...r}=t;return{...r,attributes:_We(o),innerBlocks:Yre(n)}})}async function wWe(){const e=await et({path:"/wp/v2/types?context=view"});return Object.entries(e??{}).map(([t,n])=>{var o;const r=["wp_template","wp_template_part"].includes(t),s=(o=n?.rest_namespace)!==null&&o!==void 0?o:"wp/v2";return{kind:"postType",baseURL:`/${s}/${n.rest_base}`,baseURLParams:{context:"edit"},name:t,label:n.name,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:vWe,getTitle:i=>{var c;return i?.title?.rendered||i?.title||(r?Fne((c=i.slug)!==null&&c!==void 0?c:""):String(i.id))},__unstablePrePersist:r?void 0:xWe,__unstable_rest_base:n.rest_base,syncConfig:{fetch:async i=>et({path:`/${s}/${n.rest_base}/${i}?context=edit`}),applyChangesToDoc:(i,c)=>{const l=i.getMap("document");Object.entries(c).forEach(([u,d])=>{typeof d!="function"&&(u==="blocks"&&(oS.has(d)||oS.set(d,Yre(d)),d=oS.get(d)),l.get(u)!==d&&l.set(u,d))})},fromCRDTDoc:i=>i.getMap("document").toJSON()},syncObjectType:"postType/"+n.name,getSyncObjectId:i=>i,supportsPagination:!0,getRevisionsUrl:(i,c)=>`/${s}/${n.rest_base}/${i}/revisions${c?"/"+c:""}`,revisionKey:r?"wp_id":mr}})}async function kWe(){const e=await et({path:"/wp/v2/taxonomies?context=view"});return Object.entries(e??{}).map(([t,n])=>{var o;return{kind:"taxonomy",baseURL:`/${(o=n?.rest_namespace)!==null&&o!==void 0?o:"wp/v2"}/${n.rest_base}`,baseURLParams:{context:"edit"},name:t,label:n.name}})}async function SWe(){var e;const t={label:m("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",syncConfig:{fetch:async()=>et({path:"/wp/v2/settings"}),applyChangesToDoc:(r,s)=>{const i=r.getMap("document");Object.entries(s).forEach(([c,l])=>{i.get(c)!==l&&i.set(c,l)})},fromCRDTDoc:r=>r.getMap("document").toJSON()},syncObjectType:"root/site",getSyncObjectId:()=>"index",meta:{}},n=await et({path:t.baseURL,method:"OPTIONS"}),o={};return Object.entries((e=n?.schema?.properties)!==null&&e!==void 0?e:{}).forEach(([r,s])=>{typeof s=="object"&&s.title&&(o[r]=s.title)}),[{...t,meta:{labels:o}}]}const Nb=(e,t,n="get")=>{const o=e==="root"?"":bv(e),r=bv(t);return`${n}${o}${r}`};function WV(e){e.forEach(({syncObjectType:t,syncConfig:n})=>{PM().register(t,n);const o={...n};delete o.fetch,PM().register(t+"--edit",o)})}const Za=(e,t)=>async({select:n,dispatch:o})=>{let r=n.getEntitiesConfig(e);const s=!!n.getEntityConfig(e,t);if(r?.length>0&&s)return window.__experimentalEnableSync&&globalThis.IS_GUTENBERG_PLUGIN&&WV(r),r;const i=Kre.find(c=>!t||!c.name?c.kind===e:c.kind===e&&c.name===t);return i?(r=await i.loadEntities(),window.__experimentalEnableSync&&globalThis.IS_GUTENBERG_PLUGIN&&WV(r),o(Vre(r)),r):[]};function Zre(e){const{query:t}=e;return t?gh(t).context:"default"}function CWe(e,t,n,o){var r;if(n===1&&o===-1)return t;const i=(n-1)*o,c=Math.max((r=e?.length)!==null&&r!==void 0?r:0,i+t.length),l=new Array(c);for(let u=0;u=i&&u!t.some(o=>Number.isInteger(o)?o===+n:o===n)))}function qWe(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=Zre(t),o=t.key||mr;return{...e,[n]:{...e[n],...t.items.reduce((r,s)=>{const i=s?.[o];return r[i]=oqe(e?.[n]?.[i],s),r},{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,Qre(o,t.itemIds)]))}return e}function RWe(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=Zre(t),{query:o,key:r=mr}=t,s=o?gh(o):{},i=!o||!Array.isArray(s.fields);return{...e,[n]:{...e[n],...t.items.reduce((c,l)=>{const u=l?.[r];return c[u]=e?.[n]?.[u]||i,c},{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,Qre(o,t.itemIds)]))}return e}const TWe=Wn([noe(e=>"query"in e),ooe(e=>e.query?{...e,...gh(e.query)}:e),Z$("context"),Z$("stableKey")])((e={},t)=>{const{type:n,page:o,perPage:r,key:s=mr}=t;return n!=="RECEIVE_ITEMS"?e:{itemIds:CWe(e?.itemIds||[],t.items.map(i=>i?.[s]).filter(Boolean),o,r),meta:t.meta}}),EWe=(e={},t)=>{switch(t.type){case"RECEIVE_ITEMS":return TWe(e,t);case"REMOVE_ITEMS":const n=t.itemIds.reduce((o,r)=>(o[r]=!0,o),{});return Object.fromEntries(Object.entries(e).map(([o,r])=>[o,Object.fromEntries(Object.entries(r).map(([s,i])=>[s,{...i,itemIds:i.itemIds.filter(c=>!n[c])}]))]));default:return e}},NV=hr({items:qWe,itemIsComplete:RWe,queries:EWe});function WWe(e={},t){switch(t.type){case"RECEIVE_TERMS":return{...e,[t.taxonomy]:t.terms}}return e}function NWe(e={byId:{},queries:{}},t){switch(t.type){case"RECEIVE_USER_QUERY":return{byId:{...e.byId,...t.users.reduce((n,o)=>({...n,[o.id]:o}),{})},queries:{...e.queries,[t.queryID]:t.users.map(n=>n.id)}}}return e}function BWe(e={},t){switch(t.type){case"RECEIVE_CURRENT_USER":return t.currentUser}return e}function LWe(e=[],t){switch(t.type){case"RECEIVE_TAXONOMIES":return t.taxonomies}return e}function jWe(e=void 0,t){switch(t.type){case"RECEIVE_CURRENT_THEME":return t.currentTheme.stylesheet}return e}function PWe(e=void 0,t){switch(t.type){case"RECEIVE_CURRENT_GLOBAL_STYLES_ID":return t.id}return e}function IWe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLES":return{...e,[t.stylesheet]:t.globalStyles}}return e}function DWe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS":return{...e,[t.stylesheet]:t.variations}}return e}const FWe=e=>(t,n)=>{if(n.type==="UNDO"||n.type==="REDO"){const{record:o}=n;let r=t;return o.forEach(({id:{kind:s,name:i,recordId:c},changes:l})=>{r=e(r,{type:"EDIT_ENTITY_RECORD",kind:s,name:i,recordId:c,edits:Object.entries(l).reduce((u,[d,p])=>(u[d]=n.type==="UNDO"?p.from:p.to,u),{})})}),r}return e(t,n)};function $We(e){return Wn([FWe,noe(t=>t.name&&t.kind&&t.name===e.name&&t.kind===e.kind),ooe(t=>({key:e.key||mr,...t}))])(hr({queriedData:NV,edits:(t={},n)=>{var o;switch(n.type){case"RECEIVE_ITEMS":if(((o=n?.query?.context)!==null&&o!==void 0?o:"default")!=="default")return t;const s={...t};for(const c of n.items){const l=c?.[n.key],u=s[l];if(!u)continue;const d=Object.keys(u).reduce((p,f)=>{var b;return!Yo(u[f],(b=c[f]?.raw)!==null&&b!==void 0?b:c[f])&&(!n.persistedEdits||!Yo(u[f],n.persistedEdits[f]))&&(p[f]=u[f]),p},{});Object.keys(d).length?s[l]=d:delete s[l]}return s;case"EDIT_ENTITY_RECORD":const i={...t[n.recordId],...n.edits};return Object.keys(i).forEach(c=>{i[c]===void 0&&delete i[c]}),{...t,[n.recordId]:i}}return t},saving:(t={},n)=>{switch(n.type){case"SAVE_ENTITY_RECORD_START":case"SAVE_ENTITY_RECORD_FINISH":return{...t,[n.recordId]:{pending:n.type==="SAVE_ENTITY_RECORD_START",error:n.error,isAutosave:n.isAutosave}}}return t},deleting:(t={},n)=>{switch(n.type){case"DELETE_ENTITY_RECORD_START":case"DELETE_ENTITY_RECORD_FINISH":return{...t,[n.recordId]:{pending:n.type==="DELETE_ENTITY_RECORD_START",error:n.error}}}return t},revisions:(t={},n)=>{if(n.type==="RECEIVE_ITEM_REVISIONS"){const o=n.recordKey;delete n.recordKey;const r=NV(t[o],{...n,type:"RECEIVE_ITEMS"});return{...t,[o]:r}}return n.type==="REMOVE_ITEMS"?Object.fromEntries(Object.entries(t).filter(([o])=>!n.itemIds.some(r=>Number.isInteger(r)?r===+o:r===o))):t}}))}function VWe(e=Gre,t){switch(t.type){case"ADD_ENTITIES":return[...e,...t.entities]}return e}const HWe=(e={},t)=>{const n=VWe(e.config,t);let o=e.reducer;if(!o||n!==e.config){const s=n.reduce((i,c)=>{const{kind:l}=c;return i[l]||(i[l]=[]),i[l].push(c),i},{});o=hr(Object.entries(s).reduce((i,[c,l])=>{const u=hr(l.reduce((d,p)=>({...d,[p.name]:$We(p)}),{}));return i[c]=u,i},{}))}const r=o(e.records,t);return r===e.records&&n===e.config&&o===e.reducer?e:{reducer:o,records:r,config:n}};function UWe(e=ESe()){return e}function XWe(e={},t){switch(t.type){case"EDIT_ENTITY_RECORD":case"UNDO":case"REDO":return{}}return e}function GWe(e={},t){switch(t.type){case"RECEIVE_EMBED_PREVIEW":const{url:n,preview:o}=t;return{...e,[n]:o}}return e}function KWe(e={},t){switch(t.type){case"RECEIVE_USER_PERMISSION":return{...e,[t.key]:t.isAllowed};case"RECEIVE_USER_PERMISSIONS":return{...e,...t.permissions}}return e}function YWe(e={},t){switch(t.type){case"RECEIVE_AUTOSAVES":const{postId:n,autosaves:o}=t;return{...e,[n]:o}}return e}function ZWe(e=[],t){switch(t.type){case"RECEIVE_BLOCK_PATTERNS":return t.patterns}return e}function QWe(e=[],t){switch(t.type){case"RECEIVE_BLOCK_PATTERN_CATEGORIES":return t.categories}return e}function JWe(e=[],t){switch(t.type){case"RECEIVE_USER_PATTERN_CATEGORIES":return t.patternCategories}return e}function eNe(e=null,t){switch(t.type){case"RECEIVE_NAVIGATION_FALLBACK_ID":return t.fallbackId}return e}function tNe(e={},t){switch(t.type){case"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS":return{...e,[t.currentId]:t.revisions}}return e}function nNe(e={},t){switch(t.type){case"RECEIVE_DEFAULT_TEMPLATE":return{...e,[JSON.stringify(t.query)]:t.templateId}}return e}function oNe(e={},t){switch(t.type){case"RECEIVE_REGISTERED_POST_META":return{...e,[t.postType]:t.registeredPostMeta}}return e}const rNe=hr({terms:WWe,users:NWe,currentTheme:jWe,currentGlobalStylesId:PWe,currentUser:BWe,themeGlobalStyleVariations:DWe,themeBaseGlobalStyles:IWe,themeGlobalStyleRevisions:tNe,taxonomies:LWe,entities:HWe,editsReference:XWe,undoManager:UWe,embedPreviews:GWe,userPermissions:KWe,autosaves:YWe,blockPatterns:ZWe,blockPatternCategories:QWe,userPatternCategories:JWe,navigationFallbackId:eNe,defaultTemplates:nNe,registeredPostMeta:oNe}),sNe={},iNe=Je(e=>(t,n)=>e(ur).isResolving("getEmbedPreview",[n]));function aNe(e,t){qe("select( 'core' ).getAuthors()",{since:"5.9",alternative:"select( 'core' ).getUsers({ who: 'authors' })"});const n=St("/wp/v2/users/?who=authors&per_page=100",t);return Jre(e,n)}function cNe(e){return e.currentUser}const Jre=ct((e,t)=>{var n;return((n=e.users.queries[t])!==null&&n!==void 0?n:[]).map(r=>e.users.byId[r])},(e,t)=>[e.users.queries[t],e.users.byId]);function lNe(e,t){return qe("wp.data.select( 'core' ).getEntitiesByKind()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntitiesConfig()"}),e1e(e,t)}const e1e=ct((e,t)=>e.entities.config.filter(n=>n.kind===t),(e,t)=>e.entities.config);function uNe(e,t,n){return qe("wp.data.select( 'core' ).getEntity()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntityConfig()"}),Ah(e,t,n)}function Ah(e,t,n){return e.entities.config?.find(o=>o.kind===t&&o.name===n)}const gf=ct((e,t,n,o,r)=>{var s;const i=e.entities.records?.[t]?.[n]?.queriedData;if(!i)return;const c=(s=r?.context)!==null&&s!==void 0?s:"default";if(r===void 0)return i.itemIsComplete[c]?.[o]?i.items[c][o]:void 0;const l=i.items[c]?.[o];if(l&&r._fields){var u;const d={},p=(u=Wu(r._fields))!==null&&u!==void 0?u:[];for(let f=0;f{h=h?.[g]}),jx(d,b,h)}return d}return l},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.records?.[t]?.[n]?.queriedData?.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData?.itemIsComplete[i]?.[o]]});gf.__unstableNormalizeArgs=e=>{const t=[...e],n=t?.[2];return t[2]=aqe(n)?Number(n):n,t};function dNe(e,t,n,o){return gf(e,t,n,o)}const t1e=ct((e,t,n,o)=>{const r=gf(e,t,n,o);return r&&Object.keys(r).reduce((s,i)=>{if(sqe(Ah(e,t,n),i)){var c;s[i]=(c=r[i]?.raw)!==null&&c!==void 0?c:r[i]}else s[i]=r[i];return s},{})},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.config,e.entities.records?.[t]?.[n]?.queriedData?.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData?.itemIsComplete[i]?.[o]]});function pNe(e,t,n,o){return Array.isArray(Yx(e,t,n,o))}const Yx=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;return r?soe(r,o):null},fNe=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;return r?ioe(r,o):null},bNe=(e,t,n,o)=>{const r=e.entities.records?.[t]?.[n]?.queriedData;if(!r)return null;if(o.per_page===-1)return 1;const s=ioe(r,o);return s&&(o.per_page?Math.ceil(s/o.per_page):pqe(r,o))},hNe=ct(e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach(o=>{Object.keys(t[o]).forEach(r=>{const s=Object.keys(t[o][r].edits).filter(i=>gf(e,o,r,i)&&o1e(e,o,r,i));if(s.length){const i=Ah(e,o,r);s.forEach(c=>{const l=Zx(e,o,r,c);n.push({key:l?l[i.key||mr]:void 0,title:i?.getTitle?.(l)||"",name:r,kind:o})})}})}),n},e=>[e.entities.records]),mNe=ct(e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach(o=>{Object.keys(t[o]).forEach(r=>{const s=Object.keys(t[o][r].saving).filter(i=>bB(e,o,r,i));if(s.length){const i=Ah(e,o,r);s.forEach(c=>{const l=Zx(e,o,r,c);n.push({key:l?l[i.key||mr]:void 0,title:i?.getTitle?.(l)||"",name:r,kind:o})})}})}),n},e=>[e.entities.records]);function fB(e,t,n,o){return e.entities.records?.[t]?.[n]?.edits?.[o]}const n1e=ct((e,t,n,o)=>{const{transientEdits:r}=Ah(e,t,n)||{},s=fB(e,t,n,o)||{};return r?Object.keys(s).reduce((i,c)=>(r[c]||(i[c]=s[c]),i),{}):s},(e,t,n,o)=>[e.entities.config,e.entities.records?.[t]?.[n]?.edits?.[o]]);function o1e(e,t,n,o){return bB(e,t,n,o)||Object.keys(n1e(e,t,n,o)).length>0}const Zx=ct((e,t,n,o)=>{const r=t1e(e,t,n,o),s=fB(e,t,n,o);return!r&&!s?!1:{...r,...s}},(e,t,n,o,r)=>{var s;const i=(s=r?.context)!==null&&s!==void 0?s:"default";return[e.entities.config,e.entities.records?.[t]?.[n]?.queriedData.items[i]?.[o],e.entities.records?.[t]?.[n]?.queriedData.itemIsComplete[i]?.[o],e.entities.records?.[t]?.[n]?.edits?.[o]]});function gNe(e,t,n,o){var r;const{pending:s,isAutosave:i}=(r=e.entities.records?.[t]?.[n]?.saving?.[o])!==null&&r!==void 0?r:{};return!!(s&&i)}function bB(e,t,n,o){var r;return(r=e.entities.records?.[t]?.[n]?.saving?.[o]?.pending)!==null&&r!==void 0?r:!1}function MNe(e,t,n,o){var r;return(r=e.entities.records?.[t]?.[n]?.deleting?.[o]?.pending)!==null&&r!==void 0?r:!1}function zNe(e,t,n,o){return e.entities.records?.[t]?.[n]?.saving?.[o]?.error}function ONe(e,t,n,o){return e.entities.records?.[t]?.[n]?.deleting?.[o]?.error}function yNe(e){qe("select( 'core' ).getUndoEdit()",{since:"6.3"})}function ANe(e){qe("select( 'core' ).getRedoEdit()",{since:"6.3"})}function vNe(e){return e.undoManager.hasUndo()}function xNe(e){return e.undoManager.hasRedo()}function Qx(e){return e.currentTheme?gf(e,"root","theme",e.currentTheme):null}function r1e(e){return e.currentGlobalStylesId}function _Ne(e){var t;return(t=Qx(e)?.theme_supports)!==null&&t!==void 0?t:sNe}function wNe(e,t){return e.embedPreviews[t]}function kNe(e,t){const n=e.embedPreviews[t],o=''+t+"";return n?n.html===o:!1}function s1e(e,t,n,o){if(typeof n=="object"&&(!n.kind||!n.name))return!1;const s=Px(t,n,o);return e.userPermissions[s]}function SNe(e,t,n,o){return qe("wp.data.select( 'core' ).canUserEditEntityRecord()",{since:"6.7",alternative:"wp.data.select( 'core' ).canUser( 'update', { kind, name, id } )"}),s1e(e,"update",{kind:t,name:n,id:o})}function CNe(e,t,n){return e.autosaves[n]}function qNe(e,t,n,o){return o===void 0?void 0:e.autosaves[n]?.find(s=>s.author===o)}const RNe=Je(e=>(t,n,o)=>e(ur).hasFinishedResolution("getAutosaves",[n,o]));function TNe(e){return e.editsReference}function ENe(e,t){const n=Yx(e,"postType","wp_template",{"find-template":t});return n?.length?Zx(e,"postType","wp_template",n[0].id):null}function WNe(e){const t=Qx(e);return t?e.themeBaseGlobalStyles[t.stylesheet]:null}function NNe(e){const t=Qx(e);return t?e.themeGlobalStyleVariations[t.stylesheet]:null}function BNe(e){return e.blockPatterns}function LNe(e){return e.blockPatternCategories}function jNe(e){return e.userPatternCategories}function PNe(e){qe("select( 'core' ).getCurrentThemeGlobalStylesRevisions()",{since:"6.5.0",alternative:"select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )"});const t=r1e(e);return t?e.themeGlobalStyleRevisions[t]:null}function INe(e,t){return e.defaultTemplates[JSON.stringify(t)]}const DNe=(e,t,n,o,r)=>{const s=e.entities.records?.[t]?.[n]?.revisions?.[o];return s?soe(s,r):null},FNe=ct((e,t,n,o,r,s)=>{var i;const c=e.entities.records?.[t]?.[n]?.revisions?.[o];if(!c)return;const l=(i=s?.context)!==null&&i!==void 0?i:"default";if(s===void 0)return c.itemIsComplete[l]?.[r]?c.items[l][r]:void 0;const u=c.items[l]?.[r];if(u&&s._fields){var d;const p={},f=(d=Wu(s._fields))!==null&&d!==void 0?d:[];for(let b=0;b{g=g?.[z]}),jx(p,h,g)}return p}return u},(e,t,n,o,r,s)=>{var i;const c=(i=s?.context)!==null&&i!==void 0?i:"default";return[e.entities.records?.[t]?.[n]?.revisions?.[o]?.items?.[c]?.[r],e.entities.records?.[t]?.[n]?.revisions?.[o]?.itemIsComplete?.[c]?.[r]]}),$Ne=Object.freeze(Object.defineProperty({__proto__:null,__experimentalGetCurrentGlobalStylesId:r1e,__experimentalGetCurrentThemeBaseGlobalStyles:WNe,__experimentalGetCurrentThemeGlobalStylesVariations:NNe,__experimentalGetDirtyEntityRecords:hNe,__experimentalGetEntitiesBeingSaved:mNe,__experimentalGetEntityRecordNoResolver:dNe,__experimentalGetTemplateForLink:ENe,canUser:s1e,canUserEditEntityRecord:SNe,getAuthors:aNe,getAutosave:qNe,getAutosaves:CNe,getBlockPatternCategories:LNe,getBlockPatterns:BNe,getCurrentTheme:Qx,getCurrentThemeGlobalStylesRevisions:PNe,getCurrentUser:cNe,getDefaultTemplateId:INe,getEditedEntityRecord:Zx,getEmbedPreview:wNe,getEntitiesByKind:lNe,getEntitiesConfig:e1e,getEntity:uNe,getEntityConfig:Ah,getEntityRecord:gf,getEntityRecordEdits:fB,getEntityRecordNonTransientEdits:n1e,getEntityRecords:Yx,getEntityRecordsTotalItems:fNe,getEntityRecordsTotalPages:bNe,getLastEntityDeleteError:ONe,getLastEntitySaveError:zNe,getRawEntityRecord:t1e,getRedoEdit:ANe,getReferenceByDistinctEdits:TNe,getRevision:FNe,getRevisions:DNe,getThemeSupports:_Ne,getUndoEdit:yNe,getUserPatternCategories:jNe,getUserQueryResults:Jre,hasEditsForEntityRecord:o1e,hasEntityRecords:pNe,hasFetchedAutosaves:RNe,hasRedo:xNe,hasUndo:vNe,isAutosavingEntityRecord:gNe,isDeletingEntityRecord:MNe,isPreviewEmbedFallback:kNe,isRequestingEmbedPreview:iNe,isSavingEntityRecord:bB},Symbol.toStringTag,{value:"Module"}));function VNe(e){return e.undoManager}function HNe(e){return e.navigationFallbackId}const UNe=Je(e=>ct((t,n)=>e(ur).getBlockPatterns().filter(({postTypes:o})=>!o||Array.isArray(o)&&o.includes(n)),()=>[e(ur).getBlockPatterns()])),i1e=Je(e=>ct((t,n,o,r)=>(Array.isArray(r)?r:[r]).map(i=>({delete:e(ur).canUser("delete",{kind:n,name:o,id:i}),update:e(ur).canUser("update",{kind:n,name:o,id:i})})),t=>[t.userPermissions]));function XNe(e,t,n,o){return i1e(e,t,n,o)[0]}function GNe(e,t){var n;return(n=e.registeredPostMeta?.[t])!==null&&n!==void 0?n:{}}const KNe=Object.freeze(Object.defineProperty({__proto__:null,getBlockPatternsForPostType:UNe,getEntityRecordPermissions:XNe,getEntityRecordsPermissions:i1e,getNavigationFallbackId:HNe,getRegisteredPostMeta:GNe,getUndoManager:VNe},Symbol.toStringTag,{value:"Module"}));function YNe(e,t){return{type:"RECEIVE_REGISTERED_POST_META",postType:e,registeredPostMeta:t}}const ZNe=Object.freeze(Object.defineProperty({__proto__:null,receiveRegisteredPostMeta:YNe},Symbol.toStringTag,{value:"Module"}));let Hf;function ht(e){if(typeof e!="string"||e.indexOf("&")===-1)return e;Hf===void 0&&(document.implementation&&document.implementation.createHTMLDocument?Hf=document.implementation.createHTMLDocument("").createElement("textarea"):Hf=document.createElement("textarea")),Hf.innerHTML=e;const t=Hf.textContent;return Hf.innerHTML="",t}async function QNe(e,t={},n={}){const o=t.isInitialSuggestions&&t.initialSuggestionsSearchOptions?{...t,...t.initialSuggestionsSearchOptions}:t,{type:r,subtype:s,page:i,perPage:c=t.isInitialSuggestions?3:20}=o,{disablePostFormats:l=!1}=n,u=[];(!r||r==="post")&&u.push(et({path:St("/wp/v2/search",{search:e,page:i,per_page:c,type:"post",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:ht(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"post-type"}))).catch(()=>[])),(!r||r==="term")&&u.push(et({path:St("/wp/v2/search",{search:e,page:i,per_page:c,type:"term",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:ht(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"taxonomy"}))).catch(()=>[])),!l&&(!r||r==="post-format")&&u.push(et({path:St("/wp/v2/search",{search:e,page:i,per_page:c,type:"post-format",subtype:s})}).then(f=>f.map(b=>({id:b.id,url:b.url,title:ht(b.title||"")||m("(no title)"),type:b.subtype||b.type,kind:"taxonomy"}))).catch(()=>[])),(!r||r==="attachment")&&u.push(et({path:St("/wp/v2/media",{search:e,page:i,per_page:c})}).then(f=>f.map(b=>({id:b.id,url:b.source_url,title:ht(b.title.rendered||"")||m("(no title)"),type:b.type,kind:"media"}))).catch(()=>[]));let p=(await Promise.all(u)).flat();return p=p.filter(f=>!!f.id),p=JNe(p,e),p=p.slice(0,c),p}function JNe(e,t){const n=BV(t),o={};for(const r of e)if(r.title){const s=BV(r.title),i=s.filter(c=>n.some(l=>c.includes(l)));o[r.id]=i.length/s.length}else o[r.id]=0;return e.sort((r,s)=>o[s.id]-o[r.id])}function BV(e){return e.toLowerCase().match(/[\p{L}\p{N}]+/gu)||[]}const rS=new Map,eBe=async(e,t={})=>{const n="/wp-block-editor/v1/url-details",o={url:uf(e)};if(!lf(e))return Promise.reject(`${e} is not a valid URL.`);const r=_x(e);return!r||!mN(r)||!r.startsWith("http")||!/^https?:\/\/[^\/\s]/i.test(e)?Promise.reject(`${e} does not have a valid protocol. URLs must be "http" based`):rS.has(e)?rS.get(e):et({path:St(n,o),...t}).then(s=>(rS.set(e,s),s))};async function tBe(){const e=await et({path:"/wp/v2/block-patterns/patterns"});return e?e.map(t=>Object.fromEntries(Object.entries(t).map(([n,o])=>[fN(n),o]))):[]}const nBe=e=>async({dispatch:t})=>{const n=St("/wp/v2/users/?who=authors&per_page=100",e),o=await et({path:n});t.receiveUserQuery(n,o)},oBe=()=>async({dispatch:e})=>{const t=await et({path:"/wp/v2/users/me"});e.receiveCurrentUser(t)},a1e=(e,t,n="",o)=>async({select:r,dispatch:s,registry:i})=>{const l=(await s(Za(e,t))).find(d=>d.name===t&&d.kind===e);if(!l)return;const u=await s.__unstableAcquireStoreLock(ur,["entities","records",e,t,n],{exclusive:!1});try{if(window.__experimentalEnableSync&&l.syncConfig&&!o){if(globalThis.IS_GUTENBERG_PLUGIN){const d=l.getSyncObjectId(n);await PM().bootstrap(l.syncObjectType,d,p=>{s.receiveEntityRecords(e,t,p,o)}),await PM().bootstrap(l.syncObjectType+"--edit",d,p=>{s({type:"EDIT_ENTITY_RECORD",kind:e,name:t,recordId:n,edits:p,meta:{undo:void 0}})})}}else{o!==void 0&&o._fields&&(o={...o,_fields:[...new Set([...Wu(o._fields)||[],l.key||mr])].join()});const d=St(l.baseURL+(n?"/"+n:""),{...l.baseURLParams,...o});if(o!==void 0&&o._fields&&(o={...o,include:[n]},r.hasEntityRecords(e,t,o)))return;const p=await et({path:d,parse:!1}),f=await p.json(),b=BN(p.headers?.get("allow")),h=[],g={};for(const z of Dg)g[Px(z,{kind:e,name:t,id:n})]=b[z],h.push([z,{kind:e,name:t,id:n}]);i.batch(()=>{s.receiveEntityRecords(e,t,f,o),s.receiveUserPermissions(g),s.finishResolutions("canUser",h)})}}finally{s.__unstableReleaseStoreLock(u)}},rBe=NN("getEntityRecord"),sBe=NN("getEntityRecord"),Tv=(e,t,n={})=>async({dispatch:o,registry:r})=>{const i=(await o(Za(e,t))).find(l=>l.name===t&&l.kind===e);if(!i)return;const c=await o.__unstableAcquireStoreLock(ur,["entities","records",e,t],{exclusive:!1});try{n._fields&&(n={...n,_fields:[...new Set([...Wu(n._fields)||[],i.key||mr])].join()});const l=St(i.baseURL,{...i.baseURLParams,...n});let u,d;if(i.supportsPagination&&n.per_page!==-1){const p=await et({path:l,parse:!1});u=Object.values(await p.json()),d={totalItems:parseInt(p.headers.get("X-WP-Total")),totalPages:parseInt(p.headers.get("X-WP-TotalPages"))}}else u=Object.values(await et({path:l})),d={totalItems:u.length,totalPages:1};n._fields&&(u=u.map(p=>(n._fields.split(",").forEach(f=>{p.hasOwnProperty(f)||(p[f]=void 0)}),p))),r.batch(()=>{if(o.receiveEntityRecords(e,t,u,n,!1,void 0,d),!n?._fields&&!n.context){const p=i.key||mr,f=u.filter(z=>z?.[p]).map(z=>[e,t,z[p]]),b=u.filter(z=>z?.[p]).map(z=>({id:z[p],permissions:BN(z?._links?.self?.[0].targetHints.allow)})),h=[],g={};for(const z of b)for(const A of Dg)h.push([A,{kind:e,name:t,id:z.id}]),g[Px(A,{kind:e,name:t,id:z.id})]=z.permissions[A];o.receiveUserPermissions(g),o.finishResolutions("getEntityRecord",f),o.finishResolutions("canUser",h)}o.__unstableReleaseStoreLock(c)})}catch{o.__unstableReleaseStoreLock(c)}};Tv.shouldInvalidate=(e,t,n)=>(e.type==="RECEIVE_ITEMS"||e.type==="REMOVE_ITEMS")&&e.invalidateCache&&t===e.kind&&n===e.name;const iBe=()=>async({dispatch:e,resolveSelect:t})=>{const n=await t.getEntityRecords("root","theme",{status:"active"});e.receiveCurrentTheme(n[0])},aBe=NN("getCurrentTheme"),cBe=e=>async({dispatch:t})=>{try{const n=await et({path:St("/oembed/1.0/proxy",{url:e})});t.receiveEmbedPreview(e,n)}catch{t.receiveEmbedPreview(e,!1)}},c1e=(e,t,n)=>async({dispatch:o,registry:r})=>{if(!Dg.includes(e))throw new Error(`'${e}' is not a valid action.`);let s=null;if(typeof t=="object"){if(!t.kind||!t.name)throw new Error("The entity resource object is not valid.");const d=(await o(Za(t.kind,t.name))).find(p=>p.name===t.name&&p.kind===t.kind);if(!d)return;s=d.baseURL+(t.id?"/"+t.id:"")}else s=`/wp/v2/${t}`+(n?"/"+n:"");const{hasStartedResolution:i}=r.select(ur);for(const u of Dg){if(u===e)continue;if(i("canUser",[u,t,n]))return}let c;try{c=await et({path:s,method:"OPTIONS",parse:!1})}catch{return}const l=BN(c.headers?.get("allow"));r.batch(()=>{for(const u of Dg){const d=Px(u,t,n);o.receiveUserPermission(d,l[u]),u!==e&&o.finishResolution("canUser",[u,t,n])}})},lBe=(e,t,n)=>async({dispatch:o})=>{await o(c1e("update",{kind:e,name:t,id:n}))},uBe=(e,t)=>async({dispatch:n,resolveSelect:o})=>{const{rest_base:r,rest_namespace:s="wp/v2"}=await o.getPostType(e),i=await et({path:`/${s}/${r}/${t}/autosaves?context=edit`});i&&i.length&&n.receiveAutosaves(t,i)},dBe=(e,t)=>async({resolveSelect:n})=>{await n.getAutosaves(e,t)},l1e=e=>async({dispatch:t,resolveSelect:n})=>{let o;try{o=await et({url:St(e,{"_wp-find-template":!0})}).then(({data:s})=>s)}catch{}if(!o)return;const r=await n.getEntityRecord("postType","wp_template",o.id);r&&t.receiveEntityRecords("postType","wp_template",[r],{"find-template":e})};l1e.shouldInvalidate=e=>(e.type==="RECEIVE_ITEMS"||e.type==="REMOVE_ITEMS")&&e.invalidateCache&&e.kind==="postType"&&e.name==="wp_template";const pBe=()=>async({dispatch:e,resolveSelect:t})=>{const o=(await t.getEntityRecords("root","theme",{status:"active"}))?.[0]?._links?.["wp:user-global-styles"]?.[0]?.href;if(!o)return;const r=o.match(/\/(\d+)(?:\?|$)/),s=r?Number(r[1]):null;s&&e.__experimentalReceiveCurrentGlobalStylesId(s)},fBe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.getCurrentTheme(),o=await et({path:`/wp/v2/global-styles/themes/${n.stylesheet}?context=view`});t.__experimentalReceiveThemeBaseGlobalStyles(n.stylesheet,o)},bBe=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.getCurrentTheme(),o=await et({path:`/wp/v2/global-styles/themes/${n.stylesheet}/variations?context=view`});t.__experimentalReceiveThemeGlobalStyleVariations(n.stylesheet,o)},u1e=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.__experimentalGetCurrentGlobalStylesId(),r=(n?await e.getEntityRecord("root","globalStyles",n):void 0)?._links?.["version-history"]?.[0]?.href;if(r){const i=(await et({url:r}))?.map(c=>Object.fromEntries(Object.entries(c).map(([l,u])=>[fN(l),u])));t.receiveThemeGlobalStyleRevisions(n,i)}};u1e.shouldInvalidate=e=>e.type==="SAVE_ENTITY_RECORD_FINISH"&&e.kind==="root"&&!e.error&&e.name==="globalStyles";const hBe=()=>async({dispatch:e})=>{const t=await tBe();e({type:"RECEIVE_BLOCK_PATTERNS",patterns:t})},mBe=()=>async({dispatch:e})=>{const t=await et({path:"/wp/v2/block-patterns/categories"});e({type:"RECEIVE_BLOCK_PATTERN_CATEGORIES",categories:t})},gBe=()=>async({dispatch:e,resolveSelect:t})=>{const o=(await t.getEntityRecords("taxonomy","wp_pattern_category",{per_page:-1,_fields:"id,name,description,slug",context:"view"}))?.map(r=>({...r,label:ht(r.name),name:r.slug}))||[];e({type:"RECEIVE_USER_PATTERN_CATEGORIES",patternCategories:o})},MBe=()=>async({dispatch:e,select:t,registry:n})=>{const o=await et({path:St("/wp-block-editor/v1/navigation-fallback",{_embed:!0})}),r=o?._embedded?.self;n.batch(()=>{if(e.receiveNavigationFallbackId(o?.id),!r)return;const i=!t.getEntityRecord("postType","wp_navigation",o.id);e.receiveEntityRecords("postType","wp_navigation",r,void 0,i),e.finishResolution("getEntityRecord",["postType","wp_navigation",o.id])})},zBe=e=>async({dispatch:t})=>{const n=await et({path:St("/wp/v2/templates/lookup",e)});n?.id&&t.receiveDefaultTemplateId(e,n.id)},d1e=(e,t,n,o={})=>async({dispatch:r,registry:s})=>{const c=(await r(Za(e,t))).find(b=>b.name===t&&b.kind===e);if(!c)return;o._fields&&(o={...o,_fields:[...new Set([...Wu(o._fields)||[],c.revisionKey||mr])].join()});const l=St(c.getRevisionsUrl(n),o);let u,d;const p={},f=c.supportsPagination&&o.per_page!==-1;try{d=await et({path:l,parse:!f})}catch{return}d&&(f?(u=Object.values(await d.json()),p.totalItems=parseInt(d.headers.get("X-WP-Total"))):u=Object.values(d),o._fields&&(u=u.map(b=>(o._fields.split(",").forEach(h=>{b.hasOwnProperty(h)||(b[h]=void 0)}),b))),s.batch(()=>{if(r.receiveRevisions(e,t,n,u,o,!1,p),!o?._fields&&!o.context){const b=c.key||mr,h=u.filter(g=>g[b]).map(g=>[e,t,n,g[b]]);r.finishResolutions("getRevision",h)}}))};d1e.shouldInvalidate=(e,t,n,o)=>e.type==="SAVE_ENTITY_RECORD_FINISH"&&n===e.name&&t===e.kind&&!e.error&&o===e.recordId;const OBe=(e,t,n,o,r)=>async({dispatch:s})=>{const c=(await s(Za(e,t))).find(d=>d.name===t&&d.kind===e);if(!c)return;r!==void 0&&r._fields&&(r={...r,_fields:[...new Set([...Wu(r._fields)||[],c.revisionKey||mr])].join()});const l=St(c.getRevisionsUrl(n,o),r);let u;try{u=await et({path:l})}catch{return}u&&s.receiveRevisions(e,t,n,u,r)},yBe=e=>async({dispatch:t,resolveSelect:n})=>{let o;try{const{rest_namespace:r="wp/v2",rest_base:s}=await n.getPostType(e)||{};o=await et({path:`${r}/${s}/?context=edit`,method:"OPTIONS"})}catch{return}o&&t.receiveRegisteredPostMeta(e,o?.schema?.properties?.meta?.properties)},ABe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalGetCurrentGlobalStylesId:pBe,__experimentalGetCurrentThemeBaseGlobalStyles:fBe,__experimentalGetCurrentThemeGlobalStylesVariations:bBe,__experimentalGetTemplateForLink:l1e,canUser:c1e,canUserEditEntityRecord:lBe,getAuthors:nBe,getAutosave:dBe,getAutosaves:uBe,getBlockPatternCategories:mBe,getBlockPatterns:hBe,getCurrentTheme:iBe,getCurrentThemeGlobalStylesRevisions:u1e,getCurrentUser:oBe,getDefaultTemplateId:zBe,getEditedEntityRecord:sBe,getEmbedPreview:cBe,getEntityRecord:a1e,getEntityRecords:Tv,getNavigationFallbackId:MBe,getRawEntityRecord:rBe,getRegisteredPostMeta:yBe,getRevision:OBe,getRevisions:d1e,getThemeSupports:aBe,getUserPatternCategories:gBe},Symbol.toStringTag,{value:"Module"}));function LV(e,t){const n={...e};let o=n;for(const r of t)o.children={...o.children,[r]:{locks:[],children:{},...o.children[r]}},o=o.children[r];return n}function M8(e,t){let n=e;for(const o of t){const r=n.children[o];if(!r)return null;n=r}return n}function*vBe(e,t){let n=e;yield n;for(const o of t){const r=n.children[o];if(!r)break;yield r,n=r}}function*xBe(e){const t=Object.values(e.children);for(;t.length;){const n=t.pop();yield n,t.push(...Object.values(n.children))}}function jV({exclusive:e},t){return!!(e&&t.length||!e&&t.filter(n=>n.exclusive).length)}const _Be={requests:[],tree:{locks:[],children:{}}};function zy(e=_Be,t){switch(t.type){case"ENQUEUE_LOCK_REQUEST":{const{request:n}=t;return{...e,requests:[n,...e.requests]}}case"GRANT_LOCK_REQUEST":{const{lock:n,request:o}=t,{store:r,path:s}=o,i=[r,...s],c=LV(e.tree,i),l=M8(c,i);return l.locks=[...l.locks,n],{...e,requests:e.requests.filter(u=>u!==o),tree:c}}case"RELEASE_LOCK":{const{lock:n}=t,o=[n.store,...n.path],r=LV(e.tree,o),s=M8(r,o);return s.locks=s.locks.filter(i=>i!==n),{...e,tree:r}}}return e}function wBe(e){return e.requests}function kBe(e,t,n,{exclusive:o}){const r=[t,...n],s=e.tree;for(const c of vBe(s,r))if(jV({exclusive:o},c.locks))return!1;const i=M8(s,r);if(!i)return!0;for(const c of xBe(i))if(jV({exclusive:o},c.locks))return!1;return!0}function SBe(){let e=zy(void 0,{type:"@@INIT"});function t(){for(const r of wBe(e)){const{store:s,path:i,exclusive:c,notifyAcquired:l}=r;if(kBe(e,s,i,{exclusive:c})){const u={store:s,path:i,exclusive:c};e=zy(e,{type:"GRANT_LOCK_REQUEST",lock:u,request:r}),l(u)}}}function n(r,s,i){return new Promise(c=>{e=zy(e,{type:"ENQUEUE_LOCK_REQUEST",request:{store:r,path:s,exclusive:i,notifyAcquired:c}}),t()})}function o(r){e=zy(e,{type:"RELEASE_LOCK",lock:r}),t()}return{acquire:n,release:o}}function CBe(){const e=SBe();function t(o,r,{exclusive:s}){return()=>e.acquire(o,r,s)}function n(o){return()=>e.release(o)}return{__unstableAcquireStoreLock:t,__unstableReleaseStoreLock:n}}const{lock:hbn,unlock:hB}=Yr("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/core-data"),z8=O.createContext({});function O8({kind:e,type:t,id:n,children:o}){const r=O.useContext(z8),s=O.useMemo(()=>({...r,[e]:{...r?.[e],[t]:n}}),[r,e,t,n]);return a.jsx(z8.Provider,{value:s,children:o})}let A1=function(e){return e.Idle="IDLE",e.Resolving="RESOLVING",e.Error="ERROR",e.Success="SUCCESS",e}({});const qBe=["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"];function mB(e,t){return I((n,o)=>e(s=>RBe(n(s)),o),t)}const RBe=gs(e=>{const t={};for(const n in e)qBe.includes(n)||Object.defineProperty(t,n,{get:()=>(...o)=>{const r=e[n](...o),s=e.getResolutionState(n,o)?.status;let i;switch(s){case"resolving":i=A1.Resolving;break;case"finished":i=A1.Success;break;case"error":i=A1.Error;break;case void 0:i=A1.Idle;break}return{data:r,status:i,isResolving:i===A1.Resolving,hasStarted:i!==A1.Idle,hasResolved:i===A1.Success||i===A1.Error}}});return t}),PV={};function p1e(e,t,n,o={enabled:!0}){const{editEntityRecord:r,saveEditedEntityRecord:s}=se(ie),i=O.useMemo(()=>({edit:(f,b={})=>r(e,t,n,f,b),save:(f={})=>s(e,t,n,{throwOnError:!0,...f})}),[r,e,t,n,s]),{editedRecord:c,hasEdits:l,edits:u}=I(f=>o.enabled?{editedRecord:f(ie).getEditedEntityRecord(e,t,n),hasEdits:f(ie).hasEditsForEntityRecord(e,t,n),edits:f(ie).getEntityRecordNonTransientEdits(e,t,n)}:{editedRecord:PV,hasEdits:!1,edits:PV},[e,t,n,o.enabled]),{data:d,...p}=mB(f=>o.enabled?f(ie).getEntityRecord(e,t,n):{data:null},[e,t,n,o.enabled]);return{record:d,editedRecord:c,hasEdits:l,edits:u,...p,...i}}const TBe=[];function gp(e,t,n={},o={enabled:!0}){const r=St("",n),{data:s,...i}=mB(u=>o.enabled?u(ie).getEntityRecords(e,t,n):{data:TBe},[e,t,r,o.enabled]),{totalItems:c,totalPages:l}=I(u=>o.enabled?{totalItems:u(ie).getEntityRecordsTotalItems(e,t,n),totalPages:u(ie).getEntityRecordsTotalPages(e,t,n)}:{totalItems:null,totalPages:null},[e,t,r,o.enabled]);return{records:s,totalItems:c,totalPages:l,...i}}const IV=new Set;function EBe(){return globalThis.SCRIPT_DEBUG===!0}function Ut(e){if(EBe()&&!IV.has(e)){console.warn(e);try{throw Error(e)}catch{}IV.add(e)}}function f1e(e,t){const n=typeof e=="object",o=n?JSON.stringify(e):e;return n&&typeof t<"u"&&globalThis.SCRIPT_DEBUG===!0&&Ut("When 'resource' is an entity object, passing 'id' as a separate argument isn't supported."),mB(r=>{const s=n?!!e.id:!!t,{canUser:i}=r(ie),c=i("create",n?{kind:e.kind,name:e.name}:e);if(!s){const h=i("read",e),g=c.isResolving||h.isResolving,z=c.hasResolved&&h.hasResolved;let A=A1.Idle;return g?A=A1.Resolving:z&&(A=A1.Success),{status:A,isResolving:g,hasResolved:z,canCreate:c.hasResolved&&c.data,canRead:h.hasResolved&&h.data}}const l=i("read",e,t),u=i("update",e,t),d=i("delete",e,t),p=l.isResolving||c.isResolving||u.isResolving||d.isResolving,f=l.hasResolved&&c.hasResolved&&u.hasResolved&&d.hasResolved;let b=A1.Idle;return p?b=A1.Resolving:f&&(b=A1.Success),{status:b,isResolving:p,hasResolved:f,canRead:f&&l.data,canCreate:f&&c.data,canUpdate:f&&u.data,canDelete:f&&d.data}},[o,t])}var WBe={grad:.9,turn:360,rad:360/(2*Math.PI)},lc=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},jo=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},$s=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},b1e=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},DV=function(e){return{r:$s(e.r,0,255),g:$s(e.g,0,255),b:$s(e.b,0,255),a:$s(e.a)}},sS=function(e){return{r:jo(e.r),g:jo(e.g),b:jo(e.b),a:jo(e.a,3)}},NBe=/^#([0-9a-f]{3,8})$/i,Oy=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},h1e=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,s=Math.max(t,n,o),i=s-Math.min(t,n,o),c=i?s===t?(n-o)/i:s===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(c<0?c+6:c),s:s?i/s*100:0,v:s/255*100,a:r}},m1e=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var s=Math.floor(t),i=o*(1-n),c=o*(1-(t-s)*n),l=o*(1-(1-t+s)*n),u=s%6;return{r:255*[o,c,i,i,l,o][u],g:255*[l,o,o,c,i,i][u],b:255*[i,i,l,o,o,c][u],a:r}},FV=function(e){return{h:b1e(e.h),s:$s(e.s,0,100),l:$s(e.l,0,100),a:$s(e.a)}},$V=function(e){return{h:jo(e.h),s:jo(e.s),l:jo(e.l),a:jo(e.a,3)}},VV=function(e){return m1e((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},Vg=function(e){return{h:(t=h1e(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},BBe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,LBe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jBe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,PBe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y8={string:[[function(e){var t=NBe.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?jo(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?jo(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=jBe.exec(e)||PBe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:DV({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=BBe.exec(e)||LBe.exec(e);if(!t)return null;var n,o,r=FV({h:(n=t[1],o=t[2],o===void 0&&(o="deg"),Number(n)*(WBe[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return VV(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,s=r===void 0?1:r;return lc(t)&&lc(n)&&lc(o)?DV({r:Number(t),g:Number(n),b:Number(o),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,s=r===void 0?1:r;if(!lc(t)||!lc(n)||!lc(o))return null;var i=FV({h:Number(t),s:Number(n),l:Number(o),a:Number(s)});return VV(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,s=r===void 0?1:r;if(!lc(t)||!lc(n)||!lc(o))return null;var i=function(c){return{h:b1e(c.h),s:$s(c.s,0,100),v:$s(c.v,0,100),a:$s(c.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(s)});return m1e(i)},"hsv"]]},HV=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=sS(this.rgba),n=t.r,o=t.g,r=t.b,i=(s=t.a)<1?Oy(jo(255*s)):"","#"+Oy(n)+Oy(o)+Oy(r)+i;var t,n,o,r,s,i},e.prototype.toRgb=function(){return sS(this.rgba)},e.prototype.toRgbString=function(){return t=sS(this.rgba),n=t.r,o=t.g,r=t.b,(s=t.a)<1?"rgba("+n+", "+o+", "+r+", "+s+")":"rgb("+n+", "+o+", "+r+")";var t,n,o,r,s},e.prototype.toHsl=function(){return $V(Vg(this.rgba))},e.prototype.toHslString=function(){return t=$V(Vg(this.rgba)),n=t.h,o=t.s,r=t.l,(s=t.a)<1?"hsla("+n+", "+o+"%, "+r+"%, "+s+")":"hsl("+n+", "+o+"%, "+r+"%)";var t,n,o,r,s},e.prototype.toHsv=function(){return t=h1e(this.rgba),{h:jo(t.h),s:jo(t.s),v:jo(t.v),a:jo(t.a,3)};var t},e.prototype.invert=function(){return Tt({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Tt(iS(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Tt(iS(this.rgba,-t))},e.prototype.grayscale=function(){return Tt(iS(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Tt(UV(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Tt(UV(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Tt({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):jo(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=Vg(this.rgba);return typeof t=="number"?Tt({h:t,s:n.s,l:n.l,a:n.a}):jo(n.h)},e.prototype.isEqual=function(t){return this.toHex()===Tt(t).toHex()},e}(),Tt=function(e){return e instanceof A8?e:new A8(e)},XV=[],Ms=function(e){e.forEach(function(t){XV.indexOf(t)<0&&(t(A8,y8),XV.push(t))})};function zs(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var s={};e.prototype.toName=function(i){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var c,l,u=o[this.toHex()];if(u)return u;if(i?.closest){var d=this.toRgb(),p=1/0,f="black";if(!s.length)for(var b in n)s[b]=new e(n[b]).toRgb();for(var h in n){var g=(c=d,l=s[h],Math.pow(c.r-l.r,2)+Math.pow(c.g-l.g,2)+Math.pow(c.b-l.b,2));gl?(c+.05)/(l+.05):(l+.05)/(c+.05),(o=2)===void 0&&(o=0),r===void 0&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(t,n){return t===void 0&&(t="#FFF"),n===void 0&&(n={}),this.contrast(t)>=(c=(i=(o=n).size)===void 0?"normal":i,(s=(r=o.level)===void 0?"AA":r)==="AAA"&&c==="normal"?7:s==="AA"&&c==="large"?3:4.5);var o,r,s,i,c}}const g1e="block-default",v8=["attributes","supports","save","migrate","isEligible","apiVersion"],Ud={"--wp--style--color--link":{value:["color","link"],support:["color","link"]},aspectRatio:{value:["dimensions","aspectRatio"],support:["dimensions","aspectRatio"],useEngine:!0},background:{value:["color","gradient"],support:["color","gradients"],useEngine:!0},backgroundColor:{value:["color","background"],support:["color","background"],requiresOptOut:!0,useEngine:!0},backgroundImage:{value:["background","backgroundImage"],support:["background","backgroundImage"],useEngine:!0},backgroundRepeat:{value:["background","backgroundRepeat"],support:["background","backgroundRepeat"],useEngine:!0},backgroundSize:{value:["background","backgroundSize"],support:["background","backgroundSize"],useEngine:!0},backgroundPosition:{value:["background","backgroundPosition"],support:["background","backgroundPosition"],useEngine:!0},borderColor:{value:["border","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRadius:{value:["border","radius"],support:["__experimentalBorder","radius"],properties:{borderTopLeftRadius:"topLeft",borderTopRightRadius:"topRight",borderBottomLeftRadius:"bottomLeft",borderBottomRightRadius:"bottomRight"},useEngine:!0},borderStyle:{value:["border","style"],support:["__experimentalBorder","style"],useEngine:!0},borderWidth:{value:["border","width"],support:["__experimentalBorder","width"],useEngine:!0},borderTopColor:{value:["border","top","color"],support:["__experimentalBorder","color"],useEngine:!0},borderTopStyle:{value:["border","top","style"],support:["__experimentalBorder","style"],useEngine:!0},borderTopWidth:{value:["border","top","width"],support:["__experimentalBorder","width"],useEngine:!0},borderRightColor:{value:["border","right","color"],support:["__experimentalBorder","color"],useEngine:!0},borderRightStyle:{value:["border","right","style"],support:["__experimentalBorder","style"],useEngine:!0},borderRightWidth:{value:["border","right","width"],support:["__experimentalBorder","width"],useEngine:!0},borderBottomColor:{value:["border","bottom","color"],support:["__experimentalBorder","color"],useEngine:!0},borderBottomStyle:{value:["border","bottom","style"],support:["__experimentalBorder","style"],useEngine:!0},borderBottomWidth:{value:["border","bottom","width"],support:["__experimentalBorder","width"],useEngine:!0},borderLeftColor:{value:["border","left","color"],support:["__experimentalBorder","color"],useEngine:!0},borderLeftStyle:{value:["border","left","style"],support:["__experimentalBorder","style"],useEngine:!0},borderLeftWidth:{value:["border","left","width"],support:["__experimentalBorder","width"],useEngine:!0},color:{value:["color","text"],support:["color","text"],requiresOptOut:!0,useEngine:!0},columnCount:{value:["typography","textColumns"],support:["typography","textColumns"],useEngine:!0},filter:{value:["filter","duotone"],support:["filter","duotone"]},linkColor:{value:["elements","link","color","text"],support:["color","link"]},captionColor:{value:["elements","caption","color","text"],support:["color","caption"]},buttonColor:{value:["elements","button","color","text"],support:["color","button"]},buttonBackgroundColor:{value:["elements","button","color","background"],support:["color","button"]},headingColor:{value:["elements","heading","color","text"],support:["color","heading"]},headingBackgroundColor:{value:["elements","heading","color","background"],support:["color","heading"]},fontFamily:{value:["typography","fontFamily"],support:["typography","__experimentalFontFamily"],useEngine:!0},fontSize:{value:["typography","fontSize"],support:["typography","fontSize"],useEngine:!0},fontStyle:{value:["typography","fontStyle"],support:["typography","__experimentalFontStyle"],useEngine:!0},fontWeight:{value:["typography","fontWeight"],support:["typography","__experimentalFontWeight"],useEngine:!0},lineHeight:{value:["typography","lineHeight"],support:["typography","lineHeight"],useEngine:!0},margin:{value:["spacing","margin"],support:["spacing","margin"],properties:{marginTop:"top",marginRight:"right",marginBottom:"bottom",marginLeft:"left"},useEngine:!0},minHeight:{value:["dimensions","minHeight"],support:["dimensions","minHeight"],useEngine:!0},padding:{value:["spacing","padding"],support:["spacing","padding"],properties:{paddingTop:"top",paddingRight:"right",paddingBottom:"bottom",paddingLeft:"left"},useEngine:!0},textAlign:{value:["typography","textAlign"],support:["typography","textAlign"],useEngine:!1},textDecoration:{value:["typography","textDecoration"],support:["typography","__experimentalTextDecoration"],useEngine:!0},textTransform:{value:["typography","textTransform"],support:["typography","__experimentalTextTransform"],useEngine:!0},letterSpacing:{value:["typography","letterSpacing"],support:["typography","__experimentalLetterSpacing"],useEngine:!0},writingMode:{value:["typography","writingMode"],support:["typography","__experimentalWritingMode"],useEngine:!0},"--wp--style--root--padding":{value:["spacing","padding"],support:["spacing","padding"],properties:{"--wp--style--root--padding-top":"top","--wp--style--root--padding-right":"right","--wp--style--root--padding-bottom":"bottom","--wp--style--root--padding-left":"left"},rootOnly:!0}},da={link:"a:where(:not(.wp-element-button))",heading:"h1, h2, h3, h4, h5, h6",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",button:".wp-element-button, .wp-block-button__link",caption:".wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption",cite:"cite"},DBe={"color.duotone":!0,"color.gradients":!0,"color.palette":!0,"dimensions.aspectRatios":!0,"typography.fontSizes":!0,"spacing.spacingSizes":!0},{lock:FBe,unlock:Dp}=Yr("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/blocks"),GV={title:"block title",description:"block description",keywords:["block keyword"],styles:[{label:"block style label"}],variations:[{title:"block variation title",description:"block variation description",keywords:["block variation keyword"]}]};function Ev(e){return e!==null&&typeof e=="object"}function $Be({textdomain:e,...t}){const n=["apiVersion","title","category","parent","ancestor","icon","description","keywords","attributes","providesContext","usesContext","selectors","supports","styles","example","variations","blockHooks","allowedBlocks"],o=Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)));return e&&Object.keys(GV).forEach(r=>{o[r]&&(o[r]=x8(GV[r],o[r],e))}),o}function VBe(e,t){const n=Ev(e)?e.name:e;if(typeof n!="string"){globalThis.SCRIPT_DEBUG===!0&&Ut("Block names must be strings.");return}if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(n)){globalThis.SCRIPT_DEBUG===!0&&Ut("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");return}if(jn(Xe).getBlockType(n)){globalThis.SCRIPT_DEBUG===!0&&Ut('Block "'+n+'" is already registered.');return}const{addBootstrappedBlockType:o,addUnprocessedBlockType:r}=Dp(D0(Xe));if(Ev(e)){const s=$Be(e);o(n,s)}return r(n,t),jn(Xe).getBlockType(n)}function x8(e,t,n){return typeof e=="string"&&typeof t=="string"?ye(t,e,n):Array.isArray(e)&&e.length&&Array.isArray(t)?t.map(o=>x8(e[0],o,n)):Ev(e)&&Object.entries(e).length&&Ev(t)?Object.keys(t).reduce((o,r)=>e[r]?(o[r]=x8(e[r],t[r],n),o):(o[r]=t[r],o),{}):t}function HBe(e){const t=jn(Xe).getBlockType(e);if(!t){globalThis.SCRIPT_DEBUG===!0&&Ut('Block "'+e+'" is not registered.');return}return D0(Xe).removeBlockTypes(e),t}function UBe(e){D0(Xe).setFreeformFallbackBlockName(e)}function Lu(){return jn(Xe).getFreeformFallbackBlockName()}function M1e(){return jn(Xe).getGroupingBlockName()}function XBe(e){D0(Xe).setUnregisteredFallbackBlockName(e)}function l3(){return jn(Xe).getUnregisteredFallbackBlockName()}function GBe(e){D0(Xe).setDefaultBlockName(e)}function KBe(e){D0(Xe).setGroupingBlockName(e)}function L0(){return jn(Xe).getDefaultBlockName()}function Et(e){return jn(Xe)?.getBlockType(e)}function i1(){return jn(Xe).getBlockTypes()}function Kt(e,t,n){return jn(Xe).getBlockSupport(e,t,n)}function nt(e,t,n){return jn(Xe).hasBlockSupport(e,t,n)}function Md(e){return e?.name==="core/block"}function vh(e){return e?.name==="core/template-part"}const Jx=(e,t)=>jn(Xe).getBlockVariations(e,t),KV=e=>{const{name:t,label:n,usesContext:o,getValues:r,setValues:s,canUserEditValue:i,getFieldsList:c}=e,l=Dp(jn(Xe)).getBlockBindingsSource(t),u=["label","usesContext"];for(const d in l)if(!u.includes(d)&&l[d]){globalThis.SCRIPT_DEBUG===!0&&Ut('Block bindings source "'+t+'" is already registered.');return}if(!t){globalThis.SCRIPT_DEBUG===!0&&Ut("Block bindings source must contain a name.");return}if(typeof t!="string"){globalThis.SCRIPT_DEBUG===!0&&Ut("Block bindings source name must be a string.");return}if(/[A-Z]+/.test(t)){globalThis.SCRIPT_DEBUG===!0&&Ut("Block bindings source name must not contain uppercase characters.");return}if(!/^[a-z0-9/-]+$/.test(t)){globalThis.SCRIPT_DEBUG===!0&&Ut("Block bindings source name must contain only valid characters: lowercase characters, hyphens, or digits. Example: my-plugin/my-custom-source.");return}if(!/^[a-z0-9-]+\/[a-z0-9-]+$/.test(t)){globalThis.SCRIPT_DEBUG===!0&&Ut("Block bindings source name must contain a namespace and valid characters. Example: my-plugin/my-custom-source.");return}if(!n&&!l?.label){globalThis.SCRIPT_DEBUG===!0&&Ut("Block bindings source must contain a label.");return}if(n&&typeof n!="string"){globalThis.SCRIPT_DEBUG===!0&&Ut("Block bindings source label must be a string.");return}if(n&&l?.label&&n!==l?.label&&globalThis.SCRIPT_DEBUG===!0&&Ut('Block bindings "'+t+'" source label was overriden.'),o&&!Array.isArray(o)){globalThis.SCRIPT_DEBUG===!0&&Ut("Block bindings source usesContext must be an array.");return}if(r&&typeof r!="function"){globalThis.SCRIPT_DEBUG===!0&&Ut("Block bindings source getValues must be a function.");return}if(s&&typeof s!="function"){globalThis.SCRIPT_DEBUG===!0&&Ut("Block bindings source setValues must be a function.");return}if(i&&typeof i!="function"){globalThis.SCRIPT_DEBUG===!0&&Ut("Block bindings source canUserEditValue must be a function.");return}if(c&&typeof c!="function"){globalThis.SCRIPT_DEBUG===!0&&Ut("Block bindings source getFieldsList must be a function.");return}return Dp(D0(Xe)).addBlockBindingsSource(e)};function Lc(e){return Dp(jn(Xe)).getBlockBindingsSource(e)}function z1e(){return Dp(jn(Xe)).getAllBlockBindingsSources()}Ms([zs,Mf]);const YV=["#191e23","#f8f9f9"];function O1e(e,t){return e.hasOwnProperty("default")?t===e.default:e.type==="rich-text"?!t?.length:t===void 0}function Mp(e){var t;return Object.entries((t=Et(e.name)?.attributes)!==null&&t!==void 0?t:{}).every(([n,o])=>{const r=e.attributes[n];return O1e(o,r)})}function Qc(e){return e.name===L0()&&Mp(e)}function YBe(e){const t=x1e(e.name,"content");return t.length===0?Mp(e):t.every(n=>{const o=Et(e.name)?.attributes[n],r=e.attributes[n];return O1e(o,r)})}function y1e(e){return!!e&&(typeof e=="string"||O.isValidElement(e)||typeof e=="function"||e instanceof O.Component)}function ZBe(e){if(e=e||g1e,y1e(e))return{src:e};if("background"in e){const t=Tt(e.background),n=r=>t.contrast(r),o=Math.max(...YV.map(n));return{...e,foreground:e.foreground?e.foreground:YV.find(r=>n(r)===o),shadowColor:t.alpha(.3).toRgbString()}}return e}function u3(e){return typeof e=="string"?Et(e):e}function A1e(e,t,n="visual"){const{__experimentalLabel:o,title:r}=e,s=o&&o(t,{context:n});return s?s.toPlainText?s.toPlainText():L1(s):r}function v1e(e){if(e.default!==void 0)return e.default;if(e.type==="rich-text")return new p0}function gB(e,t){const n=Et(e);if(n===void 0)throw new Error(`Block type '${e}' is not registered.`);return Object.entries(n.attributes).reduce((o,[r,s])=>{const i=t[r];if(i!==void 0)s.type==="rich-text"?i instanceof p0?o[r]=i:typeof i=="string"&&(o[r]=p0.fromHTMLString(i)):s.type==="string"&&i instanceof p0?o[r]=i.toHTMLString():o[r]=i;else{const c=v1e(s);c!==void 0&&(o[r]=c)}return["node","children"].indexOf(s.source)!==-1&&(typeof o[r]=="string"?o[r]=[o[r]]:Array.isArray(o[r])||(o[r]=[])),o},{})}function x1e(e,t){const n=Et(e)?.attributes;return n?Object.keys(n).filter(r=>{const s=n[r];return s?.role===t?!0:s?.__experimentalRole===t?(qe("__experimentalRole attribute",{since:"6.7",version:"6.8",alternative:"role attribute",hint:`Check the block.json of the ${e} block.`}),!0):!1}):[]}function zf(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>!t.includes(n)))}const QBe=[{slug:"text",title:m("Text")},{slug:"media",title:m("Media")},{slug:"design",title:m("Design")},{slug:"widgets",title:m("Widgets")},{slug:"theme",title:m("Theme")},{slug:"embed",title:m("Embeds")},{slug:"reusable",title:m("Reusable blocks")}];function MB(e){return e.reduce((t,n)=>({...t,[n.name]:n}),{})}function Wv(e){return e.reduce((t,n)=>(t.some(o=>o.name===n.name)||t.push(n),t),[])}function JBe(e={},t){switch(t.type){case"ADD_BOOTSTRAPPED_BLOCK_TYPE":const{name:n,blockType:o}=t,r=e[n];let s;return r?(r.blockHooks===void 0&&o.blockHooks&&(s={...r,...s,blockHooks:o.blockHooks}),r.allowedBlocks===void 0&&o.allowedBlocks&&(s={...r,...s,allowedBlocks:o.allowedBlocks})):(s=Object.fromEntries(Object.entries(o).filter(([,i])=>i!=null).map(([i,c])=>[fN(i),c])),s.name=n),s?{...e,[n]:s}:e;case"REMOVE_BLOCK_TYPES":return zf(e,t.names)}return e}function eLe(e={},t){switch(t.type){case"ADD_UNPROCESSED_BLOCK_TYPE":return{...e,[t.name]:t.blockType};case"REMOVE_BLOCK_TYPES":return zf(e,t.names)}return e}function tLe(e={},t){switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...MB(t.blockTypes)};case"REMOVE_BLOCK_TYPES":return zf(e,t.names)}return e}function nLe(e={},t){var n;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Object.fromEntries(Object.entries(MB(t.blockTypes)).map(([r,s])=>{var i,c;return[r,Wv([...((i=s.styles)!==null&&i!==void 0?i:[]).map(l=>({...l,source:"block"})),...((c=e[s.name])!==null&&c!==void 0?c:[]).filter(({source:l})=>l!=="block")])]}))};case"ADD_BLOCK_STYLES":const o={};return t.blockNames.forEach(r=>{var s;o[r]=Wv([...(s=e[r])!==null&&s!==void 0?s:[],...t.styles])}),{...e,...o};case"REMOVE_BLOCK_STYLES":return{...e,[t.blockName]:((n=e[t.blockName])!==null&&n!==void 0?n:[]).filter(r=>t.styleNames.indexOf(r.name)===-1)}}return e}function oLe(e={},t){var n,o;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...Object.fromEntries(Object.entries(MB(t.blockTypes)).map(([r,s])=>{var i,c;return[r,Wv([...((i=s.variations)!==null&&i!==void 0?i:[]).map(l=>({...l,source:"block"})),...((c=e[s.name])!==null&&c!==void 0?c:[]).filter(({source:l})=>l!=="block")])]}))};case"ADD_BLOCK_VARIATIONS":return{...e,[t.blockName]:Wv([...(n=e[t.blockName])!==null&&n!==void 0?n:[],...t.variations])};case"REMOVE_BLOCK_VARIATIONS":return{...e,[t.blockName]:((o=e[t.blockName])!==null&&o!==void 0?o:[]).filter(r=>t.variationNames.indexOf(r.name)===-1)}}return e}function e_(e){return(t=null,n)=>{switch(n.type){case"REMOVE_BLOCK_TYPES":return n.names.indexOf(t)!==-1?null:t;case e:return n.name||null}return t}}const rLe=e_("SET_DEFAULT_BLOCK_NAME"),sLe=e_("SET_FREEFORM_FALLBACK_BLOCK_NAME"),iLe=e_("SET_UNREGISTERED_FALLBACK_BLOCK_NAME"),aLe=e_("SET_GROUPING_BLOCK_NAME");function cLe(e=QBe,t){switch(t.type){case"SET_CATEGORIES":const n=new Map;return(t.categories||[]).forEach(o=>{n.set(o.slug,o)}),[...n.values()];case"UPDATE_CATEGORY":{if(!t.category||!Object.keys(t.category).length)return e;if(e.find(({slug:r})=>r===t.slug))return e.map(r=>r.slug===t.slug?{...r,...t.category}:r)}}return e}function lLe(e={},t){switch(t.type){case"ADD_BLOCK_COLLECTION":return{...e,[t.namespace]:{title:t.title,icon:t.icon}};case"REMOVE_BLOCK_COLLECTION":return zf(e,t.namespace)}return e}function uLe(e=[],t=[]){const n=Array.from(new Set(e.concat(t)));return n.length>0?n:void 0}function dLe(e={},t){switch(t.type){case"ADD_BLOCK_BINDINGS_SOURCE":let n;return(globalThis.IS_GUTENBERG_PLUGIN||t.name==="core/post-meta")&&(n=t.getFieldsList),{...e,[t.name]:{label:t.label||e[t.name]?.label,usesContext:uLe(e[t.name]?.usesContext,t.usesContext),getValues:t.getValues,setValues:t.setValues,canUserEditValue:t.setValues&&t.canUserEditValue,getFieldsList:n}};case"REMOVE_BLOCK_BINDINGS_SOURCE":return zf(e,t.name)}return e}const pLe=hr({bootstrappedBlockTypes:JBe,unprocessedBlockTypes:eLe,blockTypes:tLe,blockStyles:nLe,blockVariations:oLe,defaultBlockName:rLe,freeformFallbackBlockName:sLe,unregisteredFallbackBlockName:iLe,groupingBlockName:aLe,categories:cLe,collections:lLe,blockBindingsSources:dLe}),IM=(e,t,n)=>{var o;const r=Array.isArray(t)?t:t.split(".");let s=e;return r.forEach(i=>{s=s?.[i]}),(o=s)!==null&&o!==void 0?o:n};function ZV(e){return typeof e=="object"&&e.constructor===Object&&e!==null}function _1e(e,t){return ZV(e)&&ZV(t)?Object.entries(t).every(([n,o])=>_1e(e?.[n],o)):e===t}const fLe=["background","backgroundColor","color","linkColor","captionColor","buttonColor","headingColor","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","padding","contentSize","wideSize","blockGap","textDecoration","textTransform","letterSpacing"];function QV(e,t,n){return e.filter(o=>!(o==="fontSize"&&n==="heading"||o==="textDecoration"&&!t&&n!=="link"||o==="textTransform"&&!t&&!(["heading","h1","h2","h3","h4","h5","h6"].includes(n)||n==="button"||n==="caption"||n==="text")||o==="letterSpacing"&&!t&&!(["heading","h1","h2","h3","h4","h5","h6"].includes(n)||n==="button"||n==="caption"||n==="text")||o==="textColumns"&&!t))}const bLe=ct((e,t,n)=>{if(!t)return QV(fLe,t,n);const o=d3(e,t);if(!o)return[];const r=[];return o?.supports?.spacing?.blockGap&&r.push("blockGap"),o?.supports?.shadow&&r.push("shadow"),Object.keys(Ud).forEach(s=>{if(Ud[s].support){if(Ud[s].requiresOptOut&&Ud[s].support[0]in o.supports&&IM(o.supports,Ud[s].support)!==!1){r.push(s);return}IM(o.supports,Ud[s].support,!1)&&r.push(s)}}),QV(r,t,n)},(e,t)=>[e.blockTypes[t]]);function hLe(e,t){return e.bootstrappedBlockTypes[t]}function mLe(e){return e.unprocessedBlockTypes}function gLe(e){return e.blockBindingsSources}function MLe(e,t){return e.blockBindingsSources[t]}const w1e=(e,t)=>{const n=d3(e,t);return n?Object.values(n.attributes).some(({role:o,__experimentalRole:r})=>o==="content"?!0:r==="content"?(qe("__experimentalRole attribute",{since:"6.7",version:"6.8",alternative:"role attribute",hint:`Check the block.json of the ${t} block.`}),!0):!1):!1},zLe=Object.freeze(Object.defineProperty({__proto__:null,getAllBlockBindingsSources:gLe,getBlockBindingsSource:MLe,getBootstrappedBlockType:hLe,getSupportedStyles:bLe,getUnprocessedBlockTypes:mLe,hasContentRoleAttribute:w1e},Symbol.toStringTag,{value:"Module"})),k1e=(e,t)=>typeof t=="string"?d3(e,t):t,S1e=ct(e=>Object.values(e.blockTypes),e=>[e.blockTypes]);function d3(e,t){return e.blockTypes[t]}function OLe(e,t){return e.blockStyles[t]}const zB=ct((e,t,n)=>{const o=e.blockVariations[t];return!o||!n?o:o.filter(r=>(r.scope||["block","inserter"]).includes(n))},(e,t)=>[e.blockVariations[t]]);function yLe(e,t,n,o){const r=zB(e,t,o);if(!r)return r;const s=d3(e,t),i=Object.keys(s?.attributes||{});let c,l=0;for(const u of r)if(Array.isArray(u.isActive)){const d=u.isActive.filter(b=>{const h=b.split(".")[0];return i.includes(h)}),p=d.length;if(p===0)continue;d.every(b=>{const h=IM(u.attributes,b);if(h===void 0)return!1;let g=IM(n,b);return g instanceof p0&&(g=g.toHTMLString()),_1e(g,h)})&&p>l&&(c=u,l=p)}else if(u.isActive?.(n,u.attributes))return c||u;return c}function ALe(e,t,n){const o=zB(e,t,n);return[...o].reverse().find(({isDefault:s})=>!!s)||o[0]}function vLe(e){return e.categories}function xLe(e){return e.collections}function _Le(e){return e.defaultBlockName}function wLe(e){return e.freeformFallbackBlockName}function kLe(e){return e.unregisteredFallbackBlockName}function SLe(e){return e.groupingBlockName}const OB=ct((e,t)=>S1e(e).filter(n=>n.parent?.includes(t)).map(({name:n})=>n),e=>[e.blockTypes]),C1e=(e,t,n,o)=>{const r=k1e(e,t);return r?.supports?IM(r.supports,n,o):o};function q1e(e,t,n,o){return!!C1e(e,t,n,o)}function JV(e){return Ys(e??"").toLowerCase().trim()}function CLe(e,t,n=""){const o=k1e(e,t),r=JV(n),s=i=>JV(i).includes(r);return s(o.title)||o.keywords?.some(s)||s(o.category)||typeof o.description=="string"&&s(o.description)}const qLe=(e,t)=>OB(e,t).length>0,RLe=(e,t)=>OB(e,t).some(n=>q1e(e,n,"inserter",!0)),TLe=(...e)=>(qe("__experimentalHasContentRoleAttribute",{since:"6.7",version:"6.8",hint:"This is a private selector."}),w1e(...e)),ELe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalHasContentRoleAttribute:TLe,getActiveBlockVariation:yLe,getBlockStyles:OLe,getBlockSupport:C1e,getBlockType:d3,getBlockTypes:S1e,getBlockVariations:zB,getCategories:vLe,getChildBlockNames:OB,getCollections:xLe,getDefaultBlockName:_Le,getDefaultBlockVariation:ALe,getFreeformFallbackBlockName:wLe,getGroupingBlockName:SLe,getUnregisteredFallbackBlockName:kLe,hasBlockSupport:q1e,hasChildBlocks:qLe,hasChildBlocksWithInserterSupport:RLe,isMatchingSearchTerm:CLe},Symbol.toStringTag,{value:"Module"}));var R1e={exports:{}},t0={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var yB=Symbol.for("react.element"),AB=Symbol.for("react.portal"),t_=Symbol.for("react.fragment"),n_=Symbol.for("react.strict_mode"),o_=Symbol.for("react.profiler"),r_=Symbol.for("react.provider"),s_=Symbol.for("react.context"),WLe=Symbol.for("react.server_context"),i_=Symbol.for("react.forward_ref"),a_=Symbol.for("react.suspense"),c_=Symbol.for("react.suspense_list"),l_=Symbol.for("react.memo"),u_=Symbol.for("react.lazy"),NLe=Symbol.for("react.offscreen"),T1e;T1e=Symbol.for("react.module.reference");function ei(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case yB:switch(e=e.type,e){case t_:case o_:case n_:case a_:case c_:return e;default:switch(e=e&&e.$$typeof,e){case WLe:case s_:case i_:case u_:case l_:case r_:return e;default:return t}}case AB:return t}}}t0.ContextConsumer=s_;t0.ContextProvider=r_;t0.Element=yB;t0.ForwardRef=i_;t0.Fragment=t_;t0.Lazy=u_;t0.Memo=l_;t0.Portal=AB;t0.Profiler=o_;t0.StrictMode=n_;t0.Suspense=a_;t0.SuspenseList=c_;t0.isAsyncMode=function(){return!1};t0.isConcurrentMode=function(){return!1};t0.isContextConsumer=function(e){return ei(e)===s_};t0.isContextProvider=function(e){return ei(e)===r_};t0.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===yB};t0.isForwardRef=function(e){return ei(e)===i_};t0.isFragment=function(e){return ei(e)===t_};t0.isLazy=function(e){return ei(e)===u_};t0.isMemo=function(e){return ei(e)===l_};t0.isPortal=function(e){return ei(e)===AB};t0.isProfiler=function(e){return ei(e)===o_};t0.isStrictMode=function(e){return ei(e)===n_};t0.isSuspense=function(e){return ei(e)===a_};t0.isSuspenseList=function(e){return ei(e)===c_};t0.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===t_||e===o_||e===n_||e===a_||e===c_||e===NLe||typeof e=="object"&&e!==null&&(e.$$typeof===u_||e.$$typeof===l_||e.$$typeof===r_||e.$$typeof===s_||e.$$typeof===i_||e.$$typeof===T1e||e.getModuleId!==void 0)};t0.typeOf=ei;R1e.exports=t0;var BLe=R1e.exports;const eH={common:"text",formatting:"text",layout:"design"};function LLe(e=[],t=[]){const n=[...e];return t.forEach(o=>{const r=n.findIndex(s=>s.name===o.name);r!==-1?n[r]={...n[r],...o}:n.push(o)}),n}const E1e=(e,t)=>({select:n})=>{const o=n.getBootstrappedBlockType(e),r={name:e,icon:g1e,keywords:[],attributes:{},providesContext:{},usesContext:[],selectors:{},supports:{},styles:[],blockHooks:{},save:()=>null,...o,...t,variations:LLe(Array.isArray(o?.variations)?o.variations:[],Array.isArray(t?.variations)?t.variations:[])},s=B0("blocks.registerBlockType",r,e,null);if(s.description&&typeof s.description!="string"&&qe("Declaring non-string block descriptions",{since:"6.2"}),s.deprecated&&(s.deprecated=s.deprecated.map(i=>Object.fromEntries(Object.entries(B0("blocks.registerBlockType",{...zf(r,v8),...i},r.name,i)).filter(([c])=>v8.includes(c))))),!Qz(s)){globalThis.SCRIPT_DEBUG===!0&&Ut("Block settings must be a valid object.");return}if(typeof s.save!="function"){globalThis.SCRIPT_DEBUG===!0&&Ut('The "save" property must be a valid function.');return}if("edit"in s&&!BLe.isValidElementType(s.edit)){globalThis.SCRIPT_DEBUG===!0&&Ut('The "edit" property must be a valid component.');return}if(eH.hasOwnProperty(s.category)&&(s.category=eH[s.category]),"category"in s&&!n.getCategories().some(({slug:i})=>i===s.category)&&(globalThis.SCRIPT_DEBUG===!0&&Ut('The block "'+e+'" is registered with an invalid category "'+s.category+'".'),delete s.category),!("title"in s)||s.title===""){globalThis.SCRIPT_DEBUG===!0&&Ut('The block "'+e+'" must have a title.');return}if(typeof s.title!="string"){globalThis.SCRIPT_DEBUG===!0&&Ut("Block titles must be strings.");return}if(s.icon=ZBe(s.icon),!y1e(s.icon.src)){globalThis.SCRIPT_DEBUG===!0&&Ut("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional");return}return s};function jLe(e){return{type:"ADD_BLOCK_TYPES",blockTypes:Array.isArray(e)?e:[e]}}function W1e(){return({dispatch:e,select:t})=>{const n=[];for(const[o,r]of Object.entries(t.getUnprocessedBlockTypes())){const s=e(E1e(o,r));s&&n.push(s)}n.length&&e.addBlockTypes(n)}}function PLe(){return qe('wp.data.dispatch( "core/blocks" ).__experimentalReapplyBlockFilters',{since:"6.4",alternative:"reapplyBlockFilters"}),W1e()}function ILe(e){return{type:"REMOVE_BLOCK_TYPES",names:Array.isArray(e)?e:[e]}}function DLe(e,t){return{type:"ADD_BLOCK_STYLES",styles:Array.isArray(t)?t:[t],blockNames:Array.isArray(e)?e:[e]}}function FLe(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:Array.isArray(t)?t:[t],blockName:e}}function $Le(e,t){return{type:"ADD_BLOCK_VARIATIONS",variations:Array.isArray(t)?t:[t],blockName:e}}function VLe(e,t){return{type:"REMOVE_BLOCK_VARIATIONS",variationNames:Array.isArray(t)?t:[t],blockName:e}}function HLe(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function ULe(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function XLe(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function GLe(e){return{type:"SET_GROUPING_BLOCK_NAME",name:e}}function KLe(e){return{type:"SET_CATEGORIES",categories:e}}function YLe(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}function ZLe(e,t,n){return{type:"ADD_BLOCK_COLLECTION",namespace:e,title:t,icon:n}}function QLe(e){return{type:"REMOVE_BLOCK_COLLECTION",namespace:e}}const JLe=Object.freeze(Object.defineProperty({__proto__:null,__experimentalReapplyBlockFilters:PLe,addBlockCollection:ZLe,addBlockStyles:DLe,addBlockTypes:jLe,addBlockVariations:$Le,reapplyBlockTypeFilters:W1e,removeBlockCollection:QLe,removeBlockStyles:FLe,removeBlockTypes:ILe,removeBlockVariations:VLe,setCategories:KLe,setDefaultBlockName:HLe,setFreeformFallbackBlockName:ULe,setGroupingBlockName:GLe,setUnregisteredFallbackBlockName:XLe,updateCategory:YLe},Symbol.toStringTag,{value:"Module"}));function e7e(e,t){return{type:"ADD_BOOTSTRAPPED_BLOCK_TYPE",name:e,blockType:t}}function t7e(e,t){return({dispatch:n})=>{n({type:"ADD_UNPROCESSED_BLOCK_TYPE",name:e,blockType:t});const o=n(E1e(e,t));o&&n.addBlockTypes(o)}}function n7e(e){return{type:"ADD_BLOCK_BINDINGS_SOURCE",name:e.name,label:e.label,usesContext:e.usesContext,getValues:e.getValues,setValues:e.setValues,canUserEditValue:e.canUserEditValue,getFieldsList:e.getFieldsList}}function o7e(e){return{type:"REMOVE_BLOCK_BINDINGS_SOURCE",name:e}}const r7e=Object.freeze(Object.defineProperty({__proto__:null,addBlockBindingsSource:n7e,addBootstrappedBlockType:e7e,addUnprocessedBlockType:t7e,removeBlockBindingsSource:o7e},Symbol.toStringTag,{value:"Module"})),s7e="core/blocks",Xe=s1(s7e,{reducer:pLe,selectors:ELe,actions:JLe});Js(Xe);Dp(Xe).registerPrivateSelectors(zLe);Dp(Xe).registerPrivateActions(r7e);function ge(e,t={},n=[]){const o=gB(e,t);return{clientId:Si(),name:e,isValid:!0,attributes:o,innerBlocks:n}}function ju(e=[]){return e.map(t=>{const n=Array.isArray(t)?t:[t.name,t.attributes,t.innerBlocks],[o,r,s=[]]=n;return ge(o,r,ju(s))})}function N1e(e,t={},n){const o=Si(),r=gB(e.name,{...e.attributes,...t});return{...e,clientId:o,attributes:r,innerBlocks:n||e.innerBlocks.map(s=>N1e(s))}}function b0(e,t={},n){const o=Si();return{...e,clientId:o,attributes:{...e.attributes,...t},innerBlocks:n||e.innerBlocks.map(r=>b0(r))}}const B1e=(e,t,n)=>{if(!n.length)return!1;const o=n.length>1,r=n[0].name;if(!(eb(e)||!o||e.isMultiBlock)||!eb(e)&&!n.every(u=>u.name===r)||!(e.type==="block"))return!1;const c=n[0];return!(!(t!=="from"||e.blocks.indexOf(c.name)!==-1||eb(e))||!o&&t==="from"&&tH(c.name)&&tH(e.blockName)||!_8(e,n))},i7e=e=>e.length?i1().filter(o=>{const r=Qs("from",o.name);return!!Da(r,s=>B1e(s,"from",e))}):[],a7e=e=>{if(!e.length)return[];const t=e[0],n=Et(t.name);return(n?Qs("to",n.name):[]).filter(i=>i&&B1e(i,"to",e)).map(i=>i.blocks).flat().map(Et)},eb=e=>e&&e.type==="block"&&Array.isArray(e.blocks)&&e.blocks.includes("*"),tH=e=>e===M1e();function L1e(e){if(!e.length)return[];const t=i7e(e),n=a7e(e);return[...new Set([...t,...n])]}function Da(e,t){const n=Zne();for(let o=0;os||r,r.priority)}return n.applyFilters("transform",null)}function Qs(e,t){if(t===void 0)return i1().map(({name:c})=>Qs(e,c)).flat();const n=u3(t),{name:o,transforms:r}=n||{};if(!r||!Array.isArray(r[e]))return[];const s=r.supportedMobileTransforms&&Array.isArray(r.supportedMobileTransforms);return(s?r[e].filter(c=>c.type==="raw"||c.type==="prefix"?!0:!c.blocks||!c.blocks.length?!1:eb(c)?!0:c.blocks.every(l=>r.supportedMobileTransforms.includes(l))):r[e]).map(c=>({...c,blockName:o,usingMobileTransformations:s}))}function _8(e,t){if(typeof e.isMatch!="function")return!0;const n=t[0],o=e.isMultiBlock?t.map(s=>s.attributes):n.attributes,r=e.isMultiBlock?t:n;return e.isMatch(o,r)}function lo(e,t){const n=Array.isArray(e)?e:[e],o=n.length>1,r=n[0],s=r.name,i=Qs("from",t),c=Qs("to",s),l=Da(c,f=>f.type==="block"&&(eb(f)||f.blocks.indexOf(t)!==-1)&&(!o||f.isMultiBlock)&&_8(f,n))||Da(i,f=>f.type==="block"&&(eb(f)||f.blocks.indexOf(s)!==-1)&&(!o||f.isMultiBlock)&&_8(f,n));if(!l)return null;let u;return l.isMultiBlock?"__experimentalConvert"in l?u=l.__experimentalConvert(n):u=l.transform(n.map(f=>f.attributes),n.map(f=>f.innerBlocks)):"__experimentalConvert"in l?u=l.__experimentalConvert(r):u=l.transform(r.attributes,r.innerBlocks),u===null||typeof u!="object"||(u=Array.isArray(u)?u:[u],u.some(f=>!Et(f.name)))||!u.some(f=>f.name===t)?null:u.map((f,b,h)=>B0("blocks.switchToBlockType.transformedBlock",f,e,b,h))}const vB=(e,t)=>{try{var n;return ge(e,t.attributes,((n=t.innerBlocks)!==null&&n!==void 0?n:[]).map(o=>vB(o.name,o)))}catch{return ge("core/missing",{originalName:e,originalContent:"",originalUndelimitedContent:""})}};let qa,pa,Fp,ou;const j1e=/)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;function n4(e,t,n,o,r){return{blockName:e,attrs:t,innerBlocks:n,innerHTML:o,innerContent:r}}function xB(e){return n4(null,{},[],e,[e])}function c7e(e,t,n,o,r){return{block:e,tokenStart:t,tokenLength:n,prevOffset:o||t+n,leadingHtmlStart:r}}const P1e=e=>{qa=e,pa=0,Fp=[],ou=[],j1e.lastIndex=0;do;while(l7e());return Fp};function l7e(){const e=ou.length,t=d7e(),[n,o,r,s,i]=t,c=s>pa?pa:null;switch(n){case"no-more-tokens":if(e===0)return uS(),!1;if(e===1)return dS(),!1;for(;0{const o="(<("+("(?=!--|!\\[CDATA\\[)((?=!-)"+"!(?:-(?!->)[^\\-]*)*(?:-->)?"+"|"+"!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?"+")")+"|[^>]*>?))";return new RegExp(o)})();function f7e(e){const t=[];let n=e,o;for(;o=n.match(p7e);){const r=o.index;t.push(n.slice(0,r)),t.push(o[0]),n=n.slice(r+o[0].length)}return n.length&&t.push(n),t}function b7e(e,t){const n=f7e(e);let o=!1;const r=Object.keys(t);for(let s=1;s"),i=s.pop();e="";for(let c=0;c";n.push([d,l.substr(u)+""]),e+=l.substr(0,u)+d}e+=i}e=e.replace(/\s*/g,` - -`);const o="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";e=e.replace(new RegExp("(<"+o+"[\\s/>])","g"),` - -$1`),e=e.replace(new RegExp("()","g"),`$1 - -`),e=e.replace(/\r\n|\r/g,` -`),e=b7e(e,{"\n":" "}),e.indexOf("\s*/g,"")),e.indexOf("")!==-1&&(e=e.replace(/(]*>)\s*/g,"$1"),e=e.replace(/\s*<\/object>/g,""),e=e.replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),(e.indexOf("\]]*[>\]])\s*/g,"$1"),e=e.replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1"),e=e.replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),e.indexOf("]*>)/,"$1"),e=e.replace(/<\/figcaption>\s*/,"")),e=e.replace(/\n\n+/g,` - -`);const r=e.split(/\n\s*\n/).filter(Boolean);return e="",r.forEach(s=>{e+="

"+s.replace(/^\n*|\n*$/g,"")+`

-`}),e=e.replace(/

\s*<\/p>/g,""),e=e.replace(/

([^<]+)<\/(div|address|form)>/g,"

$1

"),e=e.replace(new RegExp("

\\s*(]*>)\\s*

","g"),"$1"),e=e.replace(/

(/g,"$1"),e=e.replace(/

]*)>/gi,"

"),e=e.replace(/<\/blockquote><\/p>/g,"

"),e=e.replace(new RegExp("

\\s*(]*>)","g"),"$1"),e=e.replace(new RegExp("(]*>)\\s*

","g"),"$1"),t&&(e=e.replace(/<(script|style).*?<\/\\1>/g,s=>s[0].replace(/\n/g,"")),e=e.replace(/
|/g,"
"),e=e.replace(/(
)?\s*\n/g,(s,i)=>i?s:`
-`),e=e.replace(//g,` -`)),e=e.replace(new RegExp("(]*>)\\s*
","g"),"$1"),e=e.replace(/
(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1"),e=e.replace(/\n<\/p>$/g,"

"),n.forEach(s=>{const[i,c]=s;e=e.replace(i,c)}),e.indexOf("")!==-1&&(e=e.replace(/\s?\s?/g,` -`)),e}function D1e(e){const t="blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure",n=t+"|div|p",o=t+"|pre",r=[];let s=!1,i=!1;return e?((e.indexOf("]*>[\s\S]*?<\/\1>/g,c=>(r.push(c),""))),e.indexOf("]*>[\s\S]+?<\/pre>/g,c=>(c=c.replace(/
(\r\n|\n)?/g,""),c=c.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,""),c.replace(/\r?\n/g,"")))),e.indexOf("[caption")!==-1&&(i=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,c=>c.replace(/]*)>/g,"").replace(/[\r\n\t]+/,""))),e=e.replace(new RegExp("\\s*\\s*","g"),` -`),e=e.replace(new RegExp("\\s*<((?:"+n+")(?: [^>]*)?)>","g"),` -<$1>`),e=e.replace(/(

]+>[\s\S]*?)<\/p>/g,"$1"),e=e.replace(/]*)?>\s*

/gi,` - -`),e=e.replace(/\s*

/gi,""),e=e.replace(/\s*<\/p>\s*/gi,` - -`),e=e.replace(/\n[\s\u00a0]+\n/g,` - -`),e=e.replace(/(\s*)
\s*/gi,(c,l)=>l&&l.indexOf(` -`)!==-1?` - -`:` -`),e=e.replace(/\s*

\s*/g,`
-`),e=e.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,` - -[caption$1[/caption] - -`),e=e.replace(/caption\]\n\n+\[caption/g,`caption] - -[caption`),e=e.replace(new RegExp("\\s*<((?:"+o+")(?: [^>]*)?)\\s*>","g"),` -<$1>`),e=e.replace(new RegExp("\\s*\\s*","g"),` -`),e=e.replace(/<((li|dt|dd)[^>]*)>/g," <$1>"),e.indexOf("/g,` -`)),e.indexOf("]*)?>\s*/g,` - - - -`)),e.indexOf("/g,c=>c.replace(/[\r\n]+/g,""))),e=e.replace(/<\/p#>/g,`

-`),e=e.replace(/\s*(

]+>[\s\S]*?<\/p>)/g,` -$1`),e=e.replace(/^\s+/,""),e=e.replace(/[\s\u00a0]+$/,""),s&&(e=e.replace(//g,` -`)),i&&(e=e.replace(/]*)>/g,"")),r.length&&(e=e.replace(//g,()=>r.shift())),e):""}function DM(e,t={}){const{isCommentDelimited:n=!0}=t,{blockName:o,attrs:r={},innerBlocks:s=[],innerContent:i=[]}=e;let c=0;const l=i.map(u=>u!==null?u:DM(s[c++],t)).join(` -`).replace(/\n+/g,` -`).trim();return n?V1e(o,r,l):l}function Nv(e){const t="wp-block-"+e.replace(/\//,"-").replace(/^core-/,"");return B0("blocks.getBlockDefaultClassName",t,e)}function _B(e){const t="editor-block-list-item-"+e.replace(/\//,"-").replace(/^core-/,"");return B0("blocks.getBlockMenuDefaultClassName",t,e)}const w8={},F1e={};function Bv(e={}){const{blockType:t,attributes:n}=w8;return Bv.skipFilters?e:B0("blocks.getSaveContent.extraProps",{...e},t,n)}function h7e(e={}){const{innerBlocks:t}=F1e;if(!Array.isArray(t))return{...e,children:t};const n=V1(t,{isInnerBlocks:!0});return{...e,children:a.jsx(Ro,{children:n})}}function $1e(e,t,n=[]){const o=u3(e);if(!o?.save)return null;let{save:r}=o;if(r.prototype instanceof O.Component){const i=new r({attributes:t});r=i.render.bind(i)}w8.blockType=o,w8.attributes=t,F1e.innerBlocks=n;let s=r({attributes:t,innerBlocks:n});if(s!==null&&typeof s=="object"&&Jne("blocks.getSaveContent.extraProps")&&!(o.apiVersion>1)){const i=B0("blocks.getSaveContent.extraProps",{...s.props},o,t);is(i,s.props)||(s=O.cloneElement(s,i))}return B0("blocks.getSaveElement",s,o,t)}function Of(e,t,n){const o=u3(e);return jr($1e(o,t,n))}function m7e(e,t){var n;return Object.entries((n=e.attributes)!==null&&n!==void 0?n:{}).reduce((o,[r,s])=>{const i=t[r];return i===void 0||s.source!==void 0||s.role==="local"?o:s.__experimentalRole==="local"?(qe("__experimentalRole attribute",{since:"6.7",version:"6.8",alternative:"role attribute",hint:`Check the block.json of the ${e?.name} block.`}),o):("default"in s&&JSON.stringify(s.default)===JSON.stringify(i)||(o[r]=i),o)},{})}function g7e(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(//g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}function d_(e){let t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=Of(e.name,e.attributes,e.innerBlocks)}catch{}return t}function V1e(e,t,n){const o=t&&Object.entries(t).length?g7e(t)+" ":"",r=e?.startsWith("core/")?e.slice(5):e;return n?` -`+n+` -`:``}function M7e(e,{isInnerBlocks:t=!1}={}){if(!e.isValid&&e.__unstableBlockSource)return DM(e.__unstableBlockSource);const n=e.name,o=d_(e);if(n===l3()||!t&&n===Lu())return o;const r=Et(n);if(!r)return o;const s=m7e(r,e.attributes);return V1e(n,s,o)}function ml(e){e.length===1&&Qc(e[0])&&(e=[]);let t=V1(e);return e.length===1&&e[0].name===Lu()&&e[0].name==="core/freeform"&&(t=D1e(t)),t}function V1(e,t){return(Array.isArray(e)?e:[e]).map(o=>M7e(o,t)).join(` - -`)}var z7e=/[\t\n\f ]/,O7e=/[A-Za-z]/,y7e=/\r\n?/g;function Cr(e){return z7e.test(e)}function oH(e){return O7e.test(e)}function A7e(e){return e.replace(y7e,` -`)}var v7e=function(){function e(t,n,o){o===void 0&&(o="precompile"),this.delegate=t,this.entityParser=n,this.mode=o,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var r=this.peek();if(r==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&r===` -`){var s=this.tagNameBuffer.toLowerCase();(s==="pre"||s==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var r=this.peek(),s=this.tagNameBuffer;r==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):r==="&"&&s!=="script"&&s!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(r))},tagOpen:function(){var r=this.consume();r==="!"?this.transitionTo("markupDeclarationOpen"):r==="/"?this.transitionTo("endTagOpen"):(r==="@"||r===":"||oH(r))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(r))},markupDeclarationOpen:function(){var r=this.consume();if(r==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var s=r.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();s==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var r=this.consume();Cr(r)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var r=this.consume();Cr(r)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(r.toLowerCase()))},doctypeName:function(){var r=this.consume();Cr(r)?this.transitionTo("afterDoctypeName"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(r.toLowerCase())},afterDoctypeName:function(){var r=this.consume();if(!Cr(r))if(r===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var s=r.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),i=s.toUpperCase()==="PUBLIC",c=s.toUpperCase()==="SYSTEM";(i||c)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),i?this.transitionTo("afterDoctypePublicKeyword"):c&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var r=this.peek();Cr(r)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):r==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):r==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):r===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var r=this.consume();r==='"'?this.transitionTo("afterDoctypePublicIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(r)},doctypePublicIdentifierSingleQuoted:function(){var r=this.consume();r==="'"?this.transitionTo("afterDoctypePublicIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(r)},afterDoctypePublicIdentifier:function(){var r=this.consume();Cr(r)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):r==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):r==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var r=this.consume();Cr(r)||(r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):r==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):r==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var r=this.consume();r==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(r)},doctypeSystemIdentifierSingleQuoted:function(){var r=this.consume();r==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(r)},afterDoctypeSystemIdentifier:function(){var r=this.consume();Cr(r)||r===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var r=this.consume();r==="-"?this.transitionTo("commentStartDash"):r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(r),this.transitionTo("comment"))},commentStartDash:function(){var r=this.consume();r==="-"?this.transitionTo("commentEnd"):r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var r=this.consume();r==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(r)},commentEndDash:function(){var r=this.consume();r==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+r),this.transitionTo("comment"))},commentEnd:function(){var r=this.consume();r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+r),this.transitionTo("comment"))},tagName:function(){var r=this.consume();Cr(r)?this.transitionTo("beforeAttributeName"):r==="/"?this.transitionTo("selfClosingStartTag"):r===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(r)},endTagName:function(){var r=this.consume();Cr(r)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):r==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):r===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(r)},beforeAttributeName:function(){var r=this.peek();if(Cr(r)){this.consume();return}else r==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):r===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):r==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(r)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var r=this.peek();Cr(r)?(this.transitionTo("afterAttributeName"),this.consume()):r==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):r==='"'||r==="'"||r==="<"?(this.delegate.reportSyntaxError(r+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(r)):(this.consume(),this.delegate.appendToAttributeName(r))},afterAttributeName:function(){var r=this.peek();if(Cr(r)){this.consume();return}else r==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(r))},beforeAttributeValue:function(){var r=this.peek();Cr(r)?this.consume():r==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):r==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(r))},attributeValueDoubleQuoted:function(){var r=this.consume();r==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):r==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(r)},attributeValueSingleQuoted:function(){var r=this.consume();r==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):r==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(r)},attributeValueUnquoted:function(){var r=this.peek();Cr(r)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):r==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):r===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(r))},afterAttributeValueQuoted:function(){var r=this.peek();Cr(r)?(this.consume(),this.transitionTo("beforeAttributeName")):r==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):r===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var r=this.peek();r===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var r=this.consume();(r==="@"||r===":"||oH(r))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(r))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(t){this.state=t},e.prototype.tokenize=function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},e.prototype.tokenizePart=function(t){for(this.input+=A7e(t);this.index"||t==="style"&&this.input.substring(this.index,this.index+8)!==""||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),x7e=function(){function e(t,n){n===void 0&&(n={}),this.options=n,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new v7e(this,t,n.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var n=0;nt("Block validation: "+o,...r)}return{error:e(console.error),warning:e(console.warn),getItems(){return[]}}}function _7e(){const e=[],t=xh();return{error(...n){e.push({log:t.error,args:n})},warning(...n){e.push({log:t.warning,args:n})},getItems(){return e}}}const w7e=e=>e,k7e=/[\t\n\r\v\f ]+/g,S7e=/^[\t\n\r\v\f ]*$/,C7e=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,H1e=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],q7e=["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"],R7e=[...H1e,...q7e],rH=[w7e,L7e],T7e=/^[\da-z]+$/i,E7e=/^#\d+$/,W7e=/^#x[\da-f]+$/i;function N7e(e){return T7e.test(e)||E7e.test(e)||W7e.test(e)}class B7e{parse(t){if(N7e(t))return ht("&"+t+";")}}function wB(e){return e.trim().split(k7e)}function L7e(e){return wB(e).join(" ")}function j7e(e){return e.attributes.filter(t=>{const[n,o]=t;return o||n.indexOf("data-")===0||R7e.includes(n)})}function sH(e,t,n=xh()){let o=e.chars,r=t.chars;for(let s=0;s{const[o,...r]=n.split(":"),s=r.join(":");return[o.trim(),I7e(s.trim())]});return Object.fromEntries(t)}const F7e={class:(e,t)=>{const[n,o]=[e,t].map(wB),r=n.filter(i=>!o.includes(i)),s=o.filter(i=>!n.includes(i));return r.length===0&&s.length===0},style:(e,t)=>Yo(...[e,t].map(D7e)),...Object.fromEntries(H1e.map(e=>[e,()=>!0]))};function $7e(e,t,n=xh()){if(e.length!==t.length)return n.warning("Expected attributes %o, instead saw %o.",t,e),!1;const o={};for(let r=0;re.tagName!==t.tagName&&e.tagName.toLowerCase()!==t.tagName.toLowerCase()?(n.warning("Expected tag name `%s`, instead saw `%s`.",t.tagName,e.tagName),!1):$7e(...[e,t].map(j7e),n),Chars:sH,Comment:sH};function Tm(e){let t;for(;t=e.shift();)if(t.type!=="Chars"||!S7e.test(t.chars))return t}function H7e(e,t=xh()){try{return new x7e(new B7e).tokenize(e)}catch{t.warning("Malformed HTML detected: %s",e)}return null}function iH(e,t){return e.selfClosing?!!(t&&t.tagName===e.tagName&&t.type==="EndTag"):!1}function U7e(e,t,n=xh()){if(e===t)return!0;const[o,r]=[e,t].map(c=>H7e(c,n));if(!o||!r)return!1;let s,i;for(;s=Tm(o);){if(i=Tm(r),!i)return n.warning("Expected end of content, instead saw %o.",s),!1;if(s.type!==i.type)return n.warning("Expected token of type `%s` (%o), instead saw `%s` (%o).",i.type,i,s.type,s),!1;const c=V7e[s.type];if(c&&!c(s,i,n))return!1;iH(s,r[0])?Tm(r):iH(i,o[0])&&Tm(o)}return(i=Tm(r))?(n.warning("Expected %o, instead saw end of content.",i),!1):!0}function FM(e,t=e.name){if(e.name===Lu()||e.name===l3())return[!0,[]];const o=_7e(),r=u3(t);let s;try{s=Of(r,e.attributes)}catch(c){return o.error(`Block validation failed because an error occurred while generating block content: - -%s`,c.toString()),[!1,o.getItems()]}const i=U7e(e.originalContent,s,o);return i||o.error(`Block validation failed for \`%s\` (%o). - -Content generated by \`save\` function: - -%s - -Content retrieved from post body: - -%s`,r.name,r,s,e.originalContent),[i,o.getItems()]}function U1e(e,t){const n={...t};if(e==="core/cover-image"&&(e="core/cover"),(e==="core/text"||e==="core/cover-text")&&(e="core/paragraph"),e&&e.indexOf("core/social-link-")===0&&(n.service=e.substring(17),e="core/social-link"),e&&e.indexOf("core-embed/")===0){const o=e.substring(11),r={speaker:"speaker-deck",polldaddy:"crowdsignal"};n.providerNameSlug=o in r?r[o]:o,["amazon-kindle","wordpress"].includes(o)||(n.responsive=!0),e="core/embed"}if(e==="core/post-comment-author"&&(e="core/comment-author-name"),e==="core/post-comment-content"&&(e="core/comment-content"),e==="core/post-comment-date"&&(e="core/comment-date"),e==="core/comments-query-loop"){e="core/comments";const{className:o=""}=n;o.includes("wp-block-comments-query-loop")||(n.className=["wp-block-comments-query-loop",o].join(" "))}if(e==="core/post-comments"&&(e="core/comments",n.legacy=!0),t.layout?.type==="grid"&&typeof t.layout?.columnCount=="string"&&(n.layout={...n.layout,columnCount:parseInt(t.layout.columnCount,10)}),typeof t.style?.layout?.columnSpan=="string"){const o=parseInt(t.style.layout.columnSpan,10);n.style={...n.style,layout:{...n.style.layout,columnSpan:isNaN(o)?void 0:o}}}if(typeof t.style?.layout?.rowSpan=="string"){const o=parseInt(t.style.layout.rowSpan,10);n.style={...n.style,layout:{...n.style.layout,rowSpan:isNaN(o)?void 0:o}}}if(globalThis.IS_GUTENBERG_PLUGIN&&n.metadata?.bindings&&(e==="core/paragraph"||e==="core/heading"||e==="core/image"||e==="core/button")&&n.metadata.bindings.__default?.source!=="core/pattern-overrides"){const o=["content","url","title","id","alt","text","linkTarget"];let r=!1;o.forEach(s=>{n.metadata.bindings[s]?.source==="core/pattern-overrides"&&(r=!0,n.metadata={...n.metadata,bindings:{...n.metadata.bindings}},delete n.metadata.bindings[s])}),r&&(n.metadata.bindings.__default={source:"core/pattern-overrides"})}return[e,n]}function X7e(e,t){for(var n=t.split("."),o;o=n.shift();){if(!(o in e))return;e=e[o]}return e}var G7e=function(){var e;return function(){return e||(e=document.implementation.createHTMLDocument("")),e}}();function kB(e,t){if(t){if(typeof e=="string"){var n=G7e();n.body.innerHTML=e,e=n.body}if(typeof t=="function")return t(e);if(Object===t.constructor)return Object.keys(t).reduce(function(o,r){var s=t[r];return o[r]=kB(e,s),o},{})}}function SB(e,t){var n,o;return arguments.length===1?(n=e,o=void 0):(n=t,o=e),function(r){var s=r;if(o&&(s=r.querySelector(o)),s)return X7e(s,n)}}function K7e(e,t){var n,o;return arguments.length===1?(n=e,o=void 0):(n=t,o=e),function(r){var s=SB(o,"attributes")(r);if(s&&Object.prototype.hasOwnProperty.call(s,n))return s[n].value}}function Y7e(e){return SB(e,"textContent")}function Z7e(e,t){return function(n){var o=n.querySelectorAll(e);return[].map.call(o,function(r){return kB(r,t)})}}function Q7e(e){return qe("wp.blocks.children.getChildrenArray",{since:"6.1",version:"6.3",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"}),e}function J7e(...e){qe("wp.blocks.children.concat",{since:"6.1",version:"6.3",alternative:"wp.richText.concat",link:"https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/"});const t=[];for(let n=0;n{let n=t;return e&&(n=t.querySelector(e)),n?CB(n.childNodes):[]}}const k8={concat:J7e,getChildrenArray:Q7e,fromDOM:CB,toHTML:eje,matcher:X1e};function tje(e){const t={};for(let n=0;n{let n=t;e&&(n=t.querySelector(e));try{return G1e(n)}catch{return null}}}function oje(e,t){return n=>{let o=n;if(e&&(o=n.querySelector(e)),!o)return"";if(t){let r="";const s=o.children.length;for(let i=0;in=>{const o=e?n.querySelector(e):n;return o?p0.fromHTMLElement(o,{preserveWhiteSpace:t}):p0.empty()},sje=e=>t=>e(t)!==void 0;function ije(e,t){switch(t){case"rich-text":return e instanceof p0;case"string":return typeof e=="string";case"boolean":return typeof e=="boolean";case"object":return!!e&&e.constructor===Object;case"null":return e===null;case"array":return Array.isArray(e);case"integer":case"number":return typeof e=="number"}return!0}function aje(e,t){return t.some(n=>ije(e,n))}function cje(e,t,n,o,r){let s;switch(t.source){case void 0:s=o?o[e]:void 0;break;case"raw":s=r;break;case"attribute":case"property":case"html":case"text":case"rich-text":case"children":case"node":case"query":case"tag":s=qB(n,t);break}return(!lje(s,t.type)||!uje(s,t.enum))&&(s=void 0),s===void 0&&(s=v1e(t)),s}function lje(e,t){return t===void 0||aje(e,Array.isArray(t)?t:[t])}function uje(e,t){return!Array.isArray(t)||t.includes(e)}const K1e=gs(e=>{switch(e.source){case"attribute":{let n=K7e(e.selector,e.attribute);return e.type==="boolean"&&(n=sje(n)),n}case"html":return oje(e.selector,e.multiline);case"text":return Y7e(e.selector);case"rich-text":return rje(e.selector,e.__unstablePreserveWhiteSpace);case"children":return X1e(e.selector);case"node":return nje(e.selector);case"query":const t=Object.fromEntries(Object.entries(e.query).map(([n,o])=>[n,K1e(o)]));return Z7e(e.selector,t);case"tag":{const n=SB(e.selector,"nodeName");return o=>n(o)?.toLowerCase()}default:console.error(`Unknown source type "${e.source}"`)}});function Y1e(e){return kB(e,t=>t)}function qB(e,t){return K1e(t)(Y1e(e))}function Jc(e,t,n={}){var o;const r=Y1e(t),s=u3(e),i=Object.fromEntries(Object.entries((o=s.attributes)!==null&&o!==void 0?o:{}).map(([c,l])=>[c,cje(c,l,r,n,t)]));return B0("blocks.getBlockAttributes",i,s,t,n)}const dje={type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"};function aH(e){const t=qB(`

${e}
`,dje);return t?t.trim().split(/\s+/):[]}function pje(e,t,n){if(!nt(t,"customClassName",!0))return e;const o={...e},{className:r,...s}=o,i=Of(t,s),c=aH(i),u=aH(n).filter(d=>!c.includes(d));return u.length?o.className=u.join(" "):i&&delete o.className,o}function Lv(e,t){const n=pje(e.attributes,t,e.originalContent);return{...e,attributes:n}}function fje(){return!1}function bje(e,t,n){const o=t.attrs,{deprecated:r}=n;if(!r||!r.length)return e;for(let s=0;sZ1e(d,t)).filter(d=>!!d),i=ge(n.blockName,Jc(o,n.innerHTML,n.attrs),s);i.originalContent=n.innerHTML;const c=Mje(i,o),{validationIssues:l}=c,u=bje(c,n,o);return u.isValid||(u.__unstableBlockSource=e),!c.isValid&&u.isValid&&!t?.__unstableSkipMigrationLogs?(console.groupCollapsed("Updated Block: %s",o.name),console.info(`Block successfully updated for \`%s\` (%o). - -New content generated by \`save\` function: - -%s - -Content retrieved from post body: - -%s`,o.name,o,Of(o,u.attributes),u.originalContent),console.groupEnd()):!c.isValid&&!u.isValid&&l.forEach(({log:d,args:p})=>d(...p)),u}function w0(e,t){return P1e(e).reduce((n,o)=>{const r=Z1e(o,t);return r&&n.push(r),n},[])}function Q1e(){return Qs("from").filter(({type:e})=>e==="raw").map(e=>e.isMatch?e:{...e,isMatch:t=>e.selector&&t.matches(e.selector)})}function J1e(e,t){const n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,Array.from(n.body.children).flatMap(o=>{const r=Da(Q1e(),({isMatch:c})=>c(o));if(!r)return So.isNative?w0(`${o.outerHTML}`):ge("core/html",Jc("core/html",o.outerHTML));const{transform:s,blockName:i}=r;if(s){const c=s(o,t);return o.hasAttribute("class")&&(c.attributes.className=o.getAttribute("class")),c}return ge(i,Jc(i,o.outerHTML))})}function p_(e,t={}){const n=document.implementation.createHTMLDocument(""),o=document.implementation.createHTMLDocument(""),r=n.body,s=o.body;for(r.innerHTML=e;r.firstChild;){const i=r.firstChild;i.nodeType===i.TEXT_NODE?gv(i)?r.removeChild(i):((!s.lastChild||s.lastChild.nodeName!=="P")&&s.appendChild(o.createElement("P")),s.lastChild.appendChild(i)):i.nodeType===i.ELEMENT_NODE?i.nodeName==="BR"?(i.nextSibling&&i.nextSibling.nodeName==="BR"&&(s.appendChild(o.createElement("P")),r.removeChild(i.nextSibling)),s.lastChild&&s.lastChild.nodeName==="P"&&s.lastChild.hasChildNodes()?s.lastChild.appendChild(i):r.removeChild(i)):i.nodeName==="P"?gv(i)&&!t.raw?r.removeChild(i):s.appendChild(i):K2(i)?((!s.lastChild||s.lastChild.nodeName!=="P")&&s.appendChild(o.createElement("P")),s.lastChild.appendChild(i)):s.appendChild(i):r.removeChild(i)}return s.innerHTML}function ese(e,t){if(e.nodeType!==e.COMMENT_NODE||e.nodeValue!=="nextpage"&&e.nodeValue.indexOf("more")!==0)return;const n=zje(e,t);if(!e.parentNode||e.parentNode.nodeName!=="P")gSe(e,n);else{const o=Array.from(e.parentNode.childNodes),r=o.indexOf(e),s=e.parentNode.parentNode||t.body,i=(c,l)=>(c||(c=t.createElement("p")),c.appendChild(l),c);[o.slice(0,r).reduce(i,null),n,o.slice(r+1).reduce(i,null)].forEach(c=>c&&s.insertBefore(c,e.parentNode)),Np(e.parentNode)}}function zje(e,t){if(e.nodeValue==="nextpage")return yje(t);const n=e.nodeValue.slice(4).trim();let o=e,r=!1;for(;o=o.nextSibling;)if(o.nodeType===o.COMMENT_NODE&&o.nodeValue==="noteaser"){r=!0,Np(o);break}return Oje(n,r,t)}function Oje(e,t,n){const o=n.createElement("wp-block");return o.dataset.block="core/more",e&&(o.dataset.customText=e),t&&(o.dataset.noTeaser=""),o}function yje(e){const t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}function cH(e){return e.nodeName==="OL"||e.nodeName==="UL"}function Aje(e){return Array.from(e.childNodes).map(({nodeValue:t=""})=>t).join("")}function tse(e){if(!cH(e))return;const t=e,n=e.previousElementSibling;if(n&&n.nodeName===e.nodeName&&t.children.length===1){for(;t.firstChild;)n.appendChild(t.firstChild);t.parentNode.removeChild(t)}const o=e.parentNode;if(o&&o.nodeName==="LI"&&o.children.length===1&&!/\S/.test(Aje(o))){const r=o,s=r.previousElementSibling,i=r.parentNode;s&&(s.appendChild(t),i.removeChild(r))}if(o&&cH(o)){const r=e.previousElementSibling;r?r.appendChild(e):jg(e)}}function nse(e){return t=>{t.nodeName==="BLOCKQUOTE"&&(t.innerHTML=p_(t.innerHTML,e))}}function vje(e,t){var n;const o=e.nodeName.toLowerCase();return o==="figcaption"||q0e(e)?!1:o in((n=t?.figure?.children)!==null&&n!==void 0?n:{})}function xje(e,t){var n;return e.nodeName.toLowerCase()in((n=t?.figure?.children?.a?.children)!==null&&n!==void 0?n:{})}function pS(e,t=e){const n=e.ownerDocument.createElement("figure");t.parentNode.insertBefore(n,t),n.appendChild(e)}function ose(e,t,n){if(!vje(e,n))return;let o=e;const r=e.parentNode;xje(e,n)&&r.nodeName==="A"&&r.childNodes.length===1&&(o=e.parentNode);const s=o.closest("p,div");s?e.classList?(e.classList.contains("alignright")||e.classList.contains("alignleft")||e.classList.contains("aligncenter")||!s.textContent.trim())&&pS(o,s):pS(o,s):pS(o)}function RB(e,t,n=0){const o=$M(e);o.lastIndex=n;const r=o.exec(t);if(!r)return;if(r[1]==="["&&r[7]==="]")return RB(e,t,o.lastIndex);const s={index:r.index,content:r[0],shortcode:TB(r)};return r[1]&&(s.content=s.content.slice(1),s.index++),r[7]&&(s.content=s.content.slice(0,-1)),s}function _je(e,t,n){return t.replace($M(e),function(o,r,s,i,c,l,u,d){if(r==="["&&d==="]")return o;const p=n(TB(arguments));return p||p===""?r+p+d:o})}function wje(e){return new EB(e).string()}function $M(e){return new RegExp("\\[(\\[?)("+e+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}const lH=gs(e=>{const t={},n=[],o=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;e=e.replace(/[\u00a0\u200b]/g," ");let r;for(;r=o.exec(e);)r[1]?t[r[1].toLowerCase()]=r[2]:r[3]?t[r[3].toLowerCase()]=r[4]:r[5]?t[r[5].toLowerCase()]=r[6]:r[7]?n.push(r[7]):r[8]?n.push(r[8]):r[9]&&n.push(r[9]);return{named:t,numeric:n}});function TB(e){let t;return e[4]?t="self-closing":e[6]?t="closed":t="single",new EB({tag:e[2],attrs:e[3],type:t,content:e[5]})}const EB=Object.assign(function(e){const{tag:t,attrs:n,type:o,content:r}=e||{};if(Object.assign(this,{tag:t,type:o,content:r}),this.attrs={named:{},numeric:[]},!n)return;const s=["named","numeric"];typeof n=="string"?this.attrs=lH(n):n.length===s.length&&s.every((i,c)=>i===n[c])?this.attrs=n:Object.entries(n).forEach(([i,c])=>{this.set(i,c)})},{next:RB,replace:_je,string:wje,regexp:$M,attrs:lH,fromMatch:TB});Object.assign(EB.prototype,{get(e){return this.attrs[typeof e=="number"?"numeric":"named"][e]},set(e,t){return this.attrs[typeof e=="number"?"numeric":"named"][e]=t,this},string(){let e="["+this.tag;return this.attrs.numeric.forEach(t=>{/\s/.test(t)?e+=' "'+t+'"':e+=" "+t}),Object.entries(this.attrs.named).forEach(([t,n])=>{e+=" "+t+'="'+n+'"'}),this.type==="single"?e+"]":this.type==="self-closing"?e+" /]":(e+="]",this.content&&(e+=this.content),e+"[/"+this.tag+"]")}});const uH=e=>Array.isArray(e)?e:[e],dH=/(\n|

)\s*$/,pH=/^\s*(\n|<\/p>)/;function w2(e,t=0,n=[]){const o=Qs("from"),r=Da(o,u=>n.indexOf(u.blockName)===-1&&u.type==="shortcode"&&uH(u.tag).some(d=>$M(d).test(e)));if(!r)return[e];const i=uH(r.tag).find(u=>$M(u).test(e));let c;const l=t;if(c=RB(i,e,t)){t=c.index+c.content.length;const u=e.substr(0,c.index),d=e.substr(t);if(!c.shortcode.content?.includes("<")&&!(dH.test(u)&&pH.test(d)))return w2(e,t);if(r.isMatch&&!r.isMatch(c.shortcode.attrs))return w2(e,l,[...n,r.blockName]);let p=[];if(typeof r.transform=="function")p=[].concat(r.transform(c.shortcode.attrs,c)),p=p.map(f=>(f.originalContent=c.shortcode.content,Lv(f,Et(f.name))));else{const f=Object.fromEntries(Object.entries(r.attributes).filter(([,z])=>z.shortcode).map(([z,A])=>[z,A.shortcode(c.shortcode.attrs,c)])),b=Et(r.blockName);if(!b)return[e];const h={...b,attributes:r.attributes};let g=ge(r.blockName,Jc(h,c.shortcode.content,f));g.originalContent=c.shortcode.content,g=Lv(g,h),p=[g]}return[...w2(u.replace(dH,"")),...p,...w2(d.replace(pH,""))]}return[e]}function kje(e,t){const o={phrasingContentSchema:Ex(t),isPaste:t==="paste"},r=e.map(({isMatch:l,blockName:u,schema:d})=>{const p=nt(u,"anchor");return d=typeof d=="function"?d(o):d,!p&&!l?d:d?Object.fromEntries(Object.entries(d).map(([f,b])=>{let h=b.attributes||[];return p&&(h=[...h,"id"]),[f,{...b,attributes:h,isMatch:l||void 0}]})):{}});function s(l,u,d){switch(d){case"children":return l==="*"||u==="*"?"*":{...l,...u};case"attributes":case"require":return[...l||[],...u||[]];case"isMatch":return!l||!u?void 0:(...p)=>l(...p)||u(...p)}}function i(l,u){for(const d in u)l[d]=l[d]?s(l[d],u[d],d):{...u[d]};return l}function c(l,u){for(const d in u)l[d]=l[d]?i(l[d],u[d]):{...u[d]};return l}return r.reduce(c,{})}function rse(e){return kje(Q1e(),e)}function Sje(e){return!/<(?!br[ />])/i.test(e)}function sse(e,t,n,o){Array.from(e).forEach(r=>{sse(r.childNodes,t,n,o),t.forEach(s=>{n.contains(r)&&s(r,n,o)})})}function zp(e,t=[],n){const o=document.implementation.createHTMLDocument("");return o.body.innerHTML=e,sse(o.body.childNodes,t,o,n),o.body.innerHTML}function jv(e,t){const n=e[`${t}Sibling`];if(n&&K2(n))return n;const{parentNode:o}=e;if(!(!o||!K2(o)))return jv(o,t)}function ise(e){e.nodeType===e.COMMENT_NODE&&Np(e)}function Cje(e,t){if(q0e(e))return!0;if(!t)return!1;const n=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some(r=>[n,t].filter(s=>!r.includes(s)).length===0)}function ase(e,t){return e.every(n=>Cje(n,t)&&ase(Array.from(n.children),t))}function qje(e){return e.nodeName==="BR"&&e.previousSibling&&e.previousSibling.nodeName==="BR"}function Rje(e,t){const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const o=Array.from(n.body.children);return!o.some(qje)&&ase(o,t)}function cse(e,t){if(e.nodeName==="SPAN"&&e.style){const{fontWeight:n,fontStyle:o,textDecorationLine:r,textDecoration:s,verticalAlign:i}=e.style;(n==="bold"||n==="700")&&qm(t.createElement("strong"),e),o==="italic"&&qm(t.createElement("em"),e),(r==="line-through"||s.includes("line-through"))&&qm(t.createElement("s"),e),i==="super"?qm(t.createElement("sup"),e):i==="sub"&&qm(t.createElement("sub"),e)}else e.nodeName==="B"?e=P$(e,"strong"):e.nodeName==="I"?e=P$(e,"em"):e.nodeName==="A"&&(e.target&&e.target.toLowerCase()==="_blank"?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")),e.name&&!e.id&&(e.id=e.name),e.id&&!e.ownerDocument.querySelector(`[href="#${e.id}"]`)&&e.removeAttribute("id"))}function lse(e){e.nodeName!=="SCRIPT"&&e.nodeName!=="NOSCRIPT"&&e.nodeName!=="TEMPLATE"&&e.nodeName!=="STYLE"||e.parentNode.removeChild(e)}function use(e){if(e.nodeType!==e.ELEMENT_NODE)return;const t=e.getAttribute("style");if(!t||!t.includes("mso-list"))return;t.split(";").reduce((o,r)=>{const[s,i]=r.split(":");return s&&i&&(o[s.trim().toLowerCase()]=i.trim().toLowerCase()),o},{})["mso-list"]==="ignore"&&e.remove()}function fS(e){return e.nodeName==="OL"||e.nodeName==="UL"}function Tje(e,t){if(e.nodeName!=="P")return;const n=e.getAttribute("style");if(!n||!n.includes("mso-list"))return;const o=e.previousElementSibling;if(!o||!fS(o)){const d=e.textContent.trim().slice(0,1),p=/[1iIaA]/.test(d),f=t.createElement(p?"ol":"ul");p&&f.setAttribute("type",d),e.parentNode.insertBefore(f,e)}const r=e.previousElementSibling,s=r.nodeName,i=t.createElement("li");let c=r;i.innerHTML=zp(e.innerHTML,[use]);const l=/mso-list\s*:[^;]+level([0-9]+)/i.exec(n);let u=l&&parseInt(l[1],10)-1||0;for(;u--;)c=c.lastChild||c,fS(c)&&(c=c.lastChild||c);fS(c)||(c=c.appendChild(t.createElement(s))),c.appendChild(i),e.parentNode.removeChild(e)}const Pv={};function os(e){const t=window.URL.createObjectURL(e);return Pv[t]=e,t}function dse(e){return Pv[e]}function pse(e){return dse(e)?.type.split("/")[0]}function S8(e){Pv[e]&&window.URL.revokeObjectURL(e),delete Pv[e]}function ro(e){return!e||!e.indexOf?!1:e.indexOf("blob:")===0}function fH(e,t,n=""){if(!e||!t)return;const o=new window.Blob([t],{type:n}),r=window.URL.createObjectURL(o),s=document.createElement("a");s.href=r,s.download=e,s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(r)}function Eje(e){if(e.nodeName==="IMG"){if(e.src.indexOf("file:")===0&&(e.src=""),e.src.indexOf("data:")===0){const[t,n]=e.src.split(","),[o]=t.slice(5).split(";");if(!n||!o){e.src="";return}let r;try{r=atob(n)}catch{e.src="";return}const s=new Uint8Array(r.length);for(let l=0;l (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:

foo
",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(M===!1)return JSON.parse(JSON.stringify(y));var _={};for(var w in y)y.hasOwnProperty(w)&&(_[w]=y[w].defaultValue);return _}function n(){var M=t(!0),y={};for(var _ in M)M.hasOwnProperty(_)&&(y[_]=!0);return y}var o={},r={},s={},i=t(!0),c="vanilla",l={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:n()};o.helper={},o.extensions={},o.setOption=function(M,y){return i[M]=y,this},o.getOption=function(M){return i[M]},o.getOptions=function(){return i},o.resetOptions=function(){i=t(!0)},o.setFlavor=function(M){if(!l.hasOwnProperty(M))throw Error(M+" flavor was not found");o.resetOptions();var y=l[M];c=M;for(var _ in y)y.hasOwnProperty(_)&&(i[_]=y[_])},o.getFlavor=function(){return c},o.getFlavorOptions=function(M){if(l.hasOwnProperty(M))return l[M]},o.getDefaultOptions=function(M){return t(M)},o.subParser=function(M,y){if(o.helper.isString(M))if(typeof y<"u")r[M]=y;else{if(r.hasOwnProperty(M))return r[M];throw Error("SubParser named "+M+" not registered!")}},o.extension=function(M,y){if(!o.helper.isString(M))throw Error("Extension 'name' must be a string");if(M=o.helper.stdExtName(M),o.helper.isUndefined(y)){if(!s.hasOwnProperty(M))throw Error("Extension named "+M+" is not registered!");return s[M]}else{typeof y=="function"&&(y=y()),o.helper.isArray(y)||(y=[y]);var _=u(y,M);if(_.valid)s[M]=y;else throw Error(_.error)}},o.getAllExtensions=function(){return s},o.removeExtension=function(M){delete s[M]},o.resetExtensions=function(){s={}};function u(M,y){var _=y?"Error in "+y+" extension->":"Error in unnamed extension",w={valid:!0,error:""};o.helper.isArray(M)||(M=[M]);for(var k=0;k"u"},o.helper.forEach=function(M,y){if(o.helper.isUndefined(M))throw new Error("obj param is required");if(o.helper.isUndefined(y))throw new Error("callback param is required");if(!o.helper.isFunction(y))throw new Error("callback param must be a function/closure");if(typeof M.forEach=="function")M.forEach(y);else if(o.helper.isArray(M))for(var _=0;_").replace(/&/g,"&")};var p=function(M,y,_,w){var k=w||"",S=k.indexOf("g")>-1,C=new RegExp(y+"|"+_,"g"+k.replace(/g/g,"")),q=new RegExp(y,k.replace(/g/g,"")),E=[],T,W,B,N,j;do for(T=0;B=C.exec(M);)if(q.test(B[0]))T++||(W=C.lastIndex,N=W-B[0].length);else if(T&&!--T){j=B.index+B[0].length;var P={left:{start:N,end:W},match:{start:W,end:B.index},right:{start:B.index,end:j},wholeMatch:{start:N,end:j}};if(E.push(P),!S)return E}while(T&&(C.lastIndex=W));return E};o.helper.matchRecursiveRegExp=function(M,y,_,w){for(var k=p(M,y,_,w),S=[],C=0;C0){var T=[];C[0].wholeMatch.start!==0&&T.push(M.slice(0,C[0].wholeMatch.start));for(var W=0;W=0?w+(_||0):w},o.helper.splitAtIndex=function(M,y){if(!o.helper.isString(M))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[M.substring(0,y),M.substring(y)]},o.helper.encodeEmailAddress=function(M){var y=[function(_){return"&#"+_.charCodeAt(0)+";"},function(_){return"&#x"+_.charCodeAt(0).toString(16)+";"},function(_){return _}];return M=M.replace(/./g,function(_){if(_==="@")_=y[Math.floor(Math.random()*2)](_);else{var w=Math.random();_=w>.9?y[2](_):w>.45?y[1](_):y[0](_)}return _}),M},o.helper.padEnd=function(y,_,w){return _=_>>0,w=String(w||" "),y.length>_?String(y):(_=_-y.length,_>w.length&&(w+=w.repeat(_/w.length)),String(y)+w.slice(0,_))},typeof console>"u"&&(console={warn:function(M){alert(M)},log:function(M){alert(M)},error:function(M){throw M}}),o.helper.regexes={asteriskDashAndColon:/([*_:~])/g},o.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:`S`},o.Converter=function(M){var y={},_=[],w=[],k={},S=c,C={parsed:{},raw:"",format:""};q();function q(){M=M||{};for(var N in i)i.hasOwnProperty(N)&&(y[N]=i[N]);if(typeof M=="object")for(var j in M)M.hasOwnProperty(j)&&(y[j]=M[j]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof M+" was passed instead.");y.extensions&&o.helper.forEach(y.extensions,E)}function E(N,j){if(j=j||null,o.helper.isString(N))if(N=o.helper.stdExtName(N),j=N,o.extensions[N]){console.warn("DEPRECATION WARNING: "+N+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),T(o.extensions[N],N);return}else if(!o.helper.isUndefined(s[N]))N=s[N];else throw Error('Extension "'+N+'" could not be loaded. It was either not found or is not a valid extension.');typeof N=="function"&&(N=N()),o.helper.isArray(N)||(N=[N]);var P=u(N,j);if(!P.valid)throw Error(P.error);for(var D=0;D[ \t]+¨NBSP;<"),!j)if(window&&window.document)j=window.document;else throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var P=j.createElement("div");P.innerHTML=N;var D={preList:oe(P)};J(P);for(var H=P.childNodes,G="",K=0;K'}else ne.push(Z[te].innerHTML),Z[te].innerHTML="",Z[te].setAttribute("prenum",te.toString());return ne}return G},this.setOption=function(N,j){y[N]=j},this.getOption=function(N){return y[N]},this.getOptions=function(){return y},this.addExtension=function(N,j){j=j||null,E(N,j)},this.useExtension=function(N){E(N)},this.setFlavor=function(N){if(!l.hasOwnProperty(N))throw Error(N+" flavor was not found");var j=l[N];S=N;for(var P in j)j.hasOwnProperty(P)&&(y[P]=j[P])},this.getFlavor=function(){return S},this.removeExtension=function(N){o.helper.isArray(N)||(N=[N]);for(var j=0;j? ?(['"].*['"])?\)$/m)>-1)q="";else if(!q)if(C||(C=S.toLowerCase().replace(/ ?\n/g," ")),q="#"+C,!o.helper.isUndefined(_.gUrls[C]))q=_.gUrls[C],o.helper.isUndefined(_.gTitles[C])||(W=_.gTitles[C]);else return k;q=q.replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback);var B='",B};return M=M.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,w),M=M.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,w),M=M.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,w),M=M.replace(/\[([^\[\]]+)]()()()()()/g,w),y.ghMentions&&(M=M.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function(k,S,C,q,E){if(C==="\\")return S+q;if(!o.helper.isString(y.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var T=y.ghMentionsLink.replace(/\{u}/g,E),W="";return y.openLinksInNewWindow&&(W=' rel="noopener noreferrer" target="¨E95Eblank"'),S+'"+q+""})),M=_.converter._dispatch("anchors.after",M,y,_),M});var f=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,b=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,h=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,g=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,z=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,A=function(M){return function(y,_,w,k,S,C,q){w=w.replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback);var E=w,T="",W="",B=_||"",N=q||"";return/^www\./i.test(w)&&(w=w.replace(/^www\./i,"http://www.")),M.excludeTrailingPunctuationFromURLs&&C&&(T=C),M.openLinksInNewWindow&&(W=' rel="noopener noreferrer" target="¨E95Eblank"'),B+'"+E+""+T+N}},x=function(M,y){return function(_,w,k){var S="mailto:";return w=w||"",k=o.subParser("unescapeSpecialChars")(k,M,y),M.encodeEmails?(S=o.helper.encodeEmailAddress(S+k),k=o.helper.encodeEmailAddress(k)):S=S+k,w+''+k+""}};o.subParser("autoLinks",function(M,y,_){return M=_.converter._dispatch("autoLinks.before",M,y,_),M=M.replace(h,A(y)),M=M.replace(z,x(y,_)),M=_.converter._dispatch("autoLinks.after",M,y,_),M}),o.subParser("simplifiedAutoLinks",function(M,y,_){return y.simplifiedAutoLink&&(M=_.converter._dispatch("simplifiedAutoLinks.before",M,y,_),y.excludeTrailingPunctuationFromURLs?M=M.replace(b,A(y)):M=M.replace(f,A(y)),M=M.replace(g,x(y,_)),M=_.converter._dispatch("simplifiedAutoLinks.after",M,y,_)),M}),o.subParser("blockGamut",function(M,y,_){return M=_.converter._dispatch("blockGamut.before",M,y,_),M=o.subParser("blockQuotes")(M,y,_),M=o.subParser("headers")(M,y,_),M=o.subParser("horizontalRule")(M,y,_),M=o.subParser("lists")(M,y,_),M=o.subParser("codeBlocks")(M,y,_),M=o.subParser("tables")(M,y,_),M=o.subParser("hashHTMLBlocks")(M,y,_),M=o.subParser("paragraphs")(M,y,_),M=_.converter._dispatch("blockGamut.after",M,y,_),M}),o.subParser("blockQuotes",function(M,y,_){M=_.converter._dispatch("blockQuotes.before",M,y,_),M=M+` - -`;var w=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return y.splitAdjacentBlockquotes&&(w=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),M=M.replace(w,function(k){return k=k.replace(/^[ \t]*>[ \t]?/gm,""),k=k.replace(/¨0/g,""),k=k.replace(/^[ \t]+$/gm,""),k=o.subParser("githubCodeBlocks")(k,y,_),k=o.subParser("blockGamut")(k,y,_),k=k.replace(/(^|\n)/g,"$1 "),k=k.replace(/(\s*
[^\r]+?<\/pre>)/gm,function(S,C){var q=C;return q=q.replace(/^  /mg,"¨0"),q=q.replace(/¨0/g,""),q}),o.subParser("hashBlock")(`
-`+k+` -
`,y,_)}),M=_.converter._dispatch("blockQuotes.after",M,y,_),M}),o.subParser("codeBlocks",function(M,y,_){M=_.converter._dispatch("codeBlocks.before",M,y,_),M+="¨0";var w=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;return M=M.replace(w,function(k,S,C){var q=S,E=C,T=` -`;return q=o.subParser("outdent")(q,y,_),q=o.subParser("encodeCode")(q,y,_),q=o.subParser("detab")(q,y,_),q=q.replace(/^\n+/g,""),q=q.replace(/\n+$/g,""),y.omitExtraWLInCodeBlocks&&(T=""),q="
"+q+T+"
",o.subParser("hashBlock")(q,y,_)+E}),M=M.replace(/¨0/,""),M=_.converter._dispatch("codeBlocks.after",M,y,_),M}),o.subParser("codeSpans",function(M,y,_){return M=_.converter._dispatch("codeSpans.before",M,y,_),typeof M>"u"&&(M=""),M=M.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(w,k,S,C){var q=C;return q=q.replace(/^([ \t]*)/g,""),q=q.replace(/[ \t]*$/g,""),q=o.subParser("encodeCode")(q,y,_),q=k+""+q+"",q=o.subParser("hashHTMLSpans")(q,y,_),q}),M=_.converter._dispatch("codeSpans.after",M,y,_),M}),o.subParser("completeHTMLDocument",function(M,y,_){if(!y.completeHTMLDocument)return M;M=_.converter._dispatch("completeHTMLDocument.before",M,y,_);var w="html",k=` -`,S="",C=` -`,q="",E="";typeof _.metadata.parsed.doctype<"u"&&(k=" -`,w=_.metadata.parsed.doctype.toString().toLowerCase(),(w==="html"||w==="html5")&&(C=''));for(var T in _.metadata.parsed)if(_.metadata.parsed.hasOwnProperty(T))switch(T.toLowerCase()){case"doctype":break;case"title":S=""+_.metadata.parsed.title+` -`;break;case"charset":w==="html"||w==="html5"?C=' -`:C=' -`;break;case"language":case"lang":q=' lang="'+_.metadata.parsed[T]+'"',E+=' -`;break;default:E+=' -`}return M=k+" - -`+S+C+E+` - -`+M.trim()+` - -`,M=_.converter._dispatch("completeHTMLDocument.after",M,y,_),M}),o.subParser("detab",function(M,y,_){return M=_.converter._dispatch("detab.before",M,y,_),M=M.replace(/\t(?=\t)/g," "),M=M.replace(/\t/g,"¨A¨B"),M=M.replace(/¨B(.+?)¨A/g,function(w,k){for(var S=k,C=4-S.length%4,q=0;q/g,">"),M=_.converter._dispatch("encodeAmpsAndAngles.after",M,y,_),M}),o.subParser("encodeBackslashEscapes",function(M,y,_){return M=_.converter._dispatch("encodeBackslashEscapes.before",M,y,_),M=M.replace(/\\(\\)/g,o.helper.escapeCharactersCallback),M=M.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,o.helper.escapeCharactersCallback),M=_.converter._dispatch("encodeBackslashEscapes.after",M,y,_),M}),o.subParser("encodeCode",function(M,y,_){return M=_.converter._dispatch("encodeCode.before",M,y,_),M=M.replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,o.helper.escapeCharactersCallback),M=_.converter._dispatch("encodeCode.after",M,y,_),M}),o.subParser("escapeSpecialCharsWithinTagAttributes",function(M,y,_){M=_.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",M,y,_);var w=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,k=/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return M=M.replace(w,function(S){return S.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,o.helper.escapeCharactersCallback)}),M=M.replace(k,function(S){return S.replace(/([\\`*_~=|])/g,o.helper.escapeCharactersCallback)}),M=_.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",M,y,_),M}),o.subParser("githubCodeBlocks",function(M,y,_){return y.ghCodeBlocks?(M=_.converter._dispatch("githubCodeBlocks.before",M,y,_),M+="¨0",M=M.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(w,k,S,C){var q=y.omitExtraWLInCodeBlocks?"":` -`;return C=o.subParser("encodeCode")(C,y,_),C=o.subParser("detab")(C,y,_),C=C.replace(/^\n+/g,""),C=C.replace(/\n+$/g,""),C="
"+C+q+"
",C=o.subParser("hashBlock")(C,y,_),` - -¨G`+(_.ghCodeBlocks.push({text:w,codeblock:C})-1)+`G - -`}),M=M.replace(/¨0/,""),_.converter._dispatch("githubCodeBlocks.after",M,y,_)):M}),o.subParser("hashBlock",function(M,y,_){return M=_.converter._dispatch("hashBlock.before",M,y,_),M=M.replace(/(^\n+|\n+$)/g,""),M=` - -¨K`+(_.gHtmlBlocks.push(M)-1)+`K - -`,M=_.converter._dispatch("hashBlock.after",M,y,_),M}),o.subParser("hashCodeTags",function(M,y,_){M=_.converter._dispatch("hashCodeTags.before",M,y,_);var w=function(k,S,C,q){var E=C+o.subParser("encodeCode")(S,y,_)+q;return"¨C"+(_.gHtmlSpans.push(E)-1)+"C"};return M=o.helper.replaceRecursiveRegExp(M,w,"]*>","","gim"),M=_.converter._dispatch("hashCodeTags.after",M,y,_),M}),o.subParser("hashElement",function(M,y,_){return function(w,k){var S=k;return S=S.replace(/\n\n/g,` -`),S=S.replace(/^\n/,""),S=S.replace(/\n+$/g,""),S=` - -¨K`+(_.gHtmlBlocks.push(S)-1)+`K - -`,S}}),o.subParser("hashHTMLBlocks",function(M,y,_){M=_.converter._dispatch("hashHTMLBlocks.before",M,y,_);var w=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],k=function(N,j,P,D){var H=N;return P.search(/\bmarkdown\b/)!==-1&&(H=P+_.converter.makeHtml(j)+D),` - -¨K`+(_.gHtmlBlocks.push(H)-1)+`K - -`};y.backslashEscapesHTMLTags&&(M=M.replace(/\\<(\/?[^>]+?)>/g,function(N,j){return"<"+j+">"}));for(var S=0;S]*>)","im"),E="<"+w[S]+"\\b[^>]*>",T="";(C=o.helper.regexIndexOf(M,q))!==-1;){var W=o.helper.splitAtIndex(M,C),B=o.helper.replaceRecursiveRegExp(W[1],k,E,T,"im");if(B===W[1])break;M=W[0].concat(B)}return M=M.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,o.subParser("hashElement")(M,y,_)),M=o.helper.replaceRecursiveRegExp(M,function(N){return` - -¨K`+(_.gHtmlBlocks.push(N)-1)+`K - -`},"^ {0,3}","gm"),M=M.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,o.subParser("hashElement")(M,y,_)),M=_.converter._dispatch("hashHTMLBlocks.after",M,y,_),M}),o.subParser("hashHTMLSpans",function(M,y,_){M=_.converter._dispatch("hashHTMLSpans.before",M,y,_);function w(k){return"¨C"+(_.gHtmlSpans.push(k)-1)+"C"}return M=M.replace(/<[^>]+?\/>/gi,function(k){return w(k)}),M=M.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(k){return w(k)}),M=M.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(k){return w(k)}),M=M.replace(/<[^>]+?>/gi,function(k){return w(k)}),M=_.converter._dispatch("hashHTMLSpans.after",M,y,_),M}),o.subParser("unhashHTMLSpans",function(M,y,_){M=_.converter._dispatch("unhashHTMLSpans.before",M,y,_);for(var w=0;w<_.gHtmlSpans.length;++w){for(var k=_.gHtmlSpans[w],S=0;/¨C(\d+)C/.test(k);){var C=RegExp.$1;if(k=k.replace("¨C"+C+"C",_.gHtmlSpans[C]),S===10){console.error("maximum nesting of 10 spans reached!!!");break}++S}M=M.replace("¨C"+w+"C",k)}return M=_.converter._dispatch("unhashHTMLSpans.after",M,y,_),M}),o.subParser("hashPreCodeTags",function(M,y,_){M=_.converter._dispatch("hashPreCodeTags.before",M,y,_);var w=function(k,S,C,q){var E=C+o.subParser("encodeCode")(S,y,_)+q;return` - -¨G`+(_.ghCodeBlocks.push({text:k,codeblock:E})-1)+`G - -`};return M=o.helper.replaceRecursiveRegExp(M,w,"^ {0,3}]*>\\s*]*>","^ {0,3}\\s*
","gim"),M=_.converter._dispatch("hashPreCodeTags.after",M,y,_),M}),o.subParser("headers",function(M,y,_){M=_.converter._dispatch("headers.before",M,y,_);var w=isNaN(parseInt(y.headerLevelStart))?1:parseInt(y.headerLevelStart),k=y.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,S=y.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;M=M.replace(k,function(E,T){var W=o.subParser("spanGamut")(T,y,_),B=y.noHeaderId?"":' id="'+q(T)+'"',N=w,j=""+W+"";return o.subParser("hashBlock")(j,y,_)}),M=M.replace(S,function(E,T){var W=o.subParser("spanGamut")(T,y,_),B=y.noHeaderId?"":' id="'+q(T)+'"',N=w+1,j=""+W+"";return o.subParser("hashBlock")(j,y,_)});var C=y.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;M=M.replace(C,function(E,T,W){var B=W;y.customizedHeaderId&&(B=W.replace(/\s?\{([^{]+?)}\s*$/,""));var N=o.subParser("spanGamut")(B,y,_),j=y.noHeaderId?"":' id="'+q(W)+'"',P=w-1+T.length,D=""+N+"";return o.subParser("hashBlock")(D,y,_)});function q(E){var T,W;if(y.customizedHeaderId){var B=E.match(/\{([^{]+?)}\s*$/);B&&B[1]&&(E=B[1])}return T=E,o.helper.isString(y.prefixHeaderId)?W=y.prefixHeaderId:y.prefixHeaderId===!0?W="section-":W="",y.rawPrefixHeaderId||(T=W+T),y.ghCompatibleHeaderId?T=T.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():y.rawHeaderId?T=T.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():T=T.replace(/[^\w]/g,"").toLowerCase(),y.rawPrefixHeaderId&&(T=W+T),_.hashLinkCounts[T]?T=T+"-"+_.hashLinkCounts[T]++:_.hashLinkCounts[T]=1,T}return M=_.converter._dispatch("headers.after",M,y,_),M}),o.subParser("horizontalRule",function(M,y,_){M=_.converter._dispatch("horizontalRule.before",M,y,_);var w=o.subParser("hashBlock")("
",y,_);return M=M.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,w),M=M.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,w),M=M.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,w),M=_.converter._dispatch("horizontalRule.after",M,y,_),M}),o.subParser("images",function(M,y,_){M=_.converter._dispatch("images.before",M,y,_);var w=/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,k=/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,S=/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,C=/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,q=/!\[([^\[\]]+)]()()()()()/g;function E(W,B,N,j,P,D,H,G){return j=j.replace(/\s/g,""),T(W,B,N,j,P,D,H,G)}function T(W,B,N,j,P,D,H,G){var K=_.gUrls,J=_.gTitles,oe=_.gDimensions;if(N=N.toLowerCase(),G||(G=""),W.search(/\(? ?(['"].*['"])?\)$/m)>-1)j="";else if(j===""||j===null)if((N===""||N===null)&&(N=B.toLowerCase().replace(/ ?\n/g," ")),j="#"+N,!o.helper.isUndefined(K[N]))j=K[N],o.helper.isUndefined(J[N])||(G=J[N]),o.helper.isUndefined(oe[N])||(P=oe[N].width,D=oe[N].height);else return W;B=B.replace(/"/g,""").replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback),j=j.replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback);var ae=''+B+'","
")}),M=M.replace(/\b__(\S[\s\S]*?)__\b/g,function(k,S){return w(S,"","")}),M=M.replace(/\b_(\S[\s\S]*?)_\b/g,function(k,S){return w(S,"","")})):(M=M.replace(/___(\S[\s\S]*?)___/g,function(k,S){return/\S$/.test(S)?w(S,"",""):k}),M=M.replace(/__(\S[\s\S]*?)__/g,function(k,S){return/\S$/.test(S)?w(S,"",""):k}),M=M.replace(/_([^\s_][\s\S]*?)_/g,function(k,S){return/\S$/.test(S)?w(S,"",""):k})),y.literalMidWordAsterisks?(M=M.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(k,S,C){return w(C,S+"","")}),M=M.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(k,S,C){return w(C,S+"","")}),M=M.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(k,S,C){return w(C,S+"","")})):(M=M.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(k,S){return/\S$/.test(S)?w(S,"",""):k}),M=M.replace(/\*\*(\S[\s\S]*?)\*\*/g,function(k,S){return/\S$/.test(S)?w(S,"",""):k}),M=M.replace(/\*([^\s*][\s\S]*?)\*/g,function(k,S){return/\S$/.test(S)?w(S,"",""):k})),M=_.converter._dispatch("italicsAndBold.after",M,y,_),M}),o.subParser("lists",function(M,y,_){function w(C,q){_.gListLevel++,C=C.replace(/\n{2,}$/,` -`),C+="¨0";var E=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,T=/\n[ \t]*\n(?!¨0)/.test(C);return y.disableForced4SpacesIndentedSublists&&(E=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),C=C.replace(E,function(W,B,N,j,P,D,H){H=H&&H.trim()!=="";var G=o.subParser("outdent")(P,y,_),K="";return D&&y.tasklists&&(K=' class="task-list-item" style="list-style-type: none;"',G=G.replace(/^[ \t]*\[(x|X| )?]/m,function(){var J='-1?(G=o.subParser("githubCodeBlocks")(G,y,_),G=o.subParser("blockGamut")(G,y,_)):(G=o.subParser("lists")(G,y,_),G=G.replace(/\n$/,""),G=o.subParser("hashHTMLBlocks")(G,y,_),G=G.replace(/\n\n+/g,` - -`),T?G=o.subParser("paragraphs")(G,y,_):G=o.subParser("spanGamut")(G,y,_)),G=G.replace("¨A",""),G=""+G+` -`,G}),C=C.replace(/¨0/g,""),_.gListLevel--,q&&(C=C.replace(/\s+$/,"")),C}function k(C,q){if(q==="ol"){var E=C.match(/^ *(\d+)\./);if(E&&E[1]!=="1")return' start="'+E[1]+'"'}return""}function S(C,q,E){var T=y.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,W=y.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,B=q==="ul"?T:W,N="";if(C.search(B)!==-1)(function P(D){var H=D.search(B),G=k(C,q);H!==-1?(N+=` - -<`+q+G+`> -`+w(D.slice(0,H),!!E)+" -`,q=q==="ul"?"ol":"ul",B=q==="ul"?T:W,P(D.slice(H))):N+=` - -<`+q+G+`> -`+w(D,!!E)+" -`})(C);else{var j=k(C,q);N=` - -<`+q+j+`> -`+w(C,!!E)+" -`}return N}return M=_.converter._dispatch("lists.before",M,y,_),M+="¨0",_.gListLevel?M=M.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(C,q,E){var T=E.search(/[*+-]/g)>-1?"ul":"ol";return S(q,T,!0)}):M=M.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(C,q,E,T){var W=T.search(/[*+-]/g)>-1?"ul":"ol";return S(E,W,!1)}),M=M.replace(/¨0/,""),M=_.converter._dispatch("lists.after",M,y,_),M}),o.subParser("metadata",function(M,y,_){if(!y.metadata)return M;M=_.converter._dispatch("metadata.before",M,y,_);function w(k){_.metadata.raw=k,k=k.replace(/&/g,"&").replace(/"/g,"""),k=k.replace(/\n {4}/g," "),k.replace(/^([\S ]+): +([\s\S]+?)$/gm,function(S,C,q){return _.metadata.parsed[C]=q,""})}return M=M.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(k,S,C){return w(C),"¨M"}),M=M.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(k,S,C){return S&&(_.metadata.format=S),w(C),"¨M"}),M=M.replace(/¨M/g,""),M=_.converter._dispatch("metadata.after",M,y,_),M}),o.subParser("outdent",function(M,y,_){return M=_.converter._dispatch("outdent.before",M,y,_),M=M.replace(/^(\t|[ ]{1,4})/gm,"¨0"),M=M.replace(/¨0/g,""),M=_.converter._dispatch("outdent.after",M,y,_),M}),o.subParser("paragraphs",function(M,y,_){M=_.converter._dispatch("paragraphs.before",M,y,_),M=M.replace(/^\n+/g,""),M=M.replace(/\n+$/g,"");for(var w=M.split(/\n{2,}/g),k=[],S=w.length,C=0;C=0?k.push(q):q.search(/\S/)>=0&&(q=o.subParser("spanGamut")(q,y,_),q=q.replace(/^([ \t]*)/g,"

"),q+="

",k.push(q))}for(S=k.length,C=0;C]*>\s*]*>/.test(T)&&(W=!0)}k[C]=T}return M=k.join(` -`),M=M.replace(/^\n+/g,""),M=M.replace(/\n+$/g,""),_.converter._dispatch("paragraphs.after",M,y,_)}),o.subParser("runExtension",function(M,y,_,w){if(M.filter)y=M.filter(y,w.converter,_);else if(M.regex){var k=M.regex;k instanceof RegExp||(k=new RegExp(k,"g")),y=y.replace(k,M.replace)}return y}),o.subParser("spanGamut",function(M,y,_){return M=_.converter._dispatch("spanGamut.before",M,y,_),M=o.subParser("codeSpans")(M,y,_),M=o.subParser("escapeSpecialCharsWithinTagAttributes")(M,y,_),M=o.subParser("encodeBackslashEscapes")(M,y,_),M=o.subParser("images")(M,y,_),M=o.subParser("anchors")(M,y,_),M=o.subParser("autoLinks")(M,y,_),M=o.subParser("simplifiedAutoLinks")(M,y,_),M=o.subParser("emoji")(M,y,_),M=o.subParser("underline")(M,y,_),M=o.subParser("italicsAndBold")(M,y,_),M=o.subParser("strikethrough")(M,y,_),M=o.subParser("ellipsis")(M,y,_),M=o.subParser("hashHTMLSpans")(M,y,_),M=o.subParser("encodeAmpsAndAngles")(M,y,_),y.simpleLineBreaks?/\n\n¨K/.test(M)||(M=M.replace(/\n+/g,`
-`)):M=M.replace(/ +\n/g,`
-`),M=_.converter._dispatch("spanGamut.after",M,y,_),M}),o.subParser("strikethrough",function(M,y,_){function w(k){return y.simplifiedAutoLink&&(k=o.subParser("simplifiedAutoLinks")(k,y,_)),""+k+""}return y.strikethrough&&(M=_.converter._dispatch("strikethrough.before",M,y,_),M=M.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(k,S){return w(S)}),M=_.converter._dispatch("strikethrough.after",M,y,_)),M}),o.subParser("stripLinkDefinitions",function(M,y,_){var w=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,k=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;M+="¨0";var S=function(C,q,E,T,W,B,N){return q=q.toLowerCase(),E.match(/^data:.+?\/.+?;base64,/)?_.gUrls[q]=E.replace(/\s/g,""):_.gUrls[q]=o.subParser("encodeAmpsAndAngles")(E,y,_),B?B+N:(N&&(_.gTitles[q]=N.replace(/"|'/g,""")),y.parseImgDimensions&&T&&W&&(_.gDimensions[q]={width:T,height:W}),"")};return M=M.replace(k,S),M=M.replace(w,S),M=M.replace(/¨0/,""),M}),o.subParser("tables",function(M,y,_){if(!y.tables)return M;var w=/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,k=/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;function S(W){return/^:[ \t]*--*$/.test(W)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(W)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(W)?' style="text-align:center;"':""}function C(W,B){var N="";return W=W.trim(),(y.tablesHeaderId||y.tableHeaderId)&&(N=' id="'+W.replace(/ /g,"_").toLowerCase()+'"'),W=o.subParser("spanGamut")(W,y,_),""+W+` -`}function q(W,B){var N=o.subParser("spanGamut")(W,y,_);return""+N+` -`}function E(W,B){for(var N=` - - -`,j=W.length,P=0;P - - -`,P=0;P -`;for(var D=0;D -`}return N+=` -
-`,N}function T(W){var B,N=W.split(` -`);for(B=0;B"+k+""}),M=M.replace(/\b__(\S[\s\S]*?)__\b/g,function(w,k){return""+k+""})):(M=M.replace(/___(\S[\s\S]*?)___/g,function(w,k){return/\S$/.test(k)?""+k+"":w}),M=M.replace(/__(\S[\s\S]*?)__/g,function(w,k){return/\S$/.test(k)?""+k+"":w})),M=M.replace(/(_)/g,o.helper.escapeCharactersCallback),M=_.converter._dispatch("underline.after",M,y,_)),M}),o.subParser("unescapeSpecialChars",function(M,y,_){return M=_.converter._dispatch("unescapeSpecialChars.before",M,y,_),M=M.replace(/¨E(\d+)E/g,function(w,k){var S=parseInt(k);return String.fromCharCode(S)}),M=_.converter._dispatch("unescapeSpecialChars.after",M,y,_),M}),o.subParser("makeMarkdown.blockquote",function(M,y){var _="";if(M.hasChildNodes())for(var w=M.childNodes,k=w.length,S=0;S "+_.split(` -`).join(` -> `),_}),o.subParser("makeMarkdown.codeBlock",function(M,y){var _=M.getAttribute("language"),w=M.getAttribute("precodenum");return"```"+_+` -`+y.preList[w]+"\n```"}),o.subParser("makeMarkdown.codeSpan",function(M){return"`"+M.innerHTML+"`"}),o.subParser("makeMarkdown.emphasis",function(M,y){var _="";if(M.hasChildNodes()){_+="*";for(var w=M.childNodes,k=w.length,S=0;S",M.hasAttribute("width")&&M.hasAttribute("height")&&(y+=" ="+M.getAttribute("width")+"x"+M.getAttribute("height")),M.hasAttribute("title")&&(y+=' "'+M.getAttribute("title")+'"'),y+=")"),y}),o.subParser("makeMarkdown.links",function(M,y){var _="";if(M.hasChildNodes()&&M.hasAttribute("href")){var w=M.childNodes,k=w.length;_="[";for(var S=0;S",M.hasAttribute("title")&&(_+=' "'+M.getAttribute("title")+'"'),_+=")"}return _}),o.subParser("makeMarkdown.list",function(M,y,_){var w="";if(!M.hasChildNodes())return"";for(var k=M.childNodes,S=k.length,C=M.getAttribute("start")||1,q=0;q"u"||k[q].tagName.toLowerCase()!=="li")){var E="";_==="ol"?E=C.toString()+". ":E="- ",w+=E+o.subParser("makeMarkdown.listItem")(k[q],y),++C}return w+=` - -`,w.trim()}),o.subParser("makeMarkdown.listItem",function(M,y){for(var _="",w=M.childNodes,k=w.length,S=0;S - -`;if(M.nodeType!==1)return"";var k=M.tagName.toLowerCase();switch(k){case"h1":_||(w=o.subParser("makeMarkdown.header")(M,y,1)+` - -`);break;case"h2":_||(w=o.subParser("makeMarkdown.header")(M,y,2)+` - -`);break;case"h3":_||(w=o.subParser("makeMarkdown.header")(M,y,3)+` - -`);break;case"h4":_||(w=o.subParser("makeMarkdown.header")(M,y,4)+` - -`);break;case"h5":_||(w=o.subParser("makeMarkdown.header")(M,y,5)+` - -`);break;case"h6":_||(w=o.subParser("makeMarkdown.header")(M,y,6)+` - -`);break;case"p":_||(w=o.subParser("makeMarkdown.paragraph")(M,y)+` - -`);break;case"blockquote":_||(w=o.subParser("makeMarkdown.blockquote")(M,y)+` - -`);break;case"hr":_||(w=o.subParser("makeMarkdown.hr")(M,y)+` - -`);break;case"ol":_||(w=o.subParser("makeMarkdown.list")(M,y,"ol")+` - -`);break;case"ul":_||(w=o.subParser("makeMarkdown.list")(M,y,"ul")+` - -`);break;case"precode":_||(w=o.subParser("makeMarkdown.codeBlock")(M,y)+` - -`);break;case"pre":_||(w=o.subParser("makeMarkdown.pre")(M,y)+` - -`);break;case"table":_||(w=o.subParser("makeMarkdown.table")(M,y)+` - -`);break;case"code":w=o.subParser("makeMarkdown.codeSpan")(M,y);break;case"em":case"i":w=o.subParser("makeMarkdown.emphasis")(M,y);break;case"strong":case"b":w=o.subParser("makeMarkdown.strong")(M,y);break;case"del":w=o.subParser("makeMarkdown.strikethrough")(M,y);break;case"a":w=o.subParser("makeMarkdown.links")(M,y);break;case"img":w=o.subParser("makeMarkdown.image")(M,y);break;default:w=M.outerHTML+` - -`}return w}),o.subParser("makeMarkdown.paragraph",function(M,y){var _="";if(M.hasChildNodes())for(var w=M.childNodes,k=w.length,S=0;S"+y.preList[_]+""}),o.subParser("makeMarkdown.strikethrough",function(M,y){var _="";if(M.hasChildNodes()){_+="~~";for(var w=M.childNodes,k=w.length,S=0;Str>th"),S=M.querySelectorAll("tbody>tr"),C,q;for(C=0;CP&&(P=D)}for(C=0;C/g,"\\$1>"),y=y.replace(/^#/gm,"\\#"),y=y.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),y=y.replace(/^( {0,3}\d+)\./gm,"$1\\."),y=y.replace(/^( {0,3})([+-])/gm,"$1\\$2"),y=y.replace(/]([\s]*)\(/g,"\\]$1\\("),y=y.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),y});var v=this;e.exports?e.exports=o:v.showdown=o}).call(I0)})(fse);var Nje=fse.exports;const Bje=Or(Nje),Lje=new Bje.Converter({noHeaderId:!0,tables:!0,literalMidWordUnderscores:!0,omitExtraWLInCodeBlocks:!0,simpleLineBreaks:!0,strikethrough:!0});function jje(e){return e.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,(t,n,o,r)=>`${n} -${o} -${r}`)}function Pje(e){return e.replace(/(^|\n)•( +)/g,"$1*$2")}function Ije(e){return Lje.makeHtml(jje(Pje(e)))}function Dje(e){if(e.nodeName==="IFRAME"){const t=e.ownerDocument.createTextNode(e.src);e.parentNode.replaceChild(t,e)}}function bse(e){!e.id||e.id.indexOf("docs-internal-guid-")!==0||(e.tagName==="B"?jg(e):e.removeAttribute("id"))}function Fje(e){return e===" "||e==="\r"||e===` -`||e===" "}function hse(e){if(e.nodeType!==e.TEXT_NODE)return;let t=e;for(;t=t.parentNode;)if(t.nodeType===t.ELEMENT_NODE&&t.nodeName==="PRE")return;let n=e.data.replace(/[ \r\n\t]+/g," ");if(n[0]===" "){const o=jv(e,"previous");(!o||o.nodeName==="BR"||o.textContent.slice(-1)===" ")&&(n=n.slice(1))}if(n[n.length-1]===" "){const o=jv(e,"next");(!o||o.nodeName==="BR"||o.nodeType===o.TEXT_NODE&&Fje(o.textContent[0]))&&(n=n.slice(0,-1))}n?e.data=n:e.parentNode.removeChild(e)}function mse(e){e.nodeName==="BR"&&(jv(e,"next")||e.parentNode.removeChild(e))}function $je(e){e.nodeName==="P"&&(e.hasChildNodes()||e.parentNode.removeChild(e))}function Vje(e){if(e.nodeName!=="SPAN"||e.getAttribute("data-stringify-type")!=="paragraph-break")return;const{parentNode:t}=e;t.insertBefore(e.ownerDocument.createElement("br"),e),t.insertBefore(e.ownerDocument.createElement("br"),e),t.removeChild(e)}const gse=(...e)=>window?.console?.log?.(...e);function bH(e){return e=zp(e,[lse,bse,use,cse,ise]),e=e8(e,Ex("paste"),{inline:!0}),e=zp(e,[hse,mse]),gse(`Processed inline HTML: - -`,e),e}function yf({HTML:e="",plainText:t="",mode:n="AUTO",tagName:o}){if(e=e.replace(/]+>/g,""),e=e.replace(/^\s*]*>\s*]*>(?:\s*)?/i,""),e=e.replace(/(?:\s*)?<\/body>\s*<\/html>\s*$/i,""),n!=="INLINE"){const d=e||t;if(d.indexOf("",n=e.indexOf(t);if(n>-1)e=e.substring(n+t.length);else return e;const r=e.indexOf("");return r>-1&&(e=e.substring(0,r)),e}function ext(e){const t="";return e.startsWith(t)?e.slice(t.length):e}function MP({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch{return}n=J5t(n),n=ext(n);const o=Mv(e);return o.length&&!txt(o,n)?{files:o}:{html:n,plainText:t,files:[]}}function txt(e,t){if(t&&e?.length===1&&e[0].type.indexOf("image/")===0){const n=/<\s*img\b/gi;if(t.match(n)?.length!==1)return!0;const o=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(o))return!0}return!1}const Zbe=Symbol("requiresWrapperOnCopy");function Qbe(e,t,n){let o=t;const[r]=t;if(r&&n.select(Xe).getBlockType(r.name)[Zbe]){const{getBlockRootClientId:c,getBlockName:l,getBlockAttributes:u}=n.select(F),d=c(r.clientId),p=l(d);p&&(o=ge(p,u(d),o))}const s=V1(o);e.clipboardData.setData("text/plain",oxt(s)),e.clipboardData.setData("text/html",s)}function nxt(e,t){const{plainText:n,html:o,files:r}=MP(e);let s=[];if(r.length){const i=Qs("from");s=r.reduce((c,l)=>{const u=Da(i,d=>d.type==="files"&&d.isMatch([l]));return u&&c.push(u.transform([l])),c},[]).flat()}else s=yf({HTML:o,plainText:n,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return s}function oxt(e){return e=e.replace(/
/g,` -`),L1(e).trim().replace(/\n\n+/g,` - -`)}function rxt(){const e=zn(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,getBlockName:s,__unstableIsFullySelected:i,__unstableIsSelectionCollapsed:c,__unstableIsSelectionMergeable:l,__unstableGetSelectedBlocksWithPartialSelection:u,canInsertBlockType:d,getBlockRootClientId:p}=I(F),{flashBlock:f,removeBlocks:b,replaceBlocks:h,__unstableDeleteSelection:g,__unstableExpandSelection:z,__unstableSplitSelection:A}=se(F),x=gP();return Ft(v=>{function M(y){if(y.defaultPrevented)return;const _=n();if(_.length===0)return;if(!o()){const{target:q}=y,{ownerDocument:E}=q;if(y.type==="copy"||y.type==="cut"?uSe(E):dSe(E)&&!E.activeElement.isContentEditable)return}const{activeElement:w}=y.target.ownerDocument;if(!v.contains(w))return;const k=l(),S=c()||i(),C=!S&&!k;if(y.type==="copy"||y.type==="cut")if(y.preventDefault(),_.length===1&&f(_[0]),C)z();else{x(y.type,_);let q;if(S)q=t(_);else{const[E,T]=u(),W=t(_.slice(1,_.length-1));q=[E,...W,T]}Qbe(y,q,e)}if(y.type==="cut")S&&!C?b(_):(y.target.ownerDocument.activeElement.contentEditable=!1,g());else if(y.type==="paste"){const{__experimentalCanUserUseUnfilteredHTML:q}=r();if(y.clipboardData.getData("rich-text")==="true")return;const{plainText:T,html:W,files:B}=MP(y),N=i();let j=[];if(B.length){const G=Qs("from");j=B.reduce((K,J)=>{const oe=Da(G,ae=>ae.type==="files"&&ae.isMatch([J]));return oe&&K.push(oe.transform([J])),K},[]).flat()}else j=yf({HTML:W,plainText:T,mode:N?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:q});if(typeof j=="string")return;if(N){h(_,j,j.length-1,-1),y.preventDefault();return}if(!o()&&!nt(s(_[0]),"splitting",!1)&&!y.__deprecatedOnSplit)return;const[P]=_,D=p(P),H=[];for(const G of j)if(d(G.name,D))H.push(G);else{const K=s(D),J=G.name!==K?lo(G,K):[G];if(!J)return;for(const oe of J)for(const ae of oe.innerBlocks)H.push(ae)}A(H),y.preventDefault()}}return v.ownerDocument.addEventListener("copy",M),v.ownerDocument.addEventListener("cut",M),v.ownerDocument.addEventListener("paste",M),()=>{v.ownerDocument.removeEventListener("copy",M),v.ownerDocument.removeEventListener("cut",M),v.ownerDocument.removeEventListener("paste",M)}},[])}function Jbe(){const[e,t,n]=F5t(),o=I(r=>r(F).hasMultiSelection(),[]);return[e,Xt([t,rxt(),Q5t(),U5t(),Y5t(),Z5t(),D5t(),H5t(),V5t(),Ft(r=>{if(r.tabIndex=0,!!o)return r.classList.add("has-multi-selection"),r.setAttribute("aria-label",m("Multiple selected blocks")),()=>{r.classList.remove("has-multi-selection"),r.removeAttribute("aria-label")}},[o])]),n]}function sxt({children:e,...t},n){const[o,r,s]=Jbe();return a.jsxs(a.Fragment,{children:[o,a.jsx("div",{...t,ref:Xt([r,n]),className:V(t.className,"block-editor-writing-flow"),children:e}),s]})}const ixt=O.forwardRef(sxt);let eA=null;function axt(){return eA||(eA=Array.from(document.styleSheets).reduce((e,t)=>{try{t.cssRules}catch{return e}const{ownerNode:n,cssRules:o}=t;if(n===null||!o||["wp-reset-editor-styles-css","wp-reset-editor-styles-rtl-css"].includes(n.id)||!n.id)return e;function r(s){return Array.from(s).find(({selectorText:i,conditionText:c,cssRules:l})=>c?r(l):i&&(i.includes(".editor-styles-wrapper")||i.includes(".wp-block")))}if(r(o)){const s=n.tagName==="STYLE";if(s){const i=n.id.replace("-inline-css","-css"),c=document.getElementById(i);c&&e.push(c.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!s){const i=n.id.replace("-css","-inline-css"),c=document.getElementById(i);c&&e.push(c.cloneNode(!0))}}return e},[]),eA)}function ehe(e,t,n){const o={};for(const i in e)o[i]=e[i];if(e instanceof n.contentDocument.defaultView.MouseEvent){const i=n.getBoundingClientRect();o.clientX+=i.left,o.clientY+=i.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault(),!n.dispatchEvent(r)&&e.preventDefault()}function cxt(e){return Ft(()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],s={};for(const i of r)s[i]=c=>{const u=Object.getPrototypeOf(c).constructor.name,d=window[u];ehe(c,d,n)},o.addEventListener(i,s[i]);return()=>{for(const i of r)o.removeEventListener(i,s[i])}})}function lxt({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,readonly:s,forwardedRef:i,title:c=m("Editor canvas"),...l}){const{resolvedAssets:u,isPreviewMode:d}=I(ne=>{const{getSettings:te}=ne(F),pe=te();return{resolvedAssets:pe.__unstableResolvedAssets,isPreviewMode:pe.__unstableIsPreviewMode}},[]),{styles:p="",scripts:f=""}=u,[b,h]=O.useState(),g=O.useRef(),[z,A]=O.useState([]),x=mP(),[v,M,y]=Jbe(),[_,{height:w}]=ps(),[k,{width:S}]=ps(),C=Ft(ne=>{ne._load=()=>{h(ne.contentDocument)};let te;function pe(ve){ve.preventDefault()}function fe(){const{contentDocument:ve,ownerDocument:ke}=ne,{documentElement:U}=ve;te=ve,U.classList.add("block-editor-iframe__html"),x(U),A(Array.from(ke.body.classList).filter(ce=>ce.startsWith("admin-color-")||ce.startsWith("post-type-")||ce==="wp-embed-responsive")),ve.dir=ke.dir;for(const ce of axt())ve.getElementById(ce.id)||(ve.head.appendChild(ce.cloneNode(!0)),d||console.warn(`${ce.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,ce));te.addEventListener("dragover",pe,!1),te.addEventListener("drop",pe,!1)}return ne.addEventListener("load",fe),()=>{delete ne._load,ne.removeEventListener("load",fe),te?.removeEventListener("dragover",pe),te?.removeEventListener("drop",pe)}},[]),[q,E]=O.useState(),T=Ft(ne=>{const te=ne.ownerDocument.defaultView;E(te.innerHeight);const pe=()=>{E(te.innerHeight)};return te.addEventListener("resize",pe),()=>{te.removeEventListener("resize",pe)}},[]),[W,B]=O.useState(),N=Ft(ne=>{const te=ne.ownerDocument.defaultView;B(te.innerWidth);const pe=()=>{B(te.innerWidth)};return te.addEventListener("resize",pe),()=>{te.removeEventListener("resize",pe)}},[]),j=o!==1;O.useEffect(()=>{j||(g.current=S)},[S,j]);const P=RN({isDisabled:!s}),D=Xt([cxt(b),e,x,M,P,j?T:null]),H=` - - - - - - - -
- - diff --git a/ios/Sources/GutenbergKit/Gutenberg/remote.html b/ios/Sources/GutenbergKit/Gutenberg/remote.html deleted file mode 100644 index fd498ffe..00000000 --- a/ios/Sources/GutenbergKit/Gutenberg/remote.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - Gutenberg - - - - -
- - From b442b78d6d19abe168a786d2d07b7e4f4c168ea0 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Tue, 26 Nov 2024 20:44:49 -0500 Subject: [PATCH 02/14] build: Set project Ruby version --- .ruby-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .ruby-version diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..be94e6f5 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.2.2 From ba66c9d1623fa52d0dea24b0d894d3daa2dc562a Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Tue, 26 Nov 2024 20:45:08 -0500 Subject: [PATCH 03/14] build: Add Bundler dependencies --- .gitignore | 1 + ios/Gemfile | 8 ++ ios/Gemfile.lock | 290 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 299 insertions(+) create mode 100644 ios/Gemfile create mode 100644 ios/Gemfile.lock diff --git a/.gitignore b/.gitignore index 7d1872da..b6394de4 100644 --- a/.gitignore +++ b/.gitignore @@ -81,6 +81,7 @@ bower_components # Dependency directories node_modules/ jspm_packages/ +vendor/ # Snowpack dependency directory (https://snowpack.dev/) web_modules/ diff --git a/ios/Gemfile b/ios/Gemfile new file mode 100644 index 00000000..f870da47 --- /dev/null +++ b/ios/Gemfile @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +# Let the release-toolkit drive which Fastlane version to use. +# See also https://github.com/wordpress-mobile/release-toolkit/issues/482 +gem 'fastlane' +gem 'fastlane-plugin-wpmreleasetoolkit', '~> 9.1.0' diff --git a/ios/Gemfile.lock b/ios/Gemfile.lock new file mode 100644 index 00000000..550fd9c7 --- /dev/null +++ b/ios/Gemfile.lock @@ -0,0 +1,290 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.7) + base64 + nkf + rexml + activesupport (8.0.0) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + artifactory (3.0.17) + atomos (0.1.3) + aws-eventstream (1.3.0) + aws-partitions (1.1013.0) + aws-sdk-core (3.214.0) + aws-eventstream (~> 1, >= 1.3.0) + aws-partitions (~> 1, >= 1.992.0) + aws-sigv4 (~> 1.9) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.96.0) + aws-sdk-core (~> 3, >= 3.210.0) + aws-sigv4 (~> 1.5) + aws-sdk-s3 (1.174.0) + aws-sdk-core (~> 3, >= 3.210.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.5) + aws-sigv4 (1.10.1) + aws-eventstream (~> 1, >= 1.0.2) + babosa (1.0.4) + base64 (0.2.0) + benchmark (0.4.0) + bigdecimal (3.1.8) + buildkit (1.6.1) + sawyer (>= 0.6) + chroma (0.2.0) + claide (1.1.0) + colored (1.2) + colored2 (3.1.2) + commander (4.6.0) + highline (~> 2.0.0) + concurrent-ruby (1.3.4) + connection_pool (2.4.1) + declarative (0.0.20) + diffy (3.4.3) + digest-crc (0.6.5) + rake (>= 12.0.0, < 14.0.0) + domain_name (0.6.20240107) + dotenv (2.8.1) + drb (2.2.1) + emoji_regex (3.2.3) + excon (0.112.0) + faraday (1.10.4) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-cookie_jar (0.0.7) + faraday (>= 0.8.0) + http-cookie (~> 1.0.0) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.4) + multipart-post (~> 2) + faraday-net_http (1.0.2) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + faraday_middleware (1.2.1) + faraday (~> 1.0) + fastimage (2.3.1) + fastlane (2.225.0) + CFPropertyList (>= 2.3, < 4.0.0) + addressable (>= 2.8, < 3.0.0) + artifactory (~> 3.0) + aws-sdk-s3 (~> 1.0) + babosa (>= 1.0.3, < 2.0.0) + bundler (>= 1.12.0, < 3.0.0) + colored (~> 1.2) + commander (~> 4.6) + dotenv (>= 2.1.1, < 3.0.0) + emoji_regex (>= 0.1, < 4.0) + excon (>= 0.71.0, < 1.0.0) + faraday (~> 1.0) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 1.0) + fastimage (>= 2.1.0, < 3.0.0) + fastlane-sirp (>= 1.0.0) + gh_inspector (>= 1.1.2, < 2.0.0) + google-apis-androidpublisher_v3 (~> 0.3) + google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-env (>= 1.6.0, < 2.0.0) + google-cloud-storage (~> 1.31) + highline (~> 2.0) + http-cookie (~> 1.0.5) + json (< 3.0.0) + jwt (>= 2.1.0, < 3) + mini_magick (>= 4.9.4, < 5.0.0) + multipart-post (>= 2.0.0, < 3.0.0) + naturally (~> 2.2) + optparse (>= 0.1.1, < 1.0.0) + plist (>= 3.1.0, < 4.0.0) + rubyzip (>= 2.0.0, < 3.0.0) + security (= 0.1.5) + simctl (~> 1.6.3) + terminal-notifier (>= 2.0.0, < 3.0.0) + terminal-table (~> 3) + tty-screen (>= 0.6.3, < 1.0.0) + tty-spinner (>= 0.8.0, < 1.0.0) + word_wrap (~> 1.0.0) + xcodeproj (>= 1.13.0, < 2.0.0) + xcpretty (~> 0.3.0) + xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) + fastlane-plugin-wpmreleasetoolkit (9.1.0) + activesupport (>= 6.1.7.1) + buildkit (~> 1.5) + chroma (= 0.2.0) + diffy (~> 3.3) + fastlane (~> 2.213) + git (~> 1.3) + google-cloud-storage (~> 1.31) + java-properties (~> 0.3.0) + nokogiri (~> 1.11) + octokit (~> 6.1) + parallel (~> 1.14) + plist (~> 3.1) + progress_bar (~> 1.3) + rake (>= 12.3, < 14.0) + rake-compiler (~> 1.0) + xcodeproj (~> 1.22) + fastlane-sirp (1.0.0) + sysrandom (~> 1.0) + gh_inspector (1.1.3) + git (1.19.1) + addressable (~> 2.8) + rchardet (~> 1.8) + google-apis-androidpublisher_v3 (0.54.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-core (0.11.3) + addressable (~> 2.5, >= 2.5.1) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) + mini_mime (~> 1.0) + representable (~> 3.0) + retriable (>= 2.0, < 4.a) + rexml + google-apis-iamcredentials_v1 (0.17.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-playcustomapp_v1 (0.13.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-storage_v1 (0.31.0) + google-apis-core (>= 0.11.0, < 2.a) + google-cloud-core (1.7.1) + google-cloud-env (>= 1.0, < 3.a) + google-cloud-errors (~> 1.0) + google-cloud-env (1.6.0) + faraday (>= 0.17.3, < 3.0) + google-cloud-errors (1.4.0) + google-cloud-storage (1.47.0) + addressable (~> 2.8) + digest-crc (~> 0.4) + google-apis-iamcredentials_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.31.0) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) + mini_mime (~> 1.0) + googleauth (1.8.1) + faraday (>= 0.17.3, < 3.a) + jwt (>= 1.4, < 3.0) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (>= 0.16, < 2.a) + highline (2.0.3) + http-cookie (1.0.7) + domain_name (~> 0.5) + httpclient (2.8.3) + i18n (1.14.6) + concurrent-ruby (~> 1.0) + java-properties (0.3.0) + jmespath (1.6.2) + json (2.8.2) + jwt (2.9.3) + base64 + logger (1.6.1) + mini_magick (4.13.2) + mini_mime (1.1.5) + minitest (5.25.2) + multi_json (1.15.0) + multipart-post (2.4.1) + nanaimo (0.4.0) + naturally (2.2.1) + nkf (0.2.0) + nokogiri (1.16.7-arm64-darwin) + racc (~> 1.4) + octokit (6.1.1) + faraday (>= 1, < 3) + sawyer (~> 0.9) + options (2.3.2) + optparse (0.6.0) + os (1.1.4) + parallel (1.26.3) + plist (3.7.1) + progress_bar (1.3.4) + highline (>= 1.6) + options (~> 2.3.0) + public_suffix (6.0.1) + racc (1.8.1) + rake (13.2.1) + rake-compiler (1.2.8) + rake + rchardet (1.8.0) + representable (3.2.0) + declarative (< 0.1.0) + trailblazer-option (>= 0.1.1, < 0.2.0) + uber (< 0.2.0) + retriable (3.1.2) + rexml (3.3.9) + rouge (2.0.7) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + sawyer (0.9.2) + addressable (>= 2.3.5) + faraday (>= 0.17.3, < 3) + securerandom (0.3.2) + security (0.1.5) + signet (0.19.0) + addressable (~> 2.8) + faraday (>= 0.17.5, < 3.a) + jwt (>= 1.5, < 3.0) + multi_json (~> 1.10) + simctl (1.6.10) + CFPropertyList + naturally + sysrandom (1.0.5) + terminal-notifier (2.0.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + trailblazer-option (0.1.2) + tty-cursor (0.7.1) + tty-screen (0.8.2) + tty-spinner (0.9.3) + tty-cursor (~> 0.7) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uber (0.1.0) + unicode-display_width (2.6.0) + uri (1.0.2) + word_wrap (1.0.0) + xcodeproj (1.27.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.4.0) + rexml (>= 3.3.6, < 4.0) + xcpretty (0.3.0) + rouge (~> 2.0.7) + xcpretty-travis-formatter (1.0.1) + xcpretty (~> 0.2, >= 0.0.7) + +PLATFORMS + arm64-darwin-24 + +DEPENDENCIES + fastlane + fastlane-plugin-wpmreleasetoolkit (~> 9.1.0) + +BUNDLED WITH + 2.4.10 From 6113484a6b03338150217a3cb256030b5e968336 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Tue, 26 Nov 2024 21:42:16 -0500 Subject: [PATCH 04/14] ci: Publish iOS artifacts CI task Untested, unfinished. --- .buildkite/pipeline.yml | 4 ++++ Makefile | 7 ++++++ ios/fastlane/Fastfile | 48 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 ios/fastlane/Fastfile diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 9054ab96..6ac102e8 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -29,3 +29,7 @@ steps: - label: ':swift: Test Swift Package' command: make test-swift-package plugins: *plugins + + - label: ':ios: Publish iOS Artifacts' + command: make publish-ios-artifacts + plugins: *plugins diff --git a/Makefile b/Makefile index ad0362fb..27c77ff1 100644 --- a/Makefile +++ b/Makefile @@ -46,3 +46,10 @@ build-swift-package: build test-swift-package: build $(call XCODEBUILD_CMD, test) + +publish-ios-artifacts: build + echo "--- :rubygems: Installing Ruby Dependencies" + cd ./ios && \ + install_gems && \ + echo "--- :s3: Uploading iOS artifacts to S3" && \ + bundle exec fastlane upload_ios_artifacts_to_s3 diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile new file mode 100644 index 00000000..c01f0a0b --- /dev/null +++ b/ios/fastlane/Fastfile @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +before_all do + # Ensure we use the latest version of the toolkit + check_for_toolkit_updates unless is_ci || ENV['FASTLANE_SKIP_TOOLKIT_UPDATE_CHECK'] +end + +lane :upload_ios_artifacts_to_s3 do + artifacts_path = File.join(Dir.pwd, 'Sources/GutenbergKit/Gutenberg') + + unless File.directory?(artifacts_path) + UI.user_error!("Could not find artifacts to upload at '#{artifacts_path}'.") + end + + upload_artifact_files_to_s3(archive_path: artifacts_path, id: last_git_commit[:commit_hash]) + + next unless is_ci + + tag = ENV.fetch('BUILDKITE_TAG', nil) + + next if tag.nil? || tag.empty? + + # Tradeoff: We are "wasting" space on S3 by uploading the same archive under different name. + # What we get in return is a 1-1 correspondency between archive and podspec, which keeps the setup simpler. + upload_artifact_files_to_s3(archive_path: xcframework_archive_path, id: tag) +end + +def upload_artifact_files_to_s3(archive_path:, id:) + Dir.glob("#{archive_path}/**/*").each do |file_path| + next if File.directory?(file_path) + + relative_path = file_path.sub("#{archive_path}/", '') + upload_to_a8c_s3(file: file_path, name_on_s3: "#{id}/#{relative_path}") + end +end + +# Notice skip_if_exists is true by default. +# CI might run on the same commit twice, once for the commit and once for the tag. +# We don't want to fail on the second run. +def upload_to_a8c_s3(file:, name_on_s3:, prefix: 'gutenberg-kit') + upload_to_s3( + bucket: 'a8c-apps-public-artifacts', + key: "#{prefix}/#{name_on_s3}", + file: file, + auto_prefix: false, + if_exists: :skip, + ) +end From ac7b26a10654fc767ce4b400d7f7cd7a5b53177d Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Wed, 27 Nov 2024 07:54:10 -0500 Subject: [PATCH 05/14] ci: Use script file to simplify current working directory management Various Buildkite commands failed when using Makefile commands as the current working directory is not persisted with each new line. --- .buildkite/pipeline.yml | 4 +++- .buildkite/scripts/publish-ios-artifacts.sh | 11 +++++++++++ Makefile | 7 ------- 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100755 .buildkite/scripts/publish-ios-artifacts.sh diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 6ac102e8..31899eb5 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -31,5 +31,7 @@ steps: plugins: *plugins - label: ':ios: Publish iOS Artifacts' - command: make publish-ios-artifacts + command: | + make build + .buildkite/scripts/publish-ios-artifacts.sh plugins: *plugins diff --git a/.buildkite/scripts/publish-ios-artifacts.sh b/.buildkite/scripts/publish-ios-artifacts.sh new file mode 100755 index 00000000..a6fe62ba --- /dev/null +++ b/.buildkite/scripts/publish-ios-artifacts.sh @@ -0,0 +1,11 @@ +#!/bin/bash -eu + +echo "--- :rubygems: Installing Ruby Dependencies" +pushd ./ios > /dev/null +install_gems + +echo "--- :s3: Uploading iOS artifacts to S3" +bundle exec fastlane upload_ios_artifacts_to_s3 + +# Restore the working directory +popd > /dev/null diff --git a/Makefile b/Makefile index 27c77ff1..ad0362fb 100644 --- a/Makefile +++ b/Makefile @@ -46,10 +46,3 @@ build-swift-package: build test-swift-package: build $(call XCODEBUILD_CMD, test) - -publish-ios-artifacts: build - echo "--- :rubygems: Installing Ruby Dependencies" - cd ./ios && \ - install_gems && \ - echo "--- :s3: Uploading iOS artifacts to S3" && \ - bundle exec fastlane upload_ios_artifacts_to_s3 From fd8b084514f8c972b069e1ae321eb2d3789d771a Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Mon, 2 Dec 2024 15:16:28 -0500 Subject: [PATCH 06/14] ci: Track Bundler configuration Ensure correct gem installation directory. --- ios/.bundle/config | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 ios/.bundle/config diff --git a/ios/.bundle/config b/ios/.bundle/config new file mode 100644 index 00000000..23692288 --- /dev/null +++ b/ios/.bundle/config @@ -0,0 +1,2 @@ +--- +BUNDLE_PATH: "vendor/bundle" From 9c258b00ded5b53c4da06395c22008698911e2b0 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Mon, 2 Dec 2024 15:26:20 -0500 Subject: [PATCH 07/14] ci: Fix relative artifacts path within Fastfile --- ios/fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index c01f0a0b..9928e1e2 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -6,7 +6,7 @@ before_all do end lane :upload_ios_artifacts_to_s3 do - artifacts_path = File.join(Dir.pwd, 'Sources/GutenbergKit/Gutenberg') + artifacts_path = File.join(Dir.pwd, '../Sources/GutenbergKit/Gutenberg') unless File.directory?(artifacts_path) UI.user_error!("Could not find artifacts to upload at '#{artifacts_path}'.") From bdc0ac4a7c5e5c9f7b24139fae9e77ccb9133347 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Mon, 2 Dec 2024 19:59:37 -0500 Subject: [PATCH 08/14] ci: Upload resources ZIP archive file Reduce network bandwidth. --- ios/fastlane/Fastfile | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 9928e1e2..3d6edbc3 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'zip' + before_all do # Ensure we use the latest version of the toolkit check_for_toolkit_updates unless is_ci || ENV['FASTLANE_SKIP_TOOLKIT_UPDATE_CHECK'] @@ -12,7 +14,15 @@ lane :upload_ios_artifacts_to_s3 do UI.user_error!("Could not find artifacts to upload at '#{artifacts_path}'.") end - upload_artifact_files_to_s3(archive_path: artifacts_path, id: last_git_commit[:commit_hash]) + zipfile_name = "#{artifacts_path}.zip" + + Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile| + Dir[File.join(artifacts_path, '**', '**')].each do |file| + zipfile.add(file.sub(artifacts_path + '/', ''), file) + end + end + + upload_artifact_files_to_s3(archive_path: zipfile_name, id: last_git_commit[:commit_hash]) next unless is_ci @@ -22,16 +32,11 @@ lane :upload_ios_artifacts_to_s3 do # Tradeoff: We are "wasting" space on S3 by uploading the same archive under different name. # What we get in return is a 1-1 correspondency between archive and podspec, which keeps the setup simpler. - upload_artifact_files_to_s3(archive_path: xcframework_archive_path, id: tag) + upload_artifact_files_to_s3(archive_path: zipfile_name, id: tag) end def upload_artifact_files_to_s3(archive_path:, id:) - Dir.glob("#{archive_path}/**/*").each do |file_path| - next if File.directory?(file_path) - - relative_path = file_path.sub("#{archive_path}/", '') - upload_to_a8c_s3(file: file_path, name_on_s3: "#{id}/#{relative_path}") - end + upload_to_a8c_s3(file: archive_path, name_on_s3: "gutenberg-kit-resources-#{id}.zip") end # Notice skip_if_exists is true by default. From db9e9ebba2222da90ec51db332d092ca495dd160 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Tue, 3 Dec 2024 13:33:52 -0500 Subject: [PATCH 09/14] task: Add helper script for downloading iOS GutenbergKit resources Swift package manager cannot download the arbitrary binary file during package installation. Instead, we provide a helper script to be run by the consuming developer after installing the GutenbergKit Swift package. --- ios/scripts/gbkit.sh | 60 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100755 ios/scripts/gbkit.sh diff --git a/ios/scripts/gbkit.sh b/ios/scripts/gbkit.sh new file mode 100755 index 00000000..6cbedc7f --- /dev/null +++ b/ios/scripts/gbkit.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +function show_help { + echo "Usage: $0 {download|help} [version]" + echo "Commands:" + echo " download [version] Download editor resources for the specified version, or current version if not specified" + echo " help Show this help message" +} + +function download { + if [ -z "$1" ]; then + # If no version is passed, extract the current version from project's Package.resolved file + VERSION=$(find . -maxdepth 1 -name "*.xcworkspace" -exec grep -A 5 '"identity" : "gutenbergkit"' {}/xcshareddata/swiftpm/Package.resolved \; | grep '"revision"' | head -n 1 | sed -E 's/.*"revision" : "([^"]+)".*/\1/') + + validate_version_string "$VERSION" "❌ Failed to locate a valid version in your project's \".xcworkspace\" directory, please specify a version" + else + VERSION=$1 + validate_version_string "$VERSION" + fi + + echo "📦 Downloading editor resources for $VERSION" + ZIP_FILE="gutenberg-kit-resources.zip" + URL="https://cdn.a8c-ci.services/gutenberg-kit/gutenberg-kit-resources-${VERSION}.zip" + HTTP_STATUS=$(curl -s -L -w "%{http_code}" -o $ZIP_FILE $URL) + if [ "$HTTP_STATUS" -ne 200 ]; then + echo "❌ Failed downloading editor resources (status code: $HTTP_STATUS), check your network connection and the specified version" + rm $ZIP_FILE + exit 1 + fi + + OUTPUT_DIR="GutenbergKit" + mkdir -p $OUTPUT_DIR + unzip -q $ZIP_FILE -d $OUTPUT_DIR + rm $ZIP_FILE + + echo "✅ Editor resources downloaded to: $OUTPUT_DIR" +} + +function validate_version_string { + VERSION=$1 + if [ -z "$2" ]; then + ERROR_MESSAGE="❌ Invalid version: must be valid Git version tag (e.g., v0.0.2) or commit hash, received: $VERSION" + else + ERROR_MESSAGE="$2" + fi + + if [[ ! "$VERSION" =~ ^[0-9a-f]{7,40}$ && ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "$ERROR_MESSAGE" + exit 1 + fi +} + +case "$1" in + download) + download $2 + ;; + help|*) + show_help + ;; +esac From 3c5373483f8cce0807d90c6e8143d61ab6294ea1 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Fri, 6 Dec 2024 09:06:53 -0500 Subject: [PATCH 10/14] ci: Add Swift plugin and executable target for downloading artifacts Currently broken. Enable a Xcode target to execute the script downloading the GutenbergKit artifacts. --- Package.swift | 14 +++++++++++- ios/Plugins/GutenbergKitPlugin/plugin.swift | 20 +++++++++++++++++ ios/{scripts => Plugins}/gbkit.sh | 0 .../GutenbergKitPluginExecutable/main.swift | 22 +++++++++++++++++++ 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 ios/Plugins/GutenbergKitPlugin/plugin.swift rename ios/{scripts => Plugins}/gbkit.sh (100%) create mode 100644 ios/Sources/GutenbergKitPluginExecutable/main.swift diff --git a/Package.swift b/Package.swift index 4a20c5d6..95faaad0 100644 --- a/Package.swift +++ b/Package.swift @@ -7,7 +7,8 @@ let package = Package( name: "GutenbergKit", platforms: [.iOS(.v15), .macOS(.v14)], products: [ - .library(name: "GutenbergKit", targets: ["GutenbergKit"]) + .library(name: "GutenbergKit", targets: ["GutenbergKit"]), + .plugin(name: "GutenbergKitPlugin", targets: ["GutenbergKitPlugin"]) ], targets: [ .target( @@ -22,6 +23,17 @@ let package = Package( dependencies: ["GutenbergKit"], path: "ios/Tests", exclude: [] + ), + .plugin( + name: "GutenbergKitPlugin", + capability: .buildTool(), + dependencies: ["GutenbergKitPluginExecutable"], + path: "ios/Plugins/GutenbergKitPlugin" + ), + .executableTarget( + name: "GutenbergKitPluginExecutable", + dependencies: [], + path: "ios/Sources/GutenbergKitPluginExecutable" ) ] ) diff --git a/ios/Plugins/GutenbergKitPlugin/plugin.swift b/ios/Plugins/GutenbergKitPlugin/plugin.swift new file mode 100644 index 00000000..e5d352a1 --- /dev/null +++ b/ios/Plugins/GutenbergKitPlugin/plugin.swift @@ -0,0 +1,20 @@ +import PackagePlugin +import Foundation + +@main +struct GutebergKitPlugin: BuildToolPlugin { + func createBuildCommands(context: PluginContext, target: Target) throws -> [Command] { + let scriptPath = context.package.directory.appending(subpath: "ios/Plugins/gbkit.sh") + + return [ + .buildCommand( + displayName: "Running GutebergKit Script", + executable: try context.tool(named: "GutenbergKitPluginExecutable").path, + arguments: [scriptPath.string], + environment: [:], + inputFiles: [scriptPath], + outputFiles: [] + ) + ] + } +} diff --git a/ios/scripts/gbkit.sh b/ios/Plugins/gbkit.sh similarity index 100% rename from ios/scripts/gbkit.sh rename to ios/Plugins/gbkit.sh diff --git a/ios/Sources/GutenbergKitPluginExecutable/main.swift b/ios/Sources/GutenbergKitPluginExecutable/main.swift new file mode 100644 index 00000000..ec60f7ff --- /dev/null +++ b/ios/Sources/GutenbergKitPluginExecutable/main.swift @@ -0,0 +1,22 @@ +import Foundation + +guard CommandLine.arguments.count > 1 else { + fatalError("Script path not provided") +} + +let scriptPath = CommandLine.arguments[1] + +let process = Process() +process.executableURL = URL(fileURLWithPath: "/bin/bash") +process.arguments = [scriptPath] + +do { + try process.run() + process.waitUntilExit() + + if process.terminationStatus != 0 { + fatalError("Script execution failed with status \(process.terminationStatus)") + } +} catch { + fatalError("Failed to execute script: \(error.localizedDescription)") +} From 53e06a9a519d63e81f95ba347138360c9dcf5d7d Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Fri, 6 Dec 2024 11:57:16 -0500 Subject: [PATCH 11/14] ci: Allow Swift executable to access shell script Required for the Swift plugin to execute to the shell script. --- Package.swift | 4 +++- ios/Plugins/GutenbergKitPlugin/plugin.swift | 5 ++++- .../GutenbergKitPluginExecutable}/gbkit.sh | 0 3 files changed, 7 insertions(+), 2 deletions(-) rename ios/{Plugins => Sources/GutenbergKitPluginExecutable}/gbkit.sh (100%) diff --git a/Package.swift b/Package.swift index 95faaad0..8520bb17 100644 --- a/Package.swift +++ b/Package.swift @@ -33,7 +33,9 @@ let package = Package( .executableTarget( name: "GutenbergKitPluginExecutable", dependencies: [], - path: "ios/Sources/GutenbergKitPluginExecutable" + path: "ios/Sources/GutenbergKitPluginExecutable", + exclude: [], + resources: [.copy("gbkit.sh")] ) ] ) diff --git a/ios/Plugins/GutenbergKitPlugin/plugin.swift b/ios/Plugins/GutenbergKitPlugin/plugin.swift index e5d352a1..238528bc 100644 --- a/ios/Plugins/GutenbergKitPlugin/plugin.swift +++ b/ios/Plugins/GutenbergKitPlugin/plugin.swift @@ -4,7 +4,10 @@ import Foundation @main struct GutebergKitPlugin: BuildToolPlugin { func createBuildCommands(context: PluginContext, target: Target) throws -> [Command] { - let scriptPath = context.package.directory.appending(subpath: "ios/Plugins/gbkit.sh") + let scriptPath = try context.tool(named: "GutenbergKitPluginExecutable") + .path + .removingLastComponent() + .appending("GutenbergKit_GutenbergKitPluginExecutable.bundle/Contents/Resources/gbkit.sh") return [ .buildCommand( diff --git a/ios/Plugins/gbkit.sh b/ios/Sources/GutenbergKitPluginExecutable/gbkit.sh similarity index 100% rename from ios/Plugins/gbkit.sh rename to ios/Sources/GutenbergKitPluginExecutable/gbkit.sh From 1e63bd35793daab59d4c8059b409d82c0a518c1c Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Fri, 6 Dec 2024 12:00:00 -0500 Subject: [PATCH 12/14] ci: Search for GutenbergKit version in Swift PWD and parent directory A workaround for WP-iOS' unique directory structure that includes a nested `Modules/Package.swift`. --- ios/Sources/GutenbergKitPluginExecutable/gbkit.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/Sources/GutenbergKitPluginExecutable/gbkit.sh b/ios/Sources/GutenbergKitPluginExecutable/gbkit.sh index 6cbedc7f..212573ab 100755 --- a/ios/Sources/GutenbergKitPluginExecutable/gbkit.sh +++ b/ios/Sources/GutenbergKitPluginExecutable/gbkit.sh @@ -9,8 +9,10 @@ function show_help { function download { if [ -z "$1" ]; then + # HACK: This searches the parent directory as well (i.e., `..`), as WP-iOS + # uses a unique project structure with a nested `Modules/Package.swift` # If no version is passed, extract the current version from project's Package.resolved file - VERSION=$(find . -maxdepth 1 -name "*.xcworkspace" -exec grep -A 5 '"identity" : "gutenbergkit"' {}/xcshareddata/swiftpm/Package.resolved \; | grep '"revision"' | head -n 1 | sed -E 's/.*"revision" : "([^"]+)".*/\1/') + VERSION=$(find . .. -maxdepth 1 -name "*.xcworkspace" -exec grep -A 5 '"identity" : "gutenbergkit"' {}/xcshareddata/swiftpm/Package.resolved \; | grep '"revision"' | head -n 1 | sed -E 's/.*"revision" : "([^"]+)".*/\1/') validate_version_string "$VERSION" "❌ Failed to locate a valid version in your project's \".xcworkspace\" directory, please specify a version" else From 81fe15e54e5999b359cda9b4dc09d26aed9f071d Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Fri, 6 Dec 2024 12:00:48 -0500 Subject: [PATCH 13/14] ci: Improve GutenbergKit shell script error logs Output the attempted URL downloaded. --- ios/Sources/GutenbergKitPluginExecutable/gbkit.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ios/Sources/GutenbergKitPluginExecutable/gbkit.sh b/ios/Sources/GutenbergKitPluginExecutable/gbkit.sh index 212573ab..c408da43 100755 --- a/ios/Sources/GutenbergKitPluginExecutable/gbkit.sh +++ b/ios/Sources/GutenbergKitPluginExecutable/gbkit.sh @@ -25,8 +25,9 @@ function download { URL="https://cdn.a8c-ci.services/gutenberg-kit/gutenberg-kit-resources-${VERSION}.zip" HTTP_STATUS=$(curl -s -L -w "%{http_code}" -o $ZIP_FILE $URL) if [ "$HTTP_STATUS" -ne 200 ]; then - echo "❌ Failed downloading editor resources (status code: $HTTP_STATUS), check your network connection and the specified version" - rm $ZIP_FILE + echo "❌ Failed downloading editor resources (status code: $HTTP_STATUS), check your network connection and that the specified version exists" + echo " - Version: $VERSION" + echo " - URL: $URL" exit 1 fi From 9f833599b9173c24253af9e2126ae2b9b4c6b413 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Fri, 6 Dec 2024 12:01:33 -0500 Subject: [PATCH 14/14] ci: Ensure the Swift executable runs the `download` command --- ios/Sources/GutenbergKitPluginExecutable/main.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Sources/GutenbergKitPluginExecutable/main.swift b/ios/Sources/GutenbergKitPluginExecutable/main.swift index ec60f7ff..51bd9922 100644 --- a/ios/Sources/GutenbergKitPluginExecutable/main.swift +++ b/ios/Sources/GutenbergKitPluginExecutable/main.swift @@ -8,7 +8,7 @@ let scriptPath = CommandLine.arguments[1] let process = Process() process.executableURL = URL(fileURLWithPath: "/bin/bash") -process.arguments = [scriptPath] +process.arguments = [scriptPath, "download"] do { try process.run()